:root {
  color-scheme: light;
  --paper: #f6f5f1;
  --ink: #23231e;
  --secondary: #5b5951;
  --rule: #d5d2c8;
  --accent: #8b3c2e;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(20px, 5.1vw, 82px);
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 280px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.55 var(--sans);
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
button:not(:disabled) { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
main:focus { outline: none; }
::selection { background: #e6cec0; color: #221f19; }

.wrap { width: calc(100% - 2 * var(--gutter)); max-width: 1440px; margin-inline: auto; }

.visually-hidden, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus {
  position: fixed;
  z-index: 10;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  background: var(--paper);
}

.site-header-inner {
  min-height: 77px;
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--rule);
}
.wordmark {
  font: 400 1.8rem/1 var(--serif);
  letter-spacing: -.062em;
  white-space: nowrap;
}
.site-header nav {
  display: flex;
  align-self: stretch;
  gap: clamp(20px, 3.4vw, 49px);
}
.site-header nav a {
  position: relative;
  display: grid;
  align-items: center;
  color: var(--secondary);
  font-size: .95rem;
}
.site-header nav a:hover, .wordmark:hover, .text-link:hover, .back-link:hover { color: var(--accent); }
.site-header nav [aria-current], .site-header nav .section-current { color: var(--ink); }
.site-header nav [aria-current]::after, .site-header nav .section-current::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--accent);
}

.page-intro {
  display: flex;
  gap: 22px 40px;
  align-items: end;
  justify-content: space-between;
  padding-block: clamp(34px, 5vw, 77px) clamp(23px, 3.1vw, 45px);
}
.page-intro h1 {
  margin: 0;
  font: 400 clamp(3.6rem, 8.5vw, 8.2rem)/.87 var(--serif);
  letter-spacing: -.057em;
}
.page-intro > p {
  flex: none;
  margin: 0;
  color: var(--secondary);
  font-size: .92rem;
  line-height: 1.6;
  text-align: right;
}
.home { padding-top: clamp(16px, 2.5vw, 36px); }
.carousel-stage {
  position: relative;
  height: clamp(300px, min(75vh, calc(100svh - 215px)), 800px);
  overflow: hidden;
  isolation: isolate;
  background: #eae8e0;
}
.slide-link {
  display: block;
  position: absolute;
  inset: 0;
  transition: transform 410ms cubic-bezier(.22, .65, .27, 1);
  background: #eae8e0;
}
.slide-link:focus-visible { outline: 3px solid var(--accent); outline-offset: -4px; z-index: 2; }
.slide-image { width: 100%; height: 100%; object-fit: cover; }
.slide-image.portrait { object-fit: contain; object-position: center; }
.slide-link.is-entering { transform: translateX(var(--slide-in, 100%)); }
.slide-link.is-leaving { transform: translateX(var(--slide-out, -100%)); pointer-events: none; }
.carousel-bar {
  min-height: 86px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--rule);
}
.slide-credit { min-width: 0; display: flex; gap: clamp(13px, 3vw, 44px); align-items: baseline; }
.slide-count {
  flex: none;
  color: var(--accent);
  font-size: .77rem;
  letter-spacing: .065em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.slide-title {
  display: block;
  width: fit-content;
  font: 400 clamp(1.12rem, 2.4vw, 1.62rem)/1.15 var(--serif);
  letter-spacing: -.035em;
  text-underline-offset: .2em;
}
.slide-title:hover { text-decoration: underline; }
.slide-caption p { margin: 4px 0 0; font-size: .81rem; line-height: 1.35; color: var(--secondary); }
.carousel-controls { display: flex; gap: 7px; flex: none; }
.icon-button {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  padding: 0;
  background: transparent;
  transition: color 160ms, background 160ms, border-color 160ms;
}
.icon-button:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.icon { position: relative; display: block; width: 16px; height: 16px; }
.icon-next::before, .icon-previous::before {
  content: "";
  display: block;
  width: 7px;
  height: 7px;
  margin: 4px auto;
  border-top: 1.5px solid;
  border-right: 1.5px solid;
  transform: rotate(45deg);
}
.icon-previous::before { transform: rotate(-135deg); }
.icon-pause::before {
  content: "";
  display: block;
  width: 8px;
  height: 10px;
  margin: 3px auto;
  border-inline: 1.5px solid;
}
.icon-play::before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  margin: 3px 0 0 5px;
  border-block: 5px solid transparent;
  border-left: 8px solid;
}
.icon-expand {
  width: 12px;
  height: 12px;
  border: 1px solid;
}
.icon-expand::before {
  content: "";
  position: absolute;
  inset: -2px 2px;
  border-inline: 2px solid var(--paper);
}
.icon-expand::after {
  content: "";
  position: absolute;
  inset: 2px -2px;
  border-block: 2px solid var(--paper);
}
.icon-close::before, .icon-close::after {
  content: "";
  position: absolute;
  top: calc(50% - .5px);
  left: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: rotate(45deg);
}
.icon-close::after { transform: rotate(-45deg); }

