/* Design tokens: a white-cube gallery wall, black type, one pigment accent. */
:root {
  --wall: #f7f7f4;
  --ink: #1a1a1a;
  --muted: #6b6b66;
  --rule: #d9d9d3;
  --accent: #2b3bd1; /* ultramarine: links, focus, availability dot */
  --sold: #b3261e;

  --font-display: "Gloock", "Times New Roman", serif;
  --font-body: "Hanken Grotesk", system-ui, sans-serif;

  --gutter: clamp(16px, 4vw, 56px);
  --row-h: clamp(220px, 28vw, 380px);
  --measure: 62ch;
  --header-h: 96px; /* site header height; js/site.js keeps it exact */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--wall);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: 8px; background: var(--wall); padding: 8px 12px; z-index: 10; }

/* Header: lowercase wordmark, quiet nav. */
.site-header {
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px;
  padding: 28px var(--gutter);
}
.wordmark {
  font: 400 clamp(1.75rem, 3vw, 2.25rem)/1 var(--font-display);
  letter-spacing: -0.01em; text-decoration: none; text-transform: lowercase;
}
.wordmark:hover { color: var(--ink); }
.site-nav { display: flex; gap: clamp(16px, 3vw, 36px); }
.site-nav a { text-decoration: none; }
.site-nav a[aria-current="page"] { text-decoration: underline; }

main { padding: 0 var(--gutter) 96px; }

/* Wall label: the museum-label convention used for every work on the site. */
.label { font-size: 0.9375rem; line-height: 1.45; }
.label .title { font-style: italic; }
.label p { margin: 0; }
.label .meta { color: var(--muted); }
.label .status { margin-top: 10px; display: flex; align-items: center; gap: 8px; }
.label .status::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--accent);
}
.label .status.sold::before { background: var(--sold); }



.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin: 0 0 24px; }
.section-head h2 { margin: 0; font: 400 1.5rem/1.2 var(--font-display); }

/* Justified rows: each item grows in proportion to its aspect ratio,
   so every row shares one height and nothing is cropped. */
.grid { display: flex; flex-wrap: wrap; gap: clamp(16px, 2.5vw, 32px); }
.grid::after { content: ""; flex-grow: 999; } /* keeps the last row from stretching */
.tile {
  flex: var(--ar) 1 calc(var(--ar) * var(--row-h));
  margin: 0; display: flex; flex-direction: column; gap: 10px;
}
.tile button {
  all: unset; display: block; cursor: zoom-in; aspect-ratio: var(--ar); background: var(--rule);
}
.tile button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile .label { font-size: 0.875rem; }

/* Work page series filter. */
.filters { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 8px 0 36px; padding: 0; list-style: none; }
.filters button {
  all: unset; cursor: pointer; padding: 2px 0; color: var(--muted);
}
.filters button[aria-pressed="true"] { color: var(--ink); text-decoration: underline; text-underline-offset: 0.3em; }
.filters button:hover { color: var(--ink); }
.filters button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.page-title { font: 400 clamp(2.25rem, 5vw, 3.5rem)/1.05 var(--font-display); margin: 24px 0 8px; }
.about .page-title { margin-bottom: 28px; }

/* Viewer: a full-screen dialog with the work and its label. */
.viewer {
  border: 0; padding: 0; margin: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none;
  background: var(--wall); color: var(--ink);
}
.viewer::backdrop { background: var(--wall); }
.viewer-inner {
  height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 16rem;
  grid-template-rows: minmax(0, 1fr) auto; gap: 24px; padding: 64px var(--gutter) 28px;
}
.viewer figure { margin: 0; min-height: 0; display: flex; align-items: center; justify-content: center; }
.viewer img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.viewer .label { align-self: end; }
.viewer-controls { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; }
.viewer-controls button, .viewer-close {
  font: inherit; color: inherit; background: none; border: 0; padding: 8px 4px; cursor: pointer;
}
.viewer-controls button:hover, .viewer-close:hover { color: var(--accent); }
.viewer-close { position: absolute; top: 18px; right: var(--gutter); }
.viewer-count { color: var(--muted); font-variant-numeric: tabular-nums; }

/* About */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); }
.about .bio p { max-width: var(--measure); margin: 0 0 1em; }
.about .bio p:first-child { font: 400 clamp(1.375rem, 2.2vw, 1.75rem)/1.35 var(--font-display); }
.about h2, .contact h2 { font: 400 1.5rem/1.2 var(--font-display); margin: 56px 0 16px; }
.portrait { margin: 0 0 32px; max-width: 420px; }
.about > div:last-child > :first-child h2, .about > div:last-child > h2:first-child { margin-top: 24px; }
.artist-statement p, #commissions p { max-width: var(--measure); margin: 0 0 1em; }
.more { margin-top: 8px; }
.more summary { cursor: pointer; width: fit-content; text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
.more summary:hover { color: var(--accent); }
.more[open] summary { margin-bottom: 1em; }
.cv { margin: 0; display: grid; grid-template-columns: 4rem 1fr; gap: 6px 16px; }
.cv dt { color: var(--muted); font-variant-numeric: tabular-nums; }
.cv dd { margin: 0 0 12px; }
.cv dd p { margin: 0; }
.contact { border-top: 1px solid var(--rule); padding-top: 32px; margin-top: 72px; }
.contact p { max-width: var(--measure); }
.contact .email { font: 400 clamp(1.5rem, 3.5vw, 2.5rem)/1.2 var(--font-display); text-decoration: none; word-break: break-word; }
.contact .email:hover { text-decoration: underline; }

.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  padding: 28px var(--gutter); border-top: 1px solid var(--rule); color: var(--muted); font-size: 0.875rem;
}
.site-footer a { color: inherit; }

