:root {
  --paper: #f7f5f0;
  --paper-deep: #ece8df;
  --ink: #1c1b18;
  --muted: #6e6a61;
  --line: #d8d3c8;
  --accent: #75513b;
  --max-width: 1240px;
  --page-gutter: clamp(1.25rem, 4vw, 4.5rem);
  --serif: Georgia, 'Times New Roman', serif;
  --sans: Inter, 'Helvetica Neue', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: .06em; text-underline-offset: .25em; }
button, select { font: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: .75rem;
  left: .75rem;
  padding: .65rem 1rem;
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.15rem var(--page-gutter);
  background: var(--paper);
}

.brand {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.2vw, 1.8rem);
  line-height: 1;
  letter-spacing: .015em;
  text-decoration: none;
}

.language-picker select {
  min-width: 4.5rem;
  padding: .45rem 1.7rem .45rem .65rem;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  background-color: transparent;
  color: var(--ink);
  cursor: pointer;
  letter-spacing: .12em;
}

.hero {
  position: relative;
  width: 100%;
  height: clamp(360px, 64vw, 780px);
  overflow: hidden;
  background: #c7b29e;
}

.hero > img { width: 100%; height: 100%; object-fit: cover; }

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(20, 17, 13, .46));
}

.hero__caption {
  position: absolute;
  z-index: 1;
  left: var(--page-gutter);
  bottom: clamp(1.6rem, 5vw, 4rem);
  color: #fff;
}

.hero__caption p,
.eyebrow {
  margin: 0 0 .45rem;
  font-size: .72rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: .19em;
  text-transform: uppercase;
}

.hero__caption h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3rem, 8vw, 7.5rem);
  font-weight: 400;
  line-height: .92;
}

.section-shell {
  width: min(100%, calc(var(--max-width) + 2 * var(--page-gutter)));
  margin-inline: auto;
  padding-inline: var(--page-gutter);
}

.artist {
  display: grid;
  grid-template-columns: minmax(260px, .82fr) minmax(300px, 1fr);
  gap: clamp(3rem, 9vw, 9rem);
  align-items: center;
  padding-block: clamp(5rem, 11vw, 10rem);
}

.artist__portrait { margin: 0; }
.artist__portrait img { width: 100%; background: var(--paper-deep); }
.artist__portrait figcaption {
  margin-top: .65rem;
  color: var(--muted);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.artist__copy { max-width: 620px; }
.artist__copy h2,
.section-heading h2,
.page-heading h1,
.work-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.04;
}

.artist__copy h2 { font-size: clamp(3rem, 7vw, 6.2rem); }
.artist__copy .lead { margin-top: 2rem; }
.lead { font-family: var(--serif); font-size: clamp(1.2rem, 2.1vw, 1.65rem); line-height: 1.48; }
.artist__copy .lead, .page-intro, #work-description { white-space: pre-line; }
.artist--without-image { grid-template-columns: minmax(0, 620px); }

.categories { padding-bottom: clamp(6rem, 12vw, 11rem); }
.section-heading { margin-bottom: clamp(2.5rem, 6vw, 5rem); }
.section-heading h2 { font-size: clamp(2.4rem, 5vw, 4.6rem); }

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.2rem, 3vw, 2.5rem);
}

.category-card { display: block; text-decoration: none; }
.category-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--paper-deep);
  filter: saturate(.84);
  transition: filter 240ms ease, transform 240ms ease;
}
.category-card__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: .95rem;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
}
.category-card__title::after { content: '↗'; font-family: var(--sans); font-size: .9rem; }
.category-card:hover img { filter: saturate(1); transform: translateY(-4px); }

.inner-page { min-height: calc(100vh - 190px); padding-block: clamp(2rem, 6vw, 5rem) clamp(6rem, 10vw, 10rem); }
.back-link { display: inline-flex; gap: .55rem; align-items: center; color: var(--muted); font-size: .86rem; }
.back-link:hover { color: var(--ink); }

.category-page,
.work-page { padding-top: clamp(1.25rem, 3vw, 2.5rem); }

.category-layout {
  display: grid;
  grid-template-columns: minmax(170px, .27fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}

.category-sidebar {
  position: sticky;
  top: clamp(1.25rem, 3vw, 2.5rem);
  align-self: start;
}

.category-sidebar h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.9rem, 3vw, 2.8rem);
  font-weight: 400;
  line-height: 1.08;
}

.category-sidebar .back-link { margin-top: .75rem; }
.category-sidebar .page-intro {
  max-width: 250px;
  margin-top: 1.75rem;
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.5;
}
.category-content { min-width: 0; }

