:root {
    --abyssal-pine: #071A0F;
    --midnight-forest: #0D2818;
    --shadow-emerald: #153B25;
    --living-jade: #3DA67A;
    --phosphor-green: #5FBF8A;
    --frosted-canopy: rgba(15, 46, 29, 0.85);
    --deep-moss: rgba(10, 36, 22, 0.92);
    --pale-lichen: #E8F5E0;
    --mist-fern: #C8E6C0;
    --sage-whisper: #8FBFA3;
    --bioluminescent-core: #44D98C;
    --spectral-halo: rgba(43, 140, 94, 0.3);
    --amber-epoch: #D4A843;
    color-scheme: dark;
}

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

body {
    background-color: var(--abyssal-pine);
    color: var(--pale-lichen);
    font-family: 'Commissioner', sans-serif;
    font-weight: 300;
    font-size: clamp(1.05rem, 1.6vw, 1.35rem);
    line-height: 1.7;
    overflow-x: hidden;
}

/* Node Field Canvas */
#nodeField {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* The Surface */
.scene-surface {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.surface-content {
    text-align: center;
    position: relative;
}

.site-title {
    font-family: 'Commissioner', sans-serif;
    font-weight: 100;
    font-size: clamp(2rem, 5vw, 4rem);
    letter-spacing: 0.3em;
    color: var(--living-jade);
    opacity: 0;
    animation: fadeIn 2s ease forwards;
}

.site-subtitle {
    font-family: 'Commissioner', sans-serif;
    font-weight: 200;
    font-size: 1rem;
    letter-spacing: 0.15em;
    color: var(--sage-whisper);
    margin-top: 16px;
    opacity: 0;
    animation: fadeIn 1.5s ease 1s forwards;
}

.axis-line {
    width: 1px;
    height: 0;
    background: var(--living-jade);
    opacity: 0.3;
    margin: 32px auto 0;
    animation: growDown 3s ease 1.5s forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

@keyframes growDown {
    to { height: 120px; }
}

.scroll-cue {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    animation: cuePulse 2s ease-in-out infinite;
    z-index: 10;
}

@keyframes cuePulse {
    0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.4; }
    50% { transform: translateX(-50%) scale(1.15); opacity: 0.7; }
}

/* Column Shaft */
.column-shaft {
    position: relative;
    max-width: 680px;
    margin: 0 auto;
    padding: 80px 24px 200px;
    z-index: 10;
    box-shadow: 0 0 120px 40px rgba(61, 166, 122, 0.04);
}

/* Era Markers */
.era-marker {
    font-family: 'Commissioner', sans-serif;
    font-weight: 100;
    font-size: clamp(3rem, 8vw, 6rem);
    letter-spacing: 0.25em;
    color: var(--living-jade);
    opacity: 0;
    text-align: center;
    padding: 8vh 0;
    transition: opacity 1.5s ease;
}

.era-marker.revealed {
    opacity: 0.15;
}

/* Chrono Cards */
.chrono-card {
    perspective: 1200px;
    margin: 10vh 0;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.chrono-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

.card-inner {
    position: relative;
    width: 100%;
    min-height: 280px;
    transform-style: preserve-3d;
    transition: transform 700ms cubic-bezier(0.4, 0.0, 0.2, 1);
    cursor: pointer;
}

.card-inner.flipped {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    min-height: 280px;
    backface-visibility: hidden;
    border-radius: 4px;
    padding: 32px;
}

.card-front {
    background: var(--frosted-canopy);
    border-top: 2px solid var(--living-jade);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.card-front-scan {
    background-image:
        repeating-linear-gradient(
            transparent 0px,
            transparent 3px,
            rgba(61, 166, 122, 0.04) 3px,
            rgba(61, 166, 122, 0.04) 4px
        );
    background-color: rgba(15, 46, 29, 0.85);
}

.card-back {
    transform: rotateY(180deg);
    background: var(--deep-moss);
    border-top: 2px solid var(--phosphor-green);
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Card Nodes */
.card-node {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
}

.node-circle {
    border-radius: 50%;
    background: radial-gradient(ellipse at center, var(--bioluminescent-core) 0%, transparent 70%);
    box-shadow: 0 0 20px var(--spectral-halo);
}

.node-diamond {
    width: 36px;
    height: 36px;
    border: 1.5px solid var(--living-jade);
    transform: rotate(45deg);
    margin-bottom: 24px;
}

.node-hexagon {
    width: 40px;
    height: 40px;
    background: rgba(21, 59, 37, 0.4);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    border: 1.5px solid var(--phosphor-green);
}

.node-triangle {
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 34px solid rgba(212, 168, 67, 0.25);
    margin-bottom: 16px;
}

/* Card Text */
.card-date {
    font-family: 'Commissioner', sans-serif;
    font-weight: 400;
    font-size: 0.85rem;
    color: var(--sage-whisper);
    margin-bottom: 8px;
}

.card-headline {
    font-family: 'Commissioner', sans-serif;
    font-weight: 700;
    font-size: 1.6rem;
    letter-spacing: 0.02em;
    line-height: 1.2;
    color: var(--pale-lichen);
    margin-bottom: 12px;
}

.card-excerpt {
    font-weight: 300;
    color: var(--mist-fern);
    font-size: 1rem;
    line-height: 1.6;
}

.card-body {
    font-weight: 300;
    font-size: 1.05rem;
    color: var(--mist-fern);
    line-height: 1.7;
    margin-bottom: 16px;
}

.card-meta {
    font-weight: 400;
    font-size: 0.85rem;
    color: var(--sage-whisper);
    opacity: 0.7;
}

/* Amber Cards */
.card-amber .card-front {
    border-top-color: var(--amber-epoch);
}

.card-amber .card-headline {
    color: var(--amber-epoch);
}

/* Dissolving Cards */
.card-dissolve {
    opacity: 0;
}

.card-dissolve.revealed {
    opacity: 0.7;
}

.card-final.revealed {
    opacity: 0.4;
}

/* Responsive */
@media (max-width: 768px) {
    .column-shaft {
        padding: 40px 16px 120px;
    }

    .card-front, .card-back {
        padding: 24px;
        min-height: 240px;
    }

    .site-title {
        letter-spacing: 0.15em;
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-title, .site-subtitle {
        opacity: 1;
        animation: none;
    }

    .axis-line {
        height: 120px;
        animation: none;
    }

    .scroll-cue {
        animation: none;
        opacity: 0.5;
    }

    .chrono-card {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .card-dissolve { opacity: 0.7; }
    .card-final { opacity: 0.4; }

    .card-inner {
        transition: transform 0.3s ease;
    }

    .era-marker {
        opacity: 0.15;
        transition: none;
    }
}
