/* ============================================================
   Selected Works — typographic catalogue
   Ground: paper grey. Display: EB Garamond. Body: Crimson Text.
   ============================================================ */

:root {
  --ground:      #F5F4F2;
  --ink:         #1C1917;
  --muted:       #78716C;
  --rule:        #E7E5E4;
  --sheet:       #FCFCFB;
  --ink-soft:    #44403C;

  --display: "EB Garamond", Georgia, "Times New Roman", serif;
  --body:    "Crimson Text", Georgia, "Times New Roman", serif;

  /* Spacious scale (density 2/10) */
  --s-1: 0.5rem;
  --s-2: 1rem;
  --s-3: 1.5rem;
  --s-4: 2.5rem;
  --s-5: 4rem;
  --s-6: 6rem;
  --s-7: 9rem;

  --measure: 34rem;          /* reading column */
  --page:    82rem;          /* outer container */
  --gutter:  clamp(1.5rem, 5vw, 4.5rem);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.1875rem;         /* Crimson runs small; 19px reads as 16 */
  line-height: 1.65;
  font-feature-settings: "liga" 1, "kern" 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

/* ---------- shared ---------- */

.wrap {
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.label {
  font-family: var(--display);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: var(--gutter);
  top: var(--s-2);
  z-index: 100;
  background: var(--ink);
  color: var(--ground);
  padding: 0.6rem 1rem;
  letter-spacing: 0.08em;
}

/* Focus: visible, and never removed. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 4px;
}

/* ---------- masthead ---------- */

.masthead {
  border-bottom: 1px solid var(--rule);
}

.masthead__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-2) var(--s-4);
  padding-block: var(--s-3);
}

.wordmark {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3.2vw, 2.125rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1;
  margin: 0;
  text-decoration: none;
  white-space: nowrap;
}

.wordmark a { text-decoration: none; }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1rem, 2.4vw, 2rem);
  align-items: baseline;
}

.nav a {
  font-family: var(--display);
  font-size: 0.9375rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--ink-soft);
  /* 0.6rem takes the tap target to ~45px tall, clearing the 44px
     minimum. Padding is invisible — the text does not move. */
  padding-block: 0.6rem;
  border-bottom: 1px solid transparent;
  transition: color 200ms ease, border-color 200ms ease;
}

.nav a:hover { color: var(--ink); border-bottom-color: var(--muted); }

.nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* ---------- the grid ----------
   No hero. The work begins immediately below the masthead —
   the convention on every serious painter's site. */

.plates {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-6) var(--s-5);
  padding-block: var(--s-5) var(--s-6);
  margin: 0;
  list-style: none;
}

@media (min-width: 48rem) {
  .plates { grid-template-columns: repeat(2, 1fr); }
}

.plate { margin: 0; }

.plate a {
  text-decoration: none;
  display: block;
}

.plate__frame {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 4rem;
}

/* The artwork itself gets no hover effect. Never tint, scale,
   or dim someone's painting on mouseover — the label responds instead. */
.plate img {
  max-height: 68vh;
  width: auto;
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.10);
}

.plate__empty {
  height: min(68vh, 32rem);   /* matches the cap on real images */
  width: auto;
  max-width: 100%;
  background: var(--sheet);
  border: 1px solid var(--rule);
  display: grid;
  place-items: center;
}

.plate__empty span {
  font-family: var(--display);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #A8A29E;
}

.plate figcaption {
  margin-top: var(--s-2);
  line-height: 1.5;
}

.plate__title {
  font-family: var(--display);
  font-size: 1.125rem;
  font-style: italic;
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}

.plate a:hover .plate__title { border-bottom-color: var(--ink); }

