/* ==========================================================================
   Edith Burtenshaw — gallery site
   Design: light, airy, German-minimalist (Ulm / Bauhaus lineage).
   Restraint, generous whitespace, a strict grid, near-monochrome palette.
   ========================================================================== */

/* ---- Design tokens ------------------------------------------------------ */
:root {
  /* Palette — the gallery wall */
  --paper:      #f4f3ef;   /* room / background */
  --wall:       #fbfaf8;   /* the wall a work hangs on */
  --ink:        #1b1b19;   /* primary text */
  --ink-soft:   #55534d;   /* secondary text */
  --muted:      #8b897f;   /* captions, metadata */
  --line:       #e4e2db;   /* hairlines */
  --line-soft:  #eeece6;

  /* Status accents — kept whisper-quiet */
  --available:  #3f6d52;   /* muted green */
  --reserved:   #9a7b3f;   /* muted ochre */
  --sold:       #a3a099;   /* grey */

  /* Type */
  --sans: "Montserrat", "Helvetica Neue", "Segoe UI", Arial, system-ui, sans-serif;
  --tracking-wide: 0.14em;
  --tracking-mid:  0.06em;

  /* Rhythm */
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --header-h: 4.5rem;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }

/* ---- Utilities ---------------------------------------------------------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--wall); padding: 0.75rem 1rem;
}
.skip-link:focus { left: 0; }

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

/* Focus visibility for keyboard users */
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ---- Header ------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(120%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header__inner {
  height: var(--header-h);
  padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem;
}
.wordmark__name {
  font-size: 1.02rem;
  font-weight: 500;
  letter-spacing: var(--tracking-mid);
}
.site-header__right { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.25rem); }
.site-nav { display: flex; gap: clamp(1rem, 3vw, 2.5rem); }

