/* Typography direction: expressive grotesk display + calm editorial body. */
html {
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-snap-type: y proximity;
  }
}

html.gsap-ready {
  scroll-snap-type: none;
  overscroll-behavior-y: none;
}

html,
body {
  overflow-x: clip;
}

:root {
  --font-display: "Bricolage Grotesque", sans-serif;
  --font-body: "Source Sans 3", sans-serif;
  --font-mono: "DM Mono", monospace;
  --text-display-xl: clamp(4.75rem, 13vw, 13.75rem);
  --text-display: clamp(3.25rem, 7vw, 7rem);
  --text-h1: clamp(3.25rem, 8vw, 8rem);
  --text-h2: clamp(2.75rem, 5.8vw, 6rem);
  --text-h3: clamp(2.25rem, 4.5vw, 4.75rem);
  --text-body-lg: clamp(1.15rem, 1.7vw, 1.45rem);
  --text-body: clamp(1rem, 1.1vw, 1.125rem);
  --text-small: 0.875rem;
  --text-caption: 0.68rem;
  --tracking-display: -0.065em;
  --tracking-body: -0.012em;
  --leading-display: 0.86;
  --leading-body: 1.5;
  font-family: var(--font-body);
  font-optical-sizing: auto;
}

body,
button {
  font-family: var(--font-body);
}

.mono,
.brand-mark,
.lang {
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  letter-spacing: 0.06em;
}

.brand,
.site-header nav {
  font-family: var(--font-body);
  font-size: var(--text-small);
  letter-spacing: var(--tracking-body);
}

h1,
h2,
h3,
.contact-link,
.contact-cta,
.dialog-bottom h2 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 48, "wdth" 92;
  letter-spacing: var(--tracking-display);
  text-transform: none;
}

h1 {
  font-size: var(--text-display-xl);
  line-height: var(--leading-display);
  font-weight: 600;
  text-transform: uppercase;
}

.line-mask {
  display: block;
  overflow: hidden;
}

.line {
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .line-mask {
    overflow: visible;
  }
}

h1 em {
  font-style: normal;
  font-weight: 420;
}

.hero-note,
.section-lede,
.project-info p,
.about-grid > div > p:last-child {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  letter-spacing: var(--tracking-body);
}

.hero-note {
  max-width: 34ch;
  font-size: var(--text-body-lg);
  line-height: 1.25;
}

.section-intro h2,
.about h2 {
  font-size: var(--text-h2);
  line-height: 0.94;
  font-weight: 560;
}

.project-info h3 {
  font-size: var(--text-h3);
  line-height: 0.92;
  font-weight: 560;
}

.project-info {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: clamp(1.5rem, 4vw, 5rem);
  margin: 0 0 1.2rem;
  padding: 0 0 1rem;
  border-top: 0;
  border-bottom: 1px solid var(--line);
  width: min(100%, 980px);
  margin-inline: auto;
}

.project-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 1rem;
  align-items: baseline;
  min-width: 0;
}

.project-heading .project-index {
  position: static;
  grid-column: 1;
  grid-row: 1;
  color: var(--muted);
  text-shadow: none;
}

.project-heading h3 {
  grid-column: 2;
  grid-row: 1;
}

.project-heading p {
  grid-column: 2;
  grid-row: 2;
  max-width: 42ch;
  margin-top: 0.7rem;
}

.project-meta {
  display: flex;
  gap: 1.25rem;
  align-items: baseline;
  padding-top: 0.35rem;
}

.project-media {
  order: 2;
  width: min(100%, 980px);
  margin-inline: auto;
  aspect-ratio: 1.7;
  border: 1px solid rgba(17, 18, 15, 0.1);
  border-radius: 1.15rem;
  background: var(--paper);
  box-shadow: 0 18px 50px rgba(17, 18, 15, 0.08);
  overflow: clip;
}

.project-media img {
  object-fit: contain;
  object-position: center;
  background: #f1f0ea;
  transition: filter 0.7s ease;
}

.project-media:hover img {
  transform: none;
  filter: none;
}

.hero-portrait {
  position: relative;
  align-self: end;
  margin: 0;
  overflow: hidden;
  max-height: none;
  width: min(38vw, 560px);
  aspect-ratio: 4 / 5;
  border-radius: 50% 50% 0 0;
  background: transparent;
}

.hero-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: none;
  transform: none;
  transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-portrait:hover img {
  transform: scale(1.025);
}

.hero-portrait figcaption {
  display: flex;
  justify-content: space-between;
  padding-top: 10px;
  color: var(--muted);
}

.project {
  min-height: 100svh;
  padding-inline: clamp(18px, 8vw, 140px);
  overflow: clip;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.project--nacas .project-media {
  width: min(100%, 900px);
  aspect-ratio: 1.62;
}

.project--nacas .project-info {
  width: min(100%, 900px);
}

.project--subsentry .project-media {
  width: min(100%, 980px);
}

.project-open {
  position: static;
  z-index: auto;
  color: var(--ink);
  text-shadow: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.25rem;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.project-media-footer {
  width: min(100%, 980px);
  margin: 0.7rem auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 1.5rem;
  color: var(--muted);
}

.project-media-footer .project-open:hover,
.project-media-footer .project-open:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
}

.project-media-note {
  color: var(--muted);
}

.project--nacas .project-info h3 {
  font-variation-settings: "opsz" 48, "wdth" 82;
}

.project--subsentry .project-info h3 {
  font-weight: 430;
}

.project-media,
.project-info,
.hero-copy,
.hero-portrait,
.hero-meta {
  will-change: transform, opacity;
}

.project.is-active .project-open {
  color: var(--ink);
}

.about-lede {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.65rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
  font-weight: 470;
}

.contact h2 {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 48, "wdth" 88;
  font-size: clamp(5rem, 16vw, 16.25rem);
  line-height: 0.8;
  letter-spacing: -0.08em;
  font-weight: 560;
}

.contact-link,
.contact-cta {
  font-weight: 520;
}

@media (max-width: 760px) {
  h1 {
    font-size: clamp(4.75rem, 21vw, 9.4rem);
    line-height: 0.82;
  }

  .section-intro h2,
  .about h2 {
    font-size: clamp(3rem, 14vw, 5.25rem);
  }

  .project-info h3 {
    font-size: clamp(2.65rem, 13vw, 4.5rem);
  }

  .project-info {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .project-heading {
    column-gap: 0.75rem;
  }

  .project-meta {
    justify-content: space-between;
    padding-top: 1rem;
  }

  .project {
    padding-inline: 18px;
  }

  .project-media,
  .project--nacas .project-media {
    width: 100%;
    aspect-ratio: 1.18;
    border-radius: 0.85rem;
  }

  .project-media-footer {
    width: 100%;
    margin-top: 0.55rem;
  }

  .hero-note {
    max-width: 28ch;
  }

  .hero-portrait {
    width: 74%;
    margin-left: auto;
    aspect-ratio: 4 / 5;
    max-height: none;
  }

  .hero-portrait figcaption {
    font-size: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-media,
  .project-info,
  .hero-copy,
  .hero-portrait,
  .hero-meta {
    will-change: auto;
  }
}
