:root {
    --white: #FFFFFF;
    --black: #000000;
    --gray-dark: #111111;
    --gray-mid: #666666;
    --toxic-green: #E2FF00;
        /* CYBER YELLOW UPDATED */
        --accent-color: #E2FF00;
    --secondary-accent: #FF1493;
    --shadow-color: rgba(226, 255, 0, 0.3);
    --border: 1px;
    
    /* Theme colors - inverted for dark mode */
    --bg-primary: #111111;
    --bg-secondary: #0a0a0a;
        /* Darker secondary */
    --text-primary: #FFFFFF;
    --text-secondary: #AAAAAA;
    --border-color: #FFFFFF;
}

/* ================== COLOR THEMES ================== */
/* Default is Cyber Yellow (#E2FF00) defined in :root */

body.theme-pink {
    --toxic-green: #FF00CC;
    /* Neon Pink */
    --accent-color: #FF00CC;
    --secondary-accent: #00FFFF; /* Cyan contrast */
    --shadow-color: rgba(255, 0, 204, 0.3);
    --grid-color: rgba(255, 0, 204, 0.15);
    
    /* Intro Overrides */
    --intro-accent: #FF00CC;
    --intro-accent-2: #00FFFF;
    --intro-text: #FF00CC;
    --intro-glitch-1: #00FFFF;
    --intro-glitch-2: #FF00CC;
}

body.theme-orange {
    --toxic-green: #FF9900;
    /* Tech Orange */
    --accent-color: #FF9900;
    --secondary-accent: #FF4500; /* Red-Orange contrast */
    --shadow-color: rgba(255, 153, 0, 0.3);
    --grid-color: rgba(255, 153, 0, 0.15);

    /* Intro Overrides */
    --intro-accent: #FF9900;
    --intro-accent-2: #FF4500;
    --intro-text: #FF9900;
    --intro-glitch-1: #FF4500;
    --intro-glitch-2: #FF9900;
}

body.theme-white {
    --toxic-green: #FFFFFF;
    /* Pure White */
    --accent-color: #FFFFFF;
    --secondary-accent: #AAAAAA; /* Gray contrast */
    --shadow-color: rgba(255, 255, 255, 0.3);
    --grid-color: rgba(255, 255, 255, 0.1);

    /* Intro Overrides */
    --intro-accent: #FFFFFF;
    --intro-accent-2: #AAAAAA;
    --intro-text: #FFFFFF;
    --intro-glitch-1: #AAAAAA;
    --intro-glitch-2: #FFFFFF;
}

/* Ensure overrides work in light mode too */
body.light-theme.theme-pink {
    --toxic-green: #D600AB;
}

body.light-theme.theme-orange {
    --toxic-green: #CC7A00;
}

body.light-theme.theme-white {
    --toxic-green: #111111;
    /* Black in light mode for contrast */
}
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    font-family: 'JetBrains Mono', 'Share Tech Mono', monospace;
    background-color: var(--bg-primary);
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.03) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.03) 4px);
    background-size: 20px 20px;
    color: var(--text-primary);
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    position: relative;
    line-height: 1.4;
    overscroll-behavior-x: none; /* Prevent swipe navigation */
}

/* Global Scanline Effect */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(255, 255, 255, 0.03) 0px,
        transparent 1px,
        transparent 2px,
        rgba(255, 255, 255, 0.03) 3px
    );
    pointer-events: none;
    z-index: 9998;
    animation: scanlineMove 8s linear infinite;
    will-change: transform;
        transform: translateZ(0);
        /* Hardware acceleration */
}

@keyframes scanlineMove {
    0% { transform: translateY(0); }
    100% { transform: translateY(20px); }
}

/* Slashed Zero for Tech Numbers */
.slashed-zero,
.tech-header-data,
.sector-number,
.ruler-text,
.start-info,
.tech-data-row span:last-child,
.stat-value {
    font-feature-settings: "zero" 1;
    font-variant-numeric: slashed-zero;
}
/* Disable effects when classes are applied */
body.no-scanlines::before,
body.no-scanlines .scan-line {
    display: none !important;
}

body.no-glitch .glitch::before,
body.no-glitch .glitch::after,
body.no-glitch .start-title,
body.no-glitch .start-subtitle,
body.no-glitch .flicker-num,
body.no-glitch .mem-matrix span {
    display: none !important;
    animation: none !important;
    }
    
    body.no-glitch .start-title,
    body.no-glitch .start-subtitle {
        display: block !important;
        /* Ensure text remains visible, just no glitch */
        text-shadow: none !important;
}

/* ========== START SCREEN ========== */
/* TACTICAL GRID BACKGROUND */
.tactical-grid-bg {
    position: absolute;
    inset: 0;
    /* Use variables for grid colors to support light mode */
    background-image:
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 0;
    pointer-events: none;
    opacity: 0.3;
    /* Adjusted for better blend */
}

/* Light Theme Variables & Overrides */
:root {
    --grid-color: #434b00;
    /* Default Dark Mode Grid */
}