/* Hamburger (small screens only) */
.nav-toggle {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 2.4rem; height: 2.4rem; padding: 0;
  background: none; border: none;
}
.nav-toggle__bar {
  display: block; width: 21px; height: 1.5px; background: var(--ink);
  transition: transform 0.3s var(--ease), opacity 0.25s var(--ease);
}
.site-header.nav-open .nav-toggle__bar:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.site-header.nav-open .nav-toggle__bar:nth-child(2) { opacity: 0; }
.site-header.nav-open .nav-toggle__bar:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 640px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: color-mix(in srgb, var(--paper) 97%, transparent);
    backdrop-filter: saturate(120%) blur(10px);
    border-bottom: 1px solid var(--line);
    padding: 0.25rem var(--gutter) 1rem;
    display: none;
  }
  .site-header.nav-open .site-nav { display: flex; }
  .site-nav a {
    padding: 0.9rem 0; font-size: 0.9rem; letter-spacing: var(--tracking-mid);
    border-bottom: 1px solid var(--line-soft);
  }
  .site-nav a.is-active { border-bottom-color: var(--line-soft); color: var(--ink); }
}
.site-nav a {
  font-size: 0.78rem;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.site-nav a:hover { color: var(--ink); }
.site-nav a.is-active { color: var(--ink); border-bottom-color: var(--ink); }

/* ---- Footer ------------------------------------------------------------- */
/* A quiet copyright line under every view. It sits outside <main>, so it is
   rendered once and survives route changes. */
.site-footer {
  border-top: 1px solid var(--line-soft);
  padding: 2rem var(--gutter) 2.5rem;
}
.site-footer__line {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: var(--tracking-mid);
}
/* The walk is a fixed, viewport-filling view that hides the header too — the
   footer would only intrude on it. */
body.walk-mode .site-footer { display: none; }
/* The landing view is a single full-height statement; the copyright line would
   only add a strip of paper below it. The credit still appears on every other
   view, so nothing is lost. */
body.landing-mode .site-footer { display: none; }

/* ---- Main / view transitions ------------------------------------------- */
.site-main { min-height: calc(100vh - var(--header-h)); outline: none; }
.view { animation: fade-up 0.6s var(--ease) both; }
@keyframes fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* Opacity-only fade — safe to hold fixed-position children (no transform,
   so it never becomes their containing block). Used by the work detail. */
.view-static { animation: walk-in 0.5s var(--ease) both; }

/* ---- Landing (quiet typographic splash) --------------------------------- */
.splash {
  min-height: calc(100vh - var(--header-h));
  display: flex; align-items: center;
  padding: clamp(2rem, 8vh, 6rem) var(--gutter);
}
.splash__inner { max-width: 46rem; }
.splash__tag { margin-bottom: 1.5rem; }
.splash__name {
  font-size: clamp(2.6rem, 8vw, 5.5rem);
  font-weight: 300; line-height: 1.02; letter-spacing: -0.015em;
}
.splash__lead {
  margin-top: clamp(1.5rem, 4vh, 2.5rem);
  font-size: clamp(1.05rem, 1.7vw, 1.35rem); line-height: 1.55;
  color: var(--ink-soft); max-width: 40rem;
}
.splash__enter {
  display: inline-flex; align-items: center; gap: 0.6rem;
  margin-top: clamp(2rem, 5vh, 3rem);
  font-size: 0.82rem; letter-spacing: var(--tracking-wide); text-transform: uppercase;
  color: var(--ink); border-bottom: 1px solid var(--ink); padding-bottom: 3px;
}
.splash__enter span { transition: transform 0.3s var(--ease); }
.splash__enter:hover span { transform: translateX(5px); }

/* ---- Landing with a painting behind it (SITE.home.splash) --------------- */
/* The type sits on paint, not paper, so it is set heavier than the rest of the
   site and carries a soft shadow — a light hairline of separation that holds up
   over whichever part of the image lands behind a given letter. */
.splash--image {
  position: relative;
  /* Reach up under the transparent header so the image is truly edge to edge. */
  margin-top: calc(-1 * var(--header-h));
  min-height: 100vh;
  align-items: flex-end;
  padding-bottom: clamp(2.5rem, 9vh, 5.5rem);
  overflow: hidden;
}
.splash__bg { position: absolute; inset: 0; z-index: 0; }
.splash__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  /* Favour the upper-middle of the canvas — the foot of the frame is where the
     type goes, so the crop keeps the incident, not the empty water. */
  object-position: 50% 35%;
}
.splash__scrim {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(18,24,28,0.50) 0%,
    rgba(18,24,28,0.12) 42%,
    rgba(18,24,28,0.66) 100%
  );
}
.splash--image .splash__inner { position: relative; z-index: 2; }
.splash--image .splash__tag {
  color: rgba(255,255,255,0.82);
  font-weight: 600;
  text-shadow: 0 1px 12px rgba(0,0,0,0.45);
}
.splash--image .splash__name {
  color: #fff;
  font-weight: 500;
  text-shadow: 0 2px 28px rgba(0,0,0,0.45), 0 1px 3px rgba(0,0,0,0.35);
}
.splash--image .splash__lead {
  color: #fff;
  font-weight: 500;
  text-shadow: 0 1px 16px rgba(0,0,0,0.50), 0 1px 2px rgba(0,0,0,0.30);
}
.splash--image .splash__enter {
  color: #fff;
  font-weight: 600;
  border-bottom-color: rgba(255,255,255,0.85);
  text-shadow: 0 1px 12px rgba(0,0,0,0.45);
}

