/* ==========================================================================
   Gloria — site styles
   Direction: "playful grace". White, open, warm. First person.
   Display: Fraunces (SOFT + WONK up). Body: DM Sans. Notes: Caveat.
   Accent: rose madder, with ochre as secondary.
   Layers: reset < base < layout < components < utilities
   ========================================================================== */
@layer reset, base, layout, components, utilities;

/* --------------------------------------------------------------------------
   Reset (zero-specificity so anything can override it)
   -------------------------------------------------------------------------- */
@layer reset {
  :where(*, *::before, *::after) { box-sizing: border-box; }
  :where(html) { -webkit-text-size-adjust: 100%; }
  :where(body) { margin: 0; }
  :where(h1, h2, h3, h4, p, figure, blockquote, dl, dd, dt, ol, ul, hr) { margin: 0; }
  :where(ol, ul) { padding: 0; list-style: none; }
  :where(img, svg, video) { display: block; max-inline-size: 100%; block-size: auto; }
  :where(button) { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
  :where(a) { color: inherit; }
  :where(input, textarea) { font: inherit; }
}

/* --------------------------------------------------------------------------
   Base: tokens and type
   -------------------------------------------------------------------------- */
@layer base {
  :root {
    color-scheme: light;

    --white: #ffffff;
    --paper: #fbf9f6;          /* warm panel tint */
    --paper-2: #f5f1ea;        /* slightly deeper tint */
    --line: #ebe6de;
    --line-2: #d9d2c8;

    --ink: #221d1c;
    --ink-2: #5c5350;
    --ink-3: #8b817c;

    --rose: #c0405e;           /* rose madder */
    --rose-deep: #9f2f4b;
    --rose-tint: #fbeef1;
    --rose-tint-2: #f6dbe2;

    --ochre: #c9973a;
    --ochre-ink: #8a6417;
    --ochre-tint: #f8f0df;

    --shadow-photo:
      0 1px 1px rgba(34, 29, 28, .04),
      0 2px 6px rgba(34, 29, 28, .06),
      0 18px 40px -16px rgba(34, 29, 28, .28);
    --shadow-photo-hover:
      0 1px 1px rgba(34, 29, 28, .04),
      0 6px 14px rgba(34, 29, 28, .08),
      0 28px 56px -18px rgba(34, 29, 28, .32);
    --shadow-card:
      0 1px 2px rgba(34, 29, 28, .04),
      0 12px 32px -16px rgba(34, 29, 28, .14);

    --radius: 24px;
    --radius-sm: 14px;
    --pill: 999px;

    --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
    --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-hand: "Caveat", "Bradley Hand", "Segoe Print", cursive;

    --container: 1160px;
    --gutter: clamp(20px, 5vw, 48px);
    --section: clamp(72px, 10vw, 144px);
    --measure: 62ch;

    --ease-out: cubic-bezier(.2, .8, .2, 1);
  }

  html {
    overflow-x: clip;
    scroll-padding-block-start: 96px;
  }
  @media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
  }

  body {
    overflow-x: clip;
    font-family: var(--font-body);
    font-size-adjust: from-font;
    font-size: 1.0625rem;
    line-height: 1.6;
    font-optical-sizing: auto;
    color: var(--ink);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }

  h1, h2, h3, h4, .display {
    font-family: var(--font-display);
    font-weight: 400;
    font-optical-sizing: auto;
    font-variation-settings: "SOFT" 100, "WONK" 1;
    line-height: 1.04;
    letter-spacing: -0.012em;
    text-wrap: balance;
  }
  h1 { font-size: clamp(2.75rem, 1.6rem + 4.6vw, 5.5rem); }
  h2 { font-size: clamp(2rem, 1.25rem + 2.6vw, 3.4rem); }
  h3 { font-size: clamp(1.4rem, 1.15rem + .9vw, 1.85rem); line-height: 1.15; }
  h4 { font-size: 1.25rem; line-height: 1.25; }

  :is(h1, h2, h3) em {
    font-style: italic;
    color: var(--rose);
  }

  p { text-wrap: pretty; }

  a {
    text-decoration-thickness: 1px;
    text-underline-offset: .18em;
    text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
    transition: text-decoration-color .2s ease, color .2s ease;
  }
  a:hover { text-decoration-color: currentColor; }

  :focus-visible {
    outline: 2px solid var(--rose);
    outline-offset: 3px;
    border-radius: 4px;
  }

  ::selection { background: var(--rose-tint-2); }

  strong { font-weight: 600; }
  time { white-space: nowrap; }
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
@layer layout {
  .container {
    inline-size: min(100% - 2 * var(--gutter), var(--container));
    margin-inline: auto;
  }
  .container--narrow { --container: 860px; }
  .container--wide   { --container: 1320px; }

  .section { padding-block: var(--section); }
  .section--tight { padding-block: calc(var(--section) * .6); }
  .section + .section { padding-block-start: 0; }

  .section-head {
    display: grid;
    gap: 1rem;
    max-inline-size: 42rem;
    margin-block-end: clamp(40px, 5vw, 64px);
  }
  .section-head .intro {
    font-size: 1.15rem;
    line-height: 1.55;
    color: var(--ink-2);
  }
  .section-head--split {
    max-inline-size: none;
    grid-template-columns: minmax(0, 42rem) auto;
    align-items: end;
    justify-content: space-between;
  }
  @media (max-width: 720px) {
    .section-head--split { grid-template-columns: 1fr; }
  }

  .skip-link {
    position: absolute;
    inset-block-start: 12px;
    inset-inline-start: 12px;
    z-index: 100;
    padding: .6em 1em;
    background: var(--ink);
    color: var(--white);
    border-radius: var(--pill);
    text-decoration: none;
    translate: 0 -200%;
    transition: translate .2s var(--ease-out);
  }
  .skip-link:focus-visible { translate: 0 0; outline-color: var(--ochre); }

  main { display: block; }
}

/* --------------------------------------------------------------------------
   Components
   -------------------------------------------------------------------------- */
@layer components {

  /* ---- Header / nav ---- */
  .site-header {
    position: sticky;
    inset-block-start: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--white) 84%, transparent);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }
  .site-header > .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-block-size: 76px;
  }
  .wordmark {
    font-family: var(--font-display);
    font-variation-settings: "SOFT" 100, "WONK" 1;
    font-size: 1.45rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    text-decoration: none;
    display: inline-flex;
    align-items: baseline;
    gap: .35em;
  }
  .wordmark::after {
    content: "";
    inline-size: .38em;
    block-size: .38em;
    border-radius: 50%;
    background: var(--rose);
    translate: 0 -.05em;
    transition: scale .3s var(--ease-out);
  }
  .wordmark:hover::after { scale: 1.35; }

  .nav ul { display: flex; align-items: center; gap: clamp(18px, 2.6vw, 40px); }
  .nav a {
    position: relative;
    display: inline-block;
    padding-block: 10px;
    font-weight: 500;
    font-size: .96rem;
    text-decoration: none;
  }
  .nav a::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    inset-block-end: 6px;
    block-size: 2px;
    border-radius: 2px;
    background: var(--rose);
    scale: 0 1;
    transform-origin: left;
    transition: scale .3s var(--ease-out);
  }
  .nav a:hover::after,
  .nav a[aria-current="page"]::after { scale: 1 1; }
  .nav .nav-ig {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    inline-size: 40px;
    block-size: 40px;
    border-radius: 50%;
    border: 1px solid var(--line);
    transition: background .2s ease, border-color .2s ease;
  }
  .nav .nav-ig:hover { background: var(--rose-tint); border-color: var(--rose-tint-2); }
  .nav .nav-ig::after { content: none; }
  .nav .nav-ig svg { inline-size: 18px; block-size: 18px; }
  .nav .nav-ig__label { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

  .menu-btn {
    display: none;
    align-items: center;
    gap: .5em;
    min-block-size: 44px;
    padding-inline: 14px;
    border-radius: var(--pill);
    border: 1px solid var(--line);
    font-weight: 500;
    font-size: .95rem;
  }
  .menu-btn .bars { display: grid; gap: 4px; inline-size: 16px; }
  .menu-btn .bars i { display: block; block-size: 2px; background: var(--ink); border-radius: 2px; transition: translate .25s var(--ease-out), rotate .25s var(--ease-out), opacity .2s; }
  .menu-btn[aria-expanded="true"] .bars i:nth-child(1) { translate: 0 6px; rotate: 45deg; }
  .menu-btn[aria-expanded="true"] .bars i:nth-child(2) { opacity: 0; }
  .menu-btn[aria-expanded="true"] .bars i:nth-child(3) { translate: 0 -6px; rotate: -45deg; }

  @media (max-width: 760px) {
    .menu-btn { display: inline-flex; }
    .nav {
      display: none;
      position: absolute;
      inset-inline: 0;
      inset-block-start: 100%;
      padding: 8px var(--gutter) 24px;
      background: var(--white);
      box-shadow: 0 24px 40px -24px rgba(34, 29, 28, .25);
      border-block-end: 1px solid var(--line);
    }
    .site-header:has(.menu-btn[aria-expanded="true"]) .nav { display: block; }
    .nav ul { flex-direction: column; align-items: stretch; gap: 0; }
    .nav li:not(:last-child) { border-block-end: 1px solid var(--line); }
    .nav a { display: block; padding-block: 16px; font-size: 1.2rem; font-family: var(--font-display); font-variation-settings: "SOFT" 100, "WONK" 1; font-weight: 400; }
    .nav a::after { content: none; }
    .nav .nav-ig { inline-size: auto; block-size: auto; border: 0; border-radius: 0; justify-content: flex-start; gap: .6em; }
    .nav .nav-ig:hover { background: none; }
    .nav .nav-ig__label { position: static; inline-size: auto; block-size: auto; overflow: visible; clip: auto; }
  }

  /* ---- Buttons ---- */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55em;
    min-block-size: 48px;
    padding: .7em 1.45em;
    border-radius: var(--pill);
    font-weight: 500;
    font-size: 1rem;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid transparent;
    transition: background .2s ease, color .2s ease, border-color .2s ease, translate .25s var(--ease-out), box-shadow .25s var(--ease-out);
  }
  .btn:hover { translate: 0 -1px; }
  .btn:active { translate: 0 0; }
  .btn--primary {
    background: var(--rose);
    color: var(--white);
    box-shadow: 0 8px 20px -10px rgba(192, 64, 94, .6);
  }
  .btn--primary:hover { background: var(--rose-deep); box-shadow: 0 12px 24px -10px rgba(192, 64, 94, .7); }
  .btn--ghost {
    background: var(--white);
    color: var(--ink);
    border-color: var(--line-2);
  }
  .btn--ghost:hover { background: var(--paper); border-color: var(--ink-3); }
  .btn--quiet {
    background: var(--paper-2);
    color: var(--ink);
  }
  .btn--quiet:hover { background: var(--rose-tint); color: var(--rose-deep); }
  .btn svg { inline-size: 1.1em; block-size: 1.1em; flex: none; }
  .btn.is-done { background: var(--ochre-tint); color: var(--ochre-ink); border-color: transparent; }

  .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
  }

  .link-arrow {
    display: inline-flex;
    align-items: center;
    gap: .45em;
    font-weight: 500;
    text-decoration: none;
    color: var(--rose);
  }
  .link-arrow .arrow { display: inline-block; transition: translate .25s var(--ease-out); }
  .link-arrow:hover .arrow { translate: .25em 0; }
  .link-arrow--back .arrow { rotate: 180deg; }
  .link-arrow--back:hover .arrow { translate: -.25em 0; }

  /* ---- Eyebrow ---- */
  .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .6em;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ink-2);
  }
  .eyebrow::before {
    content: "";
    inline-size: 8px;
    block-size: 8px;
    border-radius: 50%;
    background: var(--ochre);
  }
  .eyebrow--rose::before { background: var(--rose); }

  /* ---- Pills ---- */
  .pills { display: flex; flex-wrap: wrap; gap: 6px; }
  .pill {
    display: inline-flex;
    align-items: center;
    gap: .4em;
    padding: .28em .8em;
    border-radius: var(--pill);
    font-size: .8rem;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: .01em;
    white-space: nowrap;
    background: var(--white);
    color: var(--ink-2);
    border: 1px solid var(--line-2);
  }
  .pill--upcoming { background: var(--rose-tint); color: var(--rose-deep); border-color: transparent; }
  .pill--ongoing  { background: var(--ochre-tint); color: var(--ochre-ink); border-color: transparent; }
  .pill--past     { background: var(--paper-2); color: var(--ink-2); border-color: transparent; }
  .pill--upcoming::before { content: ""; inline-size: 6px; block-size: 6px; border-radius: 50%; background: var(--rose); }
  .pill--ongoing::before  { content: ""; inline-size: 6px; block-size: 6px; border-radius: 50%; background: var(--ochre); }

  /* ---- Paper photo, laid on a table ---- */
  .photo {
    --tilt: 0deg;
    --ratio: 4 / 5;
    position: relative;
    display: block;
    inline-size: 100%;
    padding: 12px 12px 14px;
    background: #fffefc;
    border: 1px solid #efeae2;
    border-radius: 5px;
    box-shadow: var(--shadow-photo);
    transform: rotate(var(--tilt));
    transition: transform .55s var(--ease-out), box-shadow .55s var(--ease-out);
    will-change: transform;
  }
  .photo img {
    inline-size: 100%;
    aspect-ratio: var(--ratio);
    object-fit: cover;
    border-radius: 2px;
    background: var(--paper-2);
  }
  .photo--wide { --ratio: 3 / 2; }
  .photo--square { --ratio: 1; }
  .photo--caption { padding-block-end: 12px; }
  .photo figcaption {
    padding-block-start: 10px;
    font-size: .82rem;
    line-height: 1.4;
    color: var(--ink-3);
  }
  .photo figcaption em { font-style: italic; color: var(--ink-2); }
  .tilt-l { --tilt: -2.4deg; }
  .tilt-r { --tilt: 1.9deg; }
  .tilt-l2 { --tilt: -1.2deg; }
  .tilt-r2 { --tilt: 3deg; }
  .photo:hover,
  a:hover .photo,
  a:focus-visible .photo {
    transform: rotate(0deg) translateY(-3px);
    box-shadow: var(--shadow-photo-hover);
  }
  @media (max-width: 720px) {
    .tilt-l { --tilt: -1.4deg; }
    .tilt-r { --tilt: 1.2deg; }
    .tilt-l2 { --tilt: -.8deg; }
    .tilt-r2 { --tilt: 1.8deg; }
  }

  /* ---- Handwritten margin notes ---- */
  .note {
    display: inline-block;
    font-family: var(--font-hand);
    font-size: clamp(1.3rem, 1.1rem + .6vw, 1.55rem);
    font-weight: 500;
    line-height: 1.12;
    color: var(--rose);
    max-inline-size: 15em;
    rotate: -3.5deg;
    text-wrap: balance;
  }
  .note--ink { color: var(--ink-2); }
  .note--ochre { color: var(--ochre-ink); }
  .note .note-arrow {
    display: block;
    inline-size: 52px;
    block-size: auto;
    margin-block-start: 4px;
    color: inherit;
  }
  .note .note-arrow--up { rotate: -40deg; margin-inline-start: 1.5em; }
  .note .note-arrow--left { rotate: -150deg; }
  /* floating positions used on wide screens; each caller sets inset values */
  .note--float { position: absolute; z-index: 2; pointer-events: none; }
  @media (max-width: 900px) {
    .note--float {
      position: static;
      rotate: -2deg;
      pointer-events: auto;
      margin-block-start: 14px;
    }
    .note--float .note-arrow { display: none; }
  }

  /* ---- Cards ---- */
  .card {
    position: relative;
    display: grid;
    gap: 1rem;
    align-content: start;
    padding: clamp(24px, 3vw, 36px);
    background: var(--paper);
    border-radius: var(--radius);
    border: 1px solid transparent;
    transition: border-color .25s ease, background .25s ease, box-shadow .3s var(--ease-out), translate .3s var(--ease-out);
  }
  .card .pill { justify-self: start; }
  .card p { color: var(--ink-2); }
  .card .for {
    padding-block-start: .5rem;
    margin-block-start: auto;
    font-size: .92rem;
    color: var(--ink-3);
  }
  .card .for strong { color: var(--ink-2); font-weight: 500; }
  a.card { text-decoration: none; }
  a.card:hover { background: var(--white); border-color: var(--line); box-shadow: var(--shadow-card); translate: 0 -2px; }

  .cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: clamp(16px, 2vw, 24px);
  }

  /* ---- Prose ---- */
  .prose { max-inline-size: var(--measure); }
  .prose > * + * { margin-block-start: 1.2em; }
  .prose > h2 { margin-block-start: 2.2em; font-size: clamp(1.6rem, 1.3rem + 1vw, 2.15rem); }
  .prose > h2:first-child { margin-block-start: 0; }
  .prose > h3 { margin-block-start: 1.8em; }
  .prose p { color: var(--ink-2); }
  .prose p.lead { font-size: 1.2rem; line-height: 1.5; color: var(--ink); }
  .prose ul, .prose ol { padding-inline-start: 1.25em; color: var(--ink-2); }
  .prose ul { list-style: disc; }
  .prose ol { list-style: decimal; }
  .prose li + li { margin-block-start: .4em; }
  .prose li::marker { color: var(--rose); }
  .prose a { color: var(--ink); }
  .prose blockquote,
  .pullquote {
    position: relative;
    padding-inline-start: 1.25em;
    border-inline-start: 3px solid var(--ochre);
    font-family: var(--font-display);
    font-variation-settings: "SOFT" 100, "WONK" 1;
    font-style: italic;
    font-size: clamp(1.4rem, 1.2rem + .9vw, 1.9rem);
    line-height: 1.3;
    color: var(--ink);
    text-wrap: balance;
  }
  .prose blockquote { margin-block: 1.8em; }
  .prose .slot { font-style: italic; color: var(--ink-3); border-block-end: 1px dashed var(--line-2); }

  /* placeholder slot: things to be filled in during content collection */
  .slot {
    font-style: italic;
    color: var(--ink-3);
    border-block-end: 1px dashed var(--line-2);
  }

  /* ---- Facts (definition list) ---- */
  .facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    gap: 20px 32px;
    padding-block: 24px;
    border-block: 1px solid var(--line);
  }
  .facts dt {
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin-block-end: .35em;
  }
  .facts dd { color: var(--ink); line-height: 1.45; }
  .facts dd small { display: block; color: var(--ink-3); font-size: .9rem; }

  /* ---- Hero (home) ---- */
  .hero {
    padding-block: clamp(40px, 6vw, 88px) clamp(56px, 8vw, 120px);
  }
  .hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: clamp(32px, 6vw, 96px);
    align-items: center;
  }
  .hero__copy { display: grid; gap: clamp(20px, 2.6vw, 30px); justify-items: start; }
  .hero__copy h1 { max-inline-size: 12ch; }
  .hero__lede {
    font-size: clamp(1.15rem, 1.05rem + .5vw, 1.35rem);
    line-height: 1.5;
    color: var(--ink-2);
    max-inline-size: 36ch;
  }
  .hero__meta {
    display: grid;
    gap: 4px;
    font-size: .95rem;
    color: var(--ink-2);
  }
  .hero__meta strong { font-weight: 500; color: var(--ink); }
  .hero__art { position: relative; padding: 24px clamp(8px, 2vw, 28px) 56px; }
  .hero__art .photo { max-inline-size: 440px; margin-inline: auto; }
  .hero__art .note--float { inset-block-end: -8px; inset-inline-end: clamp(0px, 2vw, 24px); }
  @media (max-width: 860px) {
    .hero__grid { grid-template-columns: 1fr; }
    .hero__art { padding: 16px 8px 8px; max-inline-size: 420px; }
    .hero__art .photo { max-inline-size: none; }
  }

  /* ---- Statement ---- */
  .statement__grid {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(28px, 5vw, 80px);
    align-items: start;
  }
  .statement__aside { position: relative; display: grid; gap: 1rem; }
  .statement__aside .note { margin-block-start: .5rem; }
  .statement__body { display: grid; gap: 1.4rem; }
  .statement__body p { font-size: clamp(1.15rem, 1.05rem + .45vw, 1.35rem); line-height: 1.55; color: var(--ink-2); max-inline-size: 34em; }
  .statement__body p:first-child { color: var(--ink); }
  .statement__body .pullquote { margin-block: .6rem; max-inline-size: 22em; }
  @media (max-width: 860px) {
    .statement__grid { grid-template-columns: 1fr; }
  }

  /* ---- Selected work: the table ---- */
  .table {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(40px, 6vw, 88px) clamp(28px, 5vw, 72px);
    align-items: start;
    padding-inline: clamp(0px, 2vw, 24px);
  }
  .table > :nth-child(even) { margin-block-start: clamp(48px, 8vw, 120px); }
  @media (max-width: 720px) {
    .table { grid-template-columns: 1fr; gap: 56px; padding-inline: 0; }
    .table > :nth-child(even) { margin-block-start: 0; }
  }

  .entry {
    position: relative;
    display: grid;
    gap: 22px;
    text-decoration: none;
    color: inherit;
  }
  .entry__body { display: grid; gap: 10px; padding-inline: 6px; }
  .entry__body h3 { transition: color .2s ease; }
  .entry:hover .entry__body h3 { color: var(--rose); }
  .entry__dates { font-size: .95rem; color: var(--ink-2); }
  .entry__blurb { color: var(--ink-2); }
  .entry .photo { margin-inline: auto; }
  .entry--photo .note--float { inset-block-end: 0; inset-inline-end: 0; }
  .entry--photo .note--float.at-top { inset-block-end: auto; inset-block-start: -26px; inset-inline-end: 8px; }

  /* the text-only entry: a card, structurally honest about having no image */
  .entry--text .entry__panel {
    position: relative;
    display: grid;
    gap: 14px;
    padding: clamp(28px, 3.5vw, 44px);
    background: var(--paper);
    border-radius: var(--radius);
    border: 1px solid transparent;
    transition: background .25s ease, border-color .25s ease, box-shadow .3s var(--ease-out), translate .3s var(--ease-out);
  }
  .entry--text:hover .entry__panel { background: var(--white); border-color: var(--line); box-shadow: var(--shadow-card); translate: 0 -2px; }
  .entry--text .entry__panel .pills { margin-block-end: 6px; }
  .entry--text .entry__panel p { color: var(--ink-2); }
  .entry--text .entry__panel .pullquote { font-size: clamp(1.35rem, 1.2rem + .6vw, 1.7rem); margin-block: 6px; }
  .entry--text .note--float { inset-block-start: -22px; inset-inline-end: 22px; }

  /* ---- Bio / background ---- */
  .bio__grid {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
    gap: clamp(32px, 6vw, 96px);
    align-items: start;
  }
  .bio__portrait { position: relative; padding: 16px 20px 48px; max-inline-size: 420px; }
  .bio__portrait .note--float { inset-block-end: -6px; inset-inline-start: 8px; }
  .bio__body { display: grid; gap: 1.4rem; }
  .bio__body .prose p { font-size: 1.08rem; }
  .credentials {
    display: grid;
    gap: 14px;
    margin-block-start: .75rem;
    padding-block-start: 1.5rem;
    border-block-start: 1px solid var(--line);
  }
  .credentials > div {
    display: grid;
    grid-template-columns: 7.5rem 1fr;
    gap: 12px;
    align-items: baseline;
  }
  .credentials dt {
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ink-3);
  }
  .credentials dd { color: var(--ink-2); }
  @media (max-width: 860px) {
    .bio__grid { grid-template-columns: 1fr; }
    .bio__portrait { max-inline-size: 360px; padding-inline: 8px; }
    .credentials > div { grid-template-columns: 1fr; gap: 2px; }
  }

  /* ---- Contact ---- */
  .contact-card {
    position: relative;
    display: grid;
    gap: 1.2rem;
    justify-items: start;
    padding: clamp(32px, 5vw, 72px);
    background: var(--paper);
    border-radius: calc(var(--radius) + 8px);
    overflow: clip;
  }
  .contact-card::before {
    content: "";
    position: absolute;
    inset-block-start: -60px;
    inset-inline-end: -60px;
    inline-size: 260px;
    block-size: 260px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 40%, var(--rose-tint-2), transparent 70%);
    opacity: .9;
    pointer-events: none;
  }
  .contact-card > :not(.note--float) { position: relative; }
  .contact-card p { max-inline-size: 38em; color: var(--ink-2); font-size: 1.12rem; line-height: 1.55; }
  .contact-card .small { font-size: .98rem; color: var(--ink-3); }
  .contact-card .note--float { inset-block-end: 28px; inset-inline-end: clamp(24px, 5vw, 72px); }

  /* ---- Footer ---- */
  .site-footer {
    padding-block: clamp(40px, 5vw, 64px) 32px;
    border-block-start: 1px solid var(--line);
    font-size: .95rem;
    color: var(--ink-2);
  }
  .site-footer__grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 32px;
    align-items: start;
  }
  .site-footer__brand { display: grid; gap: 6px; justify-items: start; }
  .site-footer__brand .tagline { color: var(--ink-3); }
  .site-footer h4 { font-family: var(--font-body); font-size: .74rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-block-end: 12px; }
  .site-footer ul { display: grid; gap: 8px; }
  .site-footer a { text-decoration: none; }
  .site-footer a:hover { color: var(--rose); }
  .site-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 24px;
    margin-block-start: 40px;
    padding-block-start: 20px;
    border-block-start: 1px solid var(--line);
    font-size: .86rem;
    color: var(--ink-3);
  }
  @media (max-width: 720px) {
    .site-footer__grid { grid-template-columns: 1fr; gap: 28px; }
  }

  /* ---- Page head (inner pages) ---- */
  .page-head {
    display: grid;
    gap: 1.1rem;
    max-inline-size: 46rem;
    padding-block: clamp(36px, 5vw, 72px) clamp(40px, 5vw, 64px);
  }
  .page-head .intro { font-size: 1.18rem; line-height: 1.55; color: var(--ink-2); }

  /* ---- "Now" card on the index ---- */
  .now-card {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(24px, 4vw, 64px);
    align-items: center;
    padding: clamp(24px, 3.5vw, 48px);
    background: var(--paper);
    border-radius: calc(var(--radius) + 8px);
    text-decoration: none;
    border: 1px solid transparent;
    transition: background .25s ease, border-color .25s ease, box-shadow .3s var(--ease-out);
  }
  .now-card:hover { background: var(--white); border-color: var(--line); box-shadow: var(--shadow-card); }
  .now-card__art { position: relative; padding: 12px 20px 40px; }
  .now-card__art .photo { max-inline-size: 360px; margin-inline: auto; }
  .now-card__art .note--float { inset-block-end: -2px; inset-inline-end: 8px; }
  .now-card__body { display: grid; gap: 14px; justify-items: start; }
  .now-card__body h2 { font-size: clamp(2rem, 1.4rem + 2.2vw, 3rem); }
  .now-card__body p { color: var(--ink-2); max-inline-size: 34em; }
  .now-card__body .meta { font-size: .95rem; }
  .now-card__body .meta strong { font-weight: 500; color: var(--ink); }
  @media (max-width: 760px) {
    .now-card { grid-template-columns: 1fr; }
    .now-card__art { padding: 8px 8px 8px; max-inline-size: 340px; }
  }

  /* ---- Index groups and rows ---- */
  .index-group { padding-block: clamp(32px, 4vw, 56px); border-block-start: 1px solid var(--line); }
  .index-group__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-block-end: 8px;
  }
  .index-group__head h2 { font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.4rem); }
  .index-group__head .count { font-size: .9rem; color: var(--ink-3); }
  .rows { display: grid; }
  .row { border-block-end: 1px solid var(--line); }
  .row:last-child { border-block-end: 0; }
  .row__link {
    display: grid;
    grid-template-columns: 9.5rem 108px minmax(0, 1fr) auto;
    gap: 16px clamp(16px, 3vw, 40px);
    align-items: center;
    padding-block: clamp(22px, 3vw, 34px);
    text-decoration: none;
    color: inherit;
  }
  .row__date { font-size: .95rem; color: var(--ink-2); line-height: 1.4; }
  .row__date small { display: block; color: var(--ink-3); font-size: .82rem; }
  .row__thumb { padding: 6px 6px 8px; --tilt: -2deg; }
  .row:nth-child(even) .row__thumb { --tilt: 1.8deg; }
  .row__thumb img { aspect-ratio: 4 / 3; }
  .row__glyph {
    display: grid;
    place-items: center;
    aspect-ratio: 4 / 3;
    inline-size: 100%;
    border-radius: 10px;
    background: var(--ochre-tint);
    color: var(--ochre-ink);
    font-family: var(--font-display);
    font-variation-settings: "SOFT" 100, "WONK" 1;
    font-style: italic;
    font-size: 2rem;
    transition: background .25s ease;
  }
  .row__link:hover .row__glyph { background: var(--ochre); color: var(--white); }
  .row__body { display: grid; gap: 8px; }
  .row__body h3 { font-size: clamp(1.35rem, 1.15rem + .8vw, 1.8rem); transition: color .2s ease; }
  .row__link:hover .row__body h3 { color: var(--rose); }
  .row__body p { color: var(--ink-2); max-inline-size: 48em; }
  .row__venue { font-size: .92rem; color: var(--ink-3); }
  .row__arrow {
    display: grid;
    place-items: center;
    inline-size: 44px;
    block-size: 44px;
    border-radius: 50%;
    border: 1px solid var(--line-2);
    color: var(--ink);
    transition: background .25s ease, border-color .25s ease, color .25s ease, translate .25s var(--ease-out);
  }
  .row__arrow svg { inline-size: 18px; block-size: 18px; }
  .row__link:hover .row__arrow { background: var(--rose); border-color: var(--rose); color: var(--white); translate: 3px 0; }
  @media (max-width: 860px) {
    .row__link { grid-template-columns: 96px minmax(0, 1fr); grid-template-areas: "thumb body" "date body"; row-gap: 6px; align-items: start; }
    .row__thumb, .row__glyph { grid-area: thumb; }
    .row__body { grid-area: body; }
    .row__date { grid-area: date; }
    .row__arrow { display: none; }
  }
  @media (max-width: 520px) {
    .row__link { grid-template-columns: 1fr; grid-template-areas: "date" "thumb" "body"; }
    .row__thumb { max-inline-size: 150px; }
    .row__glyph { max-inline-size: 150px; }
  }
  .index-note {
    margin-block-start: 8px;
    padding: 24px 28px;
    border-radius: var(--radius-sm);
    background: var(--paper);
    color: var(--ink-2);
    font-size: .98rem;
    max-inline-size: 48em;
  }
  .index-note a { color: var(--ink); }

  /* ---- Project page (the template) ---- */
  .project { padding-block: clamp(28px, 4vw, 56px) 0; }
  .project__crumbs { margin-block-end: clamp(24px, 3vw, 40px); }
  .project__head {
    display: grid;
    gap: clamp(18px, 2.4vw, 28px);
    max-inline-size: 54rem;
    margin-block-end: clamp(32px, 5vw, 64px);
  }
  .project__head h1 { max-inline-size: 14ch; }
  .project__head .lede {
    font-size: clamp(1.2rem, 1.05rem + .6vw, 1.5rem);
    line-height: 1.45;
    color: var(--ink-2);
    max-inline-size: 30em;
  }
  .project__head .facts { margin-block-start: 8px; }

  .project__images {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    gap: clamp(28px, 5vw, 72px);
    align-items: start;
    padding: 12px clamp(0px, 2vw, 24px) clamp(40px, 6vw, 96px);
  }
  .project__images > :nth-child(2) { margin-block-start: clamp(40px, 8vw, 120px); }
  .project__images > .relative { padding-block-end: 52px; }
  .project__images .note--float { inset-block-end: 0; inset-inline-end: 6px; }
  @media (max-width: 720px) {
    .project__images { grid-template-columns: 1fr; gap: 44px; }
    .project__images > :nth-child(2) { margin-block-start: 0; }
  }

  .project__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: clamp(32px, 6vw, 96px);
    align-items: start;
    padding-block-end: var(--section);
  }
  .project__side {
    position: sticky;
    inset-block-start: 100px;
    display: grid;
    gap: 20px;
  }
  .side-box {
    display: grid;
    gap: 10px;
    padding: 24px;
    background: var(--paper);
    border-radius: var(--radius-sm);
    font-size: .96rem;
    color: var(--ink-2);
  }
  .side-box h4 { font-family: var(--font-body); font-size: .74rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
  .side-box strong { color: var(--ink); font-weight: 500; }
  .side-box .actions { padding-block-start: 6px; }
  .side-box .btn { inline-size: 100%; }
  .side-box .note { margin-block-start: 6px; }
  @media (max-width: 900px) {
    .project__layout { grid-template-columns: 1fr; }
    .project__side { position: static; }
  }

  .share-link {
    display: grid;
    gap: 8px;
    font-size: .95rem;
    color: var(--ink-2);
  }
  .share-link code:not([hidden]) {
    display: block;
    overflow-wrap: anywhere;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--white);
    border: 1px solid var(--line);
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: .82rem;
    color: var(--ink);
  }

  .project__nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding-block: clamp(28px, 4vw, 48px);
    border-block-start: 1px solid var(--line);
  }
  .project__nav a {
    display: grid;
    gap: 6px;
    padding: 20px 24px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: background .25s ease;
  }
  .project__nav a:hover { background: var(--paper); }
  .project__nav a:last-child { text-align: end; justify-items: end; }
  .project__nav .label { font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
  .project__nav .title { font-family: var(--font-display); font-variation-settings: "SOFT" 100, "WONK" 1; font-size: 1.35rem; }
  @media (max-width: 600px) {
    .project__nav { grid-template-columns: 1fr; }
    .project__nav a:last-child { text-align: start; justify-items: start; }
  }

  /* the text-only project (collection): a wide panel instead of images */
  .project__panel {
    position: relative;
    padding: clamp(28px, 4vw, 56px);
    background: var(--paper);
    border-radius: var(--radius);
    margin-block-end: clamp(40px, 6vw, 80px);
  }
  .project__panel .pullquote { max-inline-size: 30em; }
  .project__panel .note--float { inset-block-start: -22px; inset-inline-end: 40px; }
}

