/* ═══════════════════════════════════════════════════════════════
   DESIGN TOKENS & MODES
   ═══════════════════════════════════════════════════════════════ */
:root {
    --bg-primary: #050505;
    --bg-secondary: #0a0a0a;
    --bg-glass: rgba(255, 255, 255, 0.03);
    --border-glass: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.55);
    --accent-1: #8b5cf6;
    --accent-2: #ec4899;
    --accent-3: #06b6d4;
    --glow: rgba(139, 92, 246, 0.5);
    --grain-opacity: 0.03;
    --transition-speed: 0.6s;
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

    /* Aurora Lattice Additions */
    --aurora: linear-gradient(135deg, var(--accent-1) 0%, var(--accent-3) 35%, #C6FF4F 70%, var(--accent-2) 100%);
    --fog: var(--text-secondary);
    --bone: var(--text-primary);
    --void: var(--bg-primary);
    --ink: var(--bg-secondary);
    --mist: #111118;
    --font-mono: ui-monospace, 'SFMono-Regular', Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
    --ease-out-expo: var(--ease-out);
    --s-1: 4px; --s-2: 8px; --s-3: 16px; --s-4: 24px;
    --s-5: 32px; --s-6: 48px; --s-7: 64px; --s-8: 96px; --s-9: 128px;
    --radius-card: 24px;
    --radius-pill: 999px;
}

/* Ghostmode — Ethereal Light */
[data-mode="ghost"] {
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.7);
    --border-glass: rgba(0, 0, 0, 0.08);
    --text-primary: #0a0a0a;
    --text-secondary: rgba(0, 0, 0, 0.5);
    --accent-1: #6d28d9; /* Deep Violet */
    --accent-2: #be123c; /* Deep Rose */
    --accent-3: #0e7490; /* Deep Cyan */
    --glow: rgba(109, 40, 217, 0.2);
    --grain-opacity: 0.015;
    --aurora: linear-gradient(135deg, #6d28d9 0%, #0e7490 35%, #f8fafc 70%, #be123c 100%);
}

/* Godmode — Full Spectrum */
[data-mode="god"] {
    --accent-1: #ff006e;
    --accent-2: #fb5607;
    --accent-3: #ffbe0b;
    --glow: rgba(255, 0, 110, 0.6);
    --grain-opacity: 0.05;
    --aurora: linear-gradient(135deg, #ff006e 0%, #fb5607 35%, #ffbe0b 70%, #8338ec 100%);
}

/* ═══════════════════════════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════════════════════════ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
[hidden] {
    display: none !important;
}

html {
    font-size: 16px;
    /* Reserve scrollbar space permanently so toggling `overflow`
       (during the preloader lock, or opening modals) never shifts
       the layout horizontally. Fixes the "burst" on preloader exit. */
    scrollbar-gutter: stable;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

::selection {
    background: var(--accent-1);
    color: var(--bg-primary);
}

#proj-preview {
    position: fixed;
    width: 440px;
    height: 299px;
    z-index: 99980;
    pointer-events: none;
    border-radius: 16px;
    overflow: hidden;
    opacity: 0;
    transform: scale(0.8); /* Initial scale for GSAP hover effect */
    transition: opacity 0.35s var(--ease-out);
    box-shadow: 0 20px 60px -15px rgba(0, 0, 0, 0.6);
    border: 1px solid var(--border-glass);
}
#proj-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
}
/* MOBILE PREVIEW MODAL */
@media (max-width: 768px) {
    #proj-preview {
        display: block !important; /* Override the hide */
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0.8);
        width: 85vw; /* 85% of screen width */
        height: auto;
        aspect-ratio: 16 / 9;
        z-index: 10000;
        opacity: 0;
        pointer-events: none; /* Hidden until tapped */
        transition: opacity 0.3s ease, transform 0.3s ease;
    }
    /* When it becomes visible via JS */
    #proj-preview.visible {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
        pointer-events: auto;
    }
    /* Dark backdrop so the image stands out */
    #proj-preview.visible::after {
        content: '';
        position: fixed;
        top: 0; left: 0; width: 100vw; height: 100vh;
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(4px);
        z-index: -1;
    }
    #proj-preview img {
        transform: scale(1); /* Reset the zoom for mobile */
        border: 1px solid var(--border-glass);
        box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    }
}
/* ═══════════════════════════════════════════════════════════════
   PROJECT PREVIEW — PREMIUM "CLICK TO VISIT" OVERLAY
   ═══════════════════════════════════════════════════════════════ */
.proj-preview-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 18px;
    background: linear-gradient(180deg,
        rgba(0, 0, 0, 0.25) 0%,
        rgba(0, 0, 0, 0) 28%,
        rgba(0, 0, 0, 0) 50%,
        rgba(0, 0, 0, 0.8) 100%);
    pointer-events: none;
}

/* ─── LIVE PILL (top-left) ─── */
.proj-preview-live {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.4rem 0.85rem;
    border-radius: 100px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.proj-preview-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: previewLivePulse 1.8s ease-in-out infinite;
}

@keyframes previewLivePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.75); }
}

/* ─── CTA BADGE (bottom, center) ─── */
.proj-preview-cta {
    display: flex;
    justify-content: center;
}

.proj-preview-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.75rem;
    border-radius: 100px;
    color: #ffffff;
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    overflow: hidden;
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1.5px solid var(--accent-1);
    box-shadow: 0 0 25px var(--glow), 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Shine sweep effect */
.proj-preview-badge-shine {
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(120deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 100%);
    transform: skewX(-20deg);
    animation: badgeShineSweep 2.6s ease-in-out infinite;
}

@keyframes badgeShineSweep {
    0% { left: -60%; }
    45%, 100% { left: 140%; }
}

.proj-preview-badge svg {
    color: var(--accent-1);
    flex-shrink: 0;
    position: relative;
    animation: badgeArrowNudge 1.6s ease-in-out infinite;
}

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

.proj-preview-badge span:last-child {
    white-space: nowrap;
    position: relative;
}

@media (max-width: 768px) {
    .proj-preview-badge {
        padding: 0.7rem 1.25rem;
        font-size: 0.7rem;
        gap: 0.45rem;
    }
    .proj-preview-live {
        font-size: 0.6rem;
        padding: 0.35rem 0.7rem;
    }
}


@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%); }
}

/* ═══════════════════════════════════════════════════════════════
   PRELOADER
   ═══════════════════════════════════════════════════════════════ */
.preloader {
    position: fixed;
    inset: 0;
    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;
}

.preloader.done {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-text {
    font-family: var(--font-display);
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 500;
    letter-spacing: 0.2em;
    color: var(--text-secondary);
    min-height: 2em;
}

.preloader-bar {
    width: 200px;
    height: 1px;
    background: var(--border-glass);
    margin-top: 2rem;
    position: relative;
    overflow: hidden;
}

.preloader-bar::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
    animation: loadBar 2s ease forwards;
}

@keyframes loadBar {
    to { width: 100%; }
}

.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 1.5rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background var(--transition-speed), backdrop-filter var(--transition-speed);
}

.nav.scrolled {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    position: relative;
}

.nav-logo span {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-left { 
    display: flex; 
    flex-direction: column; 
    gap: 0.5rem; 
    align-items: flex-start; 
}

.toggle-3d-btn {
    background: var(--bg-glass); 
    border: 1px solid var(--border-glass);
    color: var(--text-secondary); 
    padding: 0.35rem 0.9rem; 
    border-radius: 100px;
    font-family: var(--font-mono); 
    font-size: 0.7rem; 
    font-weight: 500;
    letter-spacing: 0.05em; 
    text-transform: uppercase; 
    cursor: pointer;
    transition: all 0.3s ease; 
    backdrop-filter: blur(10px);
}
.toggle-3d-btn:hover {
    border-color: var(--accent-1); 
    color: var(--text-primary);
    box-shadow: 0 0 15px var(--glow);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: color 0.3s;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s var(--ease-out);
}

.nav-links a:hover {
    color: var(--text-primary);
}

/* Active link state for scroll highlighting */
.nav-links a.active {
    color: var(--text-primary);
}

.nav-links a.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-links a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* ADDED: Theme Label */
.theme-switcher-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.theme-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-secondary);
    display: none; /* Hidden on mobile to save space */
}
@media (min-width: 1025px) {
    .theme-label {
        display: block; /* Shows up on desktop */
    }
}

/* Mode Switcher */
.mode-switcher {
    display: flex;
    gap: 0.5rem;
    background: var(--bg-glass);
    padding: 0.4rem;
    border-radius: 100px;
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(10px);
}

.mode-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    font-family: var(--font-display);
    color: transparent;
    overflow: hidden;
}

.mode-btn:hover {
    transform: scale(1.15);
}

.mode-btn.active {
    box-shadow: 0 0 15px var(--glow);
    color: var(--text-primary);
}

