
        /* =========================================
         1. DESIGN SYSTEM (TOKENS)
         ========================================= 
        */
        :root {
            /* Calibrated Slate & OKLCH Theme */
            --color-bg-deep: #09090b;
            --color-bg-surface: #18181b;

            --color-text-primary: #f4f4f5;
            --color-text-secondary: #a1a1aa;
            --color-text-tertiary: #717172;

            --h-accent: 150;
            --s-accent: 70%;
            --l-accent: 60%;
            --color-accent: hsl(var(--h-accent), var(--s-accent), var(--l-accent));
            --color-accent-glow: rgba(16, 185, 129, 0.15);

            --color-border: rgba(255, 255, 255, 0.08);
            --color-border-hover: rgba(16, 185, 129, 0.4);
            /* Spacing Scale (4px Baseline Grid) */
            --space-1: 4px;
            --space-2: 8px;
            --space-3: 12px;
            --space-4: 16px;
            --space-6: 24px;
            --space-8: 32px;
            --space-12: 48px;
            --space-16: 64px;
            --space-24: 96px;
            --space-32: 128px;
            /* Typography Scale (Fluid) */
            --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
            --font-display: 'Geist', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
            --font-mono: 'Geist Mono', monospace;

            --text-xs: clamp(0.75rem, 0.8vw, 0.875rem);
            --text-sm: clamp(0.875rem, 0.9vw, 1rem);
            --text-base: clamp(1rem, 1vw, 1.125rem);
            --text-lg: clamp(1.125rem, 1.2vw, 1.25rem);
            --text-xl: clamp(1.25rem, 1.5vw, 1.5rem);
            --text-2xl: clamp(1.5rem, 2vw, 2rem);
            --text-display: clamp(3rem, 6vw, 6rem);
            /* Radii */
            --radius-sm: 8px;
            --radius-md: 12px;
            --radius-lg: 12px;
            --radius-full: 9999px;
            /* Elevation & Effects */
            --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
            --shadow-glow: 0 0 40px var(--color-accent-glow);
            --blur-glass: blur(12px);
            --assistant-safe-offset: 24px;
            --scene-accent: 99, 102, 241;
            --scene-secondary: 139, 92, 246;
            --scene-veil-opacity: 0.16;

            /* Animation Physics */
            --ease-elastic: cubic-bezier(0.19, 1, 0.22, 1);
            --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
        }

        html[data-motion-scene="signal"] {
            --scene-accent: 16, 185, 129;
            --scene-secondary: 6, 182, 212;
            --scene-veil-opacity: 0.18;
        }

        html[data-motion-scene="proof"] {
            --scene-accent: 244, 63, 94;
            --scene-secondary: 139, 92, 246;
            --scene-veil-opacity: 0.2;
        }

        html[data-motion-scene="system"] {
            --scene-accent: 245, 158, 11;
            --scene-secondary: 234, 179, 8;
            --scene-veil-opacity: 0.15;
        }

        html[data-motion-scene="visual"] {
            --scene-accent: 20, 184, 166;
            --scene-secondary: 56, 189, 248;
            --scene-veil-opacity: 0.12;
        }

        html[data-motion-scene="contact"] {
            --scene-accent: 99, 102, 241;
            --scene-secondary: 59, 130, 246;
            --scene-veil-opacity: 0.1;
        }

        /* =========================================
         2. RESET & BASE STYLES
         ========================================= 
        */
        *,
        *::before,
        *::after {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        /* Accessible Focus States */
        :focus-visible {
            outline: 2px solid var(--color-accent);
            outline-offset: 4px;
            border-radius: 4px;
        }

        /* --- Premium Text Selection --- */
        ::selection {
            background-color: var(--color-accent-glow);
            color: var(--color-text-primary);
            text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
        }

        /* --- Custom Premium Scrollbar --- */
        ::-webkit-scrollbar {
            width: 10px;
            background: var(--color-bg-deep);
        }

        ::-webkit-scrollbar-track {
            background: rgba(10, 10, 15, 0.8);
            border-radius: 0;
        }

        ::-webkit-scrollbar-thumb {
            background: rgba(99, 102, 241, 0.4);
            /* Indigo accent */
            border-radius: 10px;
            border: 2px solid rgba(10, 10, 15, 0.8);
            transition: background 0.3s;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: rgba(99, 102, 241, 0.8);
            /* Brighter on hover */
        }

        html {
            /* scroll-behavior: smooth; REMOVED - Conflicts with Lenis on mobile */
            background-color: var(--color-bg-deep);
            overflow-x: hidden;
            /* Prevent horizontal overflow */
            width: 100%;
            position: relative;
        }

        /* Lenis recommended settings */
        html.lenis,
        html.lenis body {
            height: auto;
        }

        .lenis.lenis-smooth {
            scroll-behavior: auto !important;
        }

        .lenis.lenis-stopped {
            overflow: hidden;
        }

        body {
            color: var(--color-text-primary);
            font-family: var(--font-sans);
            line-height: 1.6;
            /* overflow-x: hidden; REMOVED - Breaks sticky positioning */
            width: 100%;
            position: relative;
            -webkit-font-smoothing: antialiased;
            /* Performance: Create a stacking context */
        }

        h1,
        h2,
        h3 {
            font-family: var(--font-display);
            line-height: 1.1;
            color: var(--color-text-primary);
            word-break: keep-all;
            /* Keep words together */
            overflow-wrap: normal;
            /* Prevent word breaking */
        }

        .section-title {
            font-size: clamp(2.6rem, 4.2vw, 4.4rem);
            font-weight: 700;
            line-height: 0.98;
            letter-spacing: -0.03em;
            color: var(--color-text-primary);
            word-break: keep-all;
            overflow-wrap: normal;
            text-wrap: balance;
        }

        p {
            color: var(--color-text-secondary);
            max-width: 65ch;

            /* 1. Prevent splitting words */
            word-break: normal;

            /* 2. Ensure long words wrap to the next line instead of overflowing */
            overflow-wrap: break-word;

            /* 3. Disable automatic hyphenation (e.g., pro-gramming) */
            -webkit-hyphens: none;
            -moz-hyphens: none;
            hyphens: none;
        }

        a {
            color: inherit;
            text-decoration: none;
            transition: color 0.2s;
        }

        ul {
            list-style: none;
        }

        img {
            max-width: 100%;
            height: auto;
            display: block;
        }

        /* Utility: Screen Reader Only */
        .sr-only {
            position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            white-space: nowrap;
            border: 0;
        }

        /* =========================================
         3. LAYOUT & GRID
         ========================================= 
        */
        .container {
            width: 100%;
            max-width: 1280px;
            margin: 0 auto;
            padding: 0 var(--space-6);
        }

        section {
            padding: var(--space-24) 0;
        }

        /* =========================================
           EDITORIAL ASYMMETRICAL STICKY GRID
           ========================================= 
        */
        .editorial-section {
            padding: var(--space-24) 0;
            position: relative;
            overflow: visible; /* Crucial for sticky headers */
        }

        .editorial-container {
            width: 100%;
            max-width: 1280px;
            margin: 0 auto;
            padding: 0 var(--space-6);
            display: grid;
            grid-template-columns: 1fr;
            gap: var(--space-12);
        }

        .editorial-header {
            position: relative;
            z-index: 10;
            display: flex;
            flex-direction: column;
            gap: var(--space-4);
            align-items: flex-start;
        }

        .editorial-content {
            position: relative;
            z-index: 5;
        }

        @media (min-width: 992px) {
            .editorial-container {
                grid-template-columns: 380px 1fr;
                gap: var(--space-16);
                align-items: flex-start;
            }

            .editorial-header {
                position: sticky;
                top: 100px; /* Offset from viewport ceiling */
                padding-right: var(--space-8);
            }

            .engineering-layout {
                padding-bottom: 45vh; /* Keep the stack sticky with ample space before photography */
            }

            .engineering-case-study {
                position: sticky !important;
                top: 180px;
                z-index: 4;
            }

            .proof-matrix {
                position: sticky !important;
                top: 200px;
                z-index: 5;
            }
        }

        /* =========================================
           LIQUID GLASS AESTHETIC (APPLE-STYLE)
           ========================================= 
        */
        .liquid-glass {
            background: rgba(255, 255, 255, 0.015) !important;
            backdrop-filter: blur(30px) saturate(210%) !important;
            -webkit-backdrop-filter: blur(30px) saturate(210%) !important;
            border: 1px solid rgba(255, 255, 255, 0.08) !important;
            box-shadow: 
                0 20px 40px rgba(0, 0, 0, 0.25),
                inset 0 1px 0 rgba(255, 255, 255, 0.1),
                0 0 80px rgba(99, 102, 241, 0.02) !important;
            position: relative;
            overflow: hidden;
            transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
        }

        /* Ambient reflection layer inside liquid glass */
        .liquid-glass::after {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 60%, rgba(0, 0, 0, 0.1) 100%);
            pointer-events: none;
            z-index: 1;
        }

        /* Ensure projects section doesn't interfere with sticky positioning */
        #projects {
            content-visibility: visible !important;
            contain-intrinsic-size: auto !important;
            overflow: visible !important;
            /* Ensure overflow doesn't clip the sticky element */
            position: relative;
            /* Create positioning context */
        }

        /* Ensure main element doesn't interfere with sticky */
        main#main-content {
            overflow: visible !important;
        }

        /* =========================================
          BULLETPROOF HEADER UTILITY
         ========================================= 
        */

        /* Desktop State (Default) */
        .section-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-end;
            margin-bottom: var(--space-8);
            position: relative;
            z-index: 5;
            /* Vital: Ensures text/buttons float above background particles */
        }

        .grid-2 {
            display: grid;
            grid-template-columns: 1fr;
            gap: var(--space-12);
        }

        .grid-3 {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: var(--space-6);
        }

        @media (min-width: 768px) {
            .grid-2 {
                grid-template-columns: 1fr 1fr;
            }
        }

        /* =========================================
         4. COMPONENTS
         ========================================= 
        */
        /* --- Custom Cursor (Mouse Only) --- */
        @media (hover: hover) and (pointer: fine) {
            body {
                cursor: none;
            }

            .cursor-dot,
            .cursor-outline {
                position: fixed;
                top: 0;
                left: 0;
                transform: translate(-50%, -50%);
                border-radius: 50%;
                pointer-events: none;
                z-index: 9999;
                /* Premium Feature: Difference Blend Mode */
                mix-blend-mode: difference;
            }

            .cursor-dot {
                width: 8px;
                height: 8px;
                background: white;
            }

            .cursor-outline {
                width: 40px;
                height: 40px;
                border: 1px solid rgba(255, 255, 255, 0.5);
                /* JS handles position, CSS handles size/opacity */
                transition: width 0.2s, height 0.2s, background-color 0.2s;
            }

            /* Hover State */
            body:has(a:hover, button:hover, .interactive:hover) .cursor-outline {
                width: 60px;
                height: 60px;
                background: rgba(255, 255, 255, 0.05);
                border-color: transparent;
                backdrop-filter: blur(2px);
            }
        }

        /* --- Navigation Dock --- */
        .nav-wrapper {
            position: fixed;
            /* Use safe-area-inset to prevent nav from hiding behind iPhone home bar */
            bottom: calc(20px + env(safe-area-inset-bottom, 0px));
            left: 50%;
            transform: translateX(-50%);
            z-index: 1000;
            /* Ensure it's above everything else */
            width: auto;
            max-width: 95vw;
            transition: transform 0.42s var(--ease-smooth), opacity 0.42s var(--ease-smooth);
        }

        .nav-wrapper.nav-compact {
            transform: translateX(-50%) translateY(calc(100% - 24px));
            opacity: 0.78;
        }

        .nav-wrapper.nav-compact .nav-dock {
            min-height: 28px;
            overflow: hidden;
            padding-top: 2px;
            padding-bottom: 2px;
        }

        .nav-wrapper.nav-compact .nav-link,
        .nav-wrapper.nav-compact .nav-logo {
            opacity: 0;
            pointer-events: none;
        }

        .nav-dock {
            display: flex;
            align-items: center;
            gap: var(--space-2);
            padding: var(--space-2) var(--space-4);
            background: rgba(10, 10, 10, 0.6);
            /* Fallback for browsers without backdrop-filter */
            backdrop-filter: blur(20px) saturate(180%);
            -webkit-backdrop-filter: blur(20px) saturate(180%);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 100px;
            box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
            list-style: none;
        }

        @supports (backdrop-filter: blur(12px)) {
            .nav-dock {
                background: rgba(15, 15, 20, 0.7);
            }
        }

        .nav-link {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-height: 44px;
            padding: var(--space-3) var(--space-4);
            /* Increased for mobile touch target */
            color: var(--color-text-secondary);
            font-size: var(--text-sm);
            font-weight: 500;
            white-space: nowrap;
            /* Prevent text wrapping */
            word-break: keep-all;
            /* Keep words together */
            border-radius: var(--radius-full);
            transition: color 0.3s var(--ease-smooth), background-color 0.3s var(--ease-smooth);
            /* Removed transform - GSAP handles it */
            will-change: transform;
            /* Optimize for magnetic effect */
        }

        .nav-link:hover,
        .nav-link.active {
            color: var(--color-text-primary);
            background: rgba(255, 255, 255, 0.1);
        }

        .nav-logo {
            font-family: var(--font-display);
            font-weight: 800;
            color: var(--color-text-primary);
            padding: var(--space-2) var(--space-4);
            margin-right: var(--space-2);
            border-right: 1px solid var(--color-border);
        }

        /* --- Buttons --- */
        .btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: var(--space-2);
            padding: var(--space-3) var(--space-6);
            font-weight: 600;
            font-size: var(--text-base);
            border-radius: var(--radius-full);
            transition: background-color 0.2s, border-color 0.2s;
            /* Removed transform - GSAP handles it */
            cursor: pointer;
            border: none;
            will-change: transform;
            /* Optimize for magnetic effect */
            white-space: nowrap;
            /* Prevent text wrapping */
            word-break: keep-all;
            /* Keep words together */
        }

        .btn:active {
            transform: scale(0.95);
        }

        .btn-primary {
            background: var(--color-text-primary);
            color: var(--color-bg-deep);
        }

        .btn-primary:hover {
            background: #ececec;
        }

        .btn-glass {
            background: rgba(255, 255, 255, 0.15);
            /* Fallback for browsers without backdrop-filter */
            color: var(--color-text-primary);
            border: 1px solid var(--color-border);
            backdrop-filter: blur(4px);
            -webkit-backdrop-filter: blur(4px);
        }

        @supports (backdrop-filter: blur(4px)) {
            .btn-glass {
                background: rgba(255, 255, 255, 0.05);
            }
        }

        .btn-glass:hover {
            background: rgba(255, 255, 255, 0.1);
            border-color: var(--color-text-primary);
        }

        /* New Large Button Class for Projects */
        .btn-lg {
            padding: 18px 40px;
            /* Much larger click area */
            font-size: 1.05rem;
            /* Slightly larger text */
            min-width: 200px;
            /* Ensures the button feels substantial on Desktop */
            letter-spacing: 0.02em;
            justify-content: center;
            /* Centers text */
        }

        /* --- Cards --- */
        .card {
            /* Glassmorphism Card */
            background: var(--color-bg-surface);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border: 1px solid var(--color-border);
            border-radius: var(--radius-lg);
            overflow: hidden;
            transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            /* Layout Containment for Performance */
            contain: layout paint;
            box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
        }

        .card:hover {
            border-color: var(--color-border-hover);
            transform: translateY(-4px);
        }

        /* --- Tags & Pills --- */
        .pill {
            display: inline-block;
            padding: 4px 12px;
            border-radius: var(--radius-full);
            font-family: var(--font-mono);
            font-size: var(--text-xs);
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid var(--color-border);
            color: var(--color-text-secondary);
            white-space: nowrap;
            /* Prevent text wrapping */
            word-break: keep-all;
            /* Keep words together */
        }

        .engineering-intro {
            margin-top: var(--space-4);
            max-width: 58ch;
            font-size: clamp(1rem, 1.1vw, 1.12rem);
        }

        .engineering-layout {
            position: relative;
            display: flex;
            flex-direction: column;
            gap: 80px; /* Increased gap for better scroll stacking */
            margin-top: var(--space-10);
            padding-bottom: 15vh;
            perspective: 2000px; /* Enable 3D space */
        }

        /* Glowing Workflow Connector Line (Hidden for centered layout) */
        .engineering-layout::before {
            display: none !important;
        }

        .engineering-card {
            position: sticky;
            border-radius: var(--radius-md);
            border: 1px solid rgba(255, 255, 255, 0.08);
            background: 
                radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), hsla(var(--h-accent), var(--s-accent), var(--l-accent), 0.15) 0%, transparent 60%),
                linear-gradient(180deg, rgba(18, 19, 27, 0.85), rgba(12, 13, 20, 0.95));
            box-shadow:
                0 30px 60px rgba(0, 0, 0, 0.3);
            padding: clamp(32px, 5vw, 48px);
            margin-left: 0; /* Aligned centered in right content column */
            display: grid;
            gap: 24px;
            backdrop-filter: blur(40px) saturate(180%);
            -webkit-backdrop-filter: blur(40px) saturate(180%);
            
            /* 3D and Scroll Variables */
            --rotateX: 0deg;
            --rotateY: 0deg;
            --hover-scale: 1;
            --scroll-scale: 1;
            --scroll-y: 0px;
            --scroll-rotateX: 0deg;
            --scroll-opacity: 1;
            --mouse-x: 50%;
            --mouse-y: 50%;
            
            transform-style: preserve-3d;
            transform: translateY(var(--scroll-y)) rotateX(calc(var(--rotateX) + var(--scroll-rotateX))) rotateY(var(--rotateY)) scale3d(calc(var(--hover-scale) * var(--scroll-scale)), calc(var(--hover-scale) * var(--scroll-scale)), 1);
            opacity: var(--scroll-opacity);
            transition: transform 0.15s ease-out, box-shadow 0.3s ease, border-color 0.3s ease, filter 0.1s ease, opacity 0.1s ease;
            will-change: transform, opacity;
            transform-origin: center top;
        }

        /* Timeline Horizontal Connector Line (Hidden for centered layout) */
        .engineering-card::before {
            display: none !important;
        }

        /* Timeline Node Dot (Hidden for centered layout) */
        .engineering-card::after {
            display: none !important;
        }

        .engineering-card:hover::after {
            display: none !important;
        }

        .engineering-card:hover {
            border-color: var(--color-border-hover);
            box-shadow:
                0 30px 60px rgba(0, 0, 0, 0.4),
                0 0 30px hsla(var(--h-accent), var(--s-accent), var(--l-accent), 0.15);
        }

        .engineering-card:nth-child(1) { top: 120px; z-index: 1; }
        .engineering-card:nth-child(2) { top: 140px; z-index: 2; }
        .engineering-card:nth-child(3) { top: 160px; z-index: 3; }

        .engineering-panel-topline {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            flex-wrap: wrap;
        }

        .engineering-kicker {
            font-family: var(--font-mono);
            font-size: 0.76rem;
            letter-spacing: 0.16em;
            text-transform: uppercase;
            color: rgba(255, 255, 255, 0.48);
            display: flex;
            align-items: center;
            gap: 8px;
        }

        /* Pulsing neon indicator node */
        .engineering-kicker::before {
            content: '';
            display: inline-block;
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background-color: var(--color-accent);
            box-shadow: 0 0 8px var(--color-accent);
            animation: kicker-node-pulse 2s infinite ease-in-out;
        }

        @keyframes kicker-node-pulse {
            0%, 100% {
                opacity: 0.6;
                transform: scale(0.9);
                box-shadow: 0 0 4px var(--color-accent);
            }
            50% {
                opacity: 1;
                transform: scale(1.1);
                box-shadow: 0 0 12px var(--color-accent-glow);
            }
        }

        .engineering-card h3 {
            max-width: 16ch;
            font-size: clamp(2rem, 4vw, 3.2rem);
            line-height: 0.98;
            letter-spacing: -0.03em;
        }

        .engineering-card p {
            max-width: 50ch;
            margin: 0;
            font-size: clamp(1rem, 1.15vw, 1.14rem);
            color: rgba(255, 255, 255, 0.76);
        }

        .engineering-proof {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
        }

        .engineering-proof span {
            display: inline-flex;
            align-items: center;
            padding: 9px 13px;
            border-radius: var(--radius-full);
            border: 1px solid rgba(255, 255, 255, 0.08);
            background: rgba(255, 255, 255, 0.04);
            color: rgba(255, 255, 255, 0.86);
            font-size: 0.84rem;
            transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
            cursor: default;
        }

        .engineering-proof span:hover {
            border-color: rgba(var(--scene-accent), 0.45);
            background: rgba(var(--scene-accent), 0.1);
            color: #fff;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(var(--scene-accent), 0.15);
        }

        .engineering-evidence {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
            gap: 16px;
        }

        .engineering-evidence-item {
            padding: 20px 24px;
            border-radius: var(--radius-md);
            border: 1px solid rgba(255, 255, 255, 0.08);
            background: rgba(255, 255, 255, 0.03);
            display: flex;
            flex-direction: column;
            gap: 8px;
            transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
        }

        .engineering-evidence-item:hover {
            border-color: var(--color-border-hover);
            background: rgba(255, 255, 255, 0.05);
            transform: translateY(-2px);
        }

        .engineering-evidence-label {
            font-family: var(--font-mono);
            font-size: 0.72rem;
            letter-spacing: 0.12em;
            text-transform: uppercase;
            color: rgba(255, 255, 255, 0.42);
        }

        .engineering-evidence-value {
            font-size: 0.94rem;
            line-height: 1.5;
            color: rgba(255, 255, 255, 0.88);
        }

        .engineering-footer {
            margin-top: 8px;
            padding-top: 24px;
            border-top: 1px solid rgba(255, 255, 255, 0.08);
        }

        .engineering-seen-in {
            font-size: 0.9rem !important;
            color: rgba(255, 255, 255, 0.5) !important;
        }

        .engineering-seen-in strong {
            color: rgba(255, 255, 255, 0.8);
            font-weight: 500;
        }

        .engineering-case-study {
            margin-top: var(--space-8);
            padding: 18px 22px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 18px;
            flex-wrap: wrap;
            border-radius: var(--radius-md);
            border: 1px solid rgba(255, 255, 255, 0.08);
            background: rgba(255, 255, 255, 0.03);

            /* 3D and Scroll Variables */
            --rotateX: 0deg;
            --rotateY: 0deg;
            --hover-scale: 1;
            --scroll-scale: 1;
            --scroll-y: 0px;
            --scroll-rotateX: 0deg;
            --scroll-opacity: 1;
            --mouse-x: 50%;
            --mouse-y: 50%;
            
            transform-style: preserve-3d;
            transform: translateY(var(--scroll-y)) rotateX(calc(var(--rotateX) + var(--scroll-rotateX))) rotateY(var(--rotateY)) scale3d(calc(var(--hover-scale) * var(--scroll-scale)), calc(var(--hover-scale) * var(--scroll-scale)), 1);
            opacity: var(--scroll-opacity);
            transition: transform 0.15s ease-out, box-shadow 0.3s ease, border-color 0.3s ease, filter 0.1s ease, opacity 0.1s ease;
            will-change: transform, opacity;
            transform-origin: center top;
        }

        .engineering-case-study-copy {
            max-width: 64ch;
        }

        .engineering-case-study-copy strong {
            display: block;
            margin-bottom: 6px;
            font-family: var(--font-display);
            font-size: 1.06rem;
            letter-spacing: -0.02em;
        }

        .engineering-case-study-copy p {
            margin: 0;
            max-width: none;
            color: rgba(255, 255, 255, 0.7);
        }

        .proof-matrix {
            padding: clamp(22px, 4vw, 34px);
            border-radius: var(--radius-md);
            border: 1px solid rgba(255, 255, 255, 0.08);
            background:
                radial-gradient(circle at var(--proof-x, 78%) var(--proof-y, 14%), rgba(99, 102, 241, 0.16), transparent 38%),
                linear-gradient(180deg, rgba(18, 20, 30, 0.78), rgba(8, 10, 18, 0.92));
            overflow: hidden;

            /* 3D and Scroll Variables */
            --rotateX: 0deg;
            --rotateY: 0deg;
            --hover-scale: 1;
            --scroll-scale: 1;
            --scroll-y: 0px;
            --scroll-rotateX: 0deg;
            --scroll-opacity: 1;
            --mouse-x: 50%;
            --mouse-y: 50%;
            
            transform-style: preserve-3d;
            transform: translateY(var(--scroll-y)) rotateX(calc(var(--rotateX) + var(--scroll-rotateX))) rotateY(var(--rotateY)) scale3d(calc(var(--hover-scale) * var(--scroll-scale)), calc(var(--hover-scale) * var(--scroll-scale)), 1);
            opacity: var(--scroll-opacity);
            transition: transform 0.15s ease-out, box-shadow 0.3s ease, border-color 0.3s ease, filter 0.1s ease, opacity 0.1s ease;
            will-change: transform, opacity;
            transform-origin: center top;
        }

        .proof-matrix-header {
            display: grid;
            grid-template-columns: minmax(0, 1fr) minmax(220px, 0.62fr);
            gap: 20px;
            align-items: end;
            margin-bottom: 22px;
        }

        .proof-matrix-header h3 {
            margin-top: 12px;
            font-size: clamp(1.65rem, 3vw, 2.65rem);
            line-height: 1;
            letter-spacing: -0.04em;
        }

        .proof-matrix-header p {
            margin: 0;
            color: rgba(255, 255, 255, 0.66);
            line-height: 1.55;
        }

        .proof-filter-group {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-bottom: 18px;
        }

        .proof-filter {
            min-height: 44px;
            padding: 10px 15px;
            border-radius: var(--radius-full);
            border: 1px solid rgba(255, 255, 255, 0.1);
            background: rgba(255, 255, 255, 0.04);
            color: rgba(255, 255, 255, 0.78);
            font-family: var(--font-mono);
            font-size: 0.78rem;
            cursor: pointer;
            transition: transform 0.2s var(--ease-smooth), border-color 0.2s var(--ease-smooth), background 0.2s var(--ease-smooth), color 0.2s var(--ease-smooth);
        }

        .proof-filter:hover,
        .proof-filter:focus-visible,
        .proof-filter.active {
            border-color: rgba(99, 102, 241, 0.42);
            background: rgba(99, 102, 241, 0.14);
            color: var(--color-text-primary);
        }

        .proof-filter:hover {
            transform: translateY(-1px);
        }

        .proof-grid {
            display: grid;
            gap: 10px;
        }

        .proof-row {
            display: grid;
            grid-template-columns: minmax(180px, 0.78fr) minmax(0, 1.22fr);
            gap: 18px;
            align-items: center;
            padding: 16px;
            border-radius: var(--radius-md);
            border: 1px solid rgba(255, 255, 255, 0.08);
            background: rgba(255, 255, 255, 0.035);
            transition: opacity 0.24s var(--ease-smooth), transform 0.24s var(--ease-smooth), border-color 0.24s var(--ease-smooth), background 0.24s var(--ease-smooth);
        }

        .proof-row[data-active="true"] {
            border-color: rgba(99, 102, 241, 0.34);
            background: rgba(99, 102, 241, 0.08);
            transform: translateX(3px);
        }

        .proof-row[data-muted="true"] {
            opacity: 0.42;
        }

        .proof-project {
            display: grid;
            gap: 6px;
        }

        .proof-project strong {
            font-size: 1.02rem;
            letter-spacing: -0.02em;
        }

        .proof-project span {
            color: rgba(255, 255, 255, 0.62);
            font-size: 0.9rem;
            line-height: 1.45;
        }

        .proof-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            justify-content: flex-end;
        }

        .proof-tags span {
            display: inline-flex;
            align-items: center;
            min-height: 34px;
            padding: 7px 10px;
            border-radius: var(--radius-full);
            border: 1px solid rgba(255, 255, 255, 0.08);
            background: rgba(255, 255, 255, 0.045);
            color: rgba(255, 255, 255, 0.78);
            font-size: 0.78rem;
        }

        .proof-matrix[data-filter="mobile"] [data-capability="mobile"],
        .proof-matrix[data-filter="ai"] [data-capability="ai"],
        .proof-matrix[data-filter="privacy"] [data-capability="privacy"] {
            border-color: rgba(255, 255, 255, 0.26);
            background: rgba(99, 102, 241, 0.2);
            color: var(--color-text-primary);
            box-shadow: 0 0 18px rgba(99, 102, 241, 0.14);
        }

        /* =========================================
         5. SECTIONS
         ========================================= 
        */

        /* HERO */
        .hero {
            height: 100dvh;
            /* Mobile friendly viewport unit */
            min-height: 700px;
            display: flex;
            align-items: center;
            overflow: hidden;
            padding: 0;
            /* Reset section padding */
            position: relative;
            /* Ensure hero creates a stacking context for absolute Vanta */
            z-index: 1;
        }

        .hero-content {
            position: relative;
            z-index: 2;
        }

        /* BACKGROUND LAYERS */

        /* VANTA: Now positioned ABSOLUTE inside .hero, so it scrolls away */
        #vanta-bg {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: -2;
            pointer-events: none;
            max-width: 100vw;
            /* Prevent horizontal overflow */
            overflow: hidden;
        }

        /* THREE JS: Fixed background linked to scroll */
        #three-foreground {
            position: fixed;
            top: 0;
            left: 0;
            z-index: -1;
            /* Above body bg, Behind Content */
            width: 100%;
            height: 100dvh;
            pointer-events: none;
            max-width: 100vw;
            /* Prevent horizontal overflow */
            overflow: hidden;
            background: radial-gradient(circle at 50% 30%, #12101f 0%, #050507 100%);
        }

        #three-foreground::after {
            content: '';
            position: absolute;
            inset: 0;
            pointer-events: none;
            background:
                radial-gradient(circle at 24% 22%, rgba(var(--scene-accent), var(--scene-veil-opacity)), transparent 34%),
                radial-gradient(circle at 76% 68%, rgba(var(--scene-secondary), calc(var(--scene-veil-opacity) * 0.72)), transparent 38%),
                linear-gradient(180deg, rgba(5, 5, 7, 0), rgba(5, 5, 7, 0.38));
            mix-blend-mode: screen;
            opacity: 0.8;
            transition: background 0.7s var(--ease-smooth), opacity 0.7s var(--ease-smooth);
        }

        /* Secondary Glowing Mesh Background */
        .mesh-bg {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100dvh;
            z-index: -2;
            overflow: hidden;
            background: var(--color-bg-deep);
            pointer-events: none;
        }

        @keyframes meshFloat {
            0% {
                translate: 0 0;
                scale: 1.0;
                opacity: 0.8;
            }

            25% {
                translate: 40px -60px;
                scale: 1.8;
                opacity: 1;
            }

            50% {
                translate: -30px 40px;
                scale: 0.7;
                opacity: 0.5;
            }

            75% {
                translate: 20px 30px;
                scale: 1.5;
                opacity: 0.9;
            }

            100% {
                translate: 0 0;
                scale: 1.0;
                opacity: 0.8;
            }
        }

        .glow-orb {
            position: absolute;
            border-radius: 50%;
            filter: blur(80px);
            /* Slightly sharper edge but large blur for distinct beams */
            will-change: transform, opacity, scale, background-color;
            pointer-events: none;
            mix-blend-mode: screen;
            /* Premium blending to make overlaps vibrant */
            z-index: -1;
            transform-origin: center center;
        }

        .hero-tag {
            display: flex;
            align-items: center;
            gap: var(--space-2);
            font-family: var(--font-mono);
            color: var(--color-accent);
            margin-bottom: var(--space-4);
        }

        .hero-title {
            font-size: var(--text-display);
            font-weight: 800;
            letter-spacing: -0.03em;
            margin-bottom: var(--space-6);
            color: var(--color-text-primary);
            word-break: keep-all;
            /* Keep words together */
            overflow-wrap: normal;
            /* Prevent word breaking */
        }

        .scene-kicker {
            display: block;
            max-width: 28ch;
            margin-top: var(--space-3);
            font-family: var(--font-mono);
            font-size: var(--text-xs);
            font-weight: 600;
            letter-spacing: 0.08em;
            line-height: 1.5;
            text-transform: uppercase;
            color: rgba(var(--scene-accent), 0.78);
        }

        /* ABOUT */
        .stats-wrapper {
            display: flex;
            align-items: center;
            justify-content: flex-start;
            width: 100%;
        }

        .stat-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: var(--space-8);
            margin-top: 0;
            /* Remove top margin since we're centering */
            max-width: 100%;
            justify-items: center;
        }

        .stat-item {
            padding: calc(var(--space-4) * 2);
            /* 100% larger (was var(--space-4)) */
            /* Changed from transparent rgba to solid surface color for visibility */
            background: var(--color-bg-surface);
            border: 1px solid var(--color-border);
            border-radius: var(--radius-md);
            text-align: center;
            min-width: 180px;
            min-height: 140px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }

        /* --- PREVIEW TOOLTIP STYLES --- */
        #project-preview-tooltip {
            position: fixed;
            pointer-events: none;
            opacity: 0;
            z-index: 9999;
            height: 220px;
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px;
            border-radius: var(--radius-md);
            background: rgba(10, 10, 15, 0.6);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(255, 255, 255, 0.05);
            transition: opacity 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
            /* Transform handled by JS */
        }

        .preview-tooltip-item {
            height: 100%;
            width: auto;
            border-radius: 12px;
            object-fit: cover;
            opacity: 0.9;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
            mask-image: linear-gradient(to bottom, black 90%, transparent 100%);
            -webkit-mask-image: linear-gradient(to bottom, black 90%, transparent 100%);
        }

        /* --- PROJECT ASSISTANT --- */
        .project-assistant-shell {
            position: fixed;
            right: clamp(16px, 3vw, 28px);
            bottom: calc(var(--assistant-safe-offset, 24px) + env(safe-area-inset-bottom));
            z-index: 1105;
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            gap: 12px;
            pointer-events: none;
            isolation: isolate;
        }

        .project-assistant-shell>* {
            pointer-events: auto;
        }

        .project-assistant-toggle {
            display: inline-flex;
            align-items: center;
            gap: 12px;
            min-height: 64px;
            padding: 8px 14px 8px 8px;
            border-radius: var(--radius-full);
            border: 1px solid rgba(255, 255, 255, 0.12);
            background: linear-gradient(145deg, rgba(14, 16, 24, 0.96), rgba(9, 11, 17, 0.92));
            box-shadow:
                0 18px 45px rgba(0, 0, 0, 0.42);
            backdrop-filter: blur(18px);
            -webkit-backdrop-filter: blur(18px);
            color: var(--color-text-primary);
            cursor: pointer;
            overflow: hidden;
            transition:
                transform 0.25s var(--ease-smooth),
                border-color 0.25s var(--ease-smooth),
                box-shadow 0.25s var(--ease-smooth),
                background 0.25s var(--ease-smooth);
        }

        .project-assistant-toggle:hover,
        .project-assistant-toggle:focus-visible,
        .project-assistant-shell[data-open="true"] .project-assistant-toggle {
            transform: translateY(-2px);
            border-color: rgba(99, 102, 241, 0.45);
            box-shadow:
                0 22px 55px rgba(0, 0, 0, 0.5),
                0 0 28px rgba(99, 102, 241, 0.18);
        }

        .assistant-toggle-orb {
            width: 44px;
            height: 44px;
            border-radius: 50%;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.44), rgba(99, 102, 241, 0.24) 34%, rgba(99, 102, 241, 0.08) 66%, transparent 100%);
            border: 1px solid rgba(255, 255, 255, 0.14);
            box-shadow: inset 0 1px 10px rgba(255, 255, 255, 0.18), 0 0 28px rgba(99, 102, 241, 0.28);
            font-size: 1rem;
            flex-shrink: 0;
        }

        .assistant-toggle-copy {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            justify-content: center;
            gap: 0;
            min-width: 0;
            max-width: 154px;
            overflow: hidden;
            transition: max-width 0.28s var(--ease-smooth), gap 0.28s var(--ease-smooth);
        }

        .assistant-toggle-title {
            font-family: var(--font-display);
            font-size: 0.96rem;
            font-weight: 700;
            letter-spacing: -0.02em;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .assistant-toggle-subtitle {
            max-height: 0;
            overflow: hidden;
            opacity: 0;
            transform: translateY(6px);
            font-size: 0.76rem;
            color: rgba(255, 255, 255, 0.66);
            line-height: 1.35;
            transition:
                max-height 0.28s var(--ease-smooth),
                opacity 0.2s var(--ease-smooth),
                transform 0.28s var(--ease-smooth);
        }

        @media (hover: hover) and (pointer: fine) {

            .project-assistant-toggle:hover .assistant-toggle-copy,
            .project-assistant-toggle:focus-visible .assistant-toggle-copy {
                max-width: 260px;
                gap: 4px;
            }

            .project-assistant-toggle:hover .assistant-toggle-subtitle,
            .project-assistant-toggle:focus-visible .assistant-toggle-subtitle {
                max-height: 42px;
                opacity: 1;
                transform: translateY(0);
            }
        }

        .project-assistant-shell[data-open="true"] .assistant-toggle-copy {
            max-width: 260px;
            gap: 4px;
        }

        .project-assistant-shell[data-open="true"] .assistant-toggle-subtitle {
            max-height: 42px;
            opacity: 1;
            transform: translateY(0);
        }

        .project-assistant-panel {
            position: relative;
            width: min(468px, calc(100vw - 32px));
            min-width: 420px;
            max-width: min(680px, calc(100vw - 32px));
            height: min(720px, calc(100vh - var(--assistant-safe-offset, 24px) - 28px));
            min-height: 560px;
            max-height: calc(100vh - var(--assistant-safe-offset, 24px) - 28px);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            border-radius: var(--radius-md);
            background:
                linear-gradient(180deg, rgba(10, 12, 18, 0.98) 0%, rgba(7, 9, 15, 0.96) 100%),
                radial-gradient(circle at top left, rgba(99, 102, 241, 0.14), transparent 46%);
            border: 1px solid rgba(255, 255, 255, 0.08);
            box-shadow:
                0 30px 70px rgba(0, 0, 0, 0.48),
                inset 0 1px 0 rgba(255, 255, 255, 0.08);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            pointer-events: none;
            opacity: 0;
            visibility: hidden;
            transform: translateY(18px) scale(0.98);
            transform-origin: bottom right;
            transition:
                opacity 0.24s var(--ease-smooth),
                transform 0.24s var(--ease-smooth),
                visibility 0.24s;
        }

        .project-assistant-shell[data-open="true"] .project-assistant-panel {
            opacity: 1;
            visibility: visible;
            pointer-events: auto;
            transform: translateY(0) scale(1);
        }

        .assistant-panel-header {
            display: grid;
            gap: 10px;
            padding: 14px 16px 10px 40px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
        }

        .assistant-panel-topline {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 16px;
        }

        .assistant-eyebrow {
            font-family: var(--font-mono);
            font-size: 0.64rem;
            letter-spacing: 0.14em;
            text-transform: uppercase;
            color: rgba(255, 255, 255, 0.55);
            margin-bottom: 4px;
        }

        .assistant-panel-title {
            font-size: clamp(1.15rem, 1.8vw, 1.45rem);
            letter-spacing: -0.03em;
        }

        .assistant-panel-subtitle {
            max-width: 24ch;
            margin-top: 4px;
            font-size: 0.82rem;
            line-height: 1.35;
            color: rgba(255, 255, 255, 0.66);
        }

        .assistant-close {
            width: 44px;
            height: 44px;
            border-radius: 50%;
            border: 1px solid rgba(255, 255, 255, 0.1);
            background: rgba(255, 255, 255, 0.04);
            color: var(--color-text-primary);
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            transition: background 0.2s var(--ease-smooth), transform 0.2s var(--ease-smooth);
        }

        .assistant-close:hover {
            background: rgba(255, 255, 255, 0.08);
            transform: translateY(-1px);
        }

        .assistant-panel-meta {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }

        .assistant-status-pill {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 6px 10px;
            border-radius: 999px;
            border: 1px solid rgba(99, 102, 241, 0.2);
            background: rgba(99, 102, 241, 0.08);
            font-size: 0.72rem;
            color: rgba(255, 255, 255, 0.82);
        }

        .assistant-status-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #72f0a6;
            box-shadow: 0 0 14px rgba(114, 240, 166, 0.7);
            animation: assistantPulse 1.9s ease-in-out infinite;
        }

        .assistant-panel-caption {
            font-size: 0.72rem;
            color: rgba(255, 255, 255, 0.5);
        }

        .assistant-suggestions {
            display: flex;
            gap: 8px;
            padding: 8px 16px 0;
            overflow-x: auto;
            scrollbar-width: none;
        }

        .assistant-suggestions::-webkit-scrollbar {
            display: none;
        }

        .assistant-chip {
            flex: 0 0 auto;
            min-height: 44px;
            padding: 8px 12px;
            border-radius: 999px;
            border: 1px solid rgba(255, 255, 255, 0.08);
            background: rgba(255, 255, 255, 0.04);
            color: rgba(255, 255, 255, 0.86);
            font-size: 0.78rem;
            white-space: nowrap;
            cursor: pointer;
            transition: transform 0.2s var(--ease-smooth), border-color 0.2s var(--ease-smooth), background 0.2s var(--ease-smooth);
        }

        .assistant-chip:hover {
            transform: translateY(-1px);
            border-color: rgba(99, 102, 241, 0.36);
            background: rgba(99, 102, 241, 0.1);
        }

        .assistant-messages {
            flex: 1;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 12px;
            padding: 16px;
            -webkit-overflow-scrolling: touch;
            touch-action: pan-y;
        }

        .assistant-message {
            display: flex;
            flex-direction: column;
            gap: 6px;
            max-width: 88%;
        }

        .assistant-message[data-role="assistant"] {
            align-self: flex-start;
        }

        .assistant-message[data-role="user"] {
            align-self: flex-end;
            align-items: flex-end;
        }

        .assistant-bubble {
            padding: 14px 16px;
            border-radius: 18px;
            font-size: 0.95rem;
            line-height: 1.65;
            white-space: normal;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
        }

        .assistant-plain-text {
            white-space: pre-wrap;
        }

        .assistant-rich-text {
            display: grid;
            gap: 0.72rem;
        }

        .assistant-rich-text>* {
            margin: 0;
        }

        .assistant-rich-text p,
        .assistant-rich-text li,
        .assistant-rich-text blockquote {
            color: inherit;
        }

        .assistant-rich-text h3,
        .assistant-rich-text h4,
        .assistant-rich-text h5 {
            font-family: var(--font-display);
            font-weight: 700;
            letter-spacing: -0.02em;
            line-height: 1.25;
            color: var(--color-text-primary);
        }

        .assistant-rich-text h3 {
            font-size: 1.02rem;
        }

        .assistant-rich-text h4,
        .assistant-rich-text h5 {
            font-size: 0.94rem;
        }

        .assistant-rich-text ul,
        .assistant-rich-text ol {
            display: grid;
            gap: 0.42rem;
            padding-left: 1.2rem;
            margin: 0;
        }

        .assistant-rich-text li::marker {
            color: rgba(200, 208, 255, 0.9);
        }

        .assistant-rich-text strong {
            font-weight: 700;
            color: var(--color-text-primary);
        }

        .assistant-rich-text em {
            font-style: italic;
            color: rgba(255, 255, 255, 0.88);
        }

        .assistant-rich-text a {
            color: rgba(199, 210, 254, 0.96);
            text-decoration: underline;
            text-decoration-thickness: 1px;
            text-underline-offset: 0.16em;
        }

        .assistant-rich-text code {
            display: inline-block;
            padding: 0.08rem 0.42rem;
            border-radius: 8px;
            font-family: var(--font-mono);
            font-size: 0.83em;
            background: rgba(255, 255, 255, 0.08);
            border: 1px solid rgba(255, 255, 255, 0.08);
        }

        .assistant-rich-text pre {
            margin: 0;
            padding: 12px 14px;
            border-radius: var(--radius-sm);
            overflow-x: auto;
            background: rgba(0, 0, 0, 0.22);
            border: 1px solid rgba(255, 255, 255, 0.08);
        }

        .assistant-rich-text pre code {
            display: block;
            padding: 0;
            border: 0;
            background: transparent;
            font-size: 0.81rem;
            line-height: 1.55;
            white-space: pre;
        }

        .assistant-rich-text blockquote {
            padding-left: 0.9rem;
            border-left: 2px solid rgba(99, 102, 241, 0.34);
            color: rgba(255, 255, 255, 0.76);
        }

        .assistant-message[data-role="assistant"] .assistant-bubble {
            background: rgba(255, 255, 255, 0.045);
            border: 1px solid rgba(255, 255, 255, 0.08);
            color: rgba(255, 255, 255, 0.92);
        }

        .assistant-message[data-role="user"] .assistant-bubble {
            background: linear-gradient(135deg, rgba(99, 102, 241, 0.22), rgba(74, 83, 255, 0.14));
            border: 1px solid rgba(99, 102, 241, 0.24);
            color: rgba(255, 255, 255, 0.96);
        }

        .assistant-message-label {
            font-family: var(--font-mono);
            font-size: 0.66rem;
            letter-spacing: 0.12em;
            text-transform: uppercase;
            color: rgba(255, 255, 255, 0.4);
            padding: 0 4px;
        }

        .assistant-sources {
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
            padding: 0 2px;
        }

        .assistant-source-link {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 7px 10px;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.04);
            border: 1px solid rgba(255, 255, 255, 0.08);
            color: rgba(255, 255, 255, 0.8);
            font-size: 0.74rem;
            transition: border-color 0.2s var(--ease-smooth), color 0.2s var(--ease-smooth), transform 0.2s var(--ease-smooth);
        }

        .assistant-source-link:hover {
            border-color: rgba(99, 102, 241, 0.36);
            color: var(--color-text-primary);
            transform: translateY(-1px);
        }

        .assistant-composer {
            padding: 12px 16px 18px;
            border-top: 1px solid rgba(255, 255, 255, 0.08);
            background: linear-gradient(180deg, rgba(7, 9, 15, 0.6), rgba(7, 9, 15, 0.96));
        }

        .assistant-form {
            display: grid;
            gap: 10px;
        }

        .assistant-input-wrap {
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            gap: 10px;
            align-items: end;
            padding: 10px;
            border-radius: var(--radius-sm);
            background: rgba(255, 255, 255, 0.04);
            border: 1px solid rgba(255, 255, 255, 0.08);
            transition: border-color 0.2s var(--ease-smooth), box-shadow 0.2s var(--ease-smooth);
        }

        .assistant-input-wrap:focus-within {
            border-color: rgba(99, 102, 241, 0.34);
            box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.14);
        }

        .assistant-input {
            width: 100%;
            min-height: 46px;
            max-height: 160px;
            resize: none;
            overflow-y: auto;
            border: 0;
            outline: 0;
            background: transparent;
            color: var(--color-text-primary);
            font: inherit;
            line-height: 1.5;
            padding: 4px 2px;
        }

        .assistant-input::placeholder {
            color: rgba(255, 255, 255, 0.42);
        }

        .assistant-send {
            width: 48px;
            height: 48px;
            border-radius: var(--radius-sm);
            border: 1px solid rgba(99, 102, 241, 0.26);
            background: linear-gradient(135deg, rgba(99, 102, 241, 0.24), rgba(99, 102, 241, 0.14));
            color: var(--color-text-primary);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: transform 0.2s var(--ease-smooth), background 0.2s var(--ease-smooth), border-color 0.2s var(--ease-smooth);
        }

        .assistant-send:hover {
            transform: translateY(-1px);
            border-color: rgba(99, 102, 241, 0.42);
            background: linear-gradient(135deg, rgba(99, 102, 241, 0.34), rgba(99, 102, 241, 0.2));
        }

        .assistant-send:disabled,
        .assistant-chip:disabled {
            opacity: 0.5;
            cursor: wait;
            transform: none;
        }

        .assistant-disclaimer {
            font-size: 0.73rem;
            line-height: 1.4;
            color: rgba(255, 255, 255, 0.46);
        }

        .assistant-meta {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            flex-wrap: wrap;
        }

        .assistant-counter {
            min-width: 52px;
            text-align: right;
            transition: color 0.2s ease;
        }

        .assistant-counter[data-state="warning"] {
            color: rgba(255, 213, 128, 0.88);
        }

        .assistant-counter[data-state="limit"] {
            color: rgba(255, 159, 159, 0.94);
        }

        .assistant-resize-handle {
            position: absolute;
            left: 12px;
            top: 12px;
            width: 18px;
            height: 18px;
            border: 0;
            background: transparent;
            padding: 0;
            cursor: nwse-resize;
            opacity: 0.62;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            z-index: 2;
        }

        .assistant-resize-handle::before,
        .assistant-resize-handle::after {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.4);
            transform: rotate(-45deg);
            transform-origin: center;
        }

        .assistant-resize-handle::before {
            width: 12px;
            height: 2px;
            top: 5px;
        }

        .assistant-resize-handle::after {
            width: 18px;
            height: 2px;
            top: 10px;
        }

        body.assistant-resizing,
        body.assistant-resizing * {
            cursor: nwse-resize !important;
            user-select: none !important;
        }

        .assistant-typing {
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

        .assistant-typing span {
            width: 7px;
            height: 7px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.58);
            animation: assistantTyping 0.95s ease-in-out infinite;
        }

        .assistant-typing span:nth-child(2) {
            animation-delay: 0.15s;
        }

        .assistant-typing span:nth-child(3) {
            animation-delay: 0.3s;
        }

        @keyframes assistantTyping {

            0%,
            80%,
            100% {
                transform: translateY(0);
                opacity: 0.4;
            }

            40% {
                transform: translateY(-4px);
                opacity: 1;
            }
        }

        @keyframes assistantPulse {

            0%,
            100% {
                transform: scale(1);
                opacity: 0.8;
            }

            50% {
                transform: scale(1.15);
                opacity: 1;
            }
        }

        @media (max-width: 767px) {
            .project-assistant-shell {
                right: 12px;
                left: 12px;
                bottom: calc(104px + env(safe-area-inset-bottom, 0px));
                align-items: stretch;
            }

            .project-assistant-toggle {
                align-self: flex-end;
                width: 50px;
                min-height: 50px;
                padding: 4px;
                border-radius: 999px;
                justify-content: center;
            }

            .project-assistant-toggle .assistant-toggle-copy {
                display: none;
            }

            .assistant-toggle-orb {
                width: 40px;
                height: 40px;
            }

            .project-assistant-panel {
                width: 100%;
                min-width: 0;
                max-width: none;
                height: min(76vh, 720px);
                min-height: 0;
                max-height: min(82vh, 760px);
                transform-origin: bottom center;
            }

            .assistant-panel-header {
                padding: 16px 16px 12px 40px;
            }

            .assistant-panel-subtitle {
                max-width: none;
            }

            .assistant-suggestions {
                padding: 10px 16px 0;
            }

            .assistant-messages {
                padding: 14px;
            }

            .assistant-composer {
                padding: 12px 16px 16px;
            }

            .assistant-toggle-subtitle {
                display: none;
            }

            .assistant-resize-handle {
                display: none;
            }
        }

        /* --- CAROUSEL OVERLAY PREMIUM STYLES --- */
        .carousel-screenshot-item {
            height: 80vh;
            width: auto;
            min-width: 300px;
            object-fit: contain;
            border-radius: 24px;
            /* Premium rounding */
            box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
            /* Deep premium shadow */
            scroll-snap-align: center;
            opacity: 0;
            transform: scale(0.9);
            transition: opacity 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
            border: 1px solid rgba(255, 255, 255, 0.05);
        }

        .carousel-screenshot-item.visible {
            opacity: 1;
            transform: scale(1);
        }

        .stat-value {
            font-family: var(--font-display);
            font-size: clamp(2.5rem, 5vw, 5rem);
            /* 100% larger font (was var(--text-2xl)) */
            font-weight: 700;
            color: var(--color-accent);
            display: block;
            line-height: 1.2;
        }

        .stat-item span:last-child {
            font-size: clamp(0.875rem, 1.5vw, 1.125rem) !important;
            /* 100% larger label text */
            margin-top: var(--space-2);
        }

        /* NEW SKILLS SECTION STYLES */
        .skills-container {
            display: flex;
            flex-direction: column;
            gap: var(--space-4);
            overflow: hidden;
            width: 100%;
            padding: var(--space-8) 0;
            /* Mask for fading edges */
            mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
            -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
        }

        .skill-row {
            display: flex;
            width: max-content;
            /* Critical for marquee to work */
            gap: var(--space-8);
            /* Increased gap for better readability */
        }

        /* Animation Classes */
        .scroll-left {
            animation: scroll-left 40s linear infinite;
        }

        .scroll-right {
            animation: scroll-right 40s linear infinite;
        }

        .skill-item {
            font-family: var(--font-display);
            font-size: clamp(2rem, 5vw, 4rem);
            font-weight: 800;
            line-height: 1.25;
            white-space: nowrap;
            cursor: pointer;
            transition: all 0.3s ease;

            /* Outline Style (Default) */
            color: transparent;
            -webkit-text-stroke: 2px rgba(255, 255, 255, 0.7);
        }

        .skill-item:hover {
            /* Solid Style (Hover) */
            color: var(--color-text-primary);
            -webkit-text-stroke: 0px transparent;
            text-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
            transform: scale(1.05);
            z-index: 10;
        }

        /* Pauses animation on hover anywhere in the row */
        .skill-row:hover {
            animation-play-state: paused;
        }

        @keyframes scroll-left {
            0% {
                transform: translateX(0);
            }

            100% {
                transform: translateX(-50%);
            }
        }

        @keyframes scroll-right {
            0% {
                transform: translateX(-50%);
            }

            100% {
                transform: translateX(0);
            }
        }

        @keyframes float {

            0%,
            100% {
                transform: translate(0, 0);
            }

            50% {
                transform: translate(-20px, 20px);
            }
        }

        /* --- Sticky Projects Layout --- */
        .projects-wrapper {
            display: flex;
            flex-direction: column;
            position: relative;
            overflow: visible;
            /* Ensure sticky positioning works */
        }

        @media (min-width: 768px) {
            .projects-wrapper {
                flex-direction: row;
                align-items: flex-start;
            }

            .projects-sticky-visuals {
                width: 50%;
                height: 100vh;
                position: sticky;
                top: 0;
                display: flex;
                align-items: center;
                justify-content: center;
            }

            .projects-scroll-content {
                width: 50%;
            }
        }

        /* Visuals Container */
        .visual-stack {
            position: relative;
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        /* --- 3D Carousel System (Centered Physics) --- */
        .project-3d-scene {
            width: clamp(240px, 22vw, 330px);
            height: clamp(240px, 22vw, 330px);
            perspective: 1000px;
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            /* Ensure scene itself is centered in the sticky container */
            margin: auto;
        }

        .project-3d-scene::before {
            content: '';
            position: absolute;
            inset: -28%;
            border-radius: 38%;
            background:
                radial-gradient(circle, rgba(var(--scene-accent), 0.24), transparent 62%),
                conic-gradient(from 120deg, transparent, rgba(var(--scene-secondary), 0.22), transparent 54%);
            filter: blur(26px);
            opacity: 0.7;
            transform: translateZ(-1px);
        }

        .project-3d-card {
            width: 100%;
            height: 100%;
            position: absolute;
            transform-style: preserve-3d;
            /* FIX: Pivot exactly in the center of the div */
            transform-origin: center center;
            will-change: transform;
        }

        .project-face {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            backface-visibility: hidden;

            /* Smooth transitions */
            transition: opacity 0.5s, filter 0.5s;
        }

        /* Active State */
        .project-face.active-face {
            opacity: 1;
            filter: grayscale(0%);
            z-index: 10;
        }

        /* Inactive State */
        .project-face:not(.active-face) {
            opacity: 0.3;
            filter: grayscale(100%) blur(3px);
            z-index: 0;
            pointer-events: none; /* prevent inactive faces from absorbing mouse events meant for the active face */
        }

        /* --- GEOMETRY (Tight Square) --- */
        .face-front {
            transform: rotateY(0deg) translateZ(clamp(130px, 12vw, 180px));
        }

        .face-right {
            transform: rotateY(90deg) translateZ(clamp(130px, 12vw, 180px));
        }

        .face-back {
            transform: rotateY(180deg) translateZ(clamp(130px, 12vw, 180px));
        }

        .face-left {
            transform: rotateY(270deg) translateZ(clamp(130px, 12vw, 180px));
        }

        .project-3d-card[data-face-count="5"] .project-face:nth-child(1) {
            transform: rotateY(0deg) translateZ(clamp(130px, 12vw, 180px));
        }

        .project-3d-card[data-face-count="5"] .project-face:nth-child(2) {
            transform: rotateY(72deg) translateZ(clamp(130px, 12vw, 180px));
        }

        .project-3d-card[data-face-count="5"] .project-face:nth-child(3) {
            transform: rotateY(144deg) translateZ(clamp(130px, 12vw, 180px));
        }

        .project-3d-card[data-face-count="5"] .project-face:nth-child(4) {
            transform: rotateY(216deg) translateZ(clamp(130px, 12vw, 180px));
        }

        .project-3d-card[data-face-count="5"] .project-face:nth-child(5) {
            transform: rotateY(288deg) translateZ(clamp(130px, 12vw, 180px));
        }

        .project-face img {
            width: 80%;
            height: 80%;
            object-fit: contain;
            border-radius: 22.5%;
            /* Professional Squircle-like radius */
            transform: translateZ(20px);
            /* Pop out slightly */
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
        }

        .project-icon-link {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 80%;
            height: 80%;
            transform: translateZ(20px);
            text-decoration: none;
            border-radius: 22.5%;
            overflow: hidden;
            pointer-events: auto;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
        }

        .project-icon-link img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: inherit;
            transform: none;
        }

        /* Lighting Effect (Shared) */
        .project-face .circleLight {
            position: absolute;
            top: 10%;
            left: 10%;
            width: 80%;
            height: 80%;
            opacity: 0;
            border-radius: 22.5%;
            background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
                    rgba(255, 255, 255, 0.15),
                    transparent 40%);
            transition: opacity 0.5s;
            pointer-events: none;
            z-index: 1;
            mix-blend-mode: overlay;
        }

        .project-face:hover .circleLight,
        .project-face.active-face .circleLight {
            opacity: 1;
        }

        /* =========================================
           REFINED PROJECT SECTION
           ========================================= */
        .project-text-block {
            min-height: 80vh;
            display: flex;
            flex-direction: column;
            justify-content: center;
            padding: var(--space-8);
            background: transparent;
            border: none;
            margin-bottom: 10vh;
            position: relative;
            isolation: isolate;
            opacity: 0.72;
            transform: translateY(8px) scale(0.997);
            transition:
                opacity 0.4s var(--ease-smooth),
                transform 0.4s var(--ease-smooth),
                filter 0.4s var(--ease-smooth);
            filter: saturate(0.9);
        }

        .project-text-block::after {
            content: '';
            position: absolute;
            top: 12%;
            bottom: 12%;
            left: 0;
            width: 2px;
            border-radius: var(--radius-full);
            background: linear-gradient(180deg, transparent, rgba(var(--scene-accent), 0.85), transparent);
            opacity: 0;
            transition: opacity 0.4s var(--ease-smooth);
        }

        .project-text-block.is-active {
            opacity: 1;
            transform: translateY(0) scale(1);
            filter: saturate(1);
        }

        .project-text-block.is-active::after {
            opacity: 1;
        }

        /* Project bullet list */
        .project-bullets {
            list-style: none;
            padding: 0;
            margin: 0;
        }

        .project-bullets li {
            position: relative;
            padding-left: 1.2em;
            line-height: 1.6;
            color: var(--color-text-secondary);
            font-size: 0.9375rem;
        }

        .project-bullets li + li {
            margin-top: 0.55em;
        }

        .project-bullets li::before {
            content: '';
            position: absolute;
            left: 0;
            top: 0.6em;
            width: 5px;
            height: 5px;
            border-radius: 50%;
            background: rgba(var(--scene-accent), 0.7);
        }

        /* Letter Animation Class */
        .char-span {
            display: inline-block;
            opacity: 0;
            transform: translateY(15px);
            will-change: opacity, transform;
            transition: opacity 0.3s ease, transform 0.3s ease;
        }

        /* Project description text - no animation, always visible */
        .project-text-block .char-span {
            opacity: 1 !important;
            transform: translateY(0) !important;
            transition: none !important;
            /* Disable any transitions that might interfere */
        }

        /* Ensure anim-text inside project-text-block is always visible */
        .project-text-block .anim-text .char-span {
            opacity: 1 !important;
            transform: translateY(0) !important;
            transition: none !important;
        }

        /* --- Decryption Animation Classes --- */
        .scramble-text {
            opacity: 0;
            /* Hidden initially */
            position: relative;
            will-change: opacity, transform;
        }

        .scramble-char {
            display: inline;
            /* Flows as standard text */
            white-space: pre-wrap;
            /* Allows spaces to wrap naturally */
            color: var(--color-accent);
            /* Start with accent color */
            transition: color 0.5s ease;
        }

        .scramble-char.resolved {
            color: var(--color-text-secondary);
            /* Fade to normal text color */
        }

        /* CONTACT */
        .contact-form input,
        .contact-form textarea {
            width: 100%;
            background: transparent;
            border: none;
            border-bottom: 1px solid var(--color-border);
            padding: var(--space-4) 0;
            color: var(--color-text-primary);
            font-family: var(--font-sans);
            font-size: var(--text-base);
            transition: border-color 0.2s;
            border-radius: 0;
            /* Reset for iOS */
        }

        .contact-form input:focus,
        .contact-form textarea:focus {
            outline: none;
            border-bottom-color: var(--color-accent);
        }

        /* =========================================
         6. REDUCED MOTION
         ========================================= 
        */
        @media (prefers-reduced-motion: reduce) {

            *,
            *::before,
            *::after {
                animation-duration: 0.01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.01ms !important;
                scroll-behavior: auto !important;
            }

            .cursor-dot,
            .cursor-outline {
                display: none;
            }

            body {
                cursor: auto;
            }

            .lenis.lenis-smooth {
                scroll-behavior: auto !important;
            }

            #three-foreground,
            #vanta-bg {
                display: none;
            }

            /* Hide animations */
        }

        /* --- 2048 Portal Button Effect --- */
        .portal-btn {
            position: relative;
            width: 70px;
            height: 70px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.8rem;
            color: #eab308;
            /* Gold Text */

            /* Base Structure */
            border: 2px solid rgba(234, 179, 8, 0.3);
            box-shadow:
                inset 0 10px 15px -5px rgba(0, 0, 0, 0.8),
                inset 0 -5px 10px 3px rgba(234, 179, 8, 0.1),
                0 0 15px rgba(234, 179, 8, 0.1);

            /* The Organic Texture (Adapted from 'Blobbs') */
            background-color: #1a1500;
            /* Dark Gold Background */
            background-size: 30px 30px;
            background-image:
                repeating-radial-gradient(hsla(45, 100%, 50%, .6) 0px, hsla(45, 100%, 50%, .2) 2px, hsla(45, 100%, 50%, 0) 20px),
                repeating-radial-gradient(hsla(45, 100%, 80%, 0) 0px, hsla(45, 100%, 50%, .1) 2px, hsla(45, 100%, 80%, 0) 6px);

            transition: transform 0.3s cubic-bezier(.32, 0, .15, 1), border-color 0.3s, color 0.3s;
        }

        /* Hover State Triggered by the Card */
        .game-home-card:hover .portal-btn {
            cursor: none;
            transform: scale(1.1);
            border-color: #eab308;
            color: #fff;
            box-shadow:
                inset 0 5px 15px rgba(0, 0, 0, 0.5),
                0 0 30px rgba(234, 179, 8, 0.4);

            /* Activate Animation */
            animation: portal-move 4s linear infinite, portal-pulse 2s ease-in-out infinite alternate;
        }

        @keyframes portal-move {
            0% {
                background-position: 0 0, 0 0;
            }

            100% {
                background-position: 60px 60px, 60px 60px;
            }
        }

        @keyframes portal-pulse {
            from {
                background-size: 30px 30px, 30px 30px;
            }

            to {
                background-size: 45px 45px, 35px 35px;
            }
        }

        /* --- Dynamic Card Lighting --- */
        .game-home-card {
            position: relative;
            overflow: hidden;
            /* Keeps the light inside the borders */
            transition: box-shadow 0.3s ease, border-color 0.3s;
            transform-style: preserve-3d;
            will-change: transform;
        }

        #tilt-card {
            transform-style: preserve-3d;
            will-change: transform;
        }

        .game-home-card:hover {
            /* Glow effect on hover */
            box-shadow: 0 0 40px rgba(234, 179, 8, 0.15);
            border-color: rgba(234, 179, 8, 0.5) !important;
        }

        .circleLight {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            opacity: 0;
            border-radius: inherit;
            /* Follows card radius */
            background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
                    rgba(255, 255, 255, 0.15),
                    transparent 40%);
            transition: opacity 0.5s;
            pointer-events: none;
            /* Allows clicking through the light */
            z-index: 1;
            mix-blend-mode: overlay;
            /* Blends light with the dark background */
        }

        .game-home-card:hover .circleLight {
            opacity: 1;
        }

        /* --- Photo Hover Zoom (Legacy - kept for compatibility) --- */
        .photo-card-home {
            overflow: hidden;
        }

        .photo-card-home img {
            transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        }

        .photo-card-home:hover img {
            transform: scale(1.1);
        }

        /* =========================================
           NEW SPATIAL PHOTOGRAPHY LAYOUT (Accordion)
           ========================================= */
        .photo-gallery-grid {
            display: flex;
            width: 100%;
            height: 600px;
            /* Fixed height for the accordion */
            gap: var(--space-2);
            overflow: hidden;
        }

        .photo-panel {
            position: relative;
            flex: 1;
            /* All start equal */
            height: 100%;
            border-radius: var(--radius-md);
            overflow: hidden;
            cursor: pointer;
            transition: flex 0.7s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.5s;
            opacity: 0.7;
            filter: grayscale(80%);
        }

        .photo-panel img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.7s, opacity 1.5s ease-in-out;
            opacity: 1;
        }

        /* Active/Hover State */
        .photo-panel:hover {
            flex: 3;
            /* Grow significantly */
            opacity: 1;
            filter: grayscale(0%);
            z-index: 2;
        }

        .photo-panel:hover img {
            transform: scale(1.05);
        }

        .photo-info {
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            padding: var(--space-6);
            background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
            opacity: 0;
            transform: translateY(20px);
            transition: all 0.5s ease 0.1s;
        }

        .photo-panel:hover .photo-info {
            opacity: 1;
            transform: translateY(0);
        }

        /* --- NEURAL BOOT SEQUENCE LOADER STYLES --- */
        html.loader-skip #neural-loader {
            display: none !important;
        }

        html.loader-active,
        html.loader-active body {
            overflow: hidden !important;
            height: 100%;
            overscroll-behavior: none;
        }

        #neural-loader {
            position: fixed;
            inset: 0;
            z-index: 99999;
            display: flex;
            align-items: center;
            justify-content: center;
            background: transparent;
            /* Transparent because shutters handle the color */
            pointer-events: auto;
            touch-action: none;
            overscroll-behavior: none;
        }

        /* The Shutters (Background) */
        .shutter {
            position: absolute;
            left: 0;
            width: 100%;
            height: 50%;
            background-color: var(--color-bg-deep);
            /* #09090b */
            z-index: -1;
        }

        .shutter-top {
            top: 0;
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        }

        .shutter-bottom {
            bottom: 0;
            border-top: 1px solid rgba(255, 255, 255, 0.05);
        }

        .loader-container {
            position: relative;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 1rem;
            z-index: 2;
            mix-blend-mode: exclusion;
            pointer-events: none;
            /* Cool visual effect */
        }

        .project-mobile-icon-link {
            display: inline-block;
            border-radius: 22.5%;
            overflow: hidden;
            width: 120px;
            height: 120px;
            line-height: 0;
            pointer-events: auto;
        }

        .project-mobile-icon-link .mobile-project-img {
            margin-bottom: 0;
        }

        /* The Ring */
        .loader-ring {
            width: 80px;
            height: 80px;
            border: 2px solid rgba(255, 255, 255, 0.1);
            border-top-color: var(--color-accent);
            border-radius: 50%;
            animation: spin-loader 1s linear infinite;
            box-shadow: 0 0 30px var(--color-accent-glow);
        }

        /* The Percent */
        .loader-percent {
            font-family: var(--font-mono);
            font-size: 4rem;
            font-weight: 700;
            color: var(--color-text-primary);
            line-height: 1;
            letter-spacing: -2px;
        }

        /* The System Log */
        .sys-log {
            font-family: var(--font-mono);
            font-size: 0.8rem;
            color: var(--color-text-secondary);
            text-transform: uppercase;
            letter-spacing: 1px;
            min-height: 1.5em;
            /* Prevent jumping */
        }

        @keyframes spin-loader {
            to {
                transform: rotate(360deg);
            }
        }

        /* =========================================
           7. MOBILE RESPONSIVENESS OVERRIDES
           ========================================= 
        */
        /* Default state for mobile images on Desktop (Hidden) */
        .mobile-project-img {
            display: none;
        }

        /* =========================================
           7. MOBILE RESPONSIVENESS & OPTIMIZATION
           (Consolidated: Scaling + 60fps Refactor)
           ========================================= 
        */
        @media (max-width: 768px) {

            /* --- 1. Typography & Global Scaling --- */
            :root {
                --text-display: 3rem;
                --text-2xl: 1.75rem;
                --mobile-fixed-ui-clearance: 180px;
            }

            * {
                max-width: 100%;
            }

            .container {
                padding: 0 var(--space-4);
            }

            section {
                padding: var(--space-12) 0;
                position: relative;
                z-index: 2;
                /* Forces all content sections above the background canvas */
            }

            #about,
            #projects,
            #engineering,
            #photography,
            #contact {
                padding-bottom: var(--mobile-fixed-ui-clearance);
            }

            /* Section Header Mobile Overrides */
            .section-header {
                flex-direction: column;
                /* Force vertical stacking */
                align-items: flex-start;
                /* Align everything to the left */
                gap: var(--space-8);
                /* Increased to 32px for breathing room */
                margin-bottom: var(--space-12);
                /* Add more space below the whole header */
            }

            /* Make the CTA button full-width for easier thumb reach */
            .section-header .btn {
                width: 100%;
                justify-content: center;
                margin-top: var(--space-2);
            }

            /* Ensure the pill tag doesn't get squashed */
            .section-header .pill {
                margin-bottom: var(--space-2);
                display: inline-block;
            }

            /* --- 2. Navigation (Horizontal Scroll Snap) --- */
            .nav-wrapper {
                /* Ensure it floats slightly higher on mobile */
                bottom: calc(24px + env(safe-area-inset-bottom, 0px));
                width: calc(100% - 20px);
                max-width: 400px;
                z-index: 1000;
                /* Ensure it's above everything else */
            }

            .nav-wrapper.nav-compact {
                transform: translateX(-50%) translateY(calc(100% - 24px));
                opacity: 0.72;
            }

            .nav-dock {
                /* Disable heavy blur on mobile for 60fps scrolling */
                backdrop-filter: none;
                -webkit-backdrop-filter: none;
                /* Use a darker, more opaque background instead */
                background: rgba(10, 10, 12, 0.95);
                border: 1px solid rgba(255, 255, 255, 0.15);
                box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.5);

                /* Center the items if they fit, otherwise scroll */
                justify-content: flex-start;
                overflow-x: auto;
                scroll-snap-type: x mandatory;
                padding: 8px;
                gap: 4px;
                -webkit-overflow-scrolling: touch;
                scrollbar-width: none;
                /* Firefox */
                -ms-overflow-style: none;
                width: 100%;
            }

            .nav-dock::-webkit-scrollbar {
                display: none;
            }

            .nav-logo {
                display: none;
            }

            .nav-link {
                /* Larger hit area */
                padding: 9px 10px;
                background: transparent;
                /* Remove the boxy background */
                border: none;
                flex-shrink: 0;
                scroll-snap-align: center;
                font-size: 13px;
                white-space: nowrap;
                /* Prevents text wrapping */
            }

            .nav-link.active {
                background: rgba(255, 255, 255, 0.1);
                color: white;
            }

            /* --- 3. Hero Section --- */
            .hero {
                min-height: auto;
                height: auto;
                padding-top: 120px;
                padding-bottom: 60px;
                align-items: flex-start;
                /* Fallback background for mobile */
                background: radial-gradient(circle at 50% 50%, #1e1b4b 0%, #050507 100%);
            }

            .hero-content {
                padding-bottom: 60px;
            }

            h1.hero-title {
                font-size: 2.5rem;
                word-break: keep-all;
                /* Keep words together */
                overflow-wrap: normal;
                /* Prevent word breaking */
                opacity: 1;
                /* Force visible */
                transform: none;
            }

            /* Prevent Layout Shift: Set minimum height for typing container */
            #hero-title-typed {
                min-height: 1.2em;
                /* Reserves space for one line of text */
            }

            /* Hero buttons: Full width and stacked */
            .hero-content .btn {
                width: 100%;
                /* Full width buttons */
                margin-bottom: 10px;
                /* Space between stacked buttons */
            }

            /* Fix button container flex layout */
            .hero-content>div:last-child {
                flex-direction: column;
                /* Stack buttons vertically */
                width: 100%;
            }

            /* Hide 3D Tilt Card on Mobile */
            #tilt-card {
                display: none !important;
            }

            /* --- 4. Projects Section (Linear Layout) --- */
            .projects-wrapper {
                flex-direction: column;
            }

            .projects-sticky-visuals {
                display: none !important;
            }

            .projects-scroll-content {
                width: 100%;
            }

            .project-text-block {
                min-height: auto !important;
                padding: 24px 0 34px;
                margin-bottom: 44px;
                background: transparent;
                border-top: none;
                opacity: 1;
                transform: none;
                filter: none;
            }

            .project-text-block::before {
                margin-bottom: 18px;
                font-size: 0.68rem;
            }

            .project-text-block::after {
                display: none;
            }

            .engineering-layout {
                gap: 24px;
                padding-bottom: 35vh;
            }

            /* Center align the timeline on mobile */
            .engineering-layout::before {
                left: 50%;
                transform: translateX(-50%);
            }

            .engineering-card {
                padding: var(--space-4);
                gap: 16px;
                margin-left: 0; /* Reset margins on mobile */
            }

            /* Hide horizontal connector lines and dots on mobile */
            .engineering-card::before,
            .engineering-card::after {
                display: none !important;
            }

            .engineering-card:nth-child(1) { top: 80px; }
            .engineering-card:nth-child(2) { top: 100px; }
            .engineering-card:nth-child(3) { top: 120px; }

            .engineering-card h3 {
                max-width: none;
                font-size: clamp(1.7rem, 7vw, 2.3rem);
            }

            .engineering-evidence {
                grid-template-columns: 1fr;
            }

            .engineering-footer,
            .engineering-case-study {
                align-items: flex-start;
                flex-direction: column;
            }

            .engineering-case-study {
                position: sticky !important;
                top: 140px;
                z-index: 4;
            }

            .proof-matrix {
                padding: 18px;
                border-radius: 22px;
                position: sticky !important;
                top: 160px;
                z-index: 5;
            }

            .proof-matrix-header {
                grid-template-columns: 1fr;
                gap: 12px;
            }

            .proof-filter-group {
                display: grid;
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }

            .proof-filter {
                width: 100%;
            }

            .proof-row {
                grid-template-columns: 1fr;
                gap: 12px;
            }

            .proof-row[data-active="true"] {
                transform: none;
            }

            .proof-tags {
                justify-content: flex-start;
            }

            .mobile-project-img {
                display: block !important;
                border-radius: 22.5%;
                width: 120px;
                /* Standardize icon size on mobile */
                height: 120px;
                margin-left: 0;
                margin-right: auto;
                margin-bottom: 20px;
                border: 1px solid rgba(255, 255, 255, 0.1);
                background: #1a1a1a;
                /* Placeholder color while loading */
            }

            /* --- 5. Photography (Vertical Stack - No Accordion) --- */
            .photo-gallery-grid {
                flex-direction: column;
                height: auto !important;
                gap: 16px;
            }

            .photo-panel {
                width: 100%;
                height: 300px;
                flex: none !important;
                filter: grayscale(0%) !important;
                opacity: 1 !important;
                margin-bottom: 12px;
            }

            .photo-panel:hover {
                flex: none;
            }

            .photo-info {
                opacity: 1 !important;
                transform: translateY(0) !important;
                background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
            }

            /* Legacy Photo Strip Support */
            .photo-strip-wrapper {
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
            }

            #photography .container {
                flex-direction: column;
                align-items: flex-start !important;
            }

            #photography .btn {
                width: 100%;
            }

            /* --- 6. Stats & Skills --- */
            .stats-wrapper {
                margin-top: var(--space-8);
                width: 100%;
            }

            .stat-grid {
                /* Switch from 3 columns to 1 column for readability */
                display: grid;
                grid-template-columns: 1fr;
                gap: 12px;
                width: 100%;
            }

            .stat-item {
                /* Horizontal layout for stats on mobile looks more premium */
                flex-direction: row;
                justify-content: space-between;
                align-items: center;
                padding: 20px 24px;
                min-height: auto;
                /* Remove the large fixed height */
                text-align: left;
            }

            .stat-value {
                font-size: 2rem;
                /* Slightly smaller for mobile */
                order: 2;
                /* Put number on the right */
            }

            .stat-item span:last-child {
                font-size: 1rem !important;
                margin-top: 0;
                color: var(--color-text-secondary);
                font-weight: 500;
                order: 1;
                /* Put label on the left */
            }

            .skills-container {
                /* Tighter padding */
                padding: 40px 0;
                /* Sharper mask for small screens */
                mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
                -webkit-mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
            }

            .skill-item {
                /* Smaller, cleaner font for mobile */
                font-size: 2rem;
                -webkit-text-stroke: 1px rgba(255, 255, 255, 0.5);
                /* Thinner stroke */
            }

            /* Force hardware acceleration to prevent stutter */
            .skill-row {
                will-change: transform;
                transform: translateZ(0);
            }

            /* --- 7. Contact & UI Elements --- */
            .contact-form {
                margin-top: var(--space-8) !important;
            }

            /* Inputs: Prevent iOS zoom */
            .contact-form input,
            .contact-form textarea {
                font-size: 16px !important;
                /* Prevents iOS Zoom */
                padding: 20px 0;
                /* Larger tap area */
                border-radius: 0;
                /* Removes default iOS rounded corners */
                -webkit-appearance: none;
                /* Removes iOS default inner shadows */
                appearance: none;
                /* Standard property for compatibility */
            }

            /* Buttons: Full width for easy tapping */
            .btn {
                width: 100%;
                padding: 16px 0;
                justify-content: center;
                font-size: clamp(0.875rem, 2vw, 0.9rem);
            }

            .btn+.btn {
                margin-top: var(--space-2);
            }

            /* Mobile override for the large button */
            .btn-lg {
                width: 100%;
                /* Full width on phone */
                padding: 20px 0;
                /* Tall tap target */
                font-size: 1rem;
            }

            /* Pills */
            .pill {
                padding: 6px 12px;
                min-height: 28px;
            }

            /* Cards: Mobile Optimization */
            .card {
                padding: var(--space-4);
                margin-bottom: var(--space-4);
            }

            .card:hover {
                transform: none;
                /* Disable hover transform on mobile */
            }

            /* --- 8. Text Readability --- */
            .section-title {
                font-size: clamp(2rem, 5vw, 2.5rem) !important;
                line-height: 1.2;
                word-break: keep-all;
                /* Keep words together */
                overflow-wrap: normal;
                /* Prevent word breaking */
            }

            p,
            .particle-text-block {
                font-size: clamp(0.9rem, 2.5vw, 1rem);
                line-height: 1.7;
            }

            .scramble-static,
            .scramble-static * {
                opacity: 1 !important;
                transform: none !important;
            }

            .scramble-char {
                color: inherit !important;
                text-shadow: none !important;
                width: auto !important;
                display: inline !important;
            }

            /* --- 9. Disable Desktop-Only Interactions --- */
            .cursor-dot,
            .cursor-outline {
                display: none !important;
            }

            body {
                cursor: auto;
            }



            /* --- HERO SPECIFIC OVERLAY --- */
            .hero-specific-overlay {
                position: absolute;
                inset: 0;
                z-index: -1;
                pointer-events: none;
                /* 1. Deep Atmosphere Gradient */
                background:
                    radial-gradient(circle at 70% 30%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
                    radial-gradient(circle at 20% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 50%);
            }

            /* Removed decorative Tech Grid overlay */

            /* --- 10. Footer Spacing (Account for Nav Dock) --- */
            footer {
                padding-bottom: calc(var(--mobile-fixed-ui-clearance) + 56px) !important;
                /* Push content up so nav dock doesn't cover copyright */
            }
        }

