/* ═══════════════════════════════════════════════════════════════
   MCRO STORY SECTION — Shared Styles
   Bio, Patent, What Happened pages
   ═══════════════════════════════════════════════════════════════ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg:          #0c0c12;
    --surface:     #111119;
    --card:        #161622;
    --elevated:    #1c1c2a;
    --border:      #2a2a3c;
    --border-dim:  #1e1e2e;
    --text:        #cdc8d4;
    --text-bright: #e8e6e1;
    --text-white:  #ffffff;
    --text-dim:    #a0a0a0;
    --text-muted:  #707070;
    --red:         #ff5545;
    --gold:        #ffb732;
    --blue:        #3a86ba;
    --green:       #2de0b6;
    --purple:      #a77bdb;
    --orange:      #ff8c42;
    --mono:        'IBM Plex Mono', 'Consolas', monospace;
    --sans:        'IBM Plex Sans', system-ui, -apple-system, sans-serif;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    line-height: 1.7;
}

/* ── HEADER (sticky) ──────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    padding: 24px 50px 20px;
    border-bottom: 1px solid var(--border);
    background: #111119;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.brand {
    font-family: var(--mono);
    font-size: 14px;
    font-weight: 700;
    color: var(--red);
    letter-spacing: 6px;
    text-transform: uppercase;
    text-decoration: none;
}
.brand:hover { color: #ff7766; }
.header-nav {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 1px;
}
.header-nav a {
    color: var(--text-dim);
    text-decoration: none;
    margin: 0 6px;
}
.header-nav a:hover { color: var(--red); }
.header-nav .active { color: var(--red); }

/* ── PAGE NAV (sticky button bar — matches /judicial/ view-tabs) ── */
.page-nav {
    position: sticky;
    top: 91px;
    z-index: 99;
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 9px 30px;
    background: linear-gradient(180deg, #0c0c12 0%, #0f0f18 100%);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}
.page-nav a {
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 700;
    color: var(--blue);
    letter-spacing: 4px;
    text-transform: uppercase;
    text-decoration: none;
    padding: 2px 16px;
    background: var(--card);
    border: 1px solid rgba(58,134,186,0.55);
    border-radius: 4px;
    transition: all 0.2s;
    white-space: nowrap;
}
.page-nav a:hover {
    color: var(--text-white);
    border-color: var(--blue);
    background: rgba(58,134,186,0.14);
}
/* Dialed-back scheme for non-selected buttons — muted gray text at rest,
   brighten to white + swap to a softer gray border on hover. Active button
   stays untouched (black on solid blue). */
.page-nav a:not(.active)         { color: #a4a4a4; }
.page-nav a:not(.active):hover   { color: var(--text-white); border-color: #b0b0b0; }
.page-nav a.active {
    color: #000000;
    background: var(--blue);
    border-color: var(--blue);
    font-size: 12.6px;
}

/* ── HERO ───────────────────────────────── */
.hero {
    max-width: 1020px;
    margin: 0 auto 40px;
    padding: 60px 40px 40px;
}
.hero-label {
    display: inline-block;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--red);
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 16px;
    padding: 7px 20px;
    border: 1px solid rgba(255,85,69,0.4);
    border-radius: 4px;
    background: var(--bg);
}
.hero h1 {
    font-size: 38px;
    font-weight: 700;
    color: var(--text-white);
    line-height: 1.2;
    margin-bottom: 20px;
}
.hero h1 span { color: var(--red); }
.hero-subtitle {
    font-size: 18px;
    color: var(--text-dim);
    max-width: 720px;
    line-height: 1.6;
}

/* ── CONTENT ────────────────────────────── */
.content {
    max-width: 1020px;
    margin: 0 auto;
    padding: 0 40px 80px;
}

.section { margin-bottom: 56px; }
.section-label {
    font-family: var(--mono);
    font-size: 14px;
    color: var(--red);
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.section h2 {
    font-size: 26px;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 16px;
    line-height: 1.3;
}
.section p {
    font-size: 16px;
    color: var(--text);
    margin-bottom: 14px;
}
.section p strong { color: var(--text-bright); }

/* ── BIO STATS ROW ──────────────────────── */
.bio-stats {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
    margin: 28px 0;
    padding: 24px 0;
    border-top: 1px solid var(--border-dim);
    border-bottom: 1px solid var(--border-dim);
}
.bio-stat .num {
    font-family: var(--mono);
    font-size: 28px;
    font-weight: 700;
    color: var(--green);
}
.bio-stat .label {
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 2px;
}

/* ── LINKS ROW ──────────────────────────── */
.ext-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 20px 0;
}
.ext-links a {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--blue);
    text-decoration: none;
    padding: 6px 14px;
    border: 1px solid rgba(77,171,240,0.3);
    border-radius: 4px;
    transition: all 0.2s;
    letter-spacing: 1px;
}
.ext-links a:hover { background: rgba(77,171,240,0.08); border-color: var(--blue); }

/* ── TIMELINE CARDS (compact) ───────────── */
.tl-cards { margin: 20px 0; }

.tl-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
    background: var(--surface);
    transition: border-color 0.2s, background 0.2s;
}
.tl-card:hover { border-color: #3a3a50; }
.tl-card.open { border-color: rgba(255,85,69,0.4); }

.tl-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 16px;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}
.tl-card-header:hover { background: var(--card); }
.tl-card.open .tl-card-header { background: var(--card); border-bottom: 1px solid var(--border); }

.tl-card-year {
    font-family: var(--mono);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-muted);
    min-width: 52px;
    text-align: center;
    transition: color 0.2s;
}
.tl-card:hover .tl-card-year { color: var(--text-dim); }
.tl-card.open .tl-card-year { color: var(--green); }

