/* ============================================================
   economic.wiki — Y2K Futurism Aquatic Economics Encyclopedia
   ============================================================ */

:root {
    --color-teal: #00CFC1;
    --color-coral: #FF6B6B;
    --color-violet: #7B68EE;
    --color-bg: #0A0E1A;
    --color-surface: rgba(255, 255, 255, 0.06);
    --color-surface-border: rgba(255, 255, 255, 0.12);
    --color-text: #E8ECF4;
    --color-muted: #7A8BA8;
    --color-pure-white: #FFF;
    --font-mono: 'Share Tech Mono', monospace;
    --font-body: 'Space Grotesk', sans-serif;
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background: var(--color-bg);
}

body {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    line-height: 1.72;
    color: var(--color-text);
    background: var(--color-bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---- Scroll Progress Bar ---- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: linear-gradient(90deg, var(--color-teal), var(--color-coral), var(--color-violet));
    z-index: 9999;
    transition: width 0.1s linear;
}

/* ---- Bubble Navigation ---- */
.bubble-nav {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 14px;
    z-index: 1000;
}

.bubble {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    outline: none;
}

.bubble:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--color-teal);
    transform: scale(1.2);
}

.bubble.active {
    width: 18px;
    height: 18px;
    border-color: var(--color-teal);
    background: rgba(0, 207, 193, 0.2);
    box-shadow: 0 0 12px rgba(0, 207, 193, 0.3);
}

.bubble.active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid var(--color-teal);
    transform: translate(-50%, -50%);
    animation: bubblePulse 3s ease-in-out infinite;
}

@keyframes bubblePulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.4;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

/* ---- Bubble Particles (CSS-only) ---- */
.bubble-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.particle {
    position: absolute;
    bottom: -20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    animation: bubbleFloat linear infinite;
}

.particle:nth-child(1)  { left: 5%;  width: 4px;  height: 4px;  animation-duration: 11s; animation-delay: 0s;    opacity: 0.15; }
.particle:nth-child(2)  { left: 12%; width: 6px;  height: 6px;  animation-duration: 9s;  animation-delay: 1.2s;  opacity: 0.1;  }
.particle:nth-child(3)  { left: 20%; width: 3px;  height: 3px;  animation-duration: 13s; animation-delay: 2.5s;  opacity: 0.2;  }
.particle:nth-child(4)  { left: 28%; width: 5px;  height: 5px;  animation-duration: 10s; animation-delay: 0.8s;  opacity: 0.12; }
.particle:nth-child(5)  { left: 35%; width: 7px;  height: 7px;  animation-duration: 14s; animation-delay: 3.1s;  opacity: 0.1;  }
.particle:nth-child(6)  { left: 42%; width: 4px;  height: 4px;  animation-duration: 8s;  animation-delay: 1.7s;  opacity: 0.18; }
.particle:nth-child(7)  { left: 50%; width: 5px;  height: 5px;  animation-duration: 12s; animation-delay: 4s;    opacity: 0.13; }
.particle:nth-child(8)  { left: 57%; width: 3px;  height: 3px;  animation-duration: 15s; animation-delay: 0.5s;  opacity: 0.22; }
.particle:nth-child(9)  { left: 63%; width: 6px;  height: 6px;  animation-duration: 9.5s;animation-delay: 2.8s;  opacity: 0.1;  }
.particle:nth-child(10) { left: 70%; width: 4px;  height: 4px;  animation-duration: 11.5s;animation-delay: 1s;   opacity: 0.16; }
.particle:nth-child(11) { left: 76%; width: 8px;  height: 8px;  animation-duration: 13.5s;animation-delay: 3.5s; opacity: 0.08; }
.particle:nth-child(12) { left: 82%; width: 3px;  height: 3px;  animation-duration: 10.5s;animation-delay: 2s;   opacity: 0.2;  }
.particle:nth-child(13) { left: 88%; width: 5px;  height: 5px;  animation-duration: 8.5s; animation-delay: 0.3s; opacity: 0.14; }
.particle:nth-child(14) { left: 93%; width: 4px;  height: 4px;  animation-duration: 12.5s;animation-delay: 4.2s; opacity: 0.17; }
.particle:nth-child(15) { left: 8%;  width: 6px;  height: 6px;  animation-duration: 9.8s; animation-delay: 1.5s; opacity: 0.11; }
.particle:nth-child(16) { left: 25%; width: 3px;  height: 3px;  animation-duration: 14.5s;animation-delay: 3.8s; opacity: 0.25; }
.particle:nth-child(17) { left: 45%; width: 5px;  height: 5px;  animation-duration: 10.2s;animation-delay: 0.7s; opacity: 0.13; }
.particle:nth-child(18) { left: 60%; width: 7px;  height: 7px;  animation-duration: 11.8s;animation-delay: 2.3s; opacity: 0.09; }
.particle:nth-child(19) { left: 78%; width: 4px;  height: 4px;  animation-duration: 13.2s;animation-delay: 1.9s; opacity: 0.19; }
.particle:nth-child(20) { left: 90%; width: 6px;  height: 6px;  animation-duration: 9.2s; animation-delay: 3.3s; opacity: 0.12; }

