/* ═══════════════════════════════════════════════════════════════════
   CURS3D Design System v7.0 — Quantum Premium
   Dark obsidian + cyan/gold accents, glass morphism, animated depth
   ═══════════════════════════════════════════════════════════════════ */

:root {
    --obsidian: #0a0d12;
    --graphite: #141a22;
    --graphite-2: #1b2430;
    --graphite-3: #223042;
    --steel: #6e8198;
    --ice: #d8e2ec;
    --white: #f6f9fc;
    --cyan: #3fd0d4;
    --cyan-bright: #5eeaee;
    --cyan-soft: rgba(63, 208, 212, 0.14);
    --gold: #c8a96b;
    --gold-soft: rgba(200, 169, 107, 0.14);
    --border: rgba(216, 226, 236, 0.10);
    --border-strong: rgba(216, 226, 236, 0.22);
    --surface-1: rgba(18, 24, 32, 0.82);
    --surface-2: rgba(27, 36, 48, 0.9);
    --surface-3: rgba(246, 249, 252, 0.04);
    --text: var(--white);
    --muted: #a4b3c3;
    --muted-2: #7d90a5;
    --success: #6fe2b5;
    --danger: #ff8e8e;
    --warning: #ffd088;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
    --shadow-glow: 0 8px 40px rgba(63, 208, 212, 0.08);
    --hero-gradient: linear-gradient(135deg, rgba(63, 208, 212, 0.24), rgba(200, 169, 107, 0.18));
    --title-font: "Space Grotesk", "Segoe UI", sans-serif;
    --body-font: "IBM Plex Sans", "Segoe UI", sans-serif;
    --mono-font: "JetBrains Mono", monospace;
    --radius-sm: 14px;
    --radius-md: 22px;
    --radius-lg: 34px;
    --container: 1240px;
    --nav-height: 84px;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── Keyframes ──────────────────────────────────────────────────── */

@keyframes float-orb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -40px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

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

@keyframes border-rotate {
    0% { --border-angle: 0deg; }
    100% { --border-angle: 360deg; }
}

@keyframes fade-up {
    from { opacity: 0; transform: translateY(32px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes counter-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}

/* ─── Reset & Base ───────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--body-font);
    color: var(--text);
    line-height: 1.68;
    overflow-x: hidden;
    background:
        radial-gradient(ellipse 80% 60% at 10% 5%, rgba(63, 208, 212, 0.12), transparent),
        radial-gradient(ellipse 70% 50% at 85% 16%, rgba(200, 169, 107, 0.10), transparent),
        radial-gradient(ellipse 90% 40% at 50% 120%, rgba(63, 208, 212, 0.06), transparent),
        linear-gradient(180deg, #090c11 0%, #0d1117 42%, #0a0d12 100%);
    min-height: 100vh;
}

/* Subtle grid overlay */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(216, 226, 236, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(216, 226, 236, 0.018) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: radial-gradient(ellipse 80% 70% at center 40%, black 20%, transparent 80%);
}

/* Floating orbs */
body::after {
    content: "";
    position: fixed;
    top: -15%;
    right: -10%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(63, 208, 212, 0.06), transparent 60%);
    animation: float-orb 25s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

a { color: var(--ice); text-decoration: none; transition: color 200ms ease; }
a:hover { color: var(--cyan); }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }
code, pre { font-family: var(--mono-font); }

::selection {
    background: rgba(63, 208, 212, 0.25);
    color: var(--white);
}

/* ─── Multi-language ─────────────────────────────────────────────── */

[data-lang], [data-lang-block], [data-lang-flex], [data-lang-grid] { display: none !important; }
html[data-current-lang="en"] [data-lang="en"] { display: inline !important; }
html[data-current-lang="fr"] [data-lang="fr"] { display: inline !important; }
html[data-current-lang="en"] [data-lang-block="en"] { display: block !important; }
html[data-current-lang="fr"] [data-lang-block="fr"] { display: block !important; }
html[data-current-lang="en"] [data-lang-flex="en"] { display: flex !important; }
html[data-current-lang="fr"] [data-lang-flex="fr"] { display: flex !important; }
html[data-current-lang="en"] [data-lang-grid="en"] { display: grid !important; }
html[data-current-lang="fr"] [data-lang-grid="fr"] { display: grid !important; }

/* ─── Layout ─────────────────────────────────────────────────────── */

.site-shell { position: relative; z-index: 1; }
.container { width: min(var(--container), calc(100% - 2rem)); margin: 0 auto; }

/* ─── Navigation ─────────────────────────────────────────────────── */

.site-nav {
    position: sticky;
    top: 0;
    z-index: 40;
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    background: rgba(10, 13, 18, 0.72);
    border-bottom: 1px solid transparent;
    transition: border-color 300ms ease, background 300ms ease;
}

.site-nav.scrolled {
    border-bottom-color: var(--border);
    background: rgba(10, 13, 18, 0.88);
}

.nav-inner {
    min-height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--white);
    font-family: var(--title-font);
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-size: 1.1rem;
}

.brand-mark {
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 0.24rem;
    transform: rotate(45deg);
    background: linear-gradient(135deg, var(--cyan), var(--gold));
    box-shadow: 0 0 18px rgba(63, 208, 212, 0.35), 0 0 6px rgba(200, 169, 107, 0.2);
    animation: pulse-glow 4s ease-in-out infinite;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-links a {
    color: var(--muted);
    font-weight: 600;
    font-size: 0.93rem;
    transition: color 200ms ease;
    position: relative;
}

.nav-links a.active,
.nav-links a:hover { color: var(--white); }

.nav-links a.active::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: var(--cyan);
}

.nav-cta {
    padding: 0.72rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(246, 249, 252, 0.04);
    transition: all 200ms ease;
}

.nav-cta:hover {
    border-color: rgba(63, 208, 212, 0.3);
    background: rgba(63, 208, 212, 0.08);
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.24rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(246, 249, 252, 0.04);
}

.lang-switch button {
    min-width: 44px;
    padding: 0.42rem 0.65rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-weight: 700;
    transition: all 200ms ease;
}

.lang-switch button.active {
    background: rgba(63, 208, 212, 0.14);
    color: var(--white);
}

/* ─── Mobile Nav ─────────────────────────────────────────────────── */

.nav-toggle {
    display: none;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(246, 249, 252, 0.04);
    color: var(--white);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: currentColor;
    transition: transform 180ms ease, opacity 180ms ease;
}

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

.mobile-menu {
    display: none;
    padding: 0 1rem 1rem;
    border-bottom: 1px solid var(--border);
    background: rgba(10, 13, 18, 0.96);
}

.mobile-menu.open { display: grid; gap: 0.8rem; }
.mobile-menu a, .mobile-menu .lang-switch { width: 100%; }

.mobile-menu a {
    padding: 0.9rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(246, 249, 252, 0.03);
    color: var(--ice);
}

/* ─── Hero ───────────────────────────────────────────────────────── */

.hero { padding: 4.6rem 0 3.1rem; }
.page-hero { padding: 3.6rem 0 2rem; }

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
    gap: 1.6rem;
    align-items: stretch;
}

