/* ====================================================================
   1. MODERN CSS RESET & RENDERING ENGINE
   ==================================================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "kern" 1, "liga" 1, "calt" 1, "ss01" 1;
    scroll-behavior: smooth;
    background: var(--bg);
    overflow-x: clip; /* Prevents horizontal scroll without breaking sticky */
}

body {
    background: var(--bg);
    color: var(--fg);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: -0.01em;
    overflow-x: clip;
    cursor: auto; /* Hidden for custom physics cursor */
    min-height: 100vh;
    text-shadow: 0 0 1px rgba(0,0,0,0.02);
}

img, picture, video, canvas, svg, iframe {
    display: block;
    max-width: 100%;
    height: auto;
    user-select: none;
    -webkit-user-drag: none;
    border-style: none;
}

input, button, textarea, select {
    font: inherit;
    color: inherit;
    background: transparent;
    border: none;
    outline: none;
}

button {
    cursor: none;
    background: transparent;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

a {
    color: inherit;
    text-decoration: none;
    cursor: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

p, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
    text-wrap: pretty;
}

#root, #__next, main {
    isolation: isolate;
}

/* ====================================================================
   2. DESIGN TOKENS & PHYSICS VARIABLES
   ==================================================================== */
:root {
    /* Base Palette */
    --bg: #050505;
    --bg-rgb: 5, 5, 5;
    --bg-alt: #0A0A0A;
    --bg-alt-rgb: 10, 10, 10;
    
    /* Foregrounds */
    --fg: #F5F5F7;
    --fg-rgb: 245, 245, 247;
    --fg-dim: #AAAAAE;
    --fg-dim-rgb: 170, 170, 174;
    --muted: #6A6A6E;
    --muted-rgb: 106, 106, 110;
    
    /* Accent */
    --accent: #C6FF3D;
    --accent-rgb: 198, 255, 61;
    --accent-dim: #8FBF2C;
    --accent-dim-rgb: 143, 191, 44;
    --accent-glow: rgba(var(--accent-rgb), 0.25);
    --accent-glow-strong: rgba(var(--accent-rgb), 0.5);
    
    /* Surfaces & Borders */
    --surface: #111113;
    --surface-rgb: 17, 17, 19;
    --surface-hover: #1A1A1E;
    --surface-hover-rgb: 26, 26, 30;
    --border: rgba(255,255,255,0.06);
    --border-hover: rgba(255,255,255,0.15);
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    
    /* Advanced Easing Curves */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out-circ: cubic-bezier(0.85, 0, 0.15, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.45, 0, 0.55, 1);
    --ease-back: cubic-bezier(0.68, -0.6, 0.32, 1.6);
    
    /* Layout Math */
    --nav-height: 80px;
    --container-max: 1600px;
    --gutter: clamp(1.5rem, 5vw, 6rem);
    --section-padding: clamp(5rem, 12vw, 12rem);
    
    /* Z-Index Scale */
    --z-base: 1;
    --z-elevated: 10;
    --z-nav: 100;
    --z-overlay: 1000;
    --z-cursor: 9999;
}

/* ====================================================================
   3. FLUID TYPOGRAPHY ENGINE
   ==================================================================== */
.font-display { font-family: 'Playfair Display', Georgia, serif; font-feature-settings: "liga" 1, "dlig" 1; }
.font-mono { font-family: 'JetBrains Mono', 'Courier New', monospace; font-feature-settings: "zero" 1; }

.text-fluid-massive {
    font-size: clamp(3rem, 14vw, 18rem);
    line-height: 0.82;
    letter-spacing: -0.055em;
    font-weight: 500;
    text-wrap: balance;
}

.text-fluid-h1 {
    font-size: clamp(2.5rem, 10vw, 12rem);
    line-height: 0.88;
    letter-spacing: -0.045em;
    font-weight: 500;
    text-wrap: balance;
}