body.light-theme {
    /* Basic Colors Inversion */
        --bg-primary: #e0e0e0;
        --bg-secondary: #f5f5f5;
        --text-primary: #111111;
        --text-secondary: #333333;
        --border-color: #333333;
    
        /* Grid & Accents */
        --grid-color: rgba(0, 0, 0, 0.05);
            /* Light Mode Grid */
            --toxic-green: #008f11;
            /* Darker green for visibility on light bg */
    --accent-color: #008f11;
        /* Sync accent color */
    }
    
    /* Ensure WHITE theme becomes BLACK in light mode */
    body.light-theme.theme-white {
        --toxic-green: #000000;
        --accent-color: #000000;
        --border-color: #000000;
    }
    
    /* Light Theme Specifics for Components */
    body.light-theme .skill-card-tech {
        background: rgba(255, 255, 255, 0.9);
        border-color: #ccc;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    
    body.light-theme .skill-name-large {
        color: #000;
    }
    
    body.light-theme .skill-id,
    body.light-theme .skill-icon-small {
        color: #555;
    }
    
    body.light-theme .skill-bar-track {
        background: rgba(0, 0, 0, 0.1);
    }
    
    body.light-theme .mini-barcode {
        background: repeating-linear-gradient(to bottom,
                #333,
                #333 2px,
                transparent 2px,
                transparent 4px);
        opacity: 0.5;
}

/* Start Screen Background Adjustment */
.start-screen {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    /* Dynamic gradient based on theme */
        background: radial-gradient(circle at center, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Light Mode specific adjustments for Start Screen */
body.light-theme .start-content {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
}

body.light-theme .tech-header-info {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

body.light-theme .tech-sidebar-left,
body.light-theme .tech-sidebar-right {
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .tech-corner-bracket {
    border-color: var(--toxic-green);
    opacity: 0.8;
}

/* CORNER BRACKETS */
.tech-corner-bracket {
    position: absolute;
    width: 60px;
    height: 60px;
    border: 2px solid var(--toxic-green);
    opacity: 0.6;
    z-index: 2;
    transition: all 0.3s ease;
}

.tech-corner-bracket.top-left {
    top: 20px;
    left: 20px;
    border-right: none;
    border-bottom: none;
}

.tech-corner-bracket.top-right {
    top: 20px;
    right: 20px;
    border-left: none;
    border-bottom: none;
}

.tech-corner-bracket.bottom-left {
    bottom: 20px;
    left: 20px;
    border-right: none;
    border-top: none;
}

.tech-corner-bracket.bottom-right {
    bottom: 20px;
    right: 20px;
    border-left: none;
    border-top: none;
}

/* NEW TECHWEAR DECALS */
.tech-decals {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.hazard-stripes {
    position: absolute;
    height: 40px;
    background: repeating-linear-gradient(45deg,
            var(--toxic-green),
            var(--toxic-green) 10px,
            transparent 10px,
            transparent 20px);
    opacity: 0.8;
}

.stripes-top {
    top: 120px;
    right: -50px;
    width: 200px;
    transform: rotate(45deg);
}

.stripes-bottom {
    bottom: 120px;
    left: -50px;
    width: 200px;
    transform: rotate(45deg);
}

.cyber-star {
    position: absolute;
    width: 60px;
    height: 60px;
    background: var(--toxic-green);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    animation: rotate 10s linear infinite;
    opacity: 0.6;
    will-change: transform;
}

.star-1 {
    top: 15%;
    left: 15%;
    width: 40px;
    height: 40px;
    animation-duration: 8s;
}

.star-2 {
    bottom: 25%;
    right: 10%;
    width: 30px;
    height: 30px;
    animation-direction: reverse;
}

.hud-circle {
    position: absolute;
    border: 2px dashed var(--toxic-green);
    border-radius: 50%;
    opacity: 0.3;
    animation: rotate 20s linear infinite;
    will-change: transform;
}

.circle-large {
    top: 50%;
    left: 50%;
    width: min(500px, 80vw);
    height: min(500px, 80vw);
    transform: translate(-50%, -50%);
    border-width: 1px;
    border-style: solid;
    border-top-color: transparent;
    border-bottom-color: transparent;
}

.circle-small {
    top: 20%;
    right: 20%;
    width: 100px;
    height: 100px;
    border-style: dotted;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Light Theme Adjustments for Decals */
body.light-theme .hazard-stripes {
    opacity: 0.4;
}

body.light-theme .cyber-star {
    opacity: 0.4;
}

body.light-theme .hud-circle {
    opacity: 0.2;
}
/* ================== STICKER / DECAL SYSTEM ================== */
/* This system uses mix-blend-mode to drop black backgrounds */
.decal-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    /* Between background and content */
    overflow: hidden;
}

.tech-sticker {
    position: absolute;
    mix-blend-mode: screen;
    /* THE VITAL TRICK: Black becomes transparent */
    opacity: 0.7;
    filter: grayscale(100%);
    /* Optional: ensures they match the theme */
    transition: all 0.3s ease;
}

/* Sticker Variations */
.sticker-heavy {
    opacity: 0.85;
    mix-blend-mode: lighten;
}

.sticker-faint {
    opacity: 0.3;
}

/* Specific Placements for Manual Assets */
.sticker-header-warning {
    top: 120px;
    left: 2%;
    width: 180px;
    transform: rotate(0deg);
    opacity: 0.8;
}

.sticker-sidebar-arrow {
    bottom: 25%;
    right: 8%;
    width: 120px;
    transform: rotate(-90deg);
    opacity: 0.6;
}

.sticker-info-badge {
    top: 40%;
    left: 15%;
    width: 140px;
    opacity: 0.5;
    mix-blend-mode: overlay;
    /* Subtle blend for this one */
}

.sticker-footer-hacked {
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%) rotate(-2deg);
    width: 200px;
    opacity: 0.9;
    z-index: 10;
}

/* Float animations */
.sticker-sidebar-arrow {
    animation: pulseSticker 4s ease-in-out infinite;
    will-change: opacity;
}

@keyframes pulseSticker {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 0.8;
    }
}

/* NEW: Colorful Stickers (Preserving original colors) */
.sticker-neon-floating {
    top: 20%;
    right: 25%;
    width: 160px;
    opacity: 0.8;
    mix-blend-mode: normal;
    /* We want the colors to pop */
    animation: floatSticker 8s ease-in-out infinite;
    z-index: 1;
    will-change: transform;
}

.sticker-alert-side {
    top: 60%;
    left: -20px;
    width: 140px;
    transform: rotate(90deg);
    opacity: 0.7;
    mix-blend-mode: lighten;
    z-index: 1;
}

/* ================== PROCEDURAL TECH ICONS (CSS ONLY - EXHAUSTIVE) ================== */
.procedural-tech-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

/* --- CLUSTER CONTAINERS --- */
.tech-widget-cluster {
    position: absolute;
    display: flex;
    flex-direction: column;
    gap: 15px;
    opacity: 0.8;
}

.top-right-cluster {
    top: 100px;
    right: 30px;
    align-items: flex-end;
}

.left-cluster {
    top: 50%;
    left: 30px;
    transform: translateY(-50%);
    gap: 30px;
}

/* --- BATTERY WIDGET (Relocated to Top Right) --- */
.tech-battery-widget {
    width: 60px;
    height: 30px;
    border: 2px solid var(--text-secondary);
    border-radius: 4px;
    padding: 2px;
    display: flex;
    align-items: center;
    position: relative;
}

.tech-battery-widget::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 25%;
    bottom: 25%;
    width: 3px;
    background: var(--text-secondary);
}

.bat-level {
    width: 80%;
    height: 100%;
    background: var(--toxic-green);
    animation: batCharge 4s infinite linear;
    box-shadow: 0 0 5px var(--toxic-green);
    will-change: width;
}

.bat-icon {
    position: absolute;
    left: -20px;
    color: var(--toxic-green);
    font-size: 0.8rem;
}

.bat-text {
    position: absolute;
    top: -18px;
    right: 0;
    font-size: 0.5rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

/* --- CPU MONITOR --- */
.tech-cpu-monitor {
    text-align: right;
}

.cpu-label {
    font-size: 0.6rem;
    color: var(--toxic-green);
    margin-bottom: 2px;
}

.cpu-bars {
    display: flex;
    gap: 2px;
    height: 20px;
    align-items: flex-end;
}

.cpu-bar {
    width: 6px;
    background: var(--text-secondary);
    animation: cpuBarHeight 1s infinite ease-in-out alternate;
    will-change: height;
    animation-delay: var(--d);
}

@keyframes cpuBarHeight {
    0% {
        height: 20%;
        background: var(--text-secondary);
    }

    100% {
        height: 100%;
        background: var(--toxic-green);
    }
}

/* --- NETWORK ACTIVITY --- */
.tech-net-activity {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.6rem;
    color: var(--text-secondary);
}

.stream-line {
    display: flex;
    gap: 5px;
}

.flicker-num {
    color: var(--toxic-green);
    min-width: 20px;
}

/* --- MEMORY GRID --- */
.tech-memory-grid {
    border-left: 2px solid var(--toxic-green);
    padding-left: 10px;
}

.mem-header {
    font-size: 0.6rem;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    color: var(--text-secondary);
    position: absolute;
    left: -15px;
    top: 0;
}

.mem-matrix {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.mem-matrix span {
    width: 6px;
    height: 6px;
    background: var(--text-secondary);
    opacity: 0.3;
    animation: memBlink 2s infinite;
}

.mem-matrix span:nth-child(odd) {
    animation-delay: 0.5s;
}

.mem-matrix span:nth-child(even) {
    animation-delay: 0s;
}

.mem-matrix span:nth-child(5) {
    background: var(--toxic-green);
    opacity: 1;
}

@keyframes memBlink {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
        background: var(--toxic-green);
    }
}

/* --- SECURITY BADGE --- */
.tech-security-badge {
    position: absolute;
    bottom: 50px;
    right: 50px;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.badge-ring {
    position: absolute;
    inset: 0;
    border: 2px dashed var(--toxic-green);
    border-radius: 50%;
    border: 2px dashed var(--toxic-green);
        border-radius: 50%;
    animation: rotate 10s linear infinite;
    opacity: 0.5;
    will-change: transform;
}

.badge-icon {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.badge-text {
    font-size: 0.5rem;
    text-align: center;
    line-height: 1;
    color: var(--toxic-green);
}

/* ========== NEW TECHNICAL ELEMENTS ========== */
.tech-item {
    position: absolute;
    pointer-events: none;
    z-index: 1;
}


/* --- 7. WARNING LABEL --- */
.tech-warning-label {
    width: 100px;
    background: rgba(255, 200, 0, 0.1);
    border: 2px solid #FFC800;
    padding: 8px;
    font-size: 0.65rem;
    color: #FFC800;
    text-align: center;
    backdrop-filter: blur(5px);
}

.tl-corner {
    top: 80px;
    left: 30px;
}

.warn-icon {
    font-size: 1.2rem;
    margin-bottom: 3px;
}

.warn-text {
    font-weight: bold;
    letter-spacing: 2px;
}

.warn-subtext {
    font-size: 0.5rem;
    margin-top: 2px;
    opacity: 0.8;
}

.hazard-stripe-mini {
    height: 8px;
    background: repeating-linear-gradient(45deg,
            #FFC800,
            #FFC800 5px,
            #000 5px,
            #000 10px);
    margin-top: 5px;
}

/* --- 8. SERIAL NUMBER TAG --- */
.tech-serial-tag {
    width: 110px;
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid var(--text-secondary);
    padding: 6px;
    font-size: 0.6rem;
}

.tl-below {
    top: 200px;
    left: 30px;
}

.serial-header {
    font-size: 0.5rem;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.serial-code {
    font-size: 0.75rem;
    color: var(--toxic-green);
    letter-spacing: 1px;
    font-weight: bold;
}

.serial-barcode {
    display: flex;
    gap: 2px;
    margin-top: 4px;
    height: 15px;
}

.serial-barcode span {
    flex: 1;
    background: var(--text-primary);
}

.serial-barcode span:nth-child(even) {
    background: var(--text-secondary);
}

/* --- 9. CAUTION STRIPE --- */
.tech-caution-stripe {
    width: 150px;
    height: 40px;
}

.bl-corner {
    bottom: 80px;
    left: 30px;
}

.caution-bg {
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(-45deg,
            #FFC800,
            #FFC800 10px,
            #000 10px,
            #000 20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: bold;
    color: #000;
    letter-spacing: 1px;
}

.caution-bg span:last-child {
    font-size: 0.5rem;
}

/* --- 10. VERTICAL BARCODE --- */
.tech-barcode-vert {
    width: 30px;
}

.right-mid {
    right: 30px;
    top: 40%;
}

.barcode-lines {
    display: flex;
    gap: 1px;
    height: 60px;
    margin-bottom: 5px;
}

.barcode-lines i {
    flex: 1;
    background: var(--text-primary);
    border-radius: 1px;
}

.barcode-lines i:nth-child(odd) {
    background: var(--toxic-green);
}

.barcode-num {
    font-size: 0.6rem;
    text-align: center;
    color: var(--text-secondary);
    letter-spacing: 2px;
}

/* --- 11. CERTIFICATION BADGE --- */
.tech-cert-badge {
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid var(--toxic-green);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.br-above {
    bottom: 160px;
    right: 50px;
}

.cert-icon {
    font-size: 1rem;
    color: var(--toxic-green);
    margin-bottom: 2px;
}

.cert-text {
    font-size: 0.65rem;
    font-weight: bold;
    text-align: center;
    line-height: 0.9;
    color: var(--text-primary);
}

.cert-label {
    font-size: 0.45rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* --- 12. DATA STREAM INDICATOR --- */
.tech-data-stream {
    width: 100px;
}

.left-top-third {
    left: 30px;
    top: 30%;
}

.stream-header {
    font-size: 0.5rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.stream-bars {
    display: flex;
    gap: 3px;
    height: 30px;
    align-items: flex-end;
}

.stream-bars span {
    flex: 1;
    background: var(--toxic-green);
    height: var(--h);
    animation: dataFlow 1.5s infinite ease-in-out;
    opacity: 0.7;
}

@keyframes dataFlow {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }
}

.stream-value {
    font-size: 0.7rem;
    color: var(--toxic-green);
    margin-top: 5px;
}

/* --- 13. GEOMETRIC MARKER --- */
.tech-geo-marker {
    width: 80px;
}

.bl-deco {
    bottom: 140px;
    left: 30px;
}

.geo-circle {
    width: 40px;
    height: 40px;
    border: 2px solid var(--toxic-green);
    border-radius: 50%;
    margin-bottom: 5px;
}

.geo-line {
    width: 60%;
    height: 1px;
    background: var(--toxic-green);
    margin: 5px 0;
}

.geo-text {
    font-size: 0.6rem;
    color: var(--text-secondary);
    line-height: 1;
}

/* --- 14. TECH LABEL MODERN --- */
.tech-label-modern {
    width: 140px;
    height: 120px;
    background: rgba(80, 80, 80, 0.9);
    border: 2px solid var(--text-secondary);
}

.tr-label {
    top: 120px;
    right: 120px;
}

.label-corner {
    position: absolute;
    width: 10px;
    height: 10px;
    border: 2px solid var(--toxic-green);
}

.label-corner.tl {
    top: -2px;
    left: -2px;
    border-right: none;
    border-bottom: none;
}

.label-corner.tr {
    top: -2px;
    right: -2px;
    border-left: none;
    border-bottom: none;
}

.label-corner.bl {
    bottom: -2px;
    left: -2px;
    border-right: none;
    border-top: none;
}

.label-corner.br {
    bottom: -2px;
    right: -2px;
    border-left: none;
    border-top: none;
}

.label-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.label-top {
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--text-primary);
}

.label-code {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--toxic-green);
}

.label-desc {
    font-size: 0.5rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

/* --- 15. EXPERT LICENSE TAG --- */
.tech-expert-tag {
    width: 120px;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid var(--text-primary);
    padding: 10px;
}

.right-lower {
    right: 20px;
        bottom: 120px;
}

.expert-border {
    position: absolute;
    inset: 5px;
    border: 1px dashed var(--text-secondary);
}

.expert-logo {
    font-size: 1rem;
    font-weight: bold;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 5px;
}

.expert-id {
    font-size: 0.5rem;
    color: var(--text-secondary);
    text-align: center;
}

/* --- 16. QC HOLD LABEL --- */
.tech-qc-label {
    width: 70px;
    height: 70px;
    background: #FFC800;
    color: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 3px solid #000;
}

.left-bottom {
    left: 20px;
        bottom: 120px;
}

.qc-text {
    font-size: 1.2rem;
    line-height: 0.9;
    text-align: center;
}

.qc-subtext {
    font-size: 0.5rem;
    margin-top: 5px;
}

/* --- 17. BATTERY PACK INFO --- */
.tech-battery-info {
    display: flex;
    gap: 8px;
    align-items: center;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--text-secondary);
    padding: 8px;
}

.bc-right {
    bottom: 20px;
        right: 20px;
}

.bat-info-icon {
    font-size: 1.5rem;
    color: var(--toxic-green);
}

.bat-info-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.5rem;
    color: var(--text-secondary);
}

.bat-voltage {
    color: var(--text-primary);
    font-size: 0.6rem;
}

/* --- 18. FRAGILE WARNING --- */
.tech-fragile-tag {
    width: 90px;
    background: #DC143C;
    color: #FFF;
    padding: 8px;
    text-align: center;
    font-weight: bold;
    border: 2px solid #FFF;
}

.tr-warn {
    top: 260px;
    right: 30px;
}

.fragile-icon {
    font-size: 1.2rem;
    margin-bottom: 3px;
}

.fragile-text {
    font-size: 0.7rem;
    line-height: 1.1;
}

/* --- 19. SPACE WARFARE TECH TAG --- */
.tech-warfare-tag {
    width: 130px;
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid var(--text-primary);
    padding: 8px;
    font-size: 0.5rem;
    color: var(--text-secondary);
}

.left-mid-up {
    left: 20px;
        top: 50%;
        transform: translateY(-50%);
}

.warfare-header {
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.warfare-subheader {
    margin-bottom: 4px;
}

.warfare-code,
.warfare-part {
    font-size: 0.45rem;
    margin-top: 2px;
}

/* --- 20. HAZARD DIAMOND --- */
.tech-hazard-diamond {
    width: 70px;
    height: 70px;
}

.rb-quad {
    right: 120px;
    bottom: 120px;
}

.diamond-shape {
    width: 100%;
    height: 100%;
    transform: rotate(45deg);
    border: 2px solid #000;
    position: relative;
}

.diamond-section {
    position: absolute;
    width: 50%;
    height: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
    border: 1px solid #000;
}

.diamond-section.top {
    top: 0;
    left: 25%;
    background: #DC143C;
    color: #FFF;
}

.diamond-section.right {
    top: 25%;
    right: 0;
    background: #FFC800;
    color: #000;
}

.diamond-section.bottom {
    bottom: 0;
    left: 25%;
    background: #4169E1;
    color: #FFF;
}

.diamond-section.left {
    top: 25%;
    left: 0;
    background: #FFF;
    color: #000;
}

/* --- 21. GPS TRACKING TAG --- */
.tech-gps-tag {
    display: flex;
    gap: 6px;
    align-items: center;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid var(--toxic-green);
    padding: 6px;
    font-size: 0.5rem;
    color: var(--text-secondary);
}

.br-gps {
    bottom: 230px;
    right: 30px;
}

.gps-icon {
    font-size: 1rem;
    color: var(--toxic-green);
}

.gps-text {
    line-height: 1.1;
}

/* --- 22. TECHNICAL SERGEANT STREET --- */
.tech-sergeant-tag {
    background: var(--toxic-green);
    color: #000;
    padding: 6px 15px;
    font-weight: bold;
    font-size: 0.7rem;
    letter-spacing: 2px;
}

.top-floating {
    top: 50px;
        right: 20%;
        transform: scale(0.65);
        opacity: 0.7;
}

.sergeant-unit {
    font-size: 0.6rem;
    text-align: center;
    margin-top: 2px;
}

/* --- 23. CONFIRMED SPACE TAG --- */
.tech-space-tag {
    display: flex;
    gap: 8px;
    align-items: center;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #DC143C;
    padding: 8px 12px;
    opacity: 0.6;
}

.cl-floating {
    right: 20px;
        top: 60%;
        transform: scale(0.65);
        opacity: 0.6;
}

.space-label {
    font-size: 0.7rem;
    font-weight: bold;
    color: #DC143C;
}

.space-icon {
    font-size: 1.2rem;
    color: #DC143C;
}

/* --- 24. MAX CLIMB INDICATOR --- */
.tech-climb-tag {
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.left-upper {
    left: 20px;
        top: 60px;
}

.climb-label {
    font-size: 0.7rem;
    font-weight: bold;
    color: var(--text-primary);
    line-height: 1;
}

/* --- 25. HACKED LABEL --- */
.tech-hacked-label {
    width: 180px;
    height: 80px;
    background: rgba(0, 0, 0, 0.95);
    border: 3px solid var(--toxic-green);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.top-center-mod {
    top: 20px;
        left: 20%;
        transform: scale(0.65);
        opacity: 0.6;
}

.hacked-outline {
    position: absolute;
    inset: 8px;
    border: 1px dashed var(--toxic-green);
}

.hacked-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--toxic-green);
    letter-spacing: 3px;
}

.hacked-sub {
    font-size: 0.5rem;
    color: var(--text-secondary);
}

/* --- 26. ACCESS CARD --- */
.tech-access-card {
    width: 100px;
    height: 120px;
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid var(--toxic-green);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.bl-access {
    bottom: 20px;
        left: 90px;
}

.access-icon {
    font-size: 2rem;
    color: var(--toxic-green);
}

.access-main {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-primary);
}

.access-sub {
    font-size: 0.6rem;
    color: var(--text-secondary);
}

/* --- 27. RETHINK TAG --- */
.tech-rethink-tag {
    width: 150px;
    height: 140px;
    background: rgba(0, 0, 0, 0.95);
    border: 3px solid var(--text-primary);
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rc-modern {
    right: 50px;
        bottom: 50px;
        top: auto;
        left: auto;
        transform: scale(0.6);
        opacity: 0.5;
}

.rethink-code {
    font-size: 0.5rem;
    color: var(--text-secondary);
}

.rethink-main {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--toxic-green);
}

.rethink-sub {
    font-size: 0.8rem;
    color: var(--text-primary);
}

.rethink-progress {
    width: 100%;
    height: 40px;
    border: 1px solid var(--text-secondary);
    border-radius: 50%;
    position: relative;
}

.rethink-progress::after {
    content: '';
    position: absolute;
    inset: 5px;
    border: 2px solid var(--toxic-green);
    border-radius: 50%;
    border-top-color: transparent;
    animation: rotate 2s linear infinite;
}

/* --- 28. RENEW LABEL --- */
.tech-renew-label {
    width: 130px;
    height: 130px;
    background: var(--toxic-green);
    color: #000;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 10px;
}

.lc-bright {
    left: 50%;
    top: 30%;
    transform: translateX(-50%);
}

.renew-icons {
    display: flex;
    gap: 10px;
    font-size: 1.2rem;
}

.renew-main {
    font-size: 1.5rem;
    font-weight: bold;
}

.renew-bars {
    display: flex;
    gap: 3px;
    width: 80%;
}

.renew-bars span {
    flex: 1;
    height: 15px;
    background: #000;
}

.renew-sub {
    font-size: 0.9rem;
    font-weight: bold;
}

/* --- 29. FUTURE CARD --- */
.tech-future-card {
    width: 180px;
    height: 100px;
    background: var(--toxic-green);
    color: #000;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bc-future {
    bottom: 150px;
    left: 50%;
    transform: translateX(-50%);
}

.future-main {
    font-size: 1.5rem;
    font-weight: bold;
}

.future-grid {
    display: flex;
    gap: 10px;
    font-size: 1.5rem;
}

.future-codes {
    display: flex;
    gap: 10px;
    font-size: 0.6rem;
    font-weight: bold;
}

/* --- 30. LPG SYSTEM TAG --- */
.tech-lpg-tag {
    width: 80px;
    background: rgba(0, 0, 0, 0.9);
    border: 3px solid #FFC800;
    padding: 10px;
    text-align: center;
}

.tl-lpg {
    top: 300px;
    left: 30px;
}

.lpg-header {
    font-size: 1.2rem;
    font-weight: bold;
    color: #FFC800;
}

.lpg-sub {
    font-size: 0.6rem;
    color: var(--text-secondary);
    margin-top: 3px;
}

/* ========== RESPONSIVE OPTIMIZATION FOR NEW ELEMENTS ========== */

@media (max-width: 1024px) {

    /* Hide some elements on tablets */
    .tech-label-modern,
    .tech-rethink-tag,
    .tech-hacked-label,
    .tech-sergeant-tag,
    .tech-space-tag,
    .tech-renew-label,
    .tech-future-card {
        display: none;
    }

    /* Resize remaining elements */
    .tech-warning-label,
    .tech-serial-tag,
    .tech-expert-tag,
    .tech-warfare-tag {
        transform: scale(0.9);
    }
}

@media (max-width: 768px) {

    /* Hide most decorative elements on mobile */
    .tech-warning-label,
    .tech-serial-tag,
    .tech-caution-stripe,
    .tech-barcode-vert,
    .tech-cert-badge,
    .tech-data-stream,
    .tech-geo-marker,
    .tech-expert-tag,
    .tech-qc-label,
    .tech-battery-info,
    .tech-fragile-tag,
    .tech-warfare-tag,
    .tech-hazard-diamond,
    .tech-gps-tag,
    .tech-climb-tag,
    .tech-access-card,
    .tech-lpg-tag {
        display: none;
    }

    /* Keep only essential widgets visible */
    .tech-widget-cluster {
        gap: 10px;
    }

    .top-right-cluster {
        top: 80px;
        right: 15px;
    }

    .left-cluster {
        left: 15px;
    }

    .tech-security-badge {
        bottom: 30px;
        right: 30px;
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 480px) {

    /* Ultra-minimal on small phones */
    .tech-security-badge,
    .left-cluster {
        display: none;
    }
}

/* ========== THEME COMPATIBILITY ========== */

/* Light theme adjustments for new elements */
body.light-theme .tech-warning-label {
    background: rgba(255, 200, 0, 0.2);
    border-color: #CC9900;
    color: #CC9900;
}

body.light-theme .hazard-stripe-mini {
    background: repeating-linear-gradient(45deg,
            #CC9900,
            #CC9900 5px,
            #FFF 5px,
            #FFF 10px);
}

body.light-theme .tech-serial-tag,
body.light-theme .tech-expert-tag,
body.light-theme .tech-warfare-tag {
    background: rgba(255, 255, 255, 0.95);
    border-color: #333;
}

body.light-theme .tech-caution-stripe .caution-bg {
    background: repeating-linear-gradient(-45deg,
            #CC9900,
            #CC9900 10px,
            #FFF 10px,
            #FFF 20px);
}

body.light-theme .tech-hacked-label,
body.light-theme .tech-access-card,
body.light-theme .tech-rethink-tag {
    background: rgba(255, 255, 255, 0.98);
}

body.light-theme .tech-renew-label {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

body.light-theme .tech-future-card {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

body.light-theme .diamond-section.top {
    background: #FF6B6B;
}

body.light-theme .diamond-section.bottom {
    background: #6B8EFF;
}

/* ========== PERFORMANCE OPTIMIZATIONS ========== */

/* Disable animations when performance mode is on */
body.perf-low .tech-warning-label,
body.perf-low .tech-serial-tag,
body.perf-low .tech-cert-badge,
body.perf-low .tech-data-stream span,
body.perf-low .tech-rethink-tag,
body.perf-low .tech-renew-label,
body.perf-low .tech-future-card {
    animation: none !important;
}

body.perf-low .badge-ring,
body.perf-low .rethink-progress::after {
    animation: none !important;
}

/* Reduce blur effects on low performance */
body.perf-low .tech-warning-label,
body.perf-low .tech-battery-info,
body.perf-low .tech-gps-tag {
    backdrop-filter: none;
}

/* ========== END NEW TECHNICAL ELEMENTS ========== */

/* --- CROSSHAIR (Retained) --- */
.tech-crosshair-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    /* Very subtle */
    border-radius: 50%;
    opacity: 0.3;
}

.tech-crosshair-center .reticle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 20px;
    background: var(--toxic-green);
}

.tech-crosshair-center .reticle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 2px;
    background: var(--toxic-green);
}
/* HEADER INFO BAR */
.tech-header-info {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 40px;
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: var(--text-secondary);
    z-index: 5;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 15px;
    border: 1px solid rgba(57, 255, 20, 0.2);
}

.tech-header-info {
    border-color: var(--grid-color) !important;
}
.tech-header-info span span {
    color: var(--toxic-green);
}

.status-ok {
    animation: pulse-slow 3s infinite;
}

/* SIDEBARS */
.tech-sidebar-left,
.tech-sidebar-right {
    position: absolute;
    top: 100px;
    bottom: 100px;
    width: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5;
    pointer-events: none;
}

.tech-sidebar-left {
    left: 30px;
    border-right: 1px solid var(--grid-color);
}

.tech-sidebar-right {
    right: 30px;
    border-left: 1px solid var(--grid-color);
}

.vertical-ruler {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-end;
    margin-bottom: auto;
    margin-top: 50px;
}

.ruler-mark {
    width: 15px;
    height: 1px;
    background: var(--text-secondary);
}

.ruler-text {
    font-size: 0.6rem;
    writing-mode: vertical-rl;
    color: var(--toxic-green);
    opacity: 0.7;
    margin: 10px 0;
}

.rotate-text {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 0.7rem;
    letter-spacing: 3px;
    color: var(--gray-mid);
    white-space: nowrap;
    margin-top: auto;
    margin-bottom: 50px;
}

/* RIGHT SIDE DATA */
.tech-data-block {
    margin-top: 50px;
    width: 100%;
    padding: 0 10px;
        margin-bottom: auto;
    }
    
    .tech-data-row {
        display: flex;
        justify-content: space-between;
        font-size: 0.55rem;
        margin-bottom: 8px;
        color: var(--text-secondary);
}

.tech-barcode {
    margin: 20px 0;
    opacity: 0.5;
}

.coordinates {
    font-size: 0.6rem;
    color: var(--toxic-green);
    text-align: right;
    margin-top: auto;
    margin-bottom: 50px;
    padding-right: 10px;
    opacity: 0.7;
}

/* BACKDROP FOR CONTENT */
.start-content {
    position: relative;
        z-index: 10;
        /* Above grid */
    text-align: center;
    max-width: 600px;
    padding: 40px;
    background: rgba(17, 17, 17, 0.75);
        /* Semi-transparent background */
        backdrop-filter: blur(5px);
        border: 1px solid var(--grid-color);
        box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    }
    
    @keyframes pulse-slow {
    
        0%,
        100% {
            opacity: 1;
        }
    
        50% {
            opacity: 0.5;
        }
    }
    
    /* Mobile Adjustments for Start Screen */
    @media (max-width: 768px) {
    
        .tech-sidebar-left,
        .tech-sidebar-right,
        .tech-header-info {
            display: none;
        }
    
        .tech-corner-bracket {
            width: 30px;
            height: 30px;
        }
}

.start-logo {
    margin-bottom: 40px;
    display: flex;
    justify-content: center;
}

.logo-frame {
    width: 120px;
    height: 120px;
    border: var(--border) solid var(--border-color);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.corner-mark {
    position: absolute;
    font-size: 14px;
    color: var(--gray-mid);
}

.corner-mark.tl { top: 4px; left: 4px; }
.corner-mark.tr { top: 4px; right: 4px; }
.corner-mark.bl { bottom: 4px; left: 4px; }
.corner-mark.br { bottom: 4px; right: 4px; }

.logo-text {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 8px;
}

.start-title {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 10px;
    margin-bottom: 15px;
}

.start-subtitle {
    font-size: 0.85rem;
    letter-spacing: 2px;
    color: var(--gray-mid);
    margin-bottom: 40px;
    text-transform: uppercase;
}

.start-button {
    background: var(--text-primary);
    color: var(--bg-primary);
    border: var(--border) solid var(--border-color);
    padding: 18px 40px;
    font-family: inherit;
    font-size: 1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 15px;
}

.start-button::before {
    content: "";
    position: absolute;
    inset: -4px;
    border: var(--border) solid var(--text-secondary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.start-button:hover::before {
    opacity: 1;
}

.start-button:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
    transform: scale(1.05);
}

.start-button:hover .button-indicator {
    color: var(--toxic-green);
    animation: arrowPulse 0.6s ease-in-out infinite;
}

@keyframes arrowPulse {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

.start-button:active {
    transform: scale(0.98);
}

.button-indicator {
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.start-info {
    margin-top: 60px;
    font-size: 0.7rem;
    letter-spacing: 1px;
    color: var(--gray-mid);
    text-transform: uppercase;
}

.start-info .separator {
    margin: 0 10px;
}

/* ========== GLITCH TEXT EFFECTS ========== */
.glitch {
    position: relative;
    display: inline-block;
    overflow: hidden;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    overflow: hidden;
}

.glitch::before {
    animation: glitch-1 2s infinite;
    color: #ff00ff;
    z-index: -1;
}

.glitch::after {
    animation: glitch-2 3s infinite;
    color: #00ffff;
    z-index: -2;
}

.glitch:hover::before {
    animation: glitch-1 0.3s infinite;
}

.glitch:hover::after {
    animation: glitch-2 0.3s infinite;
}

@keyframes glitch-1 {
    0% {
        transform: translate(0);
        opacity: 0;
    }
    20% {
        transform: translate(-2px, 2px);
        opacity: 0.8;
    }
    40% {
        transform: translate(-2px, -2px);
        opacity: 0;
    }
    60% {
        transform: translate(2px, 2px);
        opacity: 0.8;
    }
    80% {
        transform: translate(2px, -2px);
        opacity: 0;
    }
    100% {
        transform: translate(0);
        opacity: 0;
    }
}

@keyframes glitch-2 {
    0% {
        transform: translate(0);
        opacity: 0;
    }
    25% {
        transform: translate(3px, 3px);
        opacity: 0.6;
    }
    50% {
        transform: translate(-3px, 3px);
        opacity: 0;
    }
    75% {
        transform: translate(3px, -3px);
        opacity: 0.6;
    }
    100% {
        transform: translate(0);
        opacity: 0;
    }
}

/* Add random clip-path effect for more complex glitch */
.glitch.glitch-intense::before {
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
}

/* =========================================
   AWARDS MODAL STYLES & UTILITIES
   ========================================= */

/* --- MODAL CORE --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: rgba(15, 15, 20, 0.95);
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.95) translateY(20px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

/* --- UTILITIES --- */
.glass-panel {
    background: rgba(20, 20, 25, 0.7) !important;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tech-border {
    border: 1px solid var(--grid-color);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 0, 0, 0.5);
    position: relative;
}

.tech-border::before,
.tech-border::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    border: 2px solid var(--accent-color);
    transition: all 0.3s ease;
}

.tech-border::before {
    top: -1px;
    left: -1px;
    border-right: none;
    border-bottom: none;
}

.tech-border::after {
    bottom: -1px;
    right: -1px;
    border-left: none;
    border-top: none;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
}

.modal-title {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-color);
    letter-spacing: 2px;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--accent-color);
}

.modal-backdrop {
    /* Handled by modal-overlay background, but kept for compatibility if script creates it separately */
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1999;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.modal-backdrop.active {
    opacity: 1;
    pointer-events: all;
}

/* --- AWARDS GRID --- */
.awards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
}

.award-card {
    background: rgba(10, 10, 16, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    overflow: hidden;
}

.award-card:hover {
    background: rgba(var(--award-color), 0.1);
    /* fallback */
    background: color-mix(in srgb, var(--award-color) 10%, rgba(10, 10, 16, 0.9));
    border-color: var(--award-color);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5), 0 0 20px rgba(var(--award-color), 0.2);
    /* fallback */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5), 0 0 20px color-mix(in srgb, var(--award-color) 20%, transparent);
}

.award-icon-box {
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.award-card:hover .award-icon-box {
    border-color: var(--award-color);
    box-shadow: 0 0 10px var(--award-color);
    text-shadow: 0 0 10px var(--award-color);
}

.award-content {
    flex-grow: 1;
}

.award-rank {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    font-weight: bold;
    letter-spacing: 1px;
    margin-bottom: 5px;
    opacity: 0.9;
}

.award-title {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 5px;
    text-transform: uppercase;
}

.award-event {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 5px;
    display: inline-block;
}

.award-desc {
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--text-dim);
}

.award-deco-corner {
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 30px 30px 0;
    border-color: transparent var(--award-color) transparent transparent;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.award-card:hover .award-deco-corner {
    opacity: 1;
    filter: drop-shadow(0 0 5px var(--award-color));
}
.glitch.glitch-intense::after {
    clip-path: polygon(0 60%, 100% 60%, 100% 100%, 0% 100%);
}

/* ========== PARALLAX LAYERS ========== */
.parallax-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.parallax-shape {
    position: absolute;
    border: 1px solid rgba(57, 255, 20, 0.1);
    opacity: 0.3;
    transition: transform 0.1s ease-out;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 5%;
    border-radius: 50%;
    animation: float1 20s ease-in-out infinite;
}

.shape-2 {
    width: 200px;
    height: 200px;
    top: 60%;
    right: 10%;
    transform: rotate(45deg);
    animation: float2 15s ease-in-out infinite;
}

.shape-3 {
    width: 150px;
    height: 150px;
    top: 30%;
    right: 20%;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    animation: float3 18s ease-in-out infinite;
}

.shape-4 {
    width: 250px;
    height: 250px;
    bottom: 15%;
    left: 15%;
    border-radius: 50%;
    animation: float4 22s ease-in-out infinite;
}

.shape-5 {
    width: 180px;
    height: 180px;
    top: 50%;
    left: 40%;
    transform: rotate(30deg);
    animation: float5 16s ease-in-out infinite;
}

.shape-6 {
    width: 220px;
    height: 220px;
    bottom: 25%;
    right: 25%;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    animation: float6 19s ease-in-out infinite;
}

@keyframes float1 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(30px, -30px) rotate(180deg); }
}

@keyframes float2 {
    0%, 100% { transform: translate(0, 0) rotate(45deg); }
    50% { transform: translate(-40px, 40px) rotate(225deg); }
}

@keyframes float3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, 30px) scale(1.2); }
}

@keyframes float4 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-50px, -20px); }
}

@keyframes float5 {
    0%, 100% { transform: translate(0, 0) rotate(30deg); }
    50% { transform: translate(35px, -25px) rotate(210deg); }
}

@keyframes float6 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-30px, 35px) rotate(180deg); }
}

/* ========== BOOT OVERLAY ========== */
.boot-overlay {
    position: fixed;
    inset: 0;
    z-index: 10001;
    pointer-events: auto;
        /* Changed to block interaction during boot */
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

.boot-overlay * {
    cursor: none;
}

.boot-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.boot-top,
.boot-bottom {
    position: absolute;
    left: 0;
    right: 0;
    height: 50%;
    background: var(--bg-primary);
    border: var(--border) solid var(--border-color);
}

.boot-top {
    top: 0;
    animation: shutterTop 0.8s ease-in-out forwards;
    animation-play-state: paused;
}

.boot-bottom {
    bottom: 0;
    animation: shutterBottom 0.8s ease-in-out forwards;
    animation-play-state: paused;
}

.boot-overlay.complete .boot-top,
.boot-overlay.complete .boot-bottom {
    animation-play-state: running;
}

@keyframes shutterTop {
    to {
        transform: translateY(-100%);
        opacity: 0;
    }
}

@keyframes shutterBottom {
    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

.boot-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: min(500px, 90%);
    z-index: 10002;
    background: var(--bg-primary);
    padding: 40px;
    border-radius: 4px;
}

.boot-loader::before {
    content: "";
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: var(--toxic-green);
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
    animation: hexSpin 2s linear infinite;
}

@keyframes hexSpin {
    0% { transform: translateX(-50%) rotate(0deg); }
    100% { transform: translateX(-50%) rotate(360deg); }
}

.loader-bar {
    width: 100%;
    height: 4px;
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
    margin-bottom: 30px;
    border: var(--border) solid var(--border-color);
}

.loader-bar::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--toxic-green);
    transform: scaleX(0);
    transform-origin: left;
    animation: loadBar 2s ease-in-out forwards;
}

