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

:root {
    --deep-void: #08080e;
    --midnight: #0f0f1a;
    --twilight: #1a1a2e;
    --lavender-mist: #a8a0c4;
    --ember-glow: #e8944a;
    --starlight-gold: #f4d03f;
    --parchment: #f5f0e0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--deep-void);
    color: var(--parchment);
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 300;
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
}

/* === NOISE OVERLAY === */
.noise-svg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.035;
}

/* === HERO SECTION === */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: radial-gradient(ellipse at 50% 30%, var(--twilight) 0%, var(--midnight) 40%, var(--deep-void) 80%);
    overflow: hidden;
}

.hero-content {
    text-align: center;
    z-index: 2;
    position: relative;
}

.hero-icons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.hero-icon {
    width: 32px;
    height: 32px;
    opacity: 0.8;
    animation: iconFloat 4s ease-in-out infinite;
}

.hero-icon:nth-child(2) { animation-delay: -1.3s; }
.hero-icon:nth-child(3) { animation-delay: -2.6s; }

@keyframes iconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.hero-title {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: clamp(3.5rem, 10vw, 8rem);
    color: var(--parchment);
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 60px rgba(244, 208, 63, 0.15);
}

.hero-subtitle {
    font-family: 'Libre Baskerville', serif;
    font-style: italic;
    font-size: clamp(1rem, 2vw, 1.4rem);
    color: var(--lavender-mist);
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

.tagline-mono {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 300;
    font-size: clamp(0.7rem, 1.2vw, 0.9rem);
    color: var(--starlight-gold);
    opacity: 0.6;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.scroll-indicator {
    margin-top: 3rem;
    animation: scrollBounce 2s ease-in-out infinite;
}

.scroll-indicator svg {
    width: 24px;
    height: 40px;
}

.scroll-dot {
    animation: scrollDotMove 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

@keyframes scrollDotMove {
    0% { cy: 8; opacity: 1; }
    100% { cy: 18; opacity: 0; }
}

/* Hero Stars */
.hero-stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--starlight-gold);
    border-radius: 50%;
    animation: starTwinkle var(--duration) ease-in-out infinite;
    animation-delay: var(--delay);
}

@keyframes starTwinkle {
    0%, 100% { opacity: var(--base-opacity); }
    50% { opacity: 1; }
}

/* === TIMELINE === */
.timeline-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem 1.5rem 6rem;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(244, 208, 63, 0.4);
    transform: translateX(-50%);
    z-index: 0;
}

/* === CONSTELLATION INTERLUDES === */
.constellation-interlude {
    text-align: center;
    padding: 4rem 0;
    position: relative;
    z-index: 1;
}

.constellation-text {
    font-family: 'Libre Baskerville', serif;
    font-style: italic;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    color: var(--lavender-mist);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.constellation-interlude.visible .constellation-text {
    opacity: 0.9;
    transform: translateY(0);
}

.constellation-dots {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 1.2rem;
}

.dot {
    width: 4px;
    height: 4px;
    background: var(--starlight-gold);
    border-radius: 50%;
    opacity: 0.5;
}

/* === TIMELINE NODES === */
.timeline-node {
    position: relative;
    display: flex;
    margin-bottom: 4rem;
    z-index: 1;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.timeline-node.visible {
    opacity: 1;
    transform: translateY(0);
}

.node-left {
    justify-content: flex-start;
    padding-right: calc(50% + 2rem);
}

.node-right {
    justify-content: flex-end;
    padding-left: calc(50% + 2rem);
}

.node-connector {
    position: absolute;
    top: 2rem;
    width: 2rem;
    height: 2px;
    background: rgba(244, 208, 63, 0.4);
}

.node-left .node-connector {
    right: calc(50% - 2rem);
}

.node-right .node-connector {
    left: calc(50% - 2rem);
}

.node-card {
    background: rgba(26, 26, 46, 0.6);
    border: 1px solid rgba(168, 160, 196, 0.15);
    border-radius: 4px;
    padding: 2rem;
    position: relative;
    backdrop-filter: blur(4px);
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.node-card:hover {
    border-color: rgba(232, 148, 74, 0.4);
    box-shadow: 0 0 30px rgba(232, 148, 74, 0.08);
}

.node-icons {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.node-icons svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.node-title {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2.4rem);
    color: var(--parchment);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.node-body {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 300;
    font-size: clamp(0.95rem, 1.5vw, 1.1rem);
    color: var(--parchment);
    opacity: 0.85;
    margin-bottom: 1rem;
    line-height: 1.7;
}

.node-meta {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 300;
    font-size: 0.75rem;
    color: var(--ember-glow);
    opacity: 0.7;
    letter-spacing: 0.05em;
}

/* === FOOTER === */
.footer {
    background: var(--deep-void);
    padding: 4rem 1.5rem;
    text-align: center;
    border-top: 1px solid rgba(168, 160, 196, 0.1);
}

.footer-icons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.footer-icons svg {
    width: 20px;
    height: 20px;
    opacity: 0.5;
}

.footer-text {
    font-family: 'Libre Baskerville', serif;
    font-size: 0.95rem;
    color: var(--lavender-mist);
    opacity: 0.6;
    margin-bottom: 0.5rem;
}

.footer-mono {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 300;
    font-size: 0.8rem;
}

.footer-copyright {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 300;
    font-size: 0.85rem;
    color: var(--lavender-mist);
    opacity: 0.4;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .timeline-line {
        left: 1.5rem;
    }

    .node-left,
    .node-right {
        padding-left: 3.5rem;
        padding-right: 0;
        justify-content: flex-start;
    }

    .node-left .node-connector,
    .node-right .node-connector {
        left: 1.5rem;
        right: auto;
        width: 1.5rem;
    }
}
