/* Eleni Ioannou — site styles */
/* Layout: one long horizontal studio wall. Each discipline is a stretch of wall,
   opened by a title card, with works pinned at uneven heights and annotated by hand. */
:root {
  --onyx: #222526;       /* main background */
  --platinum: #E0E0E0;   /* text on dark, highlights */
  --jet: #1A1A1A;        /* text on light */
  --ash: #8C9193;        /* secondary text, cool-biased toward onyx */
  --graphite: #2D3133;   /* raised surfaces on onyx */
  --slate: #55595B;      /* secondary text on platinum */
  --rule: rgba(224, 224, 224, .18);   /* thin dividers on onyx */
  --tape: rgba(224, 224, 224, .42);

  --bg: var(--onyx);
  --fg: var(--platinum);
  --muted: var(--ash);

  /* one font per role, each covering both English and Greek, so both languages look identical */
  --display: "Roboto Flex", "Helvetica Neue", Arial, sans-serif;
  --hand: "Mynerve", "Bradley Hand", "Segoe Print", cursive;
  --mono: "Fira Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --head-h: 76px;
  --foot-h: 64px;
  --grain: .22;          /* film grain strength: 0 = off, .2 = subtle, .5 = heavy */
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  overflow: hidden;
  background: var(--onyx);
  color: var(--platinum);
  font: 400 16px/1.55 var(--display);
  -webkit-font-smoothing: antialiased;
  font-synthesis-weight: none; /* the handwriting font has one weight; never fake-bold it */
}
/* film grain over everything (tile drawn by script.js) */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: var(--grain);
  mix-blend-mode: overlay;
  background-image: var(--grain-img, none);
  background-size: 200px 200px;
}
a { color: inherit; }
:focus-visible { outline: 2px dashed var(--platinum); outline-offset: 4px; }
.light :focus-visible { outline-color: var(--jet); }

