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

:root {
    --bg: #0a0a0f;
    --text: #fffeff;
    --warm: #ccc1b4;
    --muted: rgba(255,255,255,0.12);
    --accent: #77caf5;
    --amber: #e8b84b;

    /* Layer content colors — from the mockup: muted olive-green, grey, warm cream */
    --text-olive: #8a9480;
    --text-grey-green: #6d7a6e;
    --text-cream: #bca98a;
    --text-muted-blue: #6a7a8e;
}

html,
body {
    height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    overflow: hidden;
}

/* ── Parallax container ── */
.parallax {
    position: relative;
    z-index: 1;
    height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    perspective: 8px;
    perspective-origin: 50% 50%;
    background: transparent;
}

/* ── Layers ── */
.layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    pointer-events: none;
}

.layer--content {
    pointer-events: auto;
}

/* ── ABYSS — fixed, bg color + image + distant blue glow ── */
.layer--abyss {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;

    /* Multiple backgrounds stack: FIRST = TOP, LAST = BOTTOM */
    background-color: var(--bg);
    background-image:
        /* 1. Glow (top) */
        radial-gradient(
            ellipse 1200px 900px at 20% 30%,
            rgba(70, 120, 180, 0.25) 0%,
            rgba(50, 90, 140, 0.12) 25%,
            rgba(30, 60, 100, 0.05) 50%,
            transparent 75%
        ),
        /* 2. Image (middle) */
        url('forest.jpeg');
    background-size: auto, cover;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
}

/* Deep — barely moves, the substrate */
.layer--deep {
    transform: translateZ(-6px) scale(1.75);
    transform-origin: center top;
}

/* Mid-deep — fragments, echoes */
.layer--mid-deep {
    transform: translateZ(-3px) scale(1.375);
    transform-origin: center top;
}

/* Mid — structural elements */
.layer--mid {
    transform: translateZ(-1px) scale(1.125);
    transform-origin: center top;
}

/* Surface — main content, scrolls normally */
.layer--surface {
    transform: translateZ(0);
    position: relative;
}

/* Foreground — flies past, closer than the viewer */
.layer--near {
    transform: translateZ(3px) scale(0.625);
    transform-origin: center top;
}

/* ── Layer containers: give each layer a tall scroll region ── */
.substrate,
.ghost-text,
.structure,
.near-field {
    width: 100%;
    height: 6000px;
    position: relative;
}

/* ── DEEP layer: ASCII constellations (small, scattered) ── */
.ascii-block {
    position: absolute;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 300;
    font-size: 12px;
    line-height: 1.3;
    color: var(--text-muted-blue);
    opacity: 0.5;
    white-space: pre;
    letter-spacing: 0.05em;
}

/* ── MID-DEEP layer: large text walls ── */
.text-wall {
    position: absolute;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 300;
    font-size: 12px;
    line-height: 1.55;
    color: var(--text-olive);
    opacity: 0.55;
    white-space: pre-wrap;
    letter-spacing: 0.02em;
    max-width: 480px;
}

.text-wall--cream {
    color: var(--text-cream);
    opacity: 0.5;
}

.text-wall--green {
    color: var(--text-grey-green);
    opacity: 0.6;
}

/* ── MID layer: chat log style, tighter ── */
.chat-block {
    position: absolute;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 300;
    font-size: 11.5px;
    line-height: 1.5;
    color: var(--text-grey-green);
    opacity: 0.6;
    white-space: pre-wrap;
    letter-spacing: 0.02em;
    max-width: 420px;
}

.chat-block .speaker {
    color: var(--text-cream);
    font-weight: 400;
}

.chat-block .tag {
    display: inline-block;
    padding: 1px 6px;
    border: 1px solid rgba(188, 169, 138, 0.3);
    color: var(--text-cream);
    font-size: 10.5px;
    margin: 4px 0;
}

/* ── NEAR layer: streaks and particles ── */
.near-streak {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
}

.near-particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(255,255,255,0.7);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255,255,255,0.4), 0 0 25px rgba(119,202,245,0.2);
}

/* ── Surface content ── */
.surface-content {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 32px;
    min-height: 5000px;
}

/* Islands — solid ground floating over the void */
.island {
    background: rgba(10, 14, 22, 0.88);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 2px;
    padding: 48px 40px;
    margin-bottom: 200px;
    box-shadow: 0 0 80px rgba(0,0,0,0.6), 0 0 2px rgba(255,255,255,0.03);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.island--wide {
    padding: 56px 40px;
}

.island--narrow {
    max-width: 540px;
}

.island p {
    font-weight: 300;
    font-size: 16px;
    line-height: 1.55;
    color: rgba(255,255,255,0.85);
    margin-bottom: 1.2em;
    max-width: 600px;
}

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

/* Void gaps between islands */
.void-gap {
    height: 300px;
}

.void-gap--deep {
    height: 500px;
}

/* Hero space */
.hero-space {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: end;
    padding-bottom: 15vh;
}

.hero-space h1 {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
    font-size: clamp(28px, 5vw, 42px);
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 16px;
}

.hero-sub {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 300;
    font-size: 14px;
    color: var(--warm);
    line-height: 1.5;
    max-width: 500px;
}

/* Section headings inside islands */
.section-label {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 300;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--warm);
    opacity: 0.6;
    margin-bottom: 40px;
}

/* Evidence numbers */
.evidence {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 32px;
    margin: 0;
}

.evidence-item {
    border-left: 1px solid rgba(255,255,255,0.08);
    padding-left: 16px;
}

.evidence-number {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
    font-size: 28px;
    color: var(--amber);
    line-height: 1;
    margin-bottom: 6px;
}

.evidence-label {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 300;
    font-size: 12px;
    color: var(--warm);
    opacity: 0.7;
    line-height: 1.4;
}

/* Findings */
.finding {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 24px 0;
}

.finding-title {
    font-weight: 400;
    font-size: 18px;
    margin-bottom: 8px;
}

.finding-desc {
    font-weight: 300;
    font-size: 14px;
    color: var(--warm);
    line-height: 1.5;
    max-width: 540px;
}

/* Links / papers */
.paper-link {
    display: block;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    text-decoration: none;
    transition: border-color 0.3s;
}

.paper-link:hover {
    border-color: rgba(255,255,255,0.15);
}

.paper-title {
    font-weight: 400;
    font-size: 17px;
    color: var(--text);
    margin-bottom: 4px;
}

.paper-meta {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 300;
    font-size: 12px;
    color: var(--warm);
    opacity: 0.6;
}