/* =========================================
   PROJECT PREVIEW TOOLTIP (Hover Screenshots)
   - Shown on desktop hover over app icons
   ========================================= */
#project-preview-tooltip {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9000;
    pointer-events: none;
    display: flex;
    flex-direction: row;
    gap: 8px;
    padding: 12px;
    background: rgba(10, 10, 15, 0.75);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    /* GSAP controls autoAlpha (opacity + visibility) */
    opacity: 0;
    visibility: hidden;
    /* Prevent tooltip from going off screen at page origin */
    transform-origin: top left;
}

.preview-tooltip-item {
    width: 90px;
    height: 165px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: block;
    flex-shrink: 0;
    /* Subtle entrance opacity — GSAP adds .visible class */
    opacity: 1;
    transition: opacity 0.2s ease;
}

/* Only show the tooltip on true hover-capable devices */
@media (hover: none) {
    #project-preview-tooltip {
        display: none !important;
    }
}

/* =========================================
   8. NEW COMPONENTS (AUDIT ADDITIONS)
   ========================================= */

/* --- Hero App Showcase Card --- */
.app-showcase-card {
    border-radius: var(--radius-md) !important;
}

.app-showcase-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.app-showcase-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-4);
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.03);
    text-decoration: none;
    transition: border-color 0.2s var(--ease-smooth), background 0.2s var(--ease-smooth), transform 0.2s var(--ease-smooth);
    cursor: pointer;
}

