/* ==========================================================================
   therodrigo.com — portfolio
   Layout inspired by justiin.de, theme system inspired by ezgclan.eu,
   terminal flavor kept from v1. All colors flow from the [data-theme] tokens
   below; every theme is checked for WCAG 2.1 AA contrast.
   ========================================================================== */

/* ---------- Theme tokens ---------- */
:root,
:root[data-theme="dark"] {
    --bg: #0a0d14;
    --bg-card: #111622;
    --bg-inset: rgba(0, 0, 0, 0.25);
    --border: #232f47;
    --accent: #3b82f6;          /* graphics, borders, icons */
    --accent-ink: #7eaefc;      /* text-safe accent */
    --accent-soft: rgba(59, 130, 246, 0.12);
    --ink-dim: #8fa0b8;         /* labels, secondary text */
    --ink: #b6c2d4;             /* body text */
    --ink-bright: #f1f5f9;      /* headings */
    --ok: #10b981;
    --ok-ink: #34d399;
    --warn: #f59e0b;
    --danger-ink: #f87171;
    --nav-bg: rgba(17, 22, 34, 0.82);
    --star-opacity: 0.5;
    --shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
}

:root[data-theme="solid-black"] {
    --bg: #000000;
    --bg-card: #0a0a0c;
    --bg-inset: rgba(255, 255, 255, 0.03);
    --border: #26262b;
    --accent: #3b82f6;
    --accent-ink: #7eaefc;
    --accent-soft: rgba(59, 130, 246, 0.12);
    --ink-dim: #9ca3af;
    --ink: #c9ccd2;
    --ink-bright: #fafafa;
    --ok: #10b981;
    --ok-ink: #34d399;
    --warn: #f59e0b;
    --danger-ink: #f87171;
    --nav-bg: rgba(8, 8, 10, 0.85);
    --star-opacity: 0.35;
    --shadow: 0 14px 34px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
}

:root[data-theme="light"] {
    --bg: #eef2f7;
    --bg-card: #ffffff;
    --bg-inset: rgba(15, 23, 42, 0.04);
    --border: #d4dbe6;
    --accent: #1d4ed8;
    --accent-ink: #1d4ed8;
    --accent-soft: rgba(29, 78, 216, 0.08);
    --ink-dim: #556077;
    --ink: #333d4f;
    --ink-bright: #101828;
    --ok: #067647;
    --ok-ink: #067647;
    --warn: #92510a;
    --danger-ink: #b42318;
    --nav-bg: rgba(255, 255, 255, 0.85);
    --star-opacity: 0;
    --shadow: 0 14px 30px rgba(16, 24, 40, 0.08);
    color-scheme: light;
}

:root[data-theme="neon"] {
    --bg: #0a0116;
    --bg-card: #150726;
    --bg-inset: rgba(0, 0, 0, 0.3);
    --border: #3b1a66;
    --accent: #c026d3;
    --accent-ink: #e879f9;
    --accent-soft: rgba(192, 38, 211, 0.14);
    --ink-dim: #a794c4;
    --ink: #c9b8e8;
    --ink-bright: #faf5ff;
    --ok: #10b981;
    --ok-ink: #34d399;
    --warn: #fbbf24;
    --danger-ink: #f87171;
    --nav-bg: rgba(21, 7, 38, 0.82);
    --star-opacity: 0.6;
    --shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
}

:root[data-theme="forest"] {
    --bg: #06100a;
    --bg-card: #0c1911;
    --bg-inset: rgba(0, 0, 0, 0.28);
    --border: #1e3b2a;
    --accent: #22c55e;
    --accent-ink: #4ade80;
    --accent-soft: rgba(34, 197, 94, 0.12);
    --ink-dim: #93ac9d;
    --ink: #b9cec1;
    --ink-bright: #f0fdf4;
    --ok: #22c55e;
    --ok-ink: #4ade80;
    --warn: #fbbf24;
    --danger-ink: #f87171;
    --nav-bg: rgba(12, 25, 17, 0.82);
    --star-opacity: 0.4;
    --shadow: 0 14px 34px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
}

