html {
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

body {
    background: #0a0a0a;
    color: white;
    overflow-x: hidden;
}

/* Let timeline markers behind header be clickable */
.site-header {
    pointer-events: none;
}

.site-header > * {
    pointer-events: auto;
}

/* Center nav on desktop timeline */
.site-header .header-right {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.timeline-nav {
    position: fixed;
    right: 4rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
}

.timeline-track {
    width: 4px;
    height: 90vh;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    position: relative;
}

.timeline-indicator {
    position: absolute;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: #d4a017;
    border-radius: 50%;
    box-shadow: 0 0 20px #d4a017;
    transition: top 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 2px;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-marker.active {
    width: 20px;
    background: #d4a017;
    box-shadow: 0 0 10px #d4a017;
}

.year-label {
    position: absolute;
    right: 30px;
    top: -10px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.timeline-marker.active .year-label {
    color: #d4a017;
    font-size: 1.4rem;
    text-shadow: 0 0 10px #d4a017;
    font-weight: 700;
}

/* Month ticks between year markers */
.timeline-month-tick {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.timeline-month-tick.has-events {
    width: 8px;
    background: rgba(255, 255, 255, 0.25);
}

.year-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem;
    position: relative;
    opacity: 0.3;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.year-section.active {
    opacity: 1;
}

.year-content {
    max-width: 800px;
    transform: translateX(-100px);
    transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 1s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}

.year-section.active .year-content {
    transform: translateX(0);
    opacity: 1;
}

.year-title {
    font-size: 6rem;
    font-weight: 900;
    color: #d4a017;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.6);
    margin-bottom: 1rem;
    line-height: 1;
    transition: font-size 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.year-section.active .year-title {
    font-size: 8rem;
    transform: scale(1.05);
}

/* Moments button on year sections */
.moments-btn {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.6rem 1.4rem;
    background: transparent;
    border: 1px solid rgba(212, 160, 23, 0.4);
    color: rgba(212, 160, 23, 0.7);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.moments-btn:hover {
    border-color: #d4a017;
    color: #d4a017;
    box-shadow: 0 0 15px rgba(212, 160, 23, 0.2);
}

/* Moments slide-over panel */
.moments-panel {
    position: fixed;
    inset: 0;
    z-index: 2000;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s 0.4s, opacity 0.4s ease;
}

.moments-panel.open {
    visibility: visible;
    opacity: 1;
    transition: visibility 0s, opacity 0.4s ease;
}

.moments-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.moments-panel-inner {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: min(600px, 85vw);
    background: #111;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    padding: 3rem 2.5rem;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.moments-panel.open .moments-panel-inner {
    transform: translateX(0);
}

.moments-panel-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.8rem;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

.moments-panel-close:hover {
    color: white;
}

.moments-panel-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 2.5rem;
}

/* Month groups within panel */
.month-group {
    display: grid;
    grid-template-columns: 50px 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.month-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.25);
    letter-spacing: 0.1em;
    padding-top: 0.3rem;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.month-events {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.moment-card {
    padding-bottom: 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.moment-card:last-child {
    border-bottom: none;
}

.moment-title {
    font-size: 1rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 0.2rem;
}

.moment-date {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 0.4rem;
    letter-spacing: 0.03em;
}

.moment-desc {
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.45);
}

.moment-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 3px;
    margin-top: 0.75rem;
    border-radius: 4px;
    overflow: hidden;
}

.moment-photos img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    cursor: pointer;
    transition: opacity 0.2s ease;
    display: block;
}

.moment-photos img:hover {
    opacity: 0.7;
}

.year-description {
    font-size: 1.5rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
}

.year-details {
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.6);
}

/* Background hero image */
.year-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
    opacity: 0;
    transition: opacity 1.2s ease;
}

.year-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(10, 10, 10, 0.4) 0%,
        rgba(10, 10, 10, 0.7) 50%,
        rgba(10, 10, 10, 0.95) 100%
    );
}

.year-section.active .year-bg {
    opacity: 1;
}

.year-section .year-content {
    position: relative;
    z-index: 1;
}

/* Fullscreen photo grid section */
.photo-grid-section {
    min-height: 100vh;
    padding: 2rem;
    padding-right: 6rem;
    position: relative;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    flex-direction: column;
}

.photo-grid-section .grid-heading {
    font-size: 1.2rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 4px;
    flex: 1;
}

.photo-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: opacity 0.3s ease;
    display: block;
}

.photo-grid img:hover {
    opacity: 0.75;
}

/* Gallery toggle button */
.gallery-toggle {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}

.gallery-toggle:hover {
    border-color: rgba(255, 255, 255, 0.4);
    color: rgba(255, 255, 255, 0.8);
}

.scroll-hint {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    animation: bounce 2s infinite;
    z-index: 100;
    transition: opacity 0.5s ease;
}