.mode-btn[data-mode="default"] { background: linear-gradient(135deg, #8b5cf6, #ec4899); }
.mode-btn[data-mode="ghost"] { background: linear-gradient(135deg, #e2e8f0, #f8fafc); border: 1px solid rgba(0,0,0,0.1); }
.mode-btn[data-mode="god"] { background: linear-gradient(135deg, #ff006e, #fb5607, #ffbe0b); }

.mode-btn.active::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    border: 2px solid var(--text-primary);
}

/* MOBILE TOGGLE (Burger to X Animation) */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    z-index: 102;
}

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

.mobile-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}
.mobile-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* MOBILE RESPONSIVE MENU */
@media (max-width: 1024px) {
    .nav { padding: 1rem 1.5rem; }
    .nav-links { 
        position: fixed; 
        top: 0; 
        right: -100%; 
        width: 70%; 
        max-width: 300px;
        height: 100vh;
        background: var(--bg-secondary);
        flex-direction: column;
        justify-content: center; 
        align-items: flex-start; 
        padding: 4rem 2rem;
        transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1); 
        border-left: 1px solid var(--border-glass);
        z-index: 100;
        box-shadow: -10px 0 40px rgba(0,0,0,0.3);
    }
    .nav-links.open { right: 0; }
    
    /* Premium Link Styling & Stagger Animation */
    .nav-links li { 
        margin: 1.5rem 0; 
        opacity: 0; 
        transform: translateX(20px);
        transition: all 0.4s ease;
    }
    .nav-links.open li {
        opacity: 1;
        transform: translateX(0);
    }
    .nav-links.open li:nth-child(1) { transition-delay: 0.1s; }
    .nav-links.open li:nth-child(2) { transition-delay: 0.2s; }
    .nav-links.open li:nth-child(3) { transition-delay: 0.3s; }
    .nav-links.open li:nth-child(4) { transition-delay: 0.4s; }
    .nav-links.open li:nth-child(5) { transition-delay: 0.5s; }
    .nav-links.open li:nth-child(6) { transition-delay: 0.6s; }
    
    .nav-links a { font-size: 1.5rem; font-weight: 500; }
    
    .mobile-toggle { display: flex; }
    .mode-switcher { margin-top: 2rem; }

    /* Dark overlay when menu is open */
    body.menu-open::before {
        content: '';
        position: fixed;
        top: 0; left: 0; width: 100vw; height: 100vh;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(6px);
        z-index: 99;
    }
}

/* ═══════════════════════════════════════════════════════════════
   TYPEWRITER EFFECT (Hero Eyebrow)
   ═══════════════════════════════════════════════════════════════ */
.hero-eyebrow.is-typing {
    border-right: 2px solid var(--accent-1);
    padding-right: 6px;
    animation: blink-caret 0.8s step-end infinite;
}

@keyframes blink-caret {
    50% { border-color: transparent; }
}
/* ═══════════════════════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════════════════════ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 8rem 0 4rem; /* 8rem top, 0 left/right (for edge-to-edge), 4rem bottom */
    max-width: none; 
    width: 100%; 
}

.hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none; /* Allows clicks to pass through to content below */
}

.hero-orbs {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.4; /* Subdued slightly to let 3D particles shine */
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s infinite ease-in-out;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: var(--accent-1);
    top: -10%;
    left: -10%;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--accent-2);
    bottom: -10%;
    right: -10%;
    animation-delay: -5s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: var(--accent-3);
    top: 40%;
    left: 60%;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0,0) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

.hero-content {
    position: relative;
    z-index: 2; /* Ensures content sits above 3D canvas and orbs */
    text-align: center;
    width: 100%; /* FIX: Prevents flexbox from pushing content off-screen */
    max-width: 1200px; /* FIX: Increased from 900px to give long words room */
    margin: 0 auto;
    padding: 0 1rem; /* FIX: Ensures text never touches the screen edges */
}

.hero-eyebrow {
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border: 1px solid var(--border-glass);
    border-radius: 100px;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 7vw, 7rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
    overflow-wrap: break-word; 
}

.hero-title .gradient-text {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2), var(--accent-3));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto 3rem;
    font-weight: 400;
}

.hero-cta {
    display: inline-flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    position: relative;
    padding: 1rem 2.5rem;
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 100px;
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    color: white;
    border: none;
    box-shadow: 0 10px 40px var(--glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 50px var(--glow);
}

.btn-secondary {
    background: var(--bg-glass);
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    border-color: var(--accent-1);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.1);
}

/* ═══════════════════════════════════════════════════════════════
   SECTION UTILITIES
   ═══════════════════════════════════════════════════════════════ */
section {
    position: relative;
    padding: 8rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    scroll-margin-top: 90px;
}

.section-header {
    margin-bottom: 5rem;
}

.section-eyebrow {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--accent-1);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-eyebrow::before {
    content: '';
    width: 40px;
    height: 1px;
    background: var(--accent-1);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    max-width: 700px;
}

/* ═══════════════════════════════════════════════════════════════
   ABOUT — DEVELOPER IDENTITY CARD + STORY
   ═══════════════════════════════════════════════════════════════ */
.about-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 4rem;
    align-items: start;
}

/* ─── LEFT — Identity Card ─── */
.id-card {
    position: relative;
    border-radius: 20px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    overflow: hidden;
}

/* Terminal header */
.id-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--border-glass);
    background: color-mix(in srgb, var(--bg-secondary) 60%, transparent);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.id-card__lights {
    display: inline-flex;
    gap: 0.4rem;
    align-items: center;
}

.id-light {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--border-glass);
}

.id-light--build { background: var(--accent-2); opacity: 0.6; }
.id-light--test  { background:#ded154; opacity: 0.6; }
.id-light--live  {
    background: #10b981;
    box-shadow: 0 0 6px #10b981;
    animation: idLivePulse 2.4s ease-in-out infinite;
}

@keyframes idLivePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.id-card__body {
    padding: 2.5rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Soft accent wash behind the card content */
.id-card__body::before {
    content: '';
    position: absolute;
    top: -40%;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    height: 80%;
    background: radial-gradient(ellipse, var(--glow), transparent 70%);
    opacity: 0.25;
    pointer-events: none;
}

/* ─── Monogram — free-floating AF, no box ─── */
.id-mono-wrap {
    position: relative;
    width: 104px;
    height: 104px;
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

.id-monogram {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--text-primary);
    z-index: 1;
}

/* Spinning ring — SVG stroke, transparent center (no box behind the AF) */
.id-mono-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.85;
    filter: drop-shadow(0 0 6px var(--glow));
    animation: idRingSpin 6s linear infinite;
}

/* Ring gradient follows the live theme tokens */
.id-mono-ring .id-ring-stop-1 { stop-color: var(--accent-1); }
.id-mono-ring .id-ring-stop-2 { stop-color: var(--accent-2); }
.id-mono-ring .id-ring-stop-3 { stop-color: var(--accent-3); }

@keyframes idRingSpin {
    to { transform: rotate(360deg); }
}

/* ─── Identity ─── */
.id-name {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

.id-name-accent {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.id-role {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-top: 0.4rem;
    position: relative;
    z-index: 1;
}

.id-typeline {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--accent-1);
    margin-top: 0.9rem;
    min-height: 1.2em;   /* reserves space so nothing shifts while typing */
    position: relative;
    z-index: 1;
}

.id-cursor {
    display: inline-block;
    width: 8px;
    height: 1em;
    background: var(--accent-1);
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: idBlink 1s step-end infinite;
}

@keyframes idBlink {
    50% { opacity: 0; }
}

/* ─── Spec sheet ─── */
.id-specs {
    list-style: none;
    width: 100%;
    margin-top: 2rem;
    border-top: 1px solid var(--border-glass);
    position: relative;
    z-index: 1;
}

.id-specs li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.7rem 0.5rem;
    border-bottom: 1px solid var(--border-glass);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    transition: background 0.25s;
}

.id-specs li:hover {
    background: color-mix(in srgb, var(--accent-1) 6%, transparent);
}

.id-spec-key {
    color: var(--text-secondary);
    letter-spacing: 0.08em;
    flex-shrink: 0;
}

.id-spec-key::before {
    content: '·';
    margin-right: 0.5rem;
    color: var(--accent-1);
}

.id-spec-val {
    color: var(--text-primary);
    text-align: right;
}

.id-spec-val--live {
    color: #10b981;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.id-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: idLivePulse 2s ease-in-out infinite;
}

/* ─── Philosophy quote ─── */
.id-quote {
    margin-top: 1.75rem;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.6;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
    padding: 0 1.5rem;
}

.id-quote::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.2rem;
    bottom: 0.2rem;
    width: 2px;
    background: linear-gradient(180deg, var(--accent-1), var(--accent-2));
    border-radius: 2px;
}

/* ─── Signature barcode ─── */
.id-barcode {
    display: flex;
    gap: 3px;
    align-items: flex-end;
    justify-content: center;
    height: 26px;
    margin-top: 1.75rem;
    position: relative;
    z-index: 1;
}

