*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ═══════════════════════════════════════════════════════════════
   DUOTONE COLOR SYSTEM — 3 Themes
   • [data-palette="warm"]  — Pink / Peach / Coral
   • [data-palette="cool"]  — Slate Blue / Indigo / Klein
   • [data-palette="earth"] — Leaf / Patina / Titian / Paper
   Theme transitions are driven by GSAP ScrollTrigger
═══════════════════════════════════════════════════════════════ */

:root {
    /* ── Base Dark System ─────────────────────────────────── */
    --bg-dark: #060913;
    --bg-primary: var(--bg-dark);
    --bg-card: rgba(13, 20, 38, 0.45);
    --bg-card-hover: rgba(22, 33, 62, 0.65);
    --border-light: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.15);

    --text-primary: #f8fafc;
    --text-muted: #94a3b8;

    --accent-primary: #3b82f6;
    --accent-green: #10b981;
    --accent-rose: #f43f5e;
    --accent-purple: #8b5cf6;
    --accent-yellow: #eab308;
    --accent-cyan: #06b6d4;
    --accent-indigo: #6366f1;
    --accent-mint: #2dd4bf;

    --header-bg: rgba(6, 9, 19, 0.75);
    --header-shadow: rgba(0, 0, 0, 0.4);
    --grid-line: rgba(255, 255, 255, 0.02);
    --noise-opacity: 0.035;
    --glass-bg: rgba(11, 15, 30, 0.6);
    --input-bg: rgba(255, 255, 255, 0.03);
    --input-focus-bg: rgba(255, 255, 255, 0.08);
    --card-shadow: rgba(0, 0, 0, 0.7);
    --footer-bg: #04060d;
    --theme-toggle-glow: rgba(59, 130, 246, 0.25);

    /* ── Duotone Palette Variables (animated by JS/GSAP) ── */
    --duo-primary: #3b82f6;
    --duo-secondary: #8b5cf6;
    --duo-bg-from: #060913;
    --duo-bg-to: #060913;
    --duo-accent: #60a5fa;
    --duo-blob-a: rgba(59, 130, 246, 0.12);
    --duo-blob-b: rgba(139, 92, 246, 0.1);
    --duo-blob-c: rgba(16, 185, 129, 0.08);

    /* ── Transition Speed ── */
    --palette-transition: 1.2s;
}

/* ── WARM PALETTE (Hero / CTA) ── */
:root[data-palette="warm"] {
    --duo-primary: #e77c8e;
    --duo-secondary: #ed9874;
    --duo-bg-from: #1a0a0d;
    --duo-bg-to: #1a0f08;
    --duo-accent: #f9cb8b;
    --duo-blob-a: rgba(231, 124, 142, 0.13);
    --duo-blob-b: rgba(237, 152, 116, 0.1);
    --duo-blob-c: rgba(249, 203, 139, 0.08);
}

/* ── COOL PALETTE (About / Values) ── */
:root[data-palette="cool"] {
    --duo-primary: #0c567d;
    --duo-secondary: #425066;
    --duo-bg-from: #010d18;
    --duo-bg-to: #05091a;
    --duo-accent: #4a8fa8;
    --duo-blob-a: rgba(12, 86, 125, 0.14);
    --duo-blob-b: rgba(66, 80, 102, 0.1);
    --duo-blob-c: rgba(1, 38, 150, 0.07);
}

/* ── EARTH PALETTE (Projects) ── */
:root[data-palette="earth"] {
    --duo-primary: #549688;
    --duo-secondary: #c3d94e;
    --duo-bg-from: #080d07;
    --duo-bg-to: #0c100a;
    --duo-accent: #b05b24;
    --duo-blob-a: rgba(84, 150, 136, 0.13);
    --duo-blob-b: rgba(195, 217, 78, 0.08);
    --duo-blob-c: rgba(176, 91, 36, 0.09);
}

/* Light Theme Overrides */
:root.light-theme {
    --bg-dark: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.75);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    --border-light: rgba(15, 23, 42, 0.08);
    --border-hover: rgba(15, 23, 42, 0.18);
    --text-primary: #0f172a;
    --text-muted: #64748b;
    --accent-primary: #2563eb;
    --accent-green: #059669;
    --accent-rose: #e11d48;
    --accent-purple: #7c3aed;
    --accent-yellow: #ca8a04;
    --accent-cyan: #0891b2;
    --accent-indigo: #4f46e5;
    --accent-mint: #0d9488;
    --header-bg: rgba(248, 250, 252, 0.85);
    --header-shadow: rgba(15, 23, 42, 0.05);
    --grid-line: rgba(15, 23, 42, 0.025);
    --noise-opacity: 0.015;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --input-bg: rgba(15, 23, 42, 0.04);
    --input-focus-bg: rgba(15, 23, 42, 0.07);
    --card-shadow: rgba(15, 23, 42, 0.06);
    --footer-bg: #f1f5f9;
    --theme-toggle-glow: rgba(234, 179, 8, 0.3);
}

@media (prefers-color-scheme: light) {
    :root:not(.dark-theme) {
        --bg-dark: #f8fafc;
        --bg-card: rgba(255, 255, 255, 0.75);
        --bg-card-hover: rgba(255, 255, 255, 0.95);
        --border-light: rgba(15, 23, 42, 0.08);
        --border-hover: rgba(15, 23, 42, 0.18);
        --text-primary: #0f172a;
        --text-muted: #64748b;
        --accent-primary: #2563eb;
        --accent-green: #059669;
        --accent-rose: #e11d48;
        --accent-purple: #7c3aed;
        --accent-yellow: #ca8a04;
        --accent-cyan: #0891b2;
        --accent-indigo: #4f46e5;
        --accent-mint: #0d9488;
        --header-bg: rgba(248, 250, 252, 0.85);
        --header-shadow: rgba(15, 23, 42, 0.05);
        --grid-line: rgba(15, 23, 42, 0.025);
        --noise-opacity: 0.015;
        --glass-bg: rgba(255, 255, 255, 0.8);
        --input-bg: rgba(15, 23, 42, 0.04);
        --input-focus-bg: rgba(15, 23, 42, 0.07);
        --card-shadow: rgba(15, 23, 42, 0.06);
        --footer-bg: #f1f5f9;
        --theme-toggle-glow: rgba(234, 179, 8, 0.3);
    }
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg-dark);
    color: var(--text-primary);
    font-family: "DM Sans", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    transition:
        background-color var(--palette-transition) cubic-bezier(0.4, 0, 0.2, 1),
        color var(--palette-transition) cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── DYNAMIC GRID & NOISE OVERLAY ── */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.035'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 999;
    opacity: 0.4;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
        linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: -1;
}