@keyframes bubbleFloat {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-110vh) translateX(20px);
        opacity: 0;
    }
}

/* ---- Floating Sidebar Fish ---- */
.sidebar-fish {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.fish {
    position: absolute;
    width: 70px;
    height: auto;
    will-change: transform;
    transition: opacity 1s ease, transform 1s ease;
    pointer-events: auto;
    opacity: 0.4;
}

.fish-left {
    left: 40px;
}

.fish-right {
    right: 40px;
}

.fish-angel {
    width: 60px;
}

.fish-clown {
    width: 75px;
}

.fish-discus {
    width: 70px;
}

/* Hide sidebar fish on narrow viewports */
@media (max-width: 1200px) {
    .sidebar-fish {
        display: none;
    }
}

/* ---- Neon Tetra Canvas ---- */
#tetraCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

/* ---- Content Column ---- */
.content-column {
    max-width: 860px;
    margin: 0 auto;
    padding-inline: clamp(1.2rem, 4vw, 3rem);
    position: relative;
    z-index: 10;
}

/* ---- Zones ---- */
.zone {
    position: relative;
    padding-block: 100px;
}

/* Surface Zone / Hero */
.zone-surface {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-block: 0;
    background: radial-gradient(ellipse at 50% 30%, rgba(0, 207, 193, 0.08) 0%, transparent 60%),
                var(--color-bg);
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 10;
    max-width: 860px;
    padding-inline: clamp(1.2rem, 4vw, 3rem);
}

.hero-fish-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    pointer-events: none;
    z-index: -1;
}

.hero-fish {
    position: absolute;
    will-change: transform;
}

.hf-1 {
    width: 180px;
    top: 10%;
    left: 5%;
    animation: heroFishDrift1 20s ease-in-out infinite;
}

.hf-2 {
    width: 100px;
    top: 60%;
    right: 10%;
    animation: heroFishDrift2 25s ease-in-out infinite;
}

.hf-3 {
    width: 120px;
    bottom: 15%;
    left: 15%;
    animation: heroFishDrift3 18s ease-in-out infinite;
}

.hf-4 {
    width: 150px;
    top: 35%;
    right: 5%;
    animation: heroFishDrift4 22s ease-in-out infinite;
}

.hf-5 {
    width: 80px;
    top: 15%;
    right: 30%;
    animation: heroFishDrift5 28s ease-in-out infinite;
}

@keyframes heroFishDrift1 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25%      { transform: translate(40px, -20px) rotate(3deg); }
    50%      { transform: translate(80px, 10px) rotate(-2deg); }
    75%      { transform: translate(30px, 30px) rotate(1deg); }
}

@keyframes heroFishDrift2 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33%      { transform: translate(-50px, 15px) rotate(-4deg); }
    66%      { transform: translate(-20px, -25px) rotate(2deg); }
}