@keyframes loadBar {
    to { transform: scaleX(1); }
}

.loader-text {
    font-size: 1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 10px;
    font-weight: 700;
}

.loader-status {
    font-size: 0.75rem;
    color: var(--gray-mid);
    letter-spacing: 1px;
}

/* ========== DASHBOARD GRID ========== */
.dashboard {
    min-height: 100vh;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    opacity: 0;
    transition: opacity 0.5s ease-in;
    grid-auto-flow: dense;
    align-items: start;
        /* Prevent items from stretching to full row height */
}

.dashboard.visible {
    opacity: 1;
}

@media (min-width: 768px) {
    .dashboard {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1200px) {
    .dashboard {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ========== GRID ITEMS ========== */
.grid-item {
    background: var(--bg-primary);
    border: var(--border) solid var(--border-color);
    padding: 24px;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    height: 100%;
        /* Default to filling height, but parent align-items: start overrides unless specified */
        display: flex;
        flex-direction: column;
}

.grid-item.reveal {
    opacity: 1;
    transform: translateY(0);
}

.grid-item:nth-child(1) { transition-delay: 0.05s; }
.grid-item:nth-child(2) { transition-delay: 0.1s; }
.grid-item:nth-child(3) { transition-delay: 0.15s; }
.grid-item:nth-child(4) { transition-delay: 0.2s; }
.grid-item:nth-child(5) { transition-delay: 0.25s; }
.grid-item:nth-child(6) { transition-delay: 0.3s; }
.grid-item:nth-child(7) { transition-delay: 0.35s; }
.grid-item:nth-child(8) { transition-delay: 0.4s; }
.grid-item:nth-child(9) { transition-delay: 0.45s; }
.grid-item:nth-child(10) { transition-delay: 0.5s; }

.grid-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255,255,255,0.02) 10px,
        rgba(255,255,255,0.02) 11px
    );
    pointer-events: none;
    z-index: 0;
}

