/* Palette: 18% grey card, ink, daylight blue, frame black */
:root {
  --card: #9a9a96;
  --card-deep: #8a8a86;
  --ink: #141414;
  --daylight: #1d3fe0;
  --frame: #101010;
  --paper: #ecece8;
  --gutter: clamp(16px, 4vw, 56px);
  --sans: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--card);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: 0.2em; }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--daylight);
  outline-offset: 3px;
}

/* ---------- Header ---------- */
.top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding: 20px var(--gutter);
  font-size: 16px;
}
.top nav { display: flex; gap: 24px; flex-wrap: wrap; }
.top a { text-decoration: none; }
.top a:hover { text-decoration: underline; }
.top .name { font-weight: 700; }
.top nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }

/* ---------- Titles ---------- */
h1 {
  font-weight: 800;
  font-size: clamp(38px, 11.5vw, 190px);
  line-height: 0.86;
  letter-spacing: -0.045em;
  margin-bottom: 28px;
}
h1.page-title { font-size: clamp(44px, 9vw, 140px); }
h2 {
  font-size: clamp(28px, 4vw, 52px);
  letter-spacing: -0.03em;
  line-height: 1;
  font-weight: 800;
  margin-bottom: 28px;
}

/* ---------- Home hero ---------- */
.hero { padding: 24px var(--gutter) 0; }
.stage {
  background: var(--card-deep);
  padding: clamp(8px, 2vw, 24px) 0;
  margin: 0 calc(var(--gutter) * -1);
  display: flex;
  justify-content: center;
}
.frame {
  width: min(100%, 1100px, calc(72vh * var(--rn, 2.39)));
  aspect-ratio: var(--ratio, 2.39 / 1);
  background: var(--frame);
  color: var(--paper);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  transition: aspect-ratio 0.45s cubic-bezier(.2,.7,.2,1);
}
.frame p { max-width: 32ch; font-size: 16px; opacity: 0.85; }
.ratios { display: flex; gap: 8px; justify-content: center; padding: 14px 0 0; }
.ratios button {
  font: inherit;
  font-size: 15px;
  padding: 6px 14px;
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  cursor: pointer;
}
.ratios button[aria-pressed="true"] { background: var(--ink); color: var(--card); }
.tagline {
  padding: 36px 0 12px;
  max-width: 28ch;
  font-size: clamp(22px, 2.6vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  font-weight: 500;
}

/* ---------- Sections ---------- */
section { padding: 72px var(--gutter) 0; }
.page { padding: 24px var(--gutter) 0; }

/* ---------- Work list ---------- */
.work ul { list-style: none; padding: 0; border-top: 2px solid var(--ink); }
.work li { border-bottom: 1px solid var(--ink); }
.work a {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 20px 0;
  text-decoration: none;
}
.work .title { font-size: clamp(24px, 3.4vw, 44px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.05; }
.work .meta { font-size: 16px; margin-top: 4px; }
.work .thumb {
  width: clamp(110px, 18vw, 240px);
  aspect-ratio: 2.39 / 1;
  background: var(--frame);
  transition: width 0.25s ease;
}
.work a:hover .title, .work a:focus-visible .title { color: var(--daylight); }
.work a:hover .thumb, .work a:focus-visible .thumb { width: clamp(140px, 24vw, 320px); }

/* ---------- Stills ---------- */
.stills {
  columns: 3 280px;
  column-gap: 12px;
  padding-top: 24px;
}
.stills figure { break-inside: avoid; margin-bottom: 12px; }
.stills .still {
  background: var(--frame);
  width: 100%;
  aspect-ratio: var(--r, 16 / 9);
}
.stills img { display: block; width: 100%; height: auto; }
.stills figcaption { font-size: 15px; padding-top: 6px; }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--gutter);
  align-items: start;
  padding-top: 24px;
}
.portrait { background: var(--frame); aspect-ratio: 4 / 5; width: 100%; }
.portrait img { display: block; width: 100%; height: 100%; object-fit: cover; }
.about-text p { max-width: 52ch; margin-bottom: 1em; }
.facts { margin-top: 32px; border-top: 2px solid var(--ink); max-width: 52ch; }
.facts div { display: grid; grid-template-columns: 9em 1fr; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--ink); }
.facts dt { font-weight: 700; }
.facts dd { margin: 0; }

/* ---------- Contact ---------- */
.mail {
  font-size: clamp(28px, 6vw, 84px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1;
  word-break: break-word;
  text-decoration: none;
  color: var(--daylight);
}
.mail:hover { text-decoration: underline; text-decoration-thickness: 4px; }

/* ---------- Legal text ---------- */
.legal { max-width: 60ch; }
.legal h2 { font-size: 24px; margin: 32px 0 8px; letter-spacing: -0.01em; }
.legal p { margin-bottom: 1em; }

/* ---------- Footer ---------- */
footer {
  padding: 96px var(--gutter) 40px;
  font-size: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
}

@media (max-width: 720px) {
  .about-grid { grid-template-columns: 1fr; }
  .facts div { grid-template-columns: 1fr; gap: 0; }
  .top nav { gap: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .frame, .work .thumb { transition: none; }
}