.hero-copy, .hero-panel, .hero-ribbon {
    position: relative;
    overflow: hidden;
}

.hero-copy {
    padding: 2.4rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background:
        linear-gradient(180deg, rgba(20, 26, 34, 0.88), rgba(10, 13, 18, 0.96)),
        var(--hero-gradient);
    box-shadow: var(--shadow), var(--shadow-glow);
}

/* Glow orb behind hero */
.hero-copy::after {
    content: "";
    position: absolute;
    inset: auto -10% -30% auto;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(63, 208, 212, 0.14), transparent 60%);
    pointer-events: none;
    animation: float-orb 20s ease-in-out infinite;
}

.hero-panel {
    padding: 1.6rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(63, 208, 212, 0.15);
    background: linear-gradient(180deg, rgba(20, 28, 38, 0.92), rgba(10, 13, 18, 0.97));
    box-shadow: var(--shadow), 0 0 60px rgba(63, 208, 212, 0.04);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
}

.hero-panel::before {
    content: "";
    position: absolute;
    top: -20%;
    left: -20%;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(63, 208, 212, 0.06), transparent 60%);
    pointer-events: none;
    animation: float-orb 30s ease-in-out infinite reverse;
}

/* Live badge */
.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(111, 226, 181, 0.25);
    background: rgba(111, 226, 181, 0.08);
    color: var(--success);
    font-family: var(--mono-font);
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.12em;
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 8px rgba(111, 226, 181, 0.6);
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Hero SVG visual */
@keyframes orbit-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.hero-visual {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 0.5rem auto;
}

