/* ============================================
   ZEBRAFISH THESIS - INTERACTIVE WEBPAGE
   Color palette: GFP Fluorescence Green Theme
   ============================================ */

:root {
    --gfp: #00ff41;
    --gfp-bright: #39ff73;
    --gfp-dim: #00cc33;
    --gfp-dark: #009922;
    --gfp-glow: rgba(0, 255, 65, 0.4);
    --gfp-subtle: rgba(0, 255, 65, 0.08);
    --bg-deep: #020a04;
    --bg-dark: #050e07;
    --bg-card: #0a1a0e;
    --bg-card-hover: #0f2514;
    --text: #e0e8e2;
    --text-dim: #8a9e8e;
    --text-bright: #ffffff;
    --border: rgba(0, 255, 65, 0.15);
    --border-bright: rgba(0, 255, 65, 0.3);
    --danger: #ff4444;
    --orange: #ffaa00;
    --font-main: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-mono: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--gfp-dark) var(--bg-deep);
}

body {
    font-family: var(--font-main);
    background: var(--bg-deep);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
}

/* ===== BACKGROUND CANVAS ===== */
#particles-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ===== PROGRESS BAR ===== */
#progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(0, 255, 65, 0.1);
    z-index: 1000;
}

#progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--gfp-dark), var(--gfp), var(--gfp-bright));
    box-shadow: 0 0 10px var(--gfp-glow);
    transition: width 0.3s ease;
}

/* ===== LANGUAGE TOGGLE ===== */
#lang-toggle {
    position: fixed;
    top: 16px;
    right: 20px;
    z-index: 1001;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--gfp);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}

#lang-toggle:hover {
    border-color: var(--gfp);
    box-shadow: 0 0 15px var(--gfp-glow);
    background: rgba(0, 255, 65, 0.1);
}

/* ===== SECTIONS ===== */
.section {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
}

.section-inner {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
}

.section-label {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--gfp-dim);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 16px;
    opacity: 0.8;
}

.section h2 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 24px;
    line-height: 1.2;
}

.section-text {
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 20px;
    max-width: 750px;
}

.section-text strong {
    color: var(--gfp);
    font-weight: 600;
}

/* ===== REVEAL ANIMATION ===== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== HERO ===== */
#hero {
    min-height: 100vh;
    flex-direction: column;
    text-align: center;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--gfp-dim);
    border: 1px solid var(--border);
    padding: 6px 20px;
    border-radius: 20px;
    margin-bottom: 40px;
    animation: fadeInDown 1s ease 0.3s both;
}

.hero-title {
    margin-bottom: 30px;
}

.hero-line {
    display: block;
    font-size: clamp(2.2rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.15;
    color: var(--text-bright);
    animation: fadeInUp 0.8s ease both;
}

.hero-line:nth-child(1) { animation-delay: 0.5s; }
.hero-line:nth-child(2) { animation-delay: 0.8s; }
.hero-line:nth-child(3) { animation-delay: 1.1s; }

.hero-line.glow {
    color: var(--gfp);
    text-shadow: 0 0 30px var(--gfp-glow), 0 0 60px rgba(0, 255, 65, 0.15);
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-dim);
    max-width: 600px;
    margin: 0 auto 20px;
    animation: fadeInUp 0.8s ease 1.4s both;
}

.hero-author {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-dim);
    letter-spacing: 1px;
    animation: fadeInUp 0.8s ease 1.7s both;
}

.hero-fish-svg {
    position: absolute;
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    opacity: 0.2;
    animation: fishSwim 8s ease-in-out infinite, fadeIn 2s ease 2s both;
}

@keyframes fishSwim {
    0%, 100% { transform: translateX(-50%) translateY(0) scaleX(1); }
    25% { transform: translateX(-40%) translateY(-10px) scaleX(1); }
    50% { transform: translateX(-50%) translateY(0) scaleX(1); }
    75% { transform: translateX(-60%) translateY(10px) scaleX(1); }
}

