/* ============================================================
   GPRS TIMELINE — Styles
   ============================================================
   Purpose:  Timeline page + lightbox slideshow viewer
   Depends:  01-Tokens (--clr-*, --radius-*, --anim-*,
             --z-*, --gprs-glass-*, --shadow-*)
   Page:     /timeline/
   Updated:  2026-03-17
   ============================================================ */

/* ============================================================
   1. TIMELINE HEADER
============================================================ */

.gprs-timeline {
    max-width: var(--max-content-width, 1400px);
    margin: 0 auto;
    padding: 2rem 1.25rem 4rem;
}

.gprs-tl-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.gprs-tl-heading {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--clr-text-heading);
    margin: 0 0 0.5rem;
    line-height: 1.15;
}

.gprs-tl-subheading {
    font-size: clamp(1rem, 2.2vw, 1.2rem);
    color: var(--clr-text-body);
    opacity: 0.78;
    margin: 0 0 1.2rem;
    max-width: 44ch;
    margin-inline: auto;
    line-height: 1.5;
}

.gprs-tl-legend {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--clr-accent);
    opacity: 0.7;
}

.gprs-tl-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--clr-accent);
    animation: gprs-tl-pulse 2.4s ease-in-out infinite;
}

@keyframes gprs-tl-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.5); opacity: 0.4; }
}

/* ============================================================
   2. TIMELINE TRACK (vertical line)
============================================================ */

.gprs-tl-track {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0;
    list-style: none;
}

/* The vertical spine */
.gprs-tl-track::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    transform: translateX(-50%);
    background: linear-gradient(
        to bottom,
        transparent 0%,
        var(--clr-accent) 4%,
        var(--clr-accent) 96%,
        transparent 100%
    );
    opacity: 0.3;
    z-index: var(--z-base, 1);
}

/* ============================================================
   3. TIMELINE ENTRY (each milestone)
============================================================ */

.gprs-tl-entry {
    position: relative;
    display: flex;
    align-items: flex-start;
    width: 50%;
    padding: 0 2.5rem 3rem;
    box-sizing: border-box;
}

/* Left-side entries */
.gprs-tl-entry--left {
    margin-right: auto;
    justify-content: flex-end;
    padding-right: 3rem;
    padding-left: 1rem;
}

/* Right-side entries */
.gprs-tl-entry--right {
    margin-left: auto;
    justify-content: flex-start;
    padding-left: 3rem;
    padding-right: 1rem;
}

/* ============================================================
   4. DOT (on the centre line)
============================================================ */

.gprs-tl-dot {
    position: absolute;
    top: 1.5rem;
    width: 18px;
    height: 18px;
    z-index: var(--z-above, 10);
}

.gprs-tl-entry--left .gprs-tl-dot {
    right: -9px;
}

.gprs-tl-entry--right .gprs-tl-dot {
    left: -9px;
}

.gprs-tl-dot-ring {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--clr-accent);
    border: 3px solid var(--clr-bg-main, #e3f2fd);
    box-shadow: 0 0 0 3px rgba(0,102,204,0.25);
    transition: transform var(--anim-fast, 0.18s ease),
                box-shadow var(--anim-fast, 0.18s ease);
}

.gprs-tl-card:hover ~ .gprs-tl-dot .gprs-tl-dot-ring,
.gprs-tl-card:focus-visible ~ .gprs-tl-dot .gprs-tl-dot-ring {
    transform: scale(1.35);
    box-shadow: 0 0 0 6px rgba(0,102,204,0.35);
}

/* ============================================================
   5. CARD (clickable milestone)
============================================================ */

