/* ============================================
   yongjoon.xyz - Dopamine Timeline Biography
   ============================================ */

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background: #0A0A1A;
    color: #F0F0FA;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.75;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* ---------- Timeline Spine ---------- */
.timeline-spine {
    position: fixed;
    left: 50%;
    top: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, #FF6B8A, #6B8AFF, #8AFF6B);
    transform: translateX(-50%);
    z-index: 1;
    opacity: 0.7;
    box-shadow:
        0 0 8px rgba(255, 107, 138, 0.3),
        0 0 20px rgba(107, 138, 255, 0.15),
        0 0 40px rgba(138, 255, 107, 0.08);
}

/* ---------- Floating Background Shapes ---------- */
.floating-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
}

.shape-circle {
    border-radius: 50%;
}

.shape-rect {
    border-radius: 16px;
}

.shape-triangle {
    border-radius: 0;
    width: 0 !important;
    height: 0 !important;
    background: none !important;
}

/* Individual shape positions and colors */
.shape-1 {
    width: 180px;
    height: 180px;
    background: #FF6B8A;
    top: 5%;
    left: 8%;
    opacity: 0.08;
    animation: floatSlow 20s ease-in-out infinite;
}

.shape-2 {
    width: 60px;
    height: 60px;
    background: #6B8AFF;
    top: 12%;
    right: 15%;
    opacity: 0.12;
    animation: floatMedium 15s ease-in-out infinite;
}

.shape-3 {
    width: 120px;
    height: 80px;
    background: #8AFF6B;
    top: 25%;
    left: 20%;
    opacity: 0.07;
    animation: floatSlow 25s ease-in-out infinite reverse;
}

.shape-4 {
    width: 90px;
    height: 90px;
    background: #C86BFF;
    top: 35%;
    right: 10%;
    opacity: 0.1;
    animation: floatMedium 18s ease-in-out infinite;
}

.shape-5 {
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    border-bottom: 86px solid #FF6B8A;
    top: 45%;
    left: 5%;
    opacity: 0.06;
    animation: floatSlow 22s ease-in-out infinite;
}

.shape-6 {
    width: 140px;
    height: 90px;
    background: #6B8AFF;
    top: 55%;
    right: 8%;
    opacity: 0.08;
    animation: floatMedium 20s ease-in-out infinite reverse;
}

.shape-7 {
    width: 200px;
    height: 200px;
    background: #8AFF6B;
    top: 60%;
    left: 15%;
    opacity: 0.06;
    animation: floatSlow 28s ease-in-out infinite;
}

.shape-8 {
    border-left: 35px solid transparent;
    border-right: 35px solid transparent;
    border-bottom: 60px solid #C86BFF;
    top: 70%;
    right: 20%;
    opacity: 0.08;
    animation: floatMedium 16s ease-in-out infinite;
}

.shape-9 {
    width: 50px;
    height: 50px;
    background: #FF6B8A;
    top: 80%;
    left: 30%;
    opacity: 0.12;
    animation: floatSlow 19s ease-in-out infinite reverse;
}

.shape-10 {
    width: 100px;
    height: 60px;
    background: #6B8AFF;
    top: 85%;
    right: 25%;
    opacity: 0.07;
    animation: floatMedium 24s ease-in-out infinite;
}

.shape-11 {
    width: 70px;
    height: 70px;
    background: #C86BFF;
    top: 15%;
    left: 60%;
    opacity: 0.09;
    animation: floatSlow 17s ease-in-out infinite;
}

.shape-12 {
    border-left: 45px solid transparent;
    border-right: 45px solid transparent;
    border-bottom: 78px solid #8AFF6B;
    top: 40%;
    right: 35%;
    opacity: 0.05;
    animation: floatMedium 21s ease-in-out infinite reverse;
}

.shape-13 {
    width: 40px;
    height: 40px;
    background: #FF6B8A;
    top: 50%;
    left: 45%;
    opacity: 0.14;
    animation: floatSlow 14s ease-in-out infinite;
}

.shape-14 {
    width: 160px;
    height: 100px;
    background: #C86BFF;
    top: 75%;
    left: 5%;
    opacity: 0.06;
    animation: floatMedium 26s ease-in-out infinite;
}

.shape-15 {
    width: 80px;
    height: 80px;
    background: #6B8AFF;
    top: 90%;
    right: 12%;
    opacity: 0.1;
    animation: floatSlow 23s ease-in-out infinite reverse;
}