.home-index { padding-block: 29px 10px; }
.text-link, .back-link {
  display: inline-block;
  font-size: .94rem;
  text-decoration: underline;
  text-underline-offset: .28em;
  text-decoration-thickness: 1px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-block: 18px 25px;
  border-top: 1px solid var(--rule);
}
.filter-bar button {
  min-height: 40px;
  border: 1px solid var(--rule);
  border-radius: 99px;
  padding: 6px 16px;
  background: transparent;
  font-size: .89rem;
}
.filter-bar button:hover { border-color: var(--ink); }
.filter-bar button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.work-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 35px 18px;
  margin: 0;
  padding: 0;
}
.work-card a { display: block; height: 100%; border-bottom: 1px solid var(--rule); }
.card-image { aspect-ratio: 1.53; overflow: hidden; background: #eae8e0; }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 300ms ease; }
.work-card a:hover img { transform: scale(1.035); }
.card-info { padding-block: 13px 18px; }
.card-info h2 { margin: 0; font: 400 clamp(1.17rem, 2vw, 1.58rem)/1.15 var(--serif); letter-spacing: -.03em; }
.work-card a:hover h2 { color: var(--accent); }
.card-info p { margin: 6px 0 0; color: var(--secondary); font-size: .84rem; }

.detail { padding-top: 28px; }
.detail .page-intro { padding-block: clamp(23px, 3.6vw, 55px) clamp(25px, 4vw, 53px); }
.detail .page-intro h1 { max-width: 19ch; font-size: clamp(2.85rem, 7vw, 6.5rem); line-height: .99; letter-spacing: -.055em; }
.detail .page-intro > p { color: var(--accent); }
.part-directory {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 25px;
  padding-block: 15px;
  border-top: 1px solid var(--rule);
  color: var(--secondary);
  font-size: .88rem;
}
.part-directory a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: .22em; }
.work-section {
  display: grid;
  grid-template-columns: minmax(0, 1.95fr) minmax(240px, 1fr);
  align-items: start;
  gap: clamp(26px, 4vw, 72px);
  padding-block: 26px clamp(27px, 5vw, 78px);
  border-top: 1px solid var(--rule);
  scroll-margin-top: 24px;
}
.work-media { display: grid; justify-items: center; }
.work-media video { width: 100%; aspect-ratio: 16 / 9; background: #121212; }
.zoom-link { position: relative; display: block; cursor: zoom-in; width: min(100%, var(--media-width)); }
.zoom-link img {
  width: 100%;
  height: auto;
}
.zoom-hint {
  position: absolute;
  bottom: 11px;
  right: 11px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--paper);
}
.zoom-link:hover .zoom-hint { color: var(--accent); }
.work-text h2 {
  margin: 0 0 17px;
  font: 400 clamp(1.6rem, 2.5vw, 2.15rem)/1.1 var(--serif);
  letter-spacing: -.04em;
}
.work-facts { margin: 0; display: grid; gap: 7px; }
.work-facts div { display: grid; align-items: baseline; gap: 10px; grid-template-columns: 86px minmax(0, 1fr); }
.work-facts dt { color: var(--secondary); font-size: .82rem; }
.work-facts dd { margin: 0; font-size: .92rem; }
.statement { margin-top: 22px; padding-top: 17px; border-top: 1px solid var(--rule); font-size: 1rem; line-height: 1.7; }
.statement p { margin: 0 0 .85em; }
.statement p:last-child { margin-bottom: 0; }
.project-neighbors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  border-top: 1px solid var(--rule);
  padding-block: 22px 9px;
}
.project-neighbors a {
  font: 400 clamp(1.05rem, 2vw, 1.46rem)/1.15 var(--serif);
  letter-spacing: -.03em;
}
.project-neighbors a:last-child { text-align: right; }
.project-neighbors a:hover { color: var(--accent); }
.project-neighbors a span { display: block; color: var(--secondary); font: .79rem/1.4 var(--sans); letter-spacing: 0; margin-bottom: 7px; }