.scroll-prompt {
    position: static;
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    animation: fadeIn 1s ease 2.5s both;
}

.scroll-prompt span {
    font-size: 0.8rem;
    color: var(--text-dim);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.scroll-icon {
    width: 24px;
    height: 38px;
    border: 2px solid var(--gfp-dim);
    border-radius: 12px;
    position: relative;
}

.scroll-icon::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--gfp);
    border-radius: 2px;
    animation: scrollDot 2s ease-in-out infinite;
}

@keyframes scrollDot {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
    50% { transform: translateX(-50%) translateY(12px); opacity: 0.3; }
}

/* ===== INTERACTIVE BOXES ===== */
.interactive-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 30px;
    margin: 40px 0;
    position: relative;
    overflow: hidden;
}

.interactive-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gfp-dim), transparent);
}

.interactive-label {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--gfp);
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.interactive-caption {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-top: 16px;
    font-style: italic;
}

/* ===== LOOMING GAME ===== */
.game-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

#looming-canvas {
    width: 100%;
    aspect-ratio: 1;
    max-height: 350px;
    border-radius: 12px;
    background: #f0f4f0;
    cursor: pointer;
    display: block;
    margin: 0 auto;
}

#looming-instructions {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin: 12px 0;
}

.btn-glow {
    background: transparent;
    border: 2px solid var(--gfp);
    color: var(--gfp);
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 1px;
}

.btn-glow:hover {
    background: var(--gfp);
    color: var(--bg-deep);
    box-shadow: 0 0 25px var(--gfp-glow);
}

.game-result {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 15px;
    min-height: 30px;
}

/* ===== FEATURES GRID ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: var(--gfp-dim);
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 255, 65, 0.08);
}

.feature-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--gfp-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Draw icons with CSS */
#icon-transparent {
    background: radial-gradient(circle, transparent 40%, var(--gfp-subtle) 60%);
    border: 2px solid var(--gfp-dim);
}

#icon-fluorescent {
    background: radial-gradient(circle, var(--gfp) 20%, transparent 70%);
    box-shadow: 0 0 15px var(--gfp-glow);
}

#icon-fast::after {
    content: '';
    width: 20px;
    height: 3px;
    background: var(--gfp);
    position: absolute;
    border-radius: 2px;
    box-shadow: -8px -6px 0 0 var(--gfp-dim), -8px 6px 0 0 var(--gfp-dim);
}

#icon-genome::after {
    content: '70%';
    font-size: 12px;
    font-weight: 800;
    color: var(--gfp);
    font-family: var(--font-mono);
}

.feature-card h3 {
    font-size: 1rem;
    color: var(--gfp);
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 0.85rem;
    color: var(--text-dim);
}

/* ===== THESIS FIGURES ===== */
.thesis-figure {
    margin: 40px 0;
    text-align: center;
}

.thesis-figure img {
    max-width: 100%;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.thesis-figure img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 40px rgba(0, 255, 65, 0.1);
}

.thesis-figure figcaption {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-top: 12px;
    font-style: italic;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== BRAIN EXPLORER ===== */
.brain-container {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
}

#brain-svg {
    width: 100%;
    height: auto;
}

.brain-region {
    fill: rgba(0, 255, 65, 0.05);
    stroke: var(--gfp-dim);
    stroke-width: 1.5;
    cursor: pointer;
    transition: all 0.3s ease;
}