/* ── LANGUAGE SWITCHER LOGIC ── */
html[lang="zh-TW"] .lang-en {
    display: none !important;
}
html[lang="en"] .lang-zh {
    display: none !important;
}

/* ═══════════════════════════════════════════════════════════════
   GLOWING BACKGROUND BLOBS — Animate with Palette
═══════════════════════════════════════════════════════════════ */
.glow-blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(140px);
    pointer-events: none;
    z-index: -2;
    transition:
        background var(--palette-transition) ease,
        opacity 0.8s ease;
    will-change: transform, background;
}
.blob-1 {
    top: 5%;
    right: 10%;
    width: 500px;
    height: 500px;
    background: var(--duo-blob-a);
    opacity: 1;
    animation: blobFloat1 18s ease-in-out infinite;
}
.blob-2 {
    top: 45%;
    left: 5%;
    width: 600px;
    height: 600px;
    background: var(--duo-blob-b);
    opacity: 1;
    animation: blobFloat2 22s ease-in-out infinite;
}
.blob-3 {
    bottom: 10%;
    right: 15%;
    width: 450px;
    height: 450px;
    background: var(--duo-blob-c);
    opacity: 1;
    animation: blobFloat3 16s ease-in-out infinite;
}

@keyframes blobFloat1 {
    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -20px) scale(1.05);
    }
    66% {
        transform: translate(-15px, 25px) scale(0.97);
    }
}
@keyframes blobFloat2 {
    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }
    40% {
        transform: translate(-25px, -30px) scale(1.08);
    }
    70% {
        transform: translate(20px, 15px) scale(0.95);
    }
}
@keyframes blobFloat3 {
    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(20px, -25px) scale(1.04);
    }
}

/* ── TYPOGRAPHY ── */
h1,
h2,
h3,
.nav-logo,
.value-num,
.widget-metric {
    font-family: "Space Grotesk", sans-serif;
}

/* ═══════════════════════════════════════════════════════════════
   SCROLL PROGRESS BAR
═══════════════════════════════════════════════════════════════ */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(
        90deg,
        var(--duo-primary),
        var(--duo-secondary),
        var(--duo-accent)
    );
    z-index: 9999;
    transition:
        width 0.1s linear,
        background 0.8s ease;
    will-change: width;
}

/* ═══════════════════════════════════════════════════════════════
   NAVIGATION
═══════════════════════════════════════════════════════════════ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: var(--header-bg);
    border-bottom: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.header.scrolled {
    box-shadow: 0 10px 30px -10px var(--header-shadow);
    border-bottom-color: var(--border-hover);
}

.nav {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 2rem;
}

.nav-logo {
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
}

.nav-logo span {
    color: var(--duo-primary);
    transition: color var(--palette-transition) ease;
}

.logo-icon {
    color: var(--duo-primary);
    transition:
        transform 0.3s ease,
        color var(--palette-transition) ease;
}
.nav-logo:hover .logo-icon {
    transform: rotate(15deg);
}

.nav-links {
    display: flex;
    gap: 2.25rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
}

.nav-links a::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--duo-primary);
    transition:
        width 0.3s ease,
        background var(--palette-transition) ease;
}

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

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Language selector */
.lang-selector {
    display: inline-flex;
    background: var(--input-bg);
    border: 1px solid var(--border-light);
    padding: 3px;
    border-radius: 99px;
    gap: 2px;
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: "Space Grotesk", sans-serif;
    font-weight: 500;
    font-size: 0.72rem;
    padding: 0.35rem 0.8rem;
    border-radius: 99px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-btn:hover {
    color: var(--text-primary);
}

.lang-btn.active {
    background: var(--duo-primary);
    color: #ffffff;
    box-shadow: 0 4px 12px -3px var(--duo-primary);
    transition:
        background var(--palette-transition) ease,
        box-shadow var(--palette-transition) ease;
}

/* ── THEME TOGGLE BUTTON ── */
.theme-toggle {
    background: var(--input-bg);
    border: 1px solid var(--border-light);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    width: 38px;
    height: 38px;
    outline: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.theme-toggle:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
    background: var(--input-focus-bg);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 15px var(--theme-toggle-glow);
}

.theme-toggle:active {
    transform: translateY(0) scale(0.95);
}

.theme-icon {
    position: absolute;
    transition:
        transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
        opacity 0.3s ease;
}

:root:not(.light-theme) .sun-icon {
    transform: scale(1) rotate(0);
    opacity: 1;
}
:root:not(.light-theme) .moon-icon {
    transform: scale(0) rotate(90deg);
    opacity: 0;
}
:root.light-theme .sun-icon {
    transform: scale(0) rotate(-90deg);
    opacity: 0;
}
:root.light-theme .moon-icon {
    transform: scale(1) rotate(0);
    opacity: 1;
}

@media (prefers-color-scheme: light) {
    :root:not(.dark-theme) .sun-icon {
        transform: scale(0) rotate(-90deg);
        opacity: 0;
    }
    :root:not(.dark-theme) .moon-icon {
        transform: scale(1) rotate(0);
        opacity: 1;
    }
}

/* ── BUTTONS ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.8rem 1.6rem;
    border-radius: 8px;
    font-family: "DM Sans", sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-nav {
    padding: 0.5rem 1.1rem;
    font-size: 0.8rem;
    border-radius: 6px;
}

.btn-primary {
    background: var(--duo-primary);
    color: #ffffff;
    border: 1px solid var(--duo-primary);
    transition:
        background var(--palette-transition) ease,
        border-color var(--palette-transition) ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.btn-primary:hover {
    filter: brightness(1.15);
    box-shadow: 0 10px 20px -10px var(--duo-primary);
    transform: translateY(-2px);
}

.btn-line {
    background: #06c755;
    border-color: #06c755;
}

.btn-line:hover {
    background: #05b04b;
    border-color: #05b04b;
    box-shadow: 0 10px 20px -10px rgba(6, 199, 85, 0.5);
}

.btn-ghost {
    background: var(--input-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.btn-ghost:hover {
    background: var(--input-focus-bg);
    border-color: var(--border-hover);
}

/* ═══════════════════════════════════════════════════════════════
   HERO SECTION — Immersive + GSAP Kinetic Typography
═══════════════════════════════════════════════════════════════ */
.hero {
    max-width: 1300px;
    margin: 0 auto;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 3rem;
    padding: 9rem 2rem 4rem;
    position: relative;
}

/* Hero background gradient overlay */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse 70% 60% at 20% 50%,
        rgba(var(--duo-primary-rgb, 59, 130, 246), 0.06) 0%,
        transparent 70%
    );
    pointer-events: none;
    z-index: 0;
    transition: background var(--palette-transition) ease;
}

