:root {
    --chrome-light: #d4d4d8;
    --chrome-dark: #3f3f46;
    --chrome-mid: #a1a1aa;
    --warm-amber: #d4a574;
    --deep-charcoal: #1c1917;
    --warm-cream: #faf7f2;
    --signal-red: #e87461;
    --hud-green: #86a873;
    --chrome-silver: #c0c0c0;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.25rem);
    line-height: 1.7;
    letter-spacing: 0.01em;
    color: var(--chrome-dark);
    background: var(--deep-charcoal);
    overflow-x: hidden;
}

/* ===== SITE GRID ===== */
.site-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    background: var(--chrome-light);
    border-right: 4px solid var(--deep-charcoal);
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow: hidden;
}

.sidebar-scanlines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(63, 63, 70, 0.08) 2px,
        rgba(63, 63, 70, 0.08) 2.5px
    );
    pointer-events: none;
    z-index: 1;
}

.sidebar-wordmark {
    padding: 32px 24px;
    border-bottom: 3px solid var(--chrome-dark);
}

.wordmark-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    color: var(--deep-charcoal);
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
    padding: 40px 24px;
    position: relative;
}

.nav-connector {
    position: absolute;
    left: 39px;
    top: 40px;
    bottom: 40px;
    width: 40px;
    height: calc(100% - 80px);
    z-index: 0;
}

.connector-line {
    stroke: var(--chrome-mid);
    stroke-width: 1.5;
    stroke-dasharray: 4 4;
}

.connector-progress {
    stroke: var(--warm-amber);
    stroke-width: 2;
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    transition: stroke-dashoffset 0.3s ease;
}

.nav-node {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0 16px 16px;
    text-decoration: none;
    color: var(--chrome-mid);
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.nav-node.active {
    color: var(--deep-charcoal);
}

.node-circle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--chrome-mid);
    background: transparent;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.nav-node.active .node-circle {
    border-color: var(--warm-amber);
    background: var(--warm-amber);
    box-shadow: 0 0 8px rgba(212, 165, 116, 0.5);
}

.node-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.sidebar-footer {
    padding: 24px;
    border-top: 3px solid var(--chrome-dark);
}

.hud-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: var(--chrome-mid);
    text-transform: uppercase;
}

/* ===== VIEWPORT / MAIN ===== */
.viewport {
    overflow-y: auto;
}

/* ===== PANELS ===== */
.panel {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.panel-dark {
    background: var(--deep-charcoal);
    color: var(--warm-cream);
}

.panel-light {
    background: var(--warm-cream);
    color: var(--chrome-dark);
}

.panel-content {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 80px 48px;
    position: relative;
}

/* ===== HUD BRACKETS ===== */
.hud-bracket {
    position: absolute;
    width: 16px;
    height: 16px;
}

.hud-bracket::before,
.hud-bracket::after {
    content: '';
    position: absolute;
    background: var(--chrome-mid);
}

.hud-tl { top: 40px; left: 20px; }
.hud-tl::before { top: 0; left: 0; width: 16px; height: 1px; }
.hud-tl::after { top: 0; left: 0; width: 1px; height: 16px; }

.hud-tr { top: 40px; right: 20px; }
.hud-tr::before { top: 0; right: 0; width: 16px; height: 1px; }
.hud-tr::after { top: 0; right: 0; width: 1px; height: 16px; }

.hud-bl { bottom: 40px; left: 20px; }
.hud-bl::before { bottom: 0; left: 0; width: 16px; height: 1px; }
.hud-bl::after { bottom: 0; left: 0; width: 1px; height: 16px; }

.hud-br { bottom: 40px; right: 20px; }
.hud-br::before { bottom: 0; right: 0; width: 16px; height: 1px; }
.hud-br::after { bottom: 0; right: 0; width: 1px; height: 16px; }

/* ===== PANEL 1 - SIGNAL ACQUIRED ===== */
.panel-1-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 160px);
}

.hero-title {
    font-family: 'Righteous', cursive;
    font-size: clamp(3rem, 8vw, 6.5rem);
    font-weight: 400;
    letter-spacing: 0.02em;
    margin-bottom: 40px;
    line-height: 1.1;
}

.hero-letter {
    display: inline-block;
    -webkit-text-stroke: 3px var(--deep-charcoal);
    paint-order: stroke fill;
    text-shadow: 6px 6px 0 var(--warm-amber);
    color: var(--warm-cream);
    transition: transform 0.3s ease;
}

.hero-dot {
    color: var(--warm-amber);
    -webkit-text-stroke: 3px var(--warm-amber);
    text-shadow: 6px 6px 0 var(--chrome-dark);
}

.tagline-container {
    width: 100%;
    max-width: 720px;
    margin-bottom: 60px;
}

.tagline-svg {
    width: 100%;
    height: 60px;
    overflow: visible;
}

.tagline-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 28px;
    font-weight: 700;
    fill: none;
    stroke: var(--warm-cream);
    stroke-width: 1;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 2s ease-out, fill 1s ease-out 1.5s;
}

.tagline-text.drawn {
    stroke-dashoffset: 0;
    fill: var(--warm-cream);
}

.signal-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
}

.signal-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--hud-green);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 4px rgba(134, 168, 115, 0.5); }
    50% { box-shadow: 0 0 12px rgba(134, 168, 115, 0.8); }
}

/* ===== PANEL 2 - CORE SYSTEMS ===== */
.panel-heading {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 48px;
    letter-spacing: -0.01em;
}

.panel-heading-light {
    color: var(--warm-cream);
}