/* Float animations for shapes */
@keyframes floatSlow {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(15px, -20px) rotate(5deg); }
    50% { transform: translate(-10px, -35px) rotate(-3deg); }
    75% { transform: translate(20px, -15px) rotate(7deg); }
}

@keyframes floatMedium {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-20px, -25px) rotate(-5deg); }
    66% { transform: translate(15px, -40px) rotate(4deg); }
}

/* ---------- Foreground Accents ---------- */
.foreground-accents {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
    overflow: hidden;
}

.accent {
    position: absolute;
    border-radius: 50%;
    opacity: 0.05;
}

.accent-1 {
    width: 30px;
    height: 30px;
    background: #FF6B8A;
    top: 20%;
    left: 10%;
    animation: floatMedium 12s ease-in-out infinite;
}

.accent-2 {
    width: 20px;
    height: 20px;
    background: #8AFF6B;
    top: 50%;
    right: 8%;
    animation: floatSlow 16s ease-in-out infinite;
}

.accent-3 {
    width: 25px;
    height: 25px;
    background: #6B8AFF;
    top: 70%;
    left: 25%;
    animation: floatMedium 14s ease-in-out infinite reverse;
}

.accent-4 {
    width: 15px;
    height: 15px;
    background: #C86BFF;
    top: 85%;
    right: 30%;
    animation: floatSlow 18s ease-in-out infinite;
}

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

.glitch-overlay.glitch-active {
    animation: glitchFlash 60ms steps(2) forwards;
}

@keyframes glitchFlash {
    0% {
        opacity: 1;
        background: linear-gradient(
            transparent 0%,
            transparent 20%,
            rgba(255, 107, 138, 0.03) 20%,
            rgba(255, 107, 138, 0.03) 22%,
            transparent 22%,
            transparent 45%,
            rgba(107, 138, 255, 0.03) 45%,
            rgba(107, 138, 255, 0.03) 47%,
            transparent 47%,
            transparent 70%,
            rgba(138, 255, 107, 0.03) 70%,
            rgba(138, 255, 107, 0.03) 72%,
            transparent 72%,
            transparent 100%
        );
        transform: translateX(2px);
    }
    50% {
        opacity: 1;
        transform: translateX(-3px);
    }
    100% {
        opacity: 0;
        transform: translateX(0);
    }
}

/* ---------- Glitch Text Effect ---------- */
.glitch-text {
    text-shadow:
        2px 0 #FF6B8A,
        -2px 0 #6B8AFF;
    animation: glitchText 60ms steps(2) forwards;
}

@keyframes glitchText {
    0% {
        text-shadow: 2px 0 #FF6B8A, -2px 0 #6B8AFF;
        transform: translateX(2px);
    }
    50% {
        text-shadow: -2px 0 #FF6B8A, 2px 0 #6B8AFF;
        transform: translateX(-3px);
    }
    100% {
        text-shadow: none;
        transform: translateX(0);
    }
}

/* ---------- Hero Section ---------- */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    text-align: center;
}

.hero-content {
    max-width: 700px;
    padding: 0 2rem;
    position: relative;
}

.hero-title {
    font-family: 'Sora', sans-serif;
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 700;
    color: #F0F0FA;
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
    text-shadow:
        0 0 20px rgba(255, 107, 138, 0.4),
        0 0 40px rgba(255, 107, 138, 0.2),
        0 0 80px rgba(255, 107, 138, 0.1);
}

.hero-quote {
    font-family: 'Zilla Slab', serif;
    font-size: 1.15rem;
    font-weight: 500;
    color: #F0F0FA;
    opacity: 0.85;
    line-height: 1.8;
    max-width: 560px;
    margin: 0 auto;
}

/* ---------- Timeline Nodes ---------- */
.timeline-node {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.node-hero {
    bottom: 15%;
}

.node-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: relative;
}

.node-dot-pink {
    background: #FF6B8A;
    box-shadow:
        0 0 10px rgba(255, 107, 138, 0.6),
        0 0 20px rgba(255, 107, 138, 0.3),
        0 0 40px rgba(255, 107, 138, 0.15);
}

.node-dot-blue {
    background: #6B8AFF;
    box-shadow:
        0 0 10px rgba(107, 138, 255, 0.6),
        0 0 20px rgba(107, 138, 255, 0.3),
        0 0 40px rgba(107, 138, 255, 0.15);
}