.hero-text {
    position: relative;
    z-index: 10;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--duo-primary);
    margin-bottom: 1.25rem;
    opacity: 0; /* GSAP animates in */
    transition: color var(--palette-transition) ease;
}

.hero-eyebrow::before {
    content: "";
    display: block;
    width: 1.5rem;
    height: 2px;
    background: var(--duo-primary);
    transition: background var(--palette-transition) ease;
}

/* Kinetic Typography — words split for GSAP SplitText-style */
h1 {
    font-weight: 700;
    font-size: clamp(2.8rem, 5.5vw, 5.2rem);
    line-height: 1.06;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

h1 em {
    font-style: normal;
    color: transparent;
    background: linear-gradient(
        135deg,
        var(--duo-accent) 0%,
        var(--duo-primary) 50%,
        var(--duo-secondary) 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    transition: background var(--palette-transition) ease;
}

/* Word-level animation targets injected by JS */
.word {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
    margin-right: 0.25em;
}

.word-inner {
    display: inline-block;
    transform: translateY(110%);
    opacity: 0;
}

.hero-sub {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 520px;
    line-height: 1.75;
    margin-bottom: 2.5rem;
    font-weight: 300;
    opacity: 0;
    transform: translateY(20px);
}

.hero-cta {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    opacity: 0;
    transform: translateY(20px);
}

/* ── HERO VISUAL / WIDGETS ── */
.hero-visual {
    position: relative;
    height: 520px;
    width: 100%;
    z-index: 10;
    will-change: transform;
}

.mock-widget {
    position: absolute;
    background: var(--glass-bg);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 20px 40px -15px var(--card-shadow);
    width: 255px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    transform: translateY(30px);
}

.mock-widget.widget-visible {
    opacity: 1;
    transform: translateY(0);
}

.mock-widget:hover {
    border-color: var(--duo-primary);
    transform: scale(1.03) translateY(-4px);
    z-index: 30;
    box-shadow:
        0 20px 40px -10px var(--card-shadow),
        0 0 20px -5px var(--duo-primary);
}

.w-legal {
    top: 4%;
    left: 2%;
    border-left: 3px solid var(--accent-green);
}
.w-f1 {
    top: 36%;
    right: 2%;
    width: 270px;
    border-left: 3px solid var(--accent-rose);
}
.w-stock {
    top: 66%;
    left: 6%;
    border-left: 3px solid var(--accent-primary);
}
.w-itero {
    top: 10%;
    right: 8%;
    border-left: 3px solid var(--accent-purple);
}

.widget-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.widget-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
}
.widget-dot.green {
    background: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green);
}
.widget-dot.rose {
    background: var(--accent-rose);
    box-shadow: 0 0 8px var(--accent-rose);
}
.widget-dot.blue {
    background: var(--accent-primary);
    box-shadow: 0 0 8px var(--accent-primary);
}
.widget-dot.purple {
    background: var(--accent-purple);
    box-shadow: 0 0 8px var(--accent-purple);
}

.widget-title {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.widget-metric {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.15;
    margin-bottom: 0.25rem;
}
.widget-metric.green-text {
    color: var(--accent-green);
}
.widget-metric.rose-text {
    color: var(--accent-rose);
}
.widget-metric.blue-text {
    color: var(--accent-primary);
}
.widget-metric.purple-text {
    color: var(--accent-purple);
}

.widget-label {
    font-size: 0.78rem;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.widget-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* ── SCROLL DOWN INDICATOR ── */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    animation: fadeInUp 1s 2s ease forwards;
}

.scroll-indicator span {
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
}

.scroll-mouse {
    width: 22px;
    height: 36px;
    border: 2px solid var(--border-hover);
    border-radius: 11px;
    position: relative;
}

.scroll-mouse::after {
    content: "";
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 6px;
    background: var(--duo-primary);
    border-radius: 2px;
    animation: scrollBounce 1.8s ease-in-out infinite;
    transition: background var(--palette-transition) ease;
}

@keyframes scrollBounce {
    0% {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateX(-50%) translateY(12px);
        opacity: 0;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ═══════════════════════════════════════════════════════════════
   SECTIONS GENERAL
═══════════════════════════════════════════════════════════════ */
.section {
    padding: 8rem 2rem;
    position: relative;
}

.section-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.section-tag {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--duo-primary);
    margin-bottom: 1.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    transition: color var(--palette-transition) ease;
}

.section-tag::before {
    content: "";
    display: block;
    width: 1.2rem;
    height: 2px;
    background: var(--duo-primary);
    transition: background var(--palette-transition) ease;
}

h2 {
    font-weight: 700;
    font-size: clamp(2rem, 3.8vw, 3.2rem);
    letter-spacing: -0.03em;
    line-height: 1.12;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.divider {
    border: none;
    border-top: 1px solid var(--border-light);
    max-width: 1200px;
    margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════════
   STICKY PARALLAX SECTION WRAPPER
   Used to pin sections during scroll for layered reveal effect
═══════════════════════════════════════════════════════════════ */
.parallax-section-wrapper {
    position: relative;
    overflow: hidden;
}

/* Mask reveal overlay for section transitions */
.section-mask {
    position: absolute;
    inset: 0;
    background: var(--bg-dark);
    transform-origin: center center;
    pointer-events: none;
    z-index: 5;
    transition: background var(--palette-transition) ease;
}

/* ═══════════════════════════════════════════════════════════════
   ABOUT SECTION
═══════════════════════════════════════════════════════════════ */
.about-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 5rem;
    align-items: center;
}

.about-text p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-weight: 300;
}

.about-text p strong {
    color: var(--text-primary);
    font-weight: 500;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.stat-box {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 2rem 1.75rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition:
        border-color 0.3s ease,
        transform 0.3s ease,
        box-shadow 0.3s ease;
    cursor: default;
}

.stat-box:hover {
    border-color: var(--duo-primary);
    transform: translateY(-4px);
    box-shadow:
        0 12px 28px -8px rgba(0, 0, 0, 0.4),
        0 0 16px -6px var(--duo-primary);
}

.stat-num {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--duo-primary);
    line-height: 1;
    margin-bottom: 0.5rem;
    transition: color var(--palette-transition) ease;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
    font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════
   X-RAY INTERACTIVE SECTION
   Clip-path reveal on mouse move / scroll
═══════════════════════════════════════════════════════════════ */
.xray-section {
    padding: 8rem 2rem;
    overflow: hidden;
    position: relative;
}

.xray-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.xray-header {
    text-align: center;
    margin-bottom: 5rem;
}

.xray-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    border-radius: 24px;
    overflow: hidden;
    cursor: crosshair;
    aspect-ratio: 16 / 7;
    background: linear-gradient(
        135deg,
        rgba(13, 20, 38, 0.9) 0%,
        rgba(6, 9, 19, 0.95) 100%
    );
    border: 1px solid var(--border-light);
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.8);
    transition: border-color 0.3s ease;
}

.xray-container:hover {
    border-color: var(--duo-primary);
}

/* Layer A — "Surface" view */
.xray-layer-a {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1.5rem;
    padding: 3rem;
    background: linear-gradient(
        135deg,
        rgba(13, 20, 38, 0.95) 0%,
        rgba(6, 9, 19, 0.98) 100%
    );
    z-index: 1;
}

/* Layer B — "X-Ray" revealed layer */
.xray-layer-b {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1.5rem;
    padding: 3rem;
    background: linear-gradient(
        135deg,
        rgba(
                var(--duo-primary-r, 59),
                var(--duo-primary-g, 130),
                var(--duo-primary-b, 246),
                0.08
            )
            0%,
        rgba(13, 20, 38, 0.97) 100%
    );
    z-index: 2;
    clip-path: circle(0% at 50% 50%);
    transition: clip-path 0s; /* JS controls this */
    will-change: clip-path;
}

.xray-layer-b.scroll-reveal {
    clip-path: circle(70% at 50% 50%);
    transition: clip-path 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Layer A content */
.xray-surface-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.xray-surface-content h3 {
    font-size: clamp(1.5rem, 3vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.xray-surface-content p {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 480px;
}

/* X-Ray scan line effect */
.xray-scan-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--duo-primary),
        transparent
    );
    opacity: 0;
    z-index: 10;
    pointer-events: none;
    transition: background var(--palette-transition) ease;
}

.xray-container:hover .xray-scan-line {
    opacity: 0.6;
    animation: xrayScan 2s ease-in-out infinite;
}

@keyframes xrayScan {
    0% {
        top: 0%;
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        top: 100%;
        opacity: 0;
    }
}

/* X-Ray layer B — "revealed" code/tech view */
.xray-reveal-content {
    text-align: center;
    position: relative;
    z-index: 1;
    width: 100%;
}

.xray-code-block {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--duo-primary);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    font-family: "Courier New", monospace;
    font-size: 0.8rem;
    color: var(--duo-accent);
    text-align: left;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 0 30px -10px var(--duo-primary);
    transition:
        border-color var(--palette-transition) ease,
        box-shadow var(--palette-transition) ease;
    line-height: 1.8;
}

