/* ---------- Tokens ---------- */
:root {
  --paper: #F3F4EF;
  --paper-2: #E8EAE2;
  --ink: #15203A;
  --ink-2: #49536A;
  --rule: #D3D7CC;
  --spark: #F2B10A;
  --spark-ink: #8C5B00;
  --band: #15203A;
  --band-ink: #F1F2EC;
  --band-ink-2: #9EA8BD;
  --focus: #15203A;

  --logo-knockout: var(--paper);

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 6px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0E1526;
    --paper-2: #151E33;
    --ink: #ECEEE6;
    --ink-2: #A6AFC2;
    --rule: #26314A;
    --spark-ink: #F2B10A;
    --band: #070B16;
    --focus: #F2B10A;
  }
}

:root[data-theme="dark"] {
  --paper: #0E1526;
  --paper-2: #151E33;
  --ink: #ECEEE6;
  --ink-2: #A6AFC2;
  --rule: #26314A;
  --spark-ink: #F2B10A;
  --band: #070B16;
  --focus: #F2B10A;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.6;
  font-stretch: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, ul, ol, dl, dd { margin: 0; }
h2 { text-wrap: balance; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: var(--spark);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.22em;
}
a:hover { text-decoration-color: currentColor; }

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

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.nowrap { white-space: nowrap; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Company logos: one color, sized per mark so they read at the same weight. */
.logo,
.job-logo {
  display: block;
  fill: currentColor;
  width: auto;
}
.logo-blizzard { aspect-ratio: 1000 / 520.683; }
.logo-sledgehammer { aspect-ratio: 92.34 / 75.406; }
.logo-amazon-games { aspect-ratio: 245.886 / 108.516; }
.logo-xbox { aspect-ratio: 713.6 / 568; }
.logo-sparks-infrastructure { aspect-ratio: 1; }

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
}
.skip:focus { top: 0.75rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.25rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:hover {
  background: var(--spark);
  border-color: var(--spark);
  color: #15203A;
}

.btn-quiet {
  background: transparent;
  color: var(--ink);
}
.btn-quiet:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.btn-small {
  min-height: 40px;
  padding: 0.45rem 0.95rem;
  font-size: 0.9375rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.topbar.is-scrolled { border-bottom-color: var(--rule); }

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 750;
  font-stretch: 112%;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  margin-right: auto;
}
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-tile { fill: #15203A; stroke: var(--rule); stroke-width: 1.5; }
.brand-bolt { fill: #F2B10A; }

.topnav {
  display: flex;
  gap: 1.75rem;
  font-size: 0.9875rem;
  font-weight: 500;
}
.topnav a {
  text-decoration-color: transparent;
  color: var(--ink-2);
}
.topnav a:hover { color: var(--ink); text-decoration-color: var(--spark); }

@media (max-width: 700px) {
  .topnav { display: none; }
  .brand span { font-size: 1rem; }
}

/* ---------- Hero ---------- */
.hero {
  padding-block: clamp(3.5rem, 9vw, 7.5rem) clamp(3.5rem, 8vw, 6.5rem);
}

.hero-grid {
  display: grid;
  gap: clamp(3rem, 6vw, 5rem);
}
@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    align-items: end;
  }
}

.name {
  font-size: clamp(3.4rem, 11.5vw, 8.25rem);
  font-weight: 850;
  font-stretch: 125%;
  line-height: 0.88;
  letter-spacing: -0.035em;
}
.name span { display: block; }

.role {
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  font-weight: 600;
  font-stretch: 100%;
  line-height: 1.3;
}

.lede {
  margin-top: 1rem;
  max-width: 58ch;
  color: var(--ink-2);
  font-size: 1.1875rem;
}

.hero .actions { margin-top: 2rem; }

.availability {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  line-height: 1.5;
  margin-top: 1.5rem;
  color: var(--ink-2);
  font-size: 1rem;
}

.pulse {
  position: relative;
  width: 10px;
  height: 10px;
  flex: none;
  margin-top: 0.45em;
  border-radius: 50%;
  background: var(--spark);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--spark) 28%, transparent);
}

.minor {
  font-size: 1rem;
  font-weight: 650;
  font-stretch: 100%;
  color: var(--ink-2);
  margin-bottom: 0.75rem;
}

.outcomes li {
  padding-block: 1rem;
  border-top: 1px solid var(--rule);
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--ink-2);
}
@media (min-width: 960px) {
  .outcomes li:last-child { border-bottom: 1px solid var(--rule); }
}
.outcomes strong {
  color: var(--ink);
  font-weight: 750;
  font-stretch: 110%;
}

.studios {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 3rem;
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding-top: clamp(1.75rem, 3vw, 2.25rem);
  border-top: 1px solid var(--rule);
}

