/* Layout: a season-by-season stat sheet. A name plate sits beside the current game,
   then every game runs down one ruled column by year, like a player's career line. */
:root {
  --paper: #f3f5f8;
  --surface: #ffffff;
  --ink: #0f1724;
  --muted: #556074;
  --line: #d9e0e9;
  --accent: #cc4318;
  --on-accent: #ffffff;
  --link: #b13a12;
  --gold: #f8b51f;
  --gold-deep: #ee8d0b;
  --on-gold: #1c1407;

  --font-display: "Big Shoulders Display", "Bahnschrift", "Arial Narrow", sans-serif;
  --font-body: "Archivo", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.625rem;
  --step-3: clamp(2rem, 1.4rem + 2.4vw, 3rem);
  --step-4: clamp(2.75rem, 1.6rem + 4.6vw, 4.75rem);
  --step-5: clamp(4rem, 2rem + 9vw, 9.5rem);

  --radius: 14px;
  --max: 1160px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0c121b;
    --surface: #141c28;
    --ink: #e9eef5;
    --muted: #9aa6b8;
    --line: #243143;
    --accent: #ff6b3d;
    --on-accent: #1a0a03;
    --link: #ff946c;
    --gold: #f2aa1c;
    --gold-deep: #d9820a;
    --on-gold: #1c1407;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0c121b;
  --surface: #141c28;
  --ink: #e9eef5;
  --muted: #9aa6b8;
  --line: #243143;
  --accent: #ff6b3d;
  --on-accent: #1a0a03;
  --link: #ff946c;
  --gold: #f2aa1c;
  --gold-deep: #d9820a;
  --on-gold: #1c1407;
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; text-wrap: balance; line-height: 1.05; }
p { margin: 0; }
a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--gold); color: var(--on-gold); }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 720px) {
  .wrap {
    padding-left: max(32px, env(safe-area-inset-left, 0px));
    padding-right: max(32px, env(safe-area-inset-right, 0px));
  }
}

.label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 20;
}
.skip:focus { top: 12px; }

/* ---------- header / footer ---------- */
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding-block: 18px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 1.05rem;
  letter-spacing: 0;
}
.site-nav { display: flex; flex-wrap: wrap; gap: 4px; }
.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 6px 12px;
  border-radius: 999px;
}
.site-nav a:hover { background: var(--surface); }
.site-nav a[aria-current="page"] { background: var(--ink); color: var(--paper); }
@media (max-width: 520px) {
  .site-nav { gap: 2px; margin-inline: -8px; }
  .site-nav a { font-size: 0.88rem; padding: 6px 8px; }
}

.site-footer {
  margin-top: 96px;
  border-top: 1px solid var(--line);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
  padding-block: 28px 40px;
  font-size: var(--step--1);
  color: var(--muted);
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }

/* ---------- buttons ---------- */
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font: 600 0.98rem/1.2 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface); }
.btn-dark { background: var(--on-gold); color: var(--gold); }
.btn-outline-dark { background: transparent; color: var(--on-gold); border-color: color-mix(in srgb, var(--on-gold) 35%, transparent); }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- hero ---------- */
.hero .wrap {
  display: grid;
  gap: 40px;
  padding-block: 32px 72px;
}
@media (min-width: 940px) {
  .hero .wrap { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: center; gap: 56px; }
}
.hero-copy { display: grid; gap: 22px; min-width: 0; }
.hero h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--step-5);
  line-height: 0.84;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.hero h1 span { display: block; }
.hero h1 .accent { color: var(--accent); }
.lede { font-size: var(--step-2); font-weight: 600; line-height: 1.3; }
.school {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  max-width: 46ch;
  font-size: var(--step--1);
  color: var(--muted);
}
.school strong { color: var(--ink); font-weight: 600; }

