/* === Reset & Base === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --void-black: #0a0a0f;
    --basalt: #12121a;
    --warm-concrete: #e8e4df;
    --weathered-stone: #b8b4af;
    --ionosphere: #7dd3a8;
    --magnetosphere: #9b72cf;
    --thermosphere: #5ec4d4;
    --slate-line: #2a2a3f;
    --signal-red: #e84545;
    --bg-current: var(--void-black);
}

html {
    scroll-behavior: auto;
}

body {
    background-color: var(--void-black);
    color: var(--weathered-stone);
    font-family: 'Commissioner', sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.75;
    letter-spacing: 0.01em;
    text-rendering: optimizeLegibility;
    font-feature-settings: 'kern' 1, 'liga' 1;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Grain overlay */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.035;
    mix-blend-mode: overlay;
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAOhklEQVR4nO1dbVczNwx8/v+/tBdICCEQtiV7Zr6cPe1uu92+JLZlWZZkS3Y+Pj6+fn19fX1+fv78+Pj4/Pz8+fn5+fHx8fP79+//+vr6z8/Pz5/fv39/f39/f39/fX19fX5+fn5/f//+/v7+/v7+8fX19fXz8/Pn9/f399fX1/f39/f39/fX9/f3z+/v7x8fH58fHx8/Pj4+P7++vr5/fHx+fH5+fn5+fn5+fX19/fz+/v7+8fHx8+Pj4+fn5+fn19fX19fX18/Pz8/v7+/v7+/v75+fn5+fn59fX19fPz8/P39+fn5+f39/f35+fn5+fn5+fX19ff38/Pz+/v7+/v7+/vn5+fn5+fn19fX18/Pz8/f39/f39/f35+fn5+fn59fX19fPz8/P39/f39/f39/fn5+fn5+fn5/f39/fn5+fn19fX1+fn5+f39/f39/f39+fn5+fHx8fH5+fn5+f39/f39/f35+fn5+fX19fX5+fn5/f39/f39/f39+fn5+fn5+fX19fPz8/Pz8/v7+/v7+/vn5+fn5+fn19fX18/Pz8/f35+fn5+fn5+fX19fX19fX18/Pz8/v7+/v7+/v76+vr6+fn5+fX19fX5+fn5/f39/f39/f35+fn5+fn5+fX19fPz8/Pz+/v76+vr6+fn5+fX19fX5+fn5/f39/f39/f35+fn59fX19fPz8/P7+/v7+/v7++vr6+vn5+fn19fX18/Pz8/v7+/v7+/v75+fn5+fn59fX19fPz8/P7+/v7+/v76+vr6+fn5+fX19fX5+fn5/f39/f39/f35+fn5+fn59fX19fX5+fn5/f39/f39/f3x8fHx8fHx8fn5+fn9/f39/f39/fn5+fn5+fn59fX19fX19fX5+fn5/f39/f39/f35+fn5+fn5+fX19fX5+fn5/f39/f39/f35+fn5+fn5+fX19fX19fX1+fn5+f39/f39/f39+fn5+fn5+fn5+fn5/f39/f39/f35+fn5+fn5+fX19fX19fX1+fn5+f39/f39/f39+fn5+fn5+fX19fX19fX19fn5+fn9/f39/f39/f35+fn5+fn5+fX19fPz8/Pz+/v7+/v7++vr6+vn5+fn59fX18/Pz8/v7+/v7+/v75+fn5+fn59fX19fPz8/P7+/v76+vr6+fn5+f39/f39/f39/fn5+fn5+fn59fX19fX19fX5+fn5/f39/f39/f35+fn5+fn59fX19fX19fX1+fn5+f39/f39/f39+fn5+fn5+fn19fX18/Pz8/v7+/v76+vr6");
    background-repeat: repeat;
    background-size: 100px 100px;
}

/* === Aurora Bands === */
.aurora-band {
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #5ec4d4 0%, #7dd3a8 35%, #9b72cf 70%, #5ec4d4 100%);
    background-size: 200% 100%;
    animation: auroraDrift 40s linear infinite;
    z-index: 10;
}

.aurora-band--top {
    top: 0;
    opacity: 0;
}

.aurora-band--bottom {
    bottom: 0;
    opacity: 1;
    animation-direction: reverse;
}

@keyframes auroraDrift {
    0% { background-position: 0% 0; }
    100% { background-position: 200% 0; }
}

