:root {
  --paper: #F6F7F5;
  --ink: #16191D;
  --muted: #5E646B;
  --rule: #D9DCD7;
  --tile: #E6E8E4;
  --accent: #2F3FCF;
  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --body: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121416;
    --ink: #ECEDEA;
    --muted: #9AA0A6;
    --rule: #2A2E33;
    --tile: #1E2124;
    --accent: #8C98FF;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 48px); }
.narrow { max-width: 68ch; }

/* Header */
.site-header .wrap {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 28px; padding-bottom: 28px;
}
.brand { display: inline-flex; text-decoration: none; color: var(--ink); }
.logo { height: 60px; width: auto; display: block; }
.site-nav a { text-decoration: none; margin-left: clamp(16px, 3vw, 32px); color: var(--muted); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 6px; text-decoration-thickness: 2px; }

/* Type */
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; margin: 0; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }

/* Hero */
.hero { padding-top: clamp(40px, 9vw, 110px); padding-bottom: clamp(56px, 8vw, 96px); }
.hero h1 {
  font-size: clamp(3.4rem, 12vw, 10rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.045em;
}
.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .line span { display: block; animation: rise 0.9s cubic-bezier(.2,.7,.1,1) both; }
.hero h1 .line + .line span { animation-delay: 0.12s; }
@keyframes rise { from { transform: translateY(100%); } to { transform: none; } }
.hero .intro { font-size: clamp(1.15rem, 2vw, 1.4rem); max-width: 40ch; margin: 40px 0 0; }

.disciplines {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
  margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--rule);
}
.disciplines h2 { font-size: 1.15rem; margin-bottom: 8px; }
.disciplines p { color: var(--muted); max-width: 42ch; margin: 0; }

.actions { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; margin-top: 44px; }
.btn {
  display: inline-block; padding: 14px 24px; border-radius: 999px;
  background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 500;
  border: 0; font: inherit; cursor: pointer;
}
.btn:hover { background: var(--accent); color: #fff; }
.link { font-weight: 500; text-underline-offset: 5px; text-decoration-color: var(--accent); }

/* Sections */
.section { padding: clamp(56px, 8vw, 96px) 0; border-top: 1px solid var(--rule); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 40px; }

/* Filter */
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters button {
  font: inherit; font-size: 0.95rem; padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--rule); background: transparent; color: var(--muted); cursor: pointer;
}
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* Work grid */
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 64px 32px; }
.project { text-decoration: none; display: block; }
.project[hidden] { display: none; }
.project.featured { grid-column: 1 / -1; }
.project .thumb { background: var(--tile); border-radius: 4px; overflow: hidden; aspect-ratio: 4 / 3; }
.project.featured .thumb { aspect-ratio: 16 / 8; }
.project .thumb img { width: 100%; height: 100%; object-fit: cover; }
.project h3 { margin: 20px 0 6px; }
.project:hover h3 { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 5px; }
.project p { color: var(--muted); margin: 0; max-width: 60ch; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.tags span { font-size: 0.85rem; padding: 3px 10px; border: 1px solid var(--rule); border-radius: 999px; color: var(--muted); }

/* Experience */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 160px 1fr; gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--rule); }
.timeline .years { color: var(--muted); font-variant-numeric: tabular-nums; }
.timeline strong { font-weight: 600; display: block; }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); padding: 40px 0 56px; margin-top: 40px; }
.site-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; color: var(--muted); }
.site-footer a { text-decoration: none; margin-left: 20px; }
.site-footer a:first-child { margin-left: 0; }

.cta-block h2 { font-size: clamp(2rem, 5vw, 3.6rem); max-width: 18ch; margin-bottom: 28px; }