.text-fluid-h2 {
    font-size: clamp(2rem, 6vw, 7rem);
    line-height: 0.95;
    letter-spacing: -0.035em;
    font-weight: 500;
    text-wrap: balance;
}

.text-fluid-h3 {
    font-size: clamp(1.5rem, 3vw, 3.5rem);
    line-height: 1.05;
    letter-spacing: -0.025em;
    font-weight: 500;
}

.text-fluid-h4 {
    font-size: clamp(1.2rem, 2vw, 2rem);
    line-height: 1.15;
    letter-spacing: -0.015em;
    font-weight: 500;
}

.text-fluid-body {
    font-size: clamp(1rem, 1.1vw, 1.15rem);
    line-height: 1.65;
    letter-spacing: -0.005em;
    color: var(--fg-dim);
}

.text-fluid-small {
    font-size: clamp(0.75rem, 0.9vw, 0.875rem);
    line-height: 1.4;
    letter-spacing: 0.05em;
}

/* ====================================================================
   4. LAYOUT PRIMITIVES & GRID MATH
   ==================================================================== */
.container-mx {
    max-width: var(--container-max);
    margin: 0 auto;
}

.section-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding-left: var(--gutter);
    padding-right: var(--gutter);
}

.section-padding {
    padding-top: var(--section-padding);
    padding-bottom: var(--section-padding);
}

.center-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* ====================================================================
   5. AMBIENT BACKGROUND ENVIRONMENT
   ==================================================================== */
.ambient-environment {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.ambient-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.6;
}

.orb-system {
    position: absolute;
    inset: 0;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.3;
    will-change: transform;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: var(--accent);
    top: -200px;
    left: -200px;
    animation: float-1 20s infinite ease-in-out;
}

.orb-2 {
    width: 800px;
    height: 800px;
    background: var(--surface);
    bottom: -300px;
    right: -300px;
    animation: float-2 25s infinite ease-in-out;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: var(--accent-dim);
    top: 40%;
    left: 40%;
    opacity: 0.15;
    animation: float-3 30s infinite ease-in-out;
}

@keyframes float-1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(100px, -50px) scale(1.1); }
    66% { transform: translate(-50px, 100px) scale(0.9); }
}

@keyframes float-2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-100px, 50px) scale(0.9); }
    66% { transform: translate(50px, -100px) scale(1.1); }
}

@keyframes float-3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(150px, -150px) scale(1.2); }
}

.grid-mesh {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.5;
}

.film-grain {
    display: none;
    position: absolute;
    inset: 0;
    opacity: 0.04;
    z-index: var(--z-overlay);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    animation: grain 0.5s steps(2) infinite;
}

@keyframes grain {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-5%, -10%); }
    20% { transform: translate(-15%, 5%); }
    30% { transform: translate(7%, -25%); }
    40% { transform: translate(-5%, 25%); }
    50% { transform: translate(-15%, 10%); }
    60% { transform: translate(15%, 0%); }
    70% { transform: translate(0%, 15%); }
    80% { transform: translate(3%, 35%); }
    90% { transform: translate(-10%, 10%); }
}

.vignette-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 40%, rgba(0,0,0,0.6) 100%);
    z-index: var(--z-overlay) - 1;
}

/* ====================================================================
   6. MULTI-LAYER CUSTOM CURSOR SYSTEM
   ==================================================================== */
.cursor-system {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: var(--z-cursor);
}

.cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 6px;
    height: 6px;
    background: var(--fg);
    border-radius: 50%;
    mix-blend-mode: difference;
    transform: translate(-50%, -50%);
    transition: width 0.3s var(--ease-out-expo), height 0.3s var(--ease-out-expo);
    will-change: transform;
}

.cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    mix-blend-mode: difference;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%);
    transition: width 0.4s var(--ease-out-expo), height 0.4s var(--ease-out-expo), border-color 0.3s ease, background 0.3s ease;
    will-change: transform;
}