.tl-card-thumb {
    width: 56px;
    height: 56px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--elevated);
    border: 1px solid var(--border-dim);
}
.tl-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.tl-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dim);
    flex: 1;
    transition: color 0.2s;
}
.tl-card:hover .tl-card-title { color: var(--text); }
.tl-card.open .tl-card-title { color: var(--text-white); }

.tl-card-meta {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.tl-card-arrow {
    font-size: 18px;
    color: #3a3a50;
    transition: transform 0.2s, color 0.2s;
    flex-shrink: 0;
}
.tl-card.open .tl-card-arrow { transform: rotate(90deg); color: var(--red); }

.tl-card-body {
    display: none;
    padding: 16px;
    background: rgba(8,8,14,0.5);
}
.tl-card.open .tl-card-body { display: block; }

/* ── MEDIA GRID (inside card body) ──────── */
.media-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.media-grid .img-item {
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4/3;
    width: 180px;
    flex: 0 0 auto;
    background: var(--card);
    border: 1px solid var(--border-dim);
    transition: border-color 0.2s, transform 0.15s;
}
.media-grid .img-item:hover { border-color: rgba(255,85,69,0.4); transform: scale(1.03); }
.media-grid .img-item img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}

.media-grid .vid-item {
    border-radius: 6px;
    overflow: hidden;
    aspect-ratio: 16/9;
    width: 280px;
    flex: 0 0 auto;
    background: #0a0a14;
    position: relative;
    cursor: pointer;
    border: 1px solid var(--border-dim);
    transition: border-color 0.2s;
}
.media-grid .vid-item:hover { border-color: rgba(255,85,69,0.4); }
.media-grid .vid-item video {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.media-grid .vid-item .play-btn {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    width: 40px; height: 40px;
    background: rgba(255,85,69,0.85);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    pointer-events: none;
    transition: background 0.2s;
}
.media-grid .vid-item:hover .play-btn { background: rgba(255,85,69,1); }
.media-grid .vid-item .play-btn::after {
    content: '';
    display: block;
    width: 0; height: 0;
    border-style: solid;
    border-width: 7px 0 7px 12px;
    border-color: transparent transparent transparent #fff;
    margin-left: 2px;
}

/* ── LIGHTBOX ───────────────────────────── */
.lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 9000;
    background: rgba(8,8,14,0.95);
    align-items: center;
    justify-content: center;
}
.lightbox.active { display: flex; }
.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
    object-fit: contain;
}
.lightbox-close {
    position: absolute;
    top: 20px; right: 28px;
    font-size: 36px;
    color: var(--text-muted);
    cursor: pointer;
    z-index: 9001;
}
.lightbox-close:hover { color: var(--text-white); }
.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 48px;
    color: var(--text-muted);
    cursor: pointer;
    z-index: 9001;
    padding: 20px;
    user-select: none;
}
.lightbox-arrow:hover { color: var(--text-white); }
.lightbox-arrow.left { left: 12px; }
.lightbox-arrow.right { right: 12px; }
.lightbox-counter {
    position: absolute;
    bottom: 20px; left: 50%; transform: translateX(-50%);
    font-family: var(--mono);
    font-size: 13px;
    color: var(--text-muted);
    letter-spacing: 2px;
}