.gprs-tl-card {
    /* Reset button */
    all: unset;
    box-sizing: border-box;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 420px;
    border-radius: var(--radius-md, 14px);
    overflow: hidden;

    /* Glass container feel */
    background:
        linear-gradient(
            135deg,
            rgba(255,255,255,0.82),
            rgba(255,255,255,0.60)
        ),
        linear-gradient(
            315deg,
            rgba(0,102,204,0.08),
            transparent
        );
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    border: 1px solid var(--gprs-glass-border-light, rgba(0,102,204,0.35));

    box-shadow:
        0 8px 32px rgba(0,0,0,0.12),
        inset 0 1px 0 rgba(255,255,255,0.5);

    transition:
        transform var(--anim-medium, 0.3s ease),
        box-shadow var(--anim-medium, 0.3s ease),
        border-color var(--anim-fast, 0.18s ease);
}

.gprs-tl-card:hover,
.gprs-tl-card:focus-visible {
    transform: translateY(-4px);
    box-shadow:
        0 16px 48px rgba(0,0,0,0.18),
        inset 0 1px 0 rgba(255,255,255,0.6);
    border-color: var(--clr-accent);
}

.gprs-tl-card:focus-visible {
    outline: 3px solid var(--clr-accent);
    outline-offset: 2px;
}

/* ============================================================
   5b. BYZANTINE ORNAMENTAL CARD TREATMENT
   ─────────────────────────────────────────
   Decorative double-rule border, corner rosettes, and
   gold-leaf shimmer that plays during the reveal sequence.
============================================================ */

/*
   Inner ornamental border — 2 px inset gold rule visible
   once the card has finished its reveal animation.
*/
.gprs-tl-card::before {
    content: "";
    position: absolute;
    inset: 5px;
    border: 1.5px solid rgba(197, 165, 90, 0.0);
    border-radius: calc(var(--radius-md, 14px) - 4px);
    pointer-events: none;
    z-index: 2;
    transition: border-color 0.6s ease;
}

.gprs-tl-visible .gprs-tl-card::before {
    border-color: rgba(197, 165, 90, 0.30);
}

/*
   Four corner rosettes — tiny diamond motif inspired by
   Byzantine mosaic tesserae.  Uses box-shadow stacking
   for a four-point diamond.
*/
.gprs-tl-card::after {
    content: "";
    position: absolute;
    top: 10px;
    left: 10px;
    width: 8px;
    height: 8px;
    background: transparent;
    z-index: 3;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s ease 0.3s;

    /* four-corner diamonds via box-shadow */
    box-shadow:
        /* top-left */
         0px  0px 0 0 rgba(197,165,90,0.45),
        /* top-right — offset to card width minus margin */
         calc(100cqi - 20px) 0px 0 0 rgba(197,165,90,0.45),
        /* bottom-left */
         0px calc(100cqb - 20px) 0 0 rgba(197,165,90,0.45),
        /* bottom-right */
         calc(100cqi - 20px) calc(100cqb - 20px) 0 0 rgba(197,165,90,0.45);
}

/*
   Shimmer overlay — a sweeping golden gleam that fires
   once during the card's reveal, evoking gold-leaf.
*/
.gprs-tl-card-body {
    position: relative;
    overflow: hidden;
}

.gprs-tl-card-body::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        105deg,
        transparent 30%,
        rgba(197, 165, 90, 0.12) 50%,
        transparent 70%
    );
    pointer-events: none;
    z-index: 4;
    transform: skewX(-20deg);
    opacity: 0;
}

/* Fire the shimmer once when the card becomes visible */
.gprs-tl-visible .gprs-tl-card-body::after {
    animation: gprs-tl-shimmer 1.2s cubic-bezier(0.22, 1, 0.36, 1) 1.6s forwards;
}

@keyframes gprs-tl-shimmer {
    0%   { left: -100%; opacity: 1; }
    100% { left: 140%;  opacity: 0; }
}

/*
   Decorative accent line under the period label,
   reminiscent of Byzantine manuscript illumination.
*/
.gprs-tl-period {
    position: relative;
    padding-bottom: 0.35rem;
}

.gprs-tl-period::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1.5px;
    background: linear-gradient(
        90deg,
        rgba(197, 165, 90, 0.6),
        rgba(0, 102, 204, 0.3),
        rgba(197, 165, 90, 0.6)
    );
    transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1) 1.4s;
}

