/* ============================================================
   IRIS YON — Gallery Portfolio
   A white-cube museum presentation.
   Sections: tokens · base · masthead · buttons · hero ·
   page headers · gallery (walls/frames/placards) · prose ·
   cv · contact · lightbox · footer · utilities · responsive
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --wall:        #f3f3f1;   /* cool, contemporary off-white */
  --wall-deep:   #e9e9e5;
  --paper:       #ffffff;
  --ink:         #0d0d0c;   /* near-black */
  --ink-soft:    #45443f;
  --muted:       #8c8b85;
  --line:        #e5e4df;
  --frame:       #0d0d0c;
  --mat:         #ffffff;
  --accent:      #0d0d0c;   /* monochrome — the art carries the colour */

  --serif: "Space Grotesk", "Inter", sans-serif;   /* modern display */
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono:  "Space Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --maxw: 1280px;
  --gutter: clamp(1.25rem, 5vw, 4.5rem);

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

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

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

body {
  margin: 0;
  background: var(--wall);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  text-transform: lowercase;   /* all-lowercase aesthetic */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; }

/* form elements don't inherit text-transform by default — make them */
button, input, select, textarea { text-transform: inherit; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: 0.005em;
  margin: 0;
}

::selection { background: rgba(138, 109, 59, 0.18); }

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

/* A small typographic device used throughout — the "wall text" overline */
.overline {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: lowercase;
  color: var(--muted);
}

/* ---------- Masthead / museum wayfinding ---------- */
.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--wall) 82%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.masthead__inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 1.05rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  font-family: var(--serif);
  font-size: 1.18rem;
  letter-spacing: 0.32em;
  text-transform: lowercase;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}
.brand span { color: var(--muted); }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 2.3rem);
}
.nav a {
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: lowercase;
  text-decoration: none;
  color: var(--ink-soft);
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.nav a:hover { color: var(--ink); border-color: var(--muted); }
.nav a.is-active { color: var(--ink); border-color: var(--ink); }

.nav__toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.4rem;
  cursor: pointer;
  color: var(--ink);
}
.nav__toggle svg { display: block; }

/* ---------- Buttons / links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  text-decoration: none;
  color: var(--ink);
  padding: 0.85rem 1.6rem;
  border: 1px solid var(--ink);
  background: transparent;
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.btn:hover { background: var(--ink); color: var(--wall); }
.btn .arrow { transition: transform 0.3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

.btn--ghost { border-color: var(--line); color: var(--ink-soft); }
.btn--ghost:hover { border-color: var(--ink); background: transparent; color: var(--ink); }

.textlink {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--muted);
  transition: border-color 0.25s var(--ease);
}
.textlink:hover { border-color: var(--ink); }

/* ---------- Hero / entrance ---------- */
.hero {
  min-height: calc(100vh - 64px);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
  padding-block: clamp(3rem, 8vh, 7rem);
}
.hero__lede .overline { display: block; margin-bottom: 1.6rem; }
.hero__name {
  font-size: clamp(3.4rem, 9vw, 7rem);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 0.98;
}
.hero__role {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  color: var(--ink-soft);
  margin-top: 1rem;
}
.hero__blurb {
  max-width: 34ch;
  margin-top: 1.8rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
}
.hero__actions {
  margin-top: 2.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Featured framed work in the entrance */
.hero__feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
}

/* ---------- Page header (interior pages) ---------- */
.page-head {
  padding-block: clamp(3.2rem, 9vh, 6rem) clamp(2rem, 5vh, 3.4rem);
  border-bottom: 1px solid var(--line);
}
.page-head .overline { display: block; margin-bottom: 1.1rem; }
.page-head h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  font-weight: 500;
}
.page-head__sub {
  margin-top: 1.1rem;
  max-width: 56ch;
  color: var(--ink-soft);
  font-size: 1.22rem;
}

/* ============================================================
   GALLERY — the museum hang
   ============================================================ */
.page-gallery { background: var(--wall); }

