/* === RESET & BASE === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: #1a1f24;
    color: #c8d2da;
    font-family: 'Tenor Sans', sans-serif;
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    line-height: 1.75;
    letter-spacing: 0.02em;
    overflow-x: hidden;
}

/* === SIDEBAR === */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: linear-gradient(180deg, #3a4450 0%, rgba(140,170,185,0.08) 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-right: 1px solid rgba(140,170,185,0.15);
    z-index: 100;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.sidebar-inner {
    position: relative;
    z-index: 2;
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.wordmark {
    font-family: 'Poiret One', cursive;
    font-size: 1.4rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: lowercase;
    color: #c8d2da;
    margin-bottom: 3rem;
}

.wordmark-dot {
    color: #4de8c2;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.nav-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8a9aa6;
    text-decoration: none;
    padding: 0.4rem 0;
    transition: color 0.4s ease, border-color 0.4s ease;
    border-left: 2px solid #5b8fa8;
    padding-left: 0.8rem;
}

.nav-label:hover {
    color: #3cfab0;
    border-left-color: #3cfab0;
}

.sidebar-radiolarian {
    margin-top: auto;
    margin-bottom: 2rem;
    align-self: center;
}

.sidebar-bubbles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

/* === BUBBLE FIELD === */
.bubble-field {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(77,232,194,0.15), rgba(91,143,168,0.05));
    border: 1px solid rgba(200,210,218,0.1);
    box-shadow: inset -2px -2px 4px rgba(255,255,255,0.04), inset 4px 4px 2px rgba(77,232,194,0.06);
    bottom: -30px;
    animation: bubbleRise linear infinite;
    will-change: transform, opacity;
}

@keyframes bubbleRise {
    0% {
        transform: translateY(0) translateX(0);
        opacity: var(--bubble-opacity, 0.4);
    }
    25% {
        transform: translateY(-27vh) translateX(10px);
    }
    50% {
        transform: translateY(-55vh) translateX(-8px);
        opacity: var(--bubble-opacity, 0.4);
    }
    75% {
        transform: translateY(-82vh) translateX(6px);
    }
    100% {
        transform: translateY(-110vh) translateX(0);
        opacity: 0;
    }
}

/* === MAIN OCEAN === */
.ocean {
    margin-left: 280px;
    min-height: 100vh;
    padding: clamp(3rem, 6vw, 6rem);
    position: relative;
    z-index: 2;
}

.content-ribbon {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: clamp(4rem, 10vh, 8rem);
}

/* === HERO === */
.hero {
    padding-top: clamp(4rem, 12vh, 10rem);
    text-align: center;
}

.hero-wordmark {
    font-family: 'Poiret One', cursive;
    font-size: clamp(3rem, 7vw, 6rem);
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: lowercase;
    color: #c8d2da;
    min-height: 1.2em;
}

.hero-wordmark .letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    animation: letterReveal 0.6s ease forwards;
}

.hero-wordmark .letter.dot {
    color: #4de8c2;
}

@keyframes letterReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-aphorism {
    font-family: 'Tenor Sans', sans-serif;
    font-style: italic;
    color: #8a9aa6;
    font-size: clamp(0.95rem, 1.5vw, 1.1rem);
    margin-top: 2rem;
    opacity: 0;
    transition: opacity 1.2s ease;
}

.hero-aphorism.visible {
    opacity: 1;
}

/* === SPECIMEN PANELS === */
.specimen-panel {
    position: relative;
    border: 1px solid rgba(140,170,185,0.2);
    box-shadow: inset 0 0 40px rgba(160,190,200,0.06);
    border-radius: 4px;
    padding: clamp(2rem, 4vw, 3.5rem);
    background: rgba(42,48,56,0.3);
    min-height: 200px;
}

.panel-content {
    opacity: 0;
    transition: opacity 0.6s ease;
}

.panel-content.revealed {
    opacity: 1;
}

.section-heading {
    font-family: 'Poiret One', cursive;
    font-size: clamp(1.6rem, 3.5vw, 2.8rem);
    font-weight: 400;
    letter-spacing: 0.1em;
    color: #c8d2da;
    margin-bottom: 1.5rem;
}

.body-text {
    margin-bottom: 1.2rem;
    color: #c8d2da;
}

.body-text em {
    color: #d4a0b9;
    font-style: italic;
}

.specimen-label {
    display: block;
    margin-top: 2rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8a9aa6;
}

/* === SKELETON OVERLAY === */
.skeleton-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: clamp(2rem, 4vw, 3.5rem);
    z-index: 2;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

.skeleton-overlay.hidden {
    opacity: 0;
}

.skeleton-bar {
    background: linear-gradient(90deg, #2a3038 0%, #2e3640 50%, #2a3038 100%);
    background-size: 200% 100%;
    animation: shimmer 1.8s ease-in-out infinite;
    border-radius: 3px;
    margin-bottom: 1rem;
}

.skeleton-title {
    height: 2rem;
    width: 45%;
    margin-bottom: 1.5rem;
}

.skeleton-line {
    height: 0.85rem;
    width: 100%;
}

.skeleton-line.short {
    width: 60%;
}

.skeleton-line.medium {
    width: 80%;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* === BOTANICAL DIVIDERS === */
.botanical-divider {
    display: flex;
    justify-content: center;
    align-items: center;
}

.botanical-divider svg {
    width: min(400px, 80%);
    height: auto;
    overflow: visible;
}

.botanical-path {
    stroke-dasharray: var(--path-length, 300);
    stroke-dashoffset: var(--path-length, 300);
    transition: stroke-dashoffset 2.5s ease-out;
}

.botanical-path.drawn {
    stroke-dashoffset: 0;
}

/* === RADIOLARIAN === */
.radiolarian {
    width: 32px;
    height: 32px;
    position: relative;
    opacity: 0.4;
}

.radiolarian::before,
.radiolarian::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px dashed rgba(77,232,194,0.15);
    animation: radiolPulse 4s ease-in-out infinite;
}

.radiolarian::before {
    width: 100%;
    height: 100%;
}

.radiolarian::after {
    width: 60%;
    height: 60%;
    border-style: dotted;
    transform: translate(-50%, -50%) rotate(45deg);
    animation-delay: 0.5s;
}

@keyframes radiolPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.05); }
}

.panel-radiolarian {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

/* === FOOTER === */
.ocean-floor {
    text-align: center;
    padding: 2rem 0 4rem;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .sidebar {
        top: auto;
        bottom: 0;
        left: 0;
        width: 100vw;
        height: 64px;
        border-right: none;
        border-top: 1px solid rgba(140,170,185,0.15);
        flex-direction: row;
    }

    .sidebar-inner {
        flex-direction: row;
        align-items: center;
        padding: 0 1rem;
        width: 100%;
    }

    .wordmark {
        display: none;
    }

    .sidebar-nav {
        flex-direction: row;
        gap: 0;
        width: 100%;
        justify-content: space-around;
    }

    .nav-label {
        border-left: none;
        padding-left: 0;
        font-size: 0.65rem;
        text-align: center;
    }

    .sidebar-radiolarian {
        display: none;
    }

    .sidebar-bubbles {
        display: none;
    }

    .ocean {
        margin-left: 0;
        margin-bottom: 64px;
    }

    .bubble-field {
        width: 100vw;
    }
}