.cursor-ring.hovered {
    width: 80px;
    height: 80px;
    background: var(--accent);
    border-color: var(--accent);
    mix-blend-mode: normal;
}

.cursor-text-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.cursor-text {
    font-size: 10px;
    font-weight: 700;
    color: #000;
    opacity: 0;
    transition: opacity 0.2s ease 0.1s;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cursor-ring.hovered .cursor-text {
    opacity: 1;
}

.cursor-trail {
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, rgba(var(--accent-rgb), 0.4) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    will-change: transform;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* ====================================================================
   7. SCROLL CHOREOGRAPHY & REVEAL MASKS
   ==================================================================== */
.reveal-mask {
    overflow: hidden;
    display: block;
    position: relative;
    padding-bottom: 0.1em;
}

/* ====================================================================
   8. RESPONSIVE ADJUSTMENTS (Cursor disabled on touch)
   ==================================================================== */
@media (max-width: 768px) {
    body, a, button { cursor: auto; }
    .cursor-system { display: none; }
}

/* ====================================================================
   9. PRELOADER ARCHITECTURE
   ==================================================================== */
.preloader-container {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    overflow: hidden;
}

.preloader-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    z-index: 2;
}

.preloader-text-wrap {
    display: flex;
    align-items: flex-start;
    color: var(--fg);
    line-height: 1;
}

.preloader-text {
    font-size: clamp(5rem, 15vw, 12rem);
    font-weight: 500;
    letter-spacing: -0.05em;
    font-family: 'Inter', sans-serif;
}

.preloader-symbol {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 300;
    margin-top: 0.5rem;
    color: var(--accent);
}

.preloader-bar-base {
    width: clamp(200px, 40vw, 400px);
    height: 2px;
    background: var(--surface-hover);
    border-radius: 2px;
    overflow: hidden;
}

.preloader-bar-fill {
    height: 100%;
    background: var(--accent);
    width: 0%;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px var(--accent-glow);
}

.preloader-meta {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    font-family: 'JetBrains Mono', monospace;
}

.preloader-reveal-overlay {
    position: absolute;
    inset: 0;
    background: var(--bg);
    transform: translateY(100%);
    z-index: 1;
}

/* ====================================================================
   10. GLASSMORPHISM SYSTEM (Core Visual Language)
   ==================================================================== */
.glass-panel {
    background: var(--glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.glass-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

/* ====================================================================
   11. FLOATING NAVIGATION SYSTEM
   ==================================================================== */
.floating-nav {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: 90%;
    max-width: 700px;
    transition: transform 0.4s var(--ease-out-expo), opacity 0.4s ease;
}

.floating-nav.hidden {
    transform: translateX(-50%) translateY(-150%);
    opacity: 0;
}

.nav-inner {
    border-radius: 100px;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.05em;
    color: var(--fg);
    display: flex;
    align-items: baseline;
}

.logo-dot {
    color: var(--accent);
    font-size: 2rem;
    line-height: 0;
    margin-left: 2px;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-link {
    font-size: 0.85rem;
    color: var(--fg-dim);
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover {
    color: var(--fg);
}

.link-num {
    font-size: 0.65rem;
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
}

.nav-cta-wrap {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--muted);
    font-family: 'JetBrains Mono', monospace;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-glow);
    animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.nav-cta {
    font-size: 0.8rem;
    padding: 0.5rem 1.25rem;
    background: var(--fg);
    color: var(--bg);
    border-radius: 100px;
    font-weight: 500;
    transition: background 0.3s ease, color 0.3s ease;
}

.nav-cta:hover {
    background: var(--accent);
    color: var(--bg);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
}

.toggle-line {
    width: 24px;
    height: 2px;
    background: var(--fg);
    transition: transform 0.3s ease;
}

/* ====================================================================
   12. HERO SECTION (Cinematic Layout)
   ==================================================================== */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 var(--gutter);
    padding-top: 10rem;
    z-index: 10;
}

.hero-container {
    max-width: var(--container-max);
    margin: 0 auto;
    width: 100%;
    position: relative;
}

.hero-overline {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.overline-text {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--muted);
    font-family: 'JetBrains Mono', monospace;
}

.overline-line {
    width: 4rem;
    height: 1px;
    background: var(--muted);
}

.hero-title {
    font-size: clamp(3rem, 10vw, 11rem);
    line-height: 0.88;
    letter-spacing: -0.05em;
    font-weight: 500;
    margin-bottom: 4rem;
}

.title-line {
    display: block;
    padding-bottom: 0.1em;
}

.line-text {
    display: block;
    will-change: transform;
}

.italic-accent {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    color: var(--accent);
    font-weight: 600;
}

.hero-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: end;
    max-width: 1100px;
}

.hero-bio {
    max-width: 400px;
}

.bio-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--fg-dim);
    margin-bottom: 2rem;
}