/* ---------- PolyFootball card (the one loud thing) ---------- */
.feature {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  gap: 20px;
  padding: 22px;
  border-radius: 26px;
  color: var(--on-gold);
  background: radial-gradient(120% 90% at 50% 0%, var(--gold) 0%, var(--gold-deep) 100%);
  min-width: 0;
}
.feature::before {
  /* sunburst rays, taken from the PolyFootball icon */
  content: "";
  position: absolute;
  inset: -40% -40% auto;
  height: 160%;
  z-index: -1;
  background: repeating-conic-gradient(from 0deg at 50% 0%, rgb(255 255 255 / 0.13) 0deg 5deg, transparent 5deg 11deg);
  mask-image: radial-gradient(70% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(70% 60% at 50% 0%, #000 30%, transparent 75%);
}
.feature-media {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  max-width: 100%;
  background: #13202f url("../img/polyfootball/huddle-poster.webp") center / cover;
  box-shadow: 0 18px 40px -18px rgb(60 30 0 / 0.55);
}
.feature-media img { width: 100%; height: 100%; object-fit: cover; }
.feature-head { display: flex; align-items: center; gap: 14px; }
.feature-head img { width: 60px; height: 60px; border-radius: 15px; box-shadow: 0 4px 12px rgb(60 30 0 / 0.3); }
.feature .label { color: color-mix(in srgb, var(--on-gold) 72%, transparent); }
.feature h2 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.4rem, 1.8rem + 2.2vw, 3.4rem);
  text-transform: uppercase;
  line-height: 0.9;
}
.feature p { max-width: 40ch; }
.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  border-block: 1.5px solid color-mix(in srgb, var(--on-gold) 22%, transparent);
}
.stats div { padding: 12px 10px 12px 0; min-width: 0; }
.stats div + div { padding-left: 12px; border-left: 1.5px solid color-mix(in srgb, var(--on-gold) 22%, transparent); }
.stats dt {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.1rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stats dd { margin: 4px 0 0; font-size: 0.8rem; line-height: 1.3; }

@media (min-width: 560px) and (max-width: 939px) {
  .feature { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: center; }
  .feature-media { grid-row: span 4; }
}

/* ---------- sections ---------- */
.section { padding-block: 72px 0; }
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  margin-bottom: 28px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--step-4);
  text-transform: uppercase;
  line-height: 0.9;
}

/* ---------- games: the career line ---------- */
.games { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.game {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  grid-template-areas:
    "year year"
    "icon body";
  gap: 10px 16px;
  padding-block: 26px;
  border-bottom: 1px solid var(--line);
}
.game-year {
  grid-area: year;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2rem;
  line-height: 1;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.game-icon { grid-area: icon; width: 64px; height: 64px; border-radius: 15px; background: var(--surface); }
.game-body { grid-area: body; display: grid; gap: 8px; min-width: 0; }
.game-body h3 { font-size: var(--step-1); font-weight: 700; line-height: 1.25; }
.game-body p { color: var(--muted); max-width: 68ch; }
.game-links { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 0.95rem; font-weight: 600; }
.game-links .gone { color: var(--muted); font-weight: 500; font-style: italic; }
.game.current .game-year { color: var(--accent); }
.tag {
  display: inline-block;
  vertical-align: 0.2em;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--on-gold);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
@media (min-width: 720px) {
  .game {
    grid-template-columns: 7.5rem 72px minmax(0, 1fr);
    grid-template-areas: "year icon body";
    align-items: start;
    gap: 24px;
  }
  .game-year { font-size: 2.6rem; padding-top: 4px; }
  .game-icon { width: 72px; height: 72px; border-radius: 17px; }
}

/* ---------- early screenshots ---------- */
.era { display: grid; gap: 40px; }
.era + .era { margin-top: 56px; }
.era h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--step-3);
  text-transform: uppercase;
}
.story { display: grid; gap: 18px; }
@media (min-width: 860px) {
  .story { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 40px; align-items: start; }
}
.story-text { display: grid; gap: 12px; max-width: 46ch; }
.story-text .label { color: var(--accent); }
.shots { display: flex; flex-wrap: wrap; gap: 12px; }
.shots figure { margin: 0; }
.shots img {
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.shots.phone img { width: clamp(100px, 28vw, 190px); }
.shots figcaption { margin-top: 8px; font-size: var(--step--1); color: var(--muted); max-width: 32ch; }

/* ---------- about ---------- */
.about .wrap { display: grid; gap: 24px; }
@media (min-width: 860px) {
  .about .wrap { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 40px; }
}
.about-text { display: grid; gap: 18px; max-width: 64ch; font-size: 1.08rem; }

/* ---------- contact band ---------- */
.reach {
  display: grid;
  gap: 20px;
  padding: 32px;
  border-radius: 26px;
  background: var(--ink);
  color: var(--paper);
}
.reach h2 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--step-4);
  text-transform: uppercase;
  line-height: 0.9;
}
.reach .btn-ghost { color: var(--paper); border-color: color-mix(in srgb, var(--paper) 30%, transparent); }
.reach .btn-ghost:hover { background: color-mix(in srgb, var(--paper) 10%, transparent); }
@media (min-width: 860px) {
  .reach { grid-template-columns: minmax(0, 1fr) auto; align-items: end; padding: 44px; }
}