/* ── VIDEO OVERLAY ──────────────────────── */
.video-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 9000;
    background: rgba(8,8,14,0.97);
    align-items: center;
    justify-content: center;
}
.video-overlay.active { display: flex; }
.video-overlay .vo-content {
    width: min(90vw, 1200px);
    aspect-ratio: 16/9;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
    border: 1px solid var(--border);
}
.video-overlay .vo-content video,
.video-overlay .vo-content iframe {
    width: 100%; height: 100%; border: none; object-fit: contain;
}

/* ── PARALLEL TIMELINE ──────────────────── */
.parallel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin: 28px 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}
.parallel-header {
    padding: 12px 16px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
}
.parallel-header.reality { background: var(--card); color: var(--green); }
.parallel-header.court { background: var(--card); color: var(--red); }

.parallel-row {
    display: contents;
}
.parallel-cell {
    padding: 14px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--border-dim);
}
.parallel-cell.reality { background: var(--card); color: var(--text); }
.parallel-cell.court { background: var(--card); color: var(--text); }
.parallel-cell .date {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.parallel-cell .quote {
    font-style: italic;
    color: var(--text-dim);
}
.parallel-cell strong { color: var(--text-bright); }

/* ── INLINE LINKS ───────────────────────── */
.section a[target="_blank"] {
    color: var(--blue);
    text-decoration: underline;
    text-decoration-color: rgba(77,171,240,0.35);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.2s;
}
.section a[target="_blank"]:hover {
    text-decoration-color: var(--blue);
}
.section a[target="_blank"] strong {
    color: var(--blue);
}

/* ── CALLOUT ────────────────────────────── */
.callout {
    background: var(--card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--red);
    border-radius: 6px;
    padding: 20px 24px;
    margin: 24px 0;
}
.callout.green { border-left-color: var(--green); }
.callout.gold { border-left-color: var(--gold); }
.callout.blue { border-left-color: var(--blue); }
.callout p { font-size: 15px; margin-bottom: 6px; }
.callout p:last-child { margin-bottom: 0; }

/* ── NEXT PAGE LINK ─────────────────────── */
.next-page {
    display: block;
    text-align: center;
    padding: 28px;
    margin: 40px 0 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
}
.next-page:hover { border-color: var(--red); background: var(--card); }
.next-page .next-label {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.next-page .next-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-white);
}

/* ── FOOTER ─────────────────────────────── */
.site-footer {
    width: 100%;
    padding: 24px 50px;
    border-top: 1px solid var(--border-dim);
    text-align: center;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text-muted);
}
.site-footer a { color: var(--text-dim); text-decoration: none; }
.site-footer a:hover { color: var(--red); }

/* ── SEPARATOR ──────────────────────────── */
.sep { border: none; border-top: 1px solid var(--border); margin: 48px 0; }

/* ── ENHANCED HERO (biography) ──────────── */
.hero-enhanced {
    position: relative;
    max-width: 1020px;
    margin: 0 auto;
    padding: 80px 40px 50px;
}
.hero-enhanced .hero-label {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--red);
    letter-spacing: 6px;
    text-transform: uppercase;
    margin-bottom: 20px;
}
.hero-enhanced h1 {
    font-size: 44px;
    font-weight: 700;
    color: var(--text-white);
    line-height: 1.15;
    margin-bottom: 24px;
}
.hero-enhanced h1 span { color: var(--red); }
.hero-enhanced .hero-subtitle {
    font-size: 18px;
    color: var(--text-dim);
    max-width: 680px;
    line-height: 1.7;
}
.hero-enhanced .hero-rule {
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--red), transparent);
    border: none;
    margin: 30px 0 0;
}

/* ── ERA BLOCKS ────────────────────────── */
.era {
    position: relative;
    padding: 32px 0 32px 32px;
    border-left: 2px solid var(--border-dim);
    margin-bottom: 8px;
}
.era::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 38px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--card);
    border: 2px solid var(--text-muted);
    transition: border-color 0.3s, background 0.3s;
}
.era:hover::before {
    border-color: var(--red);
    background: var(--red);
    box-shadow: 0 0 12px var(--red);
}
.era-years {
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 2px;
    margin-bottom: 6px;
    transition: color 0.2s;
}
.era:hover .era-years { color: var(--red); }
.era-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 12px;
}
.era p {
    font-size: 15px;
    color: var(--text);
    line-height: 1.7;
}
.era p strong { color: var(--text-bright); }