.brain-region:hover {
    fill: rgba(0, 255, 65, 0.2);
    stroke: var(--gfp);
    stroke-width: 2;
    filter: url(#glow-filter);
}

.brain-region.tectum {
    fill: rgba(0, 255, 65, 0.1);
    stroke: var(--gfp);
    stroke-width: 2;
}

.brain-region.tectum:hover {
    fill: rgba(0, 255, 65, 0.35);
}

.brain-eye {
    fill: rgba(200, 200, 220, 0.08);
    stroke: rgba(200, 200, 220, 0.3);
    stroke-width: 1;
}

.brain-label {
    fill: var(--text-dim);
    font-size: 13px;
    text-anchor: middle;
    dominant-baseline: middle;
    pointer-events: none;
    font-family: var(--font-main);
}

.brain-label.eye-label {
    fill: rgba(200, 200, 220, 0.4);
    font-size: 11px;
}

.brain-direction {
    fill: var(--text-dim);
    font-size: 11px;
    text-anchor: middle;
    font-family: var(--font-mono);
    opacity: 0.5;
}

.brain-info-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    margin-top: 16px;
    min-height: 80px;
    transition: all 0.3s ease;
}

.brain-info-panel h4 {
    color: var(--gfp);
    font-size: 1rem;
    margin-bottom: 8px;
}

.brain-info-panel p {
    font-size: 0.9rem;
    color: var(--text-dim);
}

/* ===== TECTUM DEMO ===== */
.tectum-demo-container {
    text-align: center;
}

#tectum-canvas {
    width: 100%;
    max-width: 600px;
    aspect-ratio: 2/1;
    border-radius: 12px;
    background: var(--bg-dark);
    display: block;
    margin: 0 auto 20px;
    border: 1px solid var(--border);
}

.stimulus-toggles {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.stim-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    color: var(--text-dim);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.stim-btn:hover {
    border-color: var(--gfp-dim);
    color: var(--text);
}

.stim-btn[data-active="true"] {
    border-color: var(--gfp);
    color: var(--gfp);
    background: rgba(0, 255, 65, 0.08);
    box-shadow: 0 0 12px rgba(0, 255, 65, 0.15);
}

.stim-btn-combined {
    border-color: var(--orange);
    color: var(--text-dim);
}

.stim-btn-combined[data-active="true"] {
    border-color: var(--orange);
    color: var(--orange);
    background: rgba(255, 170, 0, 0.08);
    box-shadow: 0 0 12px rgba(255, 170, 0, 0.15);
}

.tectum-label {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--gfp);
    margin-top: 12px;
    min-height: 24px;
}

/* ===== MIXER ===== */
.mixer-container {
    max-width: 600px;
    margin: 0 auto;
}

.mixer-controls {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.mixer-slider-group {
    flex: 1;
    min-width: 200px;
}

.mixer-slider-group label {
    display: block;
    font-size: 0.9rem;
    color: var(--text);
    margin-bottom: 10px;
    font-weight: 600;
}

.mixer-slider-group input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: var(--bg-card-hover);
    border-radius: 3px;
    outline: none;
}

.mixer-slider-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--gfp);
    cursor: pointer;
    box-shadow: 0 0 10px var(--gfp-glow);
}

.mixer-slider-group input[type="range"]::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--gfp);
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px var(--gfp-glow);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 6px;
}

.prob-bar-container {
    margin-top: 10px;
}

.prob-label {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 8px;
}

.prob-bar-track {
    height: 40px;
    background: var(--bg-card-hover);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.prob-bar-fill {
    height: 100%;
    width: 7%;
    background: linear-gradient(90deg, var(--gfp-dark), var(--gfp));
    border-radius: 8px;
    transition: width 0.6s ease, background 0.3s ease;
    box-shadow: 0 0 15px var(--gfp-glow);
    position: relative;
}

.prob-bar-value {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-bright);
}

.prob-bar-context {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-top: 8px;
}

.mixer-enhancement {
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(0, 255, 65, 0.06);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--gfp);
    text-align: center;
    transition: opacity 0.3s ease;
}

.mixer-enhancement.hidden {
    opacity: 0;
    pointer-events: none;
}

