:root {
    --color-dark-bg: #1a0f14;
    /* Deep Burgundy / Dark Night */
    --color-light-bg: #fffbf7;
    /* Soft White / Peach */
    --color-text-light: #f5ebe6;
    --color-text-dark: #2c2420;
    --color-accent: #e8a598;

    --font-main: 'Gowun Dodum', sans-serif;
    --font-mono: 'Roboto Mono', monospace;

    --line-width: 2px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body,
html {
    width: 100%;
    font-family: var(--font-main);
    background-color: var(--color-dark-bg);
    color: var(--color-text-light);
    overflow-x: hidden;
    scroll-behavior: smooth;
    transition: background-color 1s ease, color 1s ease;
}

/* Background Transition Classes applied via JS */
body.is-light {
    background-color: var(--color-light-bg);
    color: var(--color-text-dark);
}

/* The Continuous Center Line */
.center-line {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: var(--line-width);
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.1);
    z-index: 10;
    pointer-events: none;
}

body.is-light .center-line {
    background-color: rgba(0, 0, 0, 0.05);
}

.line-progress {
    width: 100%;
    height: 0%;
    background: linear-gradient(to bottom, transparent, var(--color-accent), #ffd1b3);
    box-shadow: 0 0 15px var(--color-accent);
    transition: height 0.1s ease-out;
}

body.is-light .line-progress {
    background: linear-gradient(to bottom, #ffd1b3, var(--color-accent), transparent);
    box-shadow: none;
}

/* Sections */
.scrolly-section {
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 100px 20px;
    z-index: 20;
}

.content-wrapper {
    max-width: 1200px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Typography */
h1 {
    font-size: 5rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

h2 {
    font-size: 3rem;
    font-weight: 400;
    letter-spacing: 0.2em;
    margin-bottom: 2rem;
    text-transform: uppercase;
}

.subtitle {
    font-size: 1.2rem;
    letter-spacing: 0.3em;
    opacity: 0.6;
    text-transform: uppercase;
}

.desc {
    font-size: 1.5rem;
    margin-top: 2rem;
    font-weight: 400;
}

.mono-data {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    opacity: 0.7;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.mono-data.lg {
    font-size: 1.5rem;
}

/* Specific Section Styles */

/* Section 1: Origin */
.pulse-circle {
    width: 10px;
    height: 10px;
    background-color: var(--color-accent);
    border-radius: 50%;
    margin-top: 4rem;
    box-shadow: 0 0 20px 10px rgba(232, 165, 152, 0.2);
    animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
        box-shadow: 0 0 0 0 rgba(232, 165, 152, 0.4);
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
        box-shadow: 0 0 20px 10px rgba(232, 165, 152, 0);
    }

    100% {
        transform: scale(0.8);
        opacity: 0.5;
        box-shadow: 0 0 0 0 rgba(232, 165, 152, 0);
    }
}

/* Section 2: Forming */
.abstract-shape {
    width: 150px;
    height: 150px;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    background: linear-gradient(45deg, var(--color-accent), transparent);
    animation: morph 8s infinite linear;
    opacity: 0.8;
}

@keyframes morph {

    0%,
    100% {
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    }

    34% {
        border-radius: 70% 30% 50% 50% / 30% 30% 70% 70%;
    }

    67% {
        border-radius: 100% 60% 60% 100% / 100% 100% 60% 60%;
    }
}

/* Section 3: Crossover */
.crossover-point {
    min-height: 120vh;
    /* Extra scroll space for dramatic effect */
}

.huge-text-wrapper {
    position: sticky;
    top: 50%;
    transform: translateY(-50%);
}

.huge-text {
    font-size: 8vw;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 2rem;
    background: linear-gradient(90deg, #2c2420, var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.birth-details {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
    font-family: var(--font-mono);
    font-size: 1.2rem;
}

.separator {
    color: var(--color-accent);
}

/* Section 4: Expanding */
.timeline-wrapper {
    margin-top: 10vh;
}

.timeline-item {
    display: flex;
    align-items: center;
    margin: 10vh 0;
    width: 100%;
    max-width: 900px;
    gap: 4rem;
}

.timeline-item.left {
    flex-direction: row;
}

.timeline-item.right {
    flex-direction: row-reverse;
}

.timeline-img {
    width: 50%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    object-fit: cover;
    mix-blend-mode: multiply;
    /* Artistic effect in light mode */
    filter: grayscale(20%) sepia(10%);
}

.timeline-data {
    width: 50%;
    text-align: left;
    padding: 2rem;
    border-left: 1px solid rgba(0, 0, 0, 0.1);
}

.timeline-item.right .timeline-data {
    text-align: right;
    border-left: none;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
}

/* Section 5: Now */
.counter-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 4rem 0;
}

.huge-counter {
    font-size: 10rem;
    font-family: var(--font-mono);
    font-weight: 700;
    line-height: 1;
    color: var(--color-accent);
}

.video-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
}

.video-placeholder {
    width: 100%;
    display: block;
    filter: brightness(1.1) contrast(1.1);
}

.floating-data {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.8);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    backdrop-filter: blur(5px);
}

/* Section 6: Contact */
.contact-form-container {
    width: 100%;
    max-width: 500px;
    background: rgba(255, 255, 255, 0.5);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-family: var(--font-mono);
    color: var(--color-text-dark);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    font-family: var(--font-main);
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.8);
    transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--color-accent);
}

.contact-form textarea {
    min-height: 120px;
    resize: vertical;
}

.contact-form .submit-btn {
    width: 100%;
    padding: 15px;
    background-color: var(--color-text-dark);
    color: var(--color-light-bg);
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-family: var(--font-main);
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

.contact-form .submit-btn:hover {
    background-color: var(--color-accent);
}

.contact-form .submit-btn:active {
    transform: scale(0.98);
}

/* Animations Triggered by Observers */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 1.5s ease-out, transform 1.5s cubic-bezier(0.1, 1, 0.2, 1);
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

.delay-1 {
    transition-delay: 0.2s;
}

.delay-2 {
    transition-delay: 0.4s;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    h1 {
        font-size: 3rem;
    }

    .huge-text {
        font-size: 12vw;
    }

    .huge-counter {
        font-size: 6rem;
    }

    .timeline-item {
        flex-direction: column !important;
        gap: 2rem;
    }

    .timeline-img,
    .timeline-data {
        width: 100%;
    }

    .timeline-data,
    .timeline-item.right .timeline-data {
        text-align: center;
        border: none;
        padding: 0;
    }
}