/* =============================================
   ATHEIST - Main Stylesheet
   Dark, scientific, cyberpunk/organic aesthetic
   ============================================= */

/* ---- CSS Custom Properties ---- */
:root {
    --bg: #0a0a0a;
    --bg-surface: #111111;
    --bg-card: #161616;
    --bg-card-hover: #1a1a1a;

    --accent: #00ff88;
    --accent-dim: #00cc6a;
    --accent2: #00d4ff;
    --accent2-dim: #00a8cc;
    --danger: #ff6b6b;
    --warning: #ffd93d;
    --accent-glow: rgba(0, 255, 136, 0.15);
    --accent2-glow: rgba(0, 212, 255, 0.15);

    --text: #e8e6e3;
    --text-muted: #888888;
    --text-dim: #555555;

    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-mono: 'Space Mono', 'Courier New', monospace;

    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 6rem;
    --space-2xl: 10rem;

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);

    --max-width: 1200px;
    --nav-height: 64px;
}

/* ---- Disclaimer Overlay ---- */
.disclaimer-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    animation: disclaimer-fade-in 0.5s ease;
}

.disclaimer-overlay.hidden {
    display: none;
}

.disclaimer-box {
    max-width: 520px;
    width: 100%;
    background: #141414;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--space-lg) var(--space-md);
    text-align: center;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 255, 136, 0.05);
}

.disclaimer-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: #ff1a1a;
    text-shadow: 0 0 12px rgba(255, 26, 26, 0.6), 0 0 30px rgba(255, 26, 26, 0.3);
    letter-spacing: 0.04em;
    margin-bottom: var(--space-md);
}

.disclaimer-warn {
    width: 1.8rem;
    height: 1.8rem;
    flex-shrink: 0;
    filter: drop-shadow(0 0 8px rgba(255, 26, 26, 0.7));
}

.disclaimer-text {
    font-size: 0.92rem;
    line-height: 1.7;
    color: #ccc;
    margin-bottom: var(--space-md);
}

.disclaimer-buttons {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
}

.disclaimer-btn {
    padding: 12px 32px;
    border-radius: var(--radius-md);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.25s ease;
}

.disclaimer-btn-enter {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}

.disclaimer-btn-enter:hover {
    background: #00ffaa;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
    transform: translateY(-1px);
}

.disclaimer-btn-leave {
    background: transparent;
    color: var(--text-muted);
    border-color: rgba(255, 255, 255, 0.15);
}

.disclaimer-btn-leave:hover {
    border-color: var(--danger);
    color: var(--danger);
}

@keyframes disclaimer-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent2);
}

img, canvas, svg {
    display: block;
    max-width: 100%;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

ul, ol {
    list-style: none;
}

/* ---- Scroll Progress Bar ---- */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    z-index: 10000;
    transition: width 0.1s linear;
    will-change: width;
}

/* ---- Navigation ---- */
#main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 9999;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform var(--transition), background var(--transition);
}

#main-nav.hidden {
    transform: translateY(-100%);
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-md);
    gap: var(--space-md);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text);
    text-decoration: none;
    flex-shrink: 0;
}

.nav-logo:hover {
    color: var(--accent);
}

.logo-text {
    font-size: 1.1rem;
    letter-spacing: 0.02em;
}

.logo-tagline {
    font-size: 0.65rem;
    font-weight: 400;
    opacity: 0.55;
    font-style: italic;
    letter-spacing: 0.05em;
    text-transform: lowercase;
}

.footer-tagline {
    font-style: italic;
    opacity: 0.7;
}

.logo-atom {
    font-size: 1.4rem;
    filter: drop-shadow(0 0 6px var(--accent));
}

/* ---- Floating Section Nav ---- */
.float-nav {
    position: fixed;
    right: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.float-nav.visible {
    opacity: 1;
    pointer-events: auto;
}

.float-nav-track {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 8px;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
}

.float-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 8px;
    text-decoration: none;
    border-radius: 12px;
    transition: background 0.2s ease;
    position: relative;
}

.float-nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.float-nav-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.float-nav-item.active .float-nav-dot {
    background: var(--accent);
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.4);
    width: 8px;
    height: 8px;
}

.float-nav-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.float-nav:hover .float-nav-label,
.float-nav-item.active .float-nav-label {
    opacity: 1;
    transform: translateX(0);
}

.float-nav-item.active .float-nav-label {
    color: var(--accent);
    font-weight: 700;
}

.float-nav-sub .float-nav-dot {
    width: 4px;
    height: 4px;
    margin-left: 6px;
}

.float-nav-sub.active .float-nav-dot {
    width: 6px;
    height: 6px;
    margin-left: 5px;
}

/* ---- Nav Right group ---- */
.nav-right {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

/* ---- Dropdown Menu ---- */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-mono);
}