.id-barcode span {
    display: block;
    width: 2px;
    height: 40%;
    background: var(--text-primary);
    opacity: 0.4;
    animation: barcodeScan 5s ease-in-out infinite;
}

/* Varied bar heights */
.id-barcode span:nth-child(3n+1) { height: 60%; }
.id-barcode span:nth-child(3n+2) { height: 100%; }
.id-barcode span:nth-child(4n)   { height: 85%; }
.id-barcode span:nth-child(5n+2) { height: 70%; }

/* Staggered wave sweep */
.id-barcode span:nth-child(1)  { animation-delay: 0s; }
.id-barcode span:nth-child(2)  { animation-delay: 0.05s; }
.id-barcode span:nth-child(3)  { animation-delay: 0.1s; }
.id-barcode span:nth-child(4)  { animation-delay: 0.15s; }
.id-barcode span:nth-child(5)  { animation-delay: 0.2s; }
.id-barcode span:nth-child(6)  { animation-delay: 0.25s; }
.id-barcode span:nth-child(7)  { animation-delay: 0.3s; }
.id-barcode span:nth-child(8)  { animation-delay: 0.35s; }
.id-barcode span:nth-child(9)  { animation-delay: 0.4s; }
.id-barcode span:nth-child(10) { animation-delay: 0.45s; }
.id-barcode span:nth-child(11) { animation-delay: 0.5s; }
.id-barcode span:nth-child(12) { animation-delay: 0.55s; }
.id-barcode span:nth-child(13) { animation-delay: 0.6s; }
.id-barcode span:nth-child(14) { animation-delay: 0.65s; }
.id-barcode span:nth-child(15) { animation-delay: 0.7s; }
.id-barcode span:nth-child(16) { animation-delay: 0.75s; }
.id-barcode span:nth-child(17) { animation-delay: 0.8s; }
.id-barcode span:nth-child(18) { animation-delay: 0.85s; }
.id-barcode span:nth-child(19) { animation-delay: 0.9s; }
.id-barcode span:nth-child(20) { animation-delay: 0.95s; }

@keyframes barcodeScan {
    0%, 100% { opacity: 0.4; }
    15% { opacity: 1; background: var(--accent-1); }
}

.id-card__footer {
    margin-top: 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-secondary);
    opacity: 0.7;
    position: relative;
    z-index: 1;
}

/* ─── RIGHT — Story card ─── */
.about-glass {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.about-glass::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--glow), transparent 70%);
    opacity: 0.3;
    pointer-events: none;
}

.about-text {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

/* ─── Principles (icon-based) ─── */
.about-principles {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
    position: relative;
    z-index: 1;
}

.about-principles li {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 1rem;
    align-items: start;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-glass);
}

.about-principles li:first-child {
    border-top: 1px solid var(--border-glass);
}

.about-principles li:hover .principle-glyph {
    border-color: var(--accent-1);
    color: var(--accent-1);
    transform: translateY(-2px);
}

.principle-glyph {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid var(--border-glass);
    background: var(--bg-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.3s;
}

.principle-glyph svg {
    width: 18px;
    height: 18px;
}

.about-principles strong {
    color: var(--text-primary);
}

.about-principles li div {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    position: relative;
    z-index: 1;
}

.skill-tag {
    padding: 0.5rem 1rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.3s;
}

.skill-tag:hover {
    border-color: var(--accent-1);
    color: var(--text-primary);
    box-shadow: 0 0 20px var(--glow);
    transform: translateY(-2px);
}

@media (max-width: 900px) {
    .about-grid { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
    .about-glass { padding: 2rem; }
    .id-card__body { padding: 2rem 1.25rem 1.5rem; }
    .id-mono-wrap { width: 92px; height: 92px; }
    .id-monogram { font-size: 2.1rem; }
}

@media (prefers-reduced-motion: reduce) {
    .id-mono-ring,
    .id-cursor,
    .id-live-dot,
    .id-light--live,
    .id-barcode span {
        animation: none;
    }
}

/* ═══════════════════════════════════════════════════════════════
   WORK / PROJECTS SECTION — HOVER LIST WITH IMAGE PREVIEW
   ═══════════════════════════════════════════════════════════════ */
.works-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: clamp(2.5rem, 5vw, 5rem);
    flex-wrap: wrap;
    gap: 1rem;
}

.works-count {
    font-family: var(--font-display);
    font-size: 0.875rem;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
}

.proj-row {
    display: grid;
    grid-template-columns: 48px 1fr auto auto auto;
    align-items: center;
    gap: clamp(1rem, 2vw, 2rem);
    padding: clamp(1.5rem, 3.5vw, 3rem) 0;
    border-bottom: 1px solid var(--border-glass);
    position: relative;
    transition: background 0.4s;
    text-decoration: none;
    color: var(--text-primary);
}

.proj-row:first-child {
    border-top: 1px solid var(--border-glass);
}

.proj-row:hover {
    background: rgba(255, 255, 255, 0.02);
}

[data-mode="ghost"] .proj-row:hover {
    background: rgba(0, 0, 0, 0.03);
}

/* PROJECT ROW — CASE STUDY LABEL ON HOVER */
.proj-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: flex-start;
}

.proj-case-study {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-1);
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}

.proj-row:hover .proj-case-study {
    opacity: 1;
    transform: translateY(0);
}

/* On mobile, show the case study label without hover */
@media (max-width: 768px) {
    .proj-case-study {
        opacity: 1;
        transform: translateY(0);
        font-size: 0.7rem;
    }
}

.proj-num {
    font-family: var(--font-display);
    font-size: 0.8125rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.02em;
}