.hero-svg {
    width: 100%;
    height: 100%;
    animation: orbit-spin 60s linear infinite;
}

.orbit-dot { animation: pulse-glow 3s ease-in-out infinite; }
.orbit-dot-2 { animation: pulse-glow 4s ease-in-out infinite 1s; }
.orbit-dot-3 { animation: pulse-glow 3.5s ease-in-out infinite 0.5s; }

/* Live stats in hero panel */
.hero-stats-live {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
    width: 100%;
}

.hero-stat {
    padding: 0.6rem;
    border-radius: 14px;
    border: 1px solid rgba(63, 208, 212, 0.1);
    background: rgba(63, 208, 212, 0.04);
}

.hero-stat-value {
    display: block;
    font-family: var(--title-font);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--cyan-bright);
    text-shadow: 0 0 16px rgba(63, 208, 212, 0.3);
    letter-spacing: -0.02em;
}

.hero-stat-label {
    display: block;
    font-size: 0.72rem;
    color: var(--muted-2);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 0.15rem;
}

.hero-ribbon {
    margin-top: 1rem;
    padding: 1rem 1.2rem;
    border: 1px solid rgba(63, 208, 212, 0.14);
    border-radius: var(--radius-md);
    background: rgba(63, 208, 212, 0.05);
    backdrop-filter: blur(8px);
}

/* ─── Typography ─────────────────────────────────────────────────── */

.eyebrow, .section-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.48rem 0.95rem;
    border: 1px solid rgba(63, 208, 212, 0.16);
    border-radius: 999px;
    background: rgba(63, 208, 212, 0.06);
    color: var(--cyan);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
}

.eyebrow.gold {
    border-color: rgba(200, 169, 107, 0.18);
    background: rgba(200, 169, 107, 0.06);
    color: var(--gold);
}

h1, h2, h3, h4 {
    margin: 0;
    font-family: var(--title-font);
    letter-spacing: -0.04em;
    line-height: 1.08;
}

h1 {
    font-size: clamp(3rem, 7vw, 5.5rem);
    text-shadow: 0 4px 40px rgba(0, 0, 0, 0.5);
}
h2 { font-size: clamp(1.95rem, 4vw, 3.2rem); }
h3 { font-size: 1.28rem; }
p { margin: 0; color: var(--muted); }
.lede { font-size: 1.14rem; color: var(--ice); line-height: 1.75; }

.gradient-text {
    background: linear-gradient(135deg, var(--cyan), var(--gold), var(--cyan-bright), var(--gold));
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradient-shift 5s ease-in-out infinite;
    filter: drop-shadow(0 0 30px rgba(63, 208, 212, 0.2));
}

/* ─── Section Layout ─────────────────────────────────────────────── */

.section {
    padding: 5.4rem 0;
    position: relative;
}

.section + .section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(400px, 60%);
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(63, 208, 212, 0.25), transparent);
}
.section-head { max-width: 780px; margin-bottom: 2rem; }
.muted-strong { color: var(--ice); }

.pill-row { display: flex; flex-wrap: wrap; gap: 0.7rem; }

.pill {
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-3);
    color: var(--ice);
    font-size: 0.9rem;
    transition: border-color 250ms ease, background 250ms ease;
}

.pill:hover {
    border-color: rgba(63, 208, 212, 0.25);
    background: rgba(63, 208, 212, 0.06);
}

/* ─── Buttons ────────────────────────────────────────────────────── */