.gprs-tl-visible .gprs-tl-period::after {
    width: 100%;
}

/* ============================================================
   6. THUMBNAIL
============================================================ */

.gprs-tl-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: rgba(0,102,204,0.06);
}

.gprs-tl-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.gprs-tl-card:hover .gprs-tl-thumb img {
    transform: scale(1.06);
}

/* Multi-image badge */
.gprs-tl-badge {
    position: absolute;
    bottom: 0.55rem;
    right: 0.55rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: var(--radius-pill, 999px);
    border: 1px solid rgba(255,255,255,0.2);
}

/* ============================================================
   7. CARD BODY (text area)
============================================================ */

.gprs-tl-card-body {
    padding: 1rem 1.25rem 1.15rem;
    text-align: left;
}

.gprs-tl-period {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--clr-accent);
    margin-bottom: 0.25rem;
}

.gprs-tl-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--clr-text-heading);
    margin: 0 0 0.4rem;
}

.gprs-tl-excerpt {
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--clr-text-body);
    opacity: 0.72;
    margin: 0 0 0.5rem;
}

.gprs-tl-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--clr-accent);
    transition: gap var(--anim-fast, 0.18s ease);
}

.gprs-tl-card:hover .gprs-tl-read-more {
    gap: 0.6rem;
}

/* ============================================================
   8. SCROLL-REVEAL ANIMATION  (tablet + desktop)
   ─────────────────────────────────────────────────
   Sequence:
     1. Card fades in while still offset to the side
     2. Card slides into final position
     3. Halfway through the slide the thumbnail image
        fades in with a gentle upward lift
   Total duration ≈ 1.8 s
============================================================ */

/* --- Initial hidden state --- */

.gprs-tl-entry {
    opacity: 0;
}

.gprs-tl-entry--left {
    transform: translateX(-40px);
}

.gprs-tl-entry--right {
    transform: translateX(40px);
}

/* Thumbnail image starts invisible + shifted down for the lift */
.gprs-tl-entry .gprs-tl-thumb img {
    opacity: 0;
    transform: translateY(14px);
}

/* --- Keyframes: card reveal --- */

@keyframes gprs-tl-reveal-left {
    0%   { opacity: 0; transform: translateX(-40px); }
    33%  { opacity: 1; transform: translateX(-40px); }
    100% { opacity: 1; transform: translateX(0); }
}

@keyframes gprs-tl-reveal-right {
    0%   { opacity: 0; transform: translateX(40px); }
    33%  { opacity: 1; transform: translateX(40px); }
    100% { opacity: 1; transform: translateX(0); }
}

/* --- Keyframes: image fade-in + lift --- */

