:root {
  --bg: #fdf9f2;
  --text: #141414;
  --line: #d8d3ca;
  --accent: #ee3e2b;
  --max: 1480px;
}

* { box-sizing: border-box; }
html {
  max-width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.3;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
@supports (overflow: clip) {
  html,
  body { overflow-x: clip; }
}
body.lightbox-open { overflow: hidden; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
button { font: inherit; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  padding: 26px clamp(18px, 2.5vw, 36px);
  pointer-events: none;
}
.site-header a { width: max-content; pointer-events: auto; }
.site-header a:last-child { justify-self: end; }

main {
  position: relative;
  z-index: 1;
  width: min(var(--max), calc(100% - clamp(24px, 4vw, 64px)));
  margin: 0 auto;
  padding-bottom: 110px;
}
.hero {
  min-height: calc(100svh - 70px);
  display: grid;
  align-content: center;
  justify-items: center;
  padding: clamp(90px, 10vw, 150px) 0 clamp(130px, 15vw, 220px);
  text-align: center;
}
.eyebrow {
  margin: 0 0 22px;
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  opacity: .55;
}
.hero h1 {
  margin: 0;
  font-size: clamp(54px, 11.5vw, 170px);
  line-height: .88;
  font-weight: 700;
  letter-spacing: -.065em;
}
.hero-role { margin: clamp(16px, 2vw, 28px) 0 0; font-size: clamp(18px, 2.4vw, 34px); line-height: 1; }
.project { position: relative; margin: 0 auto clamp(250px, 31vw, 500px); }
.project-meta { width: 100%; margin-top: 16px; text-align: center; }
.project-meta p, h2, .page-text p { margin: 0; }
.project-meta a { margin-left: .25em; }
.project-meta .credit-link { margin-left: 0; }
.media-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 1.1vw, 16px); }
.media-row a { display: block; overflow: hidden; background: #ebe7dc; text-decoration: none; }
.media-row img { transition: transform .55s cubic-bezier(.2,.7,.2,1), filter .4s ease; }
.media-row a:hover img { transform: scale(1.018); }
.landscape a { aspect-ratio: 16 / 9; }
.photo a { aspect-ratio: 3 / 2; }
.portrait { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.portrait a { aspect-ratio: 739 / 1600; }
.portrait-nine-sixteen a { aspect-ratio: 9 / 16; }
.portrait img { object-fit: contain; }
.portrait-nine-sixteen img { object-fit: cover; }
.page-text {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 620px) 1fr;
  gap: 22px;
  padding-top: 48px;
  margin-top: 80px;
  border-top: 1px solid var(--line);
}
.page-text h2 { font-size: 14px; line-height: 1.25; }
.page-text p { text-align: center; }
.contact-section { margin-top: 100px; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 70px;
  background: color-mix(in srgb, var(--bg) 96%, transparent);
}
.lightbox.is-open { display: flex; }
.lightbox img { width: auto; height: auto; max-width: min(1500px, 84vw); max-height: 82vh; object-fit: contain; }
.lightbox button {
  position: fixed;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.lightbox-close { top: 28px; right: 36px; }
.lightbox-prev { top: 50%; left: 36px; transform: translateY(-50%); }
.lightbox-next { top: 50%; right: 36px; transform: translateY(-50%); }

.quirk-control {
  position: fixed;
  z-index: 30;
  right: clamp(14px, 2.5vw, 36px);
  bottom: clamp(14px, 2.5vw, 32px);
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 10px 15px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--text);
}
.quirk-control:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--text); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 760px) {
  .site-header { padding: 18px 12px; gap: 10px; }
  main { width: calc(100% - 24px); }
  .hero { min-height: 72svh; padding: 72px 0 100px; }
  .hero h1 { font-size: clamp(48px, 15vw, 78px); }
  .hero-role { font-size: 18px; }
  .project { margin-bottom: 220px; }
  .project-meta, .project-meta p { margin-top: 12px; text-align: left; }
  .media-row {
    grid-template-columns: 1fr;
    gap: 10px;
    width: 100vw;
    max-width: none;
    margin-right: calc(50% - 50vw);
    margin-left: calc(50% - 50vw);
  }
  .portrait { grid-template-columns: 1fr; }
  .page-text { grid-template-columns: 1fr; gap: 8px; }
  .page-text p { text-align: left; }
  .lightbox { padding: 56px 12px; }
  .lightbox img { max-width: 100%; max-height: 76vh; }
  .lightbox-close { top: 18px; right: 18px; }
  .lightbox-prev { top: auto; left: 18px; bottom: 18px; transform: none; }
  .lightbox-next { top: auto; right: 18px; bottom: 18px; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