.btn-row { display: flex; flex-wrap: wrap; gap: 0.9rem; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 48px;
    padding: 0.8rem 1.4rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 280ms var(--ease-out-expo);
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
    color: var(--obsidian);
    background: linear-gradient(135deg, var(--cyan), #8bd6d8);
    box-shadow: 0 4px 24px rgba(63, 208, 212, 0.3);
    font-weight: 800;
}

.btn-primary:hover {
    color: var(--obsidian);
    box-shadow: 0 8px 40px rgba(63, 208, 212, 0.45);
    filter: brightness(1.1);
}

.btn-secondary {
    border-color: var(--border);
    background: rgba(246, 249, 252, 0.04);
    color: var(--white);
}

.btn-secondary:hover { border-color: rgba(63, 208, 212, 0.35); }

.btn-tertiary {
    border-color: rgba(200, 169, 107, 0.28);
    background: rgba(200, 169, 107, 0.07);
    color: var(--gold);
}

.btn-tertiary:hover { border-color: rgba(200, 169, 107, 0.5); }

/* ─── Grids ──────────────────────────────────────────────────────── */

.split-grid { display: grid; gap: 1.4rem; }
.split-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.split-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.split-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.spotlight {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 1.4rem;
}

/* ─── Cards & Panels (Glass Morphism) ────────────────────────────── */

.card, .content-section, .sidebar, .toc,
.explorer-panel, .metric, .timeline-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(27, 36, 48, 0.78), rgba(10, 13, 18, 0.92));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
    transition: border-color 300ms ease, box-shadow 300ms ease, transform 300ms var(--ease-out-expo);
}

.card:hover, .content-section:hover {
    border-color: rgba(63, 208, 212, 0.22);
    box-shadow:
        var(--shadow),
        0 0 60px rgba(63, 208, 212, 0.06),
        inset 0 1px 0 rgba(63, 208, 212, 0.08);
    transform: translateY(-4px);
}

/* Animated gradient border on hover */
.card::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, transparent, rgba(63, 208, 212, 0.15), transparent, rgba(200, 169, 107, 0.1), transparent);
    background-size: 300% 300%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 400ms ease;
    pointer-events: none;
    z-index: -1;
}

.card:hover::before {
    opacity: 1;
    animation: gradient-shift 4s ease-in-out infinite;
}

.card {
    position: relative;
}

.card, .content-section, .timeline-item { padding: 1.55rem; }
.card-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    border-radius: 14px;
    background: rgba(63, 208, 212, 0.06);
    border: 1px solid rgba(63, 208, 212, 0.12);
}

.card h3, .card h4, .content-section h3 { margin-bottom: 0.8rem; }
.card p + p, .prose p + p { margin-top: 0.92rem; }

.callout, .status-banner {
    padding: 1rem 1.2rem;
    border-left: 3px solid var(--cyan);
    border-radius: var(--radius-sm);
    background: rgba(63, 208, 212, 0.05);
    color: var(--ice);
    backdrop-filter: blur(6px);
}

.status-banner.warning {
    border-left-color: var(--gold);
    background: rgba(200, 169, 107, 0.07);
}

/* ─── Lists ──────────────────────────────────────────────────────── */

.stack-list, .signal-list, .clean-list, .check-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.stack-list li, .signal-list li, .clean-list li, .check-list li {
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(216, 226, 236, 0.06);
    color: var(--muted);
    transition: color 200ms ease;
}

.stack-list li:hover, .clean-list li:hover, .check-list li:hover {
    color: var(--ice);
}

.stack-list li:last-child, .signal-list li:last-child,
.clean-list li:last-child, .check-list li:last-child {
    border-bottom: 0;
}

.check-list li::before {
    content: "";
    flex-shrink: 0;
    width: 6px;
    height: 6px;
    margin-top: 0.55rem;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 8px rgba(63, 208, 212, 0.4);
}

.list-key {
    min-width: 110px;
    color: var(--white);
    font-weight: 700;
}

/* ─── Metric Strip (Stats) ───────────────────────────────────────── */

.metric-strip, .explorer-stat-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.8rem;
}

.metric {
    padding: 1.1rem 1.15rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Shimmer effect on metrics */
.metric::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(63, 208, 212, 0.04), transparent);
    animation: shimmer 8s ease-in-out infinite;
    pointer-events: none;
}

.metric:hover {
    border-color: rgba(63, 208, 212, 0.2);
    transform: translateY(-2px);
}

.metric strong, .stat-value {
    display: block;
    margin-bottom: 0.3rem;
    font-family: var(--title-font);
    font-size: 1.55rem;
    color: var(--cyan-bright);
    letter-spacing: -0.02em;
    text-shadow: 0 0 20px rgba(63, 208, 212, 0.3);
}

.metric span, .stat-label {
    color: var(--muted-2);
    font-size: 0.85rem;
}

/* ─── Page Layout (Sidebar) ──────────────────────────────────────── */

.page-layout, .whitepaper-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 1.5rem;
}

.sidebar, .toc {
    position: sticky;
    top: calc(var(--nav-height) + 1rem);
    align-self: start;
    padding: 1.15rem;
}

