        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        :root {
            --bg-primary: #050506;
            --bg-secondary: #0a0a0c;
            --bg-elevated: #111114;
            --text-primary: #f0f0ee;
            --text-secondary: #7a7a78;
            --text-dim: #4a4a48;
            --accent: #c8ff00;
            --accent-secondary: #00d4ff;
            --accent-tertiary: #ff6b35;
            --border: rgba(255,255,255,0.06);
            --glow: rgba(200, 255, 0, 0.15);
        }
        
        html {
            font-size: 16px;
        }
        
        body {
            font-family: 'Space Grotesk', sans-serif;
            background: var(--bg-primary);
            color: var(--text-primary);
            overflow-x: hidden;
            cursor: none;
            -webkit-text-size-adjust: 100%;
        }

        /* Restore default cursor on touch devices */
        @media (hover: none) and (pointer: coarse) {
            body { cursor: auto; }
        }
        
        /* Custom cursor */
        .cursor {
            position: fixed;
            width: 20px;
            height: 20px;
            border: 1px solid var(--accent);
            border-radius: 50%;
            pointer-events: none;
            z-index: 10000;
            transition: transform 0.15s ease, opacity 0.15s ease;
            mix-blend-mode: exclusion;
        }
        
        .cursor-dot {
            position: fixed;
            width: 4px;
            height: 4px;
            background: var(--accent);
            border-radius: 50%;
            pointer-events: none;
            z-index: 10001;
        }
        
        .cursor.hover {
            transform: scale(2.5);
            background: rgba(200, 255, 0, 0.1);
        }
        
        /* Grain overlay */
        .grain {
            position: fixed;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
            opacity: 0.035;
            pointer-events: none;
            z-index: 9998;
            animation: grain 8s steps(10) infinite;
        }

        @keyframes grain {
            0%, 100% { transform: translate(0, 0); }
            10% { transform: translate(-2%, -3%); }
            20% { transform: translate(-4%, 2%); }
            30% { transform: translate(3%, -5%); }
            40% { transform: translate(-2%, 4%); }
            50% { transform: translate(-5%, 3%); }
            60% { transform: translate(4%, -1%); }
            70% { transform: translate(1%, 5%); }
            80% { transform: translate(2%, -3%); }
            90% { transform: translate(-3%, 2%); }
        }
        
        /* Scanlines */
        .scanlines {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: repeating-linear-gradient(
                0deg,
                rgba(0, 0, 0, 0.03),
                rgba(0, 0, 0, 0.03) 1px,
                transparent 1px,
                transparent 2px
            );
            pointer-events: none;
            z-index: 9997;
        }
        
        /* Navigation */
        nav {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            z-index: 1000;
            padding: max(2rem, env(safe-area-inset-top)) max(3rem, env(safe-area-inset-right)) 2rem max(3rem, env(safe-area-inset-left));
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        /* Hamburger button — hidden on desktop */
        .hamburger {
            display: none;
            flex-direction: column;
            gap: 5px;
            background: none;
            border: none;
            cursor: pointer;
            padding: 0.5rem;
            z-index: 1001;
        }

        .hamburger span {
            display: block;
            width: 24px;
            height: 2px;
            background: var(--text-primary);
            transition: all 0.3s ease;
        }

        .hamburger.active span:nth-child(1) {
            transform: rotate(45deg) translate(5px, 5px);
        }
        .hamburger.active span:nth-child(2) {
            opacity: 0;
        }
        .hamburger.active span:nth-child(3) {
            transform: rotate(-45deg) translate(5px, -5px);
        }
        
        .logo {
            font-family: 'Instrument Serif', serif;
            font-size: 1.8rem;
            font-style: italic;
            letter-spacing: -0.03em;
            position: relative;
        }
        
        .logo::after {
            content: '';
            position: absolute;
            bottom: -4px;
            left: 0;
            width: 100%;
            height: 1px;
            background: var(--accent);
            transform: scaleX(0);
            transform-origin: right;
            transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        }
        
        .logo:hover::after {
            transform: scaleX(1);
            transform-origin: left;
        }
        
        .nav-links {
            display: flex;
            gap: 3rem;
            list-style: none;
        }
        
        .nav-links a {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.7rem;
            font-weight: 400;
            color: var(--text-primary);
            text-decoration: none;
            text-transform: uppercase;
            letter-spacing: 0.2em;
            opacity: 0.6;
            transition: all 0.3s ease;
            position: relative;
        }
        
        .nav-links a::before {
            content: attr(data-index);
            position: absolute;
            left: -1.5em;
            font-size: 0.6em;
            opacity: 0;
            color: var(--accent);
            transition: opacity 0.3s ease;
        }
        
        .nav-links a:hover {
            opacity: 1;
            color: var(--accent);
        }
        
        .nav-links a:hover::before {
            opacity: 1;
        }
        
        /* Progress indicator */
        .scroll-progress {
            position: fixed;
            top: 0;
            left: 0;
            height: 2px;
            background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
            width: 0%;
            z-index: 1001;
            transition: width 0.1s ease;
        }
        
        /* Section indicator */
        .section-indicator {
            position: fixed;
            right: 3rem;
            top: 50%;
            transform: translateY(-50%);
            z-index: 100;
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
        }
        
        .section-dot {
            width: 8px;
            height: 8px;
            border: 1px solid var(--text-dim);
            border-radius: 50%;
            cursor: pointer;
            transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
            position: relative;
        }
        
        .section-dot::after {
            content: attr(data-label);
            position: absolute;
            right: 20px;
            top: 50%;
            transform: translateY(-50%);
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.6rem;
            color: var(--text-dim);
            text-transform: uppercase;
            letter-spacing: 0.1em;
            white-space: nowrap;
            opacity: 0;
            transition: opacity 0.3s ease;
        }
        
        .section-dot:hover::after {
            opacity: 1;
        }
        
        .section-dot.active {
            background: var(--accent);
            border-color: var(--accent);
            transform: scale(1.5);
        }
        
        /* Canvas container */
        #canvas-container {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 1;
        }
        
        #main-canvas {
            width: 100%;
            height: 100%;
        }

        /* WebGL context loss fallback */
        #splat-fallback {
            display: none;
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: var(--bg-primary);
        }

        #splat-fallback.visible {
            display: block;
        }
        
        /* Content sections */
        .content {
            position: relative;
            z-index: 10;
            pointer-events: none;
        }
        
        .content > * {
            pointer-events: auto;
        }
        
        section {
            min-height: 100vh;
            min-height: 100svh;
            padding: 0 3rem;
            display: flex;
            align-items: center;
            position: relative;
        }

        /* Hero Section */
        #hero {
            height: 100vh;
            height: 100svh;
            display: flex;
            flex-direction: column;
            justify-content: flex-end;
            padding-bottom: 8rem;
        }

        @supports not (height: 100svh) {
            #hero { height: -webkit-fill-available; }
        }
        
        .hero-content {
            display: grid;
            grid-template-columns: 1.2fr 1fr;
            gap: 6rem;
            align-items: end;
        }
        
        .hero-title-wrapper {
            overflow: hidden;
        }
        
        .hero-title {
            font-family: 'Instrument Serif', serif;
            font-size: clamp(4rem, 10vw, 9rem);
            font-weight: 400;
            line-height: 0.9;
            letter-spacing: -0.04em;
            transform: translateY(100%);
            animation: slideUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards;
        }
        
        .hero-title .line {
            display: block;
            overflow: hidden;
        }
        
        .hero-title .line span {
            display: inline-block;
            transform: translateY(100%);
            animation: slideUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
        }
        
        .hero-title .line:nth-child(1) span { animation-delay: 0.6s; }
        .hero-title .line:nth-child(2) span { animation-delay: 0.75s; }
        .hero-title .line:nth-child(3) span { animation-delay: 0.9s; }
        
        .hero-title .accent {
            font-style: italic;
            background: linear-gradient(135deg, var(--accent) 0%, var(--accent-secondary) 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        
        @keyframes slideUp {
            to { transform: translateY(0); }
        }
        
        .hero-meta {
            display: flex;
            flex-direction: column;
            gap: 2rem;
        }
        
        .hero-description {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.85rem;
            font-weight: 400;
            line-height: 1.9;
            color: var(--text-primary);
            max-width: 380px;
            opacity: 0;
            animation: fadeIn 1s ease 1.2s forwards;
            text-shadow: 0 0 20px rgba(5,5,6,0.8), 0 0 40px rgba(5,5,6,0.5);
        }
        
        @keyframes fadeIn {
            to { opacity: 1; }
        }
        
        .hero-stats {
            display: flex;
            gap: 3rem;
            opacity: 0;
            animation: fadeIn 1s ease 1.4s forwards;
        }
        
        .stat {
            display: flex;
            flex-direction: column;
            gap: 0.3rem;
        }
        
        .stat-value {
            font-family: 'Instrument Serif', serif;
            font-size: 2.5rem;
            font-style: italic;
            color: var(--accent);
        }
        
        .stat-label {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.65rem;
            color: var(--text-primary);
            text-transform: uppercase;
            letter-spacing: 0.15em;
        }
        
        .scroll-cue {
            position: absolute;
            bottom: 3rem;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 0.8rem;
            opacity: 0;
            animation: fadeIn 1s ease 2s forwards, float 2s ease-in-out infinite 2s;
        }
        
        @keyframes float {
            0%, 100% { transform: translateX(-50%) translateY(0); }
            50% { transform: translateX(-50%) translateY(10px); }
        }
        
        .scroll-cue span {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.6rem;
            color: var(--text-primary);
            text-transform: uppercase;
            letter-spacing: 0.2em;
        }
        
        .scroll-cue svg {
            width: 20px;
            height: 30px;
            stroke: var(--text-primary);
            stroke-width: 1.5;
            fill: none;
        }
        
        /* Work Section */
        #work {
            min-height: 200vh;
            flex-direction: column;
            justify-content: flex-start;
            padding-top: 20vh;
            gap: 15vh;
        }
        
        .section-header {
            width: 100%;
            display: flex;
            justify-content: space-between;
            align-items: flex-end;
            margin-bottom: 4rem;
            padding-bottom: 2rem;
            border-bottom: 1px solid var(--border);
        }
        
        .section-title {
            font-family: 'Instrument Serif', serif;
            font-size: clamp(3rem, 6vw, 5rem);
            font-weight: 400;
            font-style: italic;
        }
        
        .section-count {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.7rem;
            color: var(--text-dim);
            text-transform: uppercase;
            letter-spacing: 0.15em;
        }
        
        .work-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 2rem;
            width: 100%;
        }
        
        .work-item {
            aspect-ratio: 4/5;
            position: relative;
            background: var(--bg-elevated);
            border: 1px solid var(--border);
            border-radius: 8px;
            overflow: hidden;
            cursor: pointer;
            transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
        }
        
        .work-item:hover {
            transform: translateY(-10px);
            border-color: var(--accent);
            box-shadow: 0 30px 60px rgba(0,0,0,0.4), 0 0 40px var(--glow);
        }
        
        .work-item::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(180deg, transparent 50%, var(--bg-primary) 100%);
            z-index: 1;
        }
        
        .work-visual {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .work-visual canvas {
            width: 100%;
            height: 100%;
        }
        
        .work-info {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            padding: 1.5rem;
            z-index: 2;
        }
        
        .work-category {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.6rem;
            color: var(--accent);
            text-transform: uppercase;
            letter-spacing: 0.15em;
            margin-bottom: 0.5rem;
        }
        
        .work-title {
            font-family: 'Instrument Serif', serif;
            font-size: 1.4rem;
            font-style: italic;
            margin-bottom: 0.5rem;
        }
        
        .work-year {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.65rem;
            color: var(--text-dim);
        }
        
        /* Reel Section */
        #reel {
            min-height: 100vh;
            flex-direction: column;
            justify-content: center;
            padding: 10vh 3rem;
            gap: 3rem;
        }

        .reel-switch {
            display: flex;
            gap: 0;
            margin-bottom: 1.5rem;
            border: 1px solid var(--border);
            border-radius: 100px;
            overflow: hidden;
            width: fit-content;
            background: rgba(5, 5, 6, 0.85);
            backdrop-filter: blur(10px);
        }

        .reel-switch-btn {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.7rem;
            color: var(--text-dim);
            text-transform: uppercase;
            letter-spacing: 0.12em;
            padding: 0.6rem 1.5rem;
            background: none;
            border: none;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .reel-switch-btn.active {
            background: var(--accent);
            color: var(--bg-primary);
        }

        .reel-switch-btn:hover:not(.active) {
            color: var(--text-primary);
        }

        .reel-item {
            position: relative;
            width: 50%;
            margin: 0 auto;
        }


        .reel-item.hidden {
            display: none;
        }

        .reel-video-wrap {
            position: relative;
            width: 100%;
            padding-bottom: 56.25%; /* 16:9 */
            background: var(--bg-elevated);
            border: 1px solid var(--border);
            border-radius: 8px;
            overflow: hidden;
            transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .reel-item:hover .reel-video-wrap {
            border-color: var(--accent);
            box-shadow: 0 15px 50px rgba(0,0,0,0.5), 0 0 30px var(--glow);
        }

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

        .reel-label {
            margin-top: 1rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .reel-title {
            font-family: 'Instrument Serif', serif;
            font-size: 1.4rem;
            font-style: italic;
            color: var(--text-primary);
        }

        .reel-tag {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.6rem;
            color: var(--accent);
            text-transform: uppercase;
            letter-spacing: 0.15em;
            padding: 0.3rem 0.8rem;
            border: 1px solid rgba(200, 255, 0, 0.2);
            border-radius: 100px;
        }

        /* Filmography Section — scrolling 3D poster belt */
        #filmography {
            min-height: 50vh;
            flex-direction: column;
            justify-content: center;
            padding: 15vh 0;
            padding-left: 0;
            padding-right: 0;
            position: relative;
            overflow: visible;
            z-index: 20;
        }

        .films-header {
            padding: 0 3rem;
            margin-bottom: 1.5rem;
            z-index: 5;
        }

        .films-cloud {
            width: 100vw;
            overflow: hidden;
            position: relative;
            perspective: 900px;
            height: 350px;
            padding: 40px 0;
            margin-top: 150px;
        }

        .films-cloud::before,
        .films-cloud::after {
            display: none;
        }

        .films-belt {
            display: flex;
            align-items: center;
            height: 100%;
            animation: filmScroll 45s linear infinite;
            width: max-content;
        }


        @keyframes filmScroll {
            0% { transform: translateX(0) translateZ(0); }
            100% { transform: translateX(-50%) translateZ(0); }
        }

        .film-card {
            flex-shrink: 0;
            cursor: pointer;
            transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s ease, opacity 0.5s ease;
            transform-style: preserve-3d;
            margin: 0 10px;
        }

        .film-card:hover {
            z-index: 100 !important;
        }

        .film-poster {
            background: #0a0a0e;
            border: 1px solid rgba(0, 212, 255, 0.15);
            border-radius: 3px;
            overflow: hidden;
            box-shadow: 0 0 12px rgba(0, 212, 255, 0.06), 0 6px 25px rgba(0,0,0,0.5);
            transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .film-card:hover .film-poster {
            border-color: var(--accent-secondary);
            box-shadow: 0 0 25px rgba(0, 212, 255, 0.25), 0 0 50px rgba(0, 212, 255, 0.08), 0 12px 35px rgba(0,0,0,0.5);
        }

        .film-poster img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        .film-label {
            text-align: center;
            margin-top: 0.4rem;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .film-card:hover .film-label {
            opacity: 1;
        }

        .film-name {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 0.6rem;
            font-weight: 500;
            color: var(--text-primary);
            white-space: normal;
            max-width: 120px;
        }

        .film-year-tag {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.45rem;
            color: var(--accent-secondary);
        }

        /* Skills Section */
        #skills {
            min-height: 100vh;
            flex-direction: column;
            justify-content: center;
        }
        
        .skills-container {
            width: 100%;
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 6rem;
        }
        
        .skills-intro h2 {
            font-family: 'Instrument Serif', serif;
            font-size: clamp(2.5rem, 5vw, 4rem);
            font-weight: 400;
            line-height: 1.2;
            margin-bottom: 2rem;
        }
        
        .skills-intro h2 em {
            font-style: italic;
            color: var(--accent);
        }
        
        .skills-intro p {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.85rem;
            color: var(--text-secondary);
            line-height: 1.8;
            max-width: 450px;
        }
        
        .skills-list {
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }
        
        .skill-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 1.2rem 0;
            border-bottom: 1px solid var(--border);
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        .skill-item:hover {
            padding-left: 1rem;
            border-color: var(--accent);
        }
        
        .skill-item:hover .skill-name {
            color: var(--accent);
        }
        
        .skill-name {
            font-size: 1.1rem;
            font-weight: 500;
            transition: color 0.3s ease;
        }
        
        .skill-level {
            display: flex;
            gap: 4px;
        }
        
        .skill-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: var(--border);
            transition: background 0.3s ease;
        }
        
        .skill-dot.filled {
            background: var(--accent);
        }
        
        /* About Section */
        #about {
            min-height: 100vh;
            padding: 15vh 3rem;
        }
        
        .about-container {
            display: grid;
            grid-template-columns: 1fr 1.5fr;
            gap: 8rem;
            align-items: center;
            width: 100%;
        }
        
        .about-visual {
            position: relative;
            overflow: hidden;
        }

        .about-visual::after {
            content: '';
            position: absolute;
            bottom: 1rem;
            right: 1rem;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.6rem;
            color: var(--text-dim);
            text-transform: uppercase;
            letter-spacing: 0.1em;
        }
        
        .about-content h2 {
            font-family: 'Instrument Serif', serif;
            font-size: clamp(2rem, 4vw, 3rem);
            font-weight: 400;
            line-height: 1.3;
            margin-bottom: 2rem;
        }
        
        .about-content h2 em {
            font-style: italic;
            color: var(--accent-secondary);
        }
        
        .about-text {
            font-size: 1rem;
            color: var(--text-primary);
            line-height: 1.9;
            margin-bottom: 3rem;
        }
        
        .about-links {
            display: flex;
            gap: 2rem;
        }
        
        .about-link {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.75rem;
            color: var(--text-primary);
            text-decoration: none;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            padding: 1rem 2rem;
            border: 1px solid var(--border);
            border-radius: 100px;
            transition: all 0.3s ease;
        }
        
        .about-link:hover {
            background: var(--accent);
            color: var(--bg-primary);
            border-color: var(--accent);
        }
        
        .about-link.primary {
            background: var(--text-primary);
            color: var(--bg-primary);
            border-color: var(--text-primary);
        }
        
        .about-link.primary:hover {
            background: var(--accent);
            border-color: var(--accent);
        }
        
        /* GitLab Projects */
        .gitlab-projects {
            display: flex;
            flex-direction: column;
            gap: 0;
            width: 100%;
        }

        .gitlab-project {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.8rem 0;
            border-bottom: 1px solid var(--border);
            text-decoration: none;
            transition: all 0.3s ease;
            cursor: pointer;
        }

        .gitlab-project:hover {
            padding-left: 0.8rem;
            border-color: var(--accent);
        }

        .gitlab-project-name {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 0.85rem;
            font-weight: 500;
            color: var(--text-primary);
            transition: color 0.3s ease;
        }

        .gitlab-project:hover .gitlab-project-name {
            color: var(--accent);
        }

        .gitlab-project-desc {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.55rem;
            color: var(--text-secondary);
            margin-top: 0.15rem;
            max-width: 300px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .gitlab-project-meta {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.5rem;
            color: var(--text-dim);
            text-align: right;
            flex-shrink: 0;
        }

        .gitlab-project-stars {
            color: var(--accent);
        }

        /* Contact Section */
        #contact {
            min-height: 80vh;
            flex-direction: column;
            justify-content: center;
            text-align: center;
        }
        
        .contact-title {
            font-family: 'Instrument Serif', serif;
            font-size: clamp(3rem, 8vw, 8rem);
            font-weight: 400;
            font-style: italic;
            line-height: 1;
            margin-bottom: 2rem;
        }
        
        .contact-title a {
            color: var(--text-primary);
            text-decoration: none;
            position: relative;
            transition: color 0.3s ease;
        }
        
        .contact-title a:hover {
            color: var(--accent);
        }
        
        .contact-title a::after {
            content: '';
            position: absolute;
            bottom: 0.1em;
            left: 0;
            width: 100%;
            height: 0.05em;
            background: var(--accent);
            transform: scaleX(0);
            transform-origin: right;
            transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        }
        
        .contact-title a:hover::after {
            transform: scaleX(1);
            transform-origin: left;
        }
        
        .contact-subtitle {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.8rem;
            color: var(--text-primary);
            text-transform: uppercase;
            letter-spacing: 0.2em;
        }
        
        /* Footer */
        footer {
            padding: 3rem;
            padding-bottom: max(3rem, env(safe-area-inset-bottom));
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-top: 1px solid var(--border);
        }
        
        .footer-left {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.65rem;
            color: var(--text-dim);
        }
        
        .footer-right {
            display: flex;
            gap: 2rem;
        }
        
        .footer-right a {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.65rem;
            color: var(--text-dim);
            text-decoration: none;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            transition: color 0.3s ease;
        }
        
        .footer-right a:hover {
            color: var(--accent);
        }
        
        /* Loading screen */
        #loading {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: var(--bg-primary);
            z-index: 10000;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            transition: opacity 0.8s ease, visibility 0.8s ease;
        }
        
        #loading.hidden {
            opacity: 0;
            visibility: hidden;
        }
        
        .loading-logo {
            margin-bottom: 2rem;
            opacity: 0;
            animation: fadeIn 0.5s ease forwards;
        }

        .loading-logo img {
            width: 80px;
            height: 80px;
            filter: invert(1);
        }
        
        .loading-bar {
            width: 200px;
            height: 2px;
            background: var(--border);
            border-radius: 1px;
            overflow: hidden;
        }
        
        .loading-progress {
            height: 100%;
            background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
            width: 0%;
            animation: loadProgress 2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
        }
        
        @keyframes loadProgress {
            0% { width: 0%; }
            50% { width: 70%; }
            100% { width: 100%; }
        }
        
        .loading-text {
            margin-top: 1.5rem;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.7rem;
            color: var(--text-dim);
            letter-spacing: 0.2em;
            text-transform: uppercase;
        }
        /* Video glow — multi-slice volumetric container */
        #video-slices {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 0;
            height: 0;
            z-index: 0;
            pointer-events: none;
            transform-style: preserve-3d;
            perspective: 800px;
            will-change: transform;
        }

        .video-slice {
            position: absolute;
            top: 50%;
            left: 50%;
            object-fit: cover;
            pointer-events: none;
            mix-blend-mode: lighten;
            border-radius: 0;
            will-change: transform, opacity, filter;
            -webkit-mask-image: url('../vignette_mask.png');
            mask-image: url('../vignette_mask.png');
            -webkit-mask-size: 100% 100%;
            mask-size: 100% 100%;
            -webkit-mask-mode: alpha;
            mask-mode: alpha;
        }

        /* Debug Console */
        #debug-console {
            position: fixed;
            top: 0.5rem;
            left: 0.5rem;
            z-index: 9999;
            background: rgba(5, 5, 6, 0.92);
            backdrop-filter: blur(12px);
            border: 1px solid rgba(200, 255, 0, 0.15);
            border-radius: 8px;
            padding: 0;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.65rem;
            color: var(--text-secondary);
            width: 300px;
            max-height: calc(100vh - 1rem);
            display: flex;
            flex-direction: column;
            pointer-events: auto;
            cursor: auto;
            transition: opacity 0.3s ease, transform 0.3s ease;
            transform-origin: top left;
        }

        #debug-console.collapsed {
            transform: scale(1);
        }

        #debug-console.hidden {
            opacity: 0;
            pointer-events: none;
            transform: scale(0.95);
        }

        .debug-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.6rem 0.8rem;
            border-bottom: 1px solid rgba(255,255,255,0.06);
            cursor: pointer;
            user-select: none;
        }

        .debug-header span {
            color: var(--accent);
            font-size: 0.6rem;
            text-transform: uppercase;
            letter-spacing: 0.15em;
        }

        .debug-header .toggle-btn {
            color: var(--text-dim);
            font-size: 0.8rem;
        }

        .debug-body {
            padding: 0.6rem 0.8rem;
            overflow-y: auto;
            flex: 1;
            min-height: 0;
        }

        .debug-body::-webkit-scrollbar { width: 4px; }
        .debug-body::-webkit-scrollbar-track { background: transparent; }
        .debug-body::-webkit-scrollbar-thumb { background: rgba(200,255,0,0.2); border-radius: 2px; }
        .debug-body::-webkit-scrollbar-thumb:hover { background: rgba(200,255,0,0.4); }

        #debug-console.collapsed .debug-body {
            display: none;
        }

        .debug-group {
            margin-bottom: 0.8rem;
        }

        .debug-group-title {
            color: var(--text-dim);
            font-size: 0.55rem;
            text-transform: uppercase;
            letter-spacing: 0.15em;
            margin-bottom: 0.4rem;
            padding-bottom: 0.2rem;
            border-bottom: 1px solid rgba(255,255,255,0.04);
        }

        .debug-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 0.35rem;
            gap: 0.5rem;
        }

        .debug-row label {
            flex-shrink: 0;
            min-width: 90px;
            color: var(--text-dim);
        }

        .debug-row input[type="range"] {
            flex: 1;
            height: 3px;
            -webkit-appearance: none;
            appearance: none;
            background: rgba(255,255,255,0.08);
            border-radius: 2px;
            outline: none;
            cursor: pointer;
        }

        .debug-row input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 10px;
            height: 10px;
            background: var(--accent);
            border-radius: 50%;
            cursor: pointer;
        }

        .debug-row .value-display {
            min-width: 32px;
            text-align: right;
            color: var(--accent);
            font-size: 0.6rem;
        }

        .debug-select {
            flex: 1;
            background: rgba(255,255,255,0.06);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 3px;
            color: var(--text-secondary);
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.6rem;
            padding: 0.2rem 0.4rem;
            cursor: pointer;
            outline: none;
        }

        .debug-select option {
            background: #111114;
            color: var(--text-secondary);
        }

        .debug-presets {
            padding: 0.5rem 0.8rem;
            border-top: 1px solid rgba(255,255,255,0.06);
            flex-shrink: 0;
        }

        .debug-presets-bar {
            display: flex;
            gap: 0.3rem;
            margin-bottom: 0.4rem;
        }

        .debug-presets-bar button {
            flex: 1;
            background: rgba(200, 255, 0, 0.08);
            border: 1px solid rgba(200, 255, 0, 0.2);
            border-radius: 3px;
            color: var(--accent);
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.55rem;
            padding: 0.3rem;
            cursor: pointer;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            transition: all 0.2s ease;
        }

        .debug-presets-bar button:hover {
            background: rgba(200, 255, 0, 0.2);
        }

        .debug-presets-bar button.danger {
            border-color: rgba(255,80,80,0.3);
            color: #ff5050;
            background: rgba(255,80,80,0.05);
        }

        .debug-presets-bar button.danger:hover {
            background: rgba(255,80,80,0.15);
        }

        .preset-list {
            display: flex;
            flex-direction: column;
            gap: 0.2rem;
            max-height: 100px;
            overflow-y: auto;
        }

        .preset-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.25rem 0.4rem;
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.05);
            border-radius: 3px;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .preset-item:hover {
            border-color: rgba(200,255,0,0.3);
            background: rgba(200,255,0,0.05);
        }

        .preset-item.active {
            border-color: var(--accent);
            background: rgba(200,255,0,0.08);
        }

        .preset-item .preset-name {
            font-size: 0.55rem;
            color: var(--text-secondary);
        }

        .preset-item .preset-delete {
            font-size: 0.55rem;
            color: var(--text-dim);
            cursor: pointer;
            padding: 0 0.2rem;
        }

        .preset-item .preset-delete:hover {
            color: #ff5050;
        }

        .debug-hint {
            color: var(--text-dim);
            font-size: 0.5rem;
            text-align: center;
            padding: 0.4rem;
            border-top: 1px solid rgba(255,255,255,0.04);
            opacity: 0.6;
        }

        /* ============================================
           RESPONSIVE — MOBILE & TABLET
           ============================================ */

        /* Hide debug panel on phones, toggle on iPad */
        @media (max-width: 1024px) {
            #debug-console { display: none !important; }
        }

        /* Tablet (≤1024px) */
        @media (max-width: 1024px) {
            section {
                padding: 0 2rem;
            }

            .hero-content {
                grid-template-columns: 1fr;
                gap: 2rem;
            }

            .hero-title {
                font-size: clamp(3rem, 10vw, 6rem);
            }

            .about-container {
                grid-template-columns: 1fr;
                gap: 3rem;
            }

            .skills-container {
                grid-template-columns: 1fr;
                gap: 3rem;
            }

            .work-grid {
                grid-template-columns: repeat(2, 1fr);
            }

            .reel-item {
                width: 80%;
            }

            .films-cloud {
                height: 280px;
                margin-top: 80px;
            }
        }

        /* Mobile (≤768px) */
        @media (max-width: 768px) {
            /* Hamburger visible */
            .hamburger {
                display: flex;
            }

            .nav-links {
                display: none;
                flex-direction: column;
                position: fixed;
                top: 0;
                left: 0;
                right: 0;
                bottom: 0;
                background: rgba(5, 5, 6, 0.97);
                backdrop-filter: blur(20px);
                padding: calc(env(safe-area-inset-top) + 5rem) 2rem 2rem;
                z-index: 1000;
                gap: 2rem;
                align-items: center;
                justify-content: center;
            }

            .nav-links.open {
                display: flex;
            }

            .nav-links a {
                font-size: 1rem;
                opacity: 1;
            }

            /* Nav layout */
            nav {
                padding: max(1rem, env(safe-area-inset-top)) max(1.5rem, env(safe-area-inset-right)) 1rem max(1.5rem, env(safe-area-inset-left));
            }

            /* Hero */
            #hero {
                padding-bottom: 4rem;
                justify-content: center;
            }

            section {
                padding: 0 1.5rem;
            }

            .hero-content {
                grid-template-columns: 1fr;
                gap: 1.5rem;
            }

            .hero-title {
                font-size: clamp(2.5rem, 12vw, 4.5rem);
            }

            .hero-description {
                font-size: 0.75rem;
                max-width: 100%;
                line-height: 1.7;
            }

            .hero-meta {
                gap: 1.5rem;
            }

            .hero-stats {
                gap: 1.5rem;
            }

            .stat-value {
                font-size: 1.8rem;
            }

            .scroll-cue {
                bottom: max(2rem, env(safe-area-inset-bottom));
            }

            /* Reel */
            .reel-item {
                width: 100%;
            }

            .reel-switch-btn {
                font-size: 0.6rem;
                padding: 0.5rem 1rem;
            }

            /* Filmography — simplified for iOS Safari */
            .films-cloud {
                height: 220px;
                margin-top: 30px;
                perspective: none;
                padding: 20px 0;
            }

            .films-cloud::before,
            .films-cloud::after {
                display: none;
            }

            .film-card {
                margin: 0 6px;
                transform-style: flat;
                transition: none;
            }

            .films-belt {
                animation: filmScrollMobile 30s linear infinite;
                transform-style: flat;
            }

            @keyframes filmScrollMobile {
                0% { transform: translateX(0); }
                100% { transform: translateX(-50%); }
            }

            .films-header {
                padding: 0 1.5rem;
            }

            /* About */
            .about-container {
                gap: 2rem;
            }

            .about-links {
                flex-direction: column;
                gap: 1rem;
            }

            .about-link {
                text-align: center;
            }

            /* Contact */
            .contact-title {
                font-size: clamp(2rem, 7vw, 4rem);
            }

            /* Footer */
            footer {
                flex-direction: column;
                gap: 1rem;
                text-align: center;
                padding: 2rem 1.5rem;
                padding-bottom: max(2rem, env(safe-area-inset-bottom));
            }

            .footer-right {
                gap: 1.5rem;
            }

            /* Work grid */
            .work-grid {
                grid-template-columns: 1fr;
            }

            /* Hide cursor elements on touch */
            .cursor, .cursor-dot {
                display: none !important;
            }

            /* Disable expensive effects on mobile for perf */
            .grain {
                display: none;
            }
            .scanlines {
                display: none;
            }

            /* Disable CSS blur filter on film cards (very expensive on mobile GPU) */
            .film-card {
                filter: none !important;
                will-change: transform;
            }

            /* Reduce video slice quality */
            .video-slice {
                image-rendering: auto;
            }
        }

        /* Small phones (≤375px) */
        @media (max-width: 375px) {
            .hero-title {
                font-size: clamp(2.2rem, 12vw, 3.5rem);
            }

            .hero-description {
                font-size: 0.7rem;
            }

            .section-title {
                font-size: clamp(2rem, 8vw, 3rem);
            }
        }

        /* Landscape phone */
        @media (max-height: 500px) and (orientation: landscape) {
            #hero {
                padding-bottom: 3rem;
                padding-left: max(3rem, env(safe-area-inset-left));
                padding-right: max(3rem, env(safe-area-inset-right));
            }

            .hero-content {
                grid-template-columns: 1fr 1fr;
                gap: 2rem;
            }

            .hero-title {
                font-size: clamp(2rem, 6vw, 3rem);
            }

            .scroll-cue {
                display: none;
            }
        }

        /* Reduced motion: disable non-essential animations */
        @media (prefers-reduced-motion: reduce) {
            .grain, .scanlines { display: none; }
            .hero-title .line span,
            .hero-title,
            .hero-description,
            .hero-stats,
            .scroll-cue,
            .loading-progress {
                animation: none !important;
                transform: none !important;
                opacity: 1 !important;
            }
        }