@keyframes gprs-tl-img-lift {
    0%   { opacity: 0; transform: translateY(14px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* --- Visible state (class added by IntersectionObserver) --- */

.gprs-tl-entry--left.gprs-tl-visible {
    animation: gprs-tl-reveal-left 1.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.gprs-tl-entry--right.gprs-tl-visible {
    animation: gprs-tl-reveal-right 1.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/*
   Image delay:
   - 0 – 0.6 s  card fades in at offset
   - 0.6 – 1.8 s card slides to position
   - Image animates from 1.1 s → 1.8 s  (0.7 s)
*/

.gprs-tl-entry.gprs-tl-visible .gprs-tl-thumb img {
    animation: gprs-tl-img-lift 0.7s cubic-bezier(0.22, 1, 0.36, 1) 1.1s forwards;
}

/* ============================================================
   9. LIGHTBOX / SLIDESHOW
   ─────────────────────────────────────────
   Positioned below the site header so it
   doesn't collide with sticky nav.
============================================================ */

.gprs-tl-lightbox {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal, 1100);
    display: flex;
    align-items: flex-start;
    justify-content: center;

    /*
       Push content below the sticky header.
       Adjust --gprs-header-h in your tokens if
       your header height is different.
    */
    padding-top: var(--gprs-header-h, 80px);
}

.gprs-tl-lightbox[hidden] {
    display: none;
}

/* Frosted backdrop */
.gprs-tl-lb-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 8, 28, 0.82);
    backdrop-filter: blur(24px) saturate(1.2);
    -webkit-backdrop-filter: blur(24px) saturate(1.2);
    animation: gprs-tl-fade-in 0.35s ease forwards;
}

@keyframes gprs-tl-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ============================================================
   9b. LIGHTBOX — BLURRED HERO BACKGROUND
   ─────────────────────────────────────────
   A blown-up, heavily blurred copy of the current
   slide image centred behind the content at 75 vw.
============================================================ */

.gprs-tl-lb-bg-blur {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 75vw;
    height: 75vw;
    max-height: 90%;
    transform: translate(-50%, -50%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(50px) saturate(1.4);
    -webkit-filter: blur(50px) saturate(1.4);
    opacity: 0;
    z-index: 0;
    pointer-events: none;
    border-radius: 50%;
    transition: opacity 0.6s ease, background-image 0.4s ease;
}

.gprs-tl-lightbox:not([hidden]) .gprs-tl-lb-bg-blur {
    opacity: 0.22;
}

/* ============================================================
   9c. LIGHTBOX — CONTAINER  (fits below header,
       keeps nav buttons always in view)
============================================================ */

.gprs-tl-lb-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 880px;

    /*
       Fill remaining viewport below the header.
       Subtract header + top/bottom breathing room.
    */
    max-height: calc(100vh - var(--gprs-header-h, 80px) - 1rem);
    padding: 0.5rem 1rem 0.75rem;
    overflow: hidden;
    animation: gprs-tl-lb-rise 0.4s cubic-bezier(0.22,1,0.36,1) forwards;
}

@keyframes gprs-tl-lb-rise {
    from { opacity: 0; transform: translateY(24px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Close button — inside the header-safe zone */
.gprs-tl-lb-close {
    position: fixed;
    top: calc(var(--gprs-header-h, 80px) + 0.75rem);
    right: 1rem;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.18);
    transition: background var(--anim-fast, 0.18s ease),
                transform var(--anim-fast, 0.18s ease);
}

.gprs-tl-lb-close:hover {
    background: rgba(255,255,255,0.22);
    transform: rotate(90deg);
}

.gprs-tl-lb-close:focus-visible {
    outline: 3px solid var(--clr-accent);
    outline-offset: 2px;
}

/* ============================================================
   10. LIGHTBOX — IMAGE STAGE
   ─────────────────────────────────────────
   flex-shrink allowed so it compresses when
   the viewport is short, keeping buttons visible.
============================================================ */

.gprs-tl-lb-stage {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    flex-shrink: 1;
    min-height: 0;
}

.gprs-tl-lb-image-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    max-height: 44vh;
    border-radius: var(--radius-md, 14px);
    overflow: hidden;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.08);
}

.gprs-tl-lb-image {
    max-width: 100%;
    max-height: 44vh;
    object-fit: contain;
    border-radius: var(--radius-md, 14px);
    transition: opacity 0.3s ease;
}

.gprs-tl-lb-image.gprs-tl-lb-loading {
    opacity: 0.3;
}

/* Arrows */
.gprs-tl-lb-arrow {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.15);
    transition: background var(--anim-fast, 0.18s ease),
                transform var(--anim-fast, 0.18s ease);
}

.gprs-tl-lb-arrow:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

.gprs-tl-lb-arrow:focus-visible {
    outline: 3px solid var(--clr-accent);
    outline-offset: 2px;
}

.gprs-tl-lb-arrow[hidden] {
    visibility: hidden;
    pointer-events: none;
}

/* Dots */
.gprs-tl-lb-dots {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    padding: 0.5rem 0 0.25rem;
    min-height: 18px;
    flex-shrink: 0;
}

.gprs-tl-lb-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.45);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background var(--anim-fast, 0.18s ease),
                border-color var(--anim-fast, 0.18s ease),
                transform var(--anim-fast, 0.18s ease);
}