/* ---------- header ---------- */
.site-head {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  height: var(--head-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  mix-blend-mode: difference;
  color: var(--platinum);
}
.brand {
  font-weight: 900; font-stretch: 125%;
  font-size: 15px; letter-spacing: .16em; text-decoration: none; white-space: nowrap;
}
.nav { display: flex; gap: clamp(14px, 2.4vw, 34px); list-style: none; margin: 0; padding: 0; }
.nav a {
  position: relative; display: inline-block;
  font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  text-decoration: none; padding: 6px 2px;
}
.nav a svg {
  position: absolute; left: -14%; top: -18%; width: 128%; height: 136%;
  overflow: visible; pointer-events: none;
}
.nav a svg path {
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; transition: stroke-dashoffset .6s ease, opacity .2s;
}
.nav a[aria-current="true"] svg path { stroke-dashoffset: 0; opacity: 1; }
.head-note { font-family: var(--hand); font-size: 21px; white-space: nowrap; }
.head-right { display: flex; align-items: center; gap: 22px; }

/* language toggle */
.lang { display: flex; align-items: center; gap: 4px; font-family: var(--mono); font-size: 12px; letter-spacing: .14em; }
.lang a {
  position: relative;
  font: inherit; letter-spacing: inherit; color: inherit; text-decoration: none;
  background: none; border: 0; padding: 6px 3px; cursor: pointer;
  opacity: .5; transition: opacity .2s;
}
.lang a:hover, .lang a[aria-current="true"] { opacity: 1; }
.lang a[aria-current="true"]::after {
  content: ""; position: absolute; left: 1px; right: 1px; bottom: 2px; height: 1.6px;
  background: currentColor; border-radius: 2px; transform: rotate(-3deg);
}

/* ---------- footer / progress ---------- */
.site-foot {
  position: fixed; inset: auto 0 0 0; z-index: 20;
  height: calc(var(--foot-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px));
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 22px;
  mix-blend-mode: difference; color: var(--platinum);
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
}
.where { font-variant-numeric: tabular-nums; white-space: nowrap; }
.progress { height: 18px; width: 100%; overflow: visible; }
.progress path { fill: none; stroke: currentColor; stroke-linecap: round; }
.progress .rail { stroke-width: 1; opacity: .3; }
.progress .ink { stroke-width: 2.2; }
.hint { white-space: nowrap; }

/* ---------- the track ---------- */
.track {
  height: 100%;
  display: flex; align-items: stretch;
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  cursor: grab;
}
.track::-webkit-scrollbar { display: none; }
.track.dragging { cursor: grabbing; user-select: none; }
.track.dragging * { pointer-events: none; }

.panel {
  flex: none;
  height: 100%;
  display: flex; align-items: center; gap: clamp(48px, 7vw, 120px);
  padding: calc(var(--head-h) + 24px) clamp(40px, 6vw, 110px) calc(var(--foot-h) + 24px);
  background: var(--bg); color: var(--fg);
  position: relative;
}
.light { --bg: var(--platinum); --fg: var(--jet); --muted: var(--slate); --tape: rgba(26, 26, 26, .13); }

/* ---------- hero ---------- */
.hero {
  width: 100vw;
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  align-items: end;
  gap: 18px 4vw;
}
.hero-kicker {
  grid-column: 1; align-self: start;
  font-family: var(--mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted);
}
.wordmark {
  grid-column: 1; grid-row: 2; align-self: center;
  margin: 0;
  font-weight: 900; font-stretch: 125%;
  font-size: min(9vw, 19vh);
  line-height: .86; letter-spacing: -.01em;
}
.wordmark span { display: block; }
.draw path { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.hero-side { grid-column: 2; grid-row: 1 / 4; align-self: center; display: grid; gap: 34px; justify-items: start; }
.index { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; width: 100%; max-width: 340px; }
.index a {
  display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--rule); text-decoration: none;
}
.index b { font-weight: 700; font-stretch: 112%; font-size: 19px; letter-spacing: .02em; }
.index small { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: var(--muted); font-variant-numeric: tabular-nums; }
.index a:hover b { font-family: var(--hand); font-weight: 400; font-stretch: 100%; font-size: 26px; line-height: 1; }
.scroll-cue { display: flex; align-items: center; gap: 12px; font-family: var(--hand); font-size: 26px; }
.scroll-cue svg { width: 92px; height: 40px; overflow: visible; }

/* ---------- section openers ---------- */
.opener { display: grid; gap: 18px; width: min(540px, 82vw); flex: none; }
.opener .count { font-family: var(--mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.opener h2, .opener h1 {
  margin: 0;
  font-weight: 900; font-stretch: 125%;
  font-size: min(6.2vw, 12vh); line-height: .9; letter-spacing: -.01em;
  text-wrap: balance;
}
.opener .hand { font-family: var(--hand); font-size: clamp(24px, 3.2vh, 32px); line-height: 1.12; margin: 0; max-width: 24ch; transform: rotate(-1.5deg); }
.opener .lede { margin: 0; max-width: 38ch; color: var(--muted); font-size: 15px; }
.roman {
  position: absolute; left: clamp(12px, 2vw, 30px); bottom: calc(var(--foot-h) + 28px);
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-family: var(--mono); font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted);
}

/* ---------- works ---------- */
.work {
  flex: none; margin: 0;
  position: relative;
  display: grid; gap: 14px;
  transform: translateY(var(--y, 0)) rotate(var(--tilt, 0deg));
  transition: transform .5s cubic-bezier(.2, .7, .2, 1);
  z-index: 60;           /* above the site-wide grain; each image carries its own copy instead */
}
.work:hover { transform: translateY(var(--y, 0)) rotate(0deg) scale(1.015); }
.media {
  height: var(--h, clamp(220px, 50vh, 560px));
  aspect-ratio: var(--ar, 4 / 5);
  max-width: 82vw;
  position: relative;
  background: var(--graphite);
}
/* every image is black and white with grain; hovering one shows it in its original colour, without grain */
.media img, .media canvas {
  width: 100%; height: 100%; display: block; object-fit: cover;
  filter: grayscale(1) contrast(1.06); transition: filter .35s ease;
}
.media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: var(--grain-img, none); background-size: 200px 200px;
  mix-blend-mode: overlay; opacity: var(--grain);
  transition: opacity .35s ease;
}
.work:hover .media img, .work:hover .media canvas { filter: none; }
.work:hover .media::after { opacity: 0; }
/* hero portrait: the face sits left of centre in the original, so crop around it */
.hero-photo { object-position: 26% 50%; }
/* photographic print with a white border */
.print .media { padding: 12px; background: var(--platinum); box-shadow: 0 18px 40px rgba(0, 0, 0, .35); }
.light .print .media { box-shadow: 0 14px 30px rgba(0, 0, 0, .18); background: #F2F2F0; }
.mounted .media { box-shadow: 0 22px 44px rgba(0, 0, 0, .4); }
.light .mounted .media { box-shadow: 0 18px 36px rgba(0, 0, 0, .2); }

.tape {
  position: absolute; z-index: 2;
  width: 96px; height: 28px; top: -13px; left: calc(50% - 48px);
  background: var(--tape);
  transform: rotate(var(--tape-r, -4deg));
  clip-path: polygon(0 8%, 6% 0, 12% 10%, 20% 2%, 30% 9%, 42% 0, 55% 8%, 66% 1%, 78% 9%, 88% 2%, 100% 7%, 97% 50%, 100% 94%, 90% 100%, 80% 91%, 68% 100%, 56% 92%, 44% 100%, 32% 93%, 20% 100%, 9% 92%, 0 98%, 3% 50%);
  backdrop-filter: blur(.5px);
}
.tape.corner { width: 70px; left: -20px; top: -8px; --tape-r: -38deg; }
.tape.corner.r { left: auto; right: -20px; --tape-r: 38deg; }

figcaption { display: grid; gap: 3px; max-width: min(34ch, 82vw); }
.title { font-weight: 700; font-stretch: 110%; font-size: 17px; letter-spacing: .01em; }
.meta { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; color: var(--muted); }
.note {
  font-family: var(--hand); font-size: 22px; line-height: 1.05; color: var(--fg);
  transform: rotate(var(--note-r, -2deg)); transform-origin: left; margin-top: 6px;
}

/* free-floating annotation with a hand-drawn arrow */
.aside {
  flex: none; position: relative; width: 190px;
  font-family: var(--hand); font-size: 25px; line-height: 1.08;
  transform: rotate(-4deg);
}
.aside svg { display: block; width: 120px; height: 64px; margin-top: 8px; overflow: visible; }

/* ---------- pinned paper: poems and exhibition cards ---------- */
.poem, .card {
  flex: none; position: relative;
  background: var(--platinum); color: var(--jet);
  box-shadow: 0 20px 44px rgba(0, 0, 0, .38);
  transform: translateY(var(--y, 0)) rotate(var(--tilt, 0deg));
}
.poem .tape, .card .tape { --tape: rgba(34, 37, 38, .2); }
/* handwritten headings on paper and in the About section */
.poem h3, .card h3, .glance h3, .contact h3 { margin: 0; font-family: var(--hand); font-weight: 400; line-height: 1; }

/* ---------- poetry ---------- */
.poem {
  width: min(430px, 82vw);
  max-height: 100%;
  padding: 40px 34px 34px;
  /* faint ruled lines like a notebook leaf */
  --margin-x: 22px; --rule-h: 28px; --rule-top: 78px;
  background-image:
    linear-gradient(to right, transparent var(--margin-x), rgba(26, 26, 26, .16) var(--margin-x) calc(var(--margin-x) + 1px), transparent calc(var(--margin-x) + 1px)),
    repeating-linear-gradient(to bottom, transparent 0 calc(var(--rule-h) - 1px), rgba(26, 26, 26, .07) calc(var(--rule-h) - 1px) var(--rule-h));
  background-position: 0 0, 0 var(--rule-top);
  background-attachment: local;
  overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: rgba(26, 26, 26, .25) transparent;
}
.poem h3 { margin-bottom: 14px; font-size: 34px; }
.poem p { margin: 0; font-family: var(--mono); font-size: 13px; line-height: 28px; white-space: pre-line; }
.poem .sig { display: block; margin-top: 14px; font-family: var(--hand); font-size: 22px; text-align: right; color: var(--slate); }
.poem .margin {
  position: absolute; right: 14px; top: 12px;
  font-family: var(--hand); font-size: 19px; color: var(--slate); transform: rotate(6deg);
}

/* ---------- exhibitions ---------- */
.stack { flex: none; display: grid; gap: 40px; align-content: center; }
.card { width: min(330px, 82vw); padding: 32px 28px 26px; }
.card.wide { width: min(400px, 82vw); }
.card h3 { margin-bottom: 14px; font-size: 32px; }
.card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.card li { display: grid; gap: 3px; }
.card li b { font-weight: 700; font-stretch: 110%; font-size: 15px; line-height: 1.3; }
.card li span { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; line-height: 1.45; color: var(--slate); }

/* past exhibitions: one column per year, newest first, running along the wall */
.years { flex: none; display: flex; gap: clamp(40px, 4vw, 64px); align-items: flex-start; align-self: center; }
.year h3 {
  margin: 0 0 14px; padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
  font-weight: 900; font-stretch: 125%; font-size: clamp(40px, 7vh, 64px); line-height: .9;
}
.year ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; width: 240px; align-content: start; }
.year.wide ul { display: block; columns: 2 240px; column-gap: 32px; width: 512px; }
.year.wide li { break-inside: avoid; margin-bottom: 9px; }
.year li { position: relative; padding-left: 20px; font-size: 14px; line-height: 1.35; }
.year li::before { content: "—"; position: absolute; left: 0; top: 0; font-family: var(--mono); color: var(--muted); }
@media (max-height: 800px) { .year.wide ul { columns: 3 220px; width: 724px; } }

/* ---------- about + contact ---------- */
.about { gap: clamp(40px, 6vw, 100px); }
.glance { flex: none; display: grid; gap: 14px; width: min(400px, 82vw); align-content: center; }
.glance-part { display: grid; gap: 14px; align-content: start; }
.glance h3 { font-size: 30px; transform: rotate(-1.5deg); }
.glance .facts { gap: 9px 18px; margin: 0 0 10px; }
.glance p { margin: 0; font-size: 15px; max-width: 42ch; }

.bio { display: grid; gap: 18px; width: min(440px, 82vw); flex: none; }
.bio h2 { margin: 0; font-weight: 900; font-stretch: 125%; font-size: min(5.6vw, 10vh); line-height: .92; }
.bio p { margin: 0; max-width: 42ch; font-size: 16px; }
.bio .hand { font-family: var(--hand); font-size: 28px; line-height: 1.1; transform: rotate(-1.5deg); }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 4px 0 0; font-size: 14px; }
.facts dt { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.facts dd { margin: 0; }
.contact {
  flex: none; width: min(380px, 82vw);
  display: grid; gap: 14px;
  padding: 30px; border: 1.5px solid var(--jet);
  border-radius: 3px 14px 4px 18px / 16px 3px 14px 4px; /* a deliberately uneven, hand-cut box */
}
.contact h3 { font-size: 36px; }
.contact label { display: grid; gap: 4px; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.contact input, .contact select, .contact textarea {
  font: 400 15px/1.4 var(--display); color: var(--jet);
  background: transparent; border: 0; border-bottom: 1.5px solid rgba(26, 26, 26, .45);
  padding: 6px 0; border-radius: 0;
}
.contact textarea { resize: none; height: 70px; }
.contact input:focus, .contact select:focus, .contact textarea:focus { outline: none; border-bottom-color: var(--jet); }
.contact button {
  justify-self: start;
  font: 800 13px/1 var(--display); font-stretch: 120%; letter-spacing: .14em; text-transform: uppercase;
  color: var(--platinum); background: var(--jet); border: 0; padding: 14px 22px; cursor: pointer;
  border-radius: 2px 8px 3px 10px;
}
.contact button:hover { background: var(--onyx); }
.contact .email { font-family: var(--mono); font-size: 13px; user-select: all; }
.contact .email a { color: inherit; text-decoration: none; }
.contact .trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }   /* hidden field that only bots fill */
.contact button:disabled { opacity: .55; cursor: wait; }
.contact .sent.err { color: #8a2b2b; }
.sent { font-family: var(--hand); font-size: 24px; margin: 0; }

.fin { width: min(600px, 90vw); justify-content: center; flex-direction: column; text-align: center; gap: 50px; }
.fin .big { font-family: var(--hand); font-size: clamp(90px, 20vh, 180px); line-height: .8; transform: rotate(-4deg); }
.fin small { font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.fin .more { align-self: center; }

/* ---------- "see all" link at the end of a home-page section ---------- */
/* plain text; the same hand-drawn circle as the menu draws round it on hover */
.more {
  flex: none; position: relative; align-self: center;
  font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--fg); text-decoration: none; padding: 8px 4px; white-space: nowrap;
}
.more svg { position: absolute; left: -10%; top: -30%; width: 120%; height: 160%; overflow: visible; pointer-events: none; }
.more svg path {
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; transition: stroke-dashoffset .6s ease, opacity .2s;
}
.more:hover svg path, .more:focus-visible svg path { stroke-dashoffset: 0; opacity: 1; }
.more:focus-visible { outline: none; }
@media (prefers-reduced-motion: reduce) { .more svg path { transition: none; } }

/* ---------- gallery pages: every work, hung salon-style in two rows ---------- */
.opener .back {
  justify-self: start; display: inline-flex; flex-direction: row-reverse; align-items: center; gap: 10px;
  font-family: var(--hand); font-size: 25px; text-decoration: none; margin-top: 6px;
}
.opener .back svg { width: 64px; height: 26px; overflow: visible; }
.opener .back:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
/* the full galleries: three straight rows, every picture cropped to the same shape */
.panel.grid {
  --gap: 26px; --cap: 46px; --vh: 100vh;
  --h: max(96px, calc((var(--vh) - var(--head-h) - var(--foot-h) - 48px - 2 * var(--gap)) / 3 - var(--cap)));
  display: grid; grid-auto-flow: column; grid-template-rows: repeat(3, auto);
  align-content: center; gap: var(--gap) clamp(26px, 2.6vw, 40px);
}
.grid .work { --tilt: 0deg; --y: 0; gap: 8px; }
.grid .media { aspect-ratio: 3 / 2; }
@supports (height: 100dvh) { .panel.grid { --vh: 100dvh; } }   /* the visible height, minus phone browser bars */
.grid .print .media { padding: 8px; }
.grid figcaption { gap: 1px; max-width: calc(var(--h) * 1.5); }
.grid .title { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grid .meta { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grid .note { display: none; }   /* the handwritten note shows when the picture is opened */
.poetry-page .panel { --bg: #1E2122; }
/* poetry gallery: each poem a small notebook page showing its first lines, same size as the photo cells */
.poems-grid .poem {
  --tilt: 0deg; --y: 0;
  width: calc(var(--h) * 1.5 + 16px); height: calc(var(--h) + var(--cap) + 4px); max-height: none;
  padding: 16px 18px 12px 30px;
  display: grid; grid-template-rows: auto 1fr auto; gap: 4px;
  overflow: hidden; cursor: zoom-in;
  --margin-x: 20px; --rule-h: 22px; --rule-top: 44px;
  transition: transform .5s cubic-bezier(.2, .7, .2, 1), box-shadow .5s ease;
}
.poems-grid .poem:hover, .poems-grid .poem:focus-visible { transform: scale(1.04); box-shadow: 0 26px 54px rgba(0, 0, 0, .5); z-index: 61; }
.poems-grid .poem h3 { margin: 0; font-size: clamp(18px, calc(var(--h) * .13), 26px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.poems-grid .poem p {
  font-size: 11px; line-height: 22px; overflow: hidden; min-height: 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent); mask-image: linear-gradient(to bottom, #000 55%, transparent);
}
.poems-grid .poem .sig { margin: 0; font-size: 17px; }
.poems-grid .poem .margin { display: none; }

/* an opened poem: a full notebook page to read */
.lb-stage .poem.reading {
  --tilt: 0deg; --y: 0;
  width: min(580px, 92vw); max-height: 100%;
  padding: 44px 40px 36px 52px;
  overflow-y: auto; cursor: auto;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
  --margin-x: 30px; --rule-top: 98px;   /* 44px padding + 40px title + 14px gap: rules sit under each line */
}
.lb-stage .poem.reading h3 { font-size: 40px; }
.lb-stage .poem.reading p { font-size: 14px; line-height: 28px; }
.more-links { display: grid; gap: 14px; justify-items: center; }

/* phones and short windows: two rows, so the pictures stay a useful size */
@media (max-width: 760px), (max-height: 640px) {
  .panel.grid { grid-template-rows: repeat(2, auto); --h: max(96px, calc((var(--vh) - var(--head-h) - var(--foot-h) - 48px - var(--gap)) / 2 - var(--cap))); }
}

/* ---------- click a work to see it larger ---------- */
.track .work .media { cursor: zoom-in; }
.track.dragging .work .media { cursor: grabbing; }
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: grid; grid-template-rows: minmax(0, 1fr) auto; justify-items: center; gap: 18px;
  padding: calc(56px + env(safe-area-inset-top, 0px)) clamp(56px, 7vw, 110px) calc(26px + env(safe-area-inset-bottom, 0px));
  background: rgba(20, 22, 23, .97); color: var(--platinum);
}
.lightbox[hidden] { display: none; }
.lb-stage { width: 100%; height: 100%; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.lb-stage img, .lb-stage canvas {
  display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; min-width: 0; min-height: 0; object-fit: contain;
  background: var(--platinum); padding: 10px; box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
}
.lightbox figcaption { justify-items: center; text-align: center; max-width: min(60ch, 90vw); }
.lightbox .meta { color: var(--ash); }
.lightbox .note { color: var(--platinum); transform: rotate(-1.5deg); transform-origin: center; }
.lb-count { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; color: var(--ash); }
.lb-btn {
  position: absolute; z-index: 2;
  background: none; border: 0; color: inherit; cursor: pointer;
  font-family: var(--hand); font-size: 34px; line-height: 1; padding: 12px 14px;
  opacity: .75; transition: opacity .2s;
}
.lb-btn:hover { opacity: 1; }
.lb-close { top: calc(10px + env(safe-area-inset-top, 0px)); right: 14px; }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); }
@media (max-width: 760px) { .lightbox { padding-inline: 14px; padding-bottom: 70px; } .lb-prev, .lb-next { top: auto; bottom: 14px; transform: none; } }

/* entrance: decorations draw themselves in; content is visible from the start */
@keyframes draw { from { stroke-dashoffset: var(--len, 400); } to { stroke-dashoffset: 0; } }
.draw path { stroke-dasharray: var(--len, 400); animation: draw 1.4s .4s cubic-bezier(.6, .1, .2, 1) both; }

@media (prefers-reduced-motion: reduce) {
  .draw path { animation: none; }
  .work, .nav a svg path { transition: none; }
}

/* ---------- small screens ---------- */
@media (max-width: 760px) {
  :root { --head-h: 92px; --foot-h: 56px; }
  .site-head { flex-wrap: wrap; align-content: center; row-gap: 8px; }
  .head-note { display: none; }
  .site-head > nav { order: 3; width: 100%; }
  .nav { gap: 14px; width: 100%; justify-content: space-between; }
  .nav a { font-size: 10px; letter-spacing: .1em; }
  .hint { display: none; }
  .site-foot { grid-template-columns: auto 1fr; }
  /* phones: the name first, then the photo and index beside it, along the wall like everything else */
  .hero { width: auto; display: flex; flex-direction: row; align-items: center; gap: 56px; }
  .hero .wordmark { flex: none; }
  .hero-side { flex: none; width: min(330px, 82vw); gap: 16px; }
  .hero-side .scroll-cue { font-size: 21px; }
  .hero-side .scroll-cue svg { width: 70px; height: 30px; }
  .wordmark { font-size: min(12.4vw, 11vh); }
  .hero-kicker { display: none; }
  .hero .media { --h: min(22vh, 220px) !important; }
  .index { gap: 0; }
  .index b { font-size: 17px; }
  .panel { padding-inline: 28px; gap: 44px; }
  /* leave clear space between the vertical section label and the text beside it */
  .roman { left: 14px; }
  .panel:has(> .roman) { padding-left: 60px; }
  /* About: the facts and the recognition text sit side by side instead of one tall column */
  .glance { display: flex; gap: 44px; width: auto; align-items: center; }
  .glance-part { flex: none; width: min(330px, 74vw); }
  /* any block still taller than the screen scrolls inside its own space instead of running under the menu */
  .hero-side, .bio, .glance-part, .contact, .opener, .stack, .year {
    max-height: 100%; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none;
  }
  .hero-side::-webkit-scrollbar, .bio::-webkit-scrollbar, .glance-part::-webkit-scrollbar, .contact::-webkit-scrollbar,
  .opener::-webkit-scrollbar, .stack::-webkit-scrollbar, .year::-webkit-scrollbar { display: none; }
  /* room inside the scroll area for tape strips and tilted handwriting, so nothing is clipped */
  .hero-side, .stack { padding: 20px 14px; margin: -20px -14px; }
  .opener, .bio, .glance-part { padding: 8px 10px; margin: -8px -10px; }
  .glance, .stack, .years { max-height: 100%; align-self: center; }
  .media { --h: clamp(200px, 44vh, 420px); }
  .opener h2 { font-size: min(13vw, 10vh); }
}