@keyframes heroFishDrift3 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25%      { transform: translate(30px, -15px) rotate(2deg); }
    50%      { transform: translate(-20px, -30px) rotate(-3deg); }
    75%      { transform: translate(50px, 10px) rotate(1deg); }
}

@keyframes heroFishDrift4 {
    0%, 100% { transform: translate(0, 0); }
    50%      { transform: translate(-60px, 20px); }
}

@keyframes heroFishDrift5 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    40%      { transform: translate(20px, 30px) rotate(5deg); }
    80%      { transform: translate(-30px, -10px) rotate(-3deg); }
}

/* Hero Title with iridescent shimmer */
.hero-title {
    font-family: var(--font-mono);
    font-size: clamp(2.8rem, 6vw, 5rem);
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: linear-gradient(
        90deg,
        var(--color-teal),
        var(--color-coral),
        var(--color-violet),
        var(--color-teal)
    );
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shimmer 8s ease-in-out infinite;
    margin-bottom: 1rem;
}

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

.hero-subtitle {
    font-family: var(--font-body);
    font-size: clamp(1rem, 2vw, 1.3rem);
    font-weight: 300;
    color: var(--color-muted);
    margin-bottom: 3rem;
}

/* Scroll chevron */
.scroll-chevron {
    display: inline-block;
    animation: chevronBounce 2s ease-in-out infinite;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.scroll-chevron:hover {
    opacity: 1;
}

@keyframes chevronBounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(8px); }
}

/* Sunlight Zone */
.zone-sunlight {
    background: linear-gradient(180deg,
        rgba(0, 207, 193, 0.03) 0%,
        rgba(0, 207, 193, 0.01) 100%
    );
}

/* Twilight Zone */
.zone-twilight {
    background: linear-gradient(180deg,
        rgba(123, 104, 238, 0.03) 0%,
        rgba(123, 104, 238, 0.06) 100%
    );
}

/* Deep Zone */
.zone-deep {
    background: linear-gradient(180deg,
        rgba(10, 14, 26, 0.5) 0%,
        rgba(10, 14, 26, 0.9) 100%
    );
}

/* ---- Content Panels (Y2K Frosted Plastic) ---- */
.content-panel {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: clamp(1.5rem, 3vw, 2.5rem);
    transition: transform 0.3s ease, backdrop-filter 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.content-panel:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Zone-specific panel hover accents */
.zone-sunlight .content-panel:hover {
    border-color: rgba(0, 207, 193, 0.3);
}

.zone-twilight .content-panel:hover {
    border-color: rgba(123, 104, 238, 0.3);
}

.zone-deep .content-panel:hover {
    border-color: rgba(0, 207, 193, 0.2);
}

/* Bioluminescent panels (deep zone) */
.bioluminescent {
    box-shadow: 0 0 40px rgba(0, 207, 193, 0.03);
    animation: bioluminescence 4s ease-in-out infinite;
}

@keyframes bioluminescence {
    0%, 100% { box-shadow: 0 0 40px rgba(0, 207, 193, 0.03); }
    50%      { box-shadow: 0 0 60px rgba(0, 207, 193, 0.06); }
}

/* ---- Fade-in Animation ---- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Typography ---- */
h2 {
    font-family: var(--font-mono);
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--color-text);
    margin-bottom: 1.2rem;
    line-height: 1.3;
}

.zone-sunlight h2 {
    color: var(--color-teal);
}

.zone-twilight h2 {
    color: var(--color-violet);
}

.zone-deep h2 {
    background: linear-gradient(90deg, var(--color-teal), var(--color-violet));
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shimmer 8s ease-in-out infinite;
}

p {
    margin-bottom: 1.2rem;
    color: var(--color-text);
}

p:last-child {
    margin-bottom: 0;
}

/* Micro labels */
.micro-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-teal);
    background: rgba(0, 207, 193, 0.1);
    padding: 4px 12px;
    border-radius: 100px;
    display: inline-block;
    margin-bottom: 1rem;
}

.zone-twilight .micro-label {
    color: var(--color-violet);
    background: rgba(123, 104, 238, 0.1);
}