/* ===== INVERSE EFFECTIVENESS ===== */
.inverse-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.inverse-bars {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.inverse-condition {
    flex: 1;
    min-width: 200px;
}

.bar-group {
    text-align: center;
}

.bar-wrapper {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 8px;
    height: 200px;
    margin-bottom: 12px;
}

.inv-bar {
    width: 50px;
    height: var(--bar-h);
    border-radius: 6px 6px 0 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 4px;
    transition: height 1s ease;
    position: relative;
    background: linear-gradient(180deg, var(--gfp-dim), var(--gfp-dark));
}

.inv-bar.combined {
    background: linear-gradient(180deg, var(--gfp), var(--gfp-dim));
    box-shadow: 0 0 15px var(--gfp-glow);
}

.inv-bar span {
    font-size: 0.75rem;
    color: var(--bg-deep);
    font-weight: 700;
    font-family: var(--font-mono);
}

.bar-label {
    font-size: 0.9rem;
    color: var(--text);
    font-weight: 600;
}

.boost-label {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--gfp-dim);
    margin-top: 8px;
}

.boost-label.big {
    font-size: 1.6rem;
    color: var(--gfp);
    text-shadow: 0 0 15px var(--gfp-glow);
}

.inverse-explanation {
    font-size: 0.95rem;
    color: var(--text-dim);
    max-width: 500px;
    margin: 0 auto;
}

/* ===== ESCAPE TYPES ===== */
.escape-types-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin: 30px 0;
}

@media (max-width: 600px) {
    .escape-types-grid { grid-template-columns: 1fr; }
}

.escape-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
}

.escape-card:hover {
    border-color: var(--gfp-dim);
    transform: translateY(-2px);
}

.escape-anim {
    height: 80px;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: var(--bg-dark);
}

.escape-card h3 {
    font-size: 1.6rem;
    font-family: var(--font-mono);
    color: var(--gfp);
    margin-bottom: 4px;
}

.escape-subtitle {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 12px;
}

.escape-card ul {
    list-style: none;
    padding: 0;
}

.escape-card li {
    font-size: 0.9rem;
    color: var(--text);
    padding: 4px 0 4px 16px;
    position: relative;
}

.escape-card li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    width: 6px;
    height: 6px;
    background: var(--gfp-dim);
    border-radius: 50%;
}

.slc-card { border-left: 3px solid var(--gfp); }
.llc-card { border-left: 3px solid var(--gfp-dim); }

/* ===== ESCAPE GAME ===== */
.escape-game-container {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

#escape-game-canvas {
    width: 100%;
    aspect-ratio: 2 / 1;
    border-radius: 12px;
    background: var(--bg-dark);
    display: block;
    margin: 0 auto 16px;
    border: 1px solid var(--border);
}

#escape-game-controls {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 16px;
}

.escape-btn {
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-mono);
    border: 2px solid var(--border);
    background: var(--bg-card);
    color: var(--text-dim);
}

.escape-btn:not(:disabled):hover {
    border-color: var(--gfp);
    color: var(--gfp);
    box-shadow: 0 0 15px var(--gfp-glow);
}

.escape-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.escape-btn small {
    font-size: 0.7rem;
    font-weight: 400;
}

.game-score {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--text-dim);
    min-height: 24px;
    margin-top: 8px;
}

.game-feedback {
    font-size: 1rem;
    font-weight: 600;
    min-height: 28px;
    margin-top: 8px;
}

/* ===== CIRCUIT DIAGRAM ===== */
.circuit-container {
    margin: 40px 0;
    overflow-x: auto;
}

.circuit-diagram {
    display: grid;
    grid-template-columns: auto auto auto auto auto auto auto;
    grid-template-rows: auto auto auto;
    align-items: center;
    justify-content: center;
    gap: 8px 4px;
    max-width: 800px;
    margin: 0 auto;
    padding: 30px 10px;
}

.circuit-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    background: var(--bg-card);
    min-width: 90px;
    text-align: center;
    transition: all 0.5s ease;
}

