/* sim-ai.net — bioluminescent abyss palette */

:root {
    --void: #0A0814;
    --panel-bg: #100E1C;
    --primary: #6A5ACD;
    --light: #C8B8FF;
    --body-text: #9A8EBE;
    --warm: #FF6B8A;
    --edge: #3A2A6A;
    --pulse: #8A7AEF;

    --panel-border: rgba(106, 90, 205, 0.20);
    --panel-fill: rgba(10, 8, 20, 0.85);

    --font-display: "Syne", "Inter", system-ui, sans-serif;
    --font-body: "Inter", system-ui, sans-serif;
    --font-mono: "JetBrains Mono", "Menlo", monospace;
}

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

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

body {
    background: var(--void);
    color: var(--body-text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.75;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==== background canvas ==== */

#network-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    display: block;
    background: var(--void);
}

.depth-fog {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        radial-gradient(ellipse 60% 70% at 50% 50%, transparent 0%, rgba(10, 8, 20, 0.45) 80%, rgba(10, 8, 20, 0.85) 100%),
        radial-gradient(ellipse 30% 30% at 30% 30%, rgba(106, 90, 205, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse 30% 30% at 70% 70%, rgba(138, 122, 239, 0.05) 0%, transparent 60%);
    mix-blend-mode: normal;
}

/* ==== nav markers ==== */

.nav-markers {
    position: fixed;
    right: 32px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 30;
    display: flex;
    flex-direction: column;
    gap: 26px;
    align-items: flex-end;
}

.nav-node {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--primary);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    cursor: pointer;
    opacity: 0.55;
    transition: opacity 0.4s ease, color 0.4s ease;
}

.nav-node-label {
    opacity: 0;
    transform: translateX(8px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    white-space: nowrap;
}

.nav-node-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid var(--primary);
    background: transparent;
    position: relative;
    transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, transform 0.4s ease;
}

.nav-node:hover {
    opacity: 1;
    color: var(--light);
}

.nav-node:hover .nav-node-label {
    opacity: 1;
    transform: translateX(0);
}

.nav-node:hover .nav-node-dot {
    border-color: var(--pulse);
    background: rgba(138, 122, 239, 0.20);
    box-shadow: 0 0 14px rgba(138, 122, 239, 0.55);
}

.nav-node.is-active {
    opacity: 1;
    color: var(--light);
}

.nav-node.is-active .nav-node-dot {
    border-color: var(--pulse);
    background: var(--pulse);
    box-shadow: 0 0 18px rgba(138, 122, 239, 0.7), 0 0 36px rgba(138, 122, 239, 0.35);
    animation: pulse-core 2.6s ease-in-out infinite;
}

.nav-node.is-active .nav-node-label {
    opacity: 1;
    transform: translateX(0);
}

@keyframes pulse-core {
    0%, 100% { box-shadow: 0 0 16px rgba(138, 122, 239, 0.55), 0 0 32px rgba(138, 122, 239, 0.25); }
    50% { box-shadow: 0 0 24px rgba(138, 122, 239, 0.85), 0 0 56px rgba(138, 122, 239, 0.45); }
}

/* ==== site header ==== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 25;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px 40px;
    pointer-events: none;
}

.site-mark {
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
}

.mark-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--pulse);
    box-shadow: 0 0 10px rgba(138, 122, 239, 0.7);
    animation: mark-blink 2.2s ease-in-out infinite;
}

@keyframes mark-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.mark-text {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.16em;
    color: var(--light);
    text-transform: lowercase;
}

.site-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    color: var(--primary);
    pointer-events: auto;
}

.site-meta .meta-line {
    opacity: 0.6;
}

.site-meta .meta-value {
    color: var(--light);
    min-width: 28px;
    text-align: right;
}

.site-meta .meta-sep {
    opacity: 0.4;
}

/* ==== main + scenes ==== */

main {
    position: relative;
    z-index: 5;
}

.scene {
    position: relative;
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    padding: 80px 8% 80px 8%;
}

/* ==== entry ==== */

.scene-entry {
    justify-content: center;
}

.entry-stack {
    text-align: center;
    position: relative;
    transition: opacity 1.2s ease, transform 1.2s ease;
    opacity: 0;
    transform: translateY(20px);
}

.scene-entry.is-revealed .entry-stack {
    opacity: 1;
    transform: translateY(0);
}

.entry-pre {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 36px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.22em;
    color: var(--primary);
    opacity: 0.85;
}

.pre-dash {
    display: inline-block;
    width: 36px;
    height: 1px;
    background: var(--primary);
    opacity: 0.6;
}

.entry-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(56px, 9vw, 96px);
    letter-spacing: -0.025em;
    line-height: 1.0;
    color: var(--light);
    text-shadow: 0 0 38px rgba(200, 184, 255, 0.35), 0 0 90px rgba(106, 90, 205, 0.25);
}