/* Credit for the painting, and a second way into its gallery. */
.splash__caption {
  position: absolute; z-index: 2;
  right: var(--gutter); bottom: 1.25rem;
  font-size: 0.68rem; letter-spacing: var(--tracking-wide); text-transform: uppercase;
  color: rgba(255,255,255,0.72);
  text-shadow: 0 1px 10px rgba(0,0,0,0.5);
  border-bottom: 1px solid transparent;
}
.splash__caption:hover { color: #fff; border-bottom-color: rgba(255,255,255,0.6); }

/* A phone crops a 4:3 canvas hard, so give the type more ground to sit on. */
@media (max-width: 640px) {
  .splash__scrim {
    background: linear-gradient(
      180deg,
      rgba(18,24,28,0.42) 0%,
      rgba(18,24,28,0.22) 30%,
      rgba(18,24,28,0.74) 100%
    );
  }
  .splash__caption { display: none; }
}

/* Header over the painting: no paper, no blur, light type. */
body.splash-mode .site-header {
  background: transparent;
  backdrop-filter: none;
  border-bottom-color: transparent;
}
body.splash-mode .site-header .wordmark,
body.splash-mode .site-header .site-nav a {
  color: #fff;
  text-shadow: 0 1px 12px rgba(0,0,0,0.5);
}
body.splash-mode .site-header .nav-toggle__bar { background: #fff; }
/* Once scrolled past the image the header takes its normal appearance back. */
body.splash-mode .site-header.is-scrolled {
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(120%) blur(10px);
  border-bottom-color: var(--line);
}
body.splash-mode .site-header.is-scrolled .wordmark,
body.splash-mode .site-header.is-scrolled .site-nav a {
  color: var(--ink);
  text-shadow: none;
}
body.splash-mode .site-header.is-scrolled .nav-toggle__bar { background: var(--ink); }
/* The mobile menu drops down over the image — it needs its own ground. */
body.splash-mode .site-header.nav-open {
  background: color-mix(in srgb, var(--paper) 96%, transparent);
  backdrop-filter: saturate(120%) blur(10px);
}
body.splash-mode .site-header.nav-open .wordmark,
body.splash-mode .site-header.nav-open .site-nav a {
  color: var(--ink);
  text-shadow: none;
}
body.splash-mode .site-header.nav-open .nav-toggle__bar { background: var(--ink); }

.page__more { margin-top: 2.5rem; }
.page__more a {
  font-size: 0.78rem; letter-spacing: var(--tracking-wide); text-transform: uppercase;
  color: var(--ink); border-bottom: 1px solid var(--line); padding-bottom: 2px;
}
.page__more a:hover { border-bottom-color: var(--ink); }

.wrap { padding: 0 var(--gutter); }
.wrap--narrow { max-width: 46rem; margin: 0 auto; }

/* ==========================================================================
   HOME
   ========================================================================== */
.hero {
  padding: clamp(4rem, 14vh, 10rem) var(--gutter) clamp(3rem, 8vh, 6rem);
  max-width: 60rem;
}
.hero__name {
  font-size: clamp(2.2rem, 6vw, 4.2rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.05;
}
.hero__tagline {
  margin-top: 1rem;
  color: var(--muted);
  letter-spacing: var(--tracking-mid);
  font-size: 0.95rem;
}
.hero__statement {
  margin-top: clamp(1.75rem, 4vh, 2.75rem);
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 42rem;
}
.hero__statement p + p { margin-top: 1.1em; }
/* Work index header (no bio) — a little tighter than the old hero */
.hero--work { padding-bottom: clamp(1rem, 3vh, 2rem); }

/* Category filter row */
.filters {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  padding: 0 var(--gutter);
  margin: clamp(1rem, 4vh, 2.5rem) 0 clamp(2rem, 6vh, 3.5rem);
}
.filter {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 0.5rem 1.05rem;
  font-size: 0.78rem;
  letter-spacing: var(--tracking-mid);
  color: var(--ink-soft);
  transition: all 0.25s var(--ease);
}
.filter:hover { border-color: var(--muted); color: var(--ink); }
.filter.is-active { background: var(--ink); border-color: var(--ink); color: var(--wall); }
/* Separates the medium filters from the public / private ones. Collapses to a
   full-width break when the row wraps on narrow screens. */
.filters__div {
  width: 1px; align-self: stretch;
  margin: 0.15rem 0.35rem;
  background: var(--line);
}
@media (max-width: 560px) {
  .filters__div { width: 100%; height: 0; margin: 0.2rem 0; background: none; }
}

/* Exhibition index */
.exhibitions { border-top: 1px solid var(--line); }
.exhibition-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  padding: clamp(2.25rem, 6vh, 4rem) var(--gutter);
  border-bottom: 1px solid var(--line);
  position: relative;
  transition: background 0.4s var(--ease);
}
.exhibition-row:hover { background: var(--wall); }
@media (min-width: 820px) {
  .exhibition-row { grid-template-columns: 1.2fr 2fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
}
.exhibition-row__head { }
.exhibition-row__title {
  font-size: clamp(1.6rem, 3.4vw, 2.6rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.005em;
}
.exhibition-row__sub {
  margin-top: 0.35rem;
  color: var(--muted);
  font-style: italic;
}
.exhibition-row__years {
  margin-top: 0.9rem;
  font-size: 0.78rem;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--muted);
}
.exhibition-row__body { align-self: center; }
.exhibition-row__desc { color: var(--ink-soft); max-width: 38rem; }
.exhibition-row__meta {
  margin-top: 1.25rem;
  display: flex; gap: 1.25rem; align-items: center;
  font-size: 0.8rem; letter-spacing: var(--tracking-mid); color: var(--muted);
}
.exhibition-row__enter {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.78rem; letter-spacing: var(--tracking-wide); text-transform: uppercase;
  color: var(--ink);
}
.exhibition-row__enter .arrow { transition: transform 0.3s var(--ease); }
.exhibition-row:hover .exhibition-row__enter .arrow { transform: translateX(4px); }

/* Thumbnails strip within an exhibition row */
.exhibition-row__thumbs {
  grid-column: 1 / -1;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(70px, 12vw, 120px);
  gap: 0.75rem;
  overflow-x: auto;
  padding-top: 0.5rem;
  scrollbar-width: thin;
}
.exhibition-row__thumbs::-webkit-scrollbar { height: 6px; }
.exhibition-row__thumbs::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
/* Uniform tiles: every thumb is the same 4:5 box whatever the work's shape, so
   portrait and landscape line up at one height instead of stepping up and down
   the row. `contain` fits the whole work inside its tile — nothing is cropped,
   so a landscape work simply leaves space above and below. The .ph placeholder
   carries its own aspect-ratio, so it needs overriding to fill the tile too. */
.thumb { aspect-ratio: 4 / 5; overflow: hidden; }
.thumb img,
.thumb .ph {
  width: 100%; height: 100%;
  object-fit: contain;
  aspect-ratio: auto;
}

/* ==========================================================================
   EXHIBITION — the "stroll" view
   ========================================================================== */
.exhibition-head {
  padding: clamp(3.5rem, 10vh, 7rem) var(--gutter) clamp(1.5rem, 4vh, 2.5rem);
  max-width: 60rem;
}
.exhibition-head__title {
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 400; line-height: 1.05; letter-spacing: -0.01em;
}
.exhibition-head__sub { margin-top: 0.5rem; color: var(--muted); font-style: italic; font-size: 1.15rem; }
.exhibition-head__years { margin-top: 1rem; }
.exhibition-head__desc { margin-top: 1.75rem; color: var(--ink-soft); font-size: 1.1rem; max-width: 40rem; }

.back-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.76rem; letter-spacing: var(--tracking-wide); text-transform: uppercase;
  color: var(--muted); margin-bottom: 1.75rem;
}
.back-link:hover { color: var(--ink); }
.back-link .arrow { transition: transform 0.3s var(--ease); }
.back-link:hover .arrow { transform: translateX(-4px); }

/* The gallery: one work per "wall", strolled vertically */
.gallery { padding-bottom: clamp(4rem, 12vh, 9rem); }
.gallery-empty {
  padding: 4rem var(--gutter); color: var(--muted); text-align: center;
}

.plate {
  padding: clamp(2.5rem, 8vh, 6rem) var(--gutter);
}
.plate + .plate { border-top: 1px solid var(--line-soft); }
.plate__inner {
  display: grid; gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  max-width: 76rem; margin: 0 auto;
}
@media (min-width: 860px) {
  .plate__inner { grid-template-columns: minmax(0, 1.7fr) minmax(15rem, 0.9fr); }
  /* alternate the hang so it reads like walking down a hall */
  .plate:nth-child(even) .plate__figure { order: 2; }
}

.plate__figure { margin: 0; }
.plate__frame {
  background: var(--wall);
  padding: clamp(1rem, 3vw, 2.25rem);
  box-shadow: 0 1px 0 var(--line), 0 24px 48px -32px rgba(0,0,0,0.28);
  display: grid; place-items: center;
  cursor: zoom-in;
  transition: box-shadow 0.5s var(--ease);
}
.plate__frame:hover { box-shadow: 0 1px 0 var(--line), 0 30px 60px -30px rgba(0,0,0,0.34); }
.plate__frame img { width: 100%; height: auto; }

/* Gallery card / label — the museum wall text */
.card {
  border-top: 2px solid var(--ink);
  padding-top: 1rem;
  max-width: 24rem;
}
.card__title {
  font-size: 1.15rem; font-weight: 400;
}
.card__title em { font-style: italic; }
.card__year { color: var(--muted); font-style: normal; }
.card__lines { margin-top: 0.6rem; }
.card__lines div { color: var(--ink-soft); font-size: 0.92rem; line-height: 1.5; }
.card__sale {
  margin-top: 1rem; padding-top: 0.85rem; border-top: 1px solid var(--line);
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
}
.card__price { font-size: 0.98rem; }
.status {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: 0.72rem; letter-spacing: var(--tracking-wide); text-transform: uppercase;
  color: var(--muted);
}
.status::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--sold); display: inline-block;
}
.status--available { color: var(--available); }
.status--available::before { background: var(--available); }
.status--reserved { color: var(--reserved); }
.status--reserved::before { background: var(--reserved); }
.status--sold::before { background: var(--sold); }
.status--notforsale::before { background: var(--muted); }
.status--display { color: var(--muted); }
.status--display::before { background: var(--muted); }