.lightbox {
  position: fixed;
  inset: 0;
  width: min(96vw, 1600px);
  height: fit-content;
  max-width: none;
  max-height: 96dvh;
  margin: auto;
  padding: 0 0 15px;
  border: 0;
  color: #faf8f3;
  background: #191916;
  overflow: auto;
}
.lightbox::backdrop { background: #11110fdd; }
.lightbox-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px 8px 18px; gap: 15px; }
.lightbox-toolbar p { margin: 0; font-size: .91rem; }
.lightbox-toolbar .icon-button { border-color: #77766e; }
.lightbox-toolbar .icon-button:hover { color: var(--ink); background: var(--paper); }
.lightbox img { max-width: calc(100% - 30px); max-height: calc(94dvh - 75px); margin-inline: auto; object-fit: contain; }

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--rule);
  margin-top: clamp(38px, 6vw, 85px);
  padding-block: 19px 30px;
  color: var(--secondary);
  font-size: .82rem;
}
.site-footer a:hover { text-decoration: underline; text-underline-offset: .2em; }

@media (max-width: 800px) {
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work-section { grid-template-columns: minmax(0, 1.4fr) minmax(205px, 1fr); }
  .carousel-stage { height: clamp(300px, 66vw, 515px); }
}

@media (max-width: 600px) {
  .site-header-inner { min-height: 64px; }
  .wordmark { font-size: 1.55rem; }
  .page-intro { display: grid; align-items: start; gap: 16px; }
  .page-intro h1 { font-size: clamp(2.85rem, 11.7vw, 4.65rem); letter-spacing: -.055em; }
  .page-intro > p { text-align: left; }
  .page-intro > p br { display: none; }
  .page-intro > p br + span::before { content: " · "; }
  .carousel-stage { height: clamp(265px, 82vw, 435px); }
  .slide-image { object-fit: contain; }
  .carousel-bar { min-height: 84px; padding-block: 9px; }
  .slide-credit { flex-direction: column; gap: 3px; }
  .slide-count { font-size: .73rem; }
  .carousel-controls { gap: 5px; }
  .icon-button { width: 40px; height: 40px; }
  .filter-bar { gap: 6px; }
  .filter-bar button { padding-inline: 11px; }
  .work-grid { gap: 22px 12px; }
  .card-info h2 { font-size: 1.13rem; }
  .card-info p { font-size: .79rem; }
  .detail .page-intro { gap: 10px; }
  .detail .page-intro h1 { font-size: clamp(2.55rem, 10.5vw, 4.5rem); }
  .work-section { grid-template-columns: minmax(0, 1fr); gap: 21px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
}