.proj-title {
    font-family: var(--font-display);
    font-size: clamp(1.375rem, 3.5vw, 2.75rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
    transition: color 0.3s, transform 0.4s var(--ease-out);
}

.proj-row:hover .proj-title {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transform: translateX(8px);
}

.proj-cat {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.proj-yr {
    font-family: var(--font-display);
    font-size: 0.8125rem;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.proj-arr {
    display: inline-flex;
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.35s, transform 0.4s var(--ease-out);
    color: var(--accent-1);
}

.proj-row:hover .proj-arr {
    opacity: 1;
    transform: translateX(0);
}

@media (max-width: 768px) {
    .proj-row {
        grid-template-columns: 32px 1fr auto;
    }
    .proj-cat, .proj-yr {
        display: none;
    }
    .proj-row:hover .proj-title {
        transform: translateX(4px);
    }
}

/* ═══════════════════════════════════════════════════════════════
   SERVICES SECTION
   ═══════════════════════════════════════════════════════════════ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.service-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 3rem 2rem;
    transition: transform 0.4s, box-shadow 0.4s, border-color 0.4s;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-1);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3), 0 0 40px var(--glow);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    box-shadow: 0 10px 30px var(--glow);
}

.service-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.service-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

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

/* ═══════════════════════════════════════════════════════════════
   PROCESS SECTION
   ═══════════════════════════════════════════════════════════════ */
.process__progress { 
    height: 2px; 
    background: var(--border-glass); 
    margin-block: var(--s-6) var(--s-7); 
    position: relative; 
}

.process__progress span { 
    position: absolute; 
    inset: 0 auto 0 0; 
    width: 0%; 
    background: var(--aurora); 
}

.process__list { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: var(--s-5); 
    list-style: none; 
    padding: 0; 
}

.process__num { 
    font-family: var(--font-mono); 
    color: var(--accent-1); 
    font-size: 0.85rem; 
    letter-spacing: 0.15em; 
}

.process__step h3 { 
    font-size: 1.4rem; 
    margin-block: var(--s-3) var(--s-2); 
}

.process__step p { 
    color: var(--fog); 
    font-size: 0.95rem; 
}

/* RESPONSIVE RULES FOR PROCESS */
@media (max-width: 768px) { 
    .process__list { grid-template-columns: 1fr 1fr; } 
}
@media (max-width: 560px) { 
    .process__list { grid-template-columns: 1fr; } 
}
/* ═══════════════════════════════════════════════════════════════
   FAQ SECTION — SEARCHABLE, FILTERABLE ACCORDION
   ═══════════════════════════════════════════════════════════════ */
.faq-header {
    margin-bottom: 3rem;
}

.faq-intro {
    color: var(--text-secondary);
    max-width: 60ch;
    margin-top: 1rem;
    line-height: 1.7;
}

/* ─── Controls bar ─── */
.faq-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 100px;
    padding: 0.6rem 0.8rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Search */
.faq-search {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.faq-search input {
    width: 100%;
    background: transparent;
    border: 1px solid var(--border-glass);
    border-radius: 100px;
    padding: 0.65rem 2.5rem 0.65rem 2.5rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.faq-search input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.faq-search input:focus {
    border-color: var(--accent-1);
    box-shadow: 0 0 20px -5px var(--glow);
}

.faq-search-icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    color: var(--text-secondary);
    pointer-events: none;
}

.faq-search-clear {
    position: absolute;
    right: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: var(--bg-glass);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}

.faq-search-clear svg {
    width: 12px;
    height: 12px;
}

.faq-search-clear:hover {
    color: var(--text-primary);
    background: var(--border-glass);
}

/* Category chips */
.faq-filters {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.faq-chip {
    padding: 0.45rem 1rem;
    border-radius: 100px;
    background: transparent;
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s;
    white-space: nowrap;
}

.faq-chip:hover {
    border-color: var(--accent-1);
    color: var(--text-primary);
}

.faq-chip.active {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 15px var(--glow);
}

/* Expand all */
.faq-expand-all {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1rem;
    border-radius: 100px;
    background: transparent;
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.25s;
    white-space: nowrap;
}

.faq-expand-all svg {
    width: 13px;
    height: 13px;
    transition: transform 0.35s var(--ease-out);
}

.faq-expand-all:hover {
    border-color: var(--accent-1);
    color: var(--text-primary);
    box-shadow: 0 0 15px -5px var(--glow);
}

.faq-expand-all.all-open svg {
    transform: rotate(180deg);
}

/* Result counter */
.faq-count {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

/* ─── FAQ items ─── */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.faq-item:hover {
    border-color: var(--accent-1);
    box-shadow: 0 0 30px -10px var(--glow);
}

.faq-item.open {
    border-color: var(--accent-1);
    box-shadow: 0 10px 40px -15px var(--glow);
}

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

.faq-question {
    width: 100%;
    display: grid;
    grid-template-columns: 44px 1fr 34px;
    align-items: center;
    gap: 1rem;
    padding: 1.4rem 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: inherit;
}

.faq-question:focus-visible {
    outline: 2px solid var(--accent-1);
    outline-offset: -2px;
    border-radius: 20px;
}

.faq-num {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.05em;
}

.faq-q-text {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
    transition: transform 0.35s var(--ease-out);
}

.faq-item:hover .faq-q-text {
    transform: translateX(4px);
}

/* Plus → X icon */
.faq-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: transform 0.45s var(--ease-out), border-color 0.3s, 
                color 0.3s, background 0.3s;
    flex-shrink: 0;
}

.faq-icon svg {
    width: 14px;
    height: 14px;
}

.faq-item.open .faq-icon {
    transform: rotate(45deg);
    border-color: var(--accent-1);
    color: var(--accent-1);
    background: color-mix(in srgb, var(--accent-1) 10%, transparent);
}

/* ─── Answer — grid-rows accordion (no height math, resize-proof) ─── */
.faq-answer-wrap {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.5s var(--ease-out);
}

.faq-item.open .faq-answer-wrap {
    grid-template-rows: 1fr;
}

.faq-answer {
    overflow: hidden;
    min-height: 0;
}

.faq-answer-inner {
    padding: 0 1.5rem 1.5rem 5.5rem;   /* aligns under question text */
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.75;
    max-width: 80ch;
}

.faq-answer-inner strong {
    color: var(--text-primary);
}

.faq-answer-inner a {
    color: var(--accent-1);
}

/* Search highlight */
mark.faq-hl {
    background: color-mix(in srgb, var(--accent-2) 25%, transparent);
    color: var(--text-primary);
    padding: 0.05em 0.3em;
    border-radius: 4px;
}

/* ─── Empty state ─── */
.faq-empty {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-glass);
    border: 1px dashed var(--border-glass);
    border-radius: 20px;
}

.faq-empty-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.faq-empty h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.faq-empty p {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

.faq-empty-reset {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border-radius: 100px;
    border: 1px solid var(--border-glass);
    background: transparent;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.25s;
}

.faq-empty-reset:hover {
    border-color: var(--accent-1);
    box-shadow: 0 0 15px -5px var(--glow);
}

/* ─── CTA ─── */
.faq-cta {
    margin-top: 3rem;
    text-align: center;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-card);
    padding: 2.5rem 2rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.faq-cta h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.faq-cta p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .faq-controls {
        border-radius: 24px;
        flex-direction: column;
        align-items: stretch;
    }
    .faq-controls > * {
        width: 100%;
    }
    .faq-filters {
        justify-content: center;
    }
    .faq-expand-all {
        justify-content: center;
    }
    .faq-question {
        grid-template-columns: 32px 1fr 32px;
        gap: 0.75rem;
        padding: 1.2rem 1.1rem;
    }
    .faq-q-text {
        font-size: 0.95rem;
    }
    .faq-icon {
        width: 32px;
        height: 32px;
    }
    .faq-answer-inner {
        padding: 0 1.1rem 1.25rem 1.1rem;
    }
}

/* ─── Reduced motion: instant accordion ─── */
@media (prefers-reduced-motion: reduce) {
    .faq-answer-wrap,
    .faq-icon,
    .faq-expand-all svg {
        transition: none;
    }
}

/* ═══════════════════════════════════════════════════════════════
   CONTACT SECTION — ADVANCED FORM
   ═══════════════════════════════════════════════════════════════ */
.contact { display: flex; flex-direction: column; align-items: center; }
.contact-header { text-align: center; margin-bottom: 3rem; }
.contact-title {
    font-family: var(--font-display); font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 700; line-height: 1.1; margin-bottom: 1.5rem; letter-spacing: -0.03em;
}
.contact-subtitle {
    font-size: 1.125rem; color: var(--text-secondary);
    max-width: 500px; margin: 0 auto; line-height: 1.7;
}
.contact-grid {
    display: grid; grid-template-columns: 1fr 1.5fr;
    gap: 4rem; width: 100%; align-items: start;
}
@media (max-width: 768px) { .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; } }

.contact-info { display: flex; flex-direction: column; gap: 1.5rem; }
.contact-info-card {
    display: flex; align-items: center; gap: 1rem;
    padding: 1.25rem 1.5rem; border-radius: 16px;
    background: var(--bg-glass); border: 1px solid var(--border-glass);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    transition: border-color 0.3s, transform 0.3s;
}
.contact-info-card:hover { border-color: var(--accent-1); transform: translateX(4px); }
.contact-info-icon {
    width: 44px; height: 44px; border-radius: 12px;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    display: flex; align-items: center; justify-content: center;
    color: white; flex-shrink: 0;
}
.contact-info-label { font-size: 0.75rem; color: var(--text-secondary); letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 0.25rem; }
.contact-info-value { font-family: var(--font-display); font-size: 1rem; font-weight: 600; color: var(--text-primary); text-decoration: none; transition: color 0.3s; }
a.contact-info-value:hover { color: var(--accent-1); }

.contact-socials {
    display: flex;
    flex-wrap: wrap;        /* ✅ Allows icons to wrap to next line */
    justify-content: center; /* ✅ Centers them when wrapped */
    gap: 0.75rem;
    margin-top: 1rem;
}

.social-link {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    flex-shrink: 0;         /* ✅ Prevents icons from shrinking */
}
.social-link:hover { border-color: var(--accent-1); color: var(--text-primary); transform: translateY(-3px); box-shadow: 0 8px 24px var(--glow); }

.contact-form {
    background: var(--bg-glass); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass); border-radius: 24px;
        padding: 1.5rem clamp(2rem, 3vw, 3rem) clamp(2rem, 3vw, 3rem); display: flex; flex-direction: column; gap: 2.5rem;
}
.form-group { position: relative; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%; background: transparent; border: none; border-bottom: 1px solid var(--border-glass);
    padding: 1.25rem 0 0.75rem; font-family: var(--font-body); font-size: 1rem;
    color: var(--text-primary); outline: none; transition: border-color 0.3s;
}
.contact-form textarea { resize: vertical; min-height: 100px; }
.contact-form input:focus, .contact-form textarea:focus { border-bottom-color: var(--accent-1); }

.contact-form input + label,
.contact-form textarea + label {
    position: absolute; top: 1.25rem; left: 0;
    font-size: 1rem; color: var(--text-secondary);
    pointer-events: none; transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.contact-form input:focus + label,
.contact-form input:not(:placeholder-shown) + label,
.contact-form textarea:focus + label,
.contact-form textarea:not(:placeholder-shown) + label {
    top: 0; font-size: 0.75rem; color: var(--accent-1); letter-spacing: 0.05em; text-transform: uppercase;
}
.optional { color: var(--text-secondary); font-size: 0.85em; text-transform: none; letter-spacing: 0; }

.form-line {
    position: absolute; bottom: 0; left: 0; width: 0; height: 2px;
    background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.contact-form input:focus ~ .form-line,
.contact-form textarea:focus ~ .form-line { width: 100%; }

.form-label-static {
    display: block; font-size: 0.75rem; font-weight: 600;
    letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--accent-1); margin-bottom: 0.75rem;
}

/* ADDED: Email Helper Tooltip */
.email-hint {
    position: absolute;
    top: 1.5rem;
    right: 0;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-secondary);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    transform: translateY(-2px);
}
/* ──────────────────────────────────────────────────────────────
   EMAIL HINT – Hide when input has content
   ────────────────────────────────────────────────────────────── */
.form-group input:not(:placeholder-shown) ~ .email-hint {
    opacity: 0;
    transform: translateY(-5px);
    pointer-events: none;
}
/* Show tooltip when input is focused or hovered */
.form-group:focus-within .email-hint,
.form-group:hover .email-hint {
    opacity: 0.6;
    transform: translateY(0);
}
/* ADDED: Premium Form Validation UI */
.form-error {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: #ef4444;
    letter-spacing: 0.03em;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s ease;
    pointer-events: none;
    position: absolute;              /* NEW — out of the layout flow */
    top: calc(100% + 0.5rem);        /* NEW — floats just below the field */
    left: 0;                         /* NEW */
}
.form-group.error .form-error {
    opacity: 1;
    transform: translateY(0);
}
/* Description field: sits lower to clear the "0 / 500" counter */
#error-desc {
    top: calc(100% + 1.4rem);
}
/* Removed the red lines to keep the UI clean, relying only on the shake and red text */
.form-group.error label {
    color: #ef4444 !important;
    text-shadow: none !important;
}

/* Shake animation if they click submit with errors */
@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}
.form-group.shake {
    animation: shakeError 0.4s ease;
}