/* Notch corners decorativos (sin afectar el contenido) */
.grid-item::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(135deg, var(--border-color) 0%, var(--border-color) 6px, transparent 6px),
        linear-gradient(-135deg, var(--border-color) 0%, var(--border-color) 6px, transparent 6px),
        linear-gradient(45deg, var(--border-color) 0%, var(--border-color) 6px, transparent 6px),
        linear-gradient(-45deg, var(--border-color) 0%, var(--border-color) 6px, transparent 6px);
    background-size: 20px 20px;
    background-position: top left, top right, bottom right, bottom left;
    background-repeat: no-repeat;
    pointer-events: none;
    opacity: 0.15;
    z-index: 0;
}

.grid-item:nth-child(10) { transition-delay: 0.5s; }

/* Corner markers */
.corner {
    position: absolute;
    font-size: 10px;
    color: var(--gray-mid);
    font-weight: 400;
}

.corner.top-left { top: 4px; left: 4px; }
.corner.top-right { top: 4px; right: 4px; }
.corner.bottom-left { bottom: 4px; left: 4px; }
.corner.bottom-right { bottom: 4px; right: 4px; }

/* ========== HEADER BLOCK ========== */
.header-block {
    grid-column: span 1;
    overflow: hidden;
    order: 1;
}

.header-block::after {
    content: "";
    position: absolute;
    top: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: var(--text-primary);
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
    opacity: 0.05;
}

@media (min-width: 768px) {
    .header-block {
        grid-column: span 3;
    }
}

@media (min-width: 1200px) {
    .header-block {
        grid-column: span 2;
        grid-row: span 2;
    }
}

.status-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    background: var(--toxic-green);
    border: var(--border) solid var(--black);
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.separator {
    color: var(--gray-mid);
}

.main-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    letter-spacing: 8px;
    text-transform: uppercase;
    margin-bottom: 10px;
    line-height: 1;
}

.main-subtitle {
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: var(--gray-mid);
    text-transform: uppercase;
    margin-bottom: 30px;
}

.serial-number {
    font-size: 0.65rem;
    letter-spacing: 1px;
    color: var(--gray-mid);
    margin-bottom: 30px;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: auto;
}

.stat-box {
    border: var(--border) solid var(--border-color);
    padding: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-box:hover {
    background: var(--bg-secondary);
        border-color: var(--toxic-green);
        transform: translateY(-2px);
        box-shadow: 0 5px 15px var(--shadow-color);
    }
    
    /* ========== SPECIAL BLOCK SIZING ========== */
    
    /* Link Blocks (Standard) */
    .link-block {
        min-height: 200px;
        height: 200px;
        /* Fixed height for standard square squares */
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-decoration: none;
        color: var(--text-primary);
        transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    /* VR Projects & Awards - Specific Height Fix */
    .link-block[data-id="04"],
    /* VR_PROJECTS */
    .link-block[data-id="07"]
    
    /* AWARDS */
        {
        height: 200px !important;
        /* Force square height */
        grid-column: span 1 !important;
        /* Keep as single blocks */
    }
    
    /* Contact Block - Constrain Height */
    .contact-block {
        grid-column: span 2;
        height: fit-content;
        /* Allow it to wrap only as needed */
        min-height: auto;
    }
    
    @media (min-width: 768px) {
        .link-block[data-id="04"] {
            /* Optional: If you want VR projects larger on desktop, uncomment below */
            /* grid-row: span 2; */
            height: 200px !important;
        }
    }
    
    .link-block:hover {
    background: var(--text-primary);
    color: var(--bg-primary);
    box-shadow: inset 0 0 20px var(--shadow-color), 0 0 10px var(--shadow-color);
    transform: scale(1.05);
}

.stat-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 4px;
}

.stat-label {
    display: block;
    font-size: 0.65rem;
    letter-spacing: 1px;
    color: var(--gray-mid);
}

.stat-box:hover .stat-label {
    color: var(--toxic-green);
}

/* Tech rulers */
.tech-ruler {
    position: absolute;
    left: 0;
    width: 100%;
    height: 10px;
    background: repeating-linear-gradient(
        90deg,
        var(--text-secondary) 0 2px,
        transparent 2px 10px
    );
    opacity: 0.3;
}

.tech-ruler.top { top: 0; }
.tech-ruler.bottom { bottom: 0; }

/* Scan line effect */
.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--toxic-green);
    opacity: 0.5;
    animation: scanMove 3s linear infinite;
}

@keyframes scanMove {
    0% { transform: translateY(0); opacity: 0; }
    50% { opacity: 0.5; }
    100% { transform: translateY(200px); opacity: 0; }
}

.label-code {
    color: var(--toxic-green);
    font-size: 0.65rem;
}

/* ========== INFO BLOCK ========== */
.info-block {
    grid-column: span 1;
    overflow: hidden;
    order: 1;
}

.info-block::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -20px;
    width: 3px;
    height: 200%;
    background: var(--text-primary);
    opacity: 0.05;
    transform: rotate(15deg);
}

.info-block::after {
    content: "";
    position: absolute;
    top: -50%;
    right: 40px;
    width: 2px;
    height: 200%;
    background: var(--toxic-green);
    opacity: 0.1;
    transform: rotate(15deg);
}

@media (min-width: 768px) {
    .info-block {
        grid-column: span 3;
    }
}

@media (min-width: 1200px) {
    .info-block {
        grid-column: span 2;
        grid-row: span 1;
    }
}

.block-label {
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 15px;
    color: var(--gray-mid);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 100%;
}

.info-text {
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.barcode {
    display: flex;
    gap: 3px;
    height: 40px;
    align-items: flex-end;
}

.bar {
    flex: 1;
    background: var(--text-primary);
    height: 100%;
}

.bar.wide {
    flex: 2;
}

/* ========== LINK BLOCKS ========== */
.link-block {
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    gap: 10px;
    min-height: 200px;
    /* transition: all 0.3s ease; REMOVED per user request */
    cursor: pointer;
    order: 2;
}



.link-block:hover .corner {
    color: var(--toxic-green);
}

.link-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    transition: transform 0.3s ease;
}



.link-title {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    /* transition: color 0.3s ease; REMOVED */
}

.link-subtitle {
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: var(--text-secondary);
    /* transition: color 0.3s ease; REMOVED */
}

.link-block:hover .link-subtitle {
    color: var(--bg-primary);
}

.link-id {
    position: absolute;
    bottom: 12px;
    right: 12px;
    font-size: 0.65rem;
    letter-spacing: 1px;
    color: var(--toxic-green);
}

/* ========== CONSOLE BLOCK ========== */
.console-block {
    grid-column: span 1;
    background: #0a0a0a !important;
    color: var(--toxic-green) !important;
    border-color: var(--toxic-green) !important;
    height: 200px;
    order: 7;
}

@media (min-width: 768px) {
    .console-block {
        grid-column: span 3;
    }
}

@media (min-width: 1200px) {
    .console-block {
        grid-column: span 2;
    }
}

.console-block .block-label {
    color: var(--toxic-green) !important;
}

.console-block .corner {
    color: var(--toxic-green) !important;
}

.console-block .hex-small {
    background: var(--toxic-green);
    opacity: 0.5;
}

.console-feed {
    font-size: 0.75rem;
    line-height: 1.8;
    min-height: 120px;
    font-family: 'Share Tech Mono', monospace;
}

.console-line {
    display: flex;
    justify-content: space-between;
    opacity: 0;
    animation: fadeInLine 0.4s ease-out forwards;
}

@keyframes fadeInLine {
    to { opacity: 0.8; }
}

/* ========== FOOTER BLOCK ========== */
.footer-block {
    grid-column: span 1;
    order: 8;
}

@media (min-width: 768px) {
    .footer-block {
        grid-column: span 3;
    }
}

@media (min-width: 1200px) {
    .footer-block {
        grid-column: span 4;
    }
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 0.7rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ========== RESPONSIVE ADJUSTMENTS ========== */
@media (max-width: 767px) {
    .dashboard {
        padding: 10px;
        gap: 10px;
    }

    .grid-item {
        padding: 16px;
    }

    .main-title {
        font-size: 2rem;
        letter-spacing: 4px;
    }

    .stats-row {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr; /* Force single column on very small screens */
    }

    .terminal-button {
      bottom: 60px; /* Avoid overlap with potentially other fixed elements */
      right: 20px;
      left: auto;
      padding: 10px 14px;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 1.5rem; /* Further reduce for very small screens */
    }

    .circle-large {
        width: 90vw;
        height: 90vw;
    }

   .barcode-decorative, .hazard-stripes {
        display: none; /* Hide decorative elements to prevent overflow */
   }
}

/* ========== PARTICLE SYSTEM ========== */
.particle-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--toxic-green);
    opacity: 0.3;
    animation: particleFloat linear infinite;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-20vh) translateX(100px);
        opacity: 0;
    }
}

/* ========== TECHNICAL DECORATIVE ELEMENTS ========== */
.hex-indicator {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--toxic-green);
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
    opacity: 0.4;
    animation: hexPulse 2s ease-in-out infinite;
    z-index: 5;
}

.hex-small {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--toxic-green);
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
    opacity: 0.3;
    z-index: 5;
}

@keyframes hexPulse {
    0%, 100% {
        opacity: 0.4;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.2);
    }
}

.diagonal-bar {
    position: absolute;
    width: 30px;
    height: 2px;
    background: var(--toxic-green);
    opacity: 0.2;
    transform: rotate(-45deg);
    z-index: 5;
}

/* ========== TECH OVERLAYS ========== */
/* Removed conflicting ::after - using ::before for patterns only */

/* ========== ENHANCED CORNERS WITH CONNECTION LINES ========== */
.grid-item .corner::before {
    content: "";
    position: absolute;
    width: 15px;
    height: 1px;
    background: var(--gray-mid);
    opacity: 0.3;
}

.grid-item .corner.top-left::before {
    top: 0;
    left: 10px;
}

.grid-item .corner.top-right::before {
    top: 0;
    right: 10px;
}

.grid-item .corner.bottom-left::before {
    bottom: 0;
    left: 10px;
}

.grid-item .corner.bottom-right::before {
    bottom: 0;
    right: 10px;
}