.exhibit-list {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* One "stop" on the walk through the room */
.exhibit {
  display: grid;
  grid-template-columns: 1fr minmax(240px, 320px);
  align-items: center;
  gap: clamp(2rem, 5vw, 5.5rem);
  min-height: 88vh;
  padding-block: clamp(3rem, 8vh, 6rem);
  position: relative;
}
.exhibit + .exhibit { border-top: 1px solid var(--line); }

/* Alternate which wall the work hangs on, like walking a corridor */
.exhibit:nth-child(even) { grid-template-columns: minmax(240px, 320px) 1fr; }
.exhibit:nth-child(even) .exhibit__stage { order: 2; }
.exhibit:nth-child(even) .placard { order: 1; }

/* The wall area, with a soft wash of track lighting from above */
.exhibit__stage {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding: clamp(1rem, 3vw, 3rem) 0;
}
.exhibit__stage::before {
  content: "";
  position: absolute;
  top: -4%;
  left: 50%;
  width: 78%;
  height: 70%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at top,
              rgba(255, 252, 244, 0.9) 0%,
              rgba(255, 252, 244, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

/* ---- The framed object ---- */
.frame {
  position: relative;
  z-index: 1;
  background: var(--frame);
  display: inline-block;
  max-width: min(100%, 640px);
  /* lift the object off the wall */
  box-shadow:
    0 1px 2px rgba(28, 24, 18, 0.18),
    0 10px 22px rgba(28, 24, 18, 0.20),
    0 34px 60px rgba(28, 24, 18, 0.14);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
.frame:hover {
  box-shadow:
    0 2px 4px rgba(28, 24, 18, 0.20),
    0 16px 30px rgba(28, 24, 18, 0.24),
    0 48px 80px rgba(28, 24, 18, 0.16);
}

/* Oils on canvas — a tight floater frame, no mat */
.frame--float { padding: 9px; }
.frame--float .frame__art { box-shadow: 0 0 0 1px rgba(255,255,255,0.04) inset; }

/* Works on paper — generous cut mat under the frame */
.frame--mat { padding: 12px; }
.frame--mat .frame__mat {
  background: var(--mat);
  padding: clamp(20px, 4.5%, 46px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05) inset;
}
.frame--mat .frame__art {
  /* the bevelled cut edge of the mat opening */
  box-shadow:
    0 0 0 1px rgba(28,24,18,0.35),
    0 2px 8px rgba(28,24,18,0.18);
}

.frame__art {
  display: block;
  width: 100%;
  height: auto;
  cursor: zoom-in;
  background: var(--wall-deep);
}

/* grounding shadow where the work meets the floor/wall */
.frame__shadow {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -26px;
  height: 26px;
  background: radial-gradient(ellipse at center,
              rgba(28,24,18,0.22) 0%, rgba(28,24,18,0) 72%);
  z-index: 0;
  pointer-events: none;
}

/* ---- The wall label ---- */
.placard {
  position: relative;
  align-self: center;
  max-width: 320px;
}
.placard__plate {
  font-family: var(--serif);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.9rem;
}
.placard__artist {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: lowercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.placard__title {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.5rem;
  line-height: 1.2;
}
.placard__title .year { font-style: normal; color: var(--ink-soft); }
.placard__meta {
  margin-top: 0.7rem;
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--ink-soft);
}
.placard__meta span { display: block; }
.placard__rule {
  width: 34px;
  height: 1px;
  background: var(--ink);
  margin: 1.1rem 0;
  opacity: 0.5;
}
.placard__note {
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 1.62;
  color: var(--ink-soft);
}

/* ============================================================
   PROSE — statement & about
   ============================================================ */
.prose {
  max-width: 60ch;
  margin-inline: auto;
  padding-block: clamp(3rem, 7vh, 5rem);
  font-family: var(--sans);
  font-size: 1.08rem;
  line-height: 1.7;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.prose p { margin: 0 0 1.3em; }
.prose .lead { font-size: 1.2rem; color: var(--ink); }

.signature {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.6rem;
  margin-top: 2.4rem;
  color: var(--ink);
}

/* About: portrait + text */
.about-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
  padding-block: clamp(3rem, 7vh, 5rem);
}
.portrait {
  position: sticky;
  top: 100px;
}
.portrait__frame {
  background: var(--frame);
  padding: 10px;
  box-shadow: 0 12px 34px rgba(28,24,18,0.22);
}
.portrait__img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--wall-deep);
}
.portrait__placeholder {
  width: 100%;
  aspect-ratio: 4 / 5;
  display: grid;
  place-items: center;
  background: var(--wall-deep);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: lowercase;
  text-align: center;
  padding: 1rem;
}
.portrait__caption {
  margin-top: 0.9rem;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-style: italic;
  font-family: var(--serif);
}
.about-body { font-family: var(--serif); font-size: 1.18rem; line-height: 1.74; color: var(--ink-soft); }
.about-body p { margin: 0 0 1.35em; }
.about-body strong { color: var(--ink); font-weight: 600; }

.factsheet {
  margin-top: 2.4rem;
  border-top: 1px solid var(--line);
  padding-top: 1.6rem;
  display: grid;
  gap: 1rem;
}
.factsheet__row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 1rem;
  font-family: var(--sans);
  font-size: 0.95rem;
}
.factsheet__key {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: lowercase;
  color: var(--muted);
  padding-top: 0.2em;
}
.factsheet__val { color: var(--ink-soft); }

/* ============================================================
   CV
   ============================================================ */
.cv {
  max-width: 860px;
  margin-inline: auto;
  padding-block: clamp(3rem, 7vh, 5rem);
}
.cv__top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 2.4rem;
}
.cv__contactline { font-size: 1.02rem; color: var(--ink-soft); }
.cv__contactline a { text-decoration: none; border-bottom: 1px solid var(--muted); }
.cv-section { padding-block: 1.8rem; border-top: 1px solid var(--line); }
.cv-section__head {
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: lowercase;
  color: var(--muted);
  margin-bottom: 1.3rem;
}
.cv-entry {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1.4rem;
  padding-block: 0.7rem;
}
.cv-entry__year {
  font-family: var(--sans);
  font-size: 0.94rem;
  color: var(--muted);
  padding-top: 0.15em;
  white-space: nowrap;
}
.cv-entry__title { font-family: var(--serif); font-size: 1.36rem; }
.cv-entry__detail { color: var(--ink-soft); font-size: 1.06rem; margin-top: 0.2rem; line-height: 1.5; }
.cv-entry__detail em { color: var(--muted); }

