/* Palette: #f1f5f9 #5eead4 #6b7280 #1f2937 #9ca3af #a78bfa #d1d5db #374151 #475569 #94a3b8 */
/* === Reset & Base === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', sans-serif;
    font-weight: 300;
    color: #374151;
    background: linear-gradient(180deg, #d1d5db 0%, #9ca3af 40%, #6b7280 80%, #374151 100%);
    min-height: 300vh;
    overflow-x: hidden;
    line-height: 1.75;
    font-size: clamp(1rem, 1.1vw, 1.2rem);
    position: relative;
}

a {
    color: #5eead4;
    text-decoration: none;
    border-bottom: 1px solid rgba(94, 234, 212, 0.4);
    transition: border-color 0.3s ease;
}

a:hover {
    border-color: #5eead4;
}

code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9em;
    background: rgba(107, 114, 128, 0.1);
    border-radius: 4px;
    padding: 2px 6px;
}

/* === Timeline SVG === */
#timeline-svg {
    position: fixed;
    left: 38%;
    top: 0;
    height: 100vh;
    width: 4px;
    pointer-events: none;
    z-index: 1;
}

/* === Hero === */
#hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

#hero-title {
    width: clamp(280px, 60vw, 600px);
    height: auto;
}

.hero-text {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: 96px;
    fill: #1f2937;
    letter-spacing: 0.02em;
}

.hero-subtitle {
    font-family: 'Caveat', cursive;
    font-weight: 400;
    font-size: 1.4rem;
    color: #6b7280;
    margin-top: 0.5rem;
    opacity: 0;
    animation: fadeIn 2s ease 1s forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* === Content === */
#content {
    position: relative;
    z-index: 2;
    padding-bottom: 10vh;
}

/* === Bubbles === */
.bubble {
    position: relative;
    max-width: 380px;
    background: rgba(241, 245, 249, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 24px;
    padding: 2rem 2.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    margin-bottom: 12vh;
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.bubble-right {
    margin-left: 42%;
}

.bubble-left {
    margin-left: 5%;
}

.bubble-label {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: 1.6rem;
    color: #1f2937;
    margin-bottom: 0.75rem;
}

.bubble p {
    margin-bottom: 0.75rem;
}

.bubble p:last-child {
    margin-bottom: 0;
}

.contact-hint {
    font-family: 'Caveat', cursive;
    font-weight: 400;
    font-size: 0.95rem;
    color: #6b7280;
    font-style: italic;
}

/* === Margin Notes === */
.margin-note {
    position: absolute;
    font-family: 'Caveat', cursive;
    font-weight: 400;
    font-size: 0.75rem;
    color: #6b7280;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0.7;
}

/* === Floating Bubble Particles === */
.bubble-particle {
    position: fixed;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(241, 245, 249, 0.6), rgba(148, 163, 184, 0.2));
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    pointer-events: none;
    z-index: 0;
    animation: float linear infinite;
}

@keyframes float {
    0% {
        transform: translateY(100vh) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 0.4;
    }
    90% {
        opacity: 0.4;
    }
    100% {
        transform: translateY(-120vh) scale(0.6);
        opacity: 0;
    }
}

/* === Watercolor Washes === */
.wash {
    position: absolute;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(ellipse, rgba(148, 163, 184, 0.15), transparent 70%);
    animation: pulse-wash ease-in-out infinite;
}

@keyframes pulse-wash {
    0%, 100% { opacity: 0.1; transform: scale(1); }
    50% { opacity: 0.18; transform: scale(1.05); }
}

.wash-1 {
    width: 400px; height: 350px;
    top: 80vh; left: 10%;
    border-radius: 42% 58% 63% 37% / 55% 45% 38% 62%;
    animation-duration: 14s;
}

.wash-2 {
    width: 300px; height: 280px;
    top: 140vh; right: 5%;
    border-radius: 55% 45% 38% 62% / 42% 58% 63% 37%;
    animation-duration: 16s;
}

.wash-3 {
    width: 500px; height: 400px;
    top: 200vh; left: 20%;
    border-radius: 38% 62% 55% 45% / 63% 37% 42% 58%;
    background: radial-gradient(ellipse, rgba(100, 116, 139, 0.1), transparent 70%);
    animation-duration: 18s;
}

.wash-4 {
    width: 250px; height: 220px;
    top: 50vh; right: 15%;
    border-radius: 60% 40% 45% 55% / 40% 60% 55% 45%;
    animation-duration: 12s;
}

.wash-5 {
    width: 350px; height: 300px;
    top: 260vh; left: 50%;
    border-radius: 45% 55% 40% 60% / 58% 42% 55% 45%;
    animation-duration: 15s;
}

/* === Infinity Loop Footer === */
#dissolve {
    height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

#infinity-loop {
    width: 120px;
    height: 60px;
}

#infinity-path {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    animation: draw-infinity 4s ease-in-out infinite alternate;
}

@keyframes draw-infinity {
    0% { stroke-dashoffset: 500; }
    100% { stroke-dashoffset: 0; }
}

/* === Timeline Nodes (JS-generated) === */
.timeline-node {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #94a3b8;
    border: 2px solid #475569;
    left: calc(38% - 4px);
    z-index: 3;
    transition: background 0.4s ease;
}

.timeline-node.active {
    background: #a78bfa;
    border-color: #a78bfa;
}

/* === Connector Lines (JS-generated) === */
.connector-line {
    position: absolute;
    height: 2px;
    background: #475569;
    z-index: 2;
    transform-origin: left center;
    opacity: 0;
    transition: opacity 0.6s ease 0.2s;
}

.connector-line.visible {
    opacity: 1;
}

/* === Responsive === */
@media (max-width: 768px) {
    #timeline-svg {
        left: 12%;
    }

    .bubble-right,
    .bubble-left {
        margin-left: 20%;
        margin-right: 5%;
        max-width: 75vw;
    }

    .timeline-node {
        left: calc(12% - 4px);
    }

    .hero-text {
        font-size: 64px;
    }
}