/* Ensure content is above decorations */
.grid-item > *:not(.corner):not(.hex-indicator):not(.hex-small):not(.diagonal-bar):not(.tech-ruler):not(.scan-line) {
    position: relative;
    z-index: 10;
}

/* ========== THEME TOGGLE BUTTON ========== */

.theme-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px var(--shadow-color);
}

.theme-toggle:active {
    transform: scale(0.95);
}

.toggle-track {
    width: 60px;
    height: 30px;
    background: var(--bg-secondary);
    border: var(--border) solid var(--border-color);
    position: relative;
    overflow: visible;
}

.toggle-orbit {
    position: absolute;
    width: 22px;
    height: 22px;
    background: var(--toxic-green);
    border: var(--border) solid var(--border-color);
    top: 3px;
    left: 4px;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
    box-shadow: 0 0 10px var(--toxic-green);
}

.theme-toggle.light .toggle-orbit {
    left: 32px;
    background: #FFD700;
    box-shadow: 0 0 10px var(--shadow-color);
    transform: rotate(180deg);
}

.toggle-icon {
    position: absolute;
    font-size: 14px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.toggle-icon.sun {
    left: 8px;
    color: #FFD700;
}

.toggle-icon.moon {
    right: 8px;
    color: var(--toxic-green);
}

.theme-toggle.light .toggle-icon.sun {
    opacity: 1;
}

.theme-toggle:not(.light) .toggle-icon.moon {
    opacity: 1;
}

.toggle-label {
    font-size: 0.65rem;
    letter-spacing: 1.5px;
    color: var(--text-primary);
    text-transform: uppercase;
    font-weight: 700;
}

/* Theme transition overlay */
.theme-transition-overlay {
    position: fixed;
    inset: 0;
    z-index: 10003;
    pointer-events: none;
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), 
                var(--transition-color, #000) 0%, 
                transparent 0%);
    transition: background 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.theme-transition-overlay.active {
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), 
                var(--transition-color, #000) 150%, 
                transparent 150%);
}

/* Light theme variables */
body.light-theme {
    --bg-primary: #FFFFFF;
    --bg-secondary: #f5f5f5;
    --text-primary: #000000;
    --text-secondary: #666666;
    --border-color: #000000;
    --accent-color: #FF6B35;
    --toxic-green: #FF6B35;
    --secondary-accent: #FF8C00;
    --shadow-color: rgba(255, 107, 53, 0.3);
}

/* Smooth transition for theme change */
body,
.grid-item,
.start-screen,
.boot-top,
.boot-bottom,
.theme-toggle,
.toggle-track,
.stat-box,
.link-block {
    transition: none;
}

/* Mobile adjustments */
@media (max-width: 767px) {
    .theme-toggle {
        top: 10px;
        right: 10px;
        padding: 8px 12px;
    }
    
    .toggle-track {
        width: 50px;
        height: 26px;
    }
    
    .toggle-orbit {
        width: 18px;
        height: 18px;
    }
    
    .theme-toggle.light .toggle-orbit {
        left: 28px;
    }
    
    .toggle-label {
        font-size: 0.55rem;
    }
}

/* ========== NO SCROLL UTILITY ========== */

/* Hide controls during loading (when no-scroll is active) */
.no-scroll .control-dock {
    display: none !important;
}
/* ========== CUSTOM CURSOR ========== */
body {
    cursor: none;
}

a, button, .link-block, .stat-box {
    cursor: none;
}

.cursor-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10010;
}

/* ========== TERMINAL BUTTON ========== */
.terminal-button {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 10002;
    background: var(--bg-primary);
    border: var(--border) solid var(--toxic-green);
    padding: 12px 18px;
    cursor: pointer;
    font-family: inherit;
    color: var(--toxic-green);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
    box-shadow: 0 0 10px var(--shadow-color);
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.terminal-button.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.terminal-button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px var(--shadow-color);
    background: rgba(57, 255, 20, 0.1);
}

.terminal-button:active {
    transform: scale(0.95);
}

.terminal-button-icon {
    font-size: 1.2rem;
    font-weight: 700;
}

.terminal-button-label {
    font-size: 0.7rem;
    letter-spacing: 2px;
    font-weight: 700;
}

/* ========== SKILLS RADAR CHART ========== */
.skills-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 30px !important;
    grid-column: span 2;
    order: 4;
    /* Place after projects */
    }
    
    @media (min-width: 1200px) {
        .skills-block {
            grid-column: span 2;
            /* Half width on large screens */
            order: 4;
        }
}

#skillsRadar {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 0 10px var(--shadow-color));
}

.skills-legend {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    width: 100%;
    max-width: 300px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    letter-spacing: 1px;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    box-shadow: 0 0 8px currentColor;
}

/* ========== PROJECTS SECTION ========== */
.projects-block {
    grid-column: span 2;
    padding: 30px !important;
    overflow: visible;
    order: 3;
        /* Changed from hidden to visible for popup */
        min-height: 400px;
        padding-bottom: 20px;
    }
    
    @media (min-width: 1200px) {
        .projects-block {
            grid-column: span 4;
        }
    }
    
    .project-filters {
        display: flex;
        gap: 10px;
        margin-bottom: 20px;
        flex-wrap: wrap;
        padding: 0 15px;
    }
    
    .filter-btn {
        background: transparent;
        border: 1px solid var(--text-secondary);
        color: var(--text-secondary);
        padding: 5px 15px;
        font-family: inherit;
        font-size: 0.7rem;
        cursor: pointer;
        transition: all 0.3s ease;
        clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
    }
    
    .filter-btn:hover,
    .filter-btn.active {
        background: rgba(57, 255, 20, 0.1);
        border-color: var(--toxic-green);
        color: var(--toxic-green);
        box-shadow: 0 0 10px var(--shadow-color);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    padding: 0 15px;
        transition: height 0.3s ease;
}

.project-card {
    background: rgba(10, 10, 10, 0.6);
        border: 1px solid #333;
    position: relative;
    overflow: hidden;
        transition: all 0.3s ease;
        animation: fadeSlideUp 0.5s ease forwards;
        opacity: 0;
        transform: translateY(20px);
    }
    
    .project-card.filtering-out {
        animation: fadeSlideDown 0.3s ease forwards;
    }
    
    @keyframes fadeSlideUp {
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    @keyframes fadeSlideDown {
        to {
            opacity: 0;
            transform: translateY(20px);
        }
    }
    
    .project-card:hover {
        border-color: var(--toxic-green);
        transform: translateY(-5px);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    }
    
    .project-card:hover .project-image {
        transform: scale(1.1);
        filter: grayscale(0%);
}

.project-image-container {
    height: 180px;
    width: 100%;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid #333;
    }
    
    .project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
        filter: grayscale(100%);
        transition: all 0.5s ease;
    }
    
    .project-overlay {
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.7);
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .project-card:hover .project-overlay {
        opacity: 1;
}

.view-project-btn {
    background: var(--toxic-green);
    color: #000;
    border: none;
    padding: 8px 16px;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.project-card:hover .view-project-btn {
    transform: translateY(0);
}

.project-info {
    padding: 15px;
}

.project-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.6rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
    border-bottom: 1px solid #333;
    padding-bottom: 5px;
}

.project-header span {
    color: var(--toxic-green);
}

.project-title {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 10px;
    color: var(--accent-color);
}

.project-description {
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--text-secondary);
    margin-bottom: 15px;
    flex: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.project-tag {
    padding: 4px 10px;
    font-size: 0.7rem;
    border: var(--border) solid var(--border-color);
    letter-spacing: 1px;
    background: rgba(57, 255, 20, 0.1);
}

.project-links {
    display: flex;
    gap: 10px;
}

.project-link {
    flex: 1;
    padding: 10px;
    text-align: center;
    font-size: 0.75rem;
    letter-spacing: 1px;
    border: var(--border) solid var(--border-color);
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s;
}

.project-link:hover {
    background: var(--accent-color);
    color: var(--black);
    transform: translateY(-2px);
}

/* ========== AUDIO VISUALIZER ========== */
.visualizer-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    height: 180px;
        grid-column: span 2;
        order: 6;
        /* Full width bottom */
    }
    
    @media (min-width: 1200px) {
        .visualizer-block {
            grid-column: span 4;
            /* Full width */
        }
}

#audioVisualizer {
    width: 100%;
    max-width: 400px;
    height: 120px;
    border: var(--border) solid var(--border-color);
    background: rgba(0, 0, 0, 0.5);
}

.visualizer-status {
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: var(--accent-color);
}

/* ========== TIMELINE ========== */
.timeline-block {
    grid-column: span 2;
    padding: 30px !important;
    order: 5;
        /* Beside skills */
        align-self: start;
        /* Fix for empty space below block */
    }
    
    @media (min-width: 1200px) {
        .timeline-block {
            grid-column: span 2;
            /* Half width */
        }
}

.timeline-container {
    position: relative;
    margin-top: 30px;
    padding-left: 40px;
}

.timeline-container::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
    opacity: 0;
    transform: translateX(-30px);
    animation: timelineSlide 0.6s forwards;
}

.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.3s; }
.timeline-item:nth-child(4) { animation-delay: 0.4s; }