/* ADDED: Form Section UI */
.form-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-glass), transparent);
    margin: 0.5rem 0 1rem 0;
}
.form-section-title {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}


/* ADDED: Input Focus Glow */
.form-group:focus-within .form-line {
    box-shadow: 0 4px 20px -5px var(--glow);
}
.form-group:focus-within label {
    text-shadow: 0 0 8px var(--glow);
}

.chip-group { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
    padding: 0.5rem 1.25rem; border-radius: 100px;
    background: var(--bg-glass); border: 1px solid var(--border-glass);
    color: var(--text-secondary); font-family: var(--font-body); font-size: 0.85rem;
    font-weight: 500; cursor: pointer; transition: all 0.3s;
    backdrop-filter: blur(10px);
}
.chip:hover { border-color: var(--accent-1); color: var(--text-primary); }
.chip.selected {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    border-color: transparent; color: white; box-shadow: 0 4px 20px var(--glow);
}

/* ADVANCED CUSTOM DROPDOWN */
.custom-select {
    position: relative;
    width: 100%;
    cursor: pointer;
    user-select: none;
}

.custom-select-trigger {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 0.875rem 1rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: border-color 0.3s, box-shadow 0.3s;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.custom-select.open .custom-select-trigger {
    border-color: var(--accent-1);
    box-shadow: 0 0 20px -5px var(--glow);
}
.custom-select-text.placeholder { color: var(--text-secondary); }
.custom-select-arrow { transition: transform 0.3s ease; color: var(--text-secondary); }
.custom-select.open .custom-select-arrow { transform: rotate(180deg); color: var(--accent-1); }

.custom-select-list {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    overflow: hidden;
    z-index: 10;
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
    transform-origin: top;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    max-height: 200px;
    overflow-y: auto;
}
.custom-select.open .custom-select-list {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.custom-select-option {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.custom-select-option:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}
.custom-select-option.selected {
    color: var(--accent-1);
    background: rgba(139, 92, 246, 0.05);
}
.custom-select-option.selected::after {
    content: '✓';
    font-weight: bold;
    color: var(--accent-1);
}



/* Custom Scrollbar for Dropdown */
.custom-select-list::-webkit-scrollbar { width: 4px; }
.custom-select-list::-webkit-scrollbar-track { background: transparent; }
.custom-select-list::-webkit-scrollbar-thumb { background: var(--border-glass); border-radius: 2px; }

/* ─── Budget Currency Toggle (inside dropdown) ─── */
.budget-currency-toggle {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border-glass);
    background: color-mix(in srgb, var(--bg-secondary) 50%, transparent);
}

.budget-cur-btn {
    flex: 1;
    padding: 0.45rem 0.5rem;
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.budget-cur-btn:hover {
    border-color: var(--accent-1);
    color: var(--text-primary);
}

.budget-cur-btn.active {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    border-color: transparent;
    color: white;
    box-shadow: 0 2px 10px var(--glow);
}

.budget-divider {
    height: 1px;
    background: var(--border-glass);
    margin: 0.4rem 0;
}

.budget-custom-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-1) !important;
    font-weight: 500;
}

/* ─── Custom Amount Input (below dropdown) ─── */
.budget-custom-wrap {
    margin-top: 0.75rem;
    position: relative;
}

.budget-custom-wrap input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-glass);
    padding: 1rem 6.5rem 0.75rem 0;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.3s;
}

.budget-custom-wrap input:focus {
    border-bottom-color: var(--accent-1);
}

.budget-custom-wrap input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.budget-custom-currency {
    position: absolute;
    top: 0.5rem;
    right: 0;
    display: flex;
    gap: 0.25rem;
}

.budget-custom-currency .budget-cur-btn {
    padding: 0.3rem 0.5rem;
    font-size: 0.6rem;
    flex: none;
}

.budget-custom-wrap .form-line {
    background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
}

@media (max-width: 640px) {
    .budget-custom-wrap {
        display: flex;
        flex-direction: column;
    }
    .budget-custom-wrap input {
        padding-right: 0;
        order: 1;
    }
    .budget-custom-wrap .form-line {
        position: static;
        width: 100%;
        order: 2;
        margin-top: -2px;
    }
    .budget-custom-currency {
        position: static;
        margin-top: 0.5rem;
        justify-content: flex-start;
        order: 3;
    }
}

.char-count {
    position: absolute; bottom: -1.25rem; right: 0;
    font-size: 0.7rem; color: var(--text-secondary); letter-spacing: 0.03em;
}