.nav-dropdown-btn:hover {
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

.nav-dropdown-icon {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 14px;
}

.nav-dropdown-icon span {
    display: block;
    height: 1.5px;
    background: currentColor;
    border-radius: 1px;
    transition: all 0.25s ease;
}

.nav-dropdown-icon span:nth-child(2) {
    width: 70%;
}

.nav-dropdown-btn[aria-expanded="true"] .nav-dropdown-icon span:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}
.nav-dropdown-btn[aria-expanded="true"] .nav-dropdown-icon span:nth-child(2) {
    opacity: 0;
}
.nav-dropdown-btn[aria-expanded="true"] .nav-dropdown-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px);
}

.nav-dropdown-text {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.nav-dropdown-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: rgba(12, 12, 12, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all 0.2s ease;
    z-index: 10001;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.nav-dropdown.open .nav-dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-panel a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.15s ease;
    letter-spacing: 0.03em;
}

.nav-dropdown-panel a:hover {
    background: rgba(0, 255, 136, 0.06);
    color: var(--accent);
}

.nav-dropdown-panel a.dd-sub {
    padding-left: 22px;
    font-size: 0.65rem;
    color: var(--text-dim);
}

.nav-dropdown-panel a.dd-sub:hover {
    color: var(--accent);
}

.nav-dropdown-panel a.touch-active {
    background: rgba(0, 255, 136, 0.1);
    color: var(--accent);
}

.dd-num {
    font-size: 0.6rem;
    color: var(--accent);
    opacity: 0.5;
    min-width: 18px;
    font-weight: 700;
}

.dd-sep {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 4px 12px;
}

.nav-lang {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.lang-btn {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    transition: all var(--transition);
}

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

.lang-btn.active {
    background: var(--accent);
    color: var(--bg);
}

.lang-sep {
    color: var(--text-dim);
    font-size: 0.75rem;
}

/* Nav Toggle (Mobile) */
/* nav-toggle removed, replaced by float-nav */

/* ---- Sections Base ---- */
.section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: var(--space-2xl) 0;
}

.section-inner {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.section-header {
    margin-bottom: var(--space-lg);
}

.section-number {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    opacity: 0.6;
    margin-bottom: var(--space-xs);
}

.section-number small {
    font-size: 0.65rem;
}

.section-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: var(--space-sm);
    padding: 4px 12px;
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: var(--radius-full);
    display: inline-block;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
    max-width: 800px;
}

.section-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    align-items: start;
}

.section-text {
    max-width: 700px;
}

.section-text p {
    margin-bottom: var(--space-sm);
    color: var(--text-muted);
}

.section-text .lead {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: var(--text);
    font-weight: 400;
    line-height: 1.6;
    margin-bottom: var(--space-md);
}

.section-text em {
    color: var(--accent);
    font-style: italic;
}

.section-text strong {
    color: var(--accent2);
    font-weight: 600;
}

.section-text code {
    font-family: var(--font-mono);
    background: rgba(0, 255, 136, 0.1);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.9em;
    color: var(--accent);
}

/* ---- Fact Badges ---- */
.fact-badge {
    display: flex;
    align-items: flex-start;
    gap: var(--space-xs);
    padding: var(--space-sm);
    background: rgba(0, 255, 136, 0.05);
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: var(--space-md) 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.fact-badge .fact-icon {
    color: var(--accent);
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.fact-badge.hypothesis {
    background: rgba(255, 217, 61, 0.05);
    border-left-color: var(--warning);
}

.fact-badge.hypothesis .fact-icon {
    color: var(--warning);
}

/* ---- Fun Fact ---- */
.fun-fact {
    padding: var(--space-sm) var(--space-md);
    background: rgba(0, 212, 255, 0.05);
    border-radius: var(--radius-md);
    border: 1px solid rgba(0, 212, 255, 0.15);
    font-style: italic;
    color: var(--text) !important;
}

/* ---- Sources ---- */
.section-sources {
    margin-top: var(--space-lg);
    padding-top: var(--space-sm);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm) var(--space-md);
}

.section-sources cite {
    font-size: 0.75rem;
    color: var(--text-dim);
    font-style: normal;
    font-family: var(--font-mono);
}

/* ---- Reveal Animations ---- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }

/* ---- Interactive Labels ---- */
.interactive-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent2);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-sm);
    opacity: 0.8;
}

/* =============================================
   SECTION 0 - HERO
   ============================================= */
.section-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding-top: 0;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg canvas {
    width: 100%;
    height: 100%;
}

.section-hero .section-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: var(--space-lg);
    align-items: center;
    min-height: 80vh;
}

.hero-content {
    max-width: 650px;
}

.hero-pre {
    font-family: var(--font-mono);
    font-size: clamp(0.85rem, 1.5vw, 1rem);
    color: var(--accent);
    margin-bottom: var(--space-sm);
    opacity: 0.8;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 7vw, 5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: var(--space-md);
}

.hero-line {
    display: block;
}

.hero-accent {
    color: var(--accent);
    text-shadow: 0 0 40px rgba(0, 255, 136, 0.3);
}

.hero-sub {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
    max-width: 500px;
}

