/* preview 04.11 (_about-first.html): About first in the deck, CV in place of the i.
   v4: three compositions of one markup by ?v=  a Tiles · b Margin · c Portrait.  v5 adds d Card (by Dan's reference).
   v6: Dan kept only A; three variations of it, a1 Open · a2 Ruled · a3 Baseline (b–d still open by URL).
   v7: e Statement and e2 (without p2–p3) by Dan's second reference.
   The About card spans the window; .ab-slot marks where the first project waits while About is in front
   (_about-first.js syncSlot flies it there). Earlier: _about-first.v1/v2/v3.* */

/* CV: the i's yellow, as a pill with a word */
.cv-btn { background: var(--accent); color: var(--ink); transition: background-color .15s ease, scale .15s ease-out; -webkit-tap-highlight-color: transparent; }
@media (hover: hover) { .cv-btn:hover { background: #f0b21f; color: var(--ink); } }
.cv-btn:focus-visible { outline: none; box-shadow: var(--focus); }
.cv-btn:active { scale: .96; }

/* preview switch */
.v-switch { position: fixed; z-index: 70; top: calc(var(--edge) + env(safe-area-inset-top, 0px)); right: var(--edge); display: flex; gap: 4px; }
.v-switch a { display: inline-flex; align-items: center; height: var(--pill-h); padding: 0 12px; border-radius: var(--r); background: var(--pill-light); color: var(--ink); font-size: var(--fs-small); text-decoration: none; white-space: pre; }
html[data-v="a"] .v-switch a[href="?v=a"], html[data-v="a1"] .v-switch a[href="?v=a1"], html[data-v="a2"] .v-switch a[href="?v=a2"], html[data-v="a3"] .v-switch a[href="?v=a3"],
html[data-v="e"] .v-switch a[href="?v=e"], html[data-v="e2"] .v-switch a[href="?v=e2"] { background: var(--pill-dark); color: #fff; }
@media (max-width: 1100px) { .v-switch a span { display: none; } }   /* letters only where the names would run into the header */
@media (max-width: 640px) {   /* phone: six small pills still clear the CV */
  .v-switch { gap: 2px; top: calc(var(--edge) + 4px + env(safe-area-inset-top, 0px)); }
  .v-switch a { height: 28px; padding: 0 6px; font-size: 12px; }
}

/* ---------- the About card: the whole window, no box of its own ---------- */
.deck .cover-about {
  --cw: min(960px, 100vw - 32px, (100svh - 248px) * 1.5);   /* = a cover's width: the column the deck stands in */
  --top: calc(var(--edge) + var(--pill-h) + 24px);          /* first line under the header */
  --foot: calc(var(--edge) + 40px + 24px);                  /* clear of Works / Other */
  --h: 100svh;                                              /* its own moves (before / after) go a full window */
  left: 0; top: 0; width: 100%; height: 100%; margin: 0;
  background: transparent; border-radius: 0; overflow: visible; cursor: default;
}
.cover-about:focus-visible { box-shadow: none; }
.cover-about[data-pos="next"] { transform: translateY(70svh) scale(.74); }   /* after the last project: its top peeks, blurred */
.ab { color: var(--ink); }
.ab p { margin: 0; text-wrap: wrap; }   /* greedy, as the rest of the prose (TYPOGRAPHY.md) */
.ab-slot { --ax: .5; --ay: 0; }
.ab-meta { display: none; }   /* only D shows it */

/* the photo: a tile like the case's; a missing file leaves the plain tile */
.ab-photo { position: relative; margin: 0; overflow: hidden; border-radius: var(--r); background: #e8e8e8; }
.ab-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; display: block; }
.ab-photo.is-empty img { visibility: hidden; }

/* while About is in front, the first project waits in the slot: sharp, with its name */
.deck.about-front .cover[data-pos="next"] { transform: translate(var(--pk-tx, 0px), var(--pk-ty, 0px)) scale(var(--pk-s, .74)); filter: none; opacity: 1; }
.deck.about-front .cover[data-pos="next"] .pill { opacity: 1; }
.deck.about-front.pk-clip .cover[data-pos="next"] .pill { bottom: auto; top: 8px; }   /* its foot is below the fold */
@media (hover: hover) { .deck.about-front .cover[data-pos="next"]:hover .pill { background: #fff; } }
/* the pills change edge out of sight: hidden for the first half of the step either way */
.deck.pk-clip:not(.about-front) .cover-about + .cover[data-pos="current"] .pill { animation: pill-a .55s ease both; }
.deck.pk-clip.about-front .cover-about + .cover[data-pos="next"] .pill { animation: pill-b .55s ease both; }
@keyframes pill-a { 0%, 55% { opacity: 0; } }
@keyframes pill-b { 0%, 55% { opacity: 0; } }

/* ================= A · Tiles =================
   Dan introduced in the same system as the work: a row of two tiles, the portrait 3:4 and a grey text
   card (the case grid's text card), and under them, 8 px down, the first project as the next tile. */
html[data-v="a"] .ab {
  --rh: clamp(290px, 42svh, 420px);
  position: absolute; left: calc(50% - var(--cw) / 2); top: var(--top); width: var(--cw);
  display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: var(--rh) auto; gap: 8px;
}
html[data-v="a"] .ab-photo { grid-area: 1 / 1; height: var(--rh); aspect-ratio: 3 / 4; }
html[data-v="a"] .ab-text {
  grid-area: 1 / 2; min-width: 0;
  display: flex; flex-direction: column; justify-content: space-between; gap: 24px;
  padding: 24px 28px 28px; border-radius: var(--r); background: rgba(0, 0, 0, .04);
}
html[data-v="a"] .ab-p1 { font-size: clamp(1.125rem, 3.3svh, 1.875rem); line-height: 1.15; letter-spacing: -.01em; max-width: 20em; text-wrap: balance; }
html[data-v="a"] .ab-more { font-size: var(--fs-body); line-height: 1.55; max-width: 34em; }
html[data-v="a"] .ab-more p + p { margin-top: .6em; }
html[data-v="a"] .ab-slot { grid-area: 2 / 1 / 3 / 3; aspect-ratio: 3 / 2; }
@media (max-width: 640px) {
  html[data-v="a"] .ab { --top: calc(var(--edge) + var(--pill-h) + 16px); grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  html[data-v="a"] .ab-photo { height: auto; width: 100%; }
  html[data-v="a"] .ab-text { display: contents; }
  html[data-v="a"] .ab-p1, html[data-v="a"] .ab-more { border-radius: var(--r); background: rgba(0, 0, 0, .04); padding: 12px 14px 14px; }
  html[data-v="a"] .ab-p1 { grid-area: 1 / 2; font-size: var(--fs-body); line-height: 1.4; }
  html[data-v="a"] .ab-more { grid-area: 2 / 1 / 3 / 3; font-size: var(--fs-small); line-height: 1.5; }
  html[data-v="a"] .ab-slot { grid-area: 3 / 1 / 4 / 3; }
}

/* ================= v6 · three variations of A =================
   Dan kept only A. Same frame (the portrait on the left, the text on its right, the first project under
   both), three ways of setting the text beside the portrait, all straight on the page ground:
   A1 Open      p1 hangs from the portrait's top edge, p2 and p3 two columns standing on its foot
   A2 Ruled     hairlines at the portrait's top and at its thirds; one paragraph hung from each
   A3 Baseline  a smaller portrait; p1 large and p2–p3 small in a narrow column, all on its foot, so the
                project gets more of the window */
html:is([data-v="a1"], [data-v="a2"], [data-v="a3"]) .ab {
  --rh: clamp(290px, 42svh, 420px);
  position: absolute; left: calc(50% - var(--cw) / 2); top: var(--top); width: var(--cw);
  display: grid; grid-template-columns: calc(var(--rh) * .75) minmax(0, 1fr); grid-template-rows: minmax(var(--rh), auto) auto;
  column-gap: 32px; row-gap: 24px;   /* 8 px as A had left the descenders on the project's edge */
}
html:is([data-v="a1"], [data-v="a2"], [data-v="a3"]) .ab-photo { grid-area: 1 / 1; }
html:is([data-v="a1"], [data-v="a2"], [data-v="a3"]) .ab-text { grid-area: 1 / 2; min-width: 0; }
html:is([data-v="a1"], [data-v="a2"], [data-v="a3"]) .ab-slot { grid-area: 2 / 1 / 3 / 3; aspect-ratio: 3 / 2; }
html:is([data-v="a1"], [data-v="a2"], [data-v="a3"]) .ab-p1 { font-size: clamp(1.125rem, 3.3svh, 1.875rem); line-height: 1.15; letter-spacing: -.01em; max-width: 20em; text-wrap: balance; }
html:is([data-v="a1"], [data-v="a2"], [data-v="a3"]) .ab-more { font-size: var(--fs-body); line-height: 1.55; }
html:is([data-v="a1"], [data-v="a2"], [data-v="a3"]) .ab-more p + p { margin-top: 1.1em; }   /* trimmed lines: the gap is all margin */
/* the first cap line sits on the portrait's top edge, the last baseline on its foot */
@supports (text-box: trim-both cap alphabetic) {
  html:is([data-v="a1"], [data-v="a2"], [data-v="a3"]) .ab-text p { text-box: trim-both cap alphabetic; }
}

/* ---------- A1 · Open: no card. p1 from the top edge, p2 | p3 two columns on the foot, air between ---------- */
html[data-v="a1"] .ab-text { display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
html[data-v="a1"] .ab-more { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; align-items: end; max-width: 46em; }
@media (max-width: 640px) {   /* phone: p1 beside the portrait from its top edge, p2 | p3 under both, the project */
  html[data-v="a1"] .ab { --top: calc(var(--edge) + var(--pill-h) + 16px); grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto auto; column-gap: 16px; row-gap: 20px; }
  html[data-v="a1"] .ab-photo { aspect-ratio: 3 / 4; }
  html[data-v="a1"] .ab-text { display: contents; }
  html[data-v="a1"] .ab-p1 { grid-area: 1 / 2; font-size: 1.125rem; line-height: 1.25; letter-spacing: 0; text-wrap: wrap; }   /* balance left "I’m Dan," alone */
  html[data-v="a1"] .ab-more { grid-area: 2 / 1 / 3 / 3; column-gap: 16px; align-items: start; font-size: var(--fs-small); line-height: 1.5; }
  html[data-v="a1"] .ab-more p + p { margin-top: 0; }
  html[data-v="a1"] .ab-slot { grid-area: 3 / 1 / 4 / 3; }
}

/* ---------- A2 · Ruled: the right side ruled in three equal bands from the portrait's top to its foot;
   each paragraph hangs from its own hairline ---------- */
html[data-v="a2"] .ab-text { display: grid; grid-template-rows: repeat(3, minmax(0, 1fr)); }
html[data-v="a2"] .ab-more { display: contents; }
html[data-v="a2"] .ab-more p + p { margin-top: 0; }   /* the bands set the rhythm */
html[data-v="a2"] .ab-text p { border-top: 1px solid var(--ink); padding-top: 14px; max-width: none; }
html[data-v="a2"] .ab-p1 { font-size: clamp(1.125rem, 2.5svh, 1.375rem); line-height: 1.25; letter-spacing: 0; }
html[data-v="a2"] .ab-p2, html[data-v="a2"] .ab-p3 { font-size: var(--fs-body); line-height: 1.55; }
@media (max-width: 640px) {   /* phone: p1 on the first hairline beside the portrait, p2 and p3 on theirs across */
  html[data-v="a2"] .ab { --top: calc(var(--edge) + var(--pill-h) + 16px); grid-template-columns: minmax(0, 9fr) minmax(0, 11fr); grid-template-rows: auto auto auto auto; column-gap: 16px; row-gap: 12px; }
  html[data-v="a2"] .ab-photo { aspect-ratio: 3 / 4; }
  html[data-v="a2"] .ab-text { display: contents; }
  html[data-v="a2"] .ab-text p { padding-top: 10px; }
  html[data-v="a2"] .ab-p1 { grid-area: 1 / 2; font-size: var(--fs-body); line-height: 1.4; }
  html[data-v="a2"] .ab-p2, html[data-v="a2"] .ab-p3 { font-size: var(--fs-small); line-height: 1.5; }
  html[data-v="a2"] .ab-text .ab-p2 { grid-area: 2 / 1 / 3 / 3; margin-top: 8px; }
  html[data-v="a2"] .ab-text .ab-p3 { grid-area: 3 / 1 / 4 / 3; margin: 0 0 8px; }
  html[data-v="a2"] .ab-slot { grid-area: 4 / 1 / 5 / 3; }
}

/* ---------- A3 · Baseline: the portrait smaller; p1 large and p2–p3 small in a narrow column, the tops
   ragged, every last line on the portrait's foot. The project gets the window's lower two thirds ---------- */
html[data-v="a3"] .ab { --rh: clamp(200px, 27svh, 280px); column-gap: 24px; }
html[data-v="a3"] .ab-text { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); column-gap: 24px; align-items: end; }
html[data-v="a3"] .ab-more { font-size: var(--fs-small); line-height: 1.5; }
html[data-v="a3"] .ab-more p + p { margin-top: 1.4em; }
@media (max-width: 640px) {   /* phone: p1 beside the small portrait on its foot, p2–p3 small in p1's column under it, the project */
  html[data-v="a3"] .ab { --top: calc(var(--edge) + var(--pill-h) + 16px); grid-template-columns: minmax(0, 3fr) minmax(0, 7fr); grid-template-rows: auto auto auto; column-gap: 16px; row-gap: 20px; }
  html[data-v="a3"] .ab-photo { aspect-ratio: 3 / 4; }
  html[data-v="a3"] .ab-text { display: contents; }
  html[data-v="a3"] .ab-p1 { grid-area: 1 / 2; align-self: end; font-size: 1.125rem; line-height: 1.25; letter-spacing: 0; }
  html[data-v="a3"] .ab-more { grid-area: 2 / 2; }
  html[data-v="a3"] .ab-slot { grid-area: 3 / 1 / 4 / 3; }
}

/* ================= E · Statement (v7, by Dan's reference) =================
   The structure of the reference, in this site's type and colours: a lot of air, a small 3:4 portrait,
   under it p1 as one big left-aligned statement in the same column (a little left of centre), more air,
   and the first project as a wide cover already coming in at the window's foot, sharp and named.
   E sets p2–p3 small and quiet beside the portrait, on its foot; E2 leaves them off the first screen
   (they stay in the CV). Grid: edge | air 1fr | portrait | rest of the column | air 1.2fr | edge;
   rows: header | air | portrait | statement | air | the project's peek. */
html:is([data-v="e"], [data-v="e2"]) .ab {
  --ew: min(100vw - 2 * var(--edge), max(46vw, 600px));          /* the column */
  --pw: clamp(96px, 16svh, 170px);                                /* the portrait */
  --peek: clamp(150px, 22svh, 280px);                             /* how much of the project is in view */
  position: absolute; inset: 0;
  display: grid;
  grid-template-columns: var(--edge) minmax(0, 1fr) var(--pw) calc(var(--ew) - var(--pw)) minmax(0, 1.2fr) var(--edge);
  grid-template-rows: var(--top) minmax(0, 1fr) auto auto minmax(0, 1fr) var(--peek);
}
html:is([data-v="e"], [data-v="e2"]) .ab-photo { grid-area: 3 / 3; aspect-ratio: 3 / 4; }
html:is([data-v="e"], [data-v="e2"]) .ab-text { display: contents; }
html:is([data-v="e"], [data-v="e2"]) .ab-p1 {
  grid-area: 4 / 3 / 5 / 5; margin-top: clamp(24px, 4.5svh, 48px);
  font-size: min(var(--ew) / 12, 5.2svh, 3.5rem); line-height: 1.08; letter-spacing: -.02em; color: var(--ink); text-wrap: balance;
}
html:is([data-v="e"], [data-v="e2"]) .ab-more {
  grid-area: 3 / 4; align-self: end; padding-left: 24px; max-width: 34em;
  font-size: var(--fs-small); line-height: 1.5; color: var(--muted);
}
html:is([data-v="e"], [data-v="e2"]) .ab-more p + p { margin-top: .6em; }
@supports (text-box: trim-both cap alphabetic) {   /* the quiet text's last baseline on the portrait's foot */
  html:is([data-v="e"], [data-v="e2"]) .ab-more p { text-box: trim-both cap alphabetic; }
  html:is([data-v="e"], [data-v="e2"]) .ab-more p + p { margin-top: 1.1em; }
}
html[data-v="e2"] .ab-more { display: none; }
html:is([data-v="e"], [data-v="e2"]) .ab-slot { grid-area: 6 / 2 / 7 / 6; align-self: start; justify-self: center; width: 100%; aspect-ratio: 3 / 2; max-width: 1600px; }   /* v8c: centred once it hits 1600 px (it stuck to the left on wide windows) */
/* the project comes in wider than a deck cover: its name and year keep their own size */
html:is([data-v="e"], [data-v="e2"]) .deck.about-front .cover[data-pos="next"] .pill { scale: calc(1 / var(--pk-s, 1)); transform-origin: 0 0; }
html:is([data-v="e"], [data-v="e2"]) .deck.about-front .cover[data-pos="next"] .cover-year { transform-origin: 100% 0; }
@media (max-width: 640px) {   /* phone: the column is the screen; portrait, statement, the quiet text under it, the project at the foot */
  html:is([data-v="e"], [data-v="e2"]) .ab {
    --pw: clamp(80px, 12svh, 112px); --peek: clamp(150px, 22svh, 220px);
    --top: calc(var(--edge) + var(--pill-h) + 16px);
    grid-template-rows: var(--top) minmax(0, 1fr) auto auto auto minmax(0, 1fr) var(--peek);
  }
  html:is([data-v="e"], [data-v="e2"]) .ab-p1 { margin-top: 24px; font-size: min(var(--ew) / 11.5, 4.6svh, 2.25rem); line-height: 1.1; }
  html:is([data-v="e"], [data-v="e2"]) .ab-more { grid-area: 5 / 3 / 6 / 5; align-self: start; padding-left: 0; margin-top: 20px; }
  html:is([data-v="e"], [data-v="e2"]) .ab-slot { grid-area: 7 / 2 / 8 / 6; }
}

/* ================= B · Margin =================
   No photo. A book spread: the first project stands at full size on the right, About is its margin
   column on the left, the first sentences hung from the cover's top edge, the rest standing on its foot. */
html[data-v="b"] .ab-photo { display: none; }
html[data-v="b"] .ab {
  position: absolute; inset: 0 var(--edge) 0 calc(var(--edge) + 12px);   /* text on the name's first letter */
  display: grid; grid-template-columns: minmax(300px, 1fr) minmax(0, calc(var(--cw))); column-gap: 48px; align-content: center;
}
html[data-v="b"] .ab-text { display: flex; flex-direction: column; justify-content: space-between; gap: 32px; min-width: 0; }
html[data-v="b"] .ab-p1 { font-size: clamp(1.75rem, 1rem + 1.25vw, 2.25rem); line-height: 1.1; letter-spacing: -.01em; max-width: 13em; text-wrap: balance; }
html[data-v="b"] .ab-more { font-size: var(--fs-body); line-height: 1.55; max-width: 28em; }
html[data-v="b"] .ab-more p + p { margin-top: .6em; }
html[data-v="b"] .ab-slot { aspect-ratio: 3 / 2; --ax: 1; }
@media (max-width: 960px) {   /* not room for both side by side: the text over the figure, as on a page */
  html[data-v="b"] .ab { inset: var(--top) var(--edge) var(--foot); display: flex; flex-direction: column; }
  html[data-v="b"] .ab-text { display: block; }
  html[data-v="b"] .ab-more { max-width: 34em; }
  html[data-v="b"] .ab-p1 { font-size: clamp(1.5rem, 1rem + 2vw, 2.25rem); max-width: 16em; }
  html[data-v="b"] .ab-more { margin-top: 20px; }
  html[data-v="b"] .ab-slot { flex: none; margin-top: auto; }   /* stands on the foot, as in the spread */
}
@media (max-width: 640px) {   /* phone: the sentences hang from the top, the project stands on the foot, as the spread does */
  html[data-v="b"] .ab { inset: calc(var(--top) + 8px) var(--edge) var(--foot); }
  html[data-v="b"] .ab-p1 { font-size: 1.75rem; }
  html[data-v="b"] .ab-more { margin-top: 16px; }
}

/* ================= C · Portrait =================
   The portrait as tall as the screen allows, hung under the name pill, so the header's name labels it.
   Beside it the three paragraphs as three equal columns under hairlines, and the first project standing
   at the foot, as wide as the columns. The right column's width comes from the height (a 3:2 cover under
   --tr of text), the portrait takes the rest (between 3:5 and nearly square); a short window that can't
   fill the width leaves its spare room as a plain right margin. */
html[data-v="c"] .ab {
  --ph: calc(100svh - var(--top) - var(--foot));
  --tr: 180px;
  --rw: calc((var(--ph) - var(--tr)) * 1.5);
  --pw: clamp(var(--ph) * .6, 100vw - 2 * var(--edge) - 24px - var(--rw), var(--ph) * .95);
  position: absolute; inset: var(--top) var(--edge) var(--foot);
  display: grid; grid-template-columns: var(--pw) minmax(0, var(--rw)); grid-template-rows: auto minmax(0, 1fr);
  column-gap: 24px; row-gap: 32px;
}
html[data-v="c"] .ab-photo { grid-area: 1 / 1 / 3 / 2; }
html[data-v="c"] .ab-text { grid-area: 1 / 2; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 24px; row-gap: 20px; font-size: var(--fs-body); line-height: 1.55; }
html[data-v="c"] .ab-more { display: contents; }
html[data-v="c"] .ab-text p { padding-top: 12px; border-top: 1px solid var(--ink); }
html[data-v="c"] .ab-slot { grid-area: 2 / 2; --ax: 0; --ay: 1; }
@media (min-width: 961px) and (max-height: 820px) {   /* short window: no room for both under the text, so the portrait
                                                         and the project run on past the fold, the portrait 3:4 */
  html[data-v="c"] .ab { --ph: calc(100svh - var(--top) + 8px); bottom: auto; grid-template-columns: calc(var(--ph) * .75) minmax(0, 1fr); grid-template-rows: auto auto; }
  html[data-v="c"] .ab-photo { height: var(--ph); }
  html[data-v="c"] .ab-slot { aspect-ratio: 3 / 2; --ay: 0; }
}
@media (max-width: 960px) {   /* tablet: the portrait beside the text, the project under both */
  html[data-v="c"] .ab { inset: var(--top) var(--edge) auto; grid-template-columns: minmax(0, 9fr) minmax(0, 11fr); grid-template-rows: auto auto; row-gap: 28px; }
  html[data-v="c"] .ab-photo { grid-area: 1 / 1; aspect-ratio: 3 / 4; }
  html[data-v="c"] .ab-text { grid-template-columns: minmax(0, 1fr); align-content: start; }
  html[data-v="c"] .ab-text .ab-p1 { font-size: 1.5rem; line-height: 1.2; border-top: 0; padding-top: 0; text-wrap: balance; }
  html[data-v="c"] .ab-slot { grid-area: 2 / 1 / 3 / 3; aspect-ratio: 3 / 2; --ay: 0; }
}
@media (max-width: 640px) {   /* phone: the portrait runs the full width under the header, the rest follows */
  html[data-v="c"] .ab { inset: 0; display: block; }
  html[data-v="c"] .ab-photo { aspect-ratio: auto; height: clamp(200px, 30svh, 480px); border-radius: 0; }
  html[data-v="c"] .ab-photo img { object-position: 50% 35%; }
  html[data-v="c"] .ab-text { margin: 20px var(--edge) 0; grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 16px; }
  html[data-v="c"] .ab-text .ab-p1 { grid-column: 1 / -1; font-size: clamp(1.25rem, 1rem + 1vw, 1.5rem); line-height: 1.25; }
  html[data-v="c"] .ab-slot { margin: 24px var(--edge) 0; }
}

/* ================= D · Card =================
   By Dan's reference (04.11): About is itself a card of the deck, the size of a cover (3:2, a little taller
   only if the text needs it), in the grey of the case grid's text card. A small 3:4 portrait in its top-left corner, air in the middle,
   the three paragraphs as one calm block on its bottom-left. The card hangs under the header rather than
   in the window's centre, so more of the next cover shows; the first project waits under it as the
   ordinary next cover (74 %), sharp and named: .ab-slot is that place, syncSlot flies it there. */
html[data-v="d"] .deck .cover-about {
  --h: calc(var(--w) / 1.5);
  --top: calc(var(--edge) + var(--pill-h) + 24px);
  --pad: clamp(16px, var(--w) * .026, 24px);
  --gap: 24px;                                            /* card to the next cover */
  --cy: 50svh;                                            /* where the deck's covers stand */
  --H: var(--h);
  left: 50%; top: var(--top); width: var(--w); height: auto; min-height: var(--H);
  margin: 0 0 0 calc(var(--w) / -2);
  display: flex; flex-direction: column;
  background: var(--t-card, rgba(0, 0, 0, .04)); border-radius: var(--r);   /* the case grid's text card: #fff on #fafafa hardly showed */
}
html[data-v="d"] .ab {
  position: relative; flex: 1 0 auto;
  display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto minmax(40px, 1fr) auto;
  padding: var(--pad);
}
html[data-v="d"] .ab-photo { grid-area: 1 / 1; width: calc(var(--h) * .27); aspect-ratio: 3 / 4; border-radius: 4px; }
html[data-v="d"] .ab-meta {
  display: block; grid-area: 1 / 2; justify-self: end; margin: 0;
  font-size: var(--fs-small); line-height: 1; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap;
}
html[data-v="d"] .ab-text { grid-area: 3 / 1 / 4 / 3; max-width: 34em; font-size: clamp(15px, var(--w) * .019, 18px); line-height: 1.45; }
html[data-v="d"] .ab-more, html[data-v="d"] .ab-more p + p { margin-top: .6em; }
html[data-v="d"] .ab-slot { position: absolute; left: 13%; width: 74%; top: calc(100% + var(--gap)); aspect-ratio: 3 / 2; --ax: .5; --ay: 0; }
/* after the last project About peeks as any next cover would, under the centred one */
html[data-v="d"] .cover-about[data-pos="next"] {
  transform: translateY(calc(var(--cy) - var(--top) - var(--H) / 2 + var(--h) / 2 + var(--peek-gap) + var(--H) * var(--peek-s) / 2)) scale(var(--peek-s));
}
@media (max-width: 640px) {   /* phone: the card as tall as the window leaves above the next cover, as in the reference */
  html[data-v="d"] .deck .cover-about {
    --top: calc(var(--edge) + var(--pill-h) + 16px);
    --gap: 16px; --cy: 44svh;
    --H: max(var(--w) * 1.1, 100svh - var(--top) - var(--gap) - var(--w) * var(--peek-s) / 1.5 - var(--foot));
  }
  html[data-v="d"] .ab-photo { width: calc(var(--w) * .3); }
}

/* ---------- entry: each part out of a 4 px blur, the project last ---------- */
@media (prefers-reduced-motion: no-preference) {
  .ab-photo, .ab-p1, .ab-p2, .ab-p3, .ab-meta { animation: ab-in .6s var(--ease-out) both; }
  .ab-meta { animation-delay: .3s; }
  html[data-v="d"] .cover-about { animation: ab-card .6s var(--ease-out) backwards; }   /* the card first, its parts after */
  html[data-v="d"] .ab-photo { animation-delay: .1s; }
  html[data-v="d"] .ab-p1 { animation-delay: .18s; }
  html[data-v="d"] .ab-p2 { animation-delay: .24s; }
  html[data-v="d"] .ab-p3 { animation-delay: .3s; }
  html[data-v="d"] .ab-meta { animation-delay: .36s; }
  html[data-v="d"] .cover-about + .cover { animation-delay: .4s; }
  .ab-photo img { animation: ab-img 1.1s var(--ease-out) both; }
  .ab-p1 { animation-delay: .08s; }
  .ab-p2 { animation-delay: .16s; }
  .ab-p3 { animation-delay: .22s; }
  .cover-about + .cover { animation: ab-peek .6s var(--ease-out) .32s backwards; }
}
@keyframes ab-in { from { opacity: 0; filter: blur(4px); translate: 0 8px; } }
@keyframes ab-img { from { scale: 1.04; } }
@keyframes ab-peek { from { opacity: 0; filter: blur(4px); } }
@keyframes ab-card { from { opacity: 0; filter: blur(4px); } }

/* ---------- v8 (04.11): E2 carries Dan's new, longer statement; the other variants keep paragraph 1 ---------- */
.p1-e2 { display: none; }
html[data-v="e2"] .p1-a { display: none; }
html[data-v="e2"] .p1-e2 { display: inline; }
html[data-v="e2"] .ab { --ew: min(100vw - 2 * var(--edge), max(56vw, 600px)); }   /* a wider column for the longer text */
html[data-v="e2"] .ab-p1 { font-size: min(var(--ew) / 19, 4.6svh, 2.75rem); }
@media (max-width: 640px) { html[data-v="e2"] .ab-p1 { font-size: min(var(--ew) / 13, 3.6svh, 1.75rem); } }

/* ---------- v8b (04.11): bigger covers, they grow with the window ----------
   home.css: --w = min(960px, 100vw − 32px, (100svh − 248px) × 1.5), so on a laptop the cover was ~600–700 px wide.
   Here the 960 px cap goes up to 1600 and the height keeps 200 px for the header, the peek and Works/Other. */
.cover { --w: min(1600px, 100vw - 32px, (100svh - 200px) * 1.5); }
@media (max-height: 520px) { .cover { --w: min(960px, 100vw - 32px, (100svh - 150px) * 1.5); } }

/* v9 (04.11): the portrait + statement sit in the middle of the screen.
   The side tracks are equal now, and the block moves right by half of the room its ragged lines leave
   in the column (--tw-shift, measured in _about-final.js), so the visible text is centred, not the box.
   position:left moves it without rewrapping and without touching the entry animation's translate. */
html[data-v="e2"] .ab { grid-template-columns: var(--edge) minmax(0, 1fr) var(--pw) calc(var(--ew) - var(--pw)) minmax(0, 1fr) var(--edge); }
html[data-v="e2"] :is(.ab-photo, .ab-p1) { position: relative; left: var(--tw-shift, 0px); }

/* v11 preview (?photo=round): the portrait as a 1:1 circle, head and shoulders (media/about/dan-round.jpg) */
html[data-photo="round"] .ab-photo { aspect-ratio: 1; border-radius: 50%; }

/* v12 (04.11): Dan’s own statement links Toman Design; the underline grows with the big type */
.ab-p1 a { color: inherit; text-decoration: underline; text-decoration-thickness: max(1px, .045em); text-underline-offset: .14em; transition: color .15s ease; }
@media (hover: hover) { .ab-p1 a:hover { color: var(--muted); } }
.ab-p1 a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 2px; }
/* v12b: the longer statement sets smaller, so the project below keeps its air (≥ ~48 px at 1280×720 … 360×640) */
html[data-v="e2"] .ab-p1 { font-size: min(var(--ew) / 21, 4svh, 2.5rem); }
@media (max-width: 640px) { html[data-v="e2"] .ab-p1 { font-size: min(var(--ew) / 14.5, 3.1svh, 1.6rem); } }

/* ================= alt preview (04.11): four compositions of the E2 statement by ?alt=1..4 =================
   Dan: the photo somewhere else, a centred try, smaller text, more air above the project.
   All four: the text smaller than E2's, the air under it weighted 1.5 : 1 against the air above, so the
   project starts clearly lower than the text ends. The project's peek and syncSlot are E2's. */
.v-switch a[aria-current] { background: var(--pill-dark); color: #fff; }
.ab-ava { display: none; }
html[data-alt] .ab { --air-t: minmax(0, 1fr); --air-b: minmax(0, 1.5fr); }
html[data-alt] .ab-p1 { margin-top: 0; }

/* ---- 1 · Centred: the round portrait in the middle, the statement centred under it, balanced lines ---- */
html[data-alt="1"] .ab {
  --ew: min(100vw - 2 * var(--edge), 50rem); --pw: clamp(80px, 14svh, 144px);
  grid-template-rows: var(--top) var(--air-t) auto auto var(--air-b) var(--peek);
}
html[data-alt="1"] :is(.ab-photo, .ab-p1) { left: 0; }   /* centred by the grid, not by v9's shift */
html[data-alt="1"] .ab-photo { grid-area: 3 / 3 / 4 / 5; justify-self: center; width: var(--pw); }
html[data-alt="1"] .ab-p1 {
  grid-area: 4 / 3 / 5 / 5; margin-top: clamp(20px, 3.6svh, 36px);
  font-size: min(var(--ew) / 26, 3.1svh, 1.875rem); line-height: 1.2; letter-spacing: -.01em;
  text-align: center; text-wrap: balance;
}

/* ---- 2 · Beside: the 3:4 portrait on the left, the statement beside it from its top edge, the pair
   centred on the screen by the text's real width (v9's --tw-shift) ---- */
html[data-alt="2"] .ab {
  --pw: clamp(112px, 21svh, 208px); --g: clamp(24px, 3vw, 40px); --tw: min(36rem, 100vw - 2 * var(--edge) - var(--pw) - var(--g));
  grid-template-columns: var(--edge) minmax(0, 1fr) var(--pw) var(--g) var(--tw) minmax(0, 1fr) var(--edge);
  grid-template-rows: var(--top) var(--air-t) auto var(--air-b) var(--peek);
}
html[data-alt="2"] .ab-photo { grid-area: 3 / 3; align-self: start; }
html[data-alt="2"] .ab-p1 { grid-area: 3 / 5; font-size: min(2.7svh, 1.625rem); line-height: 1.25; letter-spacing: 0; text-wrap: pretty; }
html[data-alt="2"] .ab-slot { grid-area: 5 / 2 / 6 / 7; }
@supports (text-box: trim-both cap alphabetic) { html[data-alt="2"] .ab-p1 { text-box: trim-start cap alphabetic; } }   /* the first cap line on the portrait's top edge */

/* ---- 3 · Inline: no portrait block; a small round portrait sits in the sentence after "Dan" ---- */
html[data-alt="3"] .ab { --ew: min(100vw - 2 * var(--edge), 54rem); grid-template-rows: var(--top) var(--air-t) auto auto var(--air-b) var(--peek); }
html[data-alt="3"] .ab-photo { display: none; }
html[data-alt="3"] .ab-p1 { grid-area: 4 / 3 / 5 / 5; font-size: min(var(--ew) / 25, 3.5svh, 2.125rem); line-height: 1.22; letter-spacing: -.01em; text-wrap: pretty; }
html[data-alt="3"] .ab-ava { display: inline; word-spacing: -.3em; }   /* a narrower space before the portrait */
html[data-alt="3"] .ab-ava img { display: inline-block; width: 1.1em; height: 1.1em; border-radius: 50%; object-fit: cover; vertical-align: -.24em; background: #e8e8e8; }

/* ---- 4 · Split: a large 3:4 portrait on the right edge of the project below, the statement small on the
   left, its last line on the portrait's foot ---- */
html[data-alt="4"] .ab {
  --C: min(100vw - 2 * var(--edge), 1600px);                       /* the project's width below */
  --g: clamp(24px, 3vw, 48px);
  --air: clamp(56px, 9svh, 112px);
  --pw: min((100svh - var(--top) - var(--peek) - var(--air)) * .75, var(--C) * .42);
  grid-template-columns: minmax(var(--edge), 1fr) calc(var(--C) - var(--g) - var(--pw)) var(--g) var(--pw) minmax(var(--edge), 1fr);
  grid-template-rows: var(--top) auto minmax(0, 1fr) var(--peek);
}
html[data-alt="4"] :is(.ab-photo, .ab-p1) { left: 0; }
html[data-alt="4"] .ab-photo { grid-area: 2 / 4; width: var(--pw); }
html[data-alt="4"] .ab-p1 { grid-area: 2 / 2; align-self: end; max-width: 26em; font-size: min(2.4svh, 1.375rem); line-height: 1.3; letter-spacing: 0; text-wrap: pretty; }
html[data-alt="4"] .ab-slot { grid-area: 4 / 2 / 5 / 5; }
@supports (text-box: trim-both cap alphabetic) { html[data-alt="4"] .ab-p1 { text-box: trim-end cap alphabetic; } }   /* the last baseline on the portrait's foot */

@media (max-width: 640px) {
  html[data-alt] .ab { --peek: clamp(150px, 22svh, 220px); }
  html[data-alt="1"] .ab { --pw: clamp(64px, 11svh, 96px); grid-template-rows: var(--top) var(--air-t) auto auto var(--air-b) var(--peek); }
  html[data-alt="1"] .ab-p1 { margin-top: 18px; font-size: min(var(--ew) / 21, 2.6svh, 1.125rem); line-height: 1.3; letter-spacing: 0; }
  /* 2: portrait in the left third, text beside it */
  html[data-alt="2"] .ab { --pw: 28vw; --g: 14px; --tw: calc(100vw - 2 * var(--edge) - var(--pw) - var(--g)); }
  html[data-alt="2"] .ab-p1 { font-size: min(2.2svh, 1rem); line-height: 1.35; }
  html:is([data-alt="1"], [data-alt="3"]) .ab-slot { grid-area: 6 / 2 / 7 / 6; }
  html[data-alt="3"] .ab-p1 { font-size: min(var(--ew) / 17, 2.9svh, 1.3125rem); line-height: 1.3; letter-spacing: 0; }
  /* 4: the portrait as a wide crop across the top, the text under it, on the left */
  html[data-alt="4"] .ab { --C: calc(100vw - 2 * var(--edge)); grid-template-columns: var(--edge) minmax(0, 1fr) var(--edge); grid-template-rows: var(--top) minmax(0, .5fr) auto auto minmax(0, 1fr) var(--peek); }
  html[data-alt="4"] .ab-photo { grid-area: 3 / 2; width: auto; aspect-ratio: auto; height: min(var(--C) * .75, 27svh); }
  html[data-alt="4"] .ab-photo img { object-position: 50% 22%; }
  html[data-alt="4"] .ab-p1 { grid-area: 4 / 2; margin-top: 16px; max-width: none; font-size: min(2.5svh, 1.0625rem); line-height: 1.35; }
  html[data-alt="4"] .ab-slot { grid-area: 6 / 2 / 7 / 3; }
}

/* switch: names from 1101 px, numbers only below; on a phone four small pills clear the CV */
@media (max-width: 640px) {
  .v-switch { gap: 2px; }
  .v-switch a { height: 28px; min-width: 28px; padding: 0 4px; justify-content: center; font-size: 12px; }
}

/* ---- 1 · typography pass (04.11): the lines are hand-set (the text is fixed), so Safari and Chrome break
   them the same way: every sentence starts a line, a phrase never splits ("at Toman Design in Prague").
   Desktop: Dan's 6 lines, the three long ones split at a phrase boundary -> 9 lines of 24-42 ch. Phone: 11.
   The size is tied to the column so the longest line (42 ch desktop, 35 ch phone) always fits with ~7 %
   room; if a line ever does not, it simply wraps. Portrait 10 % closer (Dan). */
.ab-p1 .p1-e2 br { display: none; }
html[data-alt="1"] .ab-p1 .p1-e2 br.b { display: inline; }
html[data-alt="1"] .ab { --ew: min(100vw - 2 * var(--edge), 56rem); }
html[data-alt="1"] .ab-p1 { font-size: min(var(--ew) / 23, 3.1svh, 1.875rem); text-wrap: wrap; }
html[data-alt="1"] .ab-photo img { transform: scale(1.1); transform-origin: 50% 42%; }
@media (min-width: 641px) { html[data-alt="1"] .ab-p1 .p1-e2 br.w { display: inline; } }
@media (max-width: 640px) {
  html[data-alt="1"] .ab-p1 .p1-e2 br.n { display: inline; }
  html[data-alt="1"] .ab-p1 { font-size: min(var(--ew) / 21, 2.6svh, 1.125rem); }   /* the phone size; its longest line is 35 ch */
}
/* wide pass (04.11, Dan: "too dense, a bit wider"): desktop takes Dan's own lines — one sentence or clause
   per line, 6 lines, longest 68 ch — in a wider column, with a little more leading. Phone keeps its 11 lines. */
html[data-alt="1"] .ab { --ew: min(100vw - 2 * var(--edge), 64rem); }
html[data-alt="1"] .ab-p1 { font-size: min(var(--ew) / 37, 3.1svh, 1.875rem); line-height: 1.3; }
@media (max-width: 640px) { html[data-alt="1"] .ab-p1 { font-size: min(var(--ew) / 21, 2.6svh, 1.125rem); } }
/* even pass (04.11, Dan: "holes"): the centred lines are now near-equal (desktop 42–55 ch, phone 24–39 ch),
   breaking only between phrases — no more long/short/long silhouette. */
html[data-alt="1"] .ab { --ew: min(100vw - 2 * var(--edge), 56rem); }
html[data-alt="1"] .ab-p1 { font-size: min(var(--ew) / 30, 3.1svh, 1.875rem); }
@media (max-width: 640px) { html[data-alt="1"] .ab-p1 { font-size: min(var(--ew) / 21.5, 2.6svh, 1.125rem); } }

/* ================= contacts (04.11): LinkedIn + e-mail with copy, centred under the statement =================
   Their own row between the statement and the air above the project, so the peek keeps its place.
   The statement → contacts gap equals the portrait → statement gap: three groups, one rhythm. */
.ab-contact { display: none; }
html[data-alt="1"] .ab { grid-template-rows: var(--top) var(--air-t) auto auto auto var(--air-b) var(--peek); }
html[data-alt="1"] .ab-slot { grid-area: 7 / 2 / 8 / 6; }
html[data-alt="1"] .ab-contact {
  grid-area: 5 / 3 / 6 / 5; justify-self: center;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; column-gap: 12px; row-gap: 8px;
  margin-top: clamp(20px, 3.6svh, 36px);
  font-size: var(--fs-body, 1rem); line-height: 1;
}
.ab-c-mailgroup { display: inline-flex; align-items: center; }
.ab-c-copy {
  display: inline-grid; place-items: center; width: 32px; height: 32px; margin: 0; padding: 0;
  border: 0; border-radius: var(--r); background: transparent; color: inherit; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ab-c-copy svg { grid-area: 1 / 1; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; transition: opacity .15s ease, scale .2s cubic-bezier(.2, .9, .3, 1.2); }
.ab-c-copy .i-done { opacity: 0; scale: .6; }
.ab-c-copy.is-done .i-copy { opacity: 0; scale: .6; }
.ab-c-copy.is-done .i-done { opacity: 1; scale: 1; }
.ab-contact a:focus-visible, .ab-c-copy:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
@media (prefers-reduced-motion: reduce) { .ab-c-copy svg { transition: none; } }

/* 1 · text, as the reference: quiet grey, hairline underlines, a middle dot, the copy icon after the address */
html[data-contact="1"] .ab-contact { color: var(--muted); }
html[data-contact="1"] .ab-contact a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .35em; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); transition: color .15s ease, text-decoration-color .15s ease; }
html[data-contact="1"] .ab-c-mailgroup { gap: 4px; margin-inline-end: -8px; }   /* the icon's own padding, so the visible group stays centred */
@media (hover: hover) {
  html[data-contact="1"] .ab-contact a:hover, html[data-contact="1"] .ab-c-copy:hover { color: var(--ink); }
  html[data-contact="1"] .ab-contact a:hover { text-decoration-color: currentColor; }
}

@media (max-width: 640px) {
  html[data-alt="1"] .ab { grid-template-rows: var(--top) var(--air-t) auto auto auto var(--air-b) var(--peek); }
  html[data-alt="1"] .ab-slot { grid-area: 7 / 2 / 8 / 6; }
  html[data-alt="1"] .ab-contact { margin-top: 18px; font-size: .9375rem; }
}