.upload-zone {
    border: 2px dashed var(--border-glass); border-radius: 16px;
    padding: 2rem; display: flex; flex-direction: column;
    align-items: center; gap: 0.5rem; cursor: pointer;
    transition: border-color 0.3s, background 0.3s; text-align: center;
    color: var(--text-secondary);
}
.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--accent-1); background: rgba(139, 92, 246, 0.05);
}
.upload-zone svg { margin-bottom: 0.25rem; }
.upload-text { font-size: 0.9rem; }
.upload-text strong { color: var(--accent-1); }
.upload-hint { font-size: 0.75rem; color: var(--text-secondary); opacity: 0.6; }
/* ADDED: Multi-File Upload List UI */
.file-list { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1rem; }
.file-item {
    background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border-glass);
    border-radius: 12px; padding: 0.75rem 1rem; display: flex; flex-direction: column; gap: 0.5rem;
    position: relative; overflow: hidden;
}
.file-item-info { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.file-item-name { font-size: 0.85rem; font-family: var(--font-mono); color: var(--text-primary); display: flex; align-items: center; gap: 0.5rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.file-item-name svg { width: 14px; height: 14px; color: var(--accent-1); flex-shrink: 0; }
.file-item-right { display: flex; align-items: center; gap: 1rem; flex-shrink: 0; }
.file-item-status { font-size: 0.7rem; color: var(--text-secondary); font-family: var(--font-mono); }
.file-item-status.done { color: #10b981; } /* Green for Done */
.file-item-remove { background: none; border: none; color: var(--text-secondary); cursor: pointer; transition: color 0.2s; padding: 4px; line-height: 0; display: flex; align-items: center; }
.file-item-remove:hover { color: #ef4444; } /* Red for hover */
.file-progress-track { width: 100%; height: 2px; background: rgba(255, 255, 255, 0.1); border-radius: 2px; overflow: hidden; }
.file-progress-bar { height: 100%; width: 0%; background: var(--accent-1); transition: width 0.2s linear; }

.form-submit {
    width: 100%;
    padding: 1.125rem 2rem;
    border: 1px solid var(--border-glass);
    border-radius: 100px;
    background: transparent;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transition: color 0.35s, border-color 0.35s, box-shadow 0.3s;
}

/* ─── THE FILL ANIMATION (slides up from bottom) ─── */
.form-submit::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    transform: translateY(102%);
    transition: transform 0.5s cubic-bezier(0.65, 0.05, 0.05, 1);
    border-radius: inherit;
}

.form-submit:hover {
    color: white;
    border-color: var(--accent-1);
    box-shadow: 0 8px 32px var(--glow);
}

.form-submit:hover::before {
    transform: translateY(0);
}


/* ADDED: Liquid Progress & Content Wrapper */
.submit-progress {
    position: absolute; top: 0; left: 0; width: 0%; height: 100%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    transition: width 2s linear;
    z-index: 1;
}
.submit-content {
    position: relative; z-index: 2;
    display: flex; align-items: center; justify-content: center; gap: 0.75rem;
}
.form-submit.loading .submit-text, .form-submit.loading .submit-arrow { display: none; }
.form-submit.loading .submit-progress { width: 100%; }
.submit-arrow { transition: transform 0.3s; }
.form-submit:active { transform: translateY(0); }
.submit-loading { display: none; }
.form-submit.loading .submit-loading { display: inline-flex; animation: spin 1s linear infinite; color: white; }
.form-submit.loading { pointer-events: none; opacity: 0.8; color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.form-submit:hover .submit-arrow { transform: translateX(4px); }

/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */
.footer {
    border-top: 1px solid var(--border-glass);
    padding: 2.5rem 2rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    position: relative;
}

.footer-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    min-height: 40px;
}

/* ─── LEFT SIDE: Privacy Policy & Terms of Use ─── */
.footer-left {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.footer-privacy,
.footer-terms,
.footer-cookie {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.875rem;
    white-space: nowrap;
}

/* Reset native <button> styling so "Manage Cookies" matches
   the adjacent footer links exactly — no inline styles needed. */
button.footer-manage-cookies {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font-family: inherit;
    font-size: 0.875rem;
    line-height: inherit;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.footer-privacy:hover,
.footer-terms:hover,
.footer-cookie:hover {
    color: var(--text-primary);
    text-decoration: none;
}

/* ─── COPYRIGHT – PERFECT CENTER ─── */
.footer-copyright {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.875rem;
    text-align: center;
}

/* ─── MOBILE: Stack Everything Vertically ─── */
@media (max-width: 768px) {
    .footer-inner {
        flex-direction: column;
        justify-content: center;
        min-height: auto;
        gap: 0.75rem;
    }
    
    .footer-left {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        flex-direction: column;
        gap: 0.5rem;
        order: 2;
    }
    
    .footer-copyright {
        order: 1;
    }
}

@media (max-width: 480px) {
    .footer {
        padding: 2rem 1rem;
    }
    
    .footer-privacy,
    .footer-terms,
    button.footer-manage-cookies,
    .footer-cookie,
    .footer-copyright {
        font-size: 0.75rem;
    }
}

/* ═══════════════════════════════════════════════════════════════
   SCROLL REVEAL ANIMATIONS
   ═══════════════════════════════════════════════════════════════ */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ═══════════════════════════════════════════════════════════════
   MODE SPECIAL EFFECTS
   ═══════════════════════════════════════════════════════════════ */
[data-mode="god"] .orb {
    animation: godFloat 3s infinite ease-in-out;
    filter: blur(60px) saturate(2);
}

@keyframes godFloat {
    0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); }
    33% { transform: translate(50px, -30px) scale(1.2) rotate(120deg); }
    66% { transform: translate(-30px, 50px) scale(0.8) rotate(240deg); }
}

[data-mode="ghost"] .grain {
    opacity: 0.005;
}

[data-mode="ghost"] .hero-title {
    font-weight: 300;
    letter-spacing: 0.05em;
}


/* ═══════════════════════════════════════════════════════════════
   CASE STUDY OVERLAY — PENUMBRA-STYLE WIPE
   Two classes = two-step animation:
   .is-open  → display (makes it exist)
   .is-in    → clip-path wipe (animates it in)
   ═══════════════════════════════════════════════════════════════ */
.case-study-modal {
    position: fixed;
    inset: 0;
    z-index: 10001;          /* above mobile preview (10000) */
    display: none;
}
.case-study-modal.is-open { display: block; }

/* ─── Backdrop ─── */
.cs-scrim {
    position: absolute;
    inset: 0;
    background: rgba(3, 3, 5, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.5s ease;
}
.case-study-modal.is-in .cs-scrim { opacity: 1; }

/* ─── Panel — THE WIPE ─── */
.cs-panel {
    position: absolute;
    inset: 0;
    margin: clamp(0px, 2vw, 24px);
    background: var(--bg-primary);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    overflow-y: auto;
    overscroll-behavior: contain;
    clip-path: inset(0 0 100% 0);       /* fully clipped = invisible */
    transition: clip-path 0.7s var(--ease-out);
}
.case-study-modal.is-in .cs-panel {
    clip-path: inset(0 0 0 0);          /* wipes upward into view */
}
.cs-panel::-webkit-scrollbar { width: 5px; }
.cs-panel::-webkit-scrollbar-track { background: transparent; }
.cs-panel::-webkit-scrollbar-thumb { background: var(--border-glass); border-radius: 3px; }

/* ─── Close button (rotates on hover) ─── */
.case-study-close {
    position: fixed;
    top: clamp(16px, 3vw, 32px);
    right: clamp(16px, 3vw, 32px);
    z-index: 5;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--border-glass);
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.35s var(--ease-out), border-color 0.3s, box-shadow 0.3s;
}
.case-study-close:hover {
    border-color: var(--accent-1);
    transform: rotate(90deg);
    box-shadow: 0 0 20px var(--glow);
}

/* ─── Injected content layout ─── */
.cs-body {
    max-width: 1100px;
    margin: 0 auto;
    padding: clamp(3rem, 7vw, 7rem) clamp(1.5rem, 6vw, 5rem);
}
.cs-top {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}
.cs-num {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-1);
}
.cs-tagline {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-left: auto;
}
.cs-title {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 7vw, 4.5rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin-bottom: 2.25rem;
}
.cs-heroimg {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--border-glass);
    margin-bottom: 3rem;
}
.cs-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 1.5rem;
    border-top: 1px solid var(--border-glass);
    border-bottom: 1px solid var(--border-glass);
    padding: 1.75rem 0;
    margin-bottom: 3rem;
}
.cs-meta span {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}
.cs-meta b { font-weight: 600; font-size: 0.9rem; }
.cs-sum {
    font-size: clamp(1.1rem, 2.2vw, 1.45rem);
    line-height: 1.55;
    color: var(--text-secondary);
    max-width: 60ch;
    margin-bottom: 3.5rem;
}
.cs-block { margin-bottom: 3rem; }
.cs-block h3 {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent-1);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.9rem;
}
.cs-block h3::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-glass);
}
.cs-block p {
    color: var(--text-secondary);
    line-height: 1.75;
    max-width: 75ch;
}
.cs-list {
    list-style: none;
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.cs-list li {
    color: var(--text-secondary);
    padding-left: 1.25rem;
    position: relative;
    line-height: 1.6;
}
.cs-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent-1);
}
.cs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 3rem;
}
.cs-grid img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--border-glass);
}
.cs-result {
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    background: var(--bg-glass);
    padding: clamp(1.5rem, 4vw, 2.75rem);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.9;
    margin-bottom: 3rem;
}
.cs-result i { font-style: normal; color: var(--accent-1); }
.cs-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 3rem;
}
.cs-tags span {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1px solid var(--border-glass);
    border-radius: 100px;
    padding: 0.45rem 0.9rem;
    color: var(--text-secondary);
}
.cs-cta {
    display: flex;
    justify-content: center;
    padding-top: 1rem;
}

/* ─── Rights & attribution notice ─── */
.cs-rights {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    background: var(--bg-glass);
    padding: 1.5rem 1.75rem;
    margin-bottom: 3rem;
}

.cs-rights-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid var(--accent-1);
    background: color-mix(in srgb, var(--accent-1) 10%, transparent);
    color: var(--accent-1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cs-rights-icon svg {
    width: 18px;
    height: 18px;
}

.cs-rights-text {
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.cs-rights-text strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.35rem;
}

.cs-rights-text a {
    color: var(--accent-1);
}

@media (max-width: 700px) {
    .cs-grid { grid-template-columns: 1fr; }
    .cs-heroimg { aspect-ratio: 16 / 10; }
    .cs-rights { flex-direction: column; }
}
.social-img {
    width: 24px; 
    height: 24px;
    object-fit: contain;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.social-link:hover .social-img {
    transform: rotate(360deg);
}

/* Turn black source logos (GitHub, Contra) white in dark modes.
   Framer is excluded — framer-white-icon.svg is already white. */
[data-mode="default"] img[alt="GitHub"],
[data-mode="default"] img[alt="Contra"],
[data-mode="god"] img[alt="GitHub"],
[data-mode="god"] img[alt="Contra"] {
    filter: invert(1); /* Turns black to white */
}

/* Ghost mode (light theme): GitHub and Contra un-invert back to black.
   Framer is a white source asset, so it must be INVERTED here — turning
   it black on the light background so it stays visible. */
[data-mode="ghost"] img[alt="GitHub"],
[data-mode="ghost"] img[alt="Contra"] {
    filter: invert(0);
}

[data-mode="ghost"] img[alt="Framer"] {
    filter: invert(1);
}

/* Custom Contact Info Icons */
.info-icon-img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    /* If your icons are black and don't show up on the colored gradient circle, 
       uncomment the line below to turn them white: */
    /* filter: brightness(0) invert(1); */
}

/* ═══════════════════════════════════════════════════════════════
   COMING SOON MODAL
   ═══════════════════════════════════════════════════════════════ */
.coming-soon-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 200000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.coming-soon-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.coming-soon-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.72);
    opacity: 0;
    transition: opacity 0.4s ease;
    will-change: opacity;
}