/* Inquiry link on a label. */
.label .ask { display: inline-block; margin-top: 12px; color: var(--accent); }
.label .ask:hover { color: var(--ink); }



/* Work page, grouped by series. */
.series + .series { margin-top: 72px; }
.series h2 { font: 400 1.5rem/1.2 var(--font-display); margin: 0 0 24px; }

/* Scroll reveal: tiles rise into place as they enter the viewport. Driven by
   scroll position in CSS, so browsers without support simply show them. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .tile { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 70%; }
    @keyframes rise { from { opacity: 0; transform: translateY(28px); } }
  }
}

@media (max-width: 760px) {
  .site-header { flex-wrap: wrap; row-gap: 12px; }
  :root { --header-h: 136px; }
  .viewer-inner { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto auto; padding-top: 56px; }
  .about { grid-template-columns: 1fr; }
  .tile { flex-basis: 100%; }
  .grid::after { display: none; }
}


.contact h2 { margin-top: 0; }

/* Language link: set apart from the page links. */
.site-nav .lang-switch { color: var(--muted); padding-left: clamp(16px, 3vw, 36px); border-left: 1px solid var(--rule); }
.site-nav .lang-switch:hover { color: var(--accent); }
.lang-switch { display: inline-flex; align-items: center; gap: 8px; }
.lang-switch .flag { flex: none; box-shadow: 0 0 0 1px var(--rule); }

/* Home: a stack of panels. A .pin sticks to the top of the viewport while the
   .cover after it (same .stack) scrolls up over it. Full bleed past main's gutter. */
.stack { position: relative; margin-inline: calc(-1 * var(--gutter)); }
.pin { position: sticky; top: 0; height: 100svh; }
/* The first panel sits under the header, so it is shorter by the header's height. */
.pin.hang { height: calc(100svh - var(--header-h)); }
.cover { position: relative; z-index: 1; background: var(--wall); padding: clamp(56px, 10vh, 120px) var(--gutter); }
main > .cover { margin-inline: calc(-1 * var(--gutter)); }

/* First panel: the featured piece hung on the wall, label to its right. */
.hang {
  display: grid; grid-template-columns: minmax(0, 1fr) 15rem; gap: clamp(24px, 4vw, 64px);
  align-items: end; padding: 8px var(--gutter) clamp(32px, 7vh, 72px); background: var(--wall);
}
.hang figure { margin: 0; height: 100%; min-height: 0; display: flex; align-items: flex-end; justify-content: center; }
.hang img {
  max-height: 100%; width: auto; object-fit: contain;
  box-shadow: 0 1px 2px rgba(0,0,0,.12), 0 18px 40px -18px rgba(0,0,0,.35);
  cursor: zoom-in;
}
.hang .label { padding-bottom: 8px; }

/* Second panel: her words on a full-bleed ultramarine field. */
.words {
  min-height: 100svh; display: flex; flex-direction: column; justify-content: center; gap: 40px;
  background: var(--accent); color: var(--wall);
}
.words .tagline { margin: 0; max-width: 32ch; font: 400 clamp(1.375rem, 2.4vw, 2rem)/1.3 var(--font-display); }
.words .pull { margin: 0; }
.words .pull p { margin: 0; max-width: 16ch; font: 400 clamp(2.75rem, 8vw, 7rem)/0.98 var(--font-display); letter-spacing: -0.02em; }
.words a { color: var(--wall); width: fit-content; }
.words a:hover { color: var(--wall); text-decoration-thickness: 2px; }
.words :focus-visible { outline-color: var(--wall); }

/* Pinned full-screen studio photo. */
.photo { margin: 0; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo figcaption { position: absolute; left: var(--gutter); bottom: 20px; color: var(--wall); font-size: 0.875rem; text-shadow: 0 1px 8px rgba(0,0,0,.6); }

/* Extra studio photos above recent work. */
.studio { display: flex; gap: clamp(16px, 2.5vw, 32px); margin: 0 0 72px; }
.studio figure { flex: var(--ar) 1 0; margin: 0; }
.studio img { width: 100%; height: auto; }
.studio figcaption { margin-top: 8px; color: var(--muted); font-size: 0.875rem; }

@media (max-width: 760px) {
  .hang { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; align-items: start; gap: 16px; }
  .studio { flex-direction: column; }
}
