@font-face {
  font-family: "ABC Areal";
  src: url("assets/fonts/ABCAreal-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "ABC Areal";
  src: url("assets/fonts/ABCAreal-RegularItalic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "ABC Areal Mono";
  src: url("assets/fonts/ABCArealMono-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --paper: #e3e8e9;
  --gallery-paper: #e3e8e9;
  --ink: #111111;
  --accent: #9f5e93;
  --page-pad: clamp(24px, 4vw, 52px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "ABC Areal", Arial, sans-serif;
  font-weight: 400;
}

::selection { background: var(--accent); color: #fff; }

a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-style: wavy; }
a:focus-visible { outline: 3px solid var(--ink); outline-offset: 5px; }

/* One grid and one document scroll: the story and gallery flow together. */
.project-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  min-height: 100svh;
}

.project-copy,
.project-gallery { min-width: 0; padding: var(--page-pad); }

.project-copy {
  position: sticky;
  top: min(0px, calc(100svh - var(--copy-height, 100svh)));
  align-self: start;
}

.project-header {
  font-size: clamp(30px, 3.125vw, 40px);
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.project-header h1 { margin: 0; font: inherit; }
.home-link {
  display: block;
  width: fit-content;
  margin-bottom: 18px;
  font-size: clamp(14px, 1.25vw, 17px);
  line-height: 1.25;
  letter-spacing: 0;
}

.project-layout .home-link:hover,
.project-layout .home-link:focus-visible {
  background: #8bba7b;
  text-decoration: none;
}

.highlight {
  background: var(--accent);
  color: #fff;
  font-family: "ABC Areal Mono", monospace;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  padding: 0 0.08em 0.015em 0;
}

.project-medium {
  margin: 0.7em 0 0;
  font-size: clamp(14px, 1.3vw, 17px);
  line-height: 1.4;
  letter-spacing: 0;
}

.project-story {
  max-width: 34ch;
  margin-top: clamp(72px, 9vw, 140px);
  font-size: clamp(20px, 1.85vw, 24px);
  line-height: 1.3;
  letter-spacing: -0.025em;
}

.project-story p { margin: 0 0 1em; }
.project-story em { font-style: italic; }
.project-story .credits { margin-top: 2em; }

.project-footer {
  margin-top: clamp(70px, 10vw, 140px);
  font-size: clamp(23px, 2.2vw, 30px);
}

.project-gallery {
  display: flex;
  flex-direction: column;
  gap: clamp(52px, 6vw, 90px);
  background: var(--gallery-paper);
}

.project-media { margin: 0; }

.project-media img,
.project-media video {
  display: block;
  width: 100%;
  height: auto;
  background: var(--paper);
}

.project-media video { aspect-ratio: 16 / 9; object-fit: contain; }

.video-embed { width: 100%; aspect-ratio: 16 / 9; }
.video-embed--four-three { aspect-ratio: 4 / 3; }
.video-embed iframe { display: block; width: 100%; height: 100%; border: 0; }
.video-poster {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: #111;
}
.video-poster img { width: 100%; height: 100%; object-fit: cover; }
.play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  font: 28px Arial, sans-serif;
  transform: translate(-50%, -50%);
}
.video-poster:hover .play-icon { background: #000; }

.project-media figcaption {
  margin-top: 10px;
  font: 13px/1.35 "ABC Areal", Arial, sans-serif;
}

@media (max-width: 760px) {
  .project-layout { display: block; }
  .project-copy { position: static; }
  .project-header { font-size: clamp(29px, 7.5vw, 40px); }
  .project-meta { display: block; }
  .project-story { max-width: none; margin-top: 72px; font-size: clamp(18px, 5vw, 22px); }
  .project-footer { margin-top: 70px; }
  .project-gallery { gap: 50px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