.coming-soon-modal.active .coming-soon-overlay {
    opacity: 1;
}

.coming-soon-content {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: 32px;
    padding: 3.5rem 3rem;
    max-width: 420px;
    width: 90%;
    text-align: center;
    transform: translateY(60px) scale(0.95);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.55);
    will-change: transform, opacity;
    backface-visibility: hidden;
}

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

.coming-soon-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 50%;
    padding: 0.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.coming-soon-close:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #ef4444;
    transform: rotate(90deg);
}

.coming-soon-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
    animation: float 3s ease-in-out infinite;
}

.coming-soon-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.75rem;
}

.coming-soon-description {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.coming-soon-badge {
    display: inline-block;
    padding: 0.4rem 1.2rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-1);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* REPLACE WITH */
@keyframes snapFade {
    0%   { opacity: 1; transform: scale(1)    rotate(0deg); }
    100% { opacity: 0; transform: scale(1.05) rotate(2deg); }
}

@keyframes overlayFade {
    0%   { opacity: 1; }
    100% { opacity: 0; }
}

.coming-soon-modal.snapping .coming-soon-content {
    animation: snapFade 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.coming-soon-modal.snapping .coming-soon-overlay {
    animation: overlayFade 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.coming-soon-modal.snapping {
    transition: none;
}

[data-mode="ghost"] .coming-soon-content {
    background: #ffffff;
}

@media (max-width: 768px) {
    .coming-soon-content {
        padding: 2.5rem 1.5rem;
        max-width: 90%;
    }
    .coming-soon-icon {
        font-size: 3rem;
    }
    .coming-soon-title {
        font-size: 1.5rem;
    }
}

/* ═══════════════════════════════════════════════════════════════
   PREMIUM WHATSAPP FLOATING BUTTON (Perfectly Centered & Liquid Smooth)
   ═══════════════════════════════════════════════════════════════ */
.whatsapp-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: inline-flex; /* Allows button to size perfectly to content */
    align-items: center; /* Vertically centers icon and text */
    justify-content: center; /* Horizontally centers icon when text is 0 */
    height: 60px; 
    padding: 0 16px; /* 16px + 28px(icon) + 16px = 60px perfect circle */
    border-radius: 30px;
    background: rgba(10, 10, 10, 0.7); /* Dark frosted glass */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 999;
    overflow: hidden; /* Hides the text before it expands */
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); /* Premium ease */
    will-change: transform, background, border-color;
}

.whatsapp-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0; /* Prevents icon from squishing */
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.whatsapp-text {
    max-width: 0;
    opacity: 0;
    margin-left: 0; /* Grows the gap smoothly */
    white-space: nowrap;
    overflow: hidden;
    transition: max-width 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                opacity 0.3s ease 0.05s, 
                margin-left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Desktop Hover: Expand text, turn border green, and pop up */
@media (hover: hover) {
    .whatsapp-btn:hover {
        border-color: #25D366; /* WhatsApp Green border */
        box-shadow: 0 15px 40px rgba(37, 211, 102, 0.3);
        transform: translateY(-2px);
    }
    .whatsapp-btn:hover .whatsapp-text {
        max-width: 160px; /* Expands the text area smoothly */
        opacity: 1;
        margin-left: 12px; /* Creates the gap between icon and text */
    }
    .whatsapp-btn:hover .whatsapp-icon {
        transform: rotate(10deg);
    }
}

/* Glowing Pulse Animation to draw attention */
@keyframes whatsappPulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4); }
    70% { box-shadow: 0 0 0 12px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.whatsapp-btn {
    animation: whatsappPulse 2.5s infinite;
}

/* On Mobile, keep icon-only (no hover exists, so no text expansion) */
@media (max-width: 768px) {
    .whatsapp-btn {
        animation: none; /* Stop pulsing on mobile to save battery */
    }
}

/* ─── CLEAR ALL BUTTON ─── */
.file-clear-all {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.7rem 1.4rem;
    margin-top: 0.75rem;
    background: rgba(239, 68, 68, 0.12);
    border: 1.5px solid rgba(239, 68, 68, 0.35);
    border-radius: 100px;
    color: #ef4444;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
    user-select: none;
}

.file-clear-all:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.25);
}

.file-clear-all:active {
    transform: scale(0.96);
}

.file-clear-all .file-count {
    background: rgba(239, 68, 68, 0.18);
    padding: 0.1rem 0.6rem;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #ef4444;
    min-width: 20px;
    text-align: center;
}

/* ─── TRASH ICON ─── */
.trash-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    position: relative;
    display: inline-block;
}

.trash-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.trash-lid {
    transform-origin: center bottom;
}

/* ─── BUTTON DISABLED STATE ─── */
.file-clear-all.loading {
    pointer-events: none;
    opacity: 0.6;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 480px) {
    .file-clear-all {
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
        gap: 0.4rem;
    }
    .trash-icon {
        width: 16px;
        height: 16px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   COOKIE CONSENT BANNER – PREMIUM UI/UX
   ═══════════════════════════════════════════════════════════════ */

/* ─── BANNER ─── */
.cookie-banner {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(120%) scale(0.95);
    z-index: 99999;
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    padding: 1.5rem 2rem;
    max-width: 820px;
    width: 92%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), 
                opacity 0.6s ease;
    opacity: 0;
    pointer-events: none;
}

.cookie-banner.active {
    transform: translateX(-50%) translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.cookie-banner-inner {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.cookie-banner-icon {
    font-size: 2.2rem;
    flex-shrink: 0;
    animation: cookieBounce 3s ease-in-out infinite;
    line-height: 1;
    margin-top: 0.1rem;
}

@keyframes cookieBounce {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(-5deg); }
}

.cookie-banner-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cookie-banner-text h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.cookie-banner-text p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

.cookie-banner-text p strong {
    color: var(--text-primary);
}

.cookie-banner-link {
    margin-top: 0.2rem !important;
    font-size: 0.8rem !important;
}

.cookie-banner-link a {
    color: var(--accent-1);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.cookie-banner-link a:hover {
    text-decoration: underline;
}

.cookie-banner-separator {
    color: var(--text-secondary);
    opacity: 0.3;
    margin: 0 0.5rem;
}

.cookie-banner-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

/* ─── BUTTONS ─── */
.cookie-btn {
    padding: 0.6rem 1.2rem;
    border-radius: 100px;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.cookie-btn .cookie-btn-icon {
    font-size: 0.9rem;
    line-height: 1;
}

.cookie-btn-accept {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    color: white;
    border: 1px solid transparent;
}

.cookie-btn-accept:hover {
    border-color: #25D366;
}

.cookie-btn-accept:active {
    transform: scale(0.97);
}

.cookie-btn-reject {
    background: var(--bg-glass);
    color: var(--text-secondary);
    border: 1px solid var(--border-glass);
}

.cookie-btn-reject:hover {
    border-color: rgba(239, 68, 68, 0.5);
}

.cookie-btn-reject:active {
    transform: scale(0.97);
}

.cookie-btn-preferences {
    background: var(--bg-glass);
    color: var(--text-secondary);
    border: 1px solid var(--border-glass);
}

.cookie-btn-preferences:hover {
    border-color: var(--accent-1);
}

.cookie-btn-preferences:active {
    transform: scale(0.97);
}

/* ─── MODAL ─── */
.cookie-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.cookie-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.cookie-modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    max-width: 520px;
    width: 92%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 2rem 2rem 1.5rem;
    transform: scale(0.92) translateY(30px);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), 
                opacity 0.4s ease;
    opacity: 0;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

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

.cookie-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.cookie-modal-header h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.cookie-modal-close {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.cookie-modal-close:hover {
    border-color: var(--accent-1);
    color: var(--text-primary);
    transform: rotate(90deg);
}

.cookie-modal-close svg {
    width: 18px;
    height: 18px;
}

.cookie-modal-body {
    margin-bottom: 1.5rem;
}

.cookie-modal-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.cookie-modal-description strong {
    color: var(--text-primary);
}

/* ─── PREFERENCES ─── */
.cookie-preference {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--border-glass);
    gap: 1rem;
}

.cookie-preference:last-child {
    border-bottom: none;
}

.cookie-preference-info {
    flex: 1;
}

.cookie-preference-info h4 {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.1rem;
}

.cookie-preference-info p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.cookie-required-badge {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-1);
    background: rgba(139, 92, 246, 0.1);
    padding: 0.1rem 0.6rem;
    border-radius: 100px;
    margin-top: 0.3rem;
}

/* ─── TOGGLE ─── */
.cookie-toggle {
    position: relative;
    width: 44px;
    height: 26px;
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle .slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--border-glass);
    border-radius: 26px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.cookie-toggle .slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: var(--text-primary);
    border-radius: 50%;
    transition: transform 0.3s ease, background 0.3s ease;
}

.cookie-toggle input:checked + .slider {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
}

.cookie-toggle input:checked + .slider::before {
    transform: translateX(18px);
}

.cookie-toggle input:disabled + .slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.cookie-toggle input:disabled + .slider::before {
    background: var(--text-secondary);
}

/* ─── MODAL FOOTER ─── */
.cookie-modal-footer {
    display: flex;
    gap: 0.6rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-glass);
    flex-wrap: wrap;
}