.circuit-node span {
    font-size: 0.85rem;
    color: var(--text);
    font-weight: 600;
    line-height: 1.15;
    word-break: break-word;
    hyphens: auto;
}

.circuit-node.highlight-node {
    border-color: var(--gfp);
    background: rgba(0, 255, 65, 0.06);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.1);
}

.circuit-badge {
    font-size: 0.65rem;
    font-family: var(--font-mono);
    color: var(--gfp);
    background: rgba(0, 255, 65, 0.16);
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: 1px solid rgba(0, 255, 65, 0.25);
    box-shadow: 0 0 6px rgba(0, 255, 65, 0.15);
}

.circuit-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gfp-subtle);
    position: relative;
}

#ci-eye { background: radial-gradient(circle, var(--text-dim) 25%, transparent 60%); }
#ci-ear { background: radial-gradient(circle, var(--text-dim) 25%, transparent 60%); }
#ci-tectum { background: radial-gradient(circle, var(--gfp) 20%, transparent 60%); box-shadow: 0 0 12px var(--gfp-glow); }
#ci-hind { background: radial-gradient(circle, var(--gfp-dim) 20%, transparent 60%); }
#ci-escape::after { content: ''; position: absolute; left: 8px; top: 10px; width: 0; height: 0; border-top: 8px solid transparent; border-bottom: 8px solid transparent; border-left: 14px solid var(--gfp); }

.circuit-arrow {
    width: 40px;
    height: 2px;
    background: var(--gfp-dim);
    position: relative;
    justify-self: center;
}

.circuit-arrow::after {
    content: '';
    position: absolute;
    right: -1px;
    top: -5px;
    border-left: 8px solid var(--gfp-dim);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

.circuit-arrow.highlight-arrow {
    background: var(--gfp);
    box-shadow: 0 0 12px var(--gfp-glow);
}

.circuit-arrow.highlight-arrow::after {
    border-left-color: var(--gfp);
}

.circuit-arrow.diagonal-up {
    width: 90px;
    transform: translateY(-10px) rotate(-26deg);
    transform-origin: left center;
}

.circuit-arrow.vertical-arrow {
    width: 2px;
    height: 40px;
    background: var(--gfp-dim);
}

.circuit-arrow.vertical-arrow::after {
    right: -5px;
    top: -1px;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 8px solid var(--gfp-dim);
    border-top: 0;
}

.circuit-arrow.vertical-arrow.highlight-arrow::after {
    border-bottom-color: var(--gfp);
}

/* Position circuit nodes in grid */
#cn-eye { grid-row: 1; grid-column: 1; }
#ca-eye { grid-row: 1; grid-column: 2; }
#cn-tectum { grid-row: 1; grid-column: 3; }
#ca-tectum { grid-row: 1; grid-column: 4; }
#cn-hind { grid-row: 1; grid-column: 5; }
#ca-hind { grid-row: 1; grid-column: 6; }
#cn-escape { grid-row: 1; grid-column: 7; }
#ca-ear-tectum { grid-row: 2; grid-column: 3; align-self: end; justify-self: center; }
#ca-ear-hind { grid-row: 2; grid-column: 5; align-self: end; justify-self: center; }
#cn-ear { grid-row: 3; grid-column: 3 / span 3; min-width: 220px; }

/* ===== KEY FINDINGS ===== */
.key-findings {
    margin-top: 50px;
}

.key-findings h3 {
    font-size: 1.3rem;
    color: var(--gfp);
    margin-bottom: 24px;
    text-align: center;
}

.finding {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.finding:last-child {
    border-bottom: none;
}

.finding-number {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gfp-subtle);
    border: 1px solid var(--gfp-dim);
    border-radius: 50%;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--gfp);
    font-weight: 700;
}

.finding p {
    font-size: 1rem;
    color: var(--text);
    line-height: 1.6;
}

/* ===== METHODS SHOWCASE ===== */
.methods-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.method-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.method-card:hover {
    border-color: var(--gfp-dim);
    transform: translateY(-3px);
}