.two-column-layout {
    display: flex;
    gap: 0;
    align-items: stretch;
}

.column-left {
    flex: 1;
    padding-right: 40px;
}

.column-divider {
    width: 3px;
    background: var(--chrome-dark);
    flex-shrink: 0;
}

.column-right {
    flex: 1;
    padding-left: 40px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.manifesto-text {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: clamp(1rem, 1.2vw, 1.25rem);
    line-height: 1.7;
    margin-bottom: 24px;
    color: var(--chrome-dark);
}

.info-block {
    border: 3px solid var(--chrome-dark);
    padding: 24px;
    box-shadow: 6px 6px 0 var(--warm-amber);
    transition: box-shadow 0.4s ease;
}

.info-block.shadow-active {
    box-shadow: 6px 6px 0 var(--warm-amber);
}

.info-block-header {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--chrome-mid);
}

.info-block-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--deep-charcoal);
}

.info-block-body {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--chrome-dark);
}

/* ===== PANEL 3 - NAVIGATION ARRAY ===== */
.panel-3-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.heart-circuit-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto 40px;
}

.heart-circuit-svg {
    width: 100%;
    height: auto;
}

.circuit-path {
    stroke-dasharray: var(--path-length, 1000);
    stroke-dashoffset: var(--path-length, 1000);
    transition: stroke-dashoffset 1.2s ease-out, stroke 0.6s ease;
}

.circuit-path.drawn {
    stroke-dashoffset: 0;
    stroke: var(--warm-amber);
}

.circuit-node {
    opacity: 0;
    transition: opacity 0.4s ease, stroke 0.4s ease, fill 0.4s ease;
}

.circuit-node.visible {
    opacity: 1;
    stroke: var(--warm-amber);
    fill: var(--warm-amber);
}

.circuit-center {
    transition: opacity 0.6s ease;
}

.circuit-center.visible {
    opacity: 1;
}

.circuit-caption {
    text-align: center;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.circuit-caption.visible {
    opacity: 1;
}

/* ===== PANEL 4 - TRANSMISSION LOG ===== */
.panel-4-content {
    max-width: 800px;
}

.log-entries {
    display: flex;
    flex-direction: column;
    gap: 80px;
}

.log-entry {
    border-left: 4px solid var(--chrome-light);
    padding: 32px 32px 32px 40px;
    position: relative;
    border: 3px solid var(--chrome-dark);
    border-left: 6px solid #c0c0c0;
    box-shadow: 0 0 0 var(--chrome-dark);
    transition: box-shadow 0.4s ease, transform 0.6s ease, opacity 0.6s ease;
}

.log-entry.shadow-active {
    box-shadow: 6px 6px 0 var(--chrome-dark);
}

.log-timestamp {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 2px solid var(--chrome-mid);
    background: var(--warm-amber);
    flex-shrink: 0;
}

.log-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--deep-charcoal);
}

.log-body {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: clamp(0.95rem, 1.1vw, 1.1rem);
    line-height: 1.7;
    color: var(--chrome-dark);
}

/* ===== PANEL 5 - END OF SIGNAL ===== */
.panel-5-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: calc(100vh - 160px);
}

.pulse-heart {
    width: 80px;
    height: 80px;
    margin-bottom: 32px;
    animation: heart-pulse 2s ease-in-out infinite;
}

@keyframes heart-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.end-text {
    font-family: 'Righteous', cursive;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 400;
    color: var(--warm-cream);
    margin-bottom: 24px;
}

.signal-end {
    opacity: 0.5;
}

/* ===== FADE/SLIDE ANIMATIONS ===== */
.fade-in-element {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

.slide-right {
    transform: translateX(40px);
}

.slide-right.visible {
    transform: translateX(0);
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 767px) {
    .site-grid {
        grid-template-columns: 1fr;
        grid-template-rows: 64px 1fr;
    }

    .sidebar {
        position: sticky;
        top: 0;
        height: 64px;
        flex-direction: row;
        align-items: center;
        border-right: none;
        border-bottom: 4px solid var(--deep-charcoal);
    }

    .sidebar-scanlines {
        display: none;
    }

    .sidebar-wordmark {
        padding: 0 16px;
        border-bottom: none;
        border-right: 3px solid var(--chrome-dark);
        display: flex;
        align-items: center;
        height: 100%;
    }

    .wordmark-text {
        font-size: 0.9rem;
    }

    .sidebar-nav {
        flex-direction: row;
        padding: 0 12px;
        gap: 0;
        overflow-x: auto;
    }

    .nav-connector {
        display: none;
    }

    .nav-node {
        padding: 8px 10px;
        flex-direction: column;
        gap: 4px;
    }

    .node-label {
        font-size: 0.55rem;
        white-space: nowrap;
    }

    .sidebar-footer {
        display: none;
    }

    .panel-content {
        padding: 60px 24px;
    }

    .hero-title {
        font-size: clamp(2.2rem, 10vw, 4rem);
    }

    .hero-letter {
        -webkit-text-stroke: 2px var(--deep-charcoal);
        text-shadow: 4px 4px 0 var(--warm-amber);
    }

    .two-column-layout {
        flex-direction: column;
    }

    .column-left {
        padding-right: 0;
        margin-bottom: 32px;
    }

    .column-divider {
        width: 100%;
        height: 3px;
        margin-bottom: 32px;
    }

    .column-right {
        padding-left: 0;
    }

    .log-entries {
        gap: 40px;
    }

    .tagline-svg {
        height: 40px;
    }

    .tagline-text {
        font-size: 18px;
    }
}