﻿:root {
            --color-background: #0e0e0e;
            --color-surface: #0e0e0e;
            --color-surface-low: #131313;
            --color-surface-container: #191919;
            --color-surface-high: #1f1f1f;
            --color-surface-highest: #262626;
            --color-outline: #757575;
            --color-outline-variant: #484848;
            --color-on-surface: #ffffff;
            --color-on-surface-variant: #ababab;
            --color-primary: #f3ffca;
            --color-primary-fixed: #cafd00;
            --color-primary-dim: #beee00;
            --color-primary-container: #cafd00;
            --color-on-primary-fixed: #3a4a00;
            --color-secondary: #ff51fa;
            --color-secondary-container: #a900a9;
            --color-tertiary-fixed: #00ffff;
            --color-brand: #ccff00;
            --color-brand-hover: #ff51fa;
            --color-footer-bg: #ccff00;
            --color-footer-text: #0e0e0e;
            --color-text-stroke: #cafd00;
            --color-loader-mix: #ccff00;
            --accent-1: #ccff00;
            --accent-2: #ff51fa;
            --accent-3: #00ffff;
        }
        body {
            background-color: var(--color-background);
            color: var(--color-on-surface);
            overflow-x: hidden;
        }
        .text-stroke-primary {
            -webkit-text-stroke: 2px var(--color-text-stroke);
            color: transparent;
        }
        .reveal-on-scroll {
            opacity: 0;
            transform: translateY(30px);
            transition: all 0.8s cubic-bezier(0.33, 1, 0.68, 1);
        }
        .reveal-on-scroll.active {
            opacity: 1;
            transform: translateY(0);
        }
        .card-tilt {
            transition: transform 0.1s ease-out;
            transform-style: preserve-3d;
            overflow: hidden;
        }
        .card-tilt img {
            transition: transform 0.5s cubic-bezier(0.33, 1, 0.68, 1);
        }
        .gallery-item {
            -webkit-tap-highlight-color: transparent;
        }
        .gallery-item.touch-active {
            transform: scale(0.985);
        }
        .gallery-item.touch-active .gallery-img {
            transform: scale(1.12) !important;
            filter: saturate(1.08) contrast(1.04);
        }
        .gallery-item.touch-active .absolute {
            opacity: 1 !important;
        }
        .gallery-item.touch-active .translate-y-20,
        .gallery-item.touch-active .translate-y-10 {
            translate: 0 0 !important;
        }
        .gallery-item.touch-active h3,
        .gallery-item.touch-active span,
        .gallery-item.touch-active .font-headline {
            letter-spacing: 0.04em;
        }
        #preloader {
            transition: opacity 1s cubic-bezier(0.85, 0, 0.15, 1);
        }
        #preloader.loaded {
            opacity: 0;
            pointer-events: none;
        }
        .letter-explode {
            display: inline-block;
            transition: all 0.8s cubic-bezier(0.19, 1, 0.22, 1);
            opacity: 0;
            filter: blur(10px);
        }
        .letter-explode.active {
            opacity: 1;
            filter: blur(0px);
            transform: translate(0, 0) rotate(0deg) scale(1) !important;
        }
        .fly-char {
            display: inline-block;
            opacity: 0;
            transition: all 0.7s cubic-bezier(0.68, -0.6, 0.32, 1.6);
            will-change: transform, opacity;
        }
        .fly-char.active {
            opacity: 1;
            transform: translate(0, 0) scale(1) rotate(0deg) !important;
        }
        .honor-spring {
            transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }
        
        #error-storm-container {
            position: fixed;
            inset: 0;
            z-index: 200;
            pointer-events: none;
            overflow: hidden;
            display: none;
        }
        .error-string {
            position: absolute;
            font-family: 'Lexend', sans-serif;
            font-weight: 900;
            white-space: nowrap;
            transition: transform 0.18s ease, opacity 0.22s ease, filter 0.18s ease;
            text-transform: uppercase;
            pointer-events: auto;
            user-select: none;
            cursor: grab;
            will-change: transform, opacity;
            text-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
        }
        .error-string:active {
            cursor: grabbing;
        }
        .error-string.is-hit {
            opacity: 0 !important;
            filter: blur(10px);
        }
        .error-string.is-grounded {
            opacity: 0.92;
            filter: saturate(1.05);
        }
        .error-burst-flash {
            position: absolute;
            width: 18px;
            height: 18px;
            border-radius: 999px;
            pointer-events: none;
            background: radial-gradient(circle, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0) 72%);
            mix-blend-mode: screen;
            animation: error-flash 0.35s ease-out forwards;
        }
        @keyframes error-flash {
            from { opacity: 0.9; transform: scale(0.2); }
            to { opacity: 0; transform: scale(5.5); }
        }

        #chaos-overlay {
            position: fixed;
            inset: 0;
            background: #000;
            z-index: 300;
            display: none;
            overflow: hidden;
            cursor: grab;
            perspective: 2000px;
        }
        #chaos-overlay:active {
            cursor: grabbing;
        }
        .chaos-canvas {
            position: absolute;
            top: 0;
            left: 0;
            width: 400%;
            height: 400%;
            display: grid;
            grid-template-columns: repeat(20, 1fr);
            gap: 20px;
            padding: 40px;
            will-change: transform;
            user-select: none;
            transition: transform 0.1s linear;
        }
        .chaos-canvas.implode {
            transition: all 0.8s cubic-bezier(0.76, 0, 0.24, 1);
            transform: translate(var(--currX), var(--currY)) scale(0) rotate(720deg) !important;
            opacity: 0;
            filter: blur(50px) brightness(5);
        }
        .chaos-canvas img {
            pointer-events: none;
            user-select: none;
        }
        #repair-btn {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            z-index: 210;
            display: none;
        }

        .nav-link.active {
            color: var(--color-secondary) !important;
            text-decoration: underline;
            text-decoration-thickness: 8px;
            transform: rotate(-2deg) scale(1.1);
        }

        /* Experimental Preloader */
        .loader-glitch-part {
            position: absolute;
            background: var(--color-loader-mix);
            mix-blend-mode: screen;
        }
        .loader-text-kinetic {
            position: absolute;
            font-family: 'Lexend', sans-serif;
            font-weight: 900;
            line-height: 0.8;
            letter-spacing: -0.05em;
            text-transform: uppercase;
            white-space: nowrap;
        }
        #top-nav > div:first-child,
        #top-nav button,
        #top-nav .nav-link {
            color: var(--color-brand) !important;
        }
        #top-nav .nav-link:hover {
            color: var(--color-brand-hover) !important;
        }
        #hero-subtitle > div {
            box-shadow: 12px 12px 0px var(--color-brand) !important;
        }
        #glitch-prank-btn {
            box-shadow: 10px 10px 0px var(--color-secondary) !important;
        }
        #contact {
            background-color: var(--color-footer-bg) !important;
        }
        #contact span,
        #contact p {
            color: var(--color-footer-text) !important;
        }
        #repair-btn {
            background-color: var(--color-secondary) !important;
            box-shadow: 15px 15px 0px var(--color-primary-container) !important;
        }
        #exit-chaos-btn {
            box-shadow: 10px 10px 0px var(--color-primary-container) !important;
        }

        #mobile-menu-backdrop,
        #mobile-menu {
            position: fixed;
            inset: 0;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.25s ease;
            z-index: 70;
        }
        #mobile-menu-backdrop {
            background: rgba(0, 0, 0, 0.62);
            backdrop-filter: blur(10px);
        }
        #mobile-menu {
            display: flex;
            justify-content: flex-end;
            padding: 1rem;
        }
        #mobile-menu-panel {
            width: min(22rem, 100%);
            height: fit-content;
            background: rgba(14, 14, 14, 0.96);
            border: 1px solid var(--color-outline-variant);
            box-shadow: 14px 14px 0 var(--color-primary-container);
            padding: 1.25rem;
            transform: translateY(-18px);
            transition: transform 0.25s ease;
        }
        #mobile-menu.active,
        #mobile-menu-backdrop.active {
            opacity: 1;
            pointer-events: auto;
        }
        #mobile-menu.active #mobile-menu-panel {
            transform: translateY(0);
        }
        #mobile-menu-close {
            font-family: 'Lexend', sans-serif;
            font-size: 2rem;
            font-weight: 900;
            line-height: 1;
            color: var(--color-brand);
        }
        .mobile-menu-links {
            display: flex;
            flex-direction: column;
            gap: 0.8rem;
            margin-top: 1.5rem;
        }
        .mobile-menu-links .nav-link {
            display: block;
            font-family: 'Lexend', sans-serif;
            font-size: clamp(1.5rem, 7vw, 2.2rem);
            font-weight: 900;
            letter-spacing: -0.05em;
            text-transform: uppercase;
            color: var(--color-brand);
            padding: 0.4rem 0;
        }
        body.menu-open {
            overflow: hidden;
        }

        @media (max-width: 767px) {
            #preloader #loader-word {
                font-size: clamp(4.2rem, 18vw, 6rem) !important;
            }
            #loader-status {
                left: 1rem;
                right: 1rem;
                bottom: 1.25rem;
                text-align: left;
                letter-spacing: 0.24em;
            }
            #top-nav {
                padding: 1rem 1rem 0.75rem;
                align-items: center;
            }
            #top-nav > div:first-child {
                font-size: clamp(1.7rem, 7vw, 2.4rem) !important;
                max-width: 70vw;
                line-height: 0.92;
            }
            #mobile-menu-toggle {
                display: inline-flex;
                align-items: center;
                justify-content: center;
                align-self: center;
                margin-top: 0;
                line-height: 1;
            }
            #mobile-menu-toggle span {
                display: block;
                line-height: 0.85;
            }
            #hero {
                min-height: 100svh;
                padding-top: 5.75rem;
                padding-bottom: 6rem;
            }
            #hero .container {
                padding-left: 1rem;
                padding-right: 1rem;
            }
            #hero-title {
                font-size: clamp(4.8rem, 26vw, 7.5rem) !important;
                white-space: normal;
                line-height: 0.88;
            }
            #hero-subtitle {
                margin-top: -0.75rem !important;
                align-items: center;
                max-width: 100%;
            }
            #hero-subtitle > div {
                font-size: clamp(1.2rem, 6vw, 1.8rem) !important;
                padding: 0.85rem 1.25rem;
                box-shadow: 8px 8px 0px var(--color-brand) !important;
            }
            #hero-subtitle p {
                margin-top: 1rem;
                font-size: 0.72rem !important;
                letter-spacing: 0.45em !important;
                text-align: center;
            }
            #hero-scroll-hint {
                bottom: 1.25rem;
                gap: 0.6rem;
            }
            #hero-scroll-hint span {
                font-size: 0.62rem !important;
                letter-spacing: 0.18em !important;
                text-align: center;
                max-width: 13rem;
            }
            #hero-scroll-hint div {
                height: 3.5rem !important;
            }
            #about,
            #works,
            #honors {
                padding-top: 5.5rem !important;
                padding-bottom: 5.5rem !important;
            }
            #about .container,
            #honors .container,
            #works > div:first-child {
                padding-left: 1rem !important;
                padding-right: 1rem !important;
            }
            #about .container {
                gap: 1.5rem;
            }
            #manifesto-title,
            #honors h2 {
                font-size: clamp(3rem, 15vw, 4.5rem) !important;
                margin-bottom: 2rem !important;
            }
            #about-content {
                gap: 2rem;
            }
            #about-text-1 {
                font-size: clamp(1.6rem, 8vw, 2.4rem) !important;
            }
            #about-text-2 {
                font-size: clamp(1rem, 5vw, 1.2rem) !important;
                line-height: 1.8;
            }
            #glitch-prank-btn {
                width: 100%;
                padding: 1rem 1.25rem;
                font-size: 1.15rem !important;
                box-shadow: 8px 8px 0px var(--color-secondary) !important;
            }
            #gallery-grid {
                grid-auto-rows: minmax(15rem, auto) !important;
            }
            #gallery-grid .gallery-item {
                min-height: 15rem;
            }
            #gallery-grid .gallery-item > div[class*="absolute"] {
                padding: 1rem;
            }
            #gallery-grid .gallery-item h3,
            #gallery-grid .gallery-item span,
            #gallery-grid .gallery-item .font-headline {
                font-size: clamp(1.6rem, 8vw, 2.3rem) !important;
            }
            #chaos-trigger {
                min-height: 13rem;
            }
            #chaos-trigger span {
                font-size: 5rem !important;
                margin-left: 1rem;
                margin-right: 1rem;
            }
            #chaos-trigger > div:last-child > div {
                font-size: 1.6rem !important;
                padding: 0.9rem 1.2rem;
                box-shadow: 10px 10px 0px #FF51FA;
            }
            #honors .grid {
                gap: 1rem;
            }
            .honor-card,
            .honor-reveal {
                padding: 1.25rem !important;
            }
            .honor-card h3,
            .honor-reveal p {
                font-size: clamp(1.45rem, 7vw, 2rem) !important;
                margin-bottom: 1rem !important;
            }
            .honor-card span,
            .honor-reveal span {
                font-size: 0.9rem !important;
            }
            #contact {
                padding: 3.5rem 1rem 2rem !important;
                align-items: flex-start;
            }
            #contact > div {
                width: 100%;
                gap: 0.5rem;
            }
            #contact > div > span {
                font-size: clamp(3.2rem, 18vw, 5rem) !important;
                line-height: 0.9;
            }
            #contact p {
                margin-top: 0.5rem !important;
                font-size: 0.68rem !important;
                letter-spacing: 0.18em !important;
            }
            #repair-btn {
                width: calc(100vw - 2rem);
                max-width: 20rem;
                padding: 1rem 1.25rem;
                font-size: 1.2rem !important;
                text-align: center;
            }
            #chaos-overlay {
                touch-action: none;
                background:
                    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.06), transparent 28%),
                    radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.04), transparent 24%),
                    linear-gradient(180deg, rgba(12, 12, 12, 0.98) 0%, rgba(0, 0, 0, 1) 100%);
            }
            .chaos-canvas {
                width: 280%;
                height: 280%;
                grid-template-columns: repeat(8, minmax(0, 1fr));
                grid-auto-rows: 88px;
                gap: 10px;
                padding: 16px;
                align-content: start;
            }
            .chaos-canvas img {
                border-width: 2px !important;
                border-radius: 18px;
                box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
            }
            #exit-chaos-btn {
                right: 1rem;
                bottom: 1rem;
                padding: 0.8rem 1rem;
                font-size: 1rem !important;
                box-shadow: 7px 7px 0px var(--color-primary-container) !important;
            }
        }

        @media (pointer: coarse) {
            .card-tilt,
            .card-tilt img {
                transition: transform 0.2s ease, filter 0.2s ease !important;
            }
            .gallery-item img {
                scale: 1.03;
            }
            .gallery-item.touch-active .group-hover\:opacity-100,
            .gallery-item.touch-active .group-hover\:translate-y-0,
            .gallery-item.touch-active .group-hover\:tracking-widest,
            .gallery-item.touch-active .group-hover\:text-secondary,
            .gallery-item.touch-active .group-hover\:mix-blend-normal {
                opacity: 1 !important;
                letter-spacing: 0.08em !important;
                mix-blend-mode: normal !important;
            }
        }

