@font-face {
  font-family: "Bricolage";
  src: url("../fonts/bricolage-grotesque.woff2") format("woff2-variations");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}

:root {
  --bg: #0d1220;
  --surface: #172036;
  --ink: #eceef3;
  --ink-2: #a3abbd;
  --rule: #273150;
  --line: #4d5878;
  --accent: #9aa6ff;
  --accent-ink: #0d1220;
  --screen: #05070d;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem);
  --step-3: clamp(2.5rem, 1.4rem + 4.6vw, 5.25rem);

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Bricolage", system-ui, sans-serif;
  font-size: var(--step-0);
  line-height: 1.55;
  font-variation-settings: "opsz" 14;
  font-optical-sizing: auto;
}
img { display: block; max-width: 100%; }
a { color: var(--accent); 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: 2px; }
h1, h2, h3 { margin: 0; font-weight: 700; }
p { margin: 0; }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 10; background: var(--surface); padding: 8px 12px; }

/* Masthead */
.masthead { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; padding: 22px 0 18px; }
.name { color: var(--ink); text-decoration: none; font-weight: 700; font-size: var(--step-1); font-stretch: 85%; letter-spacing: -0.01em; }
.masthead nav { display: flex; gap: clamp(16px, 3vw, 32px); }
.masthead nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.masthead nav a:hover { color: var(--accent); }

/* Hero */
.hero { padding-top: clamp(8px, 2vw, 24px); }
.hero h1 {
  font-size: var(--step-3);
  font-stretch: 75%;
  font-weight: 760;
  line-height: 0.92;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 96;
  max-width: 19ch;
  margin-bottom: clamp(20px, 3vw, 36px);
}
.hero-foot {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 72px);
  padding: 28px 0 clamp(48px, 8vw, 96px);
  align-items: start;
}
.summaries p[data-for] { font-size: var(--step-1); line-height: 1.45; max-width: 46ch; }
.avail { margin-top: 14px; color: var(--ink-2); max-width: 52ch; }