.entry-sub {
    margin-top: 28px;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.18em;
    color: var(--primary);
}

.entry-coords {
    margin-top: 56px;
    display: inline-flex;
    gap: 24px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.18em;
    color: var(--primary);
    opacity: 0.55;
}

.entry-coords .coord {
    border: 1px solid rgba(106, 90, 205, 0.25);
    padding: 6px 12px;
}

.entry-chevron {
    position: absolute;
    bottom: 56px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    animation: chev-pulse 2.4s ease-in-out infinite;
}

.chev-line {
    width: 1px;
    height: 36px;
    background: linear-gradient(to bottom, transparent, var(--primary));
    opacity: 0.6;
}

.chev-arrow {
    width: 12px;
    height: 12px;
    border-right: 1px solid var(--primary);
    border-bottom: 1px solid var(--primary);
    transform: rotate(45deg);
    margin-top: -6px;
}

.chev-text {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.22em;
    color: var(--primary);
    opacity: 0.75;
}

@keyframes chev-pulse {
    0%, 100% { opacity: 0.55; transform: translateX(-50%) translateY(0); }
    50% { opacity: 1; transform: translateX(-50%) translateY(8px); }
}

/* ==== panels (shared) ==== */

.panel {
    position: relative;
    background: var(--panel-fill);
    border: 1px solid var(--panel-border);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 40px;
    color: var(--body-text);
    transition: opacity 0.8s ease, transform 0.8s ease, border-color 0.8s ease;
    opacity: 0;
    transform: translateY(24px);
}

.panel::before {
    content: "";
    position: absolute;
    top: -1px;
    left: -1px;
    width: 18px;
    height: 18px;
    border-top: 1px solid var(--pulse);
    border-left: 1px solid var(--pulse);
    opacity: 0.7;
}

.panel::after {
    content: "";
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 18px;
    height: 18px;
    border-bottom: 1px solid var(--pulse);
    border-right: 1px solid var(--pulse);
    opacity: 0.7;
}

.scene.is-revealed .panel {
    opacity: 1;
    transform: translateY(0);
    border-color: rgba(106, 90, 205, 0.40);
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(106, 90, 205, 0.18);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.16em;
}

.panel-index {
    color: var(--light);
}

.panel-tag {
    color: var(--primary);
    opacity: 0.7;
}

.panel-tag-warm {
    color: var(--warm);
    opacity: 0.85;
}

.panel-title {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 48px;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--light);
    margin-bottom: 28px;
}

.panel-title-warm {
    font-weight: 700;
    font-size: 64px;
    color: var(--warm);
    text-shadow: 0 0 30px rgba(255, 107, 138, 0.30);
}

.panel-lede {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 20px;
    line-height: 1.5;
    color: var(--light);
    margin-bottom: 24px;
    opacity: 0.92;
}

.panel-divider {
    height: 1px;
    width: 60px;
    background: var(--primary);
    opacity: 0.5;
    margin: 24px 0;
}

.panel-body {
    font-size: 16px;
    line-height: 1.75;
    color: var(--body-text);
    margin-bottom: 18px;
}

.panel-body:last-of-type {
    margin-bottom: 0;
}

.panel-readout {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid rgba(106, 90, 205, 0.18);
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.05em;
}

.readout-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 6px 0;
    border-bottom: 1px dashed rgba(106, 90, 205, 0.14);
}

.readout-row:last-child {
    border-bottom: none;
}

