:root {
  --page: #F6F6F3;
  --card: #FFFFFF;
  --ink: #111317;
  --muted: #5B6270;
  --line: #E4E4DF;
  --accent: #4B2FE0;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 1rem/1.65 "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration-color: var(--line); text-underline-offset: 3px; }
a:hover { color: var(--accent); text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }

main { max-width: 800px; margin: 0 auto; padding: 88px 24px 72px; }

header h1 {
  font: 800 clamp(3rem, 10vw, 5.5rem)/.95 "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -.03em;
}
.headline { margin-top: 16px; font-size: 1.2rem; font-weight: 500; }
.contact { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: .95rem; }

section { margin-top: 64px; }
h2 {
  display: flex; align-items: center; gap: 14px;
  font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 24px;
}
h2::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.profile p { font-size: 1.08rem; }
.profile p + p { margin-top: 16px; }

.skills { display: flex; flex-wrap: wrap; gap: 8px; }
.skills li { padding: 5px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); font-size: .9rem; }

.work { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.work li { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; }
.work h3 { font-size: 1rem; font-weight: 600; }
.work p { margin-top: 6px; color: var(--muted); font-size: .94rem; line-height: 1.55; }

.jobs > li { padding: 20px 0; border-top: 1px solid var(--line); }
.jobs > li:last-child { border-bottom: 1px solid var(--line); }
.job-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 16px; align-items: baseline; }
.job-head h3 { font-size: 1.05rem; font-weight: 600; }
.job-head h3 span { font-weight: 400; color: var(--muted); }
.dates { color: var(--muted); font-size: .9rem; white-space: nowrap; }
.jobs p { margin-top: 6px; color: var(--muted); }
.other { display: grid; gap: 6px; }
.other li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 16px; }
.other span:first-child { font-weight: 500; }

.edu p + p { margin-top: 10px; }
.edu .muted { color: var(--muted); }


@media (max-width: 640px) {
  main { padding: 56px 16px 56px; }
  section { margin-top: 48px; }
  .work { grid-template-columns: 1fr; }
}

/* tabs */
.tabs { display: flex; gap: 4px; margin: -40px 0 56px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 10px 14px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 500; font-size: .95rem; text-decoration: none; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }

/* BEAF */
.lead { margin-top: 18px; font-size: 1.08rem; }
.layers { display: grid; grid-template-columns: 1fr 220px; gap: 12px; align-items: start; }
.stack { display: grid; gap: 8px; }
.layer, .aside { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 20px; }
.layer h3, .aside h3, .items h3 { font-size: 1rem; font-weight: 600; }
.layer p, .aside p, .items p { margin-top: 4px; color: var(--muted); font-size: .94rem; line-height: 1.55; }
.layer.base { border-color: var(--ink); }
.aside { border-style: dashed; }
.note { margin-top: 16px; color: var(--muted); font-size: .94rem; }
.items { display: grid; gap: 18px; }
.intro { margin-bottom: 20px; }
.loop { padding: 0; margin: 0 0 20px; list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 6px; }
.loop li { padding: 6px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: .9rem; font-weight: 500; }
.loop li { position: relative; }
.loop li + li { margin-left: 18px; }
.loop li + li::before { content: "→"; position: absolute; left: -18px; color: var(--muted); font-weight: 400; }

/* Ghost */
.ghost h2.big { display: block; text-transform: none; letter-spacing: -.01em; font-size: 1.45rem; font-weight: 600; color: var(--ink); margin-bottom: 14px; }
.ghost h2.big::after { display: none; }
.ghost h3 { font-size: 1.05rem; font-weight: 600; margin: 22px 0 6px; }
.ghost p { margin-top: 8px; }
.ghost section > div, .ghost section > div > div { margin-top: 10px; }
.ghost .card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; margin-top: 10px; }
.ghost ul.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ghost ul.chips li { padding: 5px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); font-size: .9rem; }
.ghost ul.list { margin-top: 10px; padding-left: 1.2em; list-style: disc; }
.ghost ul.list li + li { margin-top: 4px; }
.ghost .quote { font-weight: 600; }
.ghost .badge { display: inline-block; margin: 0 4px 0 0; padding: 1px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--page); color: var(--muted); font-size: .75rem; font-weight: 500; vertical-align: 1px; }
.ghost table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: .92rem; }
.ghost th, .ghost td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-top: 1px solid var(--line); }
.ghost th { font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ghost details { margin-top: 8px; font-size: .9rem; color: var(--muted); }
.ghost details summary { cursor: pointer; color: var(--accent); font-weight: 500; }
.ghost details p { margin-top: 6px; }
.table-wrap { overflow-x: auto; }

@media (max-width: 640px) {
  .tabs { margin: -24px 0 40px; }
  .layers { grid-template-columns: 1fr; }
  .ghost { overflow-wrap: anywhere; }
  .ghost table, .ghost tbody, .ghost tr, .ghost td { display: block; }
  .ghost thead { display: none; }
  .ghost tr { padding: 12px 0; border-top: 1px solid var(--line); }
  .ghost td { border: 0; padding: 2px 0; }
}

/* games worked on */
.role-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.role-filter button { font: 500 .88rem "Geist", ui-sans-serif, system-ui, sans-serif; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--muted); cursor: pointer; }
.role-filter button:hover { color: var(--ink); border-color: var(--ink); }
.role-filter button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.studios { display: grid; gap: 12px; }
.studio { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 22px; }
.studio-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.studio-head h3 { font-size: 1.05rem; font-weight: 600; }
.studio-head a { font-size: .88rem; color: var(--muted); white-space: nowrap; }
.studio-note { margin-top: 6px; color: var(--muted); font-size: .94rem; }
.role-row { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: baseline; margin-top: 12px; transition: opacity .2s; }
.role-row h4 { margin: 0; font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.games { display: flex; flex-wrap: wrap; gap: 6px; }
.games li { padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--page); font-size: .9rem; }
.studios[data-show="lead"] .role-row:not([data-role="lead"]),
.studios[data-show="assist"] .role-row:not([data-role="assist"]),
.studios[data-show="reskin"] .role-row:not([data-role="reskin"]) { opacity: .2; }
.studios:not([data-show="all"]) .role-row .games li { border-color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .role-row { transition: none; } }
@media (max-width: 640px) {
  .studio { padding: 16px 16px; }
  .role-row { grid-template-columns: 1fr; gap: 6px; }
}

/* collapsible section */
.collapse summary { display: flex; align-items: center; gap: 14px; cursor: pointer; list-style: none; }
.collapse summary::-webkit-details-marker { display: none; }
.collapse summary h2 { flex: 1; margin: 0; }
.collapse-hint { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); font-size: .82rem; font-weight: 500; color: var(--muted); }
.collapse-hint::before { content: "Show"; }
.collapse-hint::after { content: "▾"; font-size: .75rem; }
.collapse[open] .collapse-hint::before { content: "Hide"; }
.collapse[open] .collapse-hint::after { content: "▴"; }
.collapse summary:hover .collapse-hint { color: var(--ink); border-color: var(--ink); }
.collapse[open] summary { margin-bottom: 24px; }