:root[data-theme="ocean"] {
    --bg: #041018;
    --bg-card: #082031;
    --bg-inset: rgba(0, 0, 0, 0.28);
    --border: #16405a;
    --accent: #06b6d4;
    --accent-ink: #22d3ee;
    --accent-soft: rgba(6, 182, 212, 0.12);
    --ink-dim: #8fb0c0;
    --ink: #b4cdd9;
    --ink-bright: #ecfeff;
    --ok: #10b981;
    --ok-ink: #34d399;
    --warn: #fbbf24;
    --danger-ink: #f87171;
    --nav-bg: rgba(8, 32, 49, 0.82);
    --star-opacity: 0.45;
    --shadow: 0 14px 34px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
}

:root {
    --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Cascadia Code', 'Fira Code', Consolas, monospace;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
    margin: 0;
    background-color: var(--bg);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.6;
    transition: background-color 0.35s ease, color 0.35s ease;
}

/* Subtle starfield (CSS only). Hidden on the light theme via --star-opacity. */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: var(--star-opacity);
    background-image:
        radial-gradient(1px 1px at 25px 45px, #ffffff 45%, transparent 55%),
        radial-gradient(1px 1px at 160px 120px, #ffffff 45%, transparent 55%),
        radial-gradient(1.5px 1.5px at 310px 210px, #ffffff 45%, transparent 55%),
        radial-gradient(1px 1px at 420px 60px, #ffffff 45%, transparent 55%),
        radial-gradient(1px 1px at 520px 170px, #ffffff 45%, transparent 55%);
    background-size: 560px 260px;
    animation: twinkle 9s ease-in-out infinite alternate;
}

main {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 22px 60px;
}

img { max-width: 100%; }
ul { padding: 0; }

h1, h2, h3, h4 { color: var(--ink-bright); line-height: 1.25; margin: 0; }
a { color: var(--accent-ink); }

.mono { font-family: var(--font-mono); }

/* ---------- Accessibility helpers ---------- */
.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    margin: -1px; padding: 0; border: 0;
    clip: rect(0 0 0 0); clip-path: inset(50%);
    overflow: hidden; white-space: nowrap;
}

.skip-link {
    position: absolute;
    top: -60px; left: 16px;
    z-index: 200;
    padding: 10px 18px;
    background: var(--bg-card);
    color: var(--ink-bright);
    border: 1px solid var(--accent);
    border-radius: 8px;
    text-decoration: none;
    transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; }

:focus-visible {
    outline: 2px solid var(--accent-ink);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ---------- Top bar / pill nav ---------- */
.top-bar {
    position: sticky;
    top: 12px;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
}

.theme-pill {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--nav-bg);
    border: 1px solid var(--border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
}

.pill-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 14px;
    padding: 10px 20px;
    border-radius: 999px;
    background: var(--nav-bg);
    border: 1px solid var(--border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
    font-size: 13px;
}

.pill-nav a {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--ink);
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease;
}
.pill-nav a:hover { color: var(--accent-ink); background: var(--accent-soft); }

/* Scrollspy: the section you are currently reading */
.pill-nav a.active {
    color: var(--accent-ink);
    background: var(--accent-soft);
    font-weight: 700;
}
.pill-nav a.active i { color: var(--accent-ink); }

.prompt {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--accent-ink);
    padding-right: 6px;
}

.pill-divider {
    width: 1px;
    height: 22px;
    background: var(--border);
}

/* Theme selector */
.theme-selector { display: inline-flex; align-items: center; gap: 7px; }

.theme-btn {
    width: 20px; height: 20px;
    padding: 0;
    border-radius: 50%;
    border: 2px solid var(--border);
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease;
}
.theme-btn:hover { transform: scale(1.18); }
.theme-btn[aria-pressed="true"] {
    border-color: var(--ink-bright);
    box-shadow: 0 0 0 2px var(--accent-soft), 0 0 8px var(--accent);
}

.swatch-solid-black { background: linear-gradient(135deg, #000000 55%, #3b82f6 45%); }
.swatch-dark        { background: linear-gradient(135deg, #0a0d14 55%, #3b82f6 45%); }
.swatch-light       { background: linear-gradient(135deg, #ffffff 55%, #1d4ed8 45%); }
.swatch-neon        { background: linear-gradient(135deg, #0a0116 55%, #e879f9 45%); }
.swatch-forest      { background: linear-gradient(135deg, #06100a 55%, #22c55e 45%); }
.swatch-ocean       { background: linear-gradient(135deg, #041018 55%, #06b6d4 45%); }

/* ---------- Status bits ---------- */
.status-dot {
    display: inline-block;
    width: 8px; height: 8px;
    background: var(--ok);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--ok);
}
.status-dot.blink { animation: blinker 1.5s linear infinite; }

.badge {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid var(--border);
    white-space: nowrap;
}
.badge-ok     { color: var(--ok-ink); border-color: color-mix(in srgb, var(--ok) 45%, var(--border)); }
.badge-accent { color: var(--accent-ink); border-color: var(--accent); background: var(--accent-soft); }
.badge-dim    { color: var(--ink-dim); }

/* ---------- Sections ---------- */
.section { padding: 76px 0 0; }

.section-kicker {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent-ink);
    margin: 0 0 10px;
}

.section-head { margin-bottom: 28px; }
.section-head h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 800; letter-spacing: -0.01em; }
.section-sub { color: var(--ink-dim); max-width: 640px; margin: 8px 0 0; font-size: 14px; }
.section-sub .mono { font-size: 11px; letter-spacing: 0.05em; }

/* ---------- Cards ---------- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 22px;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease,
                background-color 0.35s ease;
}
.card:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: var(--shadow);
}

.card-sub { color: var(--ink-dim); font-size: 13px; margin: 6px 0 0; }

.accent-top { border-top: 2px solid var(--accent); }

/* ---------- 01 · Hero ---------- */
.hero { text-align: center; padding-top: 90px; }

.hero-name {
    font-size: clamp(2.1rem, 5vw, 3.4rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.caret {
    display: inline-block;
    width: 0.55ch;
    height: 0.95em;
    margin-left: 6px;
    vertical-align: text-bottom;
    background: var(--accent);
    animation: blinker 1.1s steps(2) infinite;
}

.hero-role {
    font-family: var(--font-mono);
    color: var(--accent-ink);
    font-size: clamp(0.85rem, 1.6vw, 1rem);
    margin: 12px 0 0;
}

.chip-row {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 22px 0 0;
}
.chip {
    font-size: 12px;
    color: var(--ink);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 6px 14px;
}
.chip i { color: var(--accent-ink); margin-right: 5px; }

.hero-bio {
    max-width: 720px;
    margin: 28px auto 0;
    text-align: left;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 0 14px 14px 0;
    padding: 18px 22px;
}

.focus-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 34px;
    text-align: left;
}

.focus-card h3 { font-size: 15px; margin-top: 8px; }

.status-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ok-ink);
}

/* ---------- 02 · Fleet ---------- */
.fleet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
    gap: 16px;
}

.fleet-card { display: flex; flex-direction: column; gap: 12px; padding: 18px; }

.fleet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.fleet-title {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    font-weight: 700;
}

.fleet-role { margin: 0; font-size: 13px; color: var(--ink-dim); }

.graph-box {
    background: var(--bg-inset);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px;
}
.graph-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
}
.graph-label {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-dim);
}
.graph-ping { font-size: 12px; font-weight: 700; color: var(--ink-bright); }

.rrd-wrapper {
    width: 100%;
    height: 80px;
    overflow: hidden;
    display: flex;
    align-items: center;
    border-radius: 4px;
}
.real-rrd-graph {
    width: 100%;
    height: auto;
    object-fit: cover;
    image-rendering: pixelated;
}

.fleet-footer {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 11px;
    color: var(--ink-dim);
    border-top: 1px dashed var(--border);
    padding-top: 10px;
    margin-top: auto;
}

/* ---------- 03 · Infra specs ---------- */
.infra-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.infra-card h3, .personal-card h3, .steam-card h3 {
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.infra-card h3 i, .personal-card h3 i, .steam-card h3 i { color: var(--accent-ink); }

.specs {
    margin: 14px 0 0;
    background: var(--bg-inset);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 14px;
}
.spec-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 7px 0;
    font-size: 13px;
}
.spec-row + .spec-row { border-top: 1px dashed var(--border); }
.spec-row dt { font-family: var(--font-mono); font-size: 12px; color: var(--ink-dim); }
.spec-row dd { margin: 0; color: var(--ink-bright); text-align: right; }

.model-label {
    display: block;
    margin: 12px 0 0;
    font-size: 11px;
    color: var(--ink-dim);
    text-align: right;
}

/* ---------- 04 · Career timeline ---------- */
.timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    max-width: 780px;
}

.timeline-item { position: relative; padding: 0 0 34px 34px; }

.timeline-item::before {
    content: "";
    position: absolute;
    left: 0; top: 7px;
    width: 11px; height: 11px;
    border-radius: 50%;
    background: var(--border);
    border: 2px solid var(--accent);
}
.timeline-current::before {
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
}

.timeline-item::after {
    content: "";
    position: absolute;
    left: 6.5px; top: 24px; bottom: 2px;
    width: 2px;
    background: var(--border);
}
.timeline-item:last-child::after { display: none; }

.timeline-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.timeline-period {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--accent-ink);
}
.timeline-role { font-size: 17px; margin-top: 6px; }
.timeline-org { margin: 3px 0 0; font-size: 13px; color: var(--ink-dim); }

.timeline-bullets {
    list-style: none;
    margin: 12px 0 0;
    font-size: 13px;
}
.timeline-bullets li {
    position: relative;
    padding-left: 18px;
    margin-bottom: 7px;
}
.timeline-bullets li::before {
    content: ">";
    position: absolute;
    left: 0;
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--accent-ink);
}

/* ---------- 05 · Wins & hub ---------- */
.wins-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 16px;
}
.win-card h3 { font-size: 15px; margin-top: 6px; }
.win-year {
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--accent-ink);
}

.sub-head {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    margin: 40px 0 16px;
}
.sub-head i { color: var(--accent-ink); }

.hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.hub-card { position: relative; display: flex; flex-direction: column; }
.hub-card h4 { font-size: 15px; margin-top: 12px; }
.hub-card h4 a { color: var(--ink-bright); text-decoration: none; }
.hub-card h4 a:hover { color: var(--accent-ink); }

/* Whole card clickable without nesting interactive elements */
.stretch-link::after { content: ""; position: absolute; inset: 0; border-radius: 14px; }

.hub-head { display: flex; justify-content: space-between; align-items: center; }
.hub-icon { font-size: 22px; color: var(--accent-ink); }

/* "Coming soon" cards: dim decoration only — never the text (AA contrast) */
.hub-disabled { border-style: dashed; background: transparent; }
.hub-disabled .hub-icon { opacity: 0.55; }
.hub-disabled:hover { transform: none; border-color: var(--border); box-shadow: none; }

.promo-card { border-color: var(--accent); background: linear-gradient(160deg, var(--accent-soft), var(--bg-card) 55%); }

.promo-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.copy-code {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--accent-ink);
    background: var(--bg-inset);
    border: 1px dashed var(--accent);
    border-radius: 8px;
    padding: 9px 14px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-style 0.2s ease;
}
.copy-code:hover { background: var(--accent-soft); border-style: solid; }

.copy-feedback { font-size: 12px; color: var(--ok-ink); }

/* ---------- 05 · Off duty ---------- */
.offduty-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 16px;
    align-items: start;
}

