:root {
  --paper: #f8f5ee;
  --ink: #181512;
  --muted: #746b61;
  --line: #d8d0c5;
  --accent: #7f3f2e;
  --panel: #fffdf8;
  --max: 1260px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Public Sans", sans-serif;
  background: var(--paper);
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  color: inherit;
  font: inherit;
}

.museum-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--line);
  background: rgba(248, 245, 238, 0.9);
  backdrop-filter: blur(16px);
}

.museum-brand {
  display: grid;
  gap: 0.2rem;
}

.museum-brand span,
h1,
h2,
h3 {
  font-family: "Libre Baskerville", serif;
}

.museum-brand span {
  font-size: 1rem;
  font-weight: 700;
}

.museum-brand small,
.museum-header nav,
.kicker,
.filter-button,
.work-category {
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.museum-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
}

.museum-header a:hover {
  color: var(--accent);
}

main {
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto;
}

.museum-hero {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 3rem;
  align-items: start;
  padding: 1.5rem 0 4rem;
}

.museum-hero-image {
  margin: 0;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 1rem;
}

.museum-hero-image img {
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  background: #eee7dd;
}

.museum-hero-image figcaption {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
  margin-top: 0.8rem;
}

h1 {
  margin: 0;
  font-size: clamp(3.6rem, 8.5vw, 7.4rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.museum-hero h1 {
  font-size: clamp(2.16rem, 5.1vw, 4.44rem);
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

h3 {
  margin: 0;
  font-size: 1.35rem;
}

.intro,
.statement-text p,
.collection-note p,
.museum-index p,
.museum-contact,
.work-card p,
.lightbox-copy span {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
}

.intro {
  max-width: 40rem;
  margin: 1.5rem 0 0;
  font-size: 1.16rem;
}

.museum-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.museum-actions a,
.museum-contact a {
  border-bottom: 1px solid currentColor;
  color: var(--accent);
  font-weight: 700;
}

.museum-index {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.museum-index article {
  padding: 2rem 1.4rem 2rem 0;
  border-right: 1px solid var(--line);
}

.museum-index article + article {
  padding-left: 1.4rem;
}

.museum-index article:last-child {
  border-right: 0;
}

.museum-index span {
  display: block;
  margin-bottom: 1rem;
  color: var(--accent);
  font-weight: 700;
}

.museum-index h2 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
}

.museum-index a {
  color: var(--accent);
  font-weight: 700;
}

.museum-statement {
  display: grid;
  grid-template-columns: 1fr 0.58fr;
  gap: 2rem;
  padding: 5rem 0;
  border-bottom: 1px solid var(--line);
}

.statement-text p + p {
  margin-top: 1rem;
}

.statement-text h2 {
  font-size: clamp(1.33rem, 2.67vw, 2.8rem);
}

.collection-note {
  align-self: start;
  padding: 1.4rem;
  border: 1px solid var(--line);
  background: var(--panel);
}

.collection-list {
  margin: 1rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
  line-height: 1.75;
}

.cv-link {
  display: inline-block;
  margin-top: 1.2rem;
  border-bottom: 1px solid currentColor;
  color: var(--accent);
  font-weight: 700;
}

.museum-archive {
  padding: 5rem 0;
}

.archive-heading {
  display: grid;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.filter-bar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

.filter-button {
  display: inline-flex;
  gap: 0.55rem;
  align-items: center;
  min-height: 2.7rem;
  padding: 0.7rem 1rem;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
}

.filter-button.is-active {
  border-color: var(--accent);
  color: var(--accent);
  background: #fffaf3;
}

.filter-count {
  color: var(--ink);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.2rem;
}

.work-card {
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.work-card img {
  width: 100%;
  aspect-ratio: 0.82;
  object-fit: contain;
  padding: 0.8rem;
  border: 1px solid var(--line);
  background: var(--panel);
}

.work-copy {
  padding-top: 0.8rem;
}

.work-card h3 {
  font-size: 1.05rem;
  line-height: 1.25;
}

.work-card p {
  margin: 0.35rem 0 0;
  font-size: 0.86rem;
  line-height: 1.45;
}

.museum-contact {
  padding: 5rem 0 6rem;
  border-top: 1px solid var(--line);
  text-align: center;
}

.museum-contact h2 {
  margin-inline: auto;
  font-size: clamp(0.67rem, 1.33vw, 1.4rem);
}

.cv-page {
  padding: 4rem 0 6rem;
}

.cv-hero {
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--line);
}

.cv-hero h1 {
  max-width: 9ch;
  font-size: clamp(1.2rem, 2.83vw, 2.47rem);
}

.cv-hero p:not(.kicker) {
  max-width: 42rem;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.7;
}

.cv-section {
  display: grid;
  grid-template-columns: minmax(14rem, 0.36fr) 1fr;
  gap: 2rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
}

.cv-section h2 {
  font-size: clamp(0.75rem, 1vw, 0.95rem);
  letter-spacing: 0.02em;
}

.cv-section ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  line-height: 1.75;
}

.cv-section li + li {
  margin-top: 0.55rem;
}

.cv-section strong {
  color: var(--ink);
}

.cv-return {
  padding-top: 2rem;
}

.cv-return a {
  border-bottom: 1px solid currentColor;
  color: var(--accent);
  font-weight: 700;
}

.museum-contact a {
  display: inline-block;
  margin-top: 1.5rem;
  font-family: "Libre Baskerville", serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(18, 15, 13, 0.84);
}

.lightbox-panel {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 0.55fr;
  gap: 1.5rem;
  width: min(calc(100% - 1.5rem), 1100px);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  margin: 1rem auto;
  padding: 1rem;
  background: var(--paper);
}

.lightbox-media {
  display: grid;
  min-height: 72vh;
  place-items: center;
  background: #eee8de;
}

.lightbox-media img {
  max-height: 70vh;
  width: auto;
}

.lightbox-copy {
  align-self: center;
}

.lightbox-copy h3 {
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.lightbox-copy div {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.lightbox-close,
.lightbox-copy button {
  min-height: 2.7rem;
  padding: 0.65rem 1rem;
  border: 1px solid var(--line);
  background: var(--panel);
  cursor: pointer;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 600ms ease, transform 600ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.cv-document .reveal {
  opacity: 1;
  transform: none;
}

@media (max-width: 1000px) {
  .museum-header,
  .museum-hero,
  .museum-statement,
  .lightbox-panel {
    grid-template-columns: 1fr;
  }

  .museum-header {
    flex-direction: column;
  }

  .cv-section {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .work-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .museum-index,
  .work-grid {
    grid-template-columns: 1fr;
  }

  .museum-index article,
  .museum-index article + article {
    padding: 1.4rem 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}