.tags { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.tag {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact {
  max-width: 760px;
  margin-inline: auto;
  padding-block: clamp(3rem, 9vh, 6rem);
  text-align: center;
}
.contact h1 { font-size: clamp(2.6rem, 6vw, 4.2rem); }
.contact__lede { font-family: var(--serif); font-size: 1.3rem; color: var(--ink-soft); margin: 1.4rem auto 2.6rem; max-width: 50ch; }
.contact__email {
  display: inline-block;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  text-decoration: none;
  border-bottom: 1px solid var(--muted);
  padding-bottom: 0.1em;
  transition: border-color 0.25s var(--ease);
}
.contact__email:hover { border-color: var(--ink); }
.contact__channels {
  margin-top: 2.8rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 2rem;
}
.contact__channels a {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: lowercase;
  text-decoration: none;
  color: var(--ink-soft);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}
.contact__channels a:hover { color: var(--ink); border-color: var(--ink); }

/* contact form */
.contact-form {
  max-width: 32rem; margin: 0 auto;
  display: flex; flex-direction: column; gap: 1.3rem; text-align: left;
}
.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field__label {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.06em; color: var(--muted);
}
.contact-form input, .contact-form textarea {
  font-family: var(--sans); font-size: 1rem; line-height: 1.5; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: 2px;
  padding: 0.78rem 0.9rem; width: 100%; resize: vertical;
  text-transform: none;   /* let visitors type normally */
  transition: border-color 0.25s var(--ease);
}
.contact-form input::placeholder, .contact-form textarea::placeholder { color: var(--muted); }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--ink); }
.contact-form .btn { align-self: flex-start; margin-top: 0.3rem; }
.contact-form__note { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); min-height: 1em; margin: 0; transition: color 0.3s var(--ease); }
.contact-form__note.is-ok  { color: var(--ink); }
.contact-form__note.is-err { color: #b23a2e; }
.contact__alt {
  margin-top: 2.4rem; font-size: 0.92rem; color: var(--muted);
}
.contact__alt a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--muted); padding-bottom: 1px; transition: border-color 0.25s var(--ease); }
.contact__alt a:hover { border-color: var(--ink); }

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(20, 18, 14, 0.94);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  padding: clamp(0.8rem, 2.5vw, 1.8rem);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0.4s var(--ease);
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__img {
  max-width: 100%;
  max-height: 92vh;
  object-fit: contain;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  transform: scale(0.97);
  transition: transform 0.4s var(--ease);
}
.lightbox.is-open .lightbox__img { transform: scale(1); }
.lightbox__cap {
  color: rgba(255,255,255,0.86);
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  max-width: 60ch;
}
.lightbox__cap b { font-style: normal; font-weight: 500; letter-spacing: 0.04em; }
.lightbox__close {
  position: fixed;
  top: 1.4rem;
  right: 1.6rem;
  background: none;
  border: 0;
  color: rgba(255,255,255,0.8);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.4rem;
  transition: color 0.2s var(--ease), transform 0.2s var(--ease);
}
.lightbox__close:hover { color: #fff; transform: rotate(90deg); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 3rem;
}
.site-footer__inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 2.6rem var(--gutter);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
}
.site-footer__brand {
  font-family: var(--serif);
  letter-spacing: 0.22em;
  text-transform: lowercase;
  font-size: 0.92rem;
}
.site-footer__links { display: flex; flex-wrap: wrap; gap: 1.4rem; }
.site-footer__links a {
  font-family: var(--sans);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s var(--ease);
}
.site-footer__links a:hover { color: var(--ink); }
.site-footer__fine { font-family: var(--sans); font-size: 0.72rem; color: var(--muted); width: 100%; letter-spacing: 0.02em; }

/* ============================================================
   UTILITIES
   ============================================================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    text-align: left;
    gap: 3rem;
  }
  .hero__feature { order: -1; }
  .about-grid { grid-template-columns: 1fr; }
  .portrait { position: static; max-width: 360px; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }

  .nav {
    position: fixed;
    inset: 0 0 auto 0;
    top: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    background: var(--wall);
    padding: 5.2rem var(--gutter) 2rem;
    border-bottom: 1px solid var(--line);
    transform: translateY(-100%);
    transition: transform 0.45s var(--ease);
    box-shadow: 0 24px 40px rgba(28,24,18,0.10);
  }
  .nav.is-open { transform: translateY(0); }
  .nav a { font-size: 0.95rem; padding: 0.5rem 0; }
  .nav__toggle { display: block; position: relative; z-index: 60; }

  /* Single-file hang on phones — work, then its label */
  .exhibit,
  .exhibit:nth-child(even) {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 2rem;
    padding-block: clamp(2.4rem, 8vh, 4rem);
  }
  .exhibit__stage, .exhibit:nth-child(even) .exhibit__stage { order: 0; }
  .placard, .exhibit:nth-child(even) .placard { order: 0; max-width: 46ch; }
  .placard { padding-left: 2px; }

  .prose { font-size: 1.05rem; }
  .cv-entry { grid-template-columns: 1fr; gap: 0.2rem; }
  .cv-entry__year { order: -1; }
  .factsheet__row { grid-template-columns: 1fr; gap: 0.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

/* ============================================================
   ░░  LAYER 2 — EXCEPTIONAL UI / UX  ░░
   Progressive enhancement on top of the verified base.
   Everything here degrades to the static layout when JS is
   off, the pointer is coarse, or motion is reduced.
   ============================================================ */

:root {
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --spring:   cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Cross-document crossfade between pages (Chromium) */
@view-transition { navigation: auto; }

/* (wall-grain texture removed — modern flat surfaces) */

/* ---- Page + hero entrance choreography (CSS-only, safe) ---- */
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  body { animation: pageReveal 0.7s var(--ease) both; }

  .hero__lede > * { opacity: 0; animation: riseIn 0.85s var(--ease-out) both; }
  .hero__lede .overline { animation-delay: 0.10s; }
  .hero__name        { animation-delay: 0.20s; }
  .hero__role        { animation-delay: 0.32s; }
  .hero__blurb       { animation-delay: 0.46s; }
  .hero__actions     { animation-delay: 0.58s; }
  .hero__feature     { opacity: 0; animation: riseIn 1s var(--ease-out) 0.46s both; }
  .page-head .overline { opacity: 0; animation: riseIn 0.7s var(--ease-out) 0.05s both; }
  .page-head h1        { opacity: 0; animation: riseIn 0.8s var(--ease-out) 0.14s both; }
  .page-head__sub      { opacity: 0; animation: riseIn 0.8s var(--ease-out) 0.26s both; }
}
@keyframes pageReveal { from { opacity: 0; } to { opacity: 1; } }
@keyframes riseIn { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

/* ---- Blur-up image loading ---- */
.frame__art-wrap {
  position: relative;
  display: block;
  line-height: 0;
  background-size: cover;
  background-position: center;
  background-color: var(--wall-deep);
}

@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  .frame__art:not(.is-loaded) {
    opacity: 0;
    transform: scale(1.04);
    filter: blur(8px);
    /* safety net: reveal even if the load event never fires */
    animation: artSafety 0.01s linear forwards 3s;
  }
}
.frame__art.is-loaded {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
  transition: opacity 0.8s var(--ease), transform 1.1s var(--ease-out), filter 0.9s var(--ease);
}
@keyframes artSafety { to { opacity: 1; transform: none; filter: none; } }

/* ---- Scroll-choreographed "approach": works catch the light as
        they reach the centre of the room ---- */
.frame { transform: translateY(var(--lift, 0px)); transform-origin: center bottom; }
.frame:hover { --lift: -6px; }
/* Resting state already looks lit; --lit (0..1) only enhances toward centre. */
.exhibit .frame {
  transform: translateY(var(--lift, 0px)) scale(calc(0.975 + 0.025 * var(--lit, 0)));
}
.exhibit__stage::before { opacity: calc(0.45 + 0.5 * var(--lit, 0)); transition: opacity 0.5s var(--ease); }
.exhibit .frame__shadow {
  opacity: calc(0.5 + 0.5 * var(--lit, 0));
  transform: scaleX(calc(0.88 + 0.12 * var(--lit, 0)));
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

/* ---- Magnetic buttons ---- */
.btn {
  transition: background 0.3s var(--ease), color 0.3s var(--ease),
              transform 0.4s var(--ease-out);
  will-change: transform;
}

/* ---- Masthead refines on scroll ---- */
.masthead {
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.masthead__inner { transition: padding 0.4s var(--ease); }
.masthead.is-scrolled {
  background: color-mix(in srgb, var(--wall) 90%, transparent);
  box-shadow: 0 1px 0 var(--line), 0 14px 30px rgba(28, 24, 18, 0.05);
}
.masthead.is-scrolled .masthead__inner { padding-top: 0.7rem; padding-bottom: 0.7rem; }

/* ---- Animated nav underline — lands on the divider line under the tab ---- */
.nav a { position: relative; border-bottom: 0 !important; }
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -1.38rem;            /* reaches the masthead's bottom divider line */
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.4s var(--ease-out);
}
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); }
.masthead.is-scrolled .nav a::after { bottom: -1.03rem; }   /* padding shrinks on scroll */
@media (max-width: 760px) { .nav a::after { display: none; } }

