/* ═══════════════════════════════════════════════════════════
   Zhimin Barbara Zhang — hero landing page
   Type + palette follow font_navigate.png
   ═══════════════════════════════════════════════════════════ */

:root {
  --font-heading: 'Playfair Display', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;

  --paper:      #f6ecdb;
  --paper-alt:  #f0e4cf;
  --ink:        #14303f;
  --ink-soft:   #5d6f78;
  --terra:      #c05f3c;
  --terra-deep: #a94e2e;
  --rule:       rgba(20, 48, 63, 0.14);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ═══════════════ NAVBAR ═══════════════ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 1.25rem;
  transition: background-color .3s ease, box-shadow .3s ease, backdrop-filter .3s ease;
}
@media (min-width: 640px) { .nav { padding: 1.05rem 2.25rem; } }
@media (min-width: 1100px) { .nav { padding: 1.15rem 3rem; } }

.nav.is-stuck {
  background: rgba(246, 236, 219, .84);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--rule);
}

.logo { display: flex; align-items: center; text-decoration: none; }
.logo-mark { height: 44px; width: auto; display: block; transition: filter .3s ease, opacity .2s ease; }
@media (min-width: 640px) { .logo-mark { height: 52px; } }
.logo:hover .logo-mark { opacity: .72; }

.nav-desktop { display: none; align-items: center; gap: 2rem; }
@media (min-width: 860px) { .nav-desktop { display: flex; } }

.nav-link {
  position: relative; font-size: 16px; font-weight: 500; letter-spacing: -0.005em;
  color: var(--ink); text-decoration: none; padding-bottom: 4px;
  transition: color .2s ease;
}
.nav-link::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--terra); transform: scaleX(0); transform-origin: left;
  transition: transform .28s cubic-bezier(.4,0,.2,1);
}
.nav-link:hover { color: var(--terra); }
.nav-link:hover::after, .nav-link.is-active::after { transform: scaleX(1); }
.nav-link.is-active { color: var(--ink); }

.nav-pill {
  font: inherit; font-size: 16px; font-weight: 500; cursor: pointer;
  color: var(--paper); background: var(--ink); border: 1px solid var(--ink);
  border-radius: 9999px; padding: .58em 1.5em;
  transition: background-color .22s ease, color .22s ease, transform .22s ease;
}
.nav-pill:hover { background: var(--terra); border-color: var(--terra); transform: translateY(-1px); }