.card__view {
  margin-top: 1.1rem;
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.74rem; letter-spacing: var(--tracking-wide); text-transform: uppercase;
  color: var(--ink); border-bottom: 1px solid var(--line); padding-bottom: 2px;
}
.card__view:hover { border-bottom-color: var(--ink); }

/* ==========================================================================
   WORK DETAIL
   ========================================================================== */
.detail { padding: clamp(2rem, 6vh, 4rem) var(--gutter) clamp(4rem, 10vh, 8rem); }
.detail__inner {
  display: grid; gap: clamp(2rem, 6vw, 5rem);
  max-width: 82rem; margin: 0 auto; align-items: start;
}
@media (min-width: 900px) {
  .detail__inner { grid-template-columns: minmax(0, 1.9fr) minmax(18rem, 0.9fr); }
}
.detail__frame {
  background: var(--wall);
  padding: clamp(1.25rem, 4vw, 3rem);
  box-shadow: 0 1px 0 var(--line), 0 30px 60px -34px rgba(0,0,0,0.3);
  display: grid; place-items: center;
}
.detail__frame img { width: 100%; height: auto; }
.detail__aside { position: sticky; top: calc(var(--header-h) + 1.5rem); }
.detail__eyebrow { margin-bottom: 0.75rem; }
.detail__title { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 400; line-height: 1.1; }
.detail__title em { font-style: italic; }
.detail__year { color: var(--muted); }