.method-icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 12px;
    border-radius: 50%;
    position: relative;
}

#mi-calcium {
    background: radial-gradient(circle, var(--gfp) 15%, transparent 70%);
    box-shadow: 0 0 20px var(--gfp-glow);
    animation: pulse-glow 2s ease-in-out infinite;
}

#mi-dl {
    background: var(--gfp-subtle);
    border: 2px solid var(--gfp-dim);
}

#mi-dl::after {
    content: 'AI';
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--gfp);
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#mi-atlas {
    background: var(--gfp-subtle);
    border: 2px dashed var(--gfp-dim);
}

#mi-atlas::after {
    content: '';
    position: absolute;
    inset: 8px;
    border: 1px solid var(--gfp-dim);
    border-radius: 50%;
}

.method-card h4 {
    color: var(--gfp);
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.method-card p {
    font-size: 0.85rem;
    color: var(--text-dim);
}

/* ===== FISH REVEAL ===== */
.fish-reveal-container {
    max-width: 500px;
    margin: 0 auto;
    cursor: pointer;
}

#fish-canvas {
    width: 100%;
    aspect-ratio: 2 / 1;
    border-radius: 12px;
    display: block;
}

/* ===== ABOUT ===== */
.about-inner {
    flex-direction: column;
}

.about-content {
    text-align: center;
    margin-bottom: 40px;
}

.about-content h2 {
    color: var(--gfp);
}

.about-content p {
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 16px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.about-meta {
    margin-top: 24px;
    text-align: left;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.about-meta p {
    font-size: 0.95rem;
    margin-bottom: 6px;
}

.about-meta strong {
    color: var(--gfp-dim);
}

.about-fin {
    text-align: center;
    margin-top: 40px;
}

.fin-fish-container {
    max-width: 300px;
    margin: 0 auto;
}

#fin-fish-canvas {
    width: 100%;
    height: 120px;
    display: block;
}

.fin-text {
    font-size: 1rem;
    color: var(--text-dim);
    font-style: italic;
    margin-top: 16px;
}

/* ===== FOOTER ===== */
footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 30px 20px;
    font-size: 0.85rem;
    color: var(--text-dim);
    border-top: 1px solid var(--border);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 10px var(--gfp-glow); }
    50% { box-shadow: 0 0 25px var(--gfp-glow), 0 0 50px rgba(0, 255, 65, 0.1); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .section { padding: 60px 16px; }
    .section-inner { max-width: 100%; }
    .interactive-box { padding: 20px 16px; }
    .mixer-controls { flex-direction: column; gap: 20px; }
    .inverse-bars { flex-direction: column; gap: 30px; }
    .circuit-container {
        overflow-x: hidden;
        margin: 24px -8px;
    }
    .circuit-diagram {
        grid-template-columns: minmax(72px, 1fr) 28px minmax(72px, 1fr) 28px minmax(72px, 1fr) 28px minmax(72px, 1fr);
        gap: 8px 6px;
        max-width: 100%;
        padding: 12px 8px;
    }
    .circuit-node {
        min-width: 0;
        padding: 8px;
    }
    .circuit-node span {
        font-size: 0.72rem;
        word-break: normal;
        hyphens: none;
    }
    #cn-hind span { font-size: 0.68rem; }
    .circuit-icon { width: 28px; height: 28px; }
    .circuit-arrow { width: 24px; }
    .circuit-arrow::after { right: -2px; top: -4px; border-left-width: 6px; }
    .circuit-arrow.diagonal-up { width: 44px; transform: translateY(-6px) rotate(-24deg); }
    .circuit-arrow.vertical-arrow { height: 24px; }
    #cn-ear { min-width: 0; grid-column: 2 / span 5; }
    .brain-container { overflow-x: auto; }
    #escape-game-controls { flex-direction: column; align-items: center; }
}