.bio-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--muted);
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.meta-dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
}

.meta-divider {
    opacity: 0.5;
}

.hero-cta {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
}

/* ====================================================================
   13. PREMIUM MAGNETIC BUTTONS
   ==================================================================== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background: var(--fg);
    color: var(--bg);
    padding: 1rem 1.5rem 1rem 2rem;
    border-radius: 100px;
    font-weight: 500;
    font-size: 1rem;
    transition: background 0.3s var(--ease-out-expo), color 0.3s var(--ease-out-expo);
    position: relative;
    overflow: hidden;
    will-change: transform;
}

.btn-primary.large {
    padding: 1.5rem 2.5rem;
    font-size: 1.25rem;
    margin-top: 3rem;
}

.btn-primary:hover {
    background: var(--accent);
}

.btn-icon-wrap {
    width: 2rem;
    height: 2rem;
    background: rgba(0,0,0,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.btn-primary.large .btn-icon-wrap {
    width: 2.5rem;
    height: 2.5rem;
}

.btn-primary:hover .btn-icon-wrap {
    background: rgba(0,0,0,0.2);
}

.btn-icon {
    transition: transform 0.3s var(--ease-out-expo);
}

.btn-primary:hover .btn-icon {
    transform: translateY(2px);
}

.btn-primary.large .btn-fill {
    position: absolute;
    inset: 0;
    background: var(--fg);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.5s var(--ease-out-expo);
    z-index: -1;
    border-radius: 100px;
}

.btn-primary.large:hover .btn-fill {
    transform: scaleY(1);
}

/* ====================================================================
   14. SCROLL INDICATOR
   ==================================================================== */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.scroll-text {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    font-family: 'JetBrains Mono', monospace;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--muted), transparent);
    animation: scroll-pulse 2s infinite ease-in-out;
}

@keyframes scroll-pulse {
    0%, 100% { transform: scaleY(1); opacity: 0.5; transform-origin: top; }
    50% { transform: scaleY(1.5); opacity: 1; transform-origin: top; }
}

/* ====================================================================
   15. FLOATING 3D TILT BADGE (Hero Element)
   ==================================================================== */
.floating-badge {
    position: absolute;
    top: 15%;
    right: 5%;
    width: 240px;
    padding: 1.5rem;
    border-radius: 16px;
    transform-style: preserve-3d;
    perspective: 1000px;
    transition: transform 0.2s var(--ease-out-expo);
    display: none; /* Hidden on mobile */
}

.badge-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    transform: translateZ(40px);
}

.badge-icon-wrap {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dim));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg);
}

.badge-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--fg);
}

.badge-subtitle {
    font-size: 0.75rem;
    color: var(--muted);
}

.badge-body {
    margin-bottom: 1rem;
    transform: translateZ(20px);
}

.badge-text {
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--fg-dim);
}

.badge-footer {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--border);
    padding-top: 1rem;
    transform: translateZ(30px);
}

