:root {
  color-scheme: dark;
  --ink: #f7f0df;
  --muted: #c8bfae;
  --paper: #191713;
  --wall: #0f100d;
  --line: rgba(247, 240, 223, 0.16);
  --shadow: rgba(0, 0, 0, 0.5);
  --header: 68px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(180deg, #10110e 0%, #17140f 42%, #0b1110 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 28%);
  mix-blend-mode: screen;
  opacity: 0.55;
}

a {
  color: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header);
  padding: 12px clamp(18px, 3.4vw, 52px);
  border-bottom: 1px solid var(--line);
  background: rgba(15, 16, 13, 0.82);
  backdrop-filter: blur(18px);
}

.brand {
  display: grid;
  gap: 0;
  text-decoration: none;
  text-transform: uppercase;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  line-height: 0.94;
}

.brand span:last-child {
  color: #d6bf73;
  font-style: italic;
}

.year-nav {
  display: flex;
  gap: 6px;
  max-width: 68vw;
  overflow-x: auto;
  scrollbar-width: none;
}

.year-nav::-webkit-scrollbar {
  display: none;
}

.year-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.year-nav a:hover,
.year-nav a.is-active {
  border-color: rgba(247, 240, 223, 0.24);
  background: rgba(247, 240, 223, 0.08);
  color: var(--ink);
}

.gallery {
  position: relative;
}

.exhibit {
  --accent: #d6bf73;
  --soft: #302819;
  display: grid;
  grid-template-columns: minmax(280px, 0.96fr) minmax(300px, 0.74fr);
  gap: clamp(28px, 5vw, 86px);
  align-items: center;
  min-height: calc(100svh - var(--header));
  padding: clamp(34px, 5vw, 82px) clamp(18px, 5vw, 92px);
  border-bottom: 1px solid rgba(247, 240, 223, 0.12);
  background:
    linear-gradient(110deg, color-mix(in srgb, var(--soft) 52%, #10110e) 0%, rgba(12, 13, 11, 0.35) 48%, #0f100d 100%),
    var(--wall);
}

.exhibit:nth-child(even) {
  grid-template-columns: minmax(300px, 0.74fr) minmax(280px, 0.96fr);
}

.exhibit:nth-child(even) .artwork {
  grid-column: 2;
}

.exhibit:nth-child(even) .caption {
  grid-column: 1;
  grid-row: 1;
}

.artwork {
  width: min(100%, 630px);
  justify-self: center;
}

.artwork-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid rgba(247, 240, 223, 0.22);
  border-radius: 8px;
  background: #0a0a08;
  box-shadow: 0 26px 80px var(--shadow);
  cursor: zoom-in;
  overflow: hidden;
}

.artwork-button img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  filter: saturate(1.04) contrast(1.02);
  transition: transform 420ms ease, filter 420ms ease;
}

.artwork-button:hover img,
.artwork-button:focus-visible img {
  transform: scale(1.018);
  filter: saturate(1.12) contrast(1.05);
}

.artwork-button:focus-visible,
.viewer-close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.caption {
  position: relative;
  max-width: 640px;
  padding-block: clamp(8px, 2vw, 22px);
}

.caption::before {
  content: "";
  display: block;
  width: min(180px, 42%);
  height: 2px;
  margin-bottom: clamp(20px, 3vw, 36px);
  background: var(--accent);
}

.collection {
  max-width: 38ch;
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.year {
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 5.8rem;
  font-weight: 400;
  line-height: 0.82;
}

h1,
h2 {
  max-width: 12ch;
  margin: clamp(16px, 2vw, 24px) 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 6.3rem;
  font-weight: 500;
  line-height: 0.88;
}

.summary {
  max-width: 49ch;
  margin: 0;
  color: #f0e7d3;
  font-size: 1.32rem;
  line-height: 1.45;
}

.enabled {
  max-width: 52ch;
  margin: clamp(20px, 3vw, 34px) 0 0;
  padding-top: 18px;
  border-top: 1px solid rgba(247, 240, 223, 0.18);
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.site-footer {
  padding: 42px 20px 48px;
  color: #d7cbb5;
  text-align: center;
  background: #0b0b09;
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.1rem;
}

.viewer {
  width: min(92vw, 1040px);
  padding: 0;
  border: 1px solid rgba(247, 240, 223, 0.22);
  border-radius: 8px;
  background: #0b0b09;
  color: var(--ink);
  box-shadow: 0 34px 120px rgba(0, 0, 0, 0.76);
}

.viewer::backdrop {
  background: rgba(5, 5, 4, 0.84);
  backdrop-filter: blur(8px);
}

.viewer img {
  width: 100%;
  max-height: 82svh;
  object-fit: contain;
  background: #060605;
}

.viewer-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(247, 240, 223, 0.3);
  border-radius: 999px;
  background: rgba(7, 7, 6, 0.78);
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.viewer-caption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px 16px;
  border-top: 1px solid rgba(247, 240, 223, 0.16);
}

.viewer-caption span {
  color: #d6bf73;
  font-weight: 800;
}

.viewer-caption strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 500;
}

@media (max-width: 1180px) {
  :root {
    --header: 72px;
  }

  .site-header {
    align-items: start;
    gap: 14px;
    flex-direction: column;
  }

  .year-nav {
    max-width: 100%;
    width: 100%;
  }

  .exhibit,
  .exhibit:nth-child(even) {
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: start;
    min-height: auto;
    padding-block: 28px 50px;
  }

  .exhibit:nth-child(even) .artwork,
  .exhibit:nth-child(even) .caption {
    grid-column: auto;
    grid-row: auto;
  }

  .artwork {
    width: min(100%, 520px);
    justify-self: start;
  }

  .caption {
    max-width: 680px;
  }

  h1,
  h2 {
    max-width: 12ch;
    font-size: 4.7rem;
  }

  .year {
    font-size: 4.4rem;
  }

  .summary {
    font-size: 1.18rem;
  }
}

@media (max-width: 560px) {
  .site-header {
    position: relative;
  }

  .year-nav a {
    min-width: 54px;
  }

  .exhibit {
    padding-inline: 16px;
  }

  .caption::before {
    margin-bottom: 18px;
  }

  .summary {
    font-size: 1rem;
  }

  .brand {
    font-size: 1.16rem;
  }

  h1,
  h2 {
    font-size: 3.1rem;
  }

  .year {
    font-size: 3rem;
  }

  .site-footer p,
  .viewer-caption strong {
    font-size: 1.55rem;
  }

  .viewer-caption {
    align-items: start;
    flex-direction: column;
    gap: 4px;
  }
}