/* === Void Entry === */
.void-entry {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: flex-end;
    padding-bottom: 15vh;
}

.hero-content {
    padding-left: 8vw;
}

.hero-title {
    font-family: 'Commissioner', sans-serif;
    font-weight: 800;
    font-size: clamp(4rem, 10vw, 9rem);
    letter-spacing: -0.03em;
    color: var(--warm-concrete);
    line-height: 1;
    opacity: 0;
}

.hero-title .char {
    display: inline-block;
    opacity: 0;
    transition: opacity 300ms ease-in;
}

.hero-title .char.visible {
    opacity: 1;
}

.hero-rule {
    width: 0;
    height: 1px;
    background-color: var(--slate-line);
    margin-top: 1.5rem;
    transition: width 1500ms ease-out;
}

.hero-rule.revealed {
    width: 38.2vw;
}

/* === Thesis Sections === */
.thesis-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.thesis-section--left {
    justify-content: flex-start;
    padding-left: 12vw;
}

.thesis-section--right {
    justify-content: flex-end;
    padding-right: 12vw;
}

.thesis-section--center {
    justify-content: center;
}

.thesis-block {
    max-width: 42ch;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 800ms ease-out, transform 800ms ease-out;
}

.thesis-block.revealed {
    opacity: 1;
    transform: translateY(0);
}

.thesis-block p {
    color: var(--weathered-stone);
    font-weight: 400;
    font-size: 18px;
    line-height: 1.75;
    letter-spacing: 0.01em;
}

/* === Void Spacers === */
.void-spacer {
    position: relative;
    height: 100vh;
}

/* === Structural Hairlines === */
.structural-hairline {
    position: absolute;
    height: 1px;
    background-color: var(--slate-line);
    left: 0;
}

/* === The Arsenal === */
.arsenal-section {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

.arsenal-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.arsenal-fragment {
    position: absolute;
    left: var(--x);
    top: var(--y);
    font-family: 'Commissioner', sans-serif;
    font-size: var(--size);
    font-weight: var(--weight);
    color: var(--color);
    transform: rotate(var(--rotation));
    opacity: 0;
    transition: opacity 600ms ease-out, transform 600ms ease-out;
    white-space: nowrap;
}

.arsenal-fragment.revealed {
    opacity: 1;
}

.arsenal-diagonal {
    position: absolute;
    top: 50%;
    left: -10%;
    width: 120%;
    height: 2px;
    background: linear-gradient(90deg, #5ec4d4 0%, #7dd3a8 35%, #9b72cf 70%, #5ec4d4 100%);
    background-size: 200% 100%;
    animation: auroraDrift 40s linear infinite;
    transform: rotate(15deg);
    transform-origin: center;
    z-index: 1;
}

/* === Terminus === */
.terminus-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.terminus-content {
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 800ms ease-out, transform 800ms ease-out;
}

.terminus-content.revealed {
    opacity: 1;
    transform: translateY(0);
}

.terminus-title {
    font-family: 'Commissioner', sans-serif;
    font-weight: 300;
    font-size: clamp(2.5rem, 6vw, 5rem);
    color: var(--warm-concrete);
    letter-spacing: -0.02em;
    line-height: 1;
}

.terminus-date {
    margin-top: 4rem;
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #4a4a5f;
}

/* === Glitch Overlay === */
.glitch-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 999;
}

.glitch-band {
    position: absolute;
    left: 0;
    width: 100vw;
    height: 3px;
    background-color: var(--signal-red);
    opacity: 0.3;
}

/* === Responsive === */
@media (max-width: 768px) {
    .hero-content {
        padding-left: 5vw;
    }

    .thesis-section--left {
        padding-left: 5vw;
    }

    .thesis-section--right {
        padding-right: 5vw;
    }

    .thesis-block {
        max-width: 90vw;
    }

    .thesis-block p {
        max-width: 42ch;
    }

    .arsenal-fragment {
        position: relative;
        left: auto;
        top: auto;
        display: block;
        margin: 2rem 5vw;
        white-space: normal;
        transform: rotate(calc(var(--rotation) * 0.3));
    }

    .arsenal-container {
        display: flex;
        flex-direction: column;
        justify-content: center;
        height: auto;
        min-height: 100vh;
    }

    .arsenal-diagonal {
        display: none;
    }

    body::after {
        opacity: 0.025;
    }
}