.gprs-tl-lb-dot:hover {
    border-color: #fff;
    transform: scale(1.2);
}

.gprs-tl-lb-dot.gprs-tl-lb-dot--active {
    background: var(--clr-accent, #0066CC);
    border-color: var(--clr-accent, #0066CC);
    transform: scale(1.2);
}

.gprs-tl-lb-dot:focus-visible {
    outline: 2px solid var(--clr-accent);
    outline-offset: 2px;
}

/* ============================================================
   11. LIGHTBOX — CAPTION
   ─────────────────────────────────────────
   Scrollable when text is long, but capped
   so the entry-nav stays visible.
============================================================ */

.gprs-tl-lb-caption {
    text-align: center;
    padding: 0.65rem 1.5rem 0.5rem;
    max-width: 640px;
    color: #fff;
    flex-shrink: 1;
    overflow-y: auto;
    min-height: 0;
}

.gprs-tl-lb-period {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.55);
    margin-bottom: 0.25rem;
}

.gprs-tl-lb-title {
    font-size: clamp(1.1rem, 2.8vw, 1.4rem);
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 0.45rem;
    color: #fff;
}

.gprs-tl-lb-text {
    font-size: 0.88rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.78);
    margin: 0;
}

.gprs-tl-lb-counter {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.4);
    font-variant-numeric: tabular-nums;
}

/* ============================================================
   12. LIGHTBOX — ENTRY NAV (prev / next milestone)
   ─────────────────────────────────────────
   Next  = primary (accent-filled)
   Back  = secondary (subtle / ghost)
   flex-shrink: 0 ensures buttons never collapse.
============================================================ */

.gprs-tl-lb-entry-nav {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 640px;
    padding: 0.5rem 0 0.25rem;
    gap: 1rem;
    flex-shrink: 0;
}

/* --- Previous / Back  (secondary ghost) --- */

.gprs-tl-lb-entry-prev {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: none;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.7);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-pill, 999px);
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.12);
    transition: background var(--anim-fast, 0.18s ease),
                color var(--anim-fast, 0.18s ease);
}

.gprs-tl-lb-entry-prev:hover {
    background: rgba(255,255,255,0.16);
    color: #fff;
}

/* --- Next  (primary accent-filled) --- */