.code-line {
    display: block;
}
.code-keyword {
    color: var(--duo-primary);
}
.code-string {
    color: var(--duo-accent);
}
.code-comment {
    color: var(--text-muted);
    opacity: 0.7;
}
.code-number {
    color: #f59e0b;
}

.xray-hint {
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 20;
    pointer-events: none;
}

.xray-hint-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--duo-primary);
    animation: pulse 2s ease-in-out infinite;
    transition: background var(--palette-transition) ease;
}

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

/* ═══════════════════════════════════════════════════════════════
   3D PARTICLE CANVAS SECTION
═══════════════════════════════════════════════════════════════ */
.particle-section {
    position: relative;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.particle-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.particle-content {
    position: relative;
    z-index: 2;
    text-align: center;
    pointer-events: none;
}

.particle-content h2 {
    font-size: clamp(2.5rem, 5vw, 5rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    text-shadow: 0 0 60px rgba(0, 0, 0, 0.8);
}

.particle-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto;
}

/* Scroll progress label in particle section */
.particle-progress-label {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    z-index: 3;
}

.particle-progress-bar {
    width: 120px;
    height: 2px;
    background: var(--border-light);
    border-radius: 2px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.particle-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--duo-primary);
    border-radius: 2px;
    transition:
        width 0.1s linear,
        background var(--palette-transition) ease;
}

/* ═══════════════════════════════════════════════════════════════
   PROJECTS SECTION
═══════════════════════════════════════════════════════════════ */
.projects-header {
    max-width: 600px;
    margin-bottom: 5rem;
}

.projects-header p {
    color: var(--text-muted);
    font-weight: 300;
    font-size: 1.05rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.25rem;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 3rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--card-glow);
    box-shadow:
        0 24px 48px -12px rgba(0, 0, 0, 0.8),
        0 0 30px -8px var(--card-glow);
}

.project-card::before {
    content: "";
    position: absolute;
    top: -100px;
    right: -100px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--card-glow) 0%, transparent 70%);
    opacity: 0.07;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.project-card:hover::before {
    opacity: 0.16;
}

/* Card number indicator */
.card-number {
    position: absolute;
    top: 1.5rem;
    right: 1.75rem;
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--border-light);
    font-family: "Space Grotesk", sans-serif;
    line-height: 1;
    letter-spacing: -0.05em;
    user-select: none;
    transition: color 0.3s ease;
}

.project-card:hover .card-number {
    color: rgba(255, 255, 255, 0.04);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2.25rem;
}

.icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--input-bg);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}
.icon-wrap svg {
    width: 24px;
    height: 24px;
}
.project-card:hover .icon-wrap {
    transform: scale(1.1) rotate(-5deg);
}

.icon-wrap.green {
    color: var(--accent-green);
    background: rgba(16, 185, 129, 0.06);
    border-color: rgba(16, 185, 129, 0.15);
}
.icon-wrap.rose {
    color: var(--accent-rose);
    background: rgba(244, 63, 116, 0.06);
    border-color: rgba(244, 63, 116, 0.15);
}
.icon-wrap.blue {
    color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.06);
    border-color: rgba(59, 130, 246, 0.15);
}
.icon-wrap.purple {
    color: var(--accent-purple);
    background: rgba(139, 92, 246, 0.06);
    border-color: rgba(139, 92, 246, 0.15);
}
.icon-wrap.cyan {
    color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.06);
    border-color: rgba(6, 182, 212, 0.15);
}
.icon-wrap.indigo {
    color: var(--accent-indigo);
    background: rgba(99, 102, 241, 0.06);
    border-color: rgba(99, 102, 241, 0.15);
}
.icon-wrap.yellow {
    color: var(--accent-yellow);
    background: rgba(234, 179, 8, 0.06);
    border-color: rgba(234, 179, 8, 0.15);
}
.icon-wrap.mint {
    color: var(--accent-mint);
    background: rgba(45, 212, 191, 0.06);
    border-color: rgba(45, 212, 191, 0.15);
}

