:root {
    --sage: #8BAF9C;
    --espresso: #3A2A1D;
    --gold: #C4A96A;
    --leather: #6B4E37;
    --deep-sage: #5B8C7A;
    --cream: #FFF8EB;
    --parchment: #F5ECD7;
    --dark-walnut: #4A3728;
    --shadow-light: rgba(255, 252, 243, 0.7);
    --shadow-dark: rgba(74, 55, 40, 0.25);
    --shadow-dark-strong: rgba(74, 55, 40, 0.4);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--parchment);
    color: var(--espresso);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Scroll Indicator */
.scroll-indicator {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    width: 8px;
    height: 120px;
}

.scroll-indicator__track {
    width: 100%;
    height: 100%;
    border-radius: 4px;
    background: var(--parchment);
    box-shadow: inset 2px 2px 5px var(--shadow-dark),
                inset -2px -2px 5px var(--shadow-light);
    position: relative;
}

.scroll-indicator__thumb {
    width: 8px;
    height: 30px;
    border-radius: 4px;
    background: var(--gold);
    box-shadow: 2px 2px 5px var(--shadow-dark),
                -2px -2px 5px var(--shadow-light);
    position: absolute;
    top: 0;
    left: 0;
    transition: top 0.1s ease-out;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    position: relative;
}

.hero-content {
    text-align: center;
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s forwards;
}

.hero-title {
    font-family: 'Libre Baskerville', serif;
    font-size: clamp(2.8rem, 6vw, 5.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--espresso);
    text-shadow: 2px 2px 4px rgba(139, 109, 71, 0.5), -2px -2px 4px rgba(255, 252, 243, 0.8);
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1rem, 2vw, 1.3rem);
    font-weight: 300;
    color: var(--leather);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-viz {
    width: 90%;
    max-width: 800px;
    opacity: 0;
    animation: fadeIn 2s ease 0.8s forwards;
}

.topo-map {
    width: 100%;
    height: auto;
}

/* Blob Dividers */
.blob-divider {
    width: 100%;
    overflow: hidden;
    line-height: 0;
    margin: -1px 0;
}

.blob-divider svg {
    width: 100%;
    height: 80px;
}

.blob-path {
    fill: var(--parchment);
    opacity: 0.6;
}

/* Content Slabs */
.content-slab {
    padding: 6rem 2rem;
    position: relative;
}

.slab-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

/* Neomorphic Cards */
.neomorphic-card {
    padding: 2.5rem;
    border-radius: 24px;
    background: var(--parchment);
}

.neomorphic-card--raised {
    box-shadow: 8px 8px 16px var(--shadow-dark),
                -8px -8px 16px var(--shadow-light);
}

.neomorphic-card--inset {
    box-shadow: inset 6px 6px 12px var(--shadow-dark),
                inset -6px -6px 12px var(--shadow-light);
}

.section-heading {
    font-family: 'Libre Baskerville', serif;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 700;
    color: var(--espresso);
    margin-bottom: 1.2rem;
    text-shadow: 1px 1px 3px rgba(139, 109, 71, 0.3), -1px -1px 3px rgba(255, 252, 243, 0.6);
}

.section-text {
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.95rem, 1.5vw, 1.1rem);
    font-weight: 400;
    color: var(--dark-walnut);
    line-height: 1.8;
}

/* Data Viz Containers */
.scatter-plot-container,
.radial-chart-container,
.stream-graph-container,
.heatmap-container,
.network-container {
    width: 100%;
    border-radius: 20px;
    background: var(--parchment);
    box-shadow: 6px 6px 14px var(--shadow-dark),
                -6px -6px 14px var(--shadow-light);
    padding: 1.5rem;
    overflow: hidden;
}

.data-viz {
    width: 100%;
    height: auto;
}

/* IBM Plex Mono for data labels */
.data-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    fill: var(--leather);
}

.axis-line {
    stroke: var(--gold);
    stroke-width: 1;
    opacity: 0.4;
}

/* Closing Section */
.closing-section {
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
}

.closing-content {
    text-align: center;
}

.closing-text {
    font-family: 'Libre Baskerville', serif;
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 400;
    font-style: italic;
    color: var(--leather);
    text-shadow: 1px 1px 3px rgba(139, 109, 71, 0.3), -1px -1px 3px rgba(255, 252, 243, 0.6);
    margin-bottom: 2rem;
}

.closing-decoration {
    width: 200px;
    height: 200px;
    margin: 0 auto;
}

.closing-svg {
    width: 100%;
    height: 100%;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.34, 1.56, 0.64, 1),
                transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

/* Staggered children */
.slab-inner > *:nth-child(1) { transition-delay: 0s; }
.slab-inner > *:nth-child(2) { transition-delay: 0.15s; }

/* Responsive */
@media (max-width: 768px) {
    .slab-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .scroll-indicator {
        right: 12px;
        height: 80px;
    }

    .content-slab {
        padding: 4rem 1.5rem;
    }

    .neomorphic-card {
        padding: 1.8rem;
    }

    .hero-section {
        padding: 3rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 2rem 1rem;
    }

    .content-slab {
        padding: 3rem 1rem;
    }

    .neomorphic-card {
        padding: 1.4rem;
        border-radius: 16px;
    }

    .scroll-indicator {
        display: none;
    }
}