.spec { margin-top: 1.5rem; border-top: 2px solid var(--ink); }
.spec__row {
  display: grid; grid-template-columns: 8rem 1fr; gap: 1rem;
  padding: 0.7rem 0; border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}
.spec__key { color: var(--muted); letter-spacing: var(--tracking-mid); font-size: 0.78rem; text-transform: uppercase; }
.spec__val { color: var(--ink-soft); }

.detail__desc { margin-top: 1.75rem; color: var(--ink-soft); line-height: 1.65; }

.acquire {
  margin-top: 1.75rem; padding: 1.35rem; background: var(--wall); border: 1px solid var(--line);
}
.acquire__price { font-size: 1.35rem; margin: 0.35rem 0 0.9rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  width: 100%; padding: 0.9rem 1.25rem;
  background: var(--ink); color: var(--wall);
  font-size: 0.78rem; letter-spacing: var(--tracking-wide); text-transform: uppercase;
  border: 1px solid var(--ink);
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.btn:hover { background: transparent; color: var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--wall); }

/* prev / next stroll */
.detail__nav {
  max-width: 82rem; margin: clamp(2.5rem, 6vh, 4rem) auto 0;
  display: flex; justify-content: space-between; gap: 1rem;
  border-top: 1px solid var(--line); padding-top: 1.5rem;
}
.detail__nav a { display: grid; gap: 0.25rem; font-size: 0.9rem; }
.detail__nav a[data-dir="next"] { text-align: right; }
.detail__nav .eyebrow { font-size: 0.68rem; }
.detail__nav .disabled { opacity: 0.3; pointer-events: none; }

/* ==========================================================================
   PLACEHOLDER ARTWORK (shown until a real image is added)
   A quiet, generative-looking neutral block — never a "broken image".
   ========================================================================== */
.ph {
  width: 100%; aspect-ratio: var(--ph-ratio, 4 / 5);
  background:
    linear-gradient(135deg,
      color-mix(in srgb, var(--ink) 4%, var(--wall)) 0%,
      color-mix(in srgb, var(--ink) 9%, var(--wall)) 100%);
  display: grid; place-items: center; position: relative; overflow: hidden;
}
.ph::after {
  content: attr(data-label);
  position: absolute; bottom: 0.75rem; left: 0.75rem;
  font-size: 0.62rem; letter-spacing: var(--tracking-wide); text-transform: uppercase;
  color: var(--muted);
}
.ph__mark {
  width: 42%; height: 42%; opacity: 0.5;
}

/* ==========================================================================
   ABOUT / CONTACT
   ========================================================================== */
.page { padding: clamp(3.5rem, 10vh, 7rem) var(--gutter) clamp(4rem, 10vh, 8rem); }
.page__inner { max-width: 42rem; }
.page__title { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 400; letter-spacing: -0.01em; }
.page__tagline { margin-top: 0.6rem; color: var(--muted); letter-spacing: var(--tracking-mid); font-size: 0.95rem; }
.page__body { margin-top: 1.75rem; font-size: 1.08rem; line-height: 1.7; color: var(--ink-soft); }