@keyframes bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(10px);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .site-header .header-right {
        position: static;
        transform: none;
    }

    .timeline-nav {
        right: 1rem;
        top: 55%;
        transform: translateY(-50%);
    }

    .timeline-track {
        height: 80vh;
    }

    .year-section {
        padding: 2rem;
    }

    .year-content {
        max-width: 400px;
        padding-right: 3.5rem;
    }

    .year-title {
        font-size: 4rem;
    }

    .year-section.active .year-title {
        font-size: 5rem;
    }

    .moments-panel-inner {
        width: 100vw;
        padding: 2rem 1.5rem;
    }

    .month-group {
        grid-template-columns: 35px 1fr;
        gap: 1rem;
    }

    .year-description {
        font-size: 1.2rem;
    }

    .year-details {
        font-size: 1rem;
    }

    .photo-grid-section {
        padding-right: 3rem;
    }

    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .lightbox-main img {
        max-width: 90vw;
        max-height: 60vh;
    }

    .lightbox-nav {
        width: 50px;
        min-width: 40px;
        font-size: 1.8rem;
    }

    .lightbox-info {
        padding: 1rem 1.5rem;
    }
}

/* KRC mode */
body.krc-mode .home-logo img {
    filter: brightness(0) saturate(100%) invert(24%) sepia(95%) saturate(2000%) hue-rotate(345deg) brightness(95%) contrast(90%);
}

body.krc-mode .year-title {
    color: #e92b2b !important;
}

body.krc-mode .timeline-track {
    background: rgba(0, 0, 0, 0.6);
}

body.krc-mode .timeline-indicator {
    background: #e92b2b;
    box-shadow: 0 0 20px #e92b2b;
}

body.krc-mode .timeline-marker {
    background: rgba(0, 0, 0, 0.5);
}

body.krc-mode .timeline-marker.active {
    background: #e92b2b;
    box-shadow: 0 0 10px #e92b2b;
}

body.krc-mode .gallery-toggle {
    border-color: rgba(233, 43, 43, 0.3);
    color: rgba(233, 43, 43, 0.5);
}

body.krc-mode .gallery-toggle:hover {
    border-color: rgba(233, 43, 43, 0.6);
    color: rgba(233, 43, 43, 0.8);
}

body.krc-mode .moments-btn {
    border-color: rgba(233, 43, 43, 0.4);
    color: rgba(233, 43, 43, 0.7);
}

body.krc-mode .moments-btn:hover {
    border-color: #e92b2b;
    color: #e92b2b;
    box-shadow: 0 0 15px rgba(233, 43, 43, 0.2);
}

body.krc-mode .timeline-month-tick {
    background: rgba(233, 43, 43, 0.1);
}

body.krc-mode .timeline-month-tick.has-events {
    background: rgba(233, 43, 43, 0.3);
}

body.krc-mode .year-label {
    color: rgba(0, 0, 0, 0.4);
}

body.krc-mode .timeline-marker.active .year-label {
    color: #e92b2b;
    text-shadow: 0 0 10px rgba(233, 43, 43, 0.5);
}


/* BTG mode */
body.btg-mode .home-logo img {
    filter: brightness(0) invert(0.63);
}

body.btg-mode .year-title {
    color: #a0a0a0 !important;
}

body.btg-mode .timeline-track {
    background: rgba(49, 49, 49, 0.6);
}

body.btg-mode .timeline-indicator {
    background: #a0a0a0;
    box-shadow: 0 0 20px rgba(160, 160, 160, 0.5);
}

body.btg-mode .timeline-marker {
    background: rgba(49, 49, 49, 0.5);
}

body.btg-mode .timeline-marker.active {
    background: #a0a0a0;
    box-shadow: 0 0 10px rgba(160, 160, 160, 0.4);
}

body.btg-mode .gallery-toggle {
    border-color: rgba(160, 160, 160, 0.2);
    color: rgba(160, 160, 160, 0.4);
}

body.btg-mode .gallery-toggle:hover {
    border-color: rgba(160, 160, 160, 0.4);
    color: rgba(160, 160, 160, 0.7);
}

body.btg-mode .moments-btn {
    border-color: rgba(160, 160, 160, 0.3);
    color: rgba(160, 160, 160, 0.6);
}

body.btg-mode .moments-btn:hover {
    border-color: #a0a0a0;
    color: #a0a0a0;
    box-shadow: 0 0 15px rgba(160, 160, 160, 0.15);
}

body.btg-mode .timeline-month-tick {
    background: rgba(160, 160, 160, 0.1);
}

body.btg-mode .timeline-month-tick.has-events {
    background: rgba(160, 160, 160, 0.3);
}

body.btg-mode .year-label {
    color: rgba(49, 49, 49, 0.5);
}

body.btg-mode .timeline-marker.active .year-label {
    color: #a0a0a0;
    text-shadow: 0 0 10px rgba(160, 160, 160, 0.4);
}


body.btg-mode .year-description {
    color: rgba(160, 160, 160, 0.7);
}

body.btg-mode .year-details {
    color: rgba(160, 160, 160, 0.5);
}

body.krc-mode .header-right .nav-link {
    color: rgba(233, 43, 43, 0.4);
}

body.krc-mode .header-right .nav-link:hover {
    color: #e92b2b;
}

body.krc-mode .header-right .nav-link.active {
    color: #e92b2b;
    border-color: #e92b2b;
}

body.btg-mode .header-right .nav-link {
    color: rgba(160, 160, 160, 0.5);
}

body.btg-mode .header-right .nav-link:hover {
    color: #a0a0a0;
}

body.btg-mode .header-right .nav-link.active {
    color: #a0a0a0;
    border-color: #a0a0a0;
}

body.btg-mode .scroll-hint {
    color: rgba(160, 160, 160, 0.5);
}