.hero-disclaimer {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: var(--space-lg);
    font-style: italic;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 14px 32px;
    background: var(--accent);
    color: var(--bg);
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius-full);
    transition: all var(--transition);
    text-decoration: none;
}

.hero-cta:hover {
    background: #fff;
    color: var(--bg);
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(0, 255, 136, 0.3);
}

.cta-arrow {
    animation: bounce-down 2s ease-in-out infinite;
}

@keyframes bounce-down {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(4px); }
}

/* Hero Cell SVG */
.hero-cell-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-cell {
    width: 280px;
    height: 280px;
    animation: cell-float 6s ease-in-out infinite;
    filter: drop-shadow(0 0 30px rgba(0, 255, 136, 0.2));
}

@keyframes cell-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(10px, -15px) scale(1.02); }
    50% { transform: translate(-5px, -25px) scale(0.98); }
    75% { transform: translate(-15px, -10px) scale(1.01); }
}

.cell-membrane {
    animation: cell-pulse 3s ease-in-out infinite;
    transform-origin: center;
}

@keyframes cell-pulse {
    0%, 100% { r: 60; stroke-opacity: 1; }
    50% { r: 63; stroke-opacity: 0.6; }
}

.cell-nucleus {
    animation: nucleus-pulse 4s ease-in-out infinite;
}

@keyframes nucleus-pulse {
    0%, 100% { r: 18; fill-opacity: 0.4; }
    50% { r: 20; fill-opacity: 0.6; }
}

.cell-organelle {
    animation: organelle-drift 5s ease-in-out infinite;
}

.cell-organelle:nth-child(4) { animation-delay: -1s; }
.cell-organelle:nth-child(5) { animation-delay: -2s; }
.cell-organelle:nth-child(6) { animation-delay: -3s; }

@keyframes organelle-drift {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(5px, -3px); }
    66% { transform: translate(-3px, 5px); }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: var(--space-md);
    left: 50%;
    transform: translateX(-50%);
    animation: fade-in-up 1s 1.5s both;
}

.scroll-mouse {
    width: 26px;
    height: 40px;
    border: 2px solid var(--text-dim);
    border-radius: 13px;
    position: relative;
}

.scroll-wheel {
    width: 4px;
    height: 8px;
    background: var(--accent);
    border-radius: 2px;
    position: absolute;
    left: 50%;
    top: 8px;
    transform: translateX(-50%);
    animation: scroll-wheel 2s ease-in-out infinite;
}

@keyframes scroll-wheel {
    0% { top: 8px; opacity: 1; }
    100% { top: 22px; opacity: 0; }
}

@keyframes fade-in-up {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* =============================================
   SECTION 1 - SURVIVAL (Interactive Cell)
   ============================================= */
.cell-interactive-container {
    background: rgba(0, 255, 136, 0.03);
    border: 1px solid rgba(0, 255, 136, 0.1);
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 1;
    max-width: 400px;
    cursor: crosshair;
}

.cell-interactive-container canvas {
    width: 100%;
    height: 100%;
}

/* =============================================
   SECTION 2 - DARWINISM (Evolution Simulation)
   ============================================= */
.simulation-container {
    margin-top: var(--space-lg);
}

.simulation-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.sim-controls {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.sim-btn {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 6px 16px;
    border: 1px solid var(--accent);
    border-radius: var(--radius-full);
    color: var(--accent);
    background: transparent;
    transition: all var(--transition);
}

.sim-btn:hover {
    background: var(--accent);
    color: var(--bg);
}

.sim-gen {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent2);
}

.sim-canvas-wrapper {
    position: relative;
}

#evolution-canvas {
    width: 100%;
    height: 400px;
    background: rgba(0, 255, 136, 0.02);
    border: 1px solid rgba(0, 255, 136, 0.1);
    border-radius: var(--radius-lg);
}

.sim-panel {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(10, 10, 10, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 8px 10px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    line-height: 1.6;
    color: var(--text-muted);
    pointer-events: none;
    min-width: 110px;
    backdrop-filter: blur(6px);
}

.sim-panel .panel-title {
    color: var(--text-secondary);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding-bottom: 3px;
}

.sim-panel .panel-row {
    display: flex;
    align-items: center;
    gap: 5px;
}

.sim-panel .panel-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.sim-panel .panel-row.hybrid {
    color: var(--text-secondary);
}

.sim-speed-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
}

.sim-speed-label input[type="range"] {
    width: 60px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.sim-speed-label input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
}

.sim-speed-label input[type="range"]::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: none;
}

#sim-speed-val {
    min-width: 20px;
    text-align: center;
    color: var(--accent);
}

.sim-legend {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: var(--space-xs);
    font-style: italic;
}

/* =============================================
   SECTION 3 - REPRODUCTION (DNA Helix)
   ============================================= */
.section-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
}

.dna-helix {
    width: 80px;
    height: 250px;
    position: relative;
}

.dna-strand {
    position: absolute;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 20px,
        var(--accent) 20px,
        var(--accent) 22px
    );
    mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
    animation: dna-rotate 4s linear infinite;
    opacity: 0.4;
}