/* ---- Custom gallery cursor ---- */
html.cursor-on, html.cursor-on * { cursor: none !important; }
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 9999;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  will-change: transform;
}
.cursor-dot {
  width: 6px; height: 6px;
  background: var(--ink);
  transition: opacity 0.25s var(--ease), width 0.25s, height 0.25s;
}
.cursor-ring {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 1px solid rgba(28, 24, 18, 0.45);
  background: transparent;
  transition: width 0.4s var(--spring), height 0.4s var(--spring),
              background 0.35s var(--ease), border-color 0.35s var(--ease);
}
.cursor-ring__label {
  font: 600 0.58rem/1 var(--sans);
  letter-spacing: 0.2em; text-transform: lowercase;
  color: var(--wall); opacity: 0;
  transition: opacity 0.25s var(--ease);
}
.cursor-glass {
  width: 32px; height: 32px; opacity: 0; color: #fff;
  filter: drop-shadow(0 0 1px rgba(0,0,0,0.85)) drop-shadow(0 1px 3px rgba(0,0,0,0.5));
  transition: opacity 0.25s var(--ease);
}
.cursor-ring.on-link  { width: 56px; height: 56px; background: rgba(28, 24, 18, 0.06); }
.cursor-ring.on-art   { width: 64px; height: 64px; background: transparent; border-color: transparent; }
.cursor-ring.on-art .cursor-glass { opacity: 1; }
.cursor-dot.is-hidden { opacity: 0; }

/* ---- Wayfinding rail (gallery) ---- */
.exguide {
  position: fixed;
  right: clamp(0.7rem, 1.8vw, 1.7rem);
  top: 50%; transform: translateY(-50%);
  z-index: 40;
  display: flex; flex-direction: column; align-items: flex-end; gap: 0.95rem;
}
.exguide__item {
  display: flex; align-items: center; gap: 0.6rem;
  background: none; border: 0; padding: 0.15rem 0; cursor: pointer;
  color: var(--muted);
}
.exguide__num {
  font: 500 0.7rem/1 var(--sans); letter-spacing: 0.1em;
  opacity: 0; transform: translateX(6px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), color 0.3s var(--ease);
}
.exguide__tick {
  width: 16px; height: 1px; background: currentColor; opacity: 0.4;
  transition: width 0.4s var(--ease-out), opacity 0.35s var(--ease), background 0.35s var(--ease);
}
.exguide__item:hover .exguide__num,
.exguide__item.is-active .exguide__num { opacity: 1; transform: none; color: var(--ink); }
.exguide__item.is-active .exguide__tick { width: 36px; opacity: 1; background: var(--ink); }
.exguide__item:hover .exguide__tick { width: 28px; opacity: 0.85; }
@media (max-width: 960px) { .exguide { display: none; } }