.mini-head {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-dim);
    margin: 18px 0 10px;
}
.mini-head.ruled { border-bottom: 1px solid var(--border); padding-bottom: 6px; }

.hobby-list { list-style: none; margin: 0; font-size: 13px; }
.hobby-list li { margin-bottom: 7px; }
.hobby-list i { color: var(--accent-ink); font-size: 10px; margin-right: 8px; }

.pet-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-inset);
    border: 1px dashed var(--border);
    border-radius: 8px;
    padding: 12px;
}
.pet-card i { color: var(--accent-ink); font-size: 20px; }
.pet-name { margin: 0; font-size: 13px; font-weight: 700; color: var(--ink-bright); }
.pet-detail { margin: 0; font-size: 11px; color: var(--ink-dim); }

/* Steam */
.steam-status { font-size: 13px; margin: 14px 0 0; }
.steam-status i { color: var(--accent-ink); margin-right: 6px; }

.current-obsession { margin-top: 14px; }
#game-icon {
    width: 100%;
    height: 110px;
    object-fit: cover;
    object-position: center 20%;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-inset);
    margin-bottom: 12px;
}
.obsession-label {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ok-ink);
}
.game-name { margin: 4px 0 0; font-size: 16px; font-weight: 700; color: var(--ink-bright); }