/* ── BIO MEDIA ROWS (same-height side-by-side) ──
   Each cell sets aspect-ratio + flex-grow = width-in-ratio-units.
   Widths distribute proportionally to aspect, so heights match exactly
   while preserving natural aspect ratio. Center divide shifts off-center
   as needed — intentional. */
.bio-media-row {
    display: flex;
    gap: 10px;
    margin-top: 22px;
    align-items: stretch;
}
.bio-media-row .bio-cell {
    flex-basis: 0;
    min-width: 0;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    background: #000;
    border: 1px solid var(--border-dim);
}
.bio-media-row .bio-cell > img,
.bio-media-row .bio-cell > iframe,
.bio-media-row .bio-cell > video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 0;
    display: block;
}
.bio-media-label {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    position: absolute;
    left: 10px;
    bottom: 8px;
    z-index: 2;
    background: rgba(0,0,0,0.7);
    padding: 4px 8px;
    border-radius: 3px;
    pointer-events: none;
}

/* ── CREDIT CARDS ──────────────────────── */
.credit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    margin: 24px 0;
}
.credit-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 18px 20px;
    transition: border-color 0.2s, background 0.2s;
}
.credit-card:hover {
    border-color: rgba(77,171,240,0.5);
    background: var(--elevated);
}
.credit-source {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 700;
    color: var(--blue);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.credit-desc {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.5;
}
.credit-desc a {
    color: var(--blue);
    text-decoration: none;
}
.credit-desc a:hover { text-decoration: underline; }

/* ── ENHANCED STATS ────────────────────── */
.stats-enhanced {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 36px 0;
}
.stat-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px 20px;
    text-align: center;
    transition: border-color 0.2s;
}
.stat-box:hover { border-color: var(--green); }
.stat-box .num {
    font-family: var(--mono);
    font-size: 32px;
    font-weight: 700;
    color: var(--green);
    line-height: 1;
    margin-bottom: 8px;
}
.stat-box .label {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ── PAGE STUB (upcoming pages) ────────── */
.page-stub {
    max-width: 1020px;
    margin: 0 auto;
    padding: 120px 40px;
    text-align: center;
}
.page-stub .stub-icon {
    font-size: 48px;
    margin-bottom: 24px;
    opacity: 0.5;
}
.page-stub h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 16px;
}
.page-stub p {
    font-size: 16px;
    color: var(--text-dim);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ── RESPONSIVE ─────────────────────────── */
@media (max-width: 768px) {
    .site-header {
        position: static;
        top: auto;
        flex-direction: column;
        gap: 8px;
        padding: 16px 20px;
    }
    .hero { padding: 40px 20px 30px; }
    .hero h1 { font-size: 28px; }
    .content { padding: 0 20px 60px; }
    .bio-stats { gap: 20px; }
    .bio-stat .num { font-size: 22px; }
    .page-nav {
        position: static;
        top: auto;
        padding: 10px 14px;
        gap: 4px;
    }
    .page-nav a { padding: 3px 8px; font-size: 11px; letter-spacing: 2.5px; }
    .hero-enhanced { padding: 50px 20px 30px; }
    .hero-enhanced h1 { font-size: 30px; }
    .stats-enhanced { grid-template-columns: 1fr; }
    .era { padding-left: 24px; }
    .credit-grid { grid-template-columns: 1fr; }
    .parallel { grid-template-columns: 1fr; }
    .media-grid .img-item { width: 140px; }
    .media-grid .vid-item { width: 100%; }
    .tl-card-header { gap: 10px; padding: 8px 12px; }
    .tl-card-thumb { width: 44px; height: 44px; }

    /* Bio media rows (used across all /story/ pages for video+image / video+video pairs)
       are flex-row by default, with each cell sized by its inline aspect-ratio +
       flex-grow proportions. On mobile, stack the cells vertically and let each cell
       fill the row width — the inline aspect-ratio handles the height naturally. */
    .bio-media-row { flex-direction: column; }
    .bio-media-row .bio-cell { flex: 0 0 auto !important; width: 100%; }
}