.dna-strand-2 {
    animation-delay: -2s;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 20px,
        var(--accent2) 20px,
        var(--accent2) 22px
    );
}

@keyframes dna-rotate {
    0% { transform: perspective(200px) rotateY(0deg); }
    100% { transform: perspective(200px) rotateY(360deg); }
}

.timeline-badge {
    text-align: center;
}

.timeline-number {
    display: block;
    font-family: var(--font-mono);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    color: var(--accent);
    text-shadow: 0 0 30px rgba(0, 255, 136, 0.3);
    line-height: 1;
}

.timeline-unit {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

/* =============================================
   SECTION 4 - SOCIETY (Zoom Visualization)
   ============================================= */
.zoom-container {
    margin-top: var(--space-lg);
}

.zoom-viewport {
    position: relative;
    padding: var(--space-md) 0;
}

.zoom-canvas-wrap {
    position: relative;
}

#zoom-canvas {
    width: 100%;
    height: 340px;
    border-radius: var(--radius-lg);
    background: radial-gradient(ellipse at center, rgba(0,20,10,0.6) 0%, rgba(0,0,0,0.5) 100%);
    border: 1px solid rgba(0, 255, 136, 0.08);
    display: block;
}

/* Nav arrows */
.zoom-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 255, 136, 0.15);
    color: var(--accent);
    font-size: 1.8rem;
    line-height: 1;
    width: 36px;
    height: 52px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 2;
    padding: 0;
}

.zoom-nav:hover {
    background: rgba(0, 255, 136, 0.1);
    border-color: rgba(0, 255, 136, 0.35);
}

.zoom-nav:active {
    transform: translateY(-50%) scale(0.94);
}

.zoom-nav:disabled {
    opacity: 0.2;
    cursor: default;
    pointer-events: none;
}

.zoom-prev { left: 8px; }
.zoom-next { right: 8px; }

#zoom-track {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-xs);
    padding: var(--space-md) 0;
}

.zoom-level {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm);
    border-radius: var(--radius-md);
    transition: all 0.35s ease;
    cursor: pointer;
    flex: 1;
    text-align: center;
    border: 1px solid transparent;
    user-select: none;
    -webkit-user-select: none;
}

.zoom-level:hover {
    background: rgba(0, 255, 136, 0.04);
    border-color: rgba(0, 255, 136, 0.1);
}

.zoom-level.visited {
    opacity: 1;
}

.zoom-level.visited span {
    color: rgba(0, 212, 255, 0.5);
}

.zoom-level.current {
    background: rgba(0, 255, 136, 0.1);
    border-color: rgba(0, 255, 136, 0.3);
    transform: scale(1.08);
}

.zoom-icon {
    font-size: 2rem;
    transition: transform 0.35s ease;
}

.zoom-level.current .zoom-icon {
    transform: scale(1.25);
}

.zoom-level span {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.35s ease;
}

.zoom-level.current span {
    color: var(--accent);
}

.zoom-bar {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    overflow: hidden;
    margin-top: var(--space-xs);
}

.zoom-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    border-radius: 2px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.sim-graph-container {
    margin-top: var(--space-sm);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid rgba(0, 255, 136, 0.15);
    background: rgba(10, 10, 10, 0.9);
}

.sim-graph-container canvas {
    width: 100%;
    height: 400px;
    display: block;
}

/* =============================================
   SECTION 5 - HORMONES (Explorer Grid)
   ============================================= */
.hormone-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.hormone-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    transition: all var(--transition);
    cursor: default;
    position: relative;
    overflow: hidden;
}

.hormone-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, var(--accent-glow), transparent 70%);
    opacity: 0;
    transition: opacity var(--transition);
}

.hormone-card:hover::before {
    opacity: 1;
}

.hormone-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.hormone-card[data-hormone="cortisol"]:hover {
    border-color: rgba(255, 107, 107, 0.3);
}

.hormone-card[data-hormone="oxytocin"]:hover {
    border-color: rgba(0, 212, 255, 0.3);
}

.hormone-card[data-hormone="dopamine"]:hover {
    border-color: rgba(0, 255, 136, 0.3);
}

.hormone-card[data-hormone="testosterone"]:hover {
    border-color: rgba(255, 217, 61, 0.3);
}

.hormone-molecule {
    width: 60px;
    height: 60px;
    margin-bottom: var(--space-sm);
    position: relative;
    z-index: 1;
}

.hormone-molecule svg {
    width: 100%;
    height: 100%;
}

.hormone-name {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 4px;
    position: relative;
    z-index: 1;
}

.hormone-role {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent2);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-sm);
    position: relative;
    z-index: 1;
}

.hormone-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
    position: relative;
    z-index: 1;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.3s ease;
    opacity: 0;
}

.hormone-card:hover .hormone-desc {
    max-height: 200px;
    opacity: 1;
}

/* =============================================
   SECTION 6 - GOD (Philosophical)
   ============================================= */