.node-dot-lime {
    background: #8AFF6B;
    box-shadow:
        0 0 10px rgba(138, 255, 107, 0.6),
        0 0 20px rgba(138, 255, 107, 0.3),
        0 0 40px rgba(138, 255, 107, 0.15);
}

.node-dot-terminal {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, #FF6B8A, #6B8AFF, #8AFF6B);
    box-shadow:
        0 0 20px rgba(255, 107, 138, 0.5),
        0 0 40px rgba(107, 138, 255, 0.3),
        0 0 80px rgba(138, 255, 107, 0.15);
}

/* ---------- Node Branches ---------- */
.node-branch {
    position: absolute;
    top: 50%;
    height: 2px;
    width: 40px;
    transform: translateY(-50%);
}

.node-branch-left {
    right: 100%;
    margin-right: 6px;
    background: linear-gradient(to left, #6B8AFF, transparent);
}

.node-branch-right {
    left: 100%;
    margin-left: 6px;
    background: linear-gradient(to right, #8AFF6B, transparent);
}

/* ---------- Timeline Sections ---------- */
.timeline-section {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    z-index: 2;
    padding: 6rem 2rem;
}

.section-left {
    justify-content: flex-start;
}

.section-right {
    justify-content: flex-end;
}

.section-closing {
    justify-content: center;
    text-align: center;
    min-height: 60vh;
    flex-direction: column;
}

/* ---------- Node Content ---------- */
.node-content {
    max-width: 440px;
    padding: 2.5rem;
    border-radius: 12px;
    background: rgba(10, 10, 26, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(240, 240, 250, 0.06);
    position: relative;
}

.node-content-left {
    margin-left: 52%;
}

.node-content-right {
    margin-right: 52%;
}

/* Node glow effects */
.glow-blue {
    box-shadow:
        0 0 20px rgba(107, 138, 255, 0.15),
        0 0 40px rgba(107, 138, 255, 0.08),
        0 0 80px rgba(107, 138, 255, 0.03);
    border-color: rgba(107, 138, 255, 0.15);
}

.glow-lime {
    box-shadow:
        0 0 20px rgba(138, 255, 107, 0.15),
        0 0 40px rgba(138, 255, 107, 0.08),
        0 0 80px rgba(138, 255, 107, 0.03);
    border-color: rgba(138, 255, 107, 0.15);
}

/* ---------- Node Typography ---------- */
.node-heading {
    font-family: 'Sora', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: #F0F0FA;
    margin-bottom: 1.25rem;
    letter-spacing: -0.01em;
}

.node-body {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    color: #F0F0FA;
    opacity: 0.8;
    line-height: 1.75;
    margin-bottom: 1rem;
}

.node-body:last-child {
    margin-bottom: 0;
}

.node-pullquote {
    font-family: 'Zilla Slab', serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: #C86BFF;
    line-height: 1.6;
    border-left: 3px solid #C86BFF;
    padding-left: 1.25rem;
    margin-bottom: 1.5rem;
    font-style: italic;
}

/* ---------- Closing Section ---------- */
.closing-content {
    position: relative;
    z-index: 2;
    margin-top: 3rem;
}

.closing-title {
    font-family: 'Sora', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(90deg, #FF6B8A, #6B8AFF, #8AFF6B, #C86BFF);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: rainbowShift 6s ease-in-out infinite;
    margin-bottom: 0.75rem;
    text-shadow: none;
}

.closing-tagline {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: #F0F0FA;
    opacity: 0.6;
}

@keyframes rainbowShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ---------- Node positioning for left/right sections ---------- */
.section-left .timeline-node {
    top: 50%;
    transform: translate(-50%, -50%);
}

.section-right .timeline-node {
    top: 50%;
    transform: translate(-50%, -50%);
}

.section-closing .timeline-node {
    position: relative;
    left: auto;
    transform: none;
    display: flex;
    justify-content: center;
}

/* ---------- Scroll reveal animation ---------- */
.node-content {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.closing-content {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .timeline-spine {
        left: 24px;
    }

    .node-content-left,
    .node-content-right {
        margin-left: 56px;
        margin-right: 1rem;
        max-width: calc(100% - 72px);
    }

    .section-left,
    .section-right {
        justify-content: flex-start;
    }

    .section-left .timeline-node,
    .section-right .timeline-node {
        left: 24px;
    }

    .node-branch-left {
        display: none;
    }

    .node-branch-right {
        left: 100%;
    }

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

    .timeline-section {
        padding: 4rem 1rem;
    }
}