.badge-stat {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent);
}

.stat-label {
    font-size: 0.65rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ====================================================================
   16. SECTION HEADER SYSTEM
   ==================================================================== */
.section-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: end;
    margin-bottom: 6rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.section-tag {
    font-size: 0.75rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 1rem;
    display: block;
}

.section-title {
    font-size: clamp(2rem, 6vw, 5rem);
    font-weight: 500;
    line-height: 0.95;
    letter-spacing: -0.03em;
}

.muted-text {
    color: var(--muted);
}

.section-desc {
    font-size: 1rem;
    color: var(--fg-dim);
    line-height: 1.6;
    max-width: 400px;
    margin-left: auto;
}

/* ====================================================================
   17. BENTO BOX PORTFOLIO GRID
   ==================================================================== */
.portfolio-section {
    position: relative;
    padding: 10rem var(--gutter);
    z-index: 10;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: 300px;
    gap: 1.5rem;
}

.bento-card {
    position: relative;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.4s var(--ease-out-expo), border-color 0.4s var(--ease-out-expo);
    will-change: transform;
    cursor: none;
}

.bento-card:hover {
    transform: translateY(-5px);
    border-color: rgba(var(--accent-rgb), 0.3);
}

.large-card {
    grid-column: span 7;
    grid-row: span 2;
}

.wide-card {
    grid-column: span 12;
}

/* If it's not large or wide, it's a medium card (5 cols) */
.bento-card:not(.large-card):not(.wide-card) {
    grid-column: span 5;
}

.card-bg-grad {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(var(--accent-rgb), 0.05), transparent 60%);
    opacity: 0;
    transition: opacity 0.5s var(--ease-out-expo);
    pointer-events: none;
}

.bento-card:hover .card-bg-grad {
    opacity: 1;
}

.card-content {
    position: relative;
    z-index: 2;
    padding: 2.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-top {
    display: flex;
    gap: 0.5rem;
}

.card-tag {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    padding: 0.25rem 0.75rem;
    border: 1px solid rgba(var(--accent-rgb), 0.3);
    border-radius: 100px;
    font-family: 'JetBrains Mono', monospace;
}

.card-tag.muted {
    color: var(--muted);
    border-color: var(--border);
}

.card-bottom {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.card-title {
    font-size: 1.8rem;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.large-card .card-title {
    font-size: 2.5rem;
}

.card-desc {
    font-size: 0.9rem;
    color: var(--fg-dim);
    line-height: 1.5;
    max-width: 400px;
}

.card-arrow {
    position: absolute;
    bottom: 2.5rem;
    right: 2.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--fg);
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.bento-card:hover .card-arrow {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
    transform: rotate(45deg);
}

.card-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    background: var(--accent);
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0;
    bottom: -150px;
    right: -150px;
    transition: opacity 0.5s var(--ease-out-expo);
    pointer-events: none;
}

.bento-card:hover .card-glow {
    opacity: 0.15;
}

/* ====================================================================
   18. RESPONSIVE ADJUSTMENTS (Nav & Hero)
   ==================================================================== */
@media (max-width: 1024px) {
    .floating-badge { display: none; }
    .nav-links { display: none; }
    .nav-cta-wrap .status-indicator { display: none; }
    .mobile-menu-toggle { display: flex; }
}

@media (max-width: 768px) {
    .hero-section { padding-top: 8rem; }
    .hero-bottom-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .hero-cta { justify-content: flex-start; }
    
    .section-header {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .section-desc { margin-left: 0; }
    
    .bento-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 250px;
    }
    .large-card, .wide-card, .bento-card:not(.large-card):not(.wide-card) {
        grid-column: span 1;
        grid-row: span 1;
    }
    .large-card { grid-row: span 2; }
}

/* ====================================================================
   19. THE ARSENAL (High-Tech Terminal Split Screen)
   ==================================================================== */
.arsenal-section {
    position: relative;
    padding: 10rem var(--gutter);
    z-index: 10;
}

.arsenal-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: start;
}

.arsenal-list-wrap {
    border-top: 1px solid var(--border);
}

.list-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
}