.tag-group {
    display: flex;
    gap: 0.5rem;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    background: var(--input-bg);
    border: 1px solid var(--border-light);
    color: var(--text-muted);
}
.badge-green {
    color: var(--accent-green);
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.15);
}
.badge-rose {
    color: var(--accent-rose);
    background: rgba(244, 63, 116, 0.08);
    border-color: rgba(244, 63, 116, 0.15);
}
.badge-blue {
    color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.15);
}
.badge-purple {
    color: var(--accent-purple);
    background: rgba(139, 92, 246, 0.08);
    border-color: rgba(139, 92, 246, 0.15);
}
.badge-cyan {
    color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.08);
    border-color: rgba(6, 182, 212, 0.15);
}
.badge-indigo {
    color: var(--accent-indigo);
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.15);
}
.badge-yellow {
    color: var(--accent-yellow);
    background: rgba(234, 179, 8, 0.08);
    border-color: rgba(234, 179, 8, 0.15);
}
.badge-mint {
    color: var(--accent-mint);
    background: rgba(45, 212, 191, 0.08);
    border-color: rgba(45, 212, 191, 0.15);
}

.card-body h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.85rem;
}

.proj-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    font-weight: 300;
    margin-bottom: 2rem;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2.5rem;
}

.tech-tag {
    font-size: 0.72rem;
    font-weight: 500;
    background: var(--input-bg);
    border: 1px solid var(--border-light);
    padding: 0.25rem 0.65rem;
    border-radius: 4px;
    color: var(--text-muted);
}

.card-footer {
    display: flex;
    align-items: center;
    margin-top: auto;
}

.card-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    padding: 0.65rem 1.25rem;
    border-radius: 8px;
    background: var(--input-bg);
    border: 1px solid var(--border-light);
    transition: all 0.25s ease;
    width: 100%;
    justify-content: center;
}

.project-card:hover .card-action-btn {
    background: var(--card-glow);
    border-color: var(--card-glow);
    color: #ffffff;
    box-shadow: 0 4px 15px -3px var(--card-glow);
}

.card-action-btn svg {
    transition: transform 0.2s ease;
}
.project-card:hover .card-action-btn svg {
    transform: translateX(4px);
}

/* ═══════════════════════════════════════════════════════════════
   VALUES SECTION — Duotone Cool Palette
═══════════════════════════════════════════════════════════════ */
.values-section {
    background: rgba(8, 12, 28, 0.5);
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3.5rem;
}

.value-item {
    padding: 3rem 2.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition:
        transform 0.35s ease,
        border-color 0.3s ease,
        box-shadow 0.35s ease;
    position: relative;
    overflow: hidden;
}

.value-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(
        90deg,
        var(--duo-primary),
        var(--duo-secondary)
    );
    transform: scaleX(0);
    transform-origin: left;
    transition:
        transform 0.4s ease,
        background var(--palette-transition) ease;
}

.value-item:hover::before {
    transform: scaleX(1);
}

.value-item:hover {
    transform: translateY(-6px);
    border-color: var(--duo-primary);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
}

.value-num {
    font-size: 1rem;
    font-weight: 700;
    color: var(--duo-primary);
    letter-spacing: 0.05em;
    margin-bottom: 1.25rem;
    display: inline-block;
    border-bottom: 2px solid var(--duo-primary);
    padding-bottom: 0.25rem;
    transition:
        color var(--palette-transition) ease,
        border-color var(--palette-transition) ease;
}

.value-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.85rem;
    font-family: "Space Grotesk", sans-serif;
}

.value-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
    font-weight: 300;
}

/* ═══════════════════════════════════════════════════════════════
   CTA / CONTACT SECTION
═══════════════════════════════════════════════════════════════ */
.cta-inner {
    max-width: 1200px;
    margin: 0 auto;
    background: radial-gradient(
        circle at top left,
        rgba(var(--duo-primary-rgb, 59, 130, 246), 0.08) 0%,
        rgba(var(--duo-secondary-rgb, 139, 92, 246), 0.04) 100%
    );
    border: 1px solid rgba(var(--duo-primary-rgb, 59, 130, 246), 0.15);
    border-radius: 28px;
    padding: 7rem 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: border-color var(--palette-transition) ease;
}

.cta-inner::before {
    content: "";
    position: absolute;
    top: -150px;
    left: 50%;
    transform: translateX(-50%);
    width: 700px;
    height: 400px;
    background: radial-gradient(ellipse, var(--duo-blob-a) 0%, transparent 65%);
    pointer-events: none;
    transition: background var(--palette-transition) ease;
}

/* CTA large decorative text */
.cta-bg-text {
    position: absolute;
    font-size: clamp(6rem, 14vw, 16rem);
    font-weight: 900;
    font-family: "Space Grotesk", sans-serif;
    letter-spacing: -0.05em;
    color: transparent;
    -webkit-text-stroke: 1px var(--border-light);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    white-space: nowrap;
    user-select: none;
    z-index: 0;
    transition: -webkit-text-stroke-color var(--palette-transition) ease;
}