@keyframes timelineSlide {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.timeline-dot {
    position: absolute;
    left: -34px;
    top: 5px;
    width: 16px;
    height: 16px;
    border: 2px solid var(--accent-color);
    background: var(--bg-primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-color);
    z-index: 1;
}

.timeline-date {
    font-size: 0.75rem;
    color: var(--accent-color);
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.timeline-title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.timeline-company {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.timeline-description {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

/* ========== BURGER MENU ========== */
/* ========== BURGER MENU (TACTICAL DOCK) ========== */
.control-dock {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
        /* Tighter gap for tech feel */
        padding: 8px 12px;
        background: rgba(5, 5, 5, 0.95);
    border: 1px solid var(--toxic-green);
    /* Techwear Shape: Angular cut corners */
        clip-path: polygon(10px 0,
                100% 0,
                100% calc(100% - 10px),
                calc(100% - 10px) 100%,
                0 100%,
                0 10px);
    backdrop-filter: blur(10px);
    z-index: 9999;
    /* Use drop-shadow for outer glow with clip-path, keep box-shadow for inset */
        box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
        filter: drop-shadow(0 0 5px var(--shadow-color)) drop-shadow(0 0 15px rgba(0, 0, 0, 0.8));
        transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        min-height: 50px;
    }
    
    /* Tech decorative lines overlay */
    .control-dock::before {
        content: '';
        position: absolute;
        top: 0;
        left: 20px;
        right: 20px;
        height: 2px;
        background: linear-gradient(90deg, transparent, var(--toxic-green), transparent);
        opacity: 0.3;
        pointer-events: none;
}

.control-dock.collapsed {
    padding: 8px;
    gap: 0;
    /* When collapsed, become a square/badge */
        clip-path: polygon(5px 0,
                100% 0,
                100% calc(100% - 5px),
                calc(100% - 5px) 100%,
                0 100%,
                0 5px);
        background: rgba(0, 0, 0, 0.9);
}

/* Hiding elements in collapsed state */
.control-dock.collapsed .dock-btn:not(#burgerMenu),
.control-dock.collapsed .dock-separator,
.control-dock.collapsed .dock-deco-start,
.control-dock.collapsed .dock-deco-end {
    width: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
    pointer-events: none;
    overflow: hidden;
        transform: scaleX(0);
}

.control-dock.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(30px);
}

.control-dock:hover {
    box-shadow: 0 0 25px var(--shadow-color);
    border-color: #fff;
}

/* --- BUTTONS --- */
.dock-btn {
    background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--toxic-green);
    font-size: 1rem;
    cursor: pointer;
    width: 36px;
        height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
        /* Slight bevel */
        transition: all 0.2s ease;
    flex-shrink: 0;
    position: relative;
        overflow: hidden;
}

/* Tech hover effect for buttons */
.dock-btn:hover {
    background: var(--toxic-green);
    color: #000;
    border-color: var(--toxic-green);
        transform: translateY(-1px);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    }
    
    .dock-btn:active {
        transform: translateY(1px);
}

.dock-btn.active {
    background: var(--toxic-green);
    color: #000;
    box-shadow: 0 0 10px var(--toxic-green);
    }
    
    .dock-btn#burgerMenu {
        border-color: var(--toxic-green);
        background: rgba(226, 255, 0, 0.1);
}

.dock-btn#burgerMenu.active {
    transform: rotate(90deg);
    background: var(--toxic-green);
        color: #000;
}

/* Button internal text (LANG) */
.dock-btn .lang-text {
    font-size: 0.75rem;
        font-weight: 800;
    font-family: 'Share Tech Mono', monospace;
    letter-spacing: 0px;
}

/* Separator */
.dock-separator {
    width: 2px;
        height: 24px;
        background: repeating-linear-gradient(to bottom,
                var(--toxic-green),
                var(--toxic-green) 2px,
                transparent 2px,
                transparent 4px);
        margin: 0 4px;
    opacity: 0.5;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

/* --- DECORATIVE ELEMENTS --- */
.dock-deco-start,
.dock-deco-end {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    overflow: hidden;
}

.dock-deco-start {
    padding-right: 4px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    margin-right: 4px;
}

/* 3 Little vertical lines */
.dock-lines {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dock-lines span {
    width: 12px;
    height: 2px;
    background: var(--toxic-green);
    opacity: 0.5;
}

.dock-lines span:nth-child(2) {
    width: 8px;
}

.dock-lines span:nth-child(3) {
    width: 12px;
}

/* End Label */
.dock-deco-end {
    margin-left: 4px;
    padding-left: 8px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.dock-label-min {
    font-size: 0.6rem;
    color: var(--toxic-green);
    font-weight: bold;
    letter-spacing: 1px;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    opacity: 0.8;
}

/* --- MOBILE ADJUSTMENTS --- */
@media (max-width: 768px) {
    .control-dock {
        top: 10px;
        right: 10px;
        padding: 6px 10px;
    }
    
    .dock-btn {
        width: 32px;
            height: 32px;
            font-size: 0.9rem;
        }
        
        /* Hide the deco elements on very small screens to save space */
        .dock-deco-start,
        .dock-deco-end {
            display: none;
    }
}

/* Color Theme Buttons (keep existing logic) */
.theme-buttons {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}

/* Make color buttons square too for consistency */
.color-btn {
    width: 24px;
        height: 24px;
        border-radius: 2px;
        /* Square */
    background: var(--btn-color);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.2s ease;
        opacity: 0.7;
    position: relative;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.color-btn:hover {
    opacity: 1;
    transform: scale(1.1);
    box-shadow: 0 0 10px var(--btn-color);
    z-index: 10;
}

.color-btn.active {
    opacity: 1;
    border: 2px solid #fff;
    box-shadow: 0 0 15px var(--btn-color);
    transform: scale(1.1);
}
/* End Color Buttons */

.color-btn.active::after {
    content: '';
    position: absolute;
    inset: -4px;
    border: 1px solid var(--btn-color);
    border-radius: 50%;
    animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}
.settings-panel {
    position: fixed;
    top: 0;
    right: -350px;
    width: 350px;
    height: 100vh;
    background: var(--bg-primary);
    border-left: var(--border) solid var(--border-color);
    z-index: 9998;
    transition: right 0.3s ease-out;
    box-shadow: -5px 0 30px var(--shadow-color);
}

.settings-panel.active {
    right: 0;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: var(--border) solid var(--border-color);
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.9rem;
    letter-spacing: 2px;
    color: var(--accent-color);
}

.settings-close {
    background: transparent;
    border: none;
    color: var(--accent-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.settings-close:hover {
    color: #ff3939;
    transform: translateX(5px);
}

.settings-close i {
    pointer-events: none;
}
.settings-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    overflow-y: auto;
    max-height: calc(100vh - 80px);
}

.project-card {
    height: 300px;
    perspective: 1000px;
    cursor: pointer;
    background: transparent;
}

.project-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: none;
    /* Removed 3D transform */
    transform-style: preserve-3d;
}

.project-card:hover .project-card-inner {
    transform: none;
    /* Removed 3D rotate */
}

.project-card-front,
.project-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border: var(--border) solid var(--border-color);
    background: var(--bg-primary);
}

.project-card-front {
    display: flex;
    flex-direction: column;
    padding: 20px;
    justify-content: space-between;
}

.project-card-back {
    background: var(--bg-primary);
    transform: none;
    /* Removed rotateY(180deg) */
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border: var(--border) solid var(--accent-color);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
    pointer-events: none;
    /* Prevent interaction when hidden */
}

.project-card:hover .project-card-back {
    opacity: 1;
    pointer-events: auto;
}
.setting-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.setting-item label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.setting-buttons {
    display: flex;
    gap: 10px;
}

.setting-btn {
    flex: 1;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.3);
    border: var(--border) solid var(--border-color);
    color: var(--text-primary);
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.setting-btn:hover {
    border-color: var(--accent-color);
    background: rgba(57, 255, 20, 0.1);
}

.setting-btn.active {
    background: var(--accent-color);
    color: var(--black);
    border-color: var(--accent-color);
}

.theme-icon,
.audio-icon {
    font-size: 1.2rem;
}

/* ========== PERFORMANCE CONTROLS ========== */
.setting-section-divider {
    width: 100%;
    height: 1px;
    background: var(--border-color);
    margin: 20px 0 15px 0;
    opacity: 0.3;
}

.setting-section-title {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 3px;
    color: var(--accent-color);
    text-transform: uppercase;
    margin-bottom: 15px;
    padding-left: 5px;
    border-left: 3px solid var(--accent-color);
}

.preset-buttons {
    flex-wrap: wrap;
}

.preset-btn {
    flex: 0 0 calc(33.33% - 7px);
    padding: 10px 8px;
    font-size: 0.75rem;
}

.hardware-info {
    margin-top: 8px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-left: 2px solid var(--accent-color);
    font-size: 0.65rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.hardware-info-line {
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
}

.hardware-info-label {
    opacity: 0.7;
}

.hardware-info-value {
    color: var(--accent-color);
    font-weight: bold;
}

.setting-item label {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.effect-status {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 2px;
    background: rgba(57, 255, 20, 0.2);
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    transition: all 0.3s;
}

.effect-status.off {
    background: rgba(255, 0, 0, 0.2);
    color: #ff4444;
    border-color: #ff4444;
}

.effect-toggle {
    flex: 0 0 60px;
    position: relative;
}

.toggle-indicator {
    font-size: 1.5rem;
    transition: all 0.3s;
    color: var(--accent-color);
}

.effect-toggle[data-state="off"] .toggle-indicator {
    color: #ff4444;
}

.effect-toggle:hover .toggle-indicator {
    transform: scale(1.2);
}

/* ========== LANGUAGE TOGGLE (DEPRECATED - NOW IN BURGER) ========== */
.language-toggle {
    display: none;
}

/* ========== PROJECT FILTERS ========== */
.project-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    background: transparent;
    border: var(--border) solid var(--border-color);
    color: var(--text-primary);
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn.active {
    background: var(--accent-color);
    color: var(--black);
    border-color: var(--accent-color);
}

.filter-btn:hover:not(.active) {
    background: rgba(57, 255, 20, 0.1);
    color: var(--accent-color);
}

/* Low-performance overrides for project cards */
.low-perf .project-card {
    transition: none !important;
}

.low-perf .project-card:hover {
    transform: none !important;
    box-shadow: none !important;
}

.low-perf .project-card::before,
.low-perf .project-card::after {
    display: none !important;
}
/* ========== PROJECT LIGHTBOX ========== */
.light.boot-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 10001;
    pointer-events: auto;
    /* Changed from none to block clicks */
    display: none;
}
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    border: var(--border) solid var(--accent-color);
    position: relative;
    background: var(--bg-primary);
    padding: 20px;
}

.lightbox-image {
    max-width: 100%;
    max-height: 70vh;
    display: block;
    margin: 0 auto;
}

.lightbox-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent-color);
    color: var(--black);
    border: none;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    cursor: pointer;
    font-family: monospace;
    transition: transform 0.2s;
}

.lightbox-close:hover {
    transform: rotate(90deg);
}

/* ========== CONTACT FORM ========== */
.contact-block {
    grid-column: span 2;
    padding: 30px !important;
    order: 7;
}

.contact-form {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: var(--accent-color);
    font-weight: 700;
}

.form-group input,
.form-group textarea {
    background: rgba(0, 0, 0, 0.3);
    border: var(--border) solid var(--border-color);
    color: var(--text-primary);
    padding: 12px 15px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    transition: all 0.3s;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 10px var(--shadow-color);
}

.form-group input.error,
.form-group textarea.error {
    border-color: #ff3939;
    animation: shake 0.3s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.form-error {
    font-size: 0.75rem;
    color: #ff3939;
    min-height: 18px;
    opacity: 0;
    transition: opacity 0.3s;
}

.form-error.show {
    opacity: 1;
}

.form-submit {
    background: transparent;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    padding: 15px 30px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 1rem;
    letter-spacing: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.skills-block canvas {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.skills-legend {
    margin-top: 15px;
    display: none;
    /* Hidden: New Tactical Radar has built-in labels */
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}
.form-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--accent-color);
    transition: left 0.3s;
    z-index: -1;
}

.form-submit:hover {
    color: var(--black);
}

.form-submit:hover::before {
    left: 0;
}

.form-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-submit.transmitting {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.submit-icon {
    font-size: 1.2rem;
}

.form-status {
    padding: 15px;
    text-align: center;
    font-size: 0.85rem;
    letter-spacing: 1px;
    opacity: 0;
    transition: opacity 0.3s;
}

.form-status.show {
    opacity: 1;
}

.form-status.success {
    color: var(--accent-color);
    border: var(--border) solid var(--accent-color);
}

.form-status.error {
    color: #ff3939;
    border: var(--border) solid #ff3939;
}

.form-status.transmitting {
    color: #00ffff;
    border: var(--border) solid #00ffff;
    animation: scanlineMove 2s linear infinite;
}

/* ========== NOTIFICATIONS SYSTEM ========== */
.notifications-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.notification {
    min-width: 300px;
    max-width: 400px;
    padding: 15px 20px;
    background: var(--bg-primary);
    border: var(--border) solid var(--border-color);
    box-shadow: 0 4px 20px var(--shadow-color);
    pointer-events: all;
    opacity: 0;
    transform: translateX(400px);
    animation: notificationSlideIn 0.3s forwards;
}

.notification.removing {
    animation: notificationSlideOut 0.3s forwards;
}

@keyframes notificationSlideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes notificationSlideOut {
    to {
        opacity: 0;
        transform: translateX(400px);
    }
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.notification-title {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.notification-close {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.notification-close:hover {
    color: var(--accent-color);
}

.notification-message {
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--text-secondary);
}

.notification.success {
    border-color: var(--accent-color);
}

.notification.success .notification-title {
    color: var(--accent-color);
}

.notification.error {
    border-color: #ff3939;
}

.notification.error .notification-title {
    color: #ff3939;
}

.notification.info {
    border-color: #00ffff;
}

.notification.info .notification-title {
    color: #00ffff;
}

.notification.warning {
    border-color: #ffaa00;
}

.notification.warning .notification-title {
    color: #ffaa00;
}

/* ========== TERMINAL MODAL ========== */
.terminal-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: min(800px, 90%);
    max-height: 80vh;
    background: #0a0a0a;
    border: 2px solid var(--toxic-green);
    z-index: 10005;
    display: none;
    flex-direction: column;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 0 50px var(--shadow-color);
}

.terminal-modal.active {
    display: flex;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.terminal-header {
    padding: 12px 16px;
    background: #111;
    border-bottom: 1px solid var(--toxic-green);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--toxic-green);
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.terminal-close,
.shortcuts-close {
    background: none;
    border: 1px solid var(--toxic-green);
    color: var(--toxic-green);
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.terminal-close:hover,
.shortcuts-close:hover {
    background: var(--toxic-green);
    color: #0a0a0a;
}

.terminal-output {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    color: var(--toxic-green);
    line-height: 1.6;
}

.terminal-line {
    margin-bottom: 8px;
}

.terminal-prompt {
    color: #00ff00;
    margin-right: 8px;
}

.terminal-input-line {
    padding: 12px 16px;
    border-top: 1px solid var(--toxic-green);
    display: flex;
    align-items: center;
    background: #0f0f0f;
}

.terminal-input {
    flex: 1;
    background: none;
    border: none;
    color: var(--toxic-green);
    font-family: inherit;
    font-size: 0.85rem;
    outline: none;
}

.terminal-input::placeholder {
    color: rgba(57, 255, 20, 0.3);
}

/* ========== SHORTCUTS MODAL ========== */
.shortcuts-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: min(500px, 90%);
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    z-index: 10005;
    display: none;
    flex-direction: column;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

.shortcuts-modal.active {
    display: flex;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.shortcuts-header {
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-primary);
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.shortcuts-content {
    padding: 20px;
}

.shortcut-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.shortcut-item:last-child {
    border-bottom: none;
}

.shortcut-item kbd {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 4px 8px;
    font-family: inherit;
    font-size: 0.75rem;
    border-radius: 3px;
    margin-right: 6px;
}

.shortcut-item span {
    margin-left: auto;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Backdrop for modals */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10004;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-backdrop.active {
    display: block;
    opacity: 1;
}

@media (max-width: 767px) {
    .volume-control {
        bottom: 80px;
        right: 10px;
        padding: 8px 12px;
    }
    
    .volume-slider {
        width: 80px;
    }
    
    .terminal-button-label {
        font-size: 0.6rem;
    }
    
    body {
        cursor: auto;
    }
    
    a, button, .link-block, .stat-box {
        cursor: pointer;
    }
    
    .tech-background {
        display: none;
    }
}

/* ========== TECHNICAL BACKGROUND ELEMENTS ========== */
.tech-background {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 1s ease-in;
}

.tech-background.visible {
    opacity: 1;
}

/* Grid 3D Background */
.grid-3d {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(0deg, transparent 24%, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.05) 26%, transparent 27%, transparent 74%, rgba(255, 255, 255, 0.05) 75%, rgba(255, 255, 255, 0.05) 76%, transparent 77%, transparent),
        linear-gradient(90deg, transparent 24%, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.05) 26%, transparent 27%, transparent 74%, rgba(255, 255, 255, 0.05) 75%, rgba(255, 255, 255, 0.05) 76%, transparent 77%, transparent);
    background-size: 50px 50px;
    transform: perspective(500px) rotateX(60deg);
    transform-origin: center bottom;
    opacity: 0.3;
}

/* Floating Geometric Elements */
.geo-elements {
    position: absolute;
    inset: 0;
}

.geo-circle {
    position: absolute;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    opacity: 0.2;
}

.geo-1 {
    width: 150px;
    height: 150px;
    top: 10%;
    right: 15%;
    animation: float 8s ease-in-out infinite;
}

.geo-2 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    left: 10%;
    animation: float 6s ease-in-out infinite reverse;
}

.geo-crosshair {
    position: absolute;
    width: 80px;
    height: 80px;
    opacity: 0.15;
}

.geo-crosshair::before,
.geo-crosshair::after {
    content: '';
    position: absolute;
    background: var(--border-color);
}

.geo-crosshair::before {
    width: 100%;
    height: 1px;
    top: 50%;
    left: 0;
}

.geo-crosshair::after {
    width: 1px;
    height: 100%;
    left: 50%;
    top: 0;
}

.crosshair-1 {
    top: 30%;
    left: 20%;
    animation: pulse 3s ease-in-out infinite;
}

.crosshair-2 {
    bottom: 30%;
    right: 25%;
    animation: pulse 4s ease-in-out infinite;
}

.geo-triangle {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 40px solid transparent;
    border-right: 40px solid transparent;
    border-bottom: 70px solid var(--border-color);
    opacity: 0.1;
}

.triangle-1 {
    top: 15%;
    left: 40%;
    animation: rotate 20s linear infinite;
}

.triangle-2 {
    bottom: 25%;
    right: 30%;
    transform: rotate(180deg);
    animation: rotate 15s linear infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.15; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(1.1); }
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Barcode Elements */
.barcode-decorative {
    position: absolute;
    opacity: 0.3;
}

.barcode-1 {
    top: 60px;
    left: 40px;
}

.barcode-2 {
    bottom: 60px;
    right: 40px;
}

.barcode-bars {
    display: flex;
    gap: 2px;
    height: 50px;
    margin-bottom: 5px;
}

.barcode-bars.vertical {
    flex-direction: column;
    height: auto;
    width: 50px;
}

.barcode-bars span {
    background: var(--border-color);
    width: 2px;
    height: 100%;
}

.barcode-bars.vertical span {
    width: 100%;
    height: 2px;
}

.barcode-bars span.wide {
    width: 4px;
}

.barcode-bars.vertical span.wide {
    width: 100%;
    height: 4px;
}

.barcode-number {
    font-size: 0.6rem;
    letter-spacing: 1px;
    color: var(--text-secondary);
    font-family: 'Share Tech Mono', monospace;
}

/* Technical Text Overlays */
.tech-overlay {
    position: absolute;
    font-size: 0.65rem;
    letter-spacing: 1px;
    color: var(--text-secondary);
    font-family: 'Share Tech Mono', monospace;
    opacity: 0.4;
}

.tech-label {
    margin-bottom: 3px;
    white-space: nowrap;
}

.overlay-1 {
    top: 120px;
    right: 40px;
}

.overlay-2 {
    top: 200px;
    left: 40px;
}

.overlay-3 {
    bottom: 150px;
    right: 60px;
}

/* Measurement Lines */
.measurement-line {
    position: absolute;
    background: var(--border-color);
    opacity: 0.2;
}

.line-1 {
    width: 150px;
    height: 1px;
    top: 25%;
    right: 10%;
    transform: rotate(-15deg);
}

.line-1::before {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    left: -4px;
    top: -4px;
}

.line-1::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    right: -4px;
    top: -4px;
}

.line-2 {
    width: 1px;
    height: 200px;
    bottom: 15%;
    left: 15%;
}

.line-3 {
    width: 120px;
    height: 1px;
    top: 40%;
    left: 30%;
    transform: rotate(25deg);
}

/* Corner Brackets */
.corner-bracket {
    position: absolute;
    width: 40px;
    height: 40px;
    opacity: 0.2;
}

.corner-bracket::before,
.corner-bracket::after {
    content: '';
    position: absolute;
    background: var(--border-color);
}

.corner-bracket::before {
    width: 100%;
    height: 1px;
}

.corner-bracket::after {
    width: 1px;
    height: 100%;
}

.bracket-tl {
    top: 20px;
    left: 20px;
}

.bracket-tl::before {
    top: 0;
    left: 0;
}

.bracket-tl::after {
    top: 0;
    left: 0;
}

.bracket-tr {
    top: 20px;
    right: 20px;
}

.bracket-tr::before {
    top: 0;
    right: 0;
}

.bracket-tr::after {
    top: 0;
    right: 0;
}

.bracket-bl {
    bottom: 20px;
    left: 20px;
}

.bracket-bl::before {
    bottom: 0;
    left: 0;
}

.bracket-bl::after {
    bottom: 0;
    left: 0;
}

.bracket-br {
    bottom: 20px;
    right: 20px;
}

.bracket-br::before {
    bottom: 0;
    right: 0;
}

.bracket-br::after {
    bottom: 0;
    right: 0;
}

/* Light theme adjustments */
body.light-theme .grid-3d {
    background-image: 
        linear-gradient(0deg, transparent 24%, rgba(0, 0, 0, 0.05) 25%, rgba(0, 0, 0, 0.05) 26%, transparent 27%, transparent 74%, rgba(0, 0, 0, 0.05) 75%, rgba(0, 0, 0, 0.05) 76%, transparent 77%, transparent),
        linear-gradient(90deg, transparent 24%, rgba(0, 0, 0, 0.05) 25%, rgba(0, 0, 0, 0.05) 26%, transparent 27%, transparent 74%, rgba(0, 0, 0, 0.05) 75%, rgba(0, 0, 0, 0.05) 76%, transparent 77%, transparent);
}

/* ========== PERFORMANCE OVERRIDES ========== */
/* Cuando el modo rendimiento está activo, apagamos todo lo visualmente costoso */
body.performance-mode-low .scan-line,
body.performance-mode-low .particle-container,
body.performance-mode-low .tech-background, 
body.performance-mode-low .matrix-canvas, /* Asumiendo que el canvas tiene esta clase o ID */
body.performance-mode-low .glitch::before,
body.performance-mode-low .glitch::after {
    display: none !important;
}

/* Matar todas las animaciones y transiciones suaves */
body.performance-mode-low * {
    animation: none !important;
    transition: none !important;
    box-shadow: none !important; /* Las sombras consumen caleta de GPU */
}

/* EXCEPTION: Keep timeline animations even in low performance mode */
body.performance-mode-low .timeline-item,
body.performance-mode-low .timeline-dot {
    animation: timelineSlide 0.6s forwards !important;
}

body.performance-mode-low .timeline-item:nth-child(1) { animation-delay: 0.1s !important; }
body.performance-mode-low .timeline-item:nth-child(2) { animation-delay: 0.2s !important; }
body.performance-mode-low .timeline-item:nth-child(3) { animation-delay: 0.3s !important; }
body.performance-mode-low .timeline-item:nth-child(4) { animation-delay: 0.4s !important; }

/* Hacer que las tarjetas aparezcan de una, sin fade suave */
body.performance-mode-low .grid-item,
body.performance-mode-low .project-card {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
}

/* Fix for Skills Matrix in Low Performance Mode */
body.performance-mode-low .skill-card-tech {
    opacity: 1 !important;
    animation: none !important;
    transform: none !important;
}
/* ========== RESPONSIVE ADJUSTMENTS FOR NEW FEATURES ========== */
@media (max-width: 767px) {
    .skills-block {
        padding: 20px !important;
    }

    #skillsRadar {
        width: 250px;
        height: 250px;
    }

    .skills-legend {
        grid-template-columns: 1fr;
    }

    .projects-block {
        grid-column: span 1;
        padding: 20px !important;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-card {
        height: 280px;
    }

    .visualizer-block {
        padding: 15px !important;
    }

    #audioVisualizer {
        width: 100%;
        height: 80px;
    }

    .timeline-block {
        grid-column: span 1;
        padding: 20px !important;
    }

    .timeline-container {
        padding-left: 30px;
    }

    .timeline-dot {
        left: -28px;
        width: 12px;
        height: 12px;
    }

    .notifications-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }

    .notification {
        min-width: auto;
        width: 100%;
    }
    
    /* Optimize heavy animations on mobile */
    .parallax-shape {
        animation-duration: 40s !important;
    }
    
    .scan-line {
        animation-duration: 12s !important;
    }
}

/* ========== ACCESSIBILITY: REDUCED MOTION ========== */
/* Only for users who explicitly prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .glitch::before,
    .glitch::after {
        animation: none !important;
    }
    
    body::before {
        animation: none !important;
    }
}

.matrix-canvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -4; pointer-events: none; opacity: 0.15; }

.no-scroll {
    overflow: hidden !important;
}
/* ========== MOBILE OPTIMIZATIONS FOR DECOR ========== */
@media (max-width: 768px) {

    .tech-decals,
    .tech-overlay,
    .tech-sidebar-left,
    .tech-sidebar-right,
    .barcode-decorative,
    .decal-layer,
    .procedural-tech-layer {
        display: none !important;
    }
}

/* Force subtle background grid */
.grid-3d {
    opacity: 0.15 !important;
}

/* ========== SETTINGS GRID REDESIGN ========== */
.effects-grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 15px;
    padding-bottom: 20px;
}

.effect-tile {
    background: rgba(0, 0, 0, 0.4);
    border: var(--border) solid var(--border-color);
    padding: 15px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 90px;
    color: var(--text-secondary);
    position: relative;
    overflow: hidden;
    font-family: 'Share Tech Mono', monospace;
}

.effect-tile:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-primary);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.effect-tile:active {
    transform: translateY(0);
}

.effect-tile i {
    font-size: 1.8rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-bottom: 5px;
}

.effect-tile span {
    font-size: 0.7rem;
    letter-spacing: 1px;
    font-weight: bold;
}

/* Active State (ON) */
.effect-tile[data-state="on"] {
    background: var(--grid-color);
    /* Uses theme color with transparency */
    border-color: var(--toxic-green);
    color: var(--toxic-green);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2);
}