/* CV lists (Education / Exhibitions) on the About page */
.cv__h {
  margin: 2.5rem 0 0; font-size: 0.74rem; font-weight: 500;
  letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--muted);
}
.cv__list { list-style: none; margin: 0.75rem 0 0; padding: 0; }
.cv__list li {
  padding: 0.55rem 0; border-bottom: 1px solid var(--line-soft);
  color: var(--ink-soft); font-size: 0.95rem;
}
.page__body p + p { margin-top: 1.2em; }

/* ---- Exhibition history: one line per entry; rows with a gallery link ---- */
.cv__list--ex { margin-top: 1.5rem; }
.cv-ex { padding: 0.55rem 0; border-bottom: 1px solid var(--line-soft); }
/* `padding: 0` has to out-specify `.cv__list li` — a linked row's own <a>
   carries the padding so the whole row is the hit area. */
.cv__list li.cv-ex--linked { padding: 0; }
/* The <li> is the row; the <a> fills it. Text left, work count right. */
.cv-ex__link {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding: 0.55rem 0; border: 0; color: var(--ink);
  transition: padding-left 0.3s var(--ease);
}
.cv-ex__text { min-width: 0; }
.cv-ex__go {
  flex: none;
  font-size: 0.72rem; letter-spacing: var(--tracking-wide); text-transform: uppercase;
  color: var(--muted); white-space: nowrap;
  opacity: 0; transition: opacity 0.3s var(--ease);
}
.cv-ex__go .arrow { display: inline-block; transition: transform 0.3s var(--ease); }

.cv-ex--linked:hover { background: var(--line-soft); }
.cv-ex--linked:hover .cv-ex__link { padding-left: 0.75rem; }
.cv-ex--linked:hover .cv-ex__go,
.cv-ex__link:focus-visible .cv-ex__go { opacity: 1; }
.cv-ex--linked:hover .cv-ex__go .arrow { transform: translateX(4px); }
.cv-ex__link:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }

/* Touch: no hover, so keep the affordance visible. */
@media (hover: none) {
  .cv-ex__go { opacity: 1; }
}

/* The email address itself is the call to action — set larger than body copy. */
.contact__email { margin: 2rem 0 0; }
.contact__email a {
  font-size: clamp(1.15rem, 2.4vw, 1.6rem);
  border-bottom: 1px solid var(--line);
  transition: border-color 0.25s var(--ease);
}
.contact__email a:hover { border-bottom-color: var(--ink); }

.contact__grid { margin-top: 2.5rem; display: grid; gap: 1.25rem; }
.contact__item .eyebrow { display: block; margin-bottom: 0.35rem; }
.contact__item a { border-bottom: 1px solid var(--line); }
.contact__item a:hover { border-bottom-color: var(--ink); }

/* ==========================================================================
   LIGHTBOX (zoom a work in the stroll view)
   ========================================================================== */