.app-showcase-item:hover {
    border-color: var(--color-border-hover);
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-2px);
}

.app-showcase-item img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 14px; /* iOS squircle */
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.app-showcase-item span {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--color-text-secondary);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.app-showcase-item:hover span {
    color: var(--color-text-primary);
}

/* --- Contact Form Labels --- */
.form-label {
    display: block;
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-2);
}

/* --- Contact Social Touch Targets --- */
.contact-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    border-radius: var(--radius-sm);
    transition: color 0.2s var(--ease-smooth);
}

.contact-social-link:hover {
    color: var(--color-accent) !important;
}

/* --- Active Project Title Accent --- */
.project-text-block.is-active h3 {
    color: var(--color-accent);
}

/* --- Mobile Project Block: Less suppression on mobile --- */
@media (max-width: 767px) {
    .project-text-block {
        opacity: 0.92 !important;
        transform: none !important;
        filter: none !important;
    }
}

/* --- Engineering Case Study: No glass override --- */
.engineering-case-study.liquid-glass {
    /* Override liquid-glass for case study — simpler divider style */
    background: rgba(255, 255, 255, 0.02) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
    border-top: 1px solid var(--color-border) !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
    border-radius: 0 !important;
    margin-top: var(--space-8);
}

/* --- Skills Reduced Motion Fallback --- */
@media (prefers-reduced-motion: reduce) {
    .skill-row {
        animation: none !important;
        overflow-x: auto;
        width: 100%;
    }

    .skill-item {
        color: var(--color-text-secondary);
        -webkit-text-stroke: 0;
    }
}