.section-god {
    background: linear-gradient(180deg, var(--bg), #0d0d1a, var(--bg));
}

.god-text {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.god-lead {
    font-size: clamp(1.3rem, 3vw, 2rem) !important;
    color: var(--text) !important;
    font-family: var(--font-heading);
    font-style: italic;
}

.god-quote {
    margin: var(--space-lg) 0;
    padding: var(--space-md) var(--space-lg);
    border-left: 3px solid var(--accent);
    background: rgba(0, 255, 136, 0.03);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    text-align: left;
}

.god-quote p {
    font-family: var(--font-heading);
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    font-style: italic;
    color: var(--accent) !important;
    line-height: 1.4;
}

.section-god .section-header {
    text-align: center;
}

.section-god .section-sources {
    justify-content: center;
}

/* =============================================
   SECTION 7A - ATOMS
   ============================================= */
.atom-list {
    margin: var(--space-md) 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.atom-list li {
    padding: var(--space-sm) var(--space-md);
    background: rgba(0, 212, 255, 0.03);
    border-left: 2px solid var(--accent2);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.sagan-quote {
    margin: var(--space-lg) 0;
    padding: var(--space-lg);
    text-align: center;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.05), rgba(0, 212, 255, 0.05));
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.sagan-quote p {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-style: italic;
    color: var(--text) !important;
    margin-bottom: var(--space-sm);
}

.sagan-quote footer {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.atom-visual {
    margin-top: var(--space-lg);
}

.atom-visual canvas {
    width: 100%;
    height: 300px;
    border-radius: var(--radius-lg);
}

/* =============================================
   SECTION 7B - MATTER (Drill Down)
   ============================================= */
.drill-down {
    margin-top: var(--space-lg);
}

.drill-levels {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    flex-wrap: wrap;
    margin-bottom: var(--space-md);
}

.drill-level {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: var(--bg-card);
    transition: all var(--transition);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    cursor: pointer;
}

.drill-level:hover {
    border-color: rgba(0, 255, 136, 0.3);
}

.drill-level.active {
    border-color: var(--accent);
    background: rgba(0, 255, 136, 0.08);
    color: var(--accent);
}

.drill-icon {
    font-size: 1.5rem;
}

.drill-arrow {
    color: var(--text-dim);
    font-size: 1.2rem;
}

.drill-display {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

#drill-canvas {
    width: 100%;
    height: 300px;
}

/* =============================================
   SECTION 7C - BRAIN (Synapses)
   ============================================= */
.meta-moment {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.08), rgba(0, 255, 136, 0.05));
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-lg);
    margin: var(--space-md) 0;
}

.meta-text {
    font-family: var(--font-heading);
    font-size: clamp(1rem, 2vw, 1.2rem);
    font-style: italic;
    color: var(--text) !important;
    line-height: 1.6;
}

.synapse-container {
    margin-top: var(--space-lg);
}

#synapse-canvas {
    width: 100%;
    height: 350px;
    border-radius: var(--radius-lg);
    background: radial-gradient(ellipse at center, rgba(0, 20, 40, 0.5), transparent);
}

/* =============================================
   SECTION 7D - OS (Terminal)
   ============================================= */
.sensitivity-note {
    background: rgba(255, 217, 61, 0.05);
    border: 1px solid rgba(255, 217, 61, 0.15);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin: var(--space-md) 0;
    font-size: 0.85rem;
    line-height: 1.6;
}

.sensitivity-note p {
    color: var(--text-muted) !important;
}

.help-link {
    margin-top: var(--space-xs);
    font-size: 0.8rem;
}

.help-link a {
    color: var(--accent2);
}

.terminal-container {
    margin-top: var(--space-lg);
}