.zone-deep .micro-label {
    color: var(--color-teal);
    background: rgba(0, 207, 193, 0.08);
}

/* ---- Data Callouts ---- */
.data-callout {
    background: rgba(0, 207, 193, 0.06);
    border-left: 3px solid var(--color-teal);
    border-radius: 0 12px 12px 0;
    padding: 1.2rem 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 1.2rem;
}

.twilight-callout {
    background: rgba(123, 104, 238, 0.06);
    border-left-color: var(--color-violet);
}

.callout-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-teal);
    display: block;
    margin-bottom: 0.5rem;
}

.twilight-callout .callout-label {
    color: var(--color-violet);
}

.callout-value {
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--color-muted);
    display: block;
}

/* ---- Specimen Cards (Y2K Trading Card flip) ---- */
.specimen-card {
    perspective: 800px;
    width: 200px;
    height: 260px;
    margin: 1.5rem auto 0;
    cursor: pointer;
}

.specimen-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s ease;
    transform-style: preserve-3d;
}

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

.specimen-front,
.specimen-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.2rem;
    text-align: center;
}

.specimen-back {
    transform: rotateY(180deg);
    background: rgba(255, 255, 255, 0.06);
}

.specimen-icon {
    margin-bottom: 0.8rem;
}

.specimen-label {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    color: var(--color-text);
    display: block;
    margin-bottom: 0.3rem;
}

.specimen-concept {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-muted);
    display: block;
    margin-bottom: 0.8rem;
}

.specimen-hint {
    font-family: var(--font-body);
    font-size: 0.7rem;
    color: var(--color-muted);
    opacity: 0.6;
    display: block;
    margin-top: auto;
}

.specimen-back h3 {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    letter-spacing: 0.04em;
    color: var(--color-teal);
    margin-bottom: 0.6rem;
}

.specimen-back p {
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--color-muted);
    margin-bottom: 0;
}

/* ---- Links ---- */
a {
    color: var(--color-teal);
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
}

a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0%;
    height: 1px;
    background: linear-gradient(90deg, var(--color-teal), var(--color-coral), var(--color-violet));
    transition: width 0.5s ease;
}

a:hover::after {
    width: 100%;
}

a:hover {
    text-shadow: 0 0 8px rgba(0, 207, 193, 0.3);
}

/* ---- Closing Motif ---- */
.closing-motif {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.closing-fish {
    width: 160px;
    height: auto;
    margin-bottom: 1rem;
    opacity: 0.7;
    animation: closingFishSwim 12s ease-in-out infinite;
}

@keyframes closingFishSwim {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    25%      { transform: translateX(15px) rotate(2deg); }
    50%      { transform: translateX(-10px) rotate(-1deg); }
    75%      { transform: translateX(8px) rotate(1deg); }
}

.closing-text {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    color: var(--color-muted);
}

/* ---- Footer ---- */
.site-footer {
    position: relative;
    z-index: 10;
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.site-footer .content-column {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.footer-text {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    color: var(--color-text);
}

.footer-muted {
    color: var(--color-muted);
}

.footer-divider {
    color: rgba(255, 255, 255, 0.15);
    font-size: 0.8rem;
}

/* ---- Chrome Pill Buttons (generic) ---- */
.pill-button {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 8px 20px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.pill-button:hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.1));
    border-color: var(--color-teal);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 0 12px rgba(0, 207, 193, 0.15);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .bubble-nav {
        right: 10px;
        gap: 10px;
    }

    .bubble {
        width: 10px;
        height: 10px;
    }

    .bubble.active {
        width: 14px;
        height: 14px;
    }

    .zone {
        padding-block: 60px;
    }

    .specimen-card {
        width: 180px;
        height: 240px;
    }
}

@media (max-width: 480px) {
    .bubble-nav {
        display: none;
    }
}

/* ---- Selection color ---- */
::selection {
    background: rgba(0, 207, 193, 0.3);
    color: var(--color-text);
}

::-moz-selection {
    background: rgba(0, 207, 193, 0.3);
    color: var(--color-text);
}