.sidebar-title {
    margin-bottom: 0.8rem;
    color: var(--gold);
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 700;
}

.sidebar a, .toc a {
    display: block;
    padding: 0.55rem 0;
    color: var(--muted);
    font-size: 0.95rem;
    transition: color 200ms ease, padding-left 200ms ease;
}

.sidebar a:hover, .sidebar a.active,
.toc a:hover, .toc a.active {
    color: var(--white);
    padding-left: 0.4rem;
}

.sidebar a.active::before {
    content: "";
    display: inline-block;
    width: 3px;
    height: 14px;
    margin-right: 0.6rem;
    border-radius: 2px;
    background: var(--cyan);
    vertical-align: middle;
}

/* ─── Content ────────────────────────────────────────────────────── */

.content-stack, .whitepaper-article, .timeline { display: grid; gap: 1rem; }

.content-section h2 {
    margin-bottom: 0.95rem;
    font-size: clamp(1.5rem, 3vw, 2.15rem);
}

.prose ul, .prose ol {
    margin: 0;
    padding-left: 1.15rem;
    color: var(--muted);
}

.prose li + li { margin-top: 0.45rem; }

/* ─── Tables ─────────────────────────────────────────────────────── */

.table-wrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; }

th, td {
    padding: 0.84rem 0.8rem;
    border-bottom: 1px solid rgba(216, 226, 236, 0.06);
    text-align: left;
    color: var(--muted);
}

th {
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 700;
}

tbody tr { transition: background 200ms ease; }
tbody tr:hover { background: rgba(63, 208, 212, 0.03); }

td code {
    padding: 0.15rem 0.4rem;
    border-radius: 6px;
    background: rgba(63, 208, 212, 0.08);
    color: var(--cyan);
    font-size: 0.88rem;
}

/* ─── Code Blocks ────────────────────────────────────────────────── */

.code-block {
    overflow: hidden;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: #080e14;
    box-shadow: var(--shadow);
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--border);
    background: rgba(246, 249, 252, 0.025);
}

.code-filename {
    color: var(--muted);
    font-size: 0.86rem;
    font-family: var(--mono-font);
}

.code-copy {
    padding: 0.45rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(246, 249, 252, 0.04);
    color: var(--white);
    cursor: pointer;
    font-size: 0.82rem;
    transition: all 200ms ease;
}

.code-copy:hover {
    border-color: rgba(63, 208, 212, 0.3);
    background: rgba(63, 208, 212, 0.08);
}

.code-body {
    margin: 0;
    padding: 1rem 1rem 1.1rem;
    overflow-x: auto;
    color: #d0dfe8;
    font-size: 0.9rem;
    line-height: 1.7;
}

.code-body code { white-space: pre; }

/* ─── Examples ───────────────────────────────────────────────────── */

.quote-block {
    padding: 1.2rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(200, 169, 107, 0.18);
    background: rgba(200, 169, 107, 0.06);
    color: var(--ice);
    font-size: 1.04rem;
}

.example-card + .example-card { margin-top: 1rem; }

.example-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    margin-right: 0.7rem;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(63, 208, 212, 0.18), rgba(63, 208, 212, 0.06));
    border: 1px solid rgba(63, 208, 212, 0.2);
    color: var(--cyan);
    font-weight: 700;
    font-family: var(--title-font);
    font-size: 0.95rem;
}

/* ─── Explorer ───────────────────────────────────────────────────── */

.explorer-shell { display: grid; gap: 1rem; }

.config-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(27, 36, 48, 0.86), rgba(10, 13, 18, 0.96));
}

.config-bar label { color: var(--muted); font-weight: 600; }

.config-bar input, .lookup-input input {
    flex: 1;
    min-width: 220px;
    padding: 0.85rem 0.95rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(246, 249, 252, 0.03);
    color: var(--white);
    transition: border-color 200ms ease;
}

.config-bar input:focus, .lookup-input input:focus {
    outline: none;
    border-color: rgba(63, 208, 212, 0.4);
}

.config-bar button, .lookup-input button {
    padding: 0.82rem 1.1rem;
    border-radius: 999px;
    border: 1px solid rgba(63, 208, 212, 0.25);
    background: rgba(63, 208, 212, 0.10);
    color: var(--white);
    cursor: pointer;
    font-weight: 700;
    transition: all 200ms ease;
}