/* ---- Lightbox 2.0 (inspection view) ---- */
.lightbox { backdrop-filter: blur(8px) saturate(115%); -webkit-backdrop-filter: blur(8px) saturate(115%); }
.lightbox__stage {
  display: grid; place-items: center;
  max-width: 96vw; max-height: 92vh;
  overflow: hidden;
}
.lightbox__img.is-zoomed { cursor: grab; transition: transform 0.12s linear; }
.lightbox__img.is-zoomed:active { cursor: grabbing; }
.lightbox__nav {
  position: fixed; top: 50%; transform: translateY(-50%);
  background: none; border: 0; z-index: 101;
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--serif); font-size: 3rem; line-height: 1;
  padding: 1rem 1.2rem; cursor: pointer;
  transition: color 0.25s var(--ease), transform 0.25s var(--ease);
}
.lightbox__nav:hover { color: #fff; }
.lightbox__nav--prev { left: clamp(0.2rem, 2vw, 2rem); }
.lightbox__nav--next { right: clamp(0.2rem, 2vw, 2rem); }
.lightbox__nav--prev:hover { transform: translateY(-50%) translateX(-3px); }
.lightbox__nav--next:hover { transform: translateY(-50%) translateX(3px); }
.lightbox__bar {
  position: fixed; left: 0; right: 0; bottom: clamp(0.9rem, 2.8vh, 1.8rem);
  display: none; flex-direction: column; align-items: center; gap: 0.35rem;
  pointer-events: none; padding-inline: 1rem; text-align: center;
}
.lightbox__bar p { margin: 0; }   /* kill default <p> margins so the bar stays short, off the art */
.lightbox__counter {
  font: 500 0.7rem/1 var(--sans); letter-spacing: 0.24em;
  color: rgba(255, 255, 255, 0.5);
}
.lightbox__hint {
  font: 0.72rem/1 var(--sans); letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.32);
}
/* clear the chrome off the image — on zoom, and after the cursor goes idle —
   so the title and counter never sit on top of the artwork */
.lightbox__bar { transition: opacity 0.45s var(--ease); }
.lightbox.is-zoomed .lightbox__nav,
.lightbox.is-zoomed .lightbox__bar { opacity: 0; }
.lightbox.is-idle .lightbox__bar,
.lightbox.is-idle .lightbox__nav,
.lightbox.is-idle .lightbox__close { opacity: 0; }
@media (max-width: 760px) { .lightbox__nav { font-size: 2.2rem; color: rgba(255,255,255,0.7); } }

/* ---- Focus visibility (a11y) ---- */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 1px; }
.btn:focus-visible { outline-offset: 5px; }

/* ---- Pointer / motion fallbacks ---- */
@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none !important; }
  html.cursor-on, html.cursor-on * { cursor: auto !important; }
}
@media (prefers-reduced-motion: reduce) {
  .cursor-dot, .cursor-ring { display: none !important; }
  .frame { transform: none !important; }
  .frame__art { opacity: 1 !important; filter: none !important; transform: none !important; }
  .frame__art-wrap::before { display: none; }
  .exguide__num { opacity: 1; transform: none; }
}

/* ============================================================
   ░░  PICTURE FRAMES  ░░  per-artwork, set via `frame` in artworks.js
   ============================================================ */