.terminal {
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    overflow: hidden;
    font-family: var(--font-mono);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-dot.red { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #27c93f; }

.terminal-title {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-left: auto;
}

.terminal-code {
    padding: var(--space-md);
    font-size: 0.8rem;
    line-height: 1.8;
    color: var(--text-muted);
    min-height: 250px;
    overflow-x: auto;
    white-space: pre;
}

.terminal-code .keyword { color: #c792ea; }
.terminal-code .function { color: #82aaff; }
.terminal-code .string { color: var(--accent); }
.terminal-code .comment { color: var(--text-dim); font-style: italic; }
.terminal-code .type { color: var(--accent2); }
.terminal-code .number { color: #f78c6c; }
.terminal-code .cursor-blink {
    display: inline-block;
    width: 8px;
    height: 1.1em;
    background: var(--accent);
    animation: blink 1s step-start infinite;
    vertical-align: text-bottom;
}

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

/* =============================================
   SECTION 7E - FINALE
   ============================================= */
.section-finale {
    background: linear-gradient(180deg, var(--bg), #060612, #0a0a0a);
}

.finale-lead {
    font-family: var(--font-heading) !important;
    font-size: clamp(1.2rem, 2.5vw, 1.6rem) !important;
}

.finale-conclusion {
    font-family: var(--font-heading);
    font-size: clamp(1.3rem, 3vw, 2rem);
    color: var(--accent) !important;
    font-style: italic;
    margin-top: var(--space-md);
}

.assembly-container {
    margin: var(--space-lg) 0;
}

#assembly-canvas {
    width: 100%;
    height: 350px;
    border-radius: var(--radius-lg);
}

.finale-cta {
    text-align: center;
    padding: var(--space-xl) 0;
}

.finale-tagline {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--text);
    margin-bottom: var(--space-sm);
}

.finale-closing {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: var(--accent);
    font-style: italic;
}

/* =============================================
   SECTION 7F - ÉPILOGUE
   ============================================= */
.section-epilogue {
    background: linear-gradient(180deg, #0a0a0a, #060612, #0a0a0a);
}

.epilogue-lead {
    font-family: var(--font-heading) !important;
    font-size: clamp(1.2rem, 2.5vw, 1.6rem) !important;
}

.epilogue-reflection {
    font-family: var(--font-heading);
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: var(--text-muted);
    font-style: italic;
    border-left: 3px solid var(--accent);
    padding-left: var(--space-md);
    margin: var(--space-md) 0;
}

.epilogue-cta {
    text-align: center;
    padding: var(--space-xl) 0;
}

.epilogue-wisdom {
    font-family: var(--font-heading);
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 700;
    color: var(--text);
    margin-bottom: var(--space-md);
    font-style: italic;
}

.epilogue-mid {
    font-size: clamp(1rem, 2.2vw, 1.25rem);
    line-height: 1.8;
    color: var(--text-muted);
    margin: var(--space-md) 0;
    max-width: 700px;
}

.epilogue-closing {
    font-family: var(--font-heading);
    font-size: clamp(1.3rem, 3.5vw, 2.2rem);
    font-weight: 700;
    color: var(--accent);
    margin-top: var(--space-lg);
    line-height: 1.4;
}

/* =============================================
   GLOSSARY TOOLTIPS
   ============================================= */
.glossary-term {
    color: var(--accent);
    border-bottom: 1px dotted var(--accent);
    cursor: help;
    position: relative;
    transition: color 0.2s, border-color 0.2s;
}

.glossary-term:hover {
    color: #fff;
    border-bottom-color: #fff;
}

.glossary-tooltip {
    position: fixed;
    z-index: 10000;
    width: min(380px, 90vw);
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid var(--accent);
    border-radius: 12px;
    padding: 1.2rem 1.4rem;
    box-shadow: 0 8px 32px rgba(0, 255, 136, 0.15), 0 0 60px rgba(0, 255, 136, 0.05);
    pointer-events: none;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    font-family: var(--font-body);
    line-height: 1.6;
}

.glossary-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.glossary-tooltip::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 24px;
    width: 12px;
    height: 12px;
    background: #1a1a2e;
    border-top: 1px solid var(--accent);
    border-left: 1px solid var(--accent);
    transform: rotate(45deg);
}

.glossary-tooltip.above::before {
    top: auto;
    bottom: -6px;
    border-top: none;
    border-left: none;
    border-bottom: 1px solid var(--accent);
    border-right: 1px solid var(--accent);
}

.glossary-tooltip-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.glossary-tooltip-title .glossary-emoji {
    font-size: 1.2rem;
}

.glossary-tooltip-def {
    font-size: 0.88rem;
    color: #ccc;
    margin-bottom: 0.5rem;
}

.glossary-tooltip-example {
    font-size: 0.82rem;
    color: #aaa;
    background: rgba(0, 255, 136, 0.05);
    border-left: 2px solid var(--accent);
    padding: 0.4rem 0.7rem;
    border-radius: 0 6px 6px 0;
    margin-top: 0.5rem;
    font-style: italic;
}

.glossary-tooltip-etymology {
    font-size: 0.78rem;
    color: #888;
    margin-top: 0.4rem;
}

/* 300k clickable popup */
.clickable-stat {
    cursor: pointer;
    color: var(--accent);
    border-bottom: 2px dashed var(--accent);
    transition: all 0.2s;
}

.clickable-stat:hover {
    color: #fff;
    border-bottom-color: #fff;
}

.stat-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.stat-popup-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.stat-popup {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f0f23 100%);
    border: 1px solid var(--accent);
    border-radius: 16px;
    padding: 2rem 2.2rem;
    max-width: min(500px, 90vw);
    box-shadow: 0 12px 48px rgba(0, 255, 136, 0.2);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    text-align: center;
}

.stat-popup-overlay.visible .stat-popup {
    transform: scale(1);
}

.stat-popup-number {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.stat-popup-text {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    color: #ccc;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.stat-popup-close {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #999;
    padding: 0.4rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.stat-popup-close:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
    background: var(--bg-surface);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: var(--space-xl) 0 var(--space-lg);
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* Viewer counter */
.footer-viewers {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: var(--space-lg);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.viewer-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--accent); }
    50% { opacity: 0.5; box-shadow: 0 0 16px var(--accent); }
}

/* Discover link */
.footer-discover {
    margin-bottom: var(--space-lg);
}

.discover-link {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: var(--radius-md);
    background: rgba(0, 212, 255, 0.04);
    text-decoration: none;
    transition: all 0.3s ease;
}

.discover-link:hover {
    background: rgba(0, 212, 255, 0.08);
    border-color: rgba(0, 212, 255, 0.3);
    transform: translateX(4px);
}

.discover-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
}

.discover-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.discover-text strong {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent2);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.discover-text em {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: normal;
}

.discover-arrow {
    font-size: 1.2rem;
    color: var(--accent2);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.discover-link:hover .discover-arrow {
    transform: translateX(4px);
}

/* Crypto donations */
.footer-donate {
    margin-bottom: var(--space-lg);
    padding: var(--space-md) 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-donate h3 {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-md);
}

/* Donate header with tooltip trigger */
.donate-header {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: var(--space-md);
}

.donate-header h3 {
    margin-bottom: 0;
}

.donate-tip-wrap {
    position: relative;
}

.donate-info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid var(--accent-dim);
    background: rgba(0, 255, 136, 0.1);
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    cursor: pointer;
    margin-left: 8px;
    transition: background 0.2s, transform 0.2s;
}

.donate-info-btn:hover {
    background: rgba(0, 255, 136, 0.25);
    transform: scale(1.1);
}

/* Floating tooltip */
.donate-tooltip {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    padding: 12px 14px;
    background: #1a1a1a;
    border: 1px solid var(--accent);
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.6), 0 0 12px rgba(0, 255, 136, 0.1);
    z-index: 100;
    animation: tooltip-in 0.3s ease;
    pointer-events: auto;
}

.donate-tooltip.hidden {
    display: none;
}

.donate-tooltip p {
    font-size: 0.8rem;
    line-height: 1.55;
    color: #e0e0e0;
    margin: 0;
    font-weight: 400;
}

/* Arrow pointing down */
.donate-tooltip-arrow {
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 10px;
    height: 10px;
    background: #1a1a1a;
    border-right: 1px solid var(--accent);
    border-bottom: 1px solid var(--accent);
}

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

.donate-wallets {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.donate-wallet {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.02);
    transition: border-color 0.3s ease;
    cursor: pointer;
    animation: wallet-pulse 1.8s ease-in-out 3s 1;
}

@keyframes wallet-pulse {
    0%   { border-color: rgba(255, 255, 255, 0.06); box-shadow: 0 0 0 0 transparent; }
    40%  { border-color: rgba(0, 255, 136, 0.5); box-shadow: 0 0 12px rgba(0, 255, 136, 0.15); }
    100% { border-color: rgba(255, 255, 255, 0.06); box-shadow: 0 0 0 0 transparent; }
}

.donate-wallet:hover {
    border-color: rgba(0, 255, 136, 0.15);
}

.donate-coin {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 255, 136, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.donate-symbol {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.02em;
}

.donate-addr {
    flex: 1;
    min-width: 0;
    font-size: 0.7rem;
    color: var(--text-dim);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: text;
    user-select: all;
    -webkit-user-select: all;
}

.donate-copy {
    flex-shrink: 0;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    padding: 0;
}

.donate-copy:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(0, 255, 136, 0.06);
}

.donate-copy.copied {
    border-color: var(--accent);
    color: var(--accent);
}

.donate-wallet.copied-flash {
    border-color: var(--accent);
    background: rgba(0, 255, 136, 0.06);
}

.donate-wallet .donate-toast {
    display: none;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--accent);
    white-space: nowrap;
    animation: toast-fade 1.5s ease forwards;
}