.effect-tile[data-state="on"] i {
    transform: scale(1.1);
    text-shadow: 0 0 15px var(--toxic-green);
    filter: drop-shadow(0 0 5px var(--toxic-green));
}

/* Active Indicator Line */
.effect-tile::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--toxic-green);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: center;
}

.effect-tile[data-state="on"]::after {
    transform: scaleX(1);
}

/* Light Theme Adjustments */
body.light-theme .effect-tile {
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.6);
}

body.light-theme .effect-tile:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

body.light-theme .effect-tile[data-state="on"] {
    background: rgba(var(--toxic-green), 0.1);
    border-color: var(--toxic-green);
    color: var(--toxic-green);
}

/* ========== SKILLS GRID (TECH CARDS) ========== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    padding: 10px 0;
    width: 100%;
}

.skill-card-tech {
    background: rgba(10, 10, 10, 0.9);
    border: 1px solid #333;
    border-left: 4px solid var(--skill-color);
    padding: 15px;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    height: 100px;
    transition: all 0.3s ease;
    clip-path: polygon(0 0,
            100% 0,
            100% 85%,
            92% 100%,
            0 100%);
    /* Chamfered bottom-right corner */
    opacity: 0;
    animation: fadeInUp 0.5s forwards;
}

.skill-card-tech:hover {
    transform: translateX(5px);
    background: rgba(20, 20, 20, 0.95);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    border-color: #555;
    border-left-color: var(--skill-color);
}

.skill-card-tech:hover .skill-icon-small {
    color: var(--skill-color);
    transform: scale(1.1) rotate(5deg);
}

/* Internal Layout */
.skill-main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-right: 15px;
}

.skill-sidebar {
    width: 40px;
    border-left: 1px dashed #444;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    padding-left: 10px;
}

/* Header Row */
.skill-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.skill-id {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: #666;
    letter-spacing: 1px;
}

.skill-icon-small {
    font-size: 1rem;
    color: #444;
    transition: all 0.3s ease;
}

/* Name */
.skill-name-large {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.1;
}

/* Progress Bar Complex */
.skill-bar-complex {
    margin-top: 10px;
}

.skill-bar-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.skill-bar-fill {
    height: 100%;
    background: var(--skill-color);
    position: relative;
    box-shadow: 0 0 10px var(--skill-color);
}

/* Striped pattern overlay for bar */
.skill-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(45deg,
            transparent,
            transparent 5px,
            rgba(0, 0, 0, 0.5) 5px,
            rgba(0, 0, 0, 0.5) 10px);
}

.skill-value-number {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--skill-color);
    text-align: right;
    margin-top: 4px;
}

/* Sidebar Elements */
.mini-barcode {
    width: 20px;
    height: 40px;
    background: repeating-linear-gradient(to bottom,
            #fff,
            #fff 2px,
            transparent 2px,
            transparent 4px);
    opacity: 0.3;
}

.warning-icon {
    font-size: 1.2rem;
    opacity: 0.5;
    cursor: help;
}

/* Card Cut Deco */
.card-corner-cut {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, transparent 50%, var(--bg-color) 50%);
    z-index: 2;
    pointer-events: none;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* ========== VIDEO MODAL STYLES ========== */
.video-modal-content {
    background: #000;
    width: 65%;
    max-width: 1400px;
    position: relative;
    transform: scale(0.95);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
}

.modal-overlay.active .video-modal-content {
    transform: scale(1);
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 Aspect Ratio */
    background: #000;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.crt-overlay {
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
}

.video-modal-content .modal-header {
    background: rgba(0, 20, 20, 0.9);
    border-bottom: 1px solid var(--accent-color);
}

.video-modal-content .modal-close-btn {
    color: var(--accent-color);
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.video-modal-content .modal-close-btn:hover {
    text-shadow: 0 0 10px var(--accent-color);
    transform: scale(1.1);
}

.loading-bar {
    position: relative;
    overflow: hidden;
}

/* ========== VIDEO LOADER ========== */
.video-loader {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    flex-direction: column;
    gap: 15px;
}

.video-loader-content {
    font-family: var(--font-code);
    color: var(--toxic-green);
    text-align: center;
}

.loader-status-text {
    font-size: 1rem;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.loader-bar-container {
    width: 150px;
    height: 4px;
    background: rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
}

.loader-bar-fill {
    height: 100%;
    background: var(--toxic-green);
    width: 100%;
    animation: loaderPulse 1.5s infinite ease-in-out;
    transform-origin: left;
}

@keyframes loaderPulse {
    0% { transform: scaleX(0.1); opacity: 0.5; }
    50% { transform: scaleX(1); opacity: 1; }
    100% { transform: scaleX(0.1); opacity: 0.5; transform-origin: right; }
}

/* Light Theme Loader */
body.light-theme .video-loader {
    background: rgba(255,255,255,0.98);
}
body.light-theme .video-loader-content {
    color: #111;
}
body.light-theme .loader-bar-container {
    background: rgba(0,0,0,0.1);
}
body.light-theme .loader-bar-fill {
    background: var(--toxic-green);
}

.video-modal-content .modal-footer {
    padding: 10px 20px;
    background: rgba(0, 10, 10, 0.9);
    border-top: 1px solid rgba(0, 255, 255, 0.2);
}
.social-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    text-decoration: none;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 1px;
    transition: all 0.3s cubic-bezier()0.16, 1, 0.3, 1;
    position: relative;
    overflow: hidden;
}

.social-btn:hover {
    background: var(--toxic-green);
    color: #000;
    border-color: var(--toxic-green);
    box-shadow: 0 0 15px var(--shadow-color);
    transform: translateY(-2px);
}

.social-btn:hover i {
    color: #000;
}

.social-btn i {
    font-size: 1rem;
    color: var(--toxic-green);
    transition: color 0.3s ease;
}

.social-btn span {
    position: relative;
    z-index: 1;
}

/* Add corner accents to buttons */
.social-btn::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 6px;
    height: 6px;
    border-top: 2px solid var(--toxic-green);
    border-right: 2px solid var(--toxic-green);
}

.social-btn::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 6px;
    height: 6px;
    border-top: 2px solid var(--toxic-green);
    border-right: 2px solid var(--toxic-green);
    opacity: 0.5;
    transition: all 0.3s;
}

.social-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 6px;
    height: 6px;
    border-bottom: 2px solid var(--toxic-green);
    border-left: 2px solid var(--toxic-green);
    opacity: 0.5;
    transition: all 0.3s;
}

.social-btn:hover::before,
.social-btn:hover::after {
    width: 100%;
    height: 100%;
    opacity: 0;
}
/* ========== TIMELINE SCROLL OPTIMIZATION ========== */
.timeline-container {
    max-height: 600px;
    /* Limit height to prevent infinite growth */
    overflow-y: auto;
    /* Enable vertical scroll */
    padding-right: 10px;
    /* Space for scrollbar */
    margin-right: -5px;
    /* Compensate for padding to keep alignment */

    /* Scrollbar Styling for Webkit (Chrome/Edge/Safari) */
}