/* Role switch */
.role { margin: 0; }
#role-label { color: var(--ink-2); margin-bottom: 10px; }
.role-options { display: flex; flex-wrap: wrap; gap: 8px; }
.role-options label { position: relative; cursor: pointer; }
.role-options input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.role-options span {
  display: inline-block;
  color: var(--ink);
  padding: 8px 16px;
  border: 1.5px solid var(--rule);
  border-radius: 999px;
  background: var(--surface);
  font-weight: 560;
  font-size: var(--step--1);
  line-height: 1.3;
  transition: border-color .15s, background-color .15s, color .15s;
}
.role-options label:hover span { border-color: var(--ink-2); }
.role-options input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.role-options input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 3px; }
.resume-button {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 20px;
  padding: 12px 20px;
  background: var(--accent); color: var(--accent-ink);
  border-radius: 999px;
  text-decoration: none; font-weight: 640;
}
.resume-button:hover { background: #b6beff; }
.resume-button .pdf { font-size: 0.75rem; font-weight: 600; padding: 2px 7px; border-radius: 4px; background: rgb(13 18 32 / .14); }

/* Role filtering */
.js [data-for]:not(.role-on) { display: none; }

/* Reels */
.reel { margin: 0; }
.reel-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 10px;
  background: var(--screen);
  isolation: isolate;
}
.reel-poster, .reel-frame iframe, .reel-frame video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border: 0;
  transform: scale(var(--crop, 1));
  transform-origin: var(--focus, 50% 50%);
}
.reel-poster { z-index: 2; transition: opacity .6s ease; }
.reel-frame.live .reel-poster { opacity: 0; pointer-events: none; }
.reel-frame iframe.preview, .reel-frame video { pointer-events: none; z-index: 1; }
.reel-frame.full iframe { transform: none; z-index: 3; }
.reel-frame.full .reel-poster, .reel-frame.full .reel-sound { display: none; }
.reel-sound {
  position: absolute; z-index: 4; left: 14px; bottom: 14px;
  padding: 8px 14px 8px 12px;
  border: 0; border-radius: 999px;
  background: rgb(255 255 255 / .92); color: var(--ink);
  font: 600 var(--step--1)/1.2 "Bricolage", system-ui, sans-serif;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
}
.reel-sound::before { content: ""; width: 0; height: 0; border-left: 9px solid currentColor; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.reel-sound:hover { background: #fff; }
.reel-sound { color: #0d1220; }
.reel figcaption { margin-top: 10px; color: var(--ink-2); font-size: var(--step--1); }


/* Projects */
.work { display: flex; flex-direction: column; }
.project {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  grid-template-areas: "head head" "reel built";
  column-gap: clamp(24px, 4vw, 56px);
  row-gap: 24px;
  padding: clamp(40px, 6vw, 72px) 0;
  border-top: 1.5px solid var(--line);
}
.project-head { grid-area: head; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: clamp(24px, 4vw, 56px); align-items: end; }
.project-head h2 {
  grid-column: 1; grid-row: 1 / span 2;
  font-size: var(--step-3);
  font-stretch: 75%;
  font-weight: 760;
  line-height: 0.9;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 96;
}
.role-line { grid-column: 2; color: var(--ink-2); font-size: var(--step--1); }
.pitch { grid-column: 2; font-size: var(--step-1); line-height: 1.4; margin-top: 6px; }
.project .reel { grid-area: reel; align-self: start; position: sticky; top: 24px; }
.built { grid-area: built; }
.how { color: var(--ink-2); margin-bottom: 24px; max-width: 58ch; }
.did-title { font-size: var(--step-0); font-weight: 680; color: var(--ink-2); margin: 0 0 6px; }
.did { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--rule); }
.did li { border-top: 1px solid var(--rule); }
.did-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  width: 100%; padding: 13px 0;
  background: none; border: 0; color: var(--ink); text-align: left; cursor: pointer;
  font: 600 var(--step-1)/1.25 "Bricolage", system-ui, sans-serif;
  letter-spacing: -0.005em;
}
.did-head:hover { color: var(--accent); }
.did li.open .did-head { color: var(--accent); }
.has-video { flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: var(--step--1); font-weight: 560; color: var(--ink-2); }
.has-video::before { content: ""; border-left: 7px solid currentColor; border-top: 4.5px solid transparent; border-bottom: 4.5px solid transparent; }
.did-body { padding: 0 0 16px; }
.did-body p { max-width: 58ch; }
.js .did li:not(.open) .did-body { display: none; }
.reel-caption { margin-top: 10px; color: var(--ink-2); font-size: var(--step--1); }
.tools { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--rule); color: var(--ink-2); font-size: var(--step--1); }

/* Also */
.also { padding: clamp(40px, 6vw, 72px) 0; border-top: 1.5px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); gap: 24px clamp(24px, 4vw, 56px); }
.also h2, .about h2 { font-size: var(--step-2); font-stretch: 80%; letter-spacing: -0.01em; line-height: 1; }
.also dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(24px, 4vw, 48px); }
.also dl div { padding: 16px 0; border-top: 1px solid var(--rule); }
.also dt { font-weight: 680; }
.also dd { margin: 4px 0 0; color: var(--ink-2); max-width: 52ch; }

/* About */
.about { padding: clamp(40px, 6vw, 72px) 0 clamp(56px, 8vw, 96px); border-top: 1.5px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) minmax(0, 1.4fr); gap: 24px clamp(24px, 4vw, 56px); }
.about-body p { max-width: 56ch; }
.about-body p + p { margin-top: 14px; }
.email { display: inline-block; font-size: var(--step-1); font-weight: 640; margin-bottom: 18px; word-break: break-all; }
.links { list-style: none; margin: 0; padding: 0; }
.links li { padding: 8px 0; border-top: 1px solid var(--rule); }

.foot { padding: 20px 0 32px; border-top: 1px solid var(--rule); color: var(--ink-2); font-size: var(--step--1); }

/* Narrow */
@media (max-width: 900px) {
  .hero-foot { grid-template-columns: 1fr; }
  .project, .project-head { grid-template-columns: 1fr; grid-template-areas: "head" "reel" "built"; }
  .project-head h2, .role-line, .pitch { grid-column: 1; grid-row: auto; }
  .project .reel { position: static; }
  .role-line { margin-top: 14px; }
  .also, .about { grid-template-columns: 1fr; }
  .also dl { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .masthead nav a[href="#about"] { display: none; }
  .reel-sound { left: 10px; bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