.config-bar button:hover, .lookup-input button:hover {
    background: rgba(63, 208, 212, 0.18);
    border-color: rgba(63, 208, 212, 0.4);
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 142, 142, 0.65);
    box-shadow: 0 0 0 6px rgba(255, 142, 142, 0.08);
    transition: all 300ms ease;
}

.status-dot.online {
    background: var(--success);
    box-shadow: 0 0 0 6px rgba(111, 226, 181, 0.1), 0 0 14px rgba(111, 226, 181, 0.3);
}

.offline-banner {
    padding: 1rem 1.1rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 142, 142, 0.16);
    background: rgba(255, 142, 142, 0.06);
    color: #ffd7d7;
}

.explorer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: 1rem;
}

.explorer-panel { overflow: hidden; }

.panel-header {
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--border);
    color: var(--white);
    font-family: var(--title-font);
    font-size: 1.05rem;
    font-weight: 600;
}

.panel-body { padding: 1rem 1.1rem; }
.blocks-table tbody tr { cursor: pointer; }
.blocks-table tbody tr:hover td { color: var(--ice); }

.hash-cell {
    font-family: var(--mono-font);
    font-size: 0.84rem;
}

.lookup-input {
    display: flex;
    gap: 0.7rem;
    margin-bottom: 0.9rem;
}

.account-result, .live-feed {
    min-height: 136px;
    padding: 0.95rem;
    border-radius: 16px;
    border: 1px solid rgba(216, 226, 236, 0.06);
    background: rgba(5, 10, 15, 0.68);
    color: var(--ice);
    font-family: var(--mono-font);
    font-size: 0.86rem;
    overflow: auto;
    white-space: pre-wrap;
    line-height: 1.6;
}

.live-feed { max-height: 320px; }

/* ─── Footer ─────────────────────────────────────────────────────── */

.footer { padding: 2.2rem 0 3rem; }

.footer-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) repeat(4, minmax(0, 0.7fr));
    gap: 1rem;
    padding: 1.6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(27, 36, 48, 0.78), rgba(10, 13, 18, 0.94));
    backdrop-filter: blur(10px);
}

.footer h4 { margin-bottom: 0.7rem; font-size: 1rem; }
.footer-links { display: grid; gap: 0.45rem; }

.footer-links a {
    color: var(--muted);
    font-size: 0.92rem;
    transition: color 200ms ease;
}

.footer-links a:hover { color: var(--cyan); }

.footer-bottom {
    margin-top: 1rem;
    color: var(--muted-2);
    font-size: 0.9rem;
    text-align: center;
}

/* ─── Reveal Animation ───────────────────────────────────────────── */

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 600ms var(--ease-out-expo), transform 600ms var(--ease-out-expo);
}

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

/* Stagger children */
.split-grid .reveal:nth-child(2) { transition-delay: 80ms; }
.split-grid .reveal:nth-child(3) { transition-delay: 160ms; }
.split-grid .reveal:nth-child(4) { transition-delay: 240ms; }

/* ─── Responsive ─────────────────────────────────────────────────── */

@media (max-width: 1160px) {
    .hero-grid, .spotlight, .page-layout, .whitepaper-layout,
    .explorer-grid, .footer-inner {
        grid-template-columns: 1fr;
    }

    .sidebar, .toc { position: static; }

    .metric-strip, .explorer-stat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .split-grid.three, .split-grid.four {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .nav-links { display: none; }
    .nav-toggle { display: inline-block; }
}

@media (max-width: 760px) {
    .container { width: min(var(--container), calc(100% - 1.1rem)); }
    .hero { padding-top: 2.8rem; }

    .hero-copy, .hero-panel, .card, .content-section,
    .timeline-item, .sidebar, .toc {
        padding: 1.15rem;
    }

    .metric-strip, .explorer-stat-grid,
    .split-grid.two, .split-grid.three, .split-grid.four {
        grid-template-columns: 1fr;
    }

    .lookup-input, .config-bar {
        flex-direction: column;
        align-items: stretch;
    }

    h1 { font-size: clamp(2.4rem, 12vw, 3.6rem); }
    .footer-inner { grid-template-columns: 1fr; }
}

/* ─── Particle Canvas ────────────────────────────────────────────── */

#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.5;
}