/* --------------------------------------------------------------------------
   Utilities and motion
   -------------------------------------------------------------------------- */
@layer utilities {
  .visually-hidden {
    position: absolute !important;
    inline-size: 1px; block-size: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap; border: 0;
  }
  .muted { color: var(--ink-3); }
  .small { font-size: .92rem; }
  .relative { position: relative; }

  /* Gentle rise-in as things scroll into view. Decorative, so no fallback:
     browsers without scroll-driven animations simply show everything. */
  @media (prefers-reduced-motion: no-preference) {
    @supports ((animation-timeline: view()) and (animation-range: entry)) {
      @keyframes rise {
        from { opacity: 0; translate: 0 22px; }
      }
      .reveal {
        animation: rise linear both;
        animation-timeline: view();
        animation-range: entry 0% entry 45%;
      }
    }
    @supports (animation-timeline: scroll()) {
      @keyframes header-line {
        to { box-shadow: 0 1px 0 var(--line); }
      }
      .site-header {
        animation: header-line linear both;
        animation-timeline: scroll();
        animation-range: 0 90px;
      }
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .photo, .btn, .card, .entry__panel, .now-card, .row__arrow, .link-arrow .arrow, .nav a::after {
      transition: none !important;
    }
  }

  @media (forced-colors: active) {
    .btn, .pill, .card, .photo { border: 1px solid CanvasText; }
  }

  @media print {
    .site-header, .site-footer, .skip-link, .menu-btn, .note { display: none !important; }
    .photo { transform: none !important; box-shadow: none !important; }
  }
}