.timeline-container::-webkit-scrollbar {
    width: 6px;
}

.timeline-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--text-secondary);
}

.timeline-container::-webkit-scrollbar-thumb {
    background: var(--toxic-green);
    border-radius: 2px;
    box-shadow: 0 0 5px var(--toxic-green);
}

.timeline-container::-webkit-scrollbar-thumb:hover {
    background: #fff;
}

/* ========== TIMELINE V2 REDESIGN ========== */
.timeline-container {
    position: relative;
    padding-left: 10px;
    padding-top: 10px;
}

/* The vertical connecting line */
.timeline-container::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 19px;
    /* Aligned with dots */
    width: 2px;
    background: linear-gradient(to bottom,
            transparent,
            var(--toxic-green) 10%,
            var(--toxic-green) 90%,
            transparent);
    opacity: 0.3;
    pointer-events: none;
}

.timeline-item {
    position: relative;
    padding-left: 35px;
    /* Space for line/dot */
    margin-bottom: 30px;
    border-left: 2px solid transparent;
    /* Placeholder for hover effect */
    transition: all 0.3s ease;
}

.timeline-item:hover {
    background: linear-gradient(90deg, rgba(226, 255, 0, 0.05) 0%, transparent 100%);
    padding-left: 40px;
    /* Slight shift */
}

.timeline-dot {
    position: absolute;
    left: 4px;
    /* (35px padding - 10px width)/2 roughly, adjusted for line at 19px. Line is at 19px (left: 10px + 9px?). Let's Center it. */
    left: 5px;
    top: 5px;
    width: 10px;
    height: 10px;
    background: var(--bg-primary);
    border: 2px solid var(--toxic-green);
    border-radius: 50%;
    box-shadow: 0 0 5px var(--toxic-green);
    z-index: 2;
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-dot {
    background: var(--toxic-green);
    box-shadow: 0 0 15px var(--toxic-green);
    transform: scale(1.2);
}

.timeline-date {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    color: var(--toxic-green);
    margin-bottom: 4px;
    opacity: 0.8;
}

.timeline-title {
    font-size: 1.2rem;
    /* Increased size */
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
}

.timeline-company {
    font-size: 0.95rem;
    /* Increased size */
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.timeline-description {
    font-size: 0.9rem;
    /* Increased size */
    line-height: 1.5;
    color: var(--text-secondary);
    opacity: 0.9;
    max-width: 95%;
}

.timeline-block {
    align-self: start;
    /* Fix for empty space below block */
}

/* =========================================
   HYPER SCROLL INTRO STYLES
   ========================================= */

:root {
    /* Mapeo de variables del intro a las del sistema o propias */
    --intro-bg: var(--bg-primary); /* #030303 in demo */
    --intro-card-bg: rgba(10, 10, 10, 0.4);
    --intro-text: var(--toxic-green);
    --intro-accent: var(--toxic-green); /* Was #ff003c */
    --intro-accent-2: var(--toxic-green); /* Was #00f3ff */
    --intro-border: rgba(255, 255, 255, 0.1);
    --font-display: 'Syncopate', sans-serif;
    --font-code: 'JetBrains Mono', monospace;
    
    /* New Variables for Theme Compatibility */
    --intro-star-color: white;
    --intro-text-stroke: rgba(255, 255, 255, 0.15);
    --intro-glitch-1: var(--secondary-accent);
    --intro-glitch-2: var(--toxic-green);
}

/* Light Theme Overrides for Intro */
body.light-theme {
    --intro-bg: var(--bg-primary);
    --intro-card-bg: rgba(10, 10, 10, 0.9);
    --intro-border: rgba(255, 255, 255, 0.15);
    --intro-star-color: #333;
    --intro-text-stroke: rgba(0, 0, 0, 0.3);
    --intro-text: #f0f0f0;
}

#hyper-intro-layer {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: var(--intro-bg);
    overflow: hidden;
    font-family: var(--font-display);
    color: var(--intro-text);
}

/* --- POST PROCESSING & OVERLAYS --- */
.intro-scanlines {
    position: fixed;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0),
            rgba(255, 255, 255, 0) 50%,
            rgba(0, 0, 0, 0.2) 50%,
            rgba(0, 0, 0, 0.2));
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 10;
}

.intro-vignette {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle, transparent 40%, #000 120%);
    z-index: 11;
    pointer-events: none;
}

.intro-noise {
    position: fixed;
    inset: 0;
    z-index: 12;
    opacity: 0.07;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* --- HUD --- */
.intro-hud {
    position: fixed;
    inset: 2rem;
    z-index: 20;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-family: var(--font-code);
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
}

.intro-hud-top,
.intro-hud-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.intro-hud-bottom {
    pointer-events: auto;
}

.intro-hud strong {
    color: var(--intro-accent);
}

.intro-hud-line {
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 1rem;
    position: relative;
}

.intro-hud-line::after {
    content: '';
    position: absolute;
    right: 0;
    top: -2px;
    width: 5px;
    height: 5px;
    background: var(--intro-accent);
}

.enter-system-btn {
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--intro-accent);
    color: var(--intro-accent);
    padding: 10px 20px;
    font-family: var(--font-code);
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s ease;
    pointer-events: auto;
    font-size: 1rem;
    letter-spacing: 2px;
}

.enter-system-btn:hover {
    background: var(--intro-accent);
    color: #000;
    box-shadow: 0 0 15px var(--intro-accent);
}

/* --- 3D SCENE --- */
.intro-viewport {
    position: fixed;
    inset: 0;
    perspective: 1000px;
    overflow: hidden;
    z-index: 1;
}

.intro-world {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-style: preserve-3d;
    will-change: transform;
}

.intro-item {
    position: absolute;
    left: 0;
    top: 0;
    backface-visibility: hidden;
    transform-origin: center center;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- CARDS & CONTENT --- */
.intro-card {
    width: 90vw;
    max-width: 320px;
    height: min(460px, 70vh); /* Prevent overflow on landscape mobile */
    background: var(--intro-card-bg);
    border: 1px solid var(--intro-border);
    position: relative;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5), 0 20px 50px rgba(0, 0, 0, 0.5);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translate(-50%, -50%);
}

@media (hover: hover) {
    .intro-card:hover {
        border-color: var(--intro-accent);
        box-shadow: 0 0 30px rgba(226, 255, 0, 0.2);
        background: rgba(20, 20, 20, 0.8);
        z-index: 100;
    }
}

.intro-card::before,
.intro-card::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    border: 1px solid transparent;
    transition: 0.3s;
}

.intro-card::before {
    top: -1px;
    left: -1px;
    border-top-color: var(--intro-text);
    border-left-color: var(--intro-text);
}

.intro-card::after {
    bottom: -1px;
    right: -1px;
    border-bottom-color: var(--intro-text);
    border-right-color: var(--intro-text);
}

.intro-card:hover::before,
.intro-card:hover::after {
    width: 100%;
    height: 100%;
    border-color: var(--intro-accent);
}

.intro-card-header {
    border-bottom: 1px solid var(--intro-border);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.intro-card-id {
    font-family: var(--font-code);
    color: var(--intro-accent);
    font-size: 0.8rem;
}

.intro-card h2 {
    font-size: 2.5rem;
    line-height: 0.9;
    margin: 0;
    text-transform: uppercase;
    font-weight: 700;
    color: #fff;
    mix-blend-mode: hard-light;
}

.intro-card-footer {
    margin-top: auto;
    font-family: var(--font-code);
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    display: flex;
    justify-content: space-between;
}

/* --- BIG TEXT --- */
.intro-big-text {
    font-size: 12vw;
    font-weight: 800;
    color: var(--accent-color);
    -webkit-text-stroke: 2px var(--intro-text-stroke);
    text-transform: uppercase;
    white-space: nowrap;
    transform: translate(-50%, -50%);
    pointer-events: none;
    letter-spacing: -0.5rem;
    mix-blend-mode: overlay;
}

/* --- PARTICLES --- */
.intro-star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--intro-star-color);
    transform: translate(-50%, -50%);
}

/* =========================================
   PERFORMANCE OVERRIDES
   ========================================= */
.performance-mode-low .intro-card {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(10, 10, 10, 0.95) !important;
    box-shadow: none !important;
    border-color: var(--intro-border) !important;
    transform: translate(-50%, -50%) !important;
    transition: transform 0.3s ease !important; /* Simplified transition */
}

.performance-mode-low .intro-card:hover {
    box-shadow: none !important;
    transform: translate(-50%, -50%) !important;
    z-index: 1 !important;
}

.performance-mode-low .intro-big-text {
    text-shadow: none !important;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.1) !important;
}

.performance-mode-low .intro-star {
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Simplify exit transition to avoid blur */
.performance-mode-low #hyper-intro-layer {
    transition: opacity 0.5s ease-out !important; 
    filter: none !important;
}


/* --- SCROLL PROXY --- */
.intro-scroll-proxy {
    height: 10000vh;
    position: absolute;
    width: 100%;
    z-index: -1;
    pointer-events: none;
}

/* =========================================
   DASHBOARD TRANSITION FIXES
   ========================================= */

.dashboard {
    opacity: 0;
    will-change: opacity;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Ensure body allows scroll after intro */
body.no-scroll {
    overflow: hidden !important;
}
/* ========== MOBILE REFINEMENTS ========== */
@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    .main-title {
        font-size: 1.8rem;
    }
    
    .dashboard {
        padding: 5px;
        gap: 10px;
    }
    
    .grid-item {
        padding: 12px;
    }
    
    /* Hide disruptive large decorative elements */
    .barcode-decorative, 
    .hazard-stripes,
    .tech-warning-label, 
    .tech-security-badge,
    .tech-serial-tag {
        display: none !important;
    }

    /* Adjust specific tech elements to be subtle */
    .tech-overlay {
        transform: scale(0.7);
        transform-origin: bottom left;
    }
    
    .terminal-button {
        bottom: 15px;
        left: auto;
        right: 15px;
        padding: 8px 12px;
    }
    
    .intro-big-text {
        font-size: 12vw;
    }
    
    /* Optimize Timeline for Mobile */
    .timeline-container {
        padding-left: 0;
    }
    .timeline-container::before {
        left: 9px;
    }
    .timeline-dot {
        left: 5px;
        width: 10px;
        height: 10px;
    }
    .timeline-item {
        padding-left: 30px;
    }
}

/* Fix: Ensure dashboard is visible in Low Performance Mode */
.performance-mode-low .dashboard {
    opacity: 1 !important;
    animation: none !important;
    transition: none !important;
}

.performance-mode-low .intro-viewport,
.performance-mode-low #hyper-intro-layer {
    display: none !important;
}

/* Force Console & Terminal Visibility in Low Performance */
/* Force Console & Terminal Visibility in Low Performance */
.performance-mode-low .console-block,
.performance-mode-low .terminal-button {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.performance-mode-low .terminal-button {
    display: flex !important; /* Restore flex for button */
}

/* Fix: Ensure terminal button interacts and positions correctly in low mode */
.performance-mode-low .terminal-button {
    transform: translateY(0) !important;
    pointer-events: all !important;
    display: flex !important;
}

/* FORCE Terminal Visibility Global Override */
#terminalButton {
    z-index: 10005 !important;
}

.performance-mode-low #terminalButton {
    opacity: 1 !important;
    transform: translateY(0) !important;
    pointer-events: all !important;
    display: flex !important;
    visibility: visible !important;
}

/* Optimization: Simplify Hyper Scroll visuals in Low Performance Mode */
.performance-mode-low .intro-card {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(10, 10, 10, 0.95) !important;
    box-shadow: none !important;
    border-color: var(--intro-border) !important;
    transform: translate(-50%, -50%) !important; /* Keep essential transform */
    transition: none !important; /* Disable hover transitions */
}

.performance-mode-low .intro-card:hover {
    box-shadow: none !important;
    transform: translate(-50%, -50%) !important;
    z-index: 1 !important;
}

.performance-mode-low .intro-big-text {
    text-shadow: none !important;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.1) !important;
}

.performance-mode-low .intro-star {
    border-radius: 0 !important; /* Square stars are faster to render */
    box-shadow: none !important;
}

/* =========================================
   LIGHT THEME COMPONENT FIXES
   ========================================= */

/* Fix Console Block in Light Mode */
body.light-theme .console-block {
    background: #f0f0f0 !important;
    color: #333 !important;
    border-color: #999 !important;
}

body.light-theme .console-block .block-label,
body.light-theme .console-block .corner {
    color: #555 !important;
}

body.light-theme .console-block .hex-small {
    background: #555;
    opacity: 0.3;
}

/* Fix Video Modal/VR Projects in Light Mode */
body.light-theme .video-modal-content {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(0, 0, 0, 0.2);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.15);
}

body.light-theme .video-modal-content .modal-header {
    background: rgba(240, 240, 240, 0.95);
    border-bottom-color: rgba(0, 0, 0, 0.1);
    color: #111;
}

body.light-theme .video-modal-content .modal-footer {
    background: rgba(240, 240, 240, 0.95);
    border-top-color: rgba(0, 0, 0, 0.1);
    color: #333;
}

body.light-theme .glitch-text {
    color: #111;
    text-shadow: 2px 2px 0px rgba(0,0,0,0.1);
}

body.light-theme .modal-close-btn {
    color: #333 !important;
}

/* Fix Awards/Recognition Log in Light Mode */
body.light-theme #awardsModal .modal-content {
    background: rgba(255, 255, 255, 0.98) !important;
    border-color: rgba(0, 0, 0, 0.2);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.15);
}

body.light-theme .award-card {
    background: rgba(240, 240, 240, 0.8) !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
    box-shadow: none;
}

body.light-theme .award-card:hover {
    background: white !important;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1) !important;
    border-color: var(--award-color) !important;
}

body.light-theme .award-icon-box {
    background: rgba(0,0,0,0.05); /* Very light gray */
    border-color: rgba(0,0,0,0.1);
}

body.light-theme .award-title {
    color: #111;
}

body.light-theme .award-rank {
    /* award-color typically handles this, but ensuring contrast */
    filter: brightness(0.8); /* Darken slightly for white bg */
}

body.light-theme .award-desc, 
body.light-theme .award-event {
    color: #444;
}

/* Modal header/footer overrides */
body.light-theme .modal-header {
    background: rgba(240, 240, 240, 0.95);
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

body.light-theme .modal-title {
    color: #111;
}

body.light-theme .modal-close {
    color: #555;
}
