:root {
    --abyssal: #0a0e1a;
    --deep: #0f1b35;
    --twilight: #1a3a5c;
    --mid-water: #2d6187;
    --pelagic: #4a7c9b;
    --surface-glow: #7cb5d6;
    --bioluminescent: #b8d4e8;
    --refracted: #e0eef6;
    --pure-surface: #f0f7fb;
}

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

html {
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
}

body {
    background: var(--abyssal);
    color: var(--surface-glow);
    font-family: 'Libre Baskerville', 'Hiragino Kaku Gothic ProN', serif;
    overflow-x: hidden;
}

#main-container {
    width: 100%;
}

/* Zone base */
.zone {
    min-height: 100vh;
    scroll-snap-align: start;
    position: relative;
    overflow: hidden;
}

/* Zone depth indicators */
.zone-depth-indicator {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Overpass Mono', monospace;
    font-weight: 300;
    font-size: clamp(0.65rem, 0.9vw, 0.8rem);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(124, 181, 214, 0.4);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    z-index: 10;
}

/* =========================================
   ZONE 1: Surface
   ========================================= */
#zone-surface {
    background: var(--refracted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#canvas-voronoi {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.zone-surface-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-title {
    font-family: 'Share Tech Mono', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', monospace;
    font-weight: 400;
    font-size: clamp(5rem, 12vw, 16rem);
    letter-spacing: 0.08em;
    color: var(--twilight);
    opacity: 0.85;
    line-height: 1;
}

.hero-subtitle {
    font-family: 'Share Tech Mono', monospace;
    font-weight: 400;
    font-size: clamp(1rem, 2vw, 1.5rem);
    letter-spacing: 0.2em;
    color: var(--pelagic);
    margin-top: 1rem;
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    animation: breathe 3s ease-in-out infinite;
}

.scroll-chevron {
    font-size: 2.5rem;
    color: var(--pelagic);
    display: block;
}

@keyframes breathe {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

/* =========================================
   ZONE 2: Twilight
   ========================================= */
#zone-twilight {
    background: linear-gradient(to bottom, var(--bioluminescent), var(--pelagic));
    display: flex;
    flex-direction: column;
}

.twilight-upper {
    flex: 0 0 60%;
    position: relative;
    overflow: hidden;
}

.twilight-lower {
    flex: 0 0 40%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 4rem;
}

.definition-lines {
    max-width: 38em;
}

.def-line {
    font-family: 'Share Tech Mono', 'Hiragino Kaku Gothic ProN', monospace;
    font-size: clamp(1rem, 2vw, 1.5rem);
    line-height: 2;
    color: var(--refracted);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.def-line.visible {
    opacity: 1;
    transform: translateY(0);
}

/* CSS Fish base */
.css-fish {
    position: absolute;
    will-change: transform;
    transition: transform 0.3s ease-out;
    opacity: 0;
}

.css-fish.visible {
    opacity: 1;
    transition: transform 0.3s ease-out, opacity 0.8s ease-out;
}

.fish-body {
    position: relative;
}

/* =========================================
   ZONE 3: Mesopelagic
   ========================================= */
#zone-mesopelagic {
    background: var(--deep);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem 4rem;
}

#canvas-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.term-shelf {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(8ch, 1fr));
    gap: 0.5rem 1rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(124, 181, 214, 0.15);
}

.term-shelf:last-of-type {
    border-bottom: none;
}

.term {
    font-family: 'Share Tech Mono', 'Hiragino Kaku Gothic ProN', monospace;
    font-weight: 400;
    color: var(--bioluminescent);
    white-space: nowrap;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.term.visible {
    opacity: 1;
    transform: translateX(0);
}

.term-lg {
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    color: var(--refracted);
}

.term-md {
    font-size: clamp(1.3rem, 2.5vw, 2rem);
    color: var(--bioluminescent);
}

.term-sm {
    font-size: clamp(0.85rem, 1.2vw, 1rem);
    color: var(--pelagic);
    align-self: end;
    font-family: 'Libre Baskerville', serif;
    font-style: italic;
}

/* =========================================
   ZONE 4: Abyssal
   ========================================= */
#zone-abyssal {
    background: var(--deep);
    padding: 3rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.specimen-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
    max-width: 1100px;
    width: 100%;
    z-index: 2;
    position: relative;
}

.specimen-card {
    background: rgba(10, 30, 60, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(140, 200, 240, 0.15);
    padding: 1.5rem;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

.fish-container {
    height: 80px;
    position: relative;
    margin-bottom: 1rem;
}

.specimen-name {
    font-family: 'Share Tech Mono', 'Hiragino Kaku Gothic ProN', monospace;
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    color: var(--bioluminescent);
    margin-bottom: 0.25rem;
}

.specimen-label {
    font-family: 'Overpass Mono', monospace;
    font-weight: 300;
    font-size: clamp(0.65rem, 0.9vw, 0.8rem);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--pelagic);
    margin-bottom: 0.75rem;
}

.specimen-desc {
    font-family: 'Libre Baskerville', serif;
    font-size: clamp(0.85rem, 1.1vw, 1rem);
    line-height: 1.75;
    color: var(--surface-glow);
}

/* =========================================
   ZONE 5: Hadal
   ========================================= */
#zone-hadal {
    background: var(--abyssal);
    display: flex;
    align-items: center;
    justify-content: center;
}

#canvas-lsystem {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hadal-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 38em;
    padding: 2rem;
}

.hadal-quote {
    font-family: 'Libre Baskerville', serif;
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    line-height: 1.75;
    color: var(--bioluminescent);
    margin-bottom: 2rem;
}

.hadal-site {
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(0.85rem, 1.2vw, 1rem);
    letter-spacing: 0.2em;
    color: var(--pelagic);
    margin-bottom: 1.5rem;
}

.hadal-rule {
    border: none;
    height: 1px;
    background: rgba(140, 200, 240, 0.3);
    width: 30%;
    margin: 0 auto;
}

/* =========================================
   Bubbles
   ========================================= */
.bubble-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
    overflow: hidden;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(184, 212, 232, 0.3);
    background: transparent;
    animation: bubbleRise linear infinite;
}

@keyframes bubbleRise {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(var(--drift, 20px));
        opacity: 0;
    }
}

/* Depth lines */
.depth-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    opacity: 0.5;
}

.depth-line {
    position: absolute;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(124, 181, 214, 0.08);
}

/* Responsive */
@media (max-width: 768px) {
    .specimen-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .twilight-lower {
        padding: 1.5rem 2rem;
    }
    #zone-mesopelagic {
        padding: 2rem 2rem;
    }
}

@media (max-width: 480px) {
    .specimen-grid {
        grid-template-columns: 1fr;
    }
}