.lightbox {
  position: fixed; inset: 0; z-index: 80;
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  display: grid; place-items: center; padding: clamp(1.5rem, 6vw, 5rem);
  opacity: 0; visibility: hidden; transition: opacity 0.35s var(--ease), visibility 0.35s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__img { max-width: 100%; max-height: 100%; box-shadow: 0 40px 80px -20px rgba(0,0,0,0.5); background: var(--wall); padding: 1.5rem; }
.lightbox__close {
  position: absolute; top: 1.25rem; right: 1.5rem; color: var(--wall);
  font-size: 0.78rem; letter-spacing: var(--tracking-wide); text-transform: uppercase;
  background: none; border: none;
}
.lightbox__cap { position: absolute; bottom: 1.25rem; left: 0; right: 0; text-align: center; color: var(--wall); font-size: 0.85rem; opacity: 0.85; }

/* ==========================================================================
   THE WALK — immersive 3D corridor (replaces the old scrolling stroll)
   ========================================================================== */
/* When walking, take over the viewport and hide the browser/site chrome. */
body.walk-mode { overflow: hidden; }
body.walk-mode .site-header { display: none; }
body.walk-mode .site-main { min-height: 0; }

.walk {
  position: fixed; inset: 0; overflow: hidden;
  background:
    radial-gradient(130% 90% at 50% 6%,
      #fefefc 0%, var(--paper) 52%, #e8e5dd 100%);
  /* Opacity-only fade — must NOT use transform/filter here, or this element
     would become the containing block for its own fixed positioning. */
  animation: walk-in 0.5s var(--ease) both;
}
@keyframes walk-in { from { opacity: 0; } to { opacity: 1; } }
/* A faint grounding shadow so the room feels floored, not floating. */
.walk::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 36%;
  background: linear-gradient(to top, rgba(30, 28, 24, 0.07), transparent);
  pointer-events: none;
}

.walk__stage {
  position: absolute; inset: 0;
  perspective: 1500px;
  perspective-origin: 50% 45%;
  touch-action: none;               /* we own drag gestures */
  cursor: grab;
}
.walk__stage:active { cursor: grabbing; }
.walk__world {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  will-change: transform;
}

/* Each work in the coverflow row. JS sets its transform every frame (position
   along the row + scale); this is just the centred default before JS runs. */
.art {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  transform-origin: center;
  background: none; border: none; padding: 0; margin: 0;
  cursor: pointer; text-align: center;
  will-change: transform, opacity;
}
.art__frame {
  display: inline-block;
  background: var(--wall);
  padding: clamp(0.5rem, 1.4vw, 1.4rem);
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.05),
    0 50px 70px -34px rgba(20, 18, 14, 0.55);
  transition: box-shadow 0.4s var(--ease);
}
.art:hover .art__frame { box-shadow: 0 1px 0 rgba(0,0,0,0.05), 0 60px 90px -30px rgba(20,18,14,0.6); }
.art.is-centre .art__frame { box-shadow: 0 1px 0 rgba(0,0,0,0.06), 0 80px 100px -28px rgba(20,18,14,0.62); }
.art:focus-visible { outline: none; }
.art:focus-visible .art__frame { outline: 2px solid var(--ink); outline-offset: 4px; }
/* Media is always contained within the viewport. */
.art__frame img {
  display: block;
  max-height: 52vh; max-width: 44vw; width: auto; height: auto;
}
.art__frame .ph {
  height: 46vh; width: auto; max-width: 44vw;
  aspect-ratio: 4 / 5;
}
/* Gallery-card label under each work (scales with distance, like a real card). */
.art__label {
  display: block; margin-top: 0.9rem;
  max-width: 22rem; margin-inline: auto;
}
.art__title { display: block; font-size: 0.98rem; }
.art__title em { font-style: italic; }
.art__meta { display: block; font-size: 0.82rem; color: var(--ink-soft); margin-top: 0.15rem; }
.art__sale {
  display: block; margin-top: 0.35rem;
  font-size: 0.7rem; letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--muted);
}

/* Top overlay — back link + exhibition title */
.walk__top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 5;
  padding: clamp(1rem, 3vw, 2rem) var(--gutter);
  display: flex; justify-content: space-between; align-items: flex-start; gap: 1.5rem;
  pointer-events: none;
}
.walk__top .back-link, .walk__titleblock { pointer-events: auto; }
.walk__top .back-link { margin: 0; }
.walk__titleblock { text-align: right; }
.walk__title { font-size: clamp(1.2rem, 2.6vw, 1.9rem); font-weight: 400; letter-spacing: -0.005em; }
.walk__sub { color: var(--muted); font-style: italic; font-size: 0.95rem; }
.walk__years { margin-top: 0.35rem; }

/* Hint line */
.walk__hint {
  position: absolute; left: 50%; bottom: clamp(4.5rem, 11vh, 6.5rem);
  transform: translateX(-50%); z-index: 5;
  font-size: 0.76rem; letter-spacing: var(--tracking-mid); color: var(--muted);
  text-align: center; padding: 0 1rem; max-width: 90vw;
  transition: opacity 0.5s var(--ease);
}
.walk__hint.is-hidden { opacity: 0; }