.cta-title {
    font-size: clamp(2.2rem, 3.8vw, 3.6rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-family: "Space Grotesk", sans-serif;
    position: relative;
    z-index: 1;
}

.cta-sub {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 3rem;
    font-weight: 300;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

.cta-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════════════ */
.footer {
    border-top: 1px solid var(--border-light);
    padding: 4rem 2rem;
    background: var(--footer-bg);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-logo {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-logo span {
    color: var(--duo-primary);
    transition: color var(--palette-transition) ease;
}

.footer-copy {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.footer-links a {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}
.footer-links a:hover {
    color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════════════════
   SCROLL REVEAL — GSAP handles these, CSS provides fallback
═══════════════════════════════════════════════════════════════ */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition:
        opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* GSAP animation classes */
.gsap-fade-up {
    opacity: 0;
    transform: translateY(50px);
}

/* ═══════════════════════════════════════════════════════════════
   PALETTE TRANSITION INDICATOR
═══════════════════════════════════════════════════════════════ */
.palette-indicator {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 90;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    align-items: center;
}

.palette-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border-hover);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    position: relative;
}

.palette-dot::before {
    content: attr(data-label);
    position: absolute;
    right: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.palette-indicator:hover .palette-dot::before {
    opacity: 1;
}

.palette-dot.active {
    width: 10px;
    height: 10px;
    background: var(--duo-primary);
    box-shadow: 0 0 12px var(--duo-primary);
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE NAVIGATION
═══════════════════════════════════════════════════════════════ */
.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--input-bg);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 110;
}

.menu-toggle:hover {
    background: var(--input-focus-bg);
    border-color: var(--border-hover);
}

.hamburger-icon line {
    transform-origin: center;
    transition:
        transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.25s ease;
}

.header.menu-open .line-mid {
    transform: scaleX(0);
    opacity: 0;
}
.header.menu-open .line-top {
    transform: translateY(6px) rotate(45deg);
}
.header.menu-open .line-bot {
    transform: translateY(-6px) rotate(-45deg);
}

.mobile-menu {
    display: none;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-top: 1px solid transparent;
}

.mobile-menu-nav {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.mobile-menu-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-light);
    transition:
        color 0.2s ease,
        padding-left 0.2s ease;
}

.mobile-menu-link:hover,
.mobile-menu-link:active {
    color: var(--text-primary);
    padding-left: 4px;
}

.mobile-menu-divider {
    height: 1px;
    background: var(--border-light);
    margin: 0.5rem 0;
}

.mobile-menu-actions {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.mobile-lang {
    display: flex;
    width: 100%;
    justify-content: center;
    padding: 4px;
    background: var(--input-bg);
    border-radius: 99px;
    border: 1px solid var(--border-light);
}

.mobile-lang .lang-btn {
    flex: 1;
    text-align: center;
    font-size: 0.8rem;
    padding: 0.5rem 0;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
═══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        padding-top: 8rem;
        min-height: auto;
        gap: 4rem;
    }
    .hero-visual {
        display: flex;
        height: 420px;
        align-items: center;
        justify-content: center;
    }
    .mock-widget {
        position: relative;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        margin: 0 -10px;
        width: 230px;
    }
    .w-f1 {
        width: 240px;
    }
    .projects-grid {
        grid-template-columns: 1fr;
    }
    .values-grid {
        grid-template-columns: 1fr;
    }
    .about-grid {
        grid-template-columns: 1fr;
        gap: 3.5rem;
    }
    .palette-indicator {
        display: none;
    }
    .xray-container {
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .nav-right {
        display: none !important;
    }
    .menu-toggle {
        display: flex;
    }

    .mobile-menu {
        display: block;
    }

    .header.menu-open .mobile-menu {
        max-height: 500px;
        opacity: 1;
        border-top: 1px solid var(--border-light);
        padding: 1.25rem 1.5rem 2.25rem;
    }

    .nav {
        padding: 1rem 1.5rem;
    }
    .header {
        padding: 0;
    }
    .hero-visual {
        display: none;
    }
    .section {
        padding: 5rem 1.5rem;
    }
    .xray-section {
        padding: 5rem 1.5rem;
    }
    .cta-inner {
        padding: 4.5rem 1.5rem;
    }
    .footer-inner {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
    .stat-box {
        padding: 1.25rem 1rem;
    }
    .particle-section {
        height: 60vh;
    }
    .xray-container {
        aspect-ratio: 4/3;
    }
    .xray-code-block {
        font-size: 0.7rem;
        padding: 1rem 1.25rem;
    }
}

@media (max-width: 480px) {
    .about-stats {
        grid-template-columns: 1fr;
    }
    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }
    .hero-cta .btn {
        width: 100%;
    }
    .cta-bg-text {
        display: none;
    }
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
    .glow-blob {
        animation: none !important;
    }
    .animate-float {
        animation: none !important;
    }
    .xray-scan-line {
        animation: none !important;
    }
    .reveal {
        transition: none !important;
    }
    .word-inner {
        transform: none !important;
        opacity: 1 !important;
    }
    .hero-eyebrow,
    .hero-sub,
    .hero-cta {
        opacity: 1 !important;
        transform: none !important;
    }
    body {
        transition: none !important;
    }
}

/* ═══════════════════════════════════════════════════════════════
   3D MODEL SHOWCASE SECTION
═══════════════════════════════════════════════════════════════ */
.model-showcase-section {
    overflow: hidden;
}

.model-showcase-inner {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.model-showcase-text {
    position: relative;
    z-index: 2;
}

.model-canvas-wrapper {
    position: relative;
    height: 520px;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--border-light);
    background: radial-gradient(
        ellipse at center,
        rgba(var(--duo-primary-rgb, 12, 86, 125), 0.06) 0%,
        transparent 70%
    );
    transition:
        border-color 0.4s ease,
        box-shadow 0.4s ease;
}

.model-canvas-wrapper:hover {
    border-color: var(--duo-primary);
    box-shadow: 0 0 40px -10px var(--duo-primary);
}

#model-three-canvas {
    display: block;
    cursor: grab;
}

#model-three-canvas:active {
    cursor: grabbing;
}

/* Loading spinner */
.model-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    z-index: 10;
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    pointer-events: none;
}

.model-loading-spinner {
    width: 36px;
    height: 36px;
    border: 2px solid var(--border-light);
    border-top-color: var(--duo-primary);
    border-radius: 50%;
    animation: spinLoader 0.9s linear infinite;
    transition: border-top-color var(--palette-transition) ease;
}

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

/* Controls */
.model-ctrl-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    padding: 0.55rem 1rem;
}

.model-ctrl-btn[data-active="true"] {
    background: var(--duo-primary);
    color: #fff;
    border-color: var(--duo-primary);
}

.model-ctrl-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: var(--input-bg);
}

/* Particle shape name label */
.particle-shape-name {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--duo-primary);
    transition: color var(--palette-transition) ease;
    min-height: 1em;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .model-showcase-inner {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .model-canvas-wrapper {
        height: 420px;
    }
}

@media (max-width: 768px) {
    .model-canvas-wrapper {
        height: 320px;
        border-radius: 16px;
    }
    .model-showcase-text h2 {
        font-size: clamp(1.6rem, 5vw, 2.5rem);
    }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    .model-loading-spinner {
        animation: none;
    }
}

/* ═══════════════════════════════════════════════════════════════
   ACTIVE THEORY — HERO TYPOGRAPHY OVERLAY
   Big display text behind the hero content, mix-blend-mode overlay
═══════════════════════════════════════════════════════════════ */

.hero-typography-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    padding-right: 4vw;
    pointer-events: none;
    overflow: hidden;
    user-select: none;
}

.hero-big-line {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    font-size: clamp(3.5rem, 9vw, 9rem);
    line-height: 0.88;
    letter-spacing: -0.04em;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.07);
    text-stroke: 1px rgba(255, 255, 255, 0.07);

    /* Initial state: hidden below */
    opacity: 0;
    transform: translateY(120%) skewY(4deg);
    transition: none;

    /* Clip mask for reveal wipe */
    clip-path: inset(0 0 100% 0);
}

