/* Core/shared rules were moved to css/utils.css — keep timeline styles
   focused on timeline-specific components (meme overlay, progress bar,
   timeline items, etc.). Include utils.css in pages that need the shared
   baseline styles. */

/* Timeline-specific styles (moved shared parts to css/utils.css) */

.timeline-component{
    flex-direction: column;
    justify-content: center;
    align-items: center;
    max-width: 1120px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    position: relative
}

.timeline-item{
    z-index: 2;
    grid-column-gap: 0px;
    grid-row-gap: 0px;
    grid-template-rows: auto;
    grid-template-columns: 1fr 20vh 1fr;
    grid-auto-columns: 1fr;
    padding-top: 80px;
    padding-bottom: 80px;
    display: grid;
    position: relative;
}

.timeline-left{
    text-align: right;
    justify-content: flex-end;
    align-items: stretch;
}

.timeline-center{
    justify-content: center;
    display: flex;
}

.timeline-date-text{
    color: white;
    letter-spacing: -0.03em;
    font-size: 6vh;
    font-weight: 600;
    line-height: 1.2;
    position: sticky;
    top: 50vh;
}

/* Lift only the timeline bar and items upward while keeping the heading spacing unchanged */
.timeline-component{
    margin-top: -40px; /* adjust this value to move the bar up more/less */
}


.timeline-text{
    color: white;
    /* slightly smaller for improved density on large screens */
    font-size: 2vh;
    font-weight: 500;
    line-height: 1.3;
}

/* Ensure the reveal button on the timeline page matches Research page
   dark-mode styling exactly. Scope to non-light-mode so light-mode rules
   (in css/light_mode.css) still apply when the user enables light mode. */
body:not(.light-mode) #meme-wrapper .reveal-btn{
    background: rgba(255,255,255,0.06) !important;
    color: #ffffff !important;
    border: 2px solid transparent !important;
    padding: 0.6rem 1rem !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em !important;
}

body:not(.light-mode) #meme-wrapper .reveal-btn:focus,
body:not(.light-mode) #meme-wrapper .reveal-btn:hover{
    box-shadow: 0 0 0.2rem rgba(254, 218, 74, 0.8) !important;
    background: rgba(160, 138, 65, 0.179) !important;
    transition: transform 0.15s ease, background 0.3s ease, box-shadow 0.3s ease, border 0.15s ease !important;
}

/* Dark-mode: make the meme overlay dimmer and add a subtle blur so the
   revealed image stands out less before the user clicks. Scoped to non-
   light-mode so light-mode overlay remains unchanged. */
body:not(.light-mode) #meme-wrapper .meme-overlay{
    background: rgba(0,0,0,0.78) !important; /* stronger dim */
    backdrop-filter: blur(3px) !important;
    -webkit-backdrop-filter: blur(3px) !important;
    transition: background 220ms ease, backdrop-filter 220ms ease;
}

.timeline-circle{
    background-color: white;
    border-radius: 100%;
    width: 1.5vh;
    min-width: 1.5vh;
    max-width: 1.5vh;
    height: 1.5vh;
    min-height: 1.5vh;
    max-height: 1.5vh;
    position: sticky;
    top: 50vh;
    box-shadow: 0 0 0 4px black;    
}

.timeline-progress{
    z-index: -2;
    background-color: #414144;
    width: 3px;
    height: 100%;
    position: absolute;
}