.stat-row { display: flex; gap: 10px; }
.stat-tile {
    flex: 1;
    background: var(--bg-inset);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}
.stat-label {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink-dim);
}
.stat-value { margin: 6px 0 0; font-size: 18px; font-weight: 700; color: var(--ink-bright); }
.stat-danger { color: var(--danger-ink); }

.hall-of-fame-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}
.top-game-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-inset);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}
.top-game-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-bottom: 1px solid var(--border);
}
.top-game-info { padding: 6px; text-align: center; }
.top-game-info h5 {
    margin: 0;
    font-size: 9px;
    color: var(--ink-bright);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.top-game-info span { font-size: 9px; color: var(--ink-dim); }

/* ---------- Footer ---------- */
.site-footer {
    max-width: 1120px;
    margin: 76px auto 0;
    padding: 0 22px 40px;
}

.marquee-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.marquee-title {
    margin: 0 0 16px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--ink-dim);
}
.marquee-window {
    overflow: hidden;
    width: 100%;
    display: flex;
    mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
}
.marquee-content {
    list-style: none;
    display: flex;
    flex-shrink: 0;
    white-space: nowrap;
    gap: 40px;
    margin: 0;
    padding-left: 40px;
    animation: scroll-left 35s linear infinite;
}
.marquee-window:hover .marquee-content { animation-play-state: paused; }
.marquee-item {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    font-weight: 500;
    cursor: default;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s ease;
}
.marquee-item:hover {
    transform: scale(1.25);
    color: var(--ink-bright);
}
.marquee-item i { color: var(--accent-ink); margin-right: 10px; }