/* Active state triggered by JS after hero Three.js init */
.hero-typography-overlay.typing-active .hero-big-line {
    opacity: 1;
    transform: translateY(0) skewY(0deg);
    clip-path: inset(0 0 0% 0);
    transition:
        transform 1.1s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 1.1s cubic-bezier(0.16, 1, 0.3, 1),
        clip-path 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-typography-overlay.typing-active .line-1 {
    transition-delay: 0.05s;
}
.hero-typography-overlay.typing-active .line-2 {
    transition-delay: 0.18s;
}
.hero-typography-overlay.typing-active .line-3 {
    transition-delay: 0.32s;
}

/* RGB glitch animation on reveal (brief, then settles) */
@keyframes heroGlitchR {
    0% {
        clip-path: inset(30% 0 50% 0);
        transform: translate(-4px, 0);
    }
    20% {
        clip-path: inset(60% 0 10% 0);
        transform: translate(4px, 0);
    }
    40% {
        clip-path: inset(10% 0 70% 0);
        transform: translate(-2px, 0);
    }
    60% {
        clip-path: inset(80% 0 5% 0);
        transform: translate(3px, 0);
    }
    80% {
        clip-path: inset(40% 0 30% 0);
        transform: translate(-3px, 0);
    }
    100% {
        clip-path: inset(0 0 0 0);
        transform: translate(0, 0);
    }
}

.hero-big-line::before,
.hero-big-line::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
}

.hero-typography-overlay.typing-active .line-1::before {
    color: #ff0080;
    animation: heroGlitchR 0.4s 0.9s steps(1) both;
    opacity: 1;
    mix-blend-mode: screen;
    -webkit-text-stroke: 0;
}

/* Horizontal scan bar that sweeps across the overlay on reveal */
.hero-scan-bar {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--duo-primary, #e77c8e) 30%,
        var(--duo-secondary, #ed9874) 70%,
        transparent 100%
    );
    opacity: 0;
    top: 50%;
    transition: background 1.2s ease;
}

.hero-typography-overlay.typing-active .hero-scan-bar {
    opacity: 1;
    animation: scanBarSweep 1.2s 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes scanBarSweep {
    from {
        top: 0%;
        opacity: 0.8;
    }
    to {
        top: 100%;
        opacity: 0;
    }
}

/* Loading placeholder — shown before WebGL compiles */
/* ── Responsive ── */
@media (max-width: 1024px) {
    .hero-typography-overlay {
        align-items: center;
        padding-right: 0;
        opacity: 0.5;
    }
    .hero-big-line {
        font-size: clamp(2.5rem, 12vw, 6rem);
    }
}

@media (max-width: 640px) {
    .hero-typography-overlay {
        display: none; /* too cluttered on small screens */
    }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    .hero-big-line,
    .hero-typography-overlay.typing-active .hero-big-line,
    .hero-scan-bar,
    .hero-typography-overlay.typing-active .hero-scan-bar {
        animation: none !important;
        transition: none !important;
        opacity: 0.04 !important;
        transform: none !important;
        clip-path: none !important;
    }
}

/* ── Touch target minimums (44×44px WCAG 2.5.5) ── */
.theme-toggle {
    width: 44px;
    height: 44px;
}
.lang-btn {
    padding: 0.65rem 0.9rem;
    min-height: 44px;
}

/* ════════════════════════════════════════════════════════════════════
   BLINDS REVEAL SECTION
════════════════════════════════════════════════════════════════════ */
.blinds-section {
    padding: 5rem 0 5.5rem;
    background: var(--bg-primary);
    overflow: hidden;
}
.blinds-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4.5rem;
    align-items: center;
}
.blinds-text h2 {
    font-size: clamp(1.7rem, 3vw, 2.5rem);
    line-height: 1.22;
    margin: 1rem 0 1.2rem;
}
.blinds-metrics {
    display: flex;
    gap: 2.2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}
.bmetric {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.bmetric-val {
    font-family: "Space Grotesk", monospace;
    font-size: 2.7rem;
    font-weight: 700;
    line-height: 1;
    color: var(--duo-primary);
    display: flex;
    align-items: flex-start;
    gap: 3px;
}
.bmetric-count {
    display: inline-block;
}
.bmetric-suf {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 0.18rem;
    opacity: 0.75;
}
.bmetric-lab {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.09em;
    display: block;
}
.blinds-visual {
    position: relative;
    height: 430px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.06);
}
.blinds-container {
    position: absolute;
    inset: 0;
}
.blinds-strip {
    /* strips are created via JS — this class is a style hook */
}
.blinds-overlay-badge {
    position: absolute;
    bottom: 1.1rem;
    right: 1.2rem;
    padding: 0.35rem 0.75rem;
    background: rgba(0, 0, 0, 0.55);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: rgba(255, 255, 255, 0.65);
    text-transform: uppercase;
    z-index: 10;
    pointer-events: none;
}
@media (max-width: 1024px) {
    .blinds-inner {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .blinds-visual {
        height: 320px;
    }
}
@media (max-width: 640px) {
    .blinds-visual {
        height: 240px;
        border-radius: 14px;
    }
    .blinds-metrics {
        gap: 1.5rem;
    }
    .bmetric-val {
        font-size: 2.1rem;
    }
}

/* ════════════════════════════════════════════════════════════════════
   PILLAR CAROUSEL SECTION
════════════════════════════════════════════════════════════════════ */
.pillar-section {
    padding: 4.5rem 0 6rem;
    background: var(--bg-primary);
}
.pillar-header {
    text-align: center;
    margin-bottom: 2.5rem;
}
.pillar-header .section-tag {
    justify-content: center;
}
.pillar-carousel {
    position: relative;
    width: 100%;
    height: 520px;
    perspective: 1400px;
    outline: none;
    user-select: none;
}
.pillar-carousel:focus-visible {
    outline: 2px solid var(--duo-primary);
    outline-offset: 2px;
}
.pillar-bg-layer {
    position: absolute;
    inset: 0;
}
.pillar-content-wrap {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 7% 4.5rem;
    pointer-events: none;
    box-sizing: border-box;
}
.pillar-slide-content {
    position: relative;
    max-width: 420px;
    width: 100%;
    z-index: 5;
    pointer-events: auto;
    transform: translateZ(0); /* force hardware acceleration, stable position */
}
.pillar-incoming {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 420px;
    width: 100%;
}
.pillar-slide-num {
    font-family: "Space Grotesk", monospace;
    font-size: 5.5rem;
    font-weight: 700;
    line-height: 1;
    color: rgba(255, 255, 255, 0.055);
    user-select: none;
    margin-bottom: -1.8rem;
    pointer-events: none;
}
.pillar-slide-title {
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    font-weight: 700;
    line-height: 1.22;
    margin: 0 0 0.9rem;
    color: #f0f4ff;
}
.pillar-slide-desc {
    font-size: 0.88rem;
    line-height: 1.72;
    color: rgba(220, 230, 255, 0.62);
    margin-bottom: 1.2rem;
    max-width: 38ch;
}
.pillar-slide-tags {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    margin-bottom: 1.7rem;
}
.pillar-tag {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.22rem 0.7rem;
    border-radius: 99px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.72);
    letter-spacing: 0.03em;
}
.pillar-slide-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1.25rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.83rem;
    font-weight: 600;
    text-decoration: none;
    transition:
        background 0.2s,
        border-color 0.2s;
}
.pillar-slide-cta:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.45);
}
.pillar-slide-pattern {
    position: absolute;
    top: -10%;
    right: -65%;
    width: 100%;
    height: 120%;
    background-size: cover;
    background-position: center left;
    opacity: 0.35;
    pointer-events: none;
}
.pillar-wipe {
    position: absolute;
    top: -10%;
    width: 28px;
    height: 120%;
    z-index: 20;
    will-change: transform;
    transform-style: preserve-3d;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        var(--duo-primary, #e77c8e) 18%,
        rgba(255, 255, 255, 0.92) 50%,
        var(--duo-accent, #f9cb8b) 82%,
        transparent 100%
    );
    box-shadow: 0 0 28px rgba(255, 255, 255, 0.18);
    pointer-events: none;
}
.pillar-nav-wrap {
    position: absolute;
    bottom: 1.6rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 30;
}
.pillar-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition:
        background 0.2s,
        transform 0.15s;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}
