/* Layout: one quiet left-aligned column, name on top, big intro, plain list of work. */
:root {
  --bg: #F9F9F9;
  --fg: #0D0D0D;
  --muted: #66666F;
  --line: #E3E3E7;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --step-0: 1rem;
  --step-1: 1.125rem;
  --step-2: clamp(1.25rem, 1.05rem + 0.9vw, 1.5rem);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}
.wrap {
  max-width: 50rem;
  margin: 0 auto;
  padding-block: 2.25rem 5rem;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
a { color: inherit; }
.inline-link, .prose a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
.inline-link:hover, .prose a:hover { color: var(--muted); }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 2px; }

.name { font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.625rem); font-weight: 500; letter-spacing: -0.018em; line-height: 1.2; margin: 0; text-decoration: none; display: inline-block; }
.hero { display: flex; align-items: center; gap: 1.25rem; }
.hero-text { min-width: 0; }
.headshot { display: block; flex: none; width: 6.5rem; height: 6.5rem; max-width: 100%; border-radius: 50%; object-fit: cover; margin: 0; background: var(--line); }
.hero .links { margin-top: 0.55rem; }
@media (max-width: 420px) { .headshot { width: 4.5rem; height: 4.5rem; } .hero { gap: 0.9rem; } .hero .links { gap: 0.3rem 0.75rem; font-size: 0.9375rem; } }
.links { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem; }
.links a { display: inline-flex; align-items: center; gap: 0.35rem; text-decoration: none; }
.links svg { width: 0.85em; height: 0.85em; fill: none; stroke: var(--muted); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s, stroke .15s; }
.links a:hover svg { stroke: var(--fg); transform: translate(1px, -1px); }
.links a:hover { color: var(--muted); }
a.name:hover { color: var(--muted); }

/* home */
.intro {
  font-size: var(--step-2);
  line-height: 1.38;
  letter-spacing: -0.012em;
  margin: clamp(4rem, 10vw, 6.5rem) 0 0;
  max-width: 33em;
}
.work { list-style: none; padding: 0; margin: clamp(4rem, 10vw, 6.5rem) 0 0; }
.work li a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-block: 0.2rem;
  font-size: var(--step-1);
  text-decoration: none;
}
.work .tag { color: var(--muted); font-size: 0.9375rem; white-space: nowrap; transition: color .15s; }
.work li a:hover .tag { color: var(--fg); }
.work li a:hover .title { color: var(--muted); }
.group-label { color: var(--muted); font-size: 0.9375rem; margin: 3rem 0 0.5rem; }
.hero + .group-label { margin-top: clamp(3.5rem, 8vw, 5rem); }
.group-label + .work, .group-label + .intro { margin-top: 0; }
.foot { margin-top: 4.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.875rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--fg); }

/* project pages */
.back { color: var(--muted); font-size: 0.9375rem; text-decoration: none; display: inline-block; transition: color .15s; }
.back:hover { color: var(--fg); }
.video { position: relative; aspect-ratio: 16 / 9; margin: 2.5rem 0 0; border-radius: 10px; overflow: hidden; background: #0D0D0D; }
.video button { all: unset; cursor: pointer; position: absolute; inset: 0; display: block; }
.video img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video .play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 4rem; height: 4rem; border-radius: 50%; background: rgba(13,13,13,.72); display: grid; place-items: center; box-shadow: 0 0 0 1px rgba(249,249,249,.3); transition: background .15s, transform .15s; }
.video button:hover .play, .video button:focus-visible .play { background: rgba(13,13,13,.9); transform: translate(-50%, -50%) scale(1.05); }
.video .play svg { width: 1.4rem; height: 1.4rem; margin-left: 0.2rem; fill: #F9F9F9; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-cap { color: var(--muted); font-size: 0.875rem; margin: 0.6rem 0 0; }
.page-top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin: 1.75rem 0 1.25rem; }
.kicker { color: var(--muted); font-size: 0.9375rem; margin: 0; }
h1 { font-size: var(--step-2); font-weight: 500; letter-spacing: -0.015em; line-height: 1.3; margin: 0; text-wrap: balance; }
.lede { font-size: var(--step-2); line-height: 1.38; letter-spacing: -0.012em; color: var(--muted); margin: 0.75rem 0 0; max-width: 33em; }
.meta { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 0.55rem 1.5rem; margin: 3rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.meta dt { color: var(--muted); font-size: 0.9375rem; }
.meta dd { margin: 0; min-width: 0; }
.prose { max-width: 65ch; }
.prose h2 { font-size: var(--step-0); font-weight: 600; margin: 3rem 0 0.5rem; letter-spacing: -0.005em; }
.prose p { margin: 0 0 1rem; }
.flow { list-style: none; padding: 0; margin: 0.25rem 0 0; counter-reset: step; display: grid; gap: 0.6rem; }
.flow li { counter-increment: step; display: grid; grid-template-columns: 2rem minmax(0, 1fr); }
.flow li::before { content: counter(step, decimal-leading-zero); color: var(--muted); font-variant-numeric: tabular-nums; font-size: 0.9375rem; padding-top: 0.05rem; }
.flow strong { font-weight: 500; }
.flow span { color: var(--muted); }
.plain-list { padding-left: 1.1rem; margin: 0.25rem 0 1rem; }
.plain-list li { margin-bottom: 0.4rem; }
.figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem 1.5rem; margin: 2.5rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.figures div { min-width: 0; }
.figures dt { font-size: var(--step-2); font-weight: 500; letter-spacing: -0.015em; font-variant-numeric: tabular-nums; }
.figures dd { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.875rem; line-height: 1.4; }
.note { color: var(--muted); font-size: 0.875rem; }
.table-wrap { overflow-x: auto; margin: 0.5rem 0 1.25rem; }
table { border-collapse: collapse; width: 100%; font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 0.45rem 1rem 0.45rem 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
thead th { color: var(--muted); font-weight: 400; font-size: 0.875rem; }
tbody th { color: var(--muted); font-weight: 400; }
.campaigns tbody th { color: var(--fg); vertical-align: top; }
.campaigns td { vertical-align: top; }
.campaigns td:last-child { white-space: normal; min-width: 14rem; padding-right: 0; }
.campaigns .sub { color: var(--muted); font-size: 0.8125rem; }
.pager { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem 2rem; margin-top: 4.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: 0.9375rem; }
.pager a { text-decoration: none; color: var(--muted); }
.pager a:hover { color: var(--fg); }
.pager b { font-weight: 500; color: var(--fg); }

@media (max-width: 640px) {
  .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .meta { grid-template-columns: minmax(0, 1fr); gap: 0.1rem; }
  .meta dd { margin-bottom: 0.7rem; }
}

/* scramble: hide only while the script is about to take over */
.scramble-pending [data-scramble] { visibility: hidden; }