/* Marquee lives in the hero, right under the role line */
.hero .marquee-container { margin-top: 28px; }
.marquee-window { padding: 8px 0; } /* room for the hover scale-up */

.footer-meta { text-align: center; margin-top: 28px; }
.footer-prompt {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--accent-ink);
    margin: 0 0 12px;
}
.footer-connect { margin: 0 0 12px; font-size: 13px; }
.footer-connect a {
    color: var(--accent-ink);
    text-decoration: none;
    border-bottom: 1px dashed var(--accent);
    padding-bottom: 1px;
}
.footer-connect a:hover { border-bottom-style: solid; }
.footer-connect i { margin-right: 6px; }

.footer-legend { margin: 0; font-size: 12px; color: var(--ink-dim); }
.footer-legend i { color: var(--accent-ink); margin-right: 6px; }
.footer-copy { margin: 8px 0 0; font-size: 12px; color: var(--ink-dim); }

/* ---------- Animations ---------- */
@keyframes blinker { 50% { opacity: 0.25; } }
@keyframes twinkle { from { opacity: calc(var(--star-opacity) * 0.55); } to { opacity: var(--star-opacity); } }
@keyframes scroll-left { from { transform: translateX(0); } to { transform: translateX(-100%); } }
/* ---------- Boot intro (retro terminal splash) ----------
   Shown once per session; skipped entirely for reduced-motion users and
   repeat views via html.no-boot (set pre-paint in head.ejs). The delayed
   boot-failsafe animation guarantees it can never block the page if JS dies. */
#boot-screen {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999;
    background: #000;
    color: #33ff66;
    font-family: var(--font-mono);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 34px;
    cursor: pointer;
    transition: opacity 0.5s ease;
}
html.js:not(.no-boot) #boot-screen {
    display: flex;
    animation: boot-failsafe 0.5s ease 8s forwards;
}
#boot-screen.hide { opacity: 0; pointer-events: none; }
#boot-screen[hidden] { display: none !important; }