.header-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--surface-hover);
}

.header-dot.red { background: #FF5F57; }
.header-dot.yellow { background: #FEBC2E; }
.header-dot.green { background: #28C840; }

.header-title {
    margin-left: 1rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--muted);
}

.arsenal-list {
    display: flex;
    flex-direction: column;
}

.arsenal-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem 0;
    border-bottom: 1px solid var(--border);
    position: relative;
    cursor: none;
    transition: padding-left 0.4s var(--ease-out-expo);
}

.arsenal-item:hover {
    padding-left: 1rem;
}

.arsenal-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--accent);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.4s var(--ease-out-expo);
}

.arsenal-item.active::before,
.arsenal-item:hover::before {
    transform: scaleY(1);
    transform-origin: top;
}

.item-icon-wrap {
    width: 48px;
    height: 48px;
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--fg);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.arsenal-item.active .item-icon-wrap,
.arsenal-item:hover .item-icon-wrap {
    background: rgba(var(--accent-rgb), 0.1);
    border-color: var(--accent);
    color: var(--accent);
}

.item-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.item-text h3 {
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    color: var(--fg);
    transition: color 0.3s ease;
}

.arsenal-item.active h3,
.arsenal-item:hover h3 {
    color: var(--accent);
}

.item-command {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--muted);
}

.item-arrow {
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    color: var(--accent);
}

.arsenal-item.active .item-arrow,
.arsenal-item:hover .item-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Terminal Panel */
.terminal-panel {
    border-radius: 16px;
    overflow: hidden;
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    height: 500px;
}

.terminal-header {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
}

.header-dots {
    display: flex;
    gap: 0.5rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.red { background: #FF5F57; }
.dot.yellow { background: #FEBC2E; }
.dot.green { background: #28C840; }

.terminal-title {
    margin-left: 1rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--muted);
}

.terminal-body {
    flex: 1;
    padding: 1.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    overflow-y: auto;
    background: rgba(0,0,0,0.2);
}

.terminal-body::-webkit-scrollbar { width: 4px; }
.terminal-body::-webkit-scrollbar-track { background: transparent; }
.terminal-body::-webkit-scrollbar-thumb { background: var(--surface-hover); border-radius: 2px; }

.terminal-line {
    margin-bottom: 0.5rem;
    color: var(--fg-dim);
    opacity: 0;
    animation: fadeInUp 0.3s var(--ease-out-expo) forwards;
}

.terminal-line.command {
    color: var(--accent);
    margin-bottom: 1rem;
}

.terminal-line.success {
    color: #28C840;
    margin-top: 1rem;
}

.terminal-cursor {
    display: inline-block;
    width: 8px;
    height: 16px;
    background: var(--accent);
    animation: blink 1s infinite step-start;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.terminal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    background: var(--bg-alt);
}

.footer-tags {
    display: flex;
    gap: 0.5rem;
}

.term-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--fg-dim);
    background: var(--surface);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    border: 1px solid var(--border);
}

/* ====================================================================
   20. THE OUTRO (Eraser Reveal Contact)
   ==================================================================== */
.outro-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10rem var(--gutter);
    z-index: 10;
    overflow: hidden;
}

.outro-grid-bg {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(circle at center, black 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(circle at center, black 0%, transparent 70%);
    pointer-events: none;
}

.outro-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    border-radius: 100px;
    margin-bottom: 3rem;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-glow);
    animation: pulse-dot 2s infinite ease-in-out;
}

.badge-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--fg-dim);
}

.eraser-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 0;
    cursor: none;
}

.eraser-svg {
    width: 100%;
    height: auto;
    overflow: visible;
}

.eraser-text {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 180px;
    font-weight: 600;
    fill: none;
    stroke-width: 1;
}