/* ---------- inner pages ---------- */
.page-head .wrap { display: grid; gap: 16px; padding-block: 28px 40px; }
.page-head h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--step-4);
  text-transform: uppercase;
  line-height: 0.9;
  max-width: 18ch;
}
.page-head p { max-width: 60ch; font-size: var(--step-1); color: var(--muted); }

.prose { display: grid; gap: 18px; max-width: 68ch; min-width: 0; }
.prose h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--step-3);
  text-transform: uppercase;
  line-height: 1;
  margin-top: 28px;
}
.prose h3 { font-size: var(--step-1); font-weight: 700; margin-top: 12px; }
.prose ul, .prose ol { margin: 0; padding-left: 1.3em; display: grid; gap: 8px; }

/* technical demos */
.demo { display: grid; gap: 22px; padding-block: 36px; border-top: 1px solid var(--line); }
.demo:first-of-type { border-top: 2px solid var(--ink); }
@media (min-width: 900px) {
  .demo.split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
  .demo.split.portrait { grid-template-columns: 300px minmax(0, 1fr); }
}
.video {
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  background: #0b1018;
  border: 1px solid var(--line);
}
.video video { width: 100%; height: auto; background: #0b1018; }
.video.portrait { max-width: 300px; }
.code-shot { margin: 0; display: grid; gap: 8px; }
.code-shot img { border-radius: 12px; border: 1px solid var(--line); width: 100%; max-width: 580px; }
.code-shot figcaption, .video figcaption { font-size: var(--step--1); color: var(--muted); }
.video figcaption { padding: 10px 14px; background: var(--surface); }
.problems { counter-reset: p; list-style: none; padding: 0 !important; }
.problems li {
  counter-increment: p;
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr);
  gap: 10px;
}
.problems li::before {
  content: counter(p);
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--surface);
  border: 1.5px solid var(--line);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
}

/* contact page */
.contact-grid { display: grid; gap: 20px; }
@media (min-width: 860px) { .contact-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); } }
.card {
  display: grid;
  gap: 16px;
  align-content: start;
  padding: 28px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  min-width: 0;
}
.card h2 { font-size: var(--step-2); font-weight: 700; }
.email {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.7rem, 1rem + 3.2vw, 3rem);
  line-height: 1;
  overflow-wrap: anywhere;
  user-select: all;
}
.copy-status { font-size: var(--step--1); color: var(--muted); min-height: 1.4em; }
.shelf { display: flex; flex-wrap: wrap; gap: 12px; }
.shelf a { display: block; border-radius: 16px; }
.shelf img { width: 64px; height: 64px; border-radius: 15px; transition: transform 0.15s ease; }
.shelf a:hover img { transform: translateY(-2px) rotate(-2deg); }

/* privacy policy: plain paragraphs, like a printed document */
.policy-contact { max-width: 72ch; margin-bottom: 40px; }
.policy { max-width: 72ch; }
.policy p { margin-bottom: 1.1em; }
.policy h2 {
  margin: 2.2em 0 0.8em;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.policy h3 { margin: 1.6em 0 0.6em; font-size: 1.05rem; font-weight: 700; }

/* 404 */
.lost { display: grid; gap: 18px; padding-block: 40px; }
.lost h1 { font-family: var(--font-display); font-weight: 900; font-size: var(--step-5); line-height: 0.85; text-transform: uppercase; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