.studios-label {
  color: var(--ink-2);
  font-size: 1rem;
  font-weight: 600;
}

.logo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.75rem clamp(2rem, 5vw, 3.75rem);
  color: var(--ink-2);
}
.logo-row .logo-blizzard { height: 52px; }
.logo-row .logo-sledgehammer { height: 46px; }
.logo-row .logo-amazon-games { height: 36px; }
.logo-row .logo-xbox { height: 44px; }

@media (max-width: 520px) {
  .logo-row { gap: 1.5rem 2.25rem; }
  .logo-row .logo-blizzard { height: 38px; }
  .logo-row .logo-sledgehammer { height: 36px; }
  .logo-row .logo-amazon-games { height: 27px; }
  .logo-row .logo-xbox { height: 34px; }
}

/* ---------- Credits roll ---------- */
.credits {
  --focus: var(--spark);
  background: var(--band);
  color: var(--band-ink);
  padding-block: clamp(4.5rem, 10vw, 8rem);
}

.credits-head {
  text-align: center;
  max-width: 48rem;
  margin-inline: auto;
  margin-bottom: clamp(3rem, 6vw, 4.5rem);
}
.credits-head h2 {
  font-size: clamp(2.1rem, 5vw, 3.5rem);
  font-weight: 800;
  font-stretch: 118%;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.credits-head p {
  margin-top: 1rem;
  color: var(--band-ink-2);
}

.roll {
  max-width: 64rem;
  margin-inline: auto;
}

.roll-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  text-align: center;
  padding-block: 1.4rem;
}

.roll dt { margin-bottom: 0.6rem; }

.studio {
  display: block;
  color: var(--spark);
  font-weight: 650;
  font-size: 1.0625rem;
  line-height: 1.3;
}
.dept {
  display: block;
  color: var(--band-ink-2);
  font-size: 0.9375rem;
  line-height: 1.4;
}

.roll dd {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-block: 0.3rem;
  font-size: clamp(1.4rem, 3.2vw, 2.25rem);
  font-weight: 650;
  font-stretch: 76%;
  line-height: 1.15;
  letter-spacing: -0.005em;
  text-align: left;
}