.base-text {
    fill: var(--surface);
    transition: fill 0.3s ease;
}

.revealed-text {
    fill: var(--accent);
    transition: fill 0.3s ease;
    filter: drop-shadow(0 0 20px var(--accent-glow));
}

.outro-content {
    text-align: center;
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.outro-subtitle {
    font-size: 1.1rem;
    color: var(--muted);
    max-width: 500px;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.outro-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 3rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
    cursor: none;
}

.social-link:hover {
    color: var(--fg);
}

.social-icon {
    color: var(--accent);
}

.link-divider {
    opacity: 0.5;
}

/* ====================================================================
   21. FOOTER
   ==================================================================== */
.site-footer {
    position: relative;
    z-index: 10;
    padding: 2rem var(--gutter);
    border-top: 1px solid var(--border);
    background: var(--bg);
}

.footer-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-left, .footer-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.footer-divider {
    opacity: 0.5;
}

/* ====================================================================
   22. GSAP SCROLL REVEAL STATES
   ==================================================================== */
/* Initial state for elements that will be animated by GSAP */
.reveal-mask .line-text,
.reveal-mask .overline-text,
.reveal-mask .bio-text,
.reveal-mask .section-desc,
.reveal-mask .outro-subtitle,
.reveal-mask .outro-links {
    transform: translateY(0);
    opacity: 0;
    transition: transform 1.2s var(--ease-out-expo), opacity 1.2s var(--ease-out-expo);
}

/* Class added by JS when element enters viewport */
.reveal-mask.visible .line-text,
.reveal-mask.visible .overline-text,
.reveal-mask.visible .bio-text,
.reveal-mask.visible .section-desc,
.reveal-mask.visible .outro-subtitle,
.reveal-mask.visible .outro-links {
    transform: translateY(0);
    opacity: 1;
}

/* Stagger delays for elements within the same mask */
.reveal-mask.visible .line-text:nth-child(1) { transition-delay: 0.1s; }
.reveal-mask.visible .line-text:nth-child(2) { transition-delay: 0.2s; }
.reveal-mask.visible .line-text:nth-child(3) { transition-delay: 0.3s; }

/* ====================================================================
   23. FINAL MOBILE RESPONSIVE OVERRIDES
   ==================================================================== */
@media (max-width: 1024px) {
    .arsenal-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .terminal-panel {
        position: relative;
        top: 0;
        height: 400px;
    }
    
    .eraser-text {
        font-size: 120px;
    }
}

@media (max-width: 768px) {
    .arsenal-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .item-arrow {
        display: none;
    }
    
    .eraser-text {
        font-size: 80px;
    }
    
    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .eraser-text {
        font-size: 60px;
    }
    
    .btn-primary, .btn-primary.large {
        width: 100%;
        justify-content: center;
    }
    
    .outro-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    .link-divider {
        display: none;
    }
}

/* ====================================================================
   24. ACCESSIBILITY & MOTION PREFERENCES
   ==================================================================== */
@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;
    }
    
    .reveal-mask .line-text,
    .reveal-mask .overline-text,
    .reveal-mask .bio-text,
    .reveal-mask .section-desc,
    .reveal-mask .outro-subtitle,
    .reveal-mask .outro-links {
        transform: translateY(0);
        opacity: 1;
    }
    
    .film-grain {
        animation: none !important;
        opacity: 0.02 !important;
    }
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    border-radius: 2px;
}
/* BULLETPROOF FALLBACK: Force all text to be visible if JS fails */
.reveal-mask .line-text,
.reveal-mask .overline-text,
.reveal-mask .bio-text,
.reveal-mask .section-desc,
.reveal-mask .outro-subtitle,
.reveal-mask .outro-links,
.hero-section .reveal-mask * {
    transform: translateY(0) !important;
    opacity: 1 !important;
}

body {
    opacity: 1 !important;
}