:root {
    --vellum-cream: #FFF8F0;
    --deep-indigo: #1A0A2E;
    --electric-magenta: #FF00FF;
    --neon-fuchsia: #FF2D95;
    --chlorophyll-neon: #39FF14;
    --dilute-cyan: #00E5FF;
    --hot-coral: #FF6B35;
    --lampblack: #1A1A1A;
    --sepia-dilute: #5C4A3A;
}

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

body {
    background: var(--vellum-cream);
    color: var(--lampblack);
    font-family: 'Work Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.72;
    letter-spacing: 0.01em;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    width: 280px;
    height: 100vh;
    background: var(--deep-indigo);
    z-index: 100;
    overflow-y: auto;
    transition: left 600ms ease-out;
    display: flex;
    align-items: center;
}

.sidebar.visible {
    left: 0;
}

.sidebar-inner {
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

.sidebar-thumb {
    cursor: pointer;
    text-align: center;
    transition: transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1), filter 300ms ease;
}

.sidebar-thumb svg {
    width: 60px;
    height: 80px;
    display: block;
    margin: 0 auto 0.5rem;
}

.sidebar-thumb:hover {
    transform: scale(1.15);
    filter: saturate(1.8);
}

.thumb-label {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 300;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.06em;
    transition: color 300ms ease;
}

.sidebar-thumb:hover .thumb-label {
    color: rgba(255, 255, 255, 0.9);
}

/* Canvas */
.canvas {
    margin-left: 0;
    transition: margin-left 600ms ease-out;
    position: relative;
}

.canvas.shifted {
    margin-left: 280px;
}

/* Hex Grid Background */
.hex-grid {
    position: fixed;
    inset: 0;
    background:
        repeating-conic-gradient(
            from 30deg at 50% 50%,
            transparent 0deg 60deg,
            rgba(255, 0, 255, 0.02) 60deg 120deg,
            transparent 120deg 180deg
        );
    background-size: 30px 30px;
    pointer-events: none;
    z-index: 0;
}

/* Plate (Section) Base */
.plate {
    position: relative;
    z-index: 1;
    padding: clamp(3rem, 8vh, 6rem) clamp(2rem, 6vw, 6rem);
}

/* Title Plate */
.title-plate {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.title-content {
    position: relative;
    z-index: 2;
}

.hero-botanical {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: clamp(300px, 50vw, 500px);
    height: auto;
    z-index: 0;
    pointer-events: none;
}

.site-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(3rem, 7vw, 6rem);
    color: var(--lampblack);
    letter-spacing: 0.02em;
    line-height: 1.1;
    position: relative;
    z-index: 3;
}

.site-subtitle {
    font-family: 'Caveat', cursive;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    color: var(--neon-fuchsia);
    margin-top: 1rem;
    position: relative;
    z-index: 3;
}

/* Bloom animations */
.bloom, .leaf, .bleed {
    transition: opacity 1.5s ease;
}

.bloom.saturated { opacity: 0.4; }
.leaf.saturated { opacity: 0.35; }
.bleed.saturated { opacity: 0.12; }

.branch-line {
    stroke-dasharray: 500;
    stroke-dashoffset: 0;
}

/* Wash Bands */
.wash-band {
    height: 80px;
    position: relative;
    z-index: 1;
    filter: blur(20px);
}

.wash-cyan { background: linear-gradient(90deg, transparent, rgba(0, 229, 255, 0.18), transparent); }
.wash-magenta { background: linear-gradient(90deg, transparent, rgba(255, 0, 255, 0.15), transparent); }
.wash-coral { background: linear-gradient(90deg, transparent, rgba(255, 107, 53, 0.18), transparent); }
.wash-green { background: linear-gradient(90deg, transparent, rgba(57, 255, 20, 0.12), transparent); }

/* Specimen Plates */
.specimen-plate {
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.specimen-grid {
    display: grid;
    grid-template-columns: 1.618fr 1fr;
    gap: clamp(2rem, 4vw, 4rem);
    max-width: 1100px;
    width: 100%;
}

.verso .specimen-grid {
    grid-template-columns: 1fr 1.618fr;
}

.specimen-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.plate-heading {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    letter-spacing: 0.02em;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--lampblack);
}

.plate-body {
    max-width: 58ch;
    margin-bottom: 1.5rem;
    color: var(--lampblack);
}

.caveat-note {
    font-family: 'Caveat', cursive;
    font-size: clamp(0.85rem, 1.1vw, 1rem);
    color: var(--neon-fuchsia);
}

.annotation {
    display: block;
    font-family: 'Caveat', cursive;
    font-size: clamp(0.85rem, 1.1vw, 1rem);
    color: var(--chlorophyll-neon);
    margin-top: 1rem;
}

.specimen-illus {
    display: flex;
    align-items: center;
    justify-content: center;
}

.specimen-illus svg {
    width: 100%;
    max-width: 300px;
    height: auto;
    transform: scale(0.92);
    opacity: 0.6;
    transition: transform 600ms ease, opacity 600ms ease;
}

.specimen-illus.visible svg {
    transform: scale(1);
    opacity: 1;
}

/* Scroll Reveal */
.scroll-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 600ms ease, transform 600ms ease;
}

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

/* Research Notes */
.research-section {
    min-height: 100vh;
    padding-top: clamp(4rem, 10vh, 8rem);
}

.notes-grid {
    columns: 3;
    column-gap: 2rem;
    column-rule: 2px solid rgba(255, 0, 255, 0.08);
    max-width: 1100px;
}

.note-card {
    break-inside: avoid;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(255, 248, 240, 0.8);
    border-top: 2px solid var(--neon-fuchsia);
    position: relative;
}

.note-title {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.note-body {
    font-family: 'Work Sans', sans-serif;
    font-weight: 300;
    font-size: 0.95rem;
    color: var(--sepia-dilute);
    line-height: 1.65;
}

/* Responsive */
@media (max-width: 900px) {
    .sidebar {
        left: 0;
        top: auto;
        bottom: 0;
        width: 100%;
        height: 60px;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .sidebar.visible {
        left: 0;
    }

    .sidebar-inner {
        flex-direction: row;
        padding: 0.5rem 1rem;
        gap: 1rem;
    }

    .sidebar-thumb svg {
        width: 40px;
        height: 50px;
    }

    .thumb-label { display: none; }

    .canvas, .canvas.shifted {
        margin-left: 0;
        margin-bottom: 60px;
    }

    .specimen-grid,
    .verso .specimen-grid {
        grid-template-columns: 1fr;
    }

    .notes-grid {
        columns: 1;
    }

    .hex-grid { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .sidebar { left: 0; transition: none; }
    .canvas { margin-left: 280px; transition: none; }
    .bloom, .leaf, .bleed { opacity: 0.3; transition: none; }
    .scroll-reveal { opacity: 1; transform: none; transition: none; }
    .specimen-illus svg { transform: none; opacity: 1; transition: none; }
    .sidebar-thumb { transition: none; }
    .wash-band { filter: none; }
}

@media (max-width: 900px) and (prefers-reduced-motion: reduce) {
    .canvas { margin-left: 0; }
}
