:root {
  --paper: #fbfaf7;
  --ink: #171717;
  --line: rgba(23, 23, 23, 0.17);
}

body {
  background: var(--paper);
  overflow-x: clip;
}

.site-header {
  background: var(--paper);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 6px 20px rgba(23, 23, 23, 0.05);
  mix-blend-mode: normal;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  margin-left: 0.35rem;
}

.language-switch button {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: 500 0.72rem var(--sans);
  letter-spacing: 0.08em;
  cursor: pointer;
  opacity: 0.45;
}

.language-switch button.active {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 0.28rem;
}

.hero {
  background: var(--paper);
}

.hero-video {
  background: var(--paper);
  filter: contrast(1.08) saturate(1.05) brightness(0.96);
}

.hero::after {
  background:
    linear-gradient(90deg, var(--paper) 17%, rgba(251, 250, 247, 0.94) 39%, rgba(251, 250, 247, 0) 62%),
    linear-gradient(0deg, rgba(251, 250, 247, 0.24), transparent 42%);
}

.hero > .eyebrow,
.hero > h1,
.hero > .hero-note,
.hero > .scroll-cue {
  color: var(--ink);
}

.series {
  background: var(--paper);
  color: var(--ink);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.selected,
.exhibitions,
.about,
.contact-section,
footer {
  background: var(--paper);
}

.about {
  border-top: 1px solid var(--line);
}

.about-portrait {
  position: relative;
  z-index: 1;
  align-self: start;
  margin: 0;
  aspect-ratio: 0.69;
  overflow: hidden;
}

.about-portrait img {
  object-position: center center;
}

.contact-section {
  padding: 9rem 3.2vw;
  border-top: 1px solid var(--line);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 5vw;
}

.contact-grid .lead {
  max-width: 24rem;
}

.contact-links a {
  display: grid;
  grid-template-columns: 0.55fr 1fr auto;
  align-items: baseline;
  gap: 1rem;
  padding: 1.4rem 0;
  border-top: 1px solid var(--line);
}

.contact-links span {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
}

.contact-links b {
  font: clamp(1.5rem, 3vw, 3rem) / 1 var(--serif);
  overflow-wrap: anywhere;
}

.contact-links i {
  font-style: normal;
  font-size: 1.25rem;
}

.section-heading.light {
  border-color: var(--line);
}

.filters button {
  border-color: rgba(23, 23, 23, 0.38);
  color: var(--ink);
}

.filters button:hover,
.filters button:focus-visible {
  border-color: var(--ink);
}

.filters button.active {
  background: var(--acid);
  border-color: var(--ink);
  color: var(--ink);
}

.work-card img {
  background: #e5e2dc;
}

.work-card span {
  border-color: var(--line);
}

@media (max-width: 800px) {
  html {
    scroll-padding-top: 5rem;
  }

  .site-header {
    z-index: 50;
    padding: 18px 20px;
    background: var(--paper);
    color: var(--ink);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 24px rgba(23, 23, 23, 0.06);
    mix-blend-mode: normal;
  }

  .wordmark {
    max-width: calc(100vw - 125px);
    overflow: hidden;
    font-size: clamp(1.1rem, 5vw, 1.5rem);
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .site-header nav {
    position: fixed;
    inset: 61px 0 auto;
    z-index: 51;
    width: 100%;
    min-width: 0;
    padding: 1.35rem 20px 1.6rem;
    gap: 1.15rem;
    align-items: flex-end;
    background: var(--paper);
    color: var(--ink);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 14px 28px rgba(23, 23, 23, 0.1);
  }

  .site-header nav.open {
    display: flex;
  }

  .menu-button {
    position: relative;
    z-index: 52;
    padding: 0.35rem 0;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
  }

  .hero {
    padding-inline: 20px;
  }

  .hero h1 {
    max-width: 100%;
    font-size: clamp(3.7rem, 17vw, 7rem);
    line-height: 0.84;
    overflow-wrap: anywhere;
  }

  .hero-note,
  .exhibition-intro > p:last-child,
  .about-copy > p:not(.lead) {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .section-heading h2,
  .about h2 {
    max-width: 100%;
    font-size: clamp(2.8rem, 14vw, 5rem);
    overflow-wrap: anywhere;
  }

  .lead {
    font-size: clamp(1.55rem, 7vw, 2rem);
  }

  .filters {
    max-width: 100%;
  }

  .work-card span {
    display: block;
  }

  .work-card b,
  .work-card small {
    display: block;
  }

  .work-card b {
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .work-card small {
    margin-top: 0.35rem;
    line-height: 1.35;
  }

  .hero::after {
    background: linear-gradient(0deg, var(--paper) 9%, rgba(251, 250, 247, 0.94) 36%, rgba(251, 250, 247, 0.1) 78%);
  }

  .contact-section {
    padding: 6rem 20px;
  }

  .about-portrait {
    margin: 1.5rem 0 2.5rem;
    max-height: 78vh;
  }

  .contact-grid {
    display: block;
  }

  .contact-links {
    margin-top: 3rem;
  }

  .contact-links a {
    grid-template-columns: 1fr auto;
    min-width: 0;
  }

  .contact-links span {
    grid-column: 1 / -1;
  }

  .contact-links b {
    min-width: 0;
    font-size: clamp(1.25rem, 7vw, 2rem);
    line-height: 1.05;
  }
}

@media (max-width: 640px) {
  .selected,
  .series,
  .exhibitions,
  .about,
  .contact-section {
    padding-inline: 16px;
  }

  .site-header {
    padding-inline: 16px;
  }

  .site-header nav {
    padding-inline: 16px;
  }

  .hero {
    padding: 100px 16px 72px;
  }

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

  .feature,
  .feature-wide,
  .feature-tall,
  .installations-grid .feature:nth-child(3),
  .installations-grid .feature:nth-child(4),
  .installations-grid .feature:nth-child(5) {
    grid-column: 1;
    width: 100%;
    margin-top: 0;
  }

  .feature span {
    display: block;
  }

  .feature b,
  .feature small {
    display: block;
  }

  .feature small {
    margin-top: 0.35rem;
    line-height: 1.35;
  }

  .oslo-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: auto;
  }

  .oslo-grid figure,
  .oslo-main,
  .oslo-grid figure:nth-child(4) {
    grid-column: 1;
    grid-row: auto;
  }

  .oslo-grid img {
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .exhibition-list > div {
    grid-template-columns: 2.5rem minmax(0, 1fr);
  }

  .exhibition-list p,
  .exhibition-list span {
    overflow-wrap: anywhere;
  }

  footer {
    padding-inline: 16px;
  }

  .installations-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem 0.7rem;
  }

  .installations-grid .feature,
  .installations-grid .feature:first-child,
  .installations-grid .feature:nth-child(2),
  .installations-grid .feature:nth-child(3),
  .installations-grid .feature:nth-child(4),
  .installations-grid .feature:nth-child(5) {
    grid-column: auto;
    width: 100%;
    margin-top: 0;
  }

  .installations-grid .feature:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 430px) {
  .works-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.5rem;
  }

  footer {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
  }

  footer div {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  footer small {
    grid-column: 1;
  }

  .work-dialog[open] {
    width: 100vw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    grid-template-rows: 48% 52%;
  }

  .dialog-copy {
    padding: 1.5rem 1rem;
  }

  .dialog-copy h2 {
    font-size: 2.2rem;
  }
}

@media (max-width: 360px) {
  .installations-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