.game-icon {
  width: clamp(34px, 3.2vw, 44px);
  height: auto;
  aspect-ratio: 1;
  flex: none;
  border-radius: 23%;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.game-icon-tile { background: #F2DDB0; }

@media (min-width: 720px) {
  .roll-group {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    column-gap: clamp(1.75rem, 4vw, 3.5rem);
    justify-items: stretch;
    text-align: left;
  }
  .roll dt {
    grid-column: 1;
    grid-row: 1 / span 6;
    text-align: right;
    margin-bottom: 0;
    padding-top: 0.9rem;
  }
  .roll dd { grid-column: 2; }
}

.credits-foot {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  text-align: center;
  color: var(--band-ink-2);
  font-size: 1rem;
}
.credits-foot a { color: var(--band-ink); }

/* One orchestrated moment: the roll rises into place like end credits. */
.roll.is-pending dt,
.roll.is-pending dd {
  opacity: 0;
  transform: translateY(18px);
}
.roll.is-in dt,
.roll.is-in dd {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: calc(var(--i, 0) * 70ms);
}

/* ---------- Sections ---------- */
.section {
  padding-block: clamp(4.5rem, 9vw, 7rem);
}
.section + .section { padding-top: 0; }
.section-tight { padding-bottom: clamp(4rem, 8vw, 6rem); }

.section-title {
  font-size: clamp(2.1rem, 5vw, 3.25rem);
  font-weight: 800;
  font-stretch: 118%;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section-intro { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-intro .section-title { margin-bottom: 1rem; }
.section-intro p { color: var(--ink-2); }

/* ---------- Experience ---------- */
.job {
  display: grid;
  gap: 0.5rem 2.5rem;
  padding-block: clamp(1.75rem, 3.5vw, 2.5rem);
  border-top: 1px solid var(--rule);
}
.job:last-child { border-bottom: 1px solid var(--rule); }

@media (min-width: 800px) {
  .job { grid-template-columns: 12rem minmax(0, 1fr); }
}

.job-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 0.25rem;
}
@media (min-width: 800px) {
  .job-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
  }
}

.job-logo { color: var(--ink); }
.job-logo.logo-blizzard { height: 34px; }
.job-logo.logo-sledgehammer { height: 32px; }
.job-logo.logo-amazon-games { height: 24px; }
.job-logo.logo-xbox { height: 30px; }
.job-logo.logo-sparks-infrastructure { height: 28px; }

.job-when {
  color: var(--ink-2);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.job-body { max-width: 70ch; }

.job h3 {
  font-size: clamp(1.4rem, 2.6vw, 1.75rem);
  font-weight: 750;
  font-stretch: 112%;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.job h3 a { text-decoration-thickness: 3px; }

.job-role {
  margin-top: 0.2rem;
  color: var(--ink-2);
  font-size: 1.0625rem;
}

.job ul,
.project-detail ul { margin-top: 1rem; }

.job li,
.project-detail li {
  position: relative;
  padding-left: 1.25rem;
  margin-top: 0.55rem;
  font-size: 1.0625rem;
  line-height: 1.55;
}
.job li::before,
.project-detail li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 7px;
  height: 7px;
  border-radius: 1px;
  background: var(--spark);
  transform: rotate(45deg);
}

/* ---------- Projects ---------- */
.project {
  display: grid;
  gap: 1.5rem 2.5rem;
  padding-block: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--rule);
}

.project-icon {
  width: 104px;
  height: 104px;
  border-radius: 23%;
  background: var(--tile, var(--paper-2));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 12%, transparent), 0 10px 24px -14px rgba(21, 32, 58, 0.45);
}

@media (min-width: 720px) {
  .project { grid-template-columns: 136px minmax(0, 1fr); }
  .project-icon { width: 136px; height: 136px; grid-row: 1 / span 2; }
}

@media (min-width: 1040px) {
  .project { grid-template-columns: 136px minmax(0, 0.9fr) minmax(0, 1.1fr); }
  .project-icon { grid-row: auto; }
}

.project h3 {
  font-size: clamp(1.75rem, 3.4vw, 2.25rem);
  font-weight: 800;
  font-stretch: 112%;
  line-height: 1.1;
  letter-spacing: -0.015em;
}

.project-status {
  margin-top: 0.35rem;
  margin-bottom: 1rem;
  color: var(--spark-ink);
  font-size: 1rem;
  font-weight: 600;
}

.project-main > p:not(.project-status) { color: var(--ink-2); }

.project-links { margin-top: 1.25rem; font-weight: 600; }

.store-badge {
  display: inline-block;
  border-radius: 9px;
}
.store-badge img { width: 150px; height: auto; }
.store-badge .badge-dark { display: none; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .store-badge .badge-light { display: none; }
  :root:not([data-theme="light"]) .store-badge .badge-dark { display: block; }
}
:root[data-theme="dark"] .store-badge .badge-light { display: none; }
:root[data-theme="dark"] .store-badge .badge-dark { display: block; }

.project-detail h4 {
  font-size: 1rem;
  font-weight: 650;
  color: var(--ink-2);
}

.stack {
  margin-top: 1.25rem;
  font-size: 1rem;
  color: var(--ink-2);
}
.stack span {
  font-weight: 650;
  color: var(--ink);
  margin-right: 0.35rem;
}

/* ---------- Strengths and education ---------- */
.strengths,
.education {
  display: grid;
  gap: 2.25rem 2.5rem;
}
@media (min-width: 640px) {
  .strengths,
  .education { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1080px) {
  .strengths { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.strengths > div,
.education > div {
  padding-top: 1.1rem;
  border-top: 2px solid var(--ink);
}

.strengths h3,
.education h3 {
  font-size: 1.1875rem;
  font-weight: 750;
  font-stretch: 108%;
  line-height: 1.25;
  margin-bottom: 0.6rem;
}
.education h3 { font-size: 1.0625rem; }

.strengths p,
.education p {
  color: var(--ink-2);
  font-size: 1.0625rem;
  line-height: 1.55;
}
.strengths .stack {
  margin-top: 0.9rem;
  color: var(--ink);
  font-size: 0.975rem;
  font-weight: 500;
}

/* ---------- Contact ---------- */
.contact {
  padding-block: clamp(4.5rem, 9vw, 7rem);
  background: var(--paper-2);
}
.contact .section-title { margin-bottom: 1rem; }
.contact-lede {
  max-width: 52ch;
  color: var(--ink-2);
}
.contact-email {
  margin-block: 1.75rem 2rem;
  font-size: clamp(1.5rem, 4.6vw, 2.75rem);
  font-weight: 750;
  font-stretch: 105%;
  letter-spacing: -0.015em;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.contact-email a { text-decoration-thickness: 4px; text-underline-offset: 0.18em; }

/* ---------- Footer ---------- */
.footer {
  padding-block: 2rem;
  color: var(--ink-2);
  font-size: 0.9375rem;
  border-top: 1px solid var(--rule);
}

.project-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; }

.roll-link { display: flex; align-items: center; gap: 0.75rem; color: inherit; text-decoration: none; }
.roll-link:hover span, .roll-link:focus-visible span { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.15em; }
