/* ============================================
   namu.systems - Sci-Fi Wabi-Sabi Timeline
   ============================================ */
:root {
    --amber-phosphor: #D4A054;
    --deep-umber: #8B5E3C;
    --void-dark: #120E08;
    --aged-linen: #C8B8A4;
    --warm-grey: #8A7A68;
    --burnt-sienna: #C4895A;
    --hull-dark: #1E1814;
    --teal-patina: #2A4A48;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    background: var(--void-dark);
    color: var(--aged-linen);
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.7;
    overflow-x: hidden;
}

/* ==============================
   SCANLINE OVERLAY
   ============================== */
.scanline-overlay {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 2px,
        rgba(18, 14, 8, 0.15) 2px,
        rgba(18, 14, 8, 0.15) 4px
    );
    pointer-events: none;
    z-index: 2;
}

/* ==============================
   TIMELINE SPINE
   ============================== */
.timeline-spine {
    position: fixed;
    left: 38%;
    top: 0;
    width: 2px;
    height: 100vh;
    background: rgba(139, 94, 60, 0.15);
    z-index: 50;
    pointer-events: none;
}
.spine-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: var(--amber-phosphor);
    box-shadow: 0 0 8px rgba(212, 160, 84, 0.3);
    transition: height 0.1s linear;
}

/* ==============================
   EPOCH BASICS
   ============================== */
.epoch {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

/* ==============================
   EPOCH 0: BOOT SEQUENCE
   ============================== */
.epoch--boot {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--void-dark);
}
.boot-content {
    position: relative;
    z-index: 3;
    text-align: center;
}
.boot-log {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 2rem;
}
.log-line {
    font-family: 'Silkscreen', cursive;
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    color: var(--amber-phosphor);
    opacity: 0;
    text-transform: uppercase;
    text-shadow: 0 0 6px rgba(212, 160, 84, 0.3);
}
.log-line.active {
    opacity: 0.7;
    animation: logFlicker 0.1s ease forwards;
}
@keyframes logFlicker {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}
.boot-title {
    font-family: 'Silkscreen', cursive;
    font-weight: 700;
    font-size: clamp(2rem, 5.5vw, 4.5rem);
    color: var(--amber-phosphor);
    letter-spacing: 0.12em;
    line-height: 1.1;
    text-shadow: 0 0 20px rgba(212, 160, 84, 0.2);
    opacity: 0;
    animation: bootReveal 0.8s ease 2s forwards;
}
@keyframes bootReveal {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Glitch Bar */
.glitch-bar {
    width: 100%;
    height: 3px;
    background: var(--amber-phosphor);
    margin-top: 1.5rem;
    opacity: 0;
    animation: glitchBarIn 0.15s ease 2.5s forwards;
}
@keyframes glitchBarIn {
    0% { opacity: 0; transform: scaleX(0); }
    50% { opacity: 1; transform: scaleX(1.1); }
    100% { opacity: 0.4; transform: scaleX(1); }
}

/* ==============================
   EPOCH NODES
   ============================== */
.epoch-node {
    position: relative;
    z-index: 3;
    max-width: 450px;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border: 1px solid rgba(139, 94, 60, 0.3);
    background: rgba(30, 24, 20, 0.8);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.epoch-node.visible {
    opacity: 1;
    transform: translateY(0);
}
.epoch-node--left {
    margin-left: calc(38% + 30px);
    margin-top: clamp(4rem, 12vw, 8rem);
    margin-bottom: clamp(4rem, 12vw, 8rem);
}
.epoch-node--right {
    margin-left: calc(38% - 480px);
    margin-top: clamp(4rem, 12vw, 8rem);
    margin-bottom: clamp(4rem, 12vw, 8rem);
}

/* Node connector dot on the timeline */
.epoch-node::before {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--amber-phosphor);
    box-shadow: 0 0 8px rgba(212, 160, 84, 0.4);
    top: 50%;
    transform: translateY(-50%);
}
.epoch-node--left::before {
    left: -38px;
}
.epoch-node--right::before {
    right: -38px;
}

/* Node connector line */
.epoch-node::after {
    content: '';
    position: absolute;
    height: 1px;
    background: rgba(212, 160, 84, 0.2);
    top: 50%;
}
.epoch-node--left::after {
    left: -30px;
    width: 30px;
}
.epoch-node--right::after {
    right: -30px;
    width: 30px;
}

.node-epoch {
    display: block;
    font-family: 'Silkscreen', cursive;
    font-size: 0.55rem;
    letter-spacing: 0.2em;
    color: var(--amber-phosphor);
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(139, 94, 60, 0.2);
    text-shadow: 0 0 4px rgba(212, 160, 84, 0.2);
}
.node-title {
    font-family: 'Silkscreen', cursive;
    font-weight: 700;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    color: var(--amber-phosphor);
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}
.node-text {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 0.8rem;
    line-height: 1.8;
    color: var(--aged-linen);
    margin-bottom: 1rem;
}
.node-data {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(139, 94, 60, 0.2);
}
.data-entry {
    font-family: 'Silkscreen', cursive;
    font-size: 0.5rem;
    letter-spacing: 0.12em;
    color: var(--warm-grey);
    text-transform: uppercase;
}

/* ==============================
   GLITCH STRIPS
   ============================== */
.glitch-strip {
    position: absolute;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--amber-phosphor);
    opacity: 0;
    z-index: 10;
    pointer-events: none;
}
.glitch-strip.active {
    animation: glitchFlash 0.15s ease forwards;
}
@keyframes glitchFlash {
    0% { opacity: 0.6; transform: translateX(-8px); }
    25% { opacity: 0.3; transform: translateX(4px); }
    50% { opacity: 0.5; transform: translateX(-2px); }
    100% { opacity: 0; transform: translateX(0); }
}

/* ==============================
   EPOCH 5: ROOT
   ============================== */
.epoch--root {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--hull-dark);
}
.root-content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 500px;
    padding: 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1s ease;
}
.root-content.visible {
    opacity: 1;
    transform: translateY(0);
}
.root-domain {
    font-family: 'Silkscreen', cursive;
    font-weight: 700;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: var(--amber-phosphor);
    letter-spacing: 0.12em;
    border: 2px solid var(--amber-phosphor);
    padding: 0.3em 0.6em;
    display: inline-block;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 12px rgba(212, 160, 84, 0.2);
    box-shadow: 0 0 12px rgba(212, 160, 84, 0.1);
}
.root-text {
    font-family: 'IBM Plex Mono', monospace;
    font-style: italic;
    font-weight: 300;
    font-size: 0.85rem;
    color: var(--aged-linen);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}
.root-log {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    align-items: center;
}
.log-entry {
    font-family: 'Silkscreen', cursive;
    font-size: 0.5rem;
    letter-spacing: 0.15em;
    color: var(--warm-grey);
    text-transform: uppercase;
    opacity: 0.6;
}

/* ==============================
   RESPONSIVE
   ============================== */
@media (max-width: 768px) {
    .timeline-spine {
        left: 20px;
    }
    .epoch-node--left {
        margin-left: 50px;
        margin-right: 1rem;
    }
    .epoch-node--right {
        margin-left: 50px;
        margin-right: 1rem;
    }
    .epoch-node--left::before {
        left: -30px;
    }
    .epoch-node--right::before {
        left: -30px;
        right: auto;
    }
    .epoch-node--left::after {
        left: -22px;
        width: 22px;
    }
    .epoch-node--right::after {
        left: -22px;
        right: auto;
        width: 22px;
    }
}