.gprs-tl-lb-entry-next {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: none;
    background: var(--clr-accent, #0066CC);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-pill, 999px);
    cursor: pointer;
    border: 1px solid var(--clr-accent, #0066CC);
    transition: background var(--anim-fast, 0.18s ease),
                border-color var(--anim-fast, 0.18s ease),
                transform var(--anim-fast, 0.18s ease);
}

.gprs-tl-lb-entry-next:hover {
    background: var(--clr-accent-hover, #0055aa);
    border-color: var(--clr-accent-hover, #0055aa);
    transform: translateX(2px);
}

/* --- Shared disabled + focus states --- */

.gprs-tl-lb-entry-prev:disabled,
.gprs-tl-lb-entry-next:disabled {
    opacity: 0.25;
    pointer-events: none;
}

.gprs-tl-lb-entry-prev:focus-visible,
.gprs-tl-lb-entry-next:focus-visible {
    outline: 3px solid var(--clr-accent);
    outline-offset: 2px;
}

/* ============================================================
   13. DARK MODE
   ─────────────────────────────────────────
   Cards get a coloured glow instead of a
   dark shadow. Byzantine gold shifts warmer.
============================================================ */

html.gprs-dark .gprs-tl-card {
    background:
        linear-gradient(
            135deg,
            rgba(255,255,255,0.06),
            rgba(255,255,255,0.02)
        ),
        linear-gradient(
            315deg,
            rgba(0,102,204,0.12),
            transparent
        );
    border-color: var(--gprs-glass-border-dark, rgba(255,255,255,0.22));

    /* Glow replaces shadow */
    box-shadow:
        0 0 18px rgba(0, 102, 204, 0.15),
        0 0 6px rgba(0, 102, 204, 0.08),
        inset 0 1px 0 rgba(255,255,255,0.04);
}

html.gprs-dark .gprs-tl-card:hover,
html.gprs-dark .gprs-tl-card:focus-visible {
    border-color: var(--clr-accent);
    box-shadow:
        0 0 32px rgba(0, 102, 204, 0.30),
        0 0 12px rgba(0, 102, 204, 0.18),
        0 0 60px rgba(0, 102, 204, 0.08),
        inset 0 1px 0 rgba(255,255,255,0.06);
}

html.gprs-dark .gprs-tl-dot-ring {
    border-color: var(--clr-bg-main, #0a1a0c);
}

html.gprs-dark .gprs-tl-excerpt {
    opacity: 0.6;
}

/* Dark-mode Byzantine — warmer gold tones */
html.gprs-dark .gprs-tl-visible .gprs-tl-card::before {
    border-color: rgba(218, 185, 100, 0.22);
}

html.gprs-dark .gprs-tl-visible .gprs-tl-period::after {
    background: linear-gradient(
        90deg,
        rgba(218, 185, 100, 0.5),
        rgba(0, 102, 204, 0.25),
        rgba(218, 185, 100, 0.5)
    );
}

html.gprs-dark .gprs-tl-visible .gprs-tl-card-body::after {
    background: linear-gradient(
        105deg,
        transparent 30%,
        rgba(218, 185, 100, 0.10) 50%,
        transparent 70%
    );
}

/* Dark-mode lightbox */
html.gprs-dark .gprs-tl-lb-backdrop {
    background: rgba(0, 2, 12, 0.88);
}

html.gprs-dark .gprs-tl-lb-bg-blur {
    filter: blur(50px) saturate(1.2) brightness(0.7);
    -webkit-filter: blur(50px) saturate(1.2) brightness(0.7);
}

/* Dark-mode entry nav */
html.gprs-dark .gprs-tl-lb-entry-prev {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.10);
    color: rgba(255,255,255,0.65);
}

html.gprs-dark .gprs-tl-lb-entry-prev:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
}

html.gprs-dark .gprs-tl-lb-entry-next {
    background: var(--clr-accent, #0066CC);
    border-color: var(--clr-accent, #0066CC);
    color: #fff;
}

html.gprs-dark .gprs-tl-lb-entry-next:hover {
    background: var(--clr-accent-hover, #0055aa);
    border-color: var(--clr-accent-hover, #0055aa);
}

/* ============================================================
   14. RESPONSIVE — TABLET
============================================================ */

@media (max-width: 900px) {

    .gprs-tl-track::before {
        left: 28px;
    }

    .gprs-tl-entry {
        width: 100%;
        padding-left: 60px !important;
        padding-right: 1rem !important;
        justify-content: flex-start !important;
    }

    .gprs-tl-entry--left .gprs-tl-dot,
    .gprs-tl-entry--right .gprs-tl-dot {
        left: 19px;
        right: auto;
    }

    .gprs-tl-card {
        max-width: 100%;
    }

    /*
       Tablet: both sides slide from the right since the
       timeline spine is now on the left edge.
    */
    .gprs-tl-entry--left {
        transform: translateX(40px);
    }

    .gprs-tl-entry--left.gprs-tl-visible {
        animation: gprs-tl-reveal-right 1.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    }
}

/* ============================================================
   15. RESPONSIVE — MOBILE
   ─────────────────────────────────────────
   Simple fade only — no slide, no lift,
   no Byzantine shimmer.
============================================================ */

@media (max-width: 600px) {

    .gprs-timeline {
        padding: 1.25rem 0.75rem 2.5rem;
    }

    .gprs-tl-header {
        margin-bottom: 2.5rem;
    }

    .gprs-tl-track::before {
        left: 16px;
    }

    .gprs-tl-entry {
        padding-left: 40px !important;
        padding-bottom: 2rem;
    }

    .gprs-tl-entry--left .gprs-tl-dot,
    .gprs-tl-entry--right .gprs-tl-dot {
        left: 7px;
        width: 16px;
        height: 16px;
    }

    .gprs-tl-thumb {
        aspect-ratio: 16 / 9;
    }

    .gprs-tl-card-body {
        padding: 0.85rem 1rem 1rem;
    }

    /* --- Mobile: override multi-stage animation → simple fades --- */

    .gprs-tl-entry {
        transform: none;
    }

    .gprs-tl-entry--left,
    .gprs-tl-entry--right {
        transform: none;
    }

    .gprs-tl-entry--left.gprs-tl-visible,
    .gprs-tl-entry--right.gprs-tl-visible {
        animation: gprs-tl-mobile-fade 0.55s ease forwards;
    }

    .gprs-tl-entry .gprs-tl-thumb img {
        transform: none;
    }

    .gprs-tl-entry.gprs-tl-visible .gprs-tl-thumb img {
        animation: gprs-tl-mobile-fade 0.45s ease 0.15s forwards;
    }

    @keyframes gprs-tl-mobile-fade {
        from { opacity: 0; }
        to   { opacity: 1; }
    }

    /* Skip shimmer on mobile */
    .gprs-tl-visible .gprs-tl-card-body::after {
        animation: none;
    }

    /* --- Mobile lightbox layout --- */

    .gprs-tl-lightbox {
        padding-top: var(--gprs-header-h, 60px);
    }

    .gprs-tl-lb-close {
        top: calc(var(--gprs-header-h, 60px) + 0.5rem);
        width: 40px;
        height: 40px;
    }

    .gprs-tl-lb-container {
        max-height: calc(100vh - var(--gprs-header-h, 60px) - 0.5rem);
        padding: 0.25rem 0.5rem 0.5rem;
    }

    .gprs-tl-lb-image-wrap {
        max-height: 36vh;
    }

    .gprs-tl-lb-image {
        max-height: 36vh;
    }

    .gprs-tl-lb-stage {
        flex-direction: column;
    }

    .gprs-tl-lb-arrow {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 5;
        width: 40px;
        height: 40px;
    }

    .gprs-tl-lb-prev { left: 0.25rem; }
    .gprs-tl-lb-next { right: 0.25rem; }

    .gprs-tl-lb-arrow:hover {
        transform: translateY(-50%) scale(1.1);
    }

    .gprs-tl-lb-caption {
        padding: 0.5rem 0.75rem 0.35rem;
    }

    .gprs-tl-lb-text {
        font-size: 0.85rem;
    }

    .gprs-tl-lb-entry-nav {
        padding: 0.35rem 0 0.25rem;
    }

    /* Blurred bg smaller on mobile */
    .gprs-tl-lb-bg-blur {
        width: 95vw;
        height: 60vw;
        filter: blur(40px) saturate(1.2);
        -webkit-filter: blur(40px) saturate(1.2);
    }
}

/* ============================================================
   16. REDUCED MOTION
============================================================ */

@media (prefers-reduced-motion: reduce) {
    .gprs-tl-entry {
        opacity: 1;
        transform: none;
    }
    .gprs-tl-entry .gprs-tl-thumb img {
        opacity: 1;
        transform: none;
    }
    .gprs-tl-entry--left.gprs-tl-visible,
    .gprs-tl-entry--right.gprs-tl-visible {
        animation: none;
        opacity: 1;
        transform: none;
    }
    .gprs-tl-entry.gprs-tl-visible .gprs-tl-thumb img {
        animation: none;
        opacity: 1;
        transform: none;
    }
    .gprs-tl-visible .gprs-tl-card-body::after {
        animation: none;
    }
    .gprs-tl-legend-dot {
        animation: none;
    }
    .gprs-tl-lb-backdrop,
    .gprs-tl-lb-container {
        animation: none;
    }
}