/* CRT scanlines */
#boot-screen::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.28) 0 1px, transparent 1px 3px);
}

#boot-log {
    margin: 0;
    width: min(88vw, 560px);
    height: 170px;
    font-size: 12px;
    line-height: 1.7;
    white-space: pre-wrap;
    text-align: left;
    opacity: 0.85;
    overflow: hidden;
}
#boot-log::after { content: "\2588"; animation: blinker 1s steps(2) infinite; }

#boot-welcome {
    margin: 0;
    min-height: 1.3em;
    font-size: clamp(2rem, 8vw, 4rem);
    font-weight: 700;
    letter-spacing: 0.35em;
    text-indent: 0.35em;
    text-align: center;
    text-shadow: 0 0 18px rgba(51, 255, 102, 0.7), 0 0 45px rgba(51, 255, 102, 0.35);
}

.boot-skip {
    position: absolute;
    bottom: 26px;
    margin: 0;
    font-size: 11px;
    opacity: 0.5;
}

@keyframes boot-failsafe { to { opacity: 0; visibility: hidden; } }

/* ---------- Scroll-triggered reveal (squash & stretch) ----------
   main.js tags elements with .reveal and adds .in when they scroll into
   view; .done is added on animationend so hover transforms work again.
   Everything stays fully visible with reduced motion or without JS. */
@media (prefers-reduced-motion: no-preference) {
    html.js .reveal {
        opacity: 0;
        transform-origin: 50% 100%;
    }
    html.js .reveal.in {
        animation: pop-in 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
        animation-delay: calc(var(--stagger, 0) * 75ms);
    }
    html.js .reveal.done {
        opacity: 1;
        animation: none;
    }
}

@keyframes pop-in {
    0%   { opacity: 0; transform: translateY(42px) scale(0.93, 1.1); }
    55%  { opacity: 1; transform: translateY(-7px) scale(1.02, 0.97); }
    78%  { transform: translateY(3px) scale(0.995, 1.015); }
    100% { opacity: 1; transform: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .marquee-window { overflow-x: auto; }
    .marquee-content { animation: none; }
    .marquee-content[aria-hidden="true"] { display: none; }
    .caret { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .offduty-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    /* App-style bottom tab bar; theme swatches float top-right.
       Both are position:fixed children of a non-filtered .top-bar. */
    .top-bar { position: static; padding: 0; display: block; }
    .prompt { display: none; }

    .pill-nav {
        position: fixed;
        left: 0; right: 0; bottom: 0;
        z-index: 100;
        width: 100%;
        flex-wrap: nowrap;
        justify-content: space-around;
        gap: 0;
        border-radius: 18px 18px 0 0;
        padding: 7px 4px calc(7px + env(safe-area-inset-bottom, 0px));
    }
    .pill-nav a {
        flex: 1;
        flex-direction: column;
        gap: 3px;
        padding: 7px 2px 5px;
        border-radius: 12px;
        font-size: 16px;
    }
    .nav-label {
        display: block;
        font-size: 9px;
        font-weight: 500;
        letter-spacing: 0.01em;
    }
    /* Blue marker over the active tab */
    .pill-nav a.active::before {
        content: "";
        position: absolute;
        top: 0; left: 50%;
        transform: translateX(-50%);
        width: 24px; height: 3px;
        border-radius: 0 0 3px 3px;
        background: var(--accent);
        box-shadow: 0 0 8px var(--accent);
    }

    .theme-pill {
        position: fixed;
        top: 10px; right: 10px;
        z-index: 100;
        padding: 7px 11px;
    }

    /* Keep content clear of the fixed bars */
    html { scroll-padding-top: 16px; scroll-padding-bottom: 88px; }
    body { padding-bottom: 74px; }
    .hero { padding-top: 64px; }
    .section { padding-top: 56px; }
    .hall-of-fame-grid { grid-template-columns: repeat(3, 1fr); }
    .stat-row { flex-direction: column; }
}