.plate__meta {
  font-size: 0.9375rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

/* ---------- single work ---------- */

.work {
  padding-block: var(--s-5) var(--s-6);
}

.work__frame {
  display: flex;
  justify-content: center;
}

.work__frame img {
  max-height: 78vh;
  width: auto;
  box-shadow: 0 2px 6px rgba(28, 25, 23, 0.12);
}

.work__empty {
  height: min(78vh, 40rem);
  width: auto;
  max-width: 100%;
  aspect-ratio: 4 / 5;
  background: var(--sheet);
  border: 1px solid var(--rule);
  display: grid;
  place-items: center;
}

/* Museum wall label. Title / year / medium / dimensions —
   the convention that does most of the academic work here. */
.tombstone {
  max-width: var(--measure);
  margin: var(--s-4) auto 0;
  text-align: center;
}

.tombstone h1 {
  font-family: var(--display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.25;
  margin: 0 0 var(--s-1);
}

.tombstone__line {
  color: var(--muted);
  font-size: 1rem;
  margin: 0;
}

.tombstone__note {
  margin-top: var(--s-3);
  text-align: left;
  color: var(--ink-soft);
}

.pager {
  display: flex;
  justify-content: space-between;
  gap: var(--s-2);
  border-top: 1px solid var(--rule);
  margin-top: var(--s-6);
  padding-top: var(--s-3);
}

.pager a {
  font-family: var(--display);
  font-size: 0.9375rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--ink-soft);
  /* Slightly more than the nav: these have no border to make up the
     last pixel, and 43.6px is not 44px. */
  padding-block: 0.65rem;
}

.pager a:hover { color: var(--ink); }
.pager span { color: #A8A29E; font-family: var(--display); font-size: 0.9375rem; }

/* ---------- prose pages ---------- */

.prose {
  max-width: var(--measure);
  margin-inline: auto;
  padding-block: var(--s-5) var(--s-6);
}

.prose h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.2;
  margin: 0 0 var(--s-4);
}

.prose p { margin: 0 0 var(--s-2); }

/* Opening line set larger — a printed-essay convention. */
.prose__lead {
  font-size: 1.3125rem;
  line-height: 1.55;
  color: var(--ink);
}

.prose a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* ---------- about, with portrait ----------
   Stacked on small screens; portrait beside the text once there is
   room for both without squeezing the measure. */

.about {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
  padding-block: var(--s-5) var(--s-6);
  max-width: var(--page);
  margin-inline: auto;
}

/* The layout owns the vertical rhythm here, not the prose block. */
.about .prose,
.about__prose { padding-block: 0; max-width: var(--measure); }

.about__portrait { margin: 0; }

.about__portrait img {
  width: 100%;
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.10);
}

.about__portrait figcaption {
  margin-top: var(--s-1);
  font-size: 0.875rem;
  color: var(--muted);
}

/* Breakpoint raised with the photo: 30rem + measure + gap needs the room,
   and squeezing the text column to fit the picture is the wrong trade. */
@media (min-width: 68rem) {
  .about {
    grid-template-columns: minmax(0, 30rem) minmax(0, var(--measure));
    gap: var(--s-5);
    justify-content: center;
    align-items: start;
  }
  /* Portrait first in the source so it leads on mobile, where the
     photograph is the friendlier opening. */
}

/* ---------- CV ----------
   Year in a narrow left column, entry in a wide right one. The eye
   scans the dates; the entries carry the substance. */

.cv {
  max-width: 52rem;
  margin-inline: auto;
  padding-block: var(--s-5) var(--s-6);
}

.cv__name {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.2;
  margin: 0 0 var(--s-5);
}

.cv__section { margin-bottom: var(--s-5); }

.cv__heading {
  font-family: var(--display);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin: 0 0 var(--s-2);
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--rule);
}

.cv__list { list-style: none; margin: 0; padding: 0; }

.cv__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.1rem;
  padding-block: var(--s-2);
}

.cv__row + .cv__row { border-top: 1px solid var(--rule); }

.cv__year {
  font-family: var(--display);
  font-size: 0.9375rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;   /* dates align down the column */
}

.cv__title {
  font-family: var(--display);
  font-size: 1.125rem;
  line-height: 1.35;
}

