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

:root {
    --polar-night: #0a0e17;
    --ink-slate: #1e293b;
    --ice-white: #e2e8f0;
    --borealis-green: #00e5a0;
    --ion-violet: #7c3aed;
    --magnetosphere: #22d3ee;
    --wire-gray: #6b7c8e;
    --solar-flare: #fbbf24;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--polar-night);
    color: var(--ice-white);
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.1vw, 1.1rem);
    line-height: 1.55;
    overflow-x: hidden;
    cursor: none;
}

/* Custom Cursor */
.custom-cursor {
    position: fixed;
    width: 6px;
    height: 6px;
    background: var(--borealis-green);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    box-shadow: 0 0 4px rgba(0, 229, 160, 0.3);
    transition: transform 0.1s ease;
}

/* Aurora Margin */
.aurora-margin {
    position: fixed;
    top: 0;
    right: 0;
    width: 38%;
    height: 100vh;
    background: linear-gradient(180deg, #7c3aed 0%, #00e5a0 40%, #22d3ee 70%, #7c3aed 100%);
    background-size: 100% 300%;
    animation: auroraShift 25s linear infinite;
    pointer-events: none;
    z-index: 1;
    transition: width 0.8s ease-out;
}

.aurora-margin.light-event-active {
    width: 100vw;
}

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

.field-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    transition: opacity 0.8s ease;
}

.aurora-margin.light-event-active .field-lines {
    opacity: 0.25;
}

.field-line {
    fill: none;
    stroke: var(--magnetosphere);
    stroke-width: 0.5;
    animation: fieldUndulate 30s ease-in-out infinite;
}

.field-line:nth-child(2) {
    stroke: var(--borealis-green);
    animation-delay: -7s;
}

.field-line:nth-child(3) {
    stroke: var(--ion-violet);
    animation-delay: -15s;
}

.field-line:nth-child(4) {
    stroke: var(--borealis-green);
    animation-delay: -22s;
}

@keyframes fieldUndulate {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(10px); }
}

/* Masthead */
.masthead {
    position: relative;
    width: 62%;
    height: 15vh;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem 3rem;
    z-index: 2;
}

.masthead-title {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 800;
    font-size: clamp(3rem, 8vw, 7rem);
    letter-spacing: -0.04em;
    line-height: 1;
    color: var(--ice-white);
    opacity: 0;
    transition: opacity 0.6s ease;
}

.masthead-title.visible {
    opacity: 1;
}

.masthead-rule {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, #00e5a0, #22d3ee, #7c3aed);
    margin: 1rem 0 0.5rem;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.masthead-rule.visible {
    transform: scaleX(1);
}

.masthead-date {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    color: var(--wire-gray);
    opacity: 0;
    transition: opacity 0.6s ease 0.3s;
}

.masthead-date.visible {
    opacity: 1;
}

/* Dispatch Stream */
.dispatch-stream {
    position: relative;
    width: 62%;
    padding: 2rem 3rem 4rem;
    z-index: 2;
}

.time-block-label {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 200;
    font-size: 0.65rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--ion-violet);
    margin: 3rem 0 1.5rem;
}

.dispatch {
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 0.5px solid rgba(107, 124, 142, 0.2);
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
}

.dispatch.visible {
    opacity: 1;
    transform: translateY(0);
}

.dispatch:hover {
    border-bottom-color: rgba(107, 124, 142, 0.6);
}

.dispatch.light-event {
    position: relative;
    padding: 2rem;
    margin-left: -2rem;
    margin-right: -2rem;
    border-radius: 2px;
    background: radial-gradient(ellipse at 30% 50%, rgba(0, 229, 160, 0.15), rgba(124, 58, 237, 0.08), transparent);
    border-bottom: none;
}

.dateline {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    color: var(--wire-gray);
    margin-bottom: 0.5rem;
}

.dispatch-headline {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 700;
    font-size: clamp(1.6rem, 3.5vw, 3rem);
    line-height: 1.12;
    color: var(--ice-white);
    margin-bottom: 0.75rem;
    max-width: 58ch;
}

.dispatch-summary {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.1vw, 1.1rem);
    line-height: 1.55;
    color: var(--ice-white);
    opacity: 0.8;
    max-width: 58ch;
}

/* Ticker */
.ticker {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 32px;
    background: rgba(10, 14, 23, 0.92);
    backdrop-filter: blur(8px);
    overflow: hidden;
    z-index: 100;
    display: flex;
    align-items: center;
}

.ticker-content {
    display: flex;
    white-space: nowrap;
    animation: tickerScroll 60s linear infinite;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--wire-gray);
    letter-spacing: 0.06em;
}

.ticker-content span {
    padding-right: 4rem;
}

.ticker:hover .ticker-content {
    animation-play-state: paused;
}

@keyframes tickerScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Responsive */
@media (max-width: 1200px) {
    .aurora-margin {
        width: 25%;
    }
    .masthead,
    .dispatch-stream {
        width: 75%;
    }
}

@media (max-width: 768px) {
    .aurora-margin {
        width: 4px;
    }
    .masthead,
    .dispatch-stream {
        width: 100%;
        padding: 1.5rem;
    }
    .masthead-title {
        font-weight: 700;
        font-size: clamp(2rem, 6vw, 3rem);
    }
    .dispatch-headline {
        font-size: clamp(1.4rem, 4vw, 2rem);
    }
}
