:root {
    /* Palette taken from the dark combat-log look Zaery picked: near-black
       panels, a navy header band, green as the main accent, with sky blue
       and amber as secondary highlights. */
    --bg: #070707;
    --surface: #141414;
    --raised: #222222;
    --border: #2c2c2c;
    --band: #001525;
    --text: #e8e8e8;
    --muted: #a3a3a3;
    --accent: #0e750e;         /* fills: buttons, bars, active states */
    --accent-bright: #2fc24a;  /* green text and links on dark */
    --accent-ink: #ffffff;
    --blue: #84bdf8;
    --amber: #d78e1d;
    --radius: 6px;
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-bright); }
h1, h2, h3 { line-height: 1.2; }

.container { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 16px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }

.site-header { border-bottom: 2px solid var(--accent); background: var(--band); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.brand { text-decoration: none; color: var(--text); display: flex; flex-direction: column; }
.brand-name { font-weight: 700; font-size: 1.15rem; }
.brand-title { color: var(--accent-bright); font-size: .85rem; }
nav { display: flex; flex-wrap: wrap; gap: 4px; margin-left: auto; }
nav a { color: var(--muted); text-decoration: none; padding: 6px 12px; border-radius: 6px; }
nav a:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
nav a.active { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent-bright); border-radius: 0; }

main.container { padding-top: 40px; padding-bottom: 56px; }

.hero h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin: 0 0 12px; }
.lede { color: var(--muted); font-size: 1.1rem; max-width: 70ch; margin: 0; }

.reel { margin: 32px 0 48px; }
.video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; border: 1px solid var(--border); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.project-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card > a { text-decoration: none; color: var(--text); }
.card img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; background: var(--border); }
.card h3 { margin: 14px 16px 6px; }
.card > a:hover h3 { color: var(--accent-bright); }
.card p { margin: 8px 16px 16px; color: var(--muted); }
.card .tags { margin: 0 16px; }

.tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font-size: .78rem; background: var(--raised); border: 1px solid var(--border); border-radius: 4px; padding: 1px 8px; color: var(--blue); }

.project, .resume { max-width: 760px; }
.project h1 { margin: 0 0 8px; }
.back { margin: 0 0 16px; }
.back a { color: var(--muted); text-decoration: none; }
.shot { border-radius: var(--radius); border: 1px solid var(--border); margin: 20px 0; width: 100%; background: var(--border); }
.role { padding-left: 20px; }

.button { display: inline-block; background: var(--accent); color: var(--accent-ink); text-decoration: none; padding: 10px 18px; border-radius: 8px; font-weight: 600; }
.button:hover { filter: brightness(1.2); }

.pdf { width: 100%; height: 80vh; border: 1px solid var(--border); border-radius: var(--radius); margin-top: 16px; }

.site-footer { border-top: 1px solid var(--border); background: var(--band); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding-top: 20px; padding-bottom: 20px; }
.contact { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 18px; }
.contact a { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; }
.contact a:hover { color: var(--accent-bright); }
.copyright { color: var(--muted); margin: 0; font-size: .9rem; }

/* Resume home */
.role-title { color: var(--accent-bright); font-weight: 600; margin: -4px 0 12px; font-size: 1.1rem; }
.hero-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.button.secondary { background: var(--raised); color: var(--text); border: 1px solid var(--border); }
.page-head { margin-bottom: 8px; }
.page-head h1 { margin: 0 0 8px; }
.muted { color: var(--muted); font-weight: 400; }

.resume-block { margin: 48px 0; }
h2 { font-size: 1.5rem; margin: 48px 0 16px; padding: 0 0 8px 12px; border-bottom: 1px solid var(--border); border-left: 4px solid var(--accent); }
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px 24px; margin: 0; }
.skills dt { font-weight: 600; margin-bottom: 6px; color: var(--accent-bright); }
.skills dd { margin: 0; }
.skills .tags { margin: 0; }

.game-index { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.game-index a { text-decoration: none; border: 1px solid var(--border); border-radius: 999px; padding: 4px 14px; color: var(--text); font-size: .9rem; }
.game-index a:hover { border-color: var(--accent-bright); color: var(--accent-bright); }

.game { background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--accent); border-radius: var(--radius); padding: 20px; margin: 24px 0; scroll-margin-top: 16px; }
.game header h3 { margin: 0; font-size: 1.4rem; color: var(--accent-bright); }
.tagline { margin: 2px 0 8px; color: var(--muted); }
.game-hero img { border-radius: 8px; width: 100%; margin: 12px 0 16px; background: var(--border); }
.game-body { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 860px) { .game-body { grid-template-columns: 1.2fr 1fr; } }
.game-body p { margin-top: 0; }
.highlights { padding-left: 20px; margin: 0; }
.highlights li { margin-bottom: 6px; }
.highlights li::marker { color: var(--accent-bright); }
.gallery { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; align-content: start; }
.gallery img { border-radius: 6px; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--border); transition: transform .15s; }
.gallery a:hover img, .gallery a:focus img { transform: scale(1.03); outline: 2px solid var(--accent-bright); }

.more-games { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.more-games h3 { margin: 0 0 4px; font-size: 1.1rem; }
.more-games p { margin: 0; color: var(--muted); }
.job { margin-bottom: 24px; }
.job h3 { margin: 0 0 4px; font-size: 1.1rem; }
.job p { margin: 0 0 4px; }
.job ul { margin: 6px 0; }
.job .tags { margin: 8px 0 0; }

.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1600px, 96vw); color: #fff; }
.lightbox::backdrop { background: rgba(0, 0, 0, .85); }
.lightbox img { max-height: 85vh; width: auto; margin: 0 auto; border-radius: 6px; }
.lightbox p { text-align: center; margin: 10px 0 0; }
.lightbox button { position: fixed; top: 12px; right: 16px; background: none; border: 0; color: #fff; font-size: 2.2rem; cursor: pointer; }
.no-shot { aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; padding: 16px; text-align: center; background: var(--band); color: var(--accent-bright); font-weight: 600; font-size: 1.2rem; }

html { scroll-behavior: smooth; }
main section[id] { scroll-margin-top: 16px; }
@media (max-width: 600px) {
    nav a { padding: 6px 8px; font-size: .9rem; }
}