/* Bottom HUD — position + prev/next */
.walk__hud {
  position: absolute; left: 50%; bottom: clamp(1rem, 3vw, 1.75rem);
  transform: translateX(-50%); z-index: 6;
  display: flex; align-items: center; gap: 1rem;
  background: color-mix(in srgb, var(--paper) 72%, transparent);
  backdrop-filter: saturate(120%) blur(10px);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 0.4rem 0.55rem;
}
.walk__nav {
  width: 2.3rem; height: 2.3rem; border-radius: 50%;
  border: 1px solid var(--line); background: var(--wall);
  display: grid; place-items: center; color: var(--ink);
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.walk__nav:hover { background: var(--ink); color: var(--wall); }
.walk__counter {
  min-width: 3.5rem; text-align: center;
  font-size: 0.78rem; letter-spacing: var(--tracking-mid); color: var(--ink-soft);
}

/* Divider between the browse arrows and the zoom arrows in the HUD */
.walk__div { width: 1px; height: 1.4rem; background: var(--line); margin: 0 0.2rem; }

/* Narrow (portrait phones): widen coverflow spacing handled in JS; keep the
   larger images and stack the top overlay. */
@media (max-width: 700px) {
  .art__frame img { max-height: 42vh; max-width: 74vw; }
  .art__frame .ph { height: 38vh; max-width: 74vw; }
  .art__label { max-width: 80vw; }
  .walk__top { flex-direction: column; }
  .walk__titleblock { text-align: left; }
}

/* Short viewports (landscape phones): vertical space is tight, so the caption
   and the bottom nav pill collide. Shrink the image, compact the caption and
   pill, and drop the hint line to reclaim room — nothing needs to move. */
@media (max-height: 520px) and (orientation: landscape) {
  .art__frame img { max-height: 50vh; max-width: 42vw; }
  .art__frame .ph { height: 46vh; max-width: 42vw; }
  .art__label { margin-top: 0.4rem; max-width: 60vw; }
  .art__title { font-size: 0.85rem; }
  .art__meta { font-size: 0.72rem; margin-top: 0.05rem; }
  .art__sale { font-size: 0.62rem; margin-top: 0.2rem; }
  .walk__hint { display: none; }
  .walk__hud { bottom: 0.4rem; padding: 0.3rem 0.45rem; gap: 0.6rem; }
  .walk__nav { width: 2rem; height: 2rem; }
  .walk__top { padding: 0.4rem var(--gutter); }
  .walk__title { font-size: 1.05rem; }
}

/* ==========================================================================
   WORK DETAIL — override so the image is ALWAYS contained in the viewport
   ========================================================================== */
.detail { padding: 0 var(--gutter); }
.detail__inner {
  display: grid; gap: clamp(2rem, 5vw, 4.5rem);
  max-width: 82rem; margin: 0 auto;
  align-items: center;
  min-height: calc(100vh - var(--header-h));
  /* extra bottom padding so content clears the fixed work bar */
  padding: clamp(1.5rem, 4vh, 3rem) 0 clamp(5rem, 10vh, 7rem);
}
@media (min-width: 900px) {
  .detail__inner { grid-template-columns: minmax(0, 1.7fr) minmax(18rem, 0.95fr); }
}
.detail__frame {
  margin: 0; background: var(--wall);
  padding: clamp(1rem, 3vw, 2.5rem);
  box-shadow: 0 1px 0 var(--line), 0 40px 70px -40px rgba(20,18,14,0.4);
  display: grid; place-items: center;
  max-height: calc(100vh - var(--header-h) - 4rem);
}
.detail__frame img {
  width: auto; height: auto;
  max-width: 100%;
  max-height: calc(100vh - var(--header-h) - 8rem);
  object-fit: contain;
}
.detail__frame .ph {
  width: auto; height: calc(100vh - var(--header-h) - 8rem);
  max-height: 66vh; max-width: 100%;
  aspect-ratio: 4 / 5;
}
.detail__aside { position: static; }

/* Fixed work-to-work navigation — pinned to the viewport bottom so it never
   moves as the text above changes. Same spot every time = click, click, click. */
.workbar {
  position: fixed; left: 50%; bottom: clamp(1rem, 3vw, 1.75rem);
  transform: translateX(-50%); z-index: 40;
  display: flex; align-items: center; gap: 1rem;
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  backdrop-filter: saturate(120%) blur(10px);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 0.4rem 0.55rem;
}
.workbar__nav {
  width: 2.3rem; height: 2.3rem; border-radius: 50%;
  border: 1px solid var(--line); background: var(--wall);
  display: grid; place-items: center; color: var(--ink);
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.workbar__nav:hover { background: var(--ink); color: var(--wall); }
.workbar__nav.is-disabled { opacity: 0.3; pointer-events: none; }
.workbar__pos {
  min-width: 3.5rem; text-align: center;
  font-size: 0.78rem; letter-spacing: var(--tracking-mid); color: var(--ink-soft);
}

/* ---- Reduced motion ----------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