/* — Classic gilt: gold molding + linen mat — */
.frame--gilt {
  padding: 16px;
  background: linear-gradient(135deg, #6e4f12 0%, #d9b24e 17%, #f6e6a8 33%,
              #c79a2e 50%, #f3e0a0 66%, #b8893a 83%, #6e4f12 100%);
  box-shadow:
    0 1px 2px rgba(28,24,18,.20), 0 12px 26px rgba(28,24,18,.20), 0 36px 64px rgba(28,24,18,.14),
    inset 0 0 0 1px rgba(58,40,6,.6), inset 0 0 0 3px rgba(255,234,156,.5),
    inset 0 0 12px rgba(40,28,4,.32);
}
.frame--gilt .frame__mat {
  background: linear-gradient(#f4efe2, #ece3d0);
  padding: clamp(16px, 3.5%, 34px);
  box-shadow: inset 0 1px 4px rgba(0,0,0,.08);
}
.frame--gilt .frame__art { box-shadow: 0 0 0 1px rgba(58,40,6,.45), 0 2px 8px rgba(28,24,18,.18); }

/* — Clear glass — */
.frame--glass {
  padding: 15px;
  background: linear-gradient(135deg, rgba(232,240,243,.55), rgba(255,255,255,.16) 42%, rgba(206,221,228,.5));
  -webkit-backdrop-filter: blur(1px); backdrop-filter: blur(1px);
  box-shadow:
    0 1px 2px rgba(28,24,18,.12), 0 12px 26px rgba(28,24,18,.14), 0 30px 56px rgba(28,24,18,.10),
    inset 0 0 0 1px rgba(255,255,255,.7), inset 2px 2px 5px rgba(255,255,255,.55),
    inset -2px -3px 6px rgba(120,140,150,.3);
}
.frame--glass::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(125deg, rgba(255,255,255,.45) 0%, rgba(255,255,255,0) 20%,
              rgba(255,255,255,0) 80%, rgba(255,255,255,.22) 100%);
}
.frame--glass .frame__art { box-shadow: 0 0 0 1px rgba(255,255,255,.55), 0 1px 6px rgba(40,60,70,.18); }

/* — Ornate: thick molding + gilt corner ornaments — */
.frame--ornate-gold, .frame--ornate-white { padding: 32px; }
.frame--ornate-gold {
  background: linear-gradient(135deg, #5e430f, #c79a35 16%, #f6e6a8 30%, #a87e22 46%,
              #f0dc92 62%, #b8893a 78%, #5e430f 100%);
  box-shadow:
    0 2px 4px rgba(28,24,18,.25), 0 16px 30px rgba(28,24,18,.24), 0 44px 76px rgba(28,24,18,.16),
    inset 0 0 0 2px rgba(50,34,5,.62), inset 0 0 0 4px rgba(255,232,150,.45),
    inset 0 0 18px rgba(35,24,4,.42);
}
.frame--ornate-white {
  background: linear-gradient(135deg, #cfc8b8, #ffffff 22%, #ded6c4 46%, #fbf8f0 64%, #d2cabb 84%, #efe9dc 100%);
  box-shadow:
    0 2px 4px rgba(28,24,18,.14), 0 16px 30px rgba(28,24,18,.15), 0 44px 76px rgba(28,24,18,.10),
    inset 0 0 0 2px rgba(150,140,120,.5), inset 0 0 0 4px rgba(255,255,255,.72),
    inset 0 0 18px rgba(120,110,95,.3);
}
.frame--ornate-gold .frame__art, .frame--ornate-white .frame__art {
  box-shadow: 0 0 0 1px rgba(40,28,4,.4), 0 3px 12px rgba(28,24,18,.3);
}

:root {
  --ornament: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20100%20100'%3E%3Cpath%20fill='white'%20d='M5,5H42C42,23,31,31,18,31C31,34,34,47,27,57C23,45,11,43,3,49C13,37,7,21,5,5Z'/%3E%3Cpath%20fill='white'%20d='M5,5V42C23,42,31,31,31,18C34,31,47,34,57,27C45,23,43,11,49,3C37,13,21,7,5,5Z'/%3E%3Ccircle%20fill='white'%20cx='22'%20cy='22'%20r='7.5'/%3E%3Cpath%20fill='white'%20d='M52,16C60,16,64,22,63,29C58,26,52,28,50,33C49,27,46,22,40,21C44,17,48,16,52,16Z'/%3E%3Cpath%20fill='white'%20d='M16,52C16,60,22,64,29,63C26,58,28,52,33,50C27,49,22,46,21,40C17,44,16,48,16,52Z'/%3E%3C/svg%3E");
}
.frame__corner {
  position: absolute; width: 52px; height: 52px; z-index: 3; pointer-events: none;
  -webkit-mask: var(--ornament) center / contain no-repeat;
          mask: var(--ornament) center / contain no-repeat;
}
.frame--ornate-gold .frame__corner { background: linear-gradient(135deg, #7a5a14, #f6e6a8 45%, #b8893a); }
.frame--ornate-white .frame__corner { background: linear-gradient(135deg, #ffffff, #d6cebd); filter: drop-shadow(0 1px 1px rgba(120,110,95,.4)); }
.frame__corner--tl { top: -3px; left: -3px; }
.frame__corner--tr { top: -3px; right: -3px; transform: scaleX(-1); }
.frame__corner--bl { bottom: -3px; left: -3px; transform: scaleY(-1); }
.frame__corner--br { bottom: -3px; right: -3px; transform: scale(-1); }

@media (max-width: 760px) {
  .frame--ornate-gold, .frame--ornate-white { padding: 22px; }
  .frame__corner { width: 40px; height: 40px; }
}

/* ============================================================
   GALLERY — vertical scroll-snap through the works
   ============================================================ */
body.page-gallery { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }
body.page-gallery .masthead { position: static; flex: none; z-index: 50; }
.slider-wrap { flex: 1 1 auto; min-height: 0; }

/* the scroll container — one work per screen, snaps as you scroll */
.slider {
  height: 100%; overflow-y: auto; overflow-x: hidden;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
}
.gv__work {
  height: 100%; scroll-snap-align: start; scroll-snap-stop: always;
  display: grid; grid-template-columns: 1.55fr 1fr;
}

/* left — the painting on white */
.gv__stage { position: relative; overflow: hidden; background: #ffffff; }
.gv__art {
  position: absolute; inset: 0; margin: auto;
  max-width: calc(86% * var(--scale, 1)); max-height: calc(86% * var(--scale, 1));
  width: auto; height: auto; object-fit: contain; cursor: zoom-in;
  box-shadow: 0 22px 55px rgba(13, 13, 12, 0.16);
}

/* scroll cue on the first screen */
.gv__cue {
  position: absolute; left: clamp(1.6rem, 3.5vw, 3.6rem); bottom: clamp(1.4rem, 3vh, 2rem);
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.4rem;
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.12em; color: var(--muted);
  pointer-events: none; text-align: left;
}
@media (prefers-reduced-motion: no-preference) { .gv__cue svg { animation: cueBob 1.7s ease-in-out infinite; } }
@keyframes cueBob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

/* right — info + index (identical per section → reads as persistent while paintings scroll) */
.gv__panel {
  position: relative;
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(2rem, 4vw, 4rem) clamp(1.6rem, 3.5vw, 3.6rem);
  border-left: 1px solid var(--line); background: var(--paper); min-width: 0;
}
.gv__role { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em; color: var(--muted); margin-bottom: clamp(1.4rem, 5vh, 3rem); }
.gv__count { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.04em; color: var(--muted); margin-bottom: 1.3rem; }
.gv__title { font-family: var(--serif); font-weight: 600; line-height: 1.02; font-size: clamp(1.9rem, 3.4vw, 2.9rem); letter-spacing: -0.025em; color: var(--ink); }
.gv__title span { font-weight: 400; color: var(--muted); margin-left: 0.25em; }
.gv__meta { font-family: var(--mono); font-size: 0.76rem; line-height: 1.75; color: var(--ink-soft); margin-top: 0.9rem; }
.gv__index { margin-top: clamp(1.6rem, 4vh, 2.6rem); border-top: 1px solid var(--line); display: flex; flex-direction: column; }
.gv__ix {
  display: grid; grid-template-columns: 1.8rem 1fr; align-items: baseline; gap: 0.8rem;
  background: none; border: 0; border-bottom: 1px solid var(--line);
  padding: 0.72rem 0; cursor: pointer; text-align: left; color: var(--muted);
  font-family: var(--serif); font-size: 1.02rem; font-weight: 500; letter-spacing: -0.01em;
  transition: color 0.25s var(--ease), padding-left 0.3s var(--ease);
}
.gv__ix .n { font-family: var(--mono); font-size: 0.7rem; color: var(--muted); }
.gv__ix:hover { color: var(--ink); padding-left: 0.4rem; }
.gv__ix.is-active { color: var(--ink); }
.gv__ix.is-active .n { color: var(--ink); }

/* "read about this work" trigger + reading overlay */
.gv__about {
  align-self: flex-start; margin-top: 1.3rem;
  background: none; border: 0; padding: 0 0 2px; cursor: pointer;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em;
  color: var(--ink); border-bottom: 1px solid var(--muted);
  display: inline-flex; align-items: center; gap: 0.45rem;
  transition: gap 0.25s var(--ease), border-color 0.25s var(--ease);
}
.gv__about span { transition: transform 0.25s var(--ease); }
.gv__about:hover { border-color: var(--ink); gap: 0.7rem; }
.reader {
  position: fixed; inset: 0; z-index: 110;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(1.2rem, 5vw, 3rem);
  background: color-mix(in srgb, var(--wall) 76%, transparent);
  backdrop-filter: blur(10px) saturate(115%); -webkit-backdrop-filter: blur(10px) saturate(115%);
  opacity: 0; visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0.4s var(--ease);
}
.reader.is-open { opacity: 1; visibility: visible; }
.reader__panel {
  position: relative; width: min(64ch, 100%); max-height: 84vh; overflow-y: auto;
  background: #fff; border: 1px solid var(--line);
  padding: clamp(1.8rem, 5vw, 3.6rem);
  box-shadow: 0 40px 100px rgba(13, 13, 12, 0.22);
  transform: translateY(14px); transition: transform 0.4s var(--ease);
}
.reader.is-open .reader__panel { transform: none; }
.reader__close {
  position: fixed; top: clamp(0.9rem, 3vw, 1.7rem); right: clamp(0.9rem, 3vw, 1.7rem); z-index: 1;
  background: none; border: 0; cursor: pointer; font-size: 2rem; line-height: 1;
  color: var(--ink); opacity: 0.5; transition: opacity 0.2s var(--ease);
}
.reader__close:hover { opacity: 1; }
.reader__eyebrow { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.18em; color: var(--muted); margin: 0 0 0.7rem; }
.reader__title { font-family: var(--serif); font-weight: 600; font-size: clamp(1.7rem, 4vw, 2.3rem); letter-spacing: -0.02em; color: var(--ink); line-height: 1.05; margin: 0 0 1.4rem; }
.reader__body { font-family: var(--sans); font-size: 1.05rem; line-height: 1.75; color: var(--ink-soft); }
.reader__body p { margin: 0 0 1.1em; }
.reader__body p:last-child { margin-bottom: 0; }

@media (max-width: 820px) {
  body.page-gallery { height: auto; overflow: visible; }
  .slider-wrap { flex: none; }
  .slider { height: auto; overflow: visible; scroll-snap-type: none; }
  .gv__work { height: auto; min-height: 90vh; grid-template-columns: 1fr; }
  .gv__stage { height: 52vh; }
  .gv__panel { border-left: 0; border-top: 1px solid var(--line); justify-content: flex-start; padding: 1.5rem 1.25rem 2.4rem; }
  .gv__index, .gv__cue { display: none; }
}

/* ============================================================
   HOME — interactive index
   ============================================================ */
/* Home mirrors the gallery split exactly: art left, info/index right. */
body.page-home { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }
body.page-home .masthead { position: static; flex: none; }
.home-wrap { flex: 1 1 auto; min-height: 0; }
.home { display: grid; grid-template-columns: 1.55fr 1fr; height: 100%; }

.home__stage { position: relative; overflow: hidden; background: var(--wall); }
.home__preview-img {
  position: absolute; inset: 0; margin: auto;
  max-width: calc(80% * var(--scale, 1)); max-height: calc(80% * var(--scale, 1));
  width: auto; height: auto; object-fit: contain;
  box-shadow: 0 22px 55px rgba(13, 13, 12, 0.16);
  opacity: 0; transition: opacity 0.45s var(--ease);
}
.home__preview-img.is-shown { opacity: 1; }

.home__right {
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(2rem, 4vw, 4rem) clamp(1.6rem, 3.5vw, 3.6rem);
  border-left: 1px solid var(--line); background: var(--paper); min-width: 0;
}
.home__name { font-family: var(--serif); font-weight: 700; letter-spacing: -0.035em; line-height: 0.94; font-size: clamp(2.4rem, 4.4vw, 4rem); }
.home__role { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: lowercase; color: var(--muted); margin-top: 0.9rem; }
.home__index { margin-top: clamp(1.6rem, 4vh, 2.6rem); display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.home__ix {
  display: grid; grid-template-columns: 1.8rem 1fr; align-items: baseline; gap: 0.8rem;
  padding: 0.72rem 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--muted);
  transition: color 0.25s var(--ease), padding-left 0.3s var(--ease);
}
.home__ix .n { font-family: var(--mono); font-size: 0.7rem; color: var(--muted); transition: color 0.25s; }
.home__ix .t { font-family: var(--serif); font-size: clamp(1.05rem, 1.9vw, 1.4rem); font-weight: 500; letter-spacing: -0.01em; }
.home__ix:hover, .home__ix.is-active { color: var(--ink); padding-left: 0.5rem; }
.home__ix:hover .n, .home__ix.is-active .n { color: var(--ink); }

@media (max-width: 820px) {
  body.page-home { height: auto; overflow: auto; }
  .home-wrap { flex: none; }
  .home { grid-template-columns: 1fr; }
  .home__stage { height: 44vh; order: -1; }
  .home__right { border-left: 0; border-top: 1px solid var(--line); padding: 1.6rem 1.25rem 2.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  .slide__art, .home__preview-img { transition: opacity 0.2s linear !important; }
}

/* ============================================================
   PROJECTS — case-study snapshots (synapse · framegen)
   ============================================================ */
.projects { max-width: 1080px; margin-inline: auto; padding: 0 var(--gutter) clamp(3rem, 8vh, 6rem); }
.project { padding-block: clamp(3rem, 8vh, 6rem); border-top: 1px solid var(--line); }
.project:first-child { border-top: 0; padding-top: clamp(1.5rem, 4vh, 3rem); }

.project__intro { max-width: 60ch; margin-bottom: clamp(1.8rem, 4vh, 3rem); }
.project__kicker { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.18em; color: var(--muted); }
.project__name { font-family: var(--serif); font-weight: 600; font-size: clamp(2.6rem, 6vw, 4rem); letter-spacing: -0.03em; line-height: 1; margin: 0.55rem 0 0; }
.project__name span { font-family: var(--mono); font-weight: 400; color: var(--muted); font-size: 0.26em; letter-spacing: 0.04em; margin-left: 0.7rem; vertical-align: middle; }
.project__lede { font-size: 1.18rem; line-height: 1.6; color: var(--ink-soft); margin: 1.1rem 0 0; }
.project__links { margin-top: 1.2rem; font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.04em; color: var(--muted); }
.project__links a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--muted); padding-bottom: 1px; transition: border-color 0.25s var(--ease); }
.project__links a:hover { border-color: var(--ink); }

.shot { margin: 0; }
.shot img { display: block; width: 100%; height: auto; border: 1px solid var(--line); background: #fff; box-shadow: 0 18px 48px rgba(13,13,12,0.10); }
.shot figcaption { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.02em; line-height: 1.5; color: var(--muted); margin-top: 0.7rem; }
.shot--hero { margin-bottom: clamp(2.2rem, 5vh, 3.6rem); }

.project__section-head { font-family: var(--mono); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.2em; color: var(--muted); margin: 0 0 1.2rem; }

.caps { list-style: none; margin: 0 0 clamp(2.4rem, 5vh, 3.6rem); padding: 0; }
.caps li { display: grid; grid-template-columns: 9rem 1fr; gap: 1.4rem; align-items: baseline; padding: 0.9rem 0; border-top: 1px solid var(--line); }
.caps li:last-child { border-bottom: 1px solid var(--line); }
.caps__k { font-family: var(--serif); font-weight: 500; font-size: 1.06rem; color: var(--ink); }
.caps__k em { font-style: normal; font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.12em; color: var(--muted); display: block; margin-top: 0.25rem; }
.caps__k em.is-live { color: #2f7d57; }
.caps__v { color: var(--ink-soft); font-size: 1.02rem; line-height: 1.55; }

.shots { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1rem, 2.4vw, 1.8rem); }

@media (max-width: 720px) {
  .caps li { grid-template-columns: 1fr; gap: 0.25rem; }
  .shots { grid-template-columns: 1fr; }
  .project__name span { display: block; margin: 0.4rem 0 0; }
}

/* ---- Projects: tabbed switcher ---- */
.proj-tabs {
  display: flex; gap: clamp(1.4rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(2rem, 5vh, 3.4rem);
}
.proj-tab {
  appearance: none; background: none; border: 0; cursor: pointer; text-align: left;
  font-family: var(--serif); font-weight: 600; font-size: clamp(1.55rem, 3.6vw, 2.4rem);
  letter-spacing: -0.03em; line-height: 1.05; color: var(--muted); text-transform: lowercase;
  padding: 0 0 1rem; position: relative; transition: color 0.25s var(--ease);
}
.proj-tab span {
  display: block; font-family: var(--mono); font-weight: 400; font-size: 0.6rem;
  letter-spacing: 0.16em; color: var(--muted); margin-top: 0.55rem;
}
.proj-tab::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--ink); transform: scaleX(0); transform-origin: left center;
  transition: transform 0.35s var(--ease-out);
}
.proj-tab:hover { color: var(--ink-soft); }
.proj-tab.is-active { color: var(--ink); }
.proj-tab.is-active::after { transform: scaleX(1); }

.proj-panel { animation: projFade 0.5s var(--ease-out) both; }
.proj-panel[hidden] { display: none; }
@keyframes projFade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.proj-panel .project__name { font-size: clamp(2rem, 5vw, 3rem); }
.proj-panel .project__intro { margin-bottom: clamp(2rem, 4.5vh, 3.2rem); }

/* ---- Projects: live tool embed ---- */
.embed { margin: 0 0 clamp(2.6rem, 6vh, 4rem); }
.embed__tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.embed__tab {
  appearance: none; cursor: pointer; font-family: var(--mono); font-size: 0.72rem;
  letter-spacing: 0.1em; text-transform: lowercase; color: var(--muted);
  background: none; border: 1px solid var(--line); border-radius: 999px; padding: 0.45rem 1rem;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.embed__tab:hover { color: var(--ink); border-color: var(--muted); }
.embed__tab.is-active { color: var(--wall); background: var(--ink); border-color: var(--ink); }
.embed__frame {
  position: relative; aspect-ratio: 16 / 10; width: 100%;
  border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
  background: #100f0d; box-shadow: 0 18px 48px rgba(13, 13, 12, 0.12);
}
.embed__frame::before {
  content: "click to launch the live suite →"; position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.1em; color: rgba(243, 243, 241, 0.55);
  padding: 1rem; text-align: center; cursor: pointer;
}
.embed__frame:not(.is-on) { cursor: pointer; }
.embed__frame:not(.is-on):hover::before { color: rgba(243, 243, 241, 0.85); }
.embed__frame.is-on::before { content: none; cursor: default; }
.embed__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #100f0d; opacity: 0; pointer-events: none; transition: opacity 0.4s var(--ease); }
.embed__frame.is-on iframe { opacity: 1; pointer-events: auto; }
.embed__note {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.02em; color: var(--muted); margin-top: 0.8rem;
}
.embed__note a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--muted); padding-bottom: 1px; white-space: nowrap; }
.embed__note a:hover { border-color: var(--ink); }

/* ---- Projects: output video ---- */
.shot--video .vid {
  aspect-ratio: 1920 / 1515; width: 100%; background: #100f0d;
  border: 1px solid var(--line); overflow: hidden; box-shadow: 0 18px 48px rgba(13, 13, 12, 0.10);
}
.shot--video .vid video { width: 100%; height: 100%; object-fit: contain; display: block; }

@media (max-width: 720px) {
  .embed__frame { aspect-ratio: 3 / 4; }
}