.page-heading { max-width: 780px; margin: clamp(4rem, 9vw, 8rem) 0 clamp(4rem, 8vw, 7rem); }
.page-heading h1 { font-size: clamp(3.5rem, 9vw, 8rem); }
.page-intro { max-width: 650px; margin-top: 1.5rem; color: var(--muted); font-family: var(--serif); font-size: 1.25rem; }

.works-list { display: grid; gap: clamp(5rem, 11vw, 10rem); }
.work-list-item { margin: 0; }
.work-list-item a { display: block; text-decoration: none; }
.work-list-item img {
  width: auto;
  max-width: min(100%, 980px);
  max-height: 78vh;
  margin-inline: auto;
  object-fit: contain;
  background: var(--paper-deep);
}
.work-list-item__details {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  width: min(100%, 980px);
  margin: 1.15rem auto 0;
  padding-top: .85rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.work-list-item__details strong { color: var(--ink); font-family: var(--serif); font-size: 1.28rem; }

.work-title {
  max-width: 900px;
  margin: 0;
  font-size: clamp(2.15rem, 4vw, 3.75rem);
  font-weight: 700;
  text-align: left;
}

.work-heading { margin-bottom: clamp(1.75rem, 4vw, 3.25rem); }
.work-heading .back-link { margin-top: .75rem; }

.work-detail { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: clamp(2.5rem, 7vw, 7rem); align-items: start; }
.zoom-container {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 300px;
  max-height: 78vh;
  overflow: hidden;
  background: var(--paper-deep);
  cursor: zoom-in;
}
.zoom-container img {
  width: 100%;
  height: 100%;
  max-height: 78vh;
  object-fit: contain;
  transition: transform 180ms ease-out;
  will-change: transform;
}
@media (hover: hover) and (pointer: fine) {
  .zoom-container:hover img { transform: scale(2.15); }
}
.zoom-hint {
  position: absolute;
  right: .75rem;
  bottom: .75rem;
  padding: .4rem .65rem;
  background: rgba(247, 245, 240, .9);
  color: var(--muted);
  font-size: .68rem;
  letter-spacing: .06em;
}
.work-info { position: sticky; top: 2rem; }
.work-info .lead { margin-top: 0; }
.work-metadata { margin: 2.5rem 0; }
.work-metadata > div { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding: .9rem 0; border-top: 1px solid var(--line); }
.work-metadata > div:last-child { border-bottom: 1px solid var(--line); }
.work-metadata dt { color: var(--muted); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.work-metadata dd { margin: 0; }

.image-dialog {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #171613;
  color: #fff;
}
.image-dialog::backdrop { background: rgba(0, 0, 0, .9); }
.image-dialog[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.dialog-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: .85rem clamp(1rem, 3vw, 2.5rem); }
.dialog-toolbar p { margin: 0; font-family: var(--serif); font-size: 1.1rem; }
.dialog-close { padding: .45rem .65rem; border: 1px solid #777; background: transparent; color: #fff; cursor: pointer; }
.image-dialog > img { width: 100%; height: 100%; min-height: 0; padding: 0 clamp(1rem, 3vw, 2.5rem) 1.5rem; object-fit: contain; }

.status-message { max-width: 700px; margin: 3rem 0; padding: 1rem 0; border-block: 1px solid var(--line); color: var(--muted); }
.status-message--error { color: #7b2e27; }
.status-retry { display: block; margin-top: .75rem; padding: .4rem 0; border: 0; border-bottom: 1px solid currentColor; color: inherit; background: transparent; cursor: pointer; }

.site-footer {
  display: flex;
  align-items: baseline;
  gap: 2.5rem;
  padding: 2.2rem var(--page-gutter);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .82rem;
}
.site-footer p { margin: 0; }

@media (max-width: 780px) {
  .site-header { min-height: 68px; }
  .artist { grid-template-columns: 1fr; gap: 3rem; }
  .artist__portrait { width: min(100%, 520px); }
  .category-grid { grid-template-columns: 1fr; gap: 3.5rem; }
  .category-card img { aspect-ratio: 4 / 5; }
  .category-layout { grid-template-columns: 1fr; gap: 2.5rem; }
  .category-sidebar { position: static; }
  .category-sidebar .page-intro { max-width: 620px; margin-top: 1.25rem; }
  .work-detail { grid-template-columns: 1fr; }
  .work-info { position: static; }
  .zoom-container { max-height: none; }
  .zoom-container img { max-height: 72vh; }
}

@media (max-width: 520px) {
  .hero { height: 68svh; min-height: 390px; }
  .work-list-item__details { align-items: flex-start; flex-direction: column; gap: .15rem; }
  .work-metadata > div { grid-template-columns: 1fr; gap: .2rem; }
  .site-footer { align-items: flex-start; flex-direction: column; gap: .4rem; }
  .zoom-hint { max-width: calc(100% - 1.5rem); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
