:root {
    --spine-color: rgba(255, 77, 109, 0.4);
    --spine-width: 4px;
    --nav-width: 80px;
    --side-rail-width: 250px;
    --neon-red: #ff4d6d;
    --neon-teal: #00f5d4;
}

/* Entrance Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.timeline-container {
    background: #0a0b0e;
    min-height: 100vh;
    padding-top: 120px;
    padding-bottom: 200px;
    color: #fff;
}

/* ============================================================
   COLUMN A: QUICK NAV INDEX (FAR RIGHT — GOOGLE PHOTOS STYLE)
   ============================================================ */
.timeline-quick-nav {
    position: fixed;
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    z-index: 1000;
}

.timeline-quick-nav::before {
    content: '';
    position: absolute;
    left: -10px;
    top: -50vh;
    bottom: -50vh;
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.05), transparent);
    z-index: -1;
}

.nav-year-marker {
    background: transparent !important;
    border: none !important;
    color: #ffffff !important; /* Force Pure White */
    font-size: 1.2rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 8px 0;
    opacity: 1 !important;
}

.nav-year-marker:hover,
.nav-year-marker.active {
    color: var(--neon-red) !important;
}

.nav-year-group {
    display: flex;
    flex-direction: column;
    animation: slideInLeft 0.8s cubic-bezier(0.2, 1, 0.3, 1) both;
}

/* Stagger Logic for Entrance */
.nav-year-group:nth-child(1) { animation-delay: 0.1s; }
.nav-year-group:nth-child(2) { animation-delay: 0.15s; }
.nav-year-group:nth-child(3) { animation-delay: 0.2s; }
.nav-year-group:nth-child(4) { animation-delay: 0.25s; }
.nav-year-group:nth-child(5) { animation-delay: 0.3s; }
.nav-year-group:nth-child(6) { animation-delay: 0.35s; }
.nav-year-group:nth-child(7) { animation-delay: 0.4s; }
.nav-year-group:nth-child(n+8) { animation-delay: 0.5s; }

.nav-months-list {
    display: none !important; /* HARD HIDE BY DEFAULT */
    flex-direction: column;
    padding-left: 15px;
    margin-top: 5px;
    margin-bottom: 15px;
}

.nav-year-group:hover .nav-months-list {
    display: flex !important; /* SHOW ONLY ON HOVER */
}

.nav-month-item {
    color: #ffffff !important; /* Force Pure White */
    opacity: 0.7 !important;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 5px 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-month-item:hover,
.nav-month-item.active {
    opacity: 1 !important;
    color: var(--neon-red) !important;
}

/* Dots removed per user request */

/* ============================================================
   COLUMN B & C: THE WRAPPER
   ============================================================ */
.timeline-viewport {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 40px 0 150px; /* Increased left space for nav */
    position: relative;
}

/* THE CONTINUOUS SPINE (LINE) */
.timeline-viewport::before {
    content: '';
    position: absolute;
    left: 400px; /* 150px padding + 250px side rail */
    top: 0;
    bottom: 0;
    width: var(--spine-width);
    background: var(--spine-color);
    box-shadow: 0 0 15px rgba(255, 77, 109, 0.2);
    z-index: 1;
}

.events-stream {
    display: flex;
    flex-direction: column;
    gap: 150px;
}

.month-section {
    scroll-margin-top: 150px;
    display: grid;
    grid-template-columns: var(--side-rail-width) 1fr;
    gap: 40px;
    position: relative;
}

/* THE SCOPED RAIL SECTION */
.section-sticky-rail {
    position: relative;
    /* Removed border-right to use the continuous viewport line instead */
}

.sticky-month-box {
    position: sticky;
    top: 150px;
    height: fit-content;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* Force children to the right edge */
    padding-right: 60px; /* Gap from the line */
    width: 100%;
}

.sticky-year-label {
    font-size: 1rem;
    font-weight: 800;
    color: rgba(255,255,255,0.4);
    margin: 0 0 5px 0;
    line-height: 1;
    text-align: right;
}

.sticky-month-name {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 2.8rem;
    line-height: 1;
    color: #fff;
    text-transform: uppercase;
    margin: 0;
    letter-spacing: -0.02em;
    opacity: 0.1;
    transition: all 0.5s ease;
    text-align: right;
}

.sticky-month-box.active .sticky-month-name {
    opacity: 1;
    color: var(--neon-red);
    text-shadow: 0 0 40px rgba(255, 77, 109, 0.4);
}

.sticky-year-label {
    display: block;
}

/* THE VERTICAL SPINE MARKERS */
.spine-node {
    position: absolute;
    right: -8px;
    width: 12px;
    height: 12px;
    background: #fff;
    border: 3px solid var(--neon-red);
    border-radius: 50%;
    top: 170px;
    box-shadow: 0 0 15px var(--neon-red);
}

/* ============================================================
   CONTENT GRID (COMPACT)
   ============================================================ */
.events-stream {
    display: flex;
    flex-direction: column;
    gap: 150px;
}

.month-section {
    scroll-margin-top: 150px;
    display: grid;
    grid-template-columns: var(--side-rail-width) 1fr;
    gap: 40px;
    position: relative;
}

.compact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.timeline-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.2, 1, 0.3, 1), 
                opacity 0.3s cubic-bezier(0.2, 1, 0.3, 1),
                background 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    will-change: transform, opacity;
}

.timeline-card:hover {
    transform: translateY(-5px);
    border-color: var(--neon-red);
    background: rgba(255, 255, 255, 0.06);
}

.card-img-wrap {
    height: 150px;
    /* Reduced height */
    overflow: hidden;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-body {
    padding: 20px;
}

.card-date {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--neon-teal);
    margin-bottom: 8px;
}

.timeline-header {
    display: grid;
    grid-template-columns: var(--side-rail-width) 1fr;
    gap: 40px;
    margin-bottom: 80px;
    position: relative;
    z-index: 10;
}

.timeline-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 35px;
    animation: fadeInUp 1s cubic-bezier(0.2, 1, 0.3, 1) both;
    animation-delay: 0.2s;
}

.filter-pill {
    padding: 10px 22px;
    border-radius: 40px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.filter-pill:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.filter-pill.active {
    background: var(--neon-red);
    color: #fff;
    border-color: var(--neon-red);
    box-shadow: 0 0 20px rgba(255, 77, 109, 0.3);
}

.timeline-header > .reveal {
    grid-column: 2; /* Push content to the right of the spine */
}

.card-title {
    font-size: 1.1rem;
    /* Smaller font */
    font-weight: 800;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 15px;
}

.card-link {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--neon-red);
    text-transform: uppercase;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1200px) {
    .timeline-viewport {
        padding: 0 20px;
    }

    .month-section {
        grid-template-columns: 1fr;
    }

    .section-sticky-rail {
        display: none;
    }

    .timeline-viewport::before {
        display: none; /* Hide spine on mobile */
    }

    .timeline-header .reveal {
        animation: fadeInUp 1.2s cubic-bezier(0.2, 1, 0.3, 1) both;
    }

    .timeline-quick-nav {
        display: none;
    }
}

/* Scroll-Spy Reveal */
.month-section,
.timeline-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s cubic-bezier(0.2, 1, 0.3, 1), transform 1s cubic-bezier(0.2, 1, 0.3, 1);
}

.month-section.revealed,
.timeline-card.revealed {
    opacity: 1;
    transform: translateY(0);
}