.donate-wallet.copied-flash .donate-toast {
    display: inline;
}

@keyframes toast-fade {
    0%   { opacity: 0; transform: translateY(2px); }
    20%  { opacity: 1; transform: translateY(0); }
    80%  { opacity: 1; }
    100% { opacity: 0; }
}

.footer-sources h3 {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-md);
}

.footer-sources ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-xs);
    margin-bottom: var(--space-lg);
}

.footer-sources li {
    font-size: 0.8rem;
    color: var(--text-dim);
    padding: var(--space-xs) 0;
}

.footer-sources li em {
    color: var(--text-muted);
}

.footer-note {
    padding: var(--space-md) 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: var(--space-md);
}

.footer-note p {
    font-size: 0.8rem;
    color: var(--text-dim);
    line-height: 1.6;
    max-width: 700px;
}

.footer-copy p {
    font-size: 0.75rem;
    color: var(--text-dim);
}

/* =============================================
   BACK TO TOP
   ============================================= */
.back-to-top {
    position: fixed;
    bottom: var(--space-md);
    right: var(--space-md);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(0, 255, 136, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition);
    z-index: 9990;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 255, 136, 0.4);
}

/* =============================================
   NOISE OVERLAY (subtle grain texture)
   ============================================= */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 99999;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* =============================================
   RESPONSIVE - Tablet
   ============================================= */