/* Case study */
.cs-hero { padding-top: clamp(32px, 6vw, 72px); padding-bottom: 40px; }
.cs-hero .kicker { color: var(--muted); margin-bottom: 16px; }
.cs-hero h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); max-width: 20ch; letter-spacing: -0.035em; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 48px 0 0; padding-top: 24px; border-top: 1px solid var(--rule); }
.facts dt { color: var(--muted); font-size: 0.9rem; }
.facts dd { margin: 4px 0 0; }
.cover { background: var(--tile); border-radius: 4px; overflow: hidden; margin: 24px 0 0; }
.cover img { width: 100%; }
.cs-body { padding-top: 24px; padding-bottom: 40px; }
.cs-body h2 { margin: 72px 0 20px; }
.cs-body h3 { margin: 40px 0 10px; font-size: 1.2rem; }
.cs-body ul { padding-left: 1.2em; }
.cs-body li { margin-bottom: 8px; }
figure { margin: 40px 0; }
figure .img { background: var(--tile); border-radius: 4px; overflow: hidden; }
figcaption { color: var(--muted); font-size: 0.92rem; margin-top: 10px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.next { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 40px 0; border-top: 1px solid var(--rule); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 40px 0; }
.steps figure { margin: 0; }
.steps .img { aspect-ratio: 16 / 9; }
.steps .img img { width: 100%; height: 100%; object-fit: cover; }
.steps.two { grid-template-columns: 1fr 1fr; }
@media (max-width: 760px) { .steps, .steps.two { grid-template-columns: 1fr; } }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 32px; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; background: var(--tile); }
.video { aspect-ratio: 16 / 9; background: var(--tile); border-radius: 4px; overflow: hidden; margin-top: 32px; display: grid; place-items: center; color: var(--muted); }
.video iframe { width: 100%; height: 100%; border: 0; }

.productions { display: grid; grid-template-columns: 1fr 1fr; gap: 48px 32px; margin-top: 8px; }
.production h3 { margin: 18px 0 4px; }
.production p { margin: 0 0 6px; }
@media (max-width: 760px) { .productions { grid-template-columns: 1fr; } }

.supervised { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px 28px; margin-top: 8px; }
.supervised p { margin: 0 0 8px; }
.supervised .production h3 { margin-top: 18px; }
.credit { font-size: 0.92rem; padding-top: 8px; border-top: 1px solid var(--rule); }
@media (max-width: 960px) { .supervised { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .supervised { grid-template-columns: 1fr; } }

.yt { display: block; width: 100%; padding: 0; border: 0; cursor: pointer; position: relative; font: inherit; }
.yt img { width: 100%; height: 100%; object-fit: cover; }
.yt .play { position: absolute; left: 50%; top: 50%; width: 68px; height: 68px; margin: -34px 0 0 -34px; border-radius: 50%; background: rgba(0,0,0,.65); }
.yt .play::after { content: ""; position: absolute; left: 27px; top: 22px; border-style: solid; border-width: 12px 0 12px 20px; border-color: transparent transparent transparent #fff; }
.yt:hover .play { background: var(--accent); }

@media (max-width: 760px) { .project.featured.wide .thumb { aspect-ratio: 2 / 1; } }

/* About */
.about-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.portrait { background: var(--tile); border-radius: 4px; overflow: hidden; aspect-ratio: 4 / 5; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.skills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.skills h3 { font-size: 1.05rem; margin-bottom: 8px; }
.skills p { color: var(--muted); margin: 0; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); }
.contact-list { list-style: none; padding: 0; margin: 24px 0 0; }
.contact-list li { padding: 16px 0; border-bottom: 1px solid var(--rule); }
.contact-list span { display: block; color: var(--muted); font-size: 0.9rem; }
form label { display: block; font-weight: 500; margin: 0 0 6px; }
form .field { margin-bottom: 20px; }
form input, form textarea {
  width: 100%; font: inherit; color: var(--ink); background: transparent;
  border: 1px solid var(--rule); border-radius: 6px; padding: 12px 14px;
}
form textarea { min-height: 160px; resize: vertical; }
.hidden-field { position: absolute; left: -9999px; }

@media (max-width: 960px) {
  .work-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .disciplines, .work-grid, .pair, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .work-grid { gap: 48px; }
  .project.featured .thumb { aspect-ratio: 4 / 3; }
  .facts { grid-template-columns: 1fr; }
  .skills { grid-template-columns: 1fr; }
  .timeline li { grid-template-columns: 1fr; gap: 4px; }
  .logo { height: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; }
}