.pillar-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}
.pillar-btn:active {
    transform: scale(0.95);
}
.pillar-dots {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}
.pillar-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}
.pillar-dot.active {
    background: #fff;
    width: 24px;
    border-radius: 4px;
}
@media (max-width: 1024px) {
    .pillar-carousel {
        height: 480px;
    }
    .pillar-slide-num {
        font-size: 4.5rem;
    }
    .pillar-content-wrap {
        padding: 2rem 6% 4rem;
    }
}

@media (max-width: 768px) {
    .pillar-carousel {
        height: 460px;
    }
    .pillar-slide-num {
        font-size: 3.8rem;
    }
    .pillar-slide-title {
        font-size: 1.45rem;
    }
    .pillar-slide-pattern {
        display: none;
    }
    .pillar-content-wrap {
        padding: 2rem 5% 4rem;
    }
}

@media (max-width: 480px) {
    .pillar-carousel {
        height: 420px;
    }
    .pillar-content-wrap {
        padding: 1.5rem 4% 3.5rem;
    }
    .pillar-slide-title {
        font-size: 1.25rem;
    }
    .pillar-slide-desc {
        max-width: 100%;
    }
}

/* Ensure explode arena atoms don't bleed into adjacent sections */
/* ════════════════════════════════════════════════════════════════════
   EXPLODING TECH STACK SECTION
════════════════════════════════════════════════════════════════════ */
.explode-section {
    padding: 5rem 0 5.5rem;
    background: var(--bg-primary);
    text-align: center;
}
.explode-arena {
    position: relative;
    width: 530px;
    height: 530px;
    margin: 0.5rem auto 0;
}
.explode-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 74px;
    height: 74px;
    border-radius: 50%;
    background: var(--duo-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    z-index: 20;
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, 0.15),
        0 0 40px rgba(84, 150, 136, 0.45);
}
.explode-atom {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
}
.atom-orb {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    background: rgba(20, 22, 40, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--atom-color, #fff);
    box-shadow: 0 0 18px rgba(0, 0, 0, 0.2);
    transition:
        box-shadow 0.25s ease,
        border-color 0.25s ease;
    position: relative;
}
.atom-orb::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: radial-gradient(
        ellipse at 35% 25%,
        rgba(255, 255, 255, 0.07) 0%,
        transparent 60%
    );
    pointer-events: none;
}
.explode-atom:hover .atom-orb {
    border-color: var(--atom-color, rgba(255, 255, 255, 0.4));
    box-shadow: 0 0 28px
        color-mix(in srgb, var(--atom-color, #fff) 45%, transparent);
}
.atom-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.12rem;
    pointer-events: none;
}
.atom-name {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    line-height: 1.2;
}
.atom-sub {
    font-size: 0.58rem;
    color: var(--text-muted);
    white-space: nowrap;
}
.explode-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.74rem;
    color: var(--text-muted);
    opacity: 0.6;
    margin-top: 1.5rem;
}
@media (max-width: 640px) {
    .explode-arena {
        width: 340px;
        height: 340px;
        transform: scale(0.78);
        transform-origin: top center;
        margin-bottom: -80px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .blinds-strip {
        transform: none !important;
        filter: none !important;
        opacity: 1 !important;
    }
    .explode-atom {
        opacity: 1 !important;
    }
    .atom-label {
        opacity: 1 !important;
    }

    /* Ensure new sections show end-states too */
    .blinds-visual {
        transform: none !important;
        filter: none !important;
    }
    .pillar-wipe {
        transform: none !important;
    }
}

/* ── Touch target minimums for new interactive elements ── */
.pillar-btn {
    width: 44px;
    height: 44px;
}
.pillar-slide-cta {
    padding: 0.75rem 1.25rem;
    min-height: 44px;
}

/* Expand pillar-dot hit area without changing visual size */
.pillar-dot {
    position: relative;
}
.pillar-dot::after {
    content: "";
    position: absolute;
    inset: -18px;
}

/* Ensure explode arena atoms don't bleed into adjacent sections */
.explode-section {
    overflow: hidden;
}

@media (max-width: 480px) {
    .pillar-carousel {
        height: 420px;
    }
    .pillar-content-wrap {
        padding: 1.5rem 4%;
    }
    .pillar-slide-title {
        font-size: 1.25rem;
    }
    .pillar-slide-desc {
        max-width: 100%;
    }
}

@media (max-width: 640px) {
    .explode-arena {
        width: min(340px, 90vw);
        height: min(340px, 90vw);
        transform: scale(0.78);
        transform-origin: top center;
        margin-bottom: -74px;
    }
}

/* color-mix fallback for Safari < 16.2 */
.explode-atom:hover .atom-orb {
    border-color: var(--atom-color, rgba(255, 255, 255, 0.4));
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 28px
        color-mix(in srgb, var(--atom-color, #fff) 45%, transparent);
}