@media (max-width: 1024px) {
    .section-hero .section-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-sub {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-cell-container {
        display: none;
    }

    .section-grid {
        grid-template-columns: 1fr;
    }

    .section-text {
        max-width: 100%;
    }
}

/* =============================================
   RESPONSIVE - Mobile
   ============================================= */
@media (max-width: 768px) {
    :root {
        --space-lg: 3rem;
        --space-xl: 4rem;
        --space-2xl: 6rem;
    }

    .float-nav {
        right: 0.5rem;
    }

    .float-nav-track {
        padding: 6px 5px;
        gap: 1px;
    }

    .float-nav-item {
        padding: 4px 5px;
    }

    .float-nav-label {
        font-size: 0.5rem;
    }

    .section {
        min-height: auto;
        padding: var(--space-xl) 0;
    }

    .section-hero {
        min-height: 100vh;
        min-height: 100dvh;
    }

    .hormone-grid {
        grid-template-columns: 1fr;
    }

    .hormone-desc {
        max-height: none !important;
        opacity: 1 !important;
    }

    #evolution-canvas {
        height: 280px;
    }

    #synapse-canvas {
        height: 250px;
    }

    .drill-levels {
        gap: 4px;
    }

    .drill-level {
        padding: var(--space-xs);
        font-size: 0.65rem;
    }

    .drill-icon {
        font-size: 1.2rem;
    }

    .drill-arrow {
        font-size: 0.8rem;
    }

    #zoom-canvas {
        height: 240px;
    }

    .zoom-nav {
        width: 30px;
        height: 44px;
        font-size: 1.4rem;
    }

    .zoom-prev { left: 4px; }
    .zoom-next { right: 4px; }

    #zoom-track {
        flex-wrap: nowrap;
        gap: 2px;
        justify-content: center;
    }

    .zoom-level {
        min-width: 0;
        padding: var(--space-xs);
    }

    .zoom-icon {
        font-size: 1.4rem;
    }

    .zoom-level span {
        font-size: 0.55rem;
    }

    .terminal-code {
        font-size: 0.65rem;
    }

    .god-quote {
        padding: var(--space-sm) var(--space-md);
    }

    .sagan-quote {
        padding: var(--space-md);
    }

    .meta-moment {
        padding: var(--space-sm) var(--space-md);
    }
}

/* =============================================
   RESPONSIVE - Small Mobile
   ============================================= */
@media (max-width: 400px) {
    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .drill-arrow {
        display: none;
    }

    .drill-levels {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }
}

/* =============================================
   ACCESSIBILITY - Reduced Motion
   ============================================= */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* =============================================
   PRINT STYLES
   ============================================= */
@media print {
    body::after,
    #scroll-progress,
    #main-nav,
    .back-to-top,
    .scroll-indicator,
    canvas,
    .terminal,
    .hero-bg {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .section {
        min-height: auto;
        page-break-inside: avoid;
    }
}

/* =============================================
   RTL SUPPORT (Arabic)
   ============================================= */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .nav-inner {
    flex-direction: row-reverse;
}

[dir="rtl"] .nav-links {
    flex-direction: row-reverse;
}

[dir="rtl"] .nav-links a::after {
    left: auto;
    right: 0;
}

[dir="rtl"] .fact-badge {
    border-left: none;
    border-right: 3px solid var(--accent);
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

[dir="rtl"] .fact-badge.hypothesis {
    border-left: none;
    border-right-color: var(--warning);
}

[dir="rtl"] .section-grid {
    direction: rtl;
}

[dir="rtl"] .atom-list li {
    border-left: none;
    border-right: 2px solid var(--accent2);
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

[dir="rtl"] .god-quote {
    border-left: none;
    border-right: 3px solid var(--accent);
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

[dir="rtl"] .terminal-header {
    flex-direction: row-reverse;
}

[dir="rtl"] .terminal-title {
    margin-left: 0;
    margin-right: auto;
}

[dir="rtl"] .drill-arrow {
    transform: scaleX(-1);
}

[dir="rtl"] .hero-content,
[dir="rtl"] .god-text,
[dir="rtl"] .finale-cta {
    text-align: right;
}

[dir="rtl"] .epilogue-cta {
    text-align: right;
}

[dir="rtl"] .epilogue-reflection {
    border-left: none;
    border-right: 3px solid var(--accent);
    padding-left: 0;
    padding-right: var(--space-md);
}


[dir="rtl"] .section-god .section-header,
[dir="rtl"] .god-text {
    text-align: center;
}

[dir="rtl"] .scroll-indicator {
    left: 50%;
    right: auto;
}

[dir="rtl"] .back-to-top {
    right: auto;
    left: var(--space-md);
}

[dir="rtl"] #scroll-progress {
    left: auto;
    right: 0;
}

@media (max-width: 768px) {
    [dir="rtl"] .nav-links {
        right: auto;
        left: 0;
        transform: translateX(-100%);
        align-items: flex-end;
    }

    [dir="rtl"] .nav-links.open {
        transform: translateX(0);
    }
}