.readout-key {
    color: var(--primary);
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.readout-val {
    color: var(--light);
}

/* ==== concept ==== */

.scene-concept {
    justify-content: flex-start;
}

.panel-left {
    max-width: 560px;
    margin-left: 0;
    margin-top: -4vh;
}

/* ==== architecture ==== */

.scene-architecture {
    padding-left: 4%;
    padding-right: 4%;
    justify-content: center;
}

.split-grid {
    width: 100%;
    max-width: 1400px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: stretch;
}

.panel-split {
    height: 100%;
}

.split-axis {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 0 8px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.20em;
    color: var(--primary);
    opacity: 0.55;
}

.axis-tick {
    width: 1px;
    height: 24px;
    background: var(--primary);
    opacity: 0.4;
}

.axis-glyph {
    font-size: 18px;
    color: var(--pulse);
    opacity: 0.8;
}

.axis-label {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

.panel-list {
    list-style: none;
    margin-top: 22px;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.04em;
    color: var(--body-text);
}

.panel-list li {
    padding: 8px 0;
    display: flex;
    gap: 12px;
    border-bottom: 1px dashed rgba(106, 90, 205, 0.14);
}

.panel-list li:last-child {
    border-bottom: none;
}

.bullet {
    color: var(--pulse);
    opacity: 0.9;
}

/* ==== emergence ==== */

.scene-emergence {
    justify-content: center;
}

.panel-wide {
    max-width: 800px;
    width: 100%;
}

.emergence-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 32px 0;
    padding: 24px 0;
    border-top: 1px solid rgba(255, 107, 138, 0.20);
    border-bottom: 1px solid rgba(255, 107, 138, 0.20);
}

.emergence-cell {
    text-align: left;
    padding: 0 16px;
    border-right: 1px solid rgba(106, 90, 205, 0.16);
}

.emergence-cell:last-child {
    border-right: none;
}

.emergence-stat {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 32px;
    color: var(--warm);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.emergence-cap {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.05em;
    color: var(--body-text);
    opacity: 0.8;
    line-height: 1.5;
}

/* ==== signal ==== */

.scene-signal {
    justify-content: center;
    text-align: center;
}

.signal-stack {
    width: 100%;
    max-width: 720px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    transition: opacity 1.4s ease;
    opacity: 0;
}

.scene-signal.is-revealed .signal-stack {
    opacity: 1;
}

.signal-trace {
    display: flex;
    align-items: center;
    gap: 0;
}

.trace-pip {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 12px rgba(106, 90, 205, 0.6);
    animation: trace-pulse 1.6s ease-in-out infinite;
}

.trace-pip:nth-child(3) { animation-delay: 0.4s; }
.trace-pip:nth-child(5) { animation-delay: 0.8s; }
.trace-pip:nth-child(7) { animation-delay: 1.2s; }

.trace-line {
    width: 60px;
    height: 1px;
    background: linear-gradient(to right, var(--primary), var(--pulse), var(--primary));
    opacity: 0.6;
}

@keyframes trace-pulse {
    0%, 100% { background: var(--primary); box-shadow: 0 0 8px rgba(106, 90, 205, 0.5); transform: scale(1); }
    50% { background: var(--light); box-shadow: 0 0 20px rgba(200, 184, 255, 0.85); transform: scale(1.2); }
}

.signal-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 48px;
    letter-spacing: -0.02em;
    color: var(--light);
    text-shadow: 0 0 30px rgba(200, 184, 255, 0.30);
}

.signal-tagline {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.12em;
    color: var(--primary);
}

.signal-foot {
    margin-top: 36px;
    display: flex;
    gap: 36px;
    flex-wrap: wrap;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    color: var(--primary);
    opacity: 0.6;
}

.foot-mail {
    color: var(--light);
}

/* ==== bloom layer (interaction pulses) ==== */

.bloom-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 6;
    overflow: hidden;
}

.bloom {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0.2);
    background: radial-gradient(circle, rgba(138, 122, 239, 0.85) 0%, rgba(138, 122, 239, 0.35) 30%, transparent 70%);
    animation: bloom-out 0.6s ease-out forwards;
    mix-blend-mode: screen;
}

@keyframes bloom-out {
    0% { opacity: 1; transform: translate(-50%, -50%) scale(0.2); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(2.0); }
}

/* ==== responsive ==== */

@media (max-width: 900px) {
    .nav-markers { right: 14px; gap: 18px; }
    .nav-node-label { display: none; }
    .scene { padding: 100px 6% 100px 6%; }
    .panel { padding: 28px; }
    .panel-title { font-size: 36px; }
    .panel-title-warm { font-size: 44px; }
    .split-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .split-axis {
        flex-direction: row;
        gap: 12px;
        padding: 8px 0;
    }
    .axis-tick { width: 24px; height: 1px; }
    .axis-label { writing-mode: horizontal-tb; transform: none; }
    .emergence-grid { grid-template-columns: 1fr; }
    .emergence-cell { border-right: none; border-bottom: 1px solid rgba(106, 90, 205, 0.16); padding: 14px 0; }
    .emergence-cell:last-child { border-bottom: none; }
    .site-header { padding: 18px 18px; }
    .site-meta { font-size: 10px; gap: 6px; }
    .entry-coords { flex-wrap: wrap; gap: 10px; justify-content: center; }
}

@media (max-width: 540px) {
    .panel-title { font-size: 28px; }
    .panel-title-warm { font-size: 36px; }
    .panel-lede { font-size: 17px; }
    .entry-title { font-size: 52px; }
    .signal-name { font-size: 36px; }
}