.timeline-progress-bar{
    z-index: -1;
    /* Inverted gradient: start with the richer pink at the top, transition to gold
       so the progress bar appears to 'fill' from warm pink down to gold. */
    background: #ee0979;
    background: -webkit-linear-gradient(to bottom, #ee0979, gold);
    background: linear-gradient(to bottom, #ee0979, gold);
    width: 3px;
    height: 50%;
    position: fixed;
    inset: 0 auto 50vh;
}

.section-timeline{
    z-index: -3;
    background-color: black;
    position: relative;
}

/* Heading division: keep heading text centered, ensure background is black
   and sit nearer to the top of the page (override the larger global padding). */
.section-timeline-heading{
    background-color: black;
    text-align: center;
    position: relative;
    top: 0;
}

.section-timeline-heading .padding-vertical-xlarge{
    /* reduce vertical padding so the heading sits closer to the fixed header */
    padding-top: 80px;
    padding-bottom: 60px;
    margin-top: 0;
}

.margin-bottom-xlarge{
    margin-bottom: 40px;
}

.timeline_link{
    opacity: 0.6;
    color: white;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    border-radius: 8px;
    align-items: center;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none;
    transition: opacity 0.3s;
    display:flex;   
}

.timeline_link:hover{
    opacity: 1;
}

.link-icon{
    width: 12px;
    height: 12px;
    margin-left: 8px;
}

.inline-block{
    display: inline-block;
}

.text-color-lightgrey{
    color: #ffffffa6;
}

.overlay-fade-top{
    background-image: linear-gradient(black, #0a0a0a00);
    height: 80px;
    position: absolute;
    inset: 0% 0% auto;
}

.overlay-fade-bottom{
    background-image: linear-gradient(black, #0a0a0a00);
    height: 80px;
    position: absolute;
    inset: 0% 0% auto;
}


@media screen and (max-width: 768px){
    h2{font-size: 40px;}
    .paragraph-large{font-size: 18px;}
    .padding-vertical-xlarge{
        padding-top: 80px;
        padding-bottom: 50px;
    }
    .timeline-item{
        grid-template-columns: 64px 1fr;
        width: 100%
    }

    .timeline-left{
        text-align: left;
        grid-area: 1/2/2/3;
    }

    .timeline-center{
        justify-content: flex-start;
        grid-area: 1/1/3/2;
    }

    .timeline-right{
        grid-area: span 1 / span 1 / span 1 / span 1;
    }

    .timeline-date-text{
        margin-bottom: 24px;
        font-size: 36px;
    }

    .timeline-text{
        /* slightly reduced on small screens for better fit */
        font-size: 15px;
    }

    .timeline-progress{
        left: 4.5px;
    }

    /* Mobile nav: slide-in panel and open-state matching global styles */
    .hamburger { display: block; position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); }

    header nav {
        display: flex;
        flex-direction: column;
        position: absolute;
        right: 0;
        top: 100%;
        left: auto;
        width: 85%;
        max-width: 360px;
          /* inherit the shared/mobile nav background so timeline matches Research
              (do not force a nearly-transparent background here). */
          background: inherit;
        backdrop-filter: blur(8px);
        padding: 1rem;
        gap: 0.5rem;
        box-shadow: 0 8px 24px rgba(0,0,0,0.6);
        z-index: 49;
        transform: translateX(110%);
        opacity: 0;
        pointer-events: none;
        transition: transform 280ms cubic-bezier(.2,.9,.2,1), opacity 220ms ease;
    }

    /* Ensure the open-state mirrors the global mobile layout (small nudge to the right) */
     /* Match Research page: keep the mobile open nav visually frosted but
         without the heavy shadow or near-opaque background. This mirrors the
         Research page behavior and keeps the nav panel readable while
         preserving interactivity. */
     header.nav-open nav { transform: translateX(15px); opacity: 1; pointer-events: auto; box-shadow: none !important; }
     header.nav-open { background-color: rgba(0, 0, 0, 0.857); backdrop-filter: blur(6px); z-index: 1000; }
    /* Let the nav background be provided by shared/global rules (matches Research). */
    header.nav-open nav { background: inherit; transition: background 220ms ease, backdrop-filter 220ms ease; z-index: 1001; }

    /* When nav open, push floating audio controls (if present) underneath */
    header.nav-open ~ #audio-controls,
    header.nav-open ~ .page-wrapper #audio-controls {
        z-index: 20;
        pointer-events: none;
        transition: z-index 120ms ease;
    }

    .margin-bottom-xlarge{
        margin-bottom: 48px;
    }
}

/* Ensure consistent mobile heading size across timeline, repositories, publications, research */
@media (max-width: 520px) {
    h2.intro-heading,
    h2 { font-size: 5.2vh !important; }

    /* Ensure dark-mode mobile open nav matches Research page behavior exactly: 
       use the same frosted translucent backgrounds and remove heavy shadows. */
    body:not(.light-mode) header.nav-open nav{
        transform: translateX(15px) !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        box-shadow: none !important;
        background: rgba(0, 0, 0, 0.956) !important;
    }
    body:not(.light-mode) header.nav-open{
        background-color: rgba(0,0,0,0.42) !important;
        backdrop-filter: blur(6px) !important;
        z-index: 1000 !important;
    }

/* Timeline page: make the header visually whiter on desktop so it reads as a
   lighter frosted bar for this page specifically. Keep this scoped to
   desktop to avoid mobile stacking changes and preserve functionality. */
@media (min-width: 769px) {
    header{
        background-color: rgba(255,255,255,0.16) !important; /* subtle white tint */
        backdrop-filter: blur(8px) !important;
        color: #111 !important;
    }
    /* Ensure nav links and the theme toggle are readable against the whiter header */
    header nav a{ color: #111 !important; }
    header .theme-toggle{ background: rgba(0,0,0,0.04) !important; color: #111 !important; border-color: rgba(0,0,0,0.06) !important; }
}
}