.cookie-modal-footer .cookie-btn {
    flex: 1;
    min-width: 100px;
    text-align: center;
    justify-content: center;
}

.cookie-modal-footer .cookie-btn-accept {
    flex: 1.5;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
    .cookie-banner {
        bottom: 1rem;
        padding: 1.25rem;
        width: 95%;
        border-radius: 16px;
    }

    .cookie-banner-inner {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }

    .cookie-banner-icon {
        font-size: 1.8rem;
        text-align: center;
    }

    .cookie-banner-text h3 {
        font-size: 1rem;
        text-align: center;
    }

    .cookie-banner-text p {
        font-size: 0.8rem;
        text-align: center;
    }

    .cookie-banner-link {
        text-align: center;
    }

    .cookie-banner-actions {
        justify-content: stretch;
        gap: 0.5rem;
    }

    .cookie-banner-actions .cookie-btn {
        flex: 1;
        text-align: center;
        justify-content: center;
        padding: 0.5rem 0.8rem;
        font-size: 0.7rem;
    }

    .cookie-banner-actions .cookie-btn .cookie-btn-icon {
        font-size: 0.7rem;
    }

    .cookie-modal {
        padding: 1.5rem;
        max-width: 95%;
    }

    .cookie-modal-header h3 {
        font-size: 1.1rem;
    }

    .cookie-preference {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .cookie-modal-footer {
        flex-direction: column;
    }

    .cookie-modal-footer .cookie-btn {
        flex: none;
        width: 100%;
        justify-content: center;
    }

    .cookie-modal-footer .cookie-btn-accept {
        flex: none;
    }
}

@media (max-width: 480px) {
    .cookie-banner {
        padding: 1rem;
        bottom: 0.5rem;
        border-radius: 12px;
    }

    .cookie-banner-actions {
        flex-direction: column;
    }

    .cookie-banner-actions .cookie-btn {
        width: 100%;
        justify-content: center;
    }

    .cookie-modal {
        padding: 1.25rem;
        max-height: 90vh;
    }
}

/* ─── MODAL SCROLLBAR ─── */
.cookie-modal::-webkit-scrollbar {
    width: 4px;
}

.cookie-modal::-webkit-scrollbar-track {
    background: transparent;
}

.cookie-modal::-webkit-scrollbar-thumb {
    background: var(--border-glass);
    border-radius: 2px;
}

.cookie-modal::-webkit-scrollbar-thumb:hover {
    background: var(--accent-1);
}

/* ── UNIVERSAL NOSCRIPT FALLBACK (All Screen Sizes) ── */
.noscript-fallback {
  display: flex; /* Always visible when JS is off */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); /* Safari/iOS support */
  z-index: 999999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.noscript-fallback__content {
  background: #ffffff;
  padding: 40px 30px;
  border-radius: 24px;
  max-width: 500px; /* Slightly larger for desktop readability */
  width: 100%;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
  animation: fadeInUp 0.4s ease;
}

.noscript-fallback__title {
  font-size: 24px; /* Slightly larger for desktop */
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  color: #000000;
  margin-bottom: 16px;
  line-height: 1.3;
}

.noscript-fallback__text {
  font-size: 17px; /* Slightly larger for desktop */
  line-height: 1.6;
  font-family: 'Inter', sans-serif;
  color: #333333;
  margin-bottom: 0;
}

/* ── RESPONSIVE: Optimize for smaller screens ── */
@media (max-width: 768px) {
  .noscript-fallback__content {
    padding: 30px 20px;
    max-width: 400px;
  }
  .noscript-fallback__title {
    font-size: 20px;
  }
  .noscript-fallback__text {
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .noscript-fallback__content {
    padding: 24px 16px;
    max-width: 340px;
  }
  .noscript-fallback__title {
    font-size: 18px;
  }
  .noscript-fallback__text {
    font-size: 14px;
  }
}


.checkbox-wrapper {
    margin-top: -3.50rem;
}

.premium-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    cursor: pointer;
    position: relative;
    padding: 4px 0;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* ─── HIDDEN INPUT ─── */
.premium-checkbox input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* ─── CUSTOM CHECKMARK BOX ─── */
.premium-checkbox .checkmark {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    margin-top: 2px;
    border: 2px solid var(--border-glass);
    border-radius: 6px;
    background: var(--bg-glass);
    position: relative;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ─── SVG CHECKMARK ICON ─── */
.premium-checkbox .checkmark svg {
    width: 16px;
    height: 16px;
    stroke: white;
    transform: scale(0);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* ─── HOVER STATE ─── */
.premium-checkbox:hover .checkmark {
    border-color: var(--accent-1);
    transform: scale(1.05);
    box-shadow: 0 0 20px var(--glow);
}

.premium-checkbox:hover .checkbox-text {
    color: var(--text-primary);
}

/* ─── CHECKED STATE ─── */
.premium-checkbox input:checked ~ .checkmark {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    border-color: var(--accent-1);
    box-shadow: 0 4px 20px var(--glow);
    transform: scale(1);
}

.premium-checkbox input:checked ~ .checkmark svg {
    transform: scale(1);
}

/* ─── FOCUS STATE (keyboard accessibility) ─── */
.premium-checkbox input:focus-visible ~ .checkmark {
    outline: 2px solid var(--accent-1);
    outline-offset: 3px;
    box-shadow: 0 0 30px var(--glow);
}

/* ─── CHECKBOX TEXT ─── */
.premium-checkbox .checkbox-text {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.premium-checkbox .checkbox-subtext {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.6;
    margin-top: 1px;
}

/* ─── ERROR STATE ─── */
.premium-checkbox.error .checkmark {
    border-color: #ef4444;
    animation: checkboxShake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
    box-shadow: 0 0 25px rgba(239, 68, 68, 0.3);
}

.premium-checkbox.error .checkbox-text {
    color: #ef4444;
}

.premium-checkbox.error .checkbox-subtext {
    color: rgba(239, 68, 68, 0.5);
}

.checkbox-error {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: #ef4444;
    letter-spacing: 0.03em;
    margin-top: 6px;
    padding-left: 40px;
    opacity: 0;
    transform: translateY(-4px);
    transition: all 0.3s ease;
    height: 0;
    overflow: hidden;
}

.checkbox-error.visible {
    opacity: 1;
    transform: translateY(0);
    height: auto;
}

/* ─── SHAKE ANIMATION ─── */
@keyframes checkboxShake {
    0%, 100% { transform: translateX(0) scale(1); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-6px) scale(1.02); }
    20%, 40%, 60%, 80% { transform: translateX(6px) scale(1.02); }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 480px) {
    .premium-checkbox {
        gap: 12px;
    }
    
    .premium-checkbox .checkmark {
        width: 20px;
        height: 20px;
        margin-top: 1px;
    }
    
    .premium-checkbox .checkmark svg {
        width: 13px;
        height: 13px;
    }
    
    .premium-checkbox .checkbox-text {
        font-size: 0.8rem;
    }
    
    .premium-checkbox .checkbox-subtext {
        font-size: 0.7rem;
    }
    
     .checkbox-error {
        padding-left: 32px;
        font-size: 0.65rem;
    }
}

/* ═══════════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS — non-blocking inline feedback
   ═══════════════════════════════════════════════════════════════ */
.toast-stack {
    position: fixed;
    bottom: 6rem;
    right: 2rem;
    z-index: 100001;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-width: 260px;
    max-width: 340px;
    padding: 0.9rem 1.1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    font-family: var(--font-body);
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-primary);
    pointer-events: auto;
    opacity: 0;
    transform: translateX(20px) scale(0.96);
    transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.toast.is-visible {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.toast.is-leaving {
    opacity: 0;
    transform: translateX(20px) scale(0.96);
}

.toast__icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    margin-top: 1px;
}

.toast__body { flex: 1; }

.toast__title {
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.toast__message {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Toast variants */
.toast--warn { border-color: rgba(245, 158, 11, 0.5); }
.toast--warn .toast__icon {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.toast--error { border-color: rgba(239, 68, 68, 0.5); }
.toast--error .toast__icon {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.toast--success { border-color: rgba(16, 185, 129, 0.5); }
.toast--success .toast__icon {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

@media (max-width: 768px) {
    .toast-stack {
        left: 1rem;
        right: 1rem;
        bottom: 5.5rem;
    }
    .toast {
        min-width: 0;
        max-width: none;
    }
}


.contact-grid,
.contact-form,
.file-list,
.file-item,
.file-item-info,
.file-item-name {
    min-width: 0;
}

/* The filename span needs the ellipsis rules — not the flex parent. */
.file-item-name span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}