.cv__detail {
  margin-top: 0.2rem;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

@media (min-width: 40rem) {
  .cv__row {
    grid-template-columns: 7rem minmax(0, 1fr);
    gap: var(--s-3);
  }
  .cv__year { padding-top: 0.15rem; }   /* optical align to the title */
}

.contact__list {
  list-style: none;
  padding: 0;
  margin: var(--s-3) 0 0;
}

.contact__list li {
  padding-block: var(--s-2);
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem var(--s-3);
}

/* The email is the one thing a curator will actually tap. */
.contact__list a {
  display: inline-block;
  padding-block: 0.5rem;
}

.contact__list dt, .contact__key {
  font-family: var(--display);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  min-width: 7rem;
}

/* ---------- colophon ---------- */

.colophon {
  border-top: 1px solid var(--rule);
  padding-block: var(--s-3);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-2);
  color: var(--muted);
  font-size: 0.875rem;
}

/* ---------- motion ----------
   Subtle tier: 300–400ms, small travel, on entry only. */

.reveal {
  opacity: 0;
  transform: translateY(12px);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 380ms ease-out, transform 380ms ease-out;
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.is-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* No-JS safeguard: never let the reveal class hide content. */
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- phones ----------
   Horizontal padding widens the tap targets; the negative margin pulls
   the row back flush to the gutter so nothing appears to have moved. */

@media (max-width: 47.99rem) {

  /* --- masthead: buy back vertical space ---
     134px of chrome on an 812px screen is 16% of the view spent before
     the first painting. Tighter padding and a closer wordmark/nav pair
     return ~35px without shrinking a single tap target. */
  .masthead__inner {
    padding-block: 0.85rem 0.6rem;
    gap: 0.15rem var(--s-3);
  }

  .wordmark { font-size: 1.625rem; }

  .nav {
    gap: 0.1rem 0.35rem;
    margin-inline-start: -0.5rem;
  }
  /* Short labels like "cv" can't reach 44px wide on padding alone. */
  .nav a {
    padding-inline: 0.5rem;
    min-width: 44px;
    text-align: center;
  }

  /* --- small caps ---
     0.16em tracking is tuned for desktop reading distance. At 12px on a
     phone it pulls letters apart faster than the eye can regroup them,
     so: slightly larger, noticeably tighter. */
  .label,
  .cv__heading,
  .plate__empty span {
    font-size: 0.8125rem;
    letter-spacing: 0.1em;
  }

  /* --- the wall label ---
     Full-bleed images mean the caption is the only text in its band.
     It can afford to be read, not squinted at. */
  .plate__title { font-size: 1.25rem; }
  .plate__meta  { font-size: 1rem; }

  /* One column means 96px between works is pure scrolling. Tighter
     here; the desktop grid keeps its spacious rhythm. */
  .plates { gap: var(--s-5); }

  /* --- single work ---
     This is the page's title and had shrunk below the body text on the
     index. It should read as a heading. */
  .tombstone h1 { font-size: 1.625rem; }
  .tombstone__line { font-size: 1.0625rem; }

  /* --- CV ---
     Stacked, the year sits directly above the title, so it can no longer
     rely on a separate column to read as subordinate. Make it an eyebrow:
     smaller, tracked, uppercase — different in kind, not just in size. */
  .cv__name { font-size: 1.875rem; margin-bottom: var(--s-4); }

  .cv__year {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.15rem;
  }

  .cv__title  { font-size: 1.1875rem; line-height: 1.3; }
  .cv__detail { font-size: 1.0625rem; }
  .cv__row    { padding-block: var(--s-3); }

  /* --- pager ---
     Three links across 375px collide as soon as a title is long. Stack
     them: each becomes a full-width row with its own generous target. */
  .pager {
    flex-direction: column;
    gap: 0;
    margin-inline: 0;
  }
  .pager a,
  .pager span:not(:empty) {
    padding-block: 0.85rem;
    border-bottom: 1px solid var(--rule);
  }
  .pager a:last-child,
  .pager span:last-child { border-bottom: 0; }
  .pager span:empty { display: none; }

  .colophon { flex-direction: column; gap: 0.35rem; }
}

@media print {
  .nav, .pager, .colophon { display: none; }
  body { background: #fff; }
}
