@font-face {
  font-family: "Inter";
  src: url("./assets/fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("./assets/fonts/plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #111;
  --paper: #fff;
  --page-gutter: clamp(1.25rem, 5vw, 5rem);
  --gap: clamp(1rem, 2vw, 2rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 2rem;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}

h1, h2, p, figure {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 0.25em;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 6px;
}

img, svg {
  display: block;
  max-width: 100%;
}

/* One shared frame fixes the gallery and photograph grid to identical edges. */
.page-frame {
  width: calc(100% - 2 * var(--page-gutter));
  max-width: 90rem;
  margin-inline: auto;
  container-type: inline-size;
}

.meta {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.skip-link {
  position: absolute;
  z-index: 1;
  top: 1rem;
  left: var(--page-gutter);
  padding: 0.75rem 1rem;
  background: var(--paper);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-block: 1.75rem;
}

.location {
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.4vw, 2.5rem);
  font-size: 0.9375rem;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  min-height: 2.75rem;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a[aria-current="page"],
.text-link:hover,
.site-footer a:hover {
  text-decoration: underline;
}

.exhibition {
  padding-top: 0.75rem;
}

.home .site-header {
  padding-block: 0.75rem 0;
}

.exhibition h1 {
  /* Fit this exact Inter wordmark inside the image grid, including the period. */
  font-size: 13.99cqw;
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.055em;
  white-space: nowrap;
}

.tagline {
  max-width: 48ch;
  margin-top: 1rem;
  margin-left: auto;
  font-size: clamp(1rem, 1.5cqw, 1.25rem);
  line-height: 1.4;
  letter-spacing: -0.02em;
  text-align: right;
}

.gallery-link {
  display: inline-flex;
  align-items: center;
  gap: 0.875rem;
  min-height: 2.75rem;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.arrow {
  width: 2.25rem;
  height: 1.125rem;
  stroke: currentColor;
  stroke-width: 1.5;
  transition: transform 150ms ease-out;
}

.gallery-link:hover .arrow {
  transform: translateX(4px);
}

.gallery-figure {
  margin-top: 1rem;
}

.gallery-preview {
  display: block;
  background: #141414;
}

.gallery-preview img {
  width: 100%;
  height: auto;
  aspect-ratio: 2.05;
  object-fit: cover;
  object-position: 50% 48%;
}

.gallery-caption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
}

.gallery-note,
.photo-caption {
  text-transform: none;
  letter-spacing: 0;
}

.photographs {
  margin-top: clamp(5rem, 10cqw, 9rem);
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.text-link {
  font-size: 0.875rem;
}

.photo-grid {
  --photo-height: clamp(18rem, 44cqw, 40rem);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 3fr);
  gap: var(--gap);
  row-gap: clamp(2.5rem, 5cqw, 4.5rem);
}

.photograph a {
  display: block;
}

/* A shared height preserves equal top and bottom edges for both image shapes. */
.photograph img {
  width: 100%;
  height: var(--photo-height);
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.photograph--portrait img {
  aspect-ratio: 4 / 5;
}

.photo-caption {
  padding-top: 0.875rem;
}

.site-footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2rem;
  margin-top: clamp(5rem, 10cqw, 9rem);
  padding-bottom: 2.5rem;
  font-size: 0.8125rem;
}

.site-footer nav {
  display: flex;
  gap: 2rem;
}

@media (max-width: 800px) {
  .site-header {
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 1.5rem;
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.8125rem;
  }

}

@media (max-width: 600px) {
  .site-nav {
    flex-wrap: wrap;
    justify-content: flex-start;
    column-gap: 0.75rem;
    row-gap: 0;
  }

  .exhibition h1 {
    font-size: 28.5cqw;
  }

  .exhibition h1 span {
    display: block;
  }

  .gallery-preview {
    aspect-ratio: 1.4;
    overflow: hidden;
  }

  .gallery-preview img {
    height: 100%;
    aspect-ratio: auto;
    object-position: 48% 50%;
    /* Keep the old screenshot's corner controls outside the visible crop. */
    transform: scale(1.12);
  }

  .gallery-caption {
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.625rem;
  }

  .section-heading {
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin-bottom: 1.5rem;
  }

  .photo-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.5rem;
  }

  .photograph img {
    height: auto;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 1rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

@media (prefers-reduced-motion: reduce) {
  .arrow {
    transition: none;
  }
}