/* hamburger */
.burger { display: flex; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 4px 0; }
@media (min-width: 860px) { .burger { display: none; } }
.burger span {
  display: block; width: 1.5rem; height: 2px; background: var(--ink);
  transition: transform .3s ease, opacity .3s ease, background-color .3s ease;
}
.burger.open span { background: var(--paper); }
.nav.menu-open .logo-mark { filter: brightness(0) invert(1); }
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ═══════════════ MOBILE OVERLAY ═══════════════ */
.mobile-overlay {
  position: fixed; inset: 0; z-index: 19;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  gap: 1.75rem; padding: 0 2rem;
  background: rgba(14, 40, 54, .95);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  opacity: 0; pointer-events: none; transition: opacity .3s ease;
}
.mobile-overlay.open { opacity: 1; pointer-events: auto; }
@media (min-width: 860px) { .mobile-overlay { display: none; } }
.mobile-overlay a, .mobile-cta {
  font-family: var(--font-heading); font-size: 34px; font-weight: 500; color: var(--paper);
  text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer;
}
.mobile-cta { color: #e79c7c; font-style: italic; }

/* ═══════════════ HERO ═══════════════ */
.hero {
  position: relative; z-index: 2;
  height: 100vh; height: 100svh; min-height: 580px;
  display: flex; flex-direction: column; overflow: hidden;
  background: transparent;
}

/* ═══════════════ PAGE GROUND + DISTANT WORKS ═══════════════ */
.page-wash { position: fixed; inset: 0; z-index: 0; background: var(--paper); pointer-events: none; }

.backdrop { position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.backdrop-layer {
  position: absolute; inset: 0;
  display: flex; align-items: flex-end; justify-content: center;
  -webkit-mask-image: radial-gradient(112% 86% at 50% 56%, #000 30%, transparent 80%);
          mask-image: radial-gradient(112% 86% at 50% 56%, #000 30%, transparent 80%);
}
/* the hero look: warm, washed back, reading as distance */
.backdrop-layer.is-dark { filter: sepia(.62) saturate(1.15) hue-rotate(-8deg) contrast(.82) blur(.4px); }
/* the Projects look: the same plate inverted, so dark ink becomes a pale
   engraving that still reads against the sepia ground */
.backdrop-layer.is-light { filter: invert(1) sepia(.42) saturate(1.6) hue-rotate(-14deg) brightness(1.04); }

.backdrop-inner { position: relative; will-change: transform; }
/* the plate stays in flow so the container keeps its height; the gears float on top */
.backdrop-inner > img { position: absolute; }
.backdrop-inner > img.backdrop-plate { position: relative; display: block; width: 100%; height: auto; }
.bg-gear { transform-origin: 50% 50%; }

.scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 1; }

.hero-inner {
  position: relative; z-index: 4;
  flex: 1; display: flex; flex-direction: column;
  justify-content: flex-start;
  padding: calc(74px + 3vh) 1.25rem 0;
  pointer-events: none;
}
@media (min-width: 640px) { .hero-inner { padding-left: 2.25rem; padding-right: 2.25rem; } }
@media (min-width: 860px) {
  .hero-inner { justify-content: center; padding: 0 2.25rem 20vh; }
}
@media (min-width: 1100px) { .hero-inner { padding-left: 3rem; padding-right: 3rem; } }
.hero-copy { max-width: 34rem; pointer-events: auto; }

.eyebrow {
  display: flex; align-items: center; gap: .75rem;
  font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--terra); margin-bottom: 1.1rem;
}
.eyebrow .rule { display: block; width: 42px; height: 1.5px; background: currentColor; flex: none; }

.hero-title {
  font-family: var(--font-heading); font-weight: 600; text-wrap: balance;
  font-size: clamp(42px, 7.1vw, 78px); line-height: 1.0; letter-spacing: -0.018em;
  margin-bottom: 1.1rem;
}
.hero-title span { display: block; }
.hero-title .t-2 { margin-left: .04em; }
.hero-title em { font-style: italic; font-weight: 500; color: var(--terra); }

.hero-desc {
  font-size: clamp(14px, 1.9vw, 17px); line-height: 1.6; font-weight: 400;
  color: var(--ink-soft); min-height: 4.8em; margin-bottom: 1.6rem; max-width: 30rem;
}
.tw-cursor {
  display: inline-block; width: 2px; height: 1.05em; background: var(--terra);
  vertical-align: -.14em; margin-left: 2px; animation: blink 1s step-end infinite;
}
.tw-cursor.done { display: none; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.actions {
  display: flex; flex-wrap: wrap; gap: .7rem;
  opacity: 0; transform: translateY(8px);
  transition: opacity .5s ease, transform .5s ease;
}
.actions.show { opacity: 1; transform: translateY(0); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-size: 15px; font-weight: 500; cursor: pointer;
  border-radius: 9999px; padding: .95em 2em; white-space: nowrap; text-decoration: none;
  transition: background-color .22s ease, color .22s ease, border-color .22s ease, transform .22s ease;
}
.btn-solid { background: var(--terra); color: #fff; border: 1px solid var(--terra); }
.btn-solid:hover { background: var(--terra-deep); border-color: var(--terra-deep); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid rgba(20,48,63,.28); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); transform: translateY(-2px); }

/* ═══════════════ SECTIONS ═══════════════ */
.section { position: relative; z-index: 2; padding: clamp(80px, 12vw, 150px) 1.25rem; scroll-margin-top: 82px; }
@media (min-width: 640px) { .section { padding-left: 2.25rem; padding-right: 2.25rem; } }
@media (min-width: 1100px) { .section { padding-left: 3rem; padding-right: 3rem; } }
.section-alt { background: var(--paper-alt); }
.footer { position: relative; z-index: 2; background: var(--paper-alt); }
.section-inner { max-width: 1100px; margin: 0 auto; }

.section h2 {
  font-family: var(--font-heading); font-weight: 600;
  font-size: clamp(34px, 5.6vw, 60px); letter-spacing: -.02em; line-height: 1.04;
  margin: 0 0 1.1rem;
}
.section-lead { max-width: 40rem; font-size: clamp(15px, 2.1vw, 18px); line-height: 1.65; color: var(--ink-soft); }

.cards { display: grid; gap: 1.1rem; margin-top: 2.8rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 940px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card {
  border: 1px solid var(--rule); border-radius: 4px; padding: 1.75rem;
  background: rgba(255,255,255,.4);
  transition: transform .25s ease, background-color .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-3px); background: rgba(255,255,255,.82); border-color: rgba(20,48,63,.3); }
.card h3 { font-family: var(--font-heading); font-size: 23px; font-weight: 500; margin-bottom: .6rem; }
.card p { font-size: 15px; line-height: 1.6; color: var(--ink-soft); }
.card .tag {
  display: inline-block; margin-top: 1.2rem; font-size: 11px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--terra); opacity: .8;
}
.placeholder-note { margin-top: 2rem; font-size: 13px; color: var(--ink-soft); opacity: .7; font-style: italic; }

.footer {
  display: flex; flex-wrap: wrap; gap: .75rem 1.5rem;
  justify-content: space-between; align-items: center;
  padding: 2.25rem 1.25rem; border-top: 1px solid var(--rule); font-size: 14px; color: var(--ink-soft);
}
@media (min-width: 640px) { .footer { padding-left: 2.25rem; padding-right: 2.25rem; } }
.footer-link {
  font: inherit; background: none; border: 0; color: var(--ink); cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px; transition: color .2s ease;
}
.footer-link:hover { color: var(--terra); }

/* ═══════════════ CONTACT MODAL ═══════════════ */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 40;
  display: flex; align-items: center; justify-content: center; padding: 1.25rem;
  background: rgba(14, 40, 54, .55);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.modal {
  position: relative; width: 100%; max-width: 27rem;
  /* The card carries its own colour: project pages set a cream body colour for
     the sepia ground, and anything here without an explicit colour would
     inherit it and vanish against the card's own paper. */
  background: var(--paper); color: var(--ink);
  border-radius: 6px; padding: 2.25rem;
  box-shadow: 0 24px 60px rgba(14, 40, 54, .3);
  transform: translateY(10px) scale(.98); transition: transform .28s cubic-bezier(.2,.8,.3,1);
}
.modal-backdrop.open .modal { transform: translateY(0) scale(1); }
.modal .eyebrow { margin-bottom: .5rem; color: var(--terra-deep); }
.modal-close {
  position: absolute; top: 1rem; right: 1rem;
  background: none; border: 0; color: var(--ink); cursor: pointer;
  opacity: .5; transition: opacity .2s ease; line-height: 0; padding: 4px;
}
.modal-close:hover { opacity: 1; }
.modal-sub { margin: 0 0 1.4rem; color: var(--ink-soft); font-size: 15px; }
.modal-row {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  border: 1px solid var(--rule); border-radius: 9999px; padding: .4rem .4rem .4rem 1.1rem;
  background: rgba(255,255,255,.6);
}
/* the address is the one thing people came here to read: set explicitly to a
   near-black deepening of the site ink, so it never depends on inheritance */
.modal-email {
  font-size: clamp(13px, 3.4vw, 15px); overflow-wrap: anywhere;
  color: #0b1a24;
}
.copy-btn {
  display: inline-flex; align-items: center; gap: .5rem; flex-shrink: 0;
  font: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
  background: var(--ink); color: var(--paper); border: 1px solid var(--ink);
  border-radius: 9999px; padding: .55em 1.1em;
  transition: background-color .2s ease, color .2s ease;
}
.copy-btn:hover { background: var(--terra); border-color: var(--terra); color: #fff; }
.copy-btn.copied { background: #2e6f4e; border-color: #2e6f4e; color: #fff; }
.modal-mailto {
  display: inline-block; margin-top: 1.4rem; font-size: 14px; color: var(--ink);
  text-decoration: underline; text-underline-offset: 3px; transition: color .2s ease;
}
.modal-mailto:hover { color: var(--terra); }

/* ═══════════════════════════════════════════════════════════
   PROJECTS — illustrated cards
   ═══════════════════════════════════════════════════════════ */
.section-projects {
  /* the ground under this section washes from cream to sepia as you scroll in,
     so the type colour is driven from the same progress in app.js — a fixed
     colour would be unreadable at one end of the transition or the other */
  --proj-ink: var(--ink);
  --proj-soft: var(--ink-soft);
  --proj-accent: var(--terra);
  color: var(--proj-ink);
  padding-top: clamp(90px, 13vw, 165px);
  padding-bottom: clamp(90px, 13vw, 165px);
}
.section-projects h2 { color: var(--proj-ink); }
.section-projects .eyebrow { color: var(--proj-accent); }
.section-projects .section-lead { color: var(--proj-soft); }

.pcards { display: grid; gap: 1.25rem; margin-top: 3rem; grid-template-columns: 1fr; }
@media (min-width: 700px)  { .pcards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) { .pcards { grid-template-columns: repeat(3, 1fr); } }

.pcard {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  text-decoration: none; color: var(--ink);
  background: linear-gradient(180deg, #f8f0de 0%, #efe4cb 100%);
  border: 1px solid rgba(58, 42, 28, .20);
  border-radius: 3px;
  padding: 1.5rem 1.4rem 1.6rem;
  box-shadow: 0 2px 10px rgba(18, 10, 4, .16);
  transition: transform .4s cubic-bezier(.2,.8,.3,1), box-shadow .4s ease,
              border-color .4s ease, background .4s ease;
}
.pcard:hover, .pcard:focus-visible {
  transform: translateY(-8px);
  border-color: rgba(58, 42, 28, .42);
  background: linear-gradient(180deg, #fdf7e9 0%, #f4ead4 100%);
  box-shadow: 0 26px 54px rgba(14, 8, 3, .40);
  outline: none;
}

.pcard-art {
  position: relative; display: block; width: 100%; aspect-ratio: 1 / 1;
  margin-bottom: 1.4rem;
  /* the plates are stored as flat ink + alpha, warmed here to match the paper */
  filter: sepia(.38) saturate(1.35) hue-rotate(-6deg);
}
.pcard-art img { position: absolute; display: block; }
.pcard-plate { inset: 0; width: 100%; height: 100%; }
.pcard-part { transform-origin: 50% 50%; }
/* a wheel seen at an angle spins in its own plane, not the screen's:
   un-squash, rotate, re-squash */
.pcard-part[data-axis] { transform: scaleX(var(--k)) rotate(0turn) scaleX(var(--ik)); }

.pcard-hands { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible;
               --hub-x: 215.5px; --hub-y: 261px; }
/* the hand paths are authored from the origin pointing right, so they must be
   moved onto the dial's hub before being rotated about it */
.pcard-hands .hand {
  fill: #3a2a1c;
  transform-box: view-box; transform-origin: 0 0;
  transform: translate(var(--hub-x), var(--hub-y)) rotate(var(--a));
}

@keyframes partspin  { to { transform: rotate(1turn); } }
@keyframes wheelspin { from { transform: scaleX(var(--k)) rotate(0turn) scaleX(var(--ik)); }
                       to   { transform: scaleX(var(--k)) rotate(1turn) scaleX(var(--ik)); } }
@keyframes handspin  { from { transform: translate(var(--hub-x), var(--hub-y)) rotate(var(--a)); }
                       to   { transform: translate(var(--hub-x), var(--hub-y)) rotate(calc(var(--a) + 360deg)); } }

.pcard:hover .pcard-part,
.pcard:focus-visible .pcard-part { animation: partspin var(--dur, 5s) linear infinite; }
.pcard:hover .pcard-part[data-axis],
.pcard:focus-visible .pcard-part[data-axis] { animation: wheelspin var(--dur, 4.5s) linear infinite; }
.pcard:hover .hand.hour,   .pcard:focus-visible .hand.hour   { animation: handspin 7s   linear infinite; }
.pcard:hover .hand.minute, .pcard:focus-visible .hand.minute { animation: handspin 1.8s linear infinite; }

.pcard h3 {
  font-family: var(--font-heading); font-weight: 600;
  font-size: clamp(21px, 2.3vw, 28px); letter-spacing: .055em; text-transform: uppercase;
  line-height: 1.1; margin-bottom: .65rem;
}
.pcard p { font-size: 15px; line-height: 1.5; color: var(--ink-soft); max-width: 17rem; }

.pcard-more {
  display: inline-flex; align-items: center; gap: .5rem;
  margin-top: 1.3rem; font-size: 12px; font-weight: 600;
  letter-spacing: .13em; text-transform: uppercase; color: var(--terra);
  opacity: 0; transform: translateY(7px);
  transition: opacity .38s ease .1s, transform .38s ease .1s;
}
.pcard:hover .pcard-more, .pcard:focus-visible .pcard-more { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .pcard:hover .pcard-part, .pcard:hover .hand,
  .pcard:focus-visible .pcard-part, .pcard:focus-visible .hand { animation: none; }
  .pcard-more { opacity: 1; transform: none; }
}

/* the navbar has to survive the sepia ground under Projects */
.nav.on-dark .nav-link { color: #f2e5cf; }
.nav.on-dark .nav-link:hover { color: #e9b492; }
.nav.on-dark .nav-link::after { background: #e2a17c; }
.nav.on-dark .nav-pill { background: #f2e5cf; color: #35281d; border-color: #f2e5cf; }
.nav.on-dark .nav-pill:hover { background: #e2a17c; border-color: #e2a17c; color: #35281d; }
.nav.on-dark .logo-mark { filter: brightness(0) invert(1); }
.nav.on-dark .burger span { background: #f2e5cf; }
.nav.is-stuck.on-dark {
  background: rgba(56, 42, 30, .84);
  box-shadow: 0 1px 0 rgba(242, 229, 207, .15);
}

/* ═══════════════════════════════════════════════════════════
   PROMPT LAB — light chapter, set against Projects' sepia
   ═══════════════════════════════════════════════════════════ */
.section-lab {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, #f7efe0 0%, #f3e8d4 100%);
  padding-bottom: clamp(120px, 18vw, 220px);
}
/* the workshop itself — an interior, so it fills the section rather than
   sitting on a horizon, and fades at top and bottom into the neighbours */
.lab-scene {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 42%;
  opacity: .15;
  filter: sepia(.5) saturate(1.25) hue-rotate(-8deg);
  pointer-events: none; user-select: none;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 78%, transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 78%, transparent 100%);
}
.section-lab .section-inner { position: relative; z-index: 1; }

.lcards { display: grid; gap: 1.5rem; margin-top: 3rem; grid-template-columns: 1fr; }
@media (min-width: 780px) { .lcards { grid-template-columns: 1fr 1fr; gap: 2rem; } }

.lcard {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  font: inherit; color: var(--ink); cursor: pointer;
  background: #faf3e4;
  border: 1px solid rgba(58, 42, 28, .22);
  border-radius: 3px;
  padding: 2rem 1.6rem 1.8rem;
  box-shadow: 0 2px 10px rgba(58, 42, 28, .07);
  transition: transform .4s cubic-bezier(.2,.8,.3,1), box-shadow .4s ease,
              border-color .4s ease, background .4s ease;
}
.lcard:hover, .lcard:focus-visible {
  transform: translateY(-6px);
  background: #fdf8ec;
  border-color: rgba(58, 42, 28, .42);
  box-shadow: 0 22px 46px rgba(58, 42, 28, .18);
  outline: none;
}

.lcard-art {
  display: block; width: min(280px, 68%); aspect-ratio: 1 / 1; margin-bottom: 1.5rem;
  overflow: hidden;
}
.pl-art {
  display: block; width: 100%; height: 100%; color: #3a2a1c;
  transform: scale(1); transform-origin: 50% 50%;
  transition: transform 1.1s cubic-bezier(.22,.7,.25,1);
}
.lcard:hover .pl-art, .lcard:focus-visible .pl-art { transform: scale(1.14); }

.pl-grid { opacity: .26; }
.pl-ring { opacity: .92; }
.pl-ticks { opacity: .55; }
.pl-glass { opacity: .92; }
.pl-numeral {
  font-family: var(--font-heading); font-size: 84px; font-weight: 600; letter-spacing: .01em;
  fill: none; stroke: currentColor; stroke-width: 2.2; paint-order: stroke;
}

.lcard h3 {
  font-family: var(--font-heading); font-weight: 600;
  font-size: clamp(23px, 2.6vw, 31px); letter-spacing: .045em; text-transform: uppercase;
  line-height: 1.1; margin-bottom: .7rem;
}
.lcard > p { font-size: 15.5px; line-height: 1.55; color: var(--ink-soft); max-width: 20rem; }

.lcard-more {
  display: inline-flex; align-items: center; gap: .5rem;
  margin-top: 1.4rem; font-size: 12px; font-weight: 600;
  letter-spacing: .13em; text-transform: uppercase; color: var(--terra);
  opacity: 0; transform: translateY(7px);
  transition: opacity .38s ease .08s, transform .38s ease .08s;
}
.lcard:hover .lcard-more, .lcard:focus-visible .lcard-more { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .lcard:hover .pl-art, .lcard:focus-visible .pl-art { transform: none; }
  .lcard-more { opacity: 1; transform: none; }
}

/* ═══════════════ PROMPT SHEET ═══════════════ */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 45;
  display: flex; align-items: center; justify-content: center; padding: 1.25rem;
  background: rgba(14, 40, 54, .58);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.sheet-backdrop.open { opacity: 1; pointer-events: auto; }
.sheet {
  position: relative; width: 100%; max-width: 46rem; max-height: min(88vh, 900px);
  display: flex; flex-direction: column;
  background: var(--paper); color: var(--ink);
  border-radius: 6px; box-shadow: 0 28px 70px rgba(14, 40, 54, .34);
  transform: translateY(12px) scale(.98); transition: transform .3s cubic-bezier(.2,.8,.3,1);
}
.sheet-backdrop.open .sheet { transform: translateY(0) scale(1); }
.sheet-close {
  position: absolute; top: .9rem; right: .9rem; z-index: 2;
  background: rgba(246, 236, 219, .9); border: 0; border-radius: 9999px;
  color: var(--ink); cursor: pointer; opacity: .6; transition: opacity .2s ease;
  line-height: 0; padding: 7px;
}
.sheet-close:hover { opacity: 1; }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; padding: 2.1rem; }
@media (min-width: 640px) { .sheet-body { padding: 2.6rem 2.8rem; } }

.sheet-head { margin-bottom: 1.6rem; }
.sheet-head h2 {
  font-family: var(--font-heading); font-weight: 600;
  font-size: clamp(28px, 4.4vw, 42px); letter-spacing: -.01em; line-height: 1.06;
  margin: .2rem 0 .9rem;
}
.sheet-lead { font-size: clamp(15px, 2vw, 17px); line-height: 1.62; color: var(--ink-soft); }

/* tabs — labelled, so every prompt in the set is visible at a glance */
.tabs {
  display: flex; flex-wrap: wrap; gap: .4rem;
  border-bottom: 1px solid var(--rule); margin-bottom: 1.5rem;
}
.tab {
  font: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
  background: none; border: 0; border-bottom: 2px solid transparent;
  color: var(--ink-soft); padding: .7em 1em; margin-bottom: -1px;
  transition: color .2s ease, border-color .2s ease;
}
.tab:hover { color: var(--ink); }
.tab.is-on { color: var(--ink); border-bottom-color: var(--terra); font-weight: 600; }
.tabpanel { display: none; }
.tabpanel.is-on { display: block; }

.prompt-block { border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; background: #fbf5e7; }
.prompt-block + .prompt-block { margin-top: 1.4rem; }
.prompt-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .6rem .8rem .6rem 1rem; border-bottom: 1px solid var(--rule);
  background: rgba(58, 42, 28, .04);
}
.prompt-name { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.prompt-copy {
  display: inline-flex; align-items: center; gap: .45rem; flex-shrink: 0;
  font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
  background: var(--ink); color: var(--paper); border: 1px solid var(--ink);
  border-radius: 9999px; padding: .45em .95em;
  transition: background-color .2s ease, border-color .2s ease;
}
.prompt-copy:hover { background: var(--terra); border-color: var(--terra); color: #fff; }
.prompt-copy.copied { background: #2e6f4e; border-color: #2e6f4e; color: #fff; }
.prompt-text {
  margin: 0; padding: 1.1rem 1.2rem; max-height: 22rem; overflow: auto;
  overscroll-behavior: contain;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px; line-height: 1.68; color: #2a2621;
  white-space: pre-wrap; word-break: break-word;
}

/* ═══════════════ SOCIAL ═══════════════ */
.nav-social {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink); opacity: .78; margin-right: -.5rem;
  transition: color .2s ease, opacity .2s ease, transform .2s ease;
}
.nav-social:hover { color: var(--terra); opacity: 1; transform: translateY(-1px); }
.nav.on-dark .nav-social { color: #f2e5cf; }
.nav.on-dark .nav-social:hover { color: var(--terra); }

.mobile-social {
  display: inline-flex; align-items: center; gap: .7rem;
  font-family: var(--font-heading); font-size: 34px; font-weight: 500;
  color: var(--paper); text-decoration: none;
}
.mobile-social:hover { color: #e79c7c; }

/* Linkedin.png as an alpha stencil, so the mark takes the nav's own colour —
   ink on the cream pages, cream on the sepia ones — instead of brand blue.
   url() resolves against this file, so project pages get it too.
   Without mask support the PNG itself shows, already inked to match. */
.li-mark {
  display: block; width: 19px; height: 19px; flex: none;
  background: url(assets/linkedin.png) center / contain no-repeat;
}
.mobile-social .li-mark { width: 27px; height: 27px; }
@supports ((-webkit-mask-image: url(#m)) or (mask-image: url(#m))) {
  .li-mark {
    background: currentColor;
    -webkit-mask: url(assets/linkedin.png) center / contain no-repeat;
            mask: url(assets/linkedin.png) center / contain no-repeat;
  }
}

/* a project still being built says so on the card */
.pcard-tag {
  display: inline-flex; align-items: center; gap: .45rem;
  margin-top: .9rem; font-size: 10.5px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--terra);
  border: 1px solid rgba(192, 95, 60, .38); border-radius: 9999px; padding: .42em .9em;
}
.pcard-tag .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex: none; }

/* ═══════════════ FOOTER LINKS ═══════════════ */
.footer-links { display: inline-flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.footer-li, .foot-li {
  display: inline-flex; align-items: center; gap: .5rem;
  text-decoration: none; color: var(--ink);
  transition: color .2s ease;
}
.footer-li:hover, .foot-li:hover { color: var(--terra); }
.footer-li .li-mark, .foot-li .li-mark { width: 15px; height: 15px; }
