/* Type follows ky.fyi (HEX Franklin + MonoLisa, both paid) using free stand-ins:
   Libre Franklin (same Franklin Gothic lineage) + JetBrains Mono. To use the real ones,
   license them and swap --sans / --mono. */
@import url("https://fonts.googleapis.com/css2?family=Libre+Franklin:wght@300..700&family=JetBrains+Mono:wght@300..500&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;1,6..72,400;1,6..72,500&display=swap");

/* Wireframe kit, stripped: whitespace instead of rules, flat image blocks. */
:root {
  --paper: #fcfbf8;   /* chalk */
  --img: #efede8;
  --line: #e9e6e0;
  --ink: #21201c;
  --muted: #63635e;
  --note: #b4572e;
  --sans: "Libre Franklin", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --serif: "Newsreader", Georgia, serif;
  --accent: #1b2a4a;   /* deep navy, 13:1 on paper; for the serif accents only */
  --tight: -0.0175em;
  --max: 1080px;
  --gutter: 24px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 380 17.5px/1.5 var(--sans);
}
a { color: inherit; text-decoration: none; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* nav */
.nav { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; padding: 32px 0; }
.nav .name { font-weight: 600; letter-spacing: var(--tight); }
.nav ul { display: flex; gap: 24px; list-style: none; font-size: 15px; color: var(--muted); }
.nav a[aria-current] { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.nav ul a { display: inline-block; padding: 12px 0; margin: -12px 0; }   /* 44px tap target, same look */
.nav ul a:hover { color: var(--ink); }

/* image block: flat, label only so we know what goes there */
.ph { position: relative; width: 100%; background: var(--img); }
.ph::after {
  content: attr(data-label);
  position: absolute; left: 12px; bottom: 10px;
  font: 12px var(--mono); color: var(--muted);
}
.r-wide { aspect-ratio: 16 / 9; }
.r-land { aspect-ratio: 3 / 2; }
.r-sq   { aspect-ratio: 1 / 1; }
.r-port { aspect-ratio: 4 / 5; }
.r-tall { aspect-ratio: 2 / 3; }
.r-pano { aspect-ratio: 21 / 9; }

/* text */
.h1 { font-size: clamp(28px, 4vw, 38px); line-height: 1.2; font-weight: 500; letter-spacing: var(--tight); }
.h2 { font-size: 25px; line-height: 1.2; font-weight: 600; letter-spacing: var(--tight); }
.h3 { font-size: 17.5px; font-weight: 600; }
.title { font-size: 21px; line-height: 1.2; font-weight: 600; letter-spacing: var(--tight); }
.lede { max-width: 32em; color: var(--muted); }
.small { font-size: 15px; color: var(--muted); }
.tag { font: 12px/1.5 var(--mono); color: var(--muted); }
.more { font-size: 15px; color: var(--muted); }
.more:hover { color: var(--ink); }
.bar { height: 9px; border-radius: 2px; background: var(--line); }
.bar + .bar { margin-top: 8px; }
.bar.w60 { width: 60%; } .bar.w80 { width: 80%; } .bar.w40 { width: 40%; }

/* layout: space does the separating */
.section { padding: 96px 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 28px; gap: 16px; }
.stack > * + * { margin-top: 10px; }
.grid { display: grid; gap: var(--gutter); }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.row { display: grid; grid-template-columns: 90px 1fr auto; gap: 20px; align-items: baseline; padding: 10px 0; }
.row:hover .title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.link { border-bottom: 1px solid currentColor; padding-bottom: 1px; }

footer { padding: 48px 0 72px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* wireframe notes; "n" hides them */
.note {
  display: block;
  font: 12px/1.45 var(--mono);
  color: var(--note);
  border-left: 2px solid var(--note);
  padding: 2px 0 2px 10px;
  margin: 12px 0;
  max-width: 46em;
}
body.no-notes .note { display: none; }
.note-toggle {
  position: fixed; right: 16px; bottom: 16px; z-index: 10;
  font: 12px var(--mono);
  background: var(--ink); color: var(--paper);
  border: 0; border-radius: 8px; padding: 8px 12px; cursor: pointer;
}

@media (max-width: 760px) {
  :root { --gutter: 20px; }
  body { font-size: 16px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .g4.keep-2, .g3.keep-2 { grid-template-columns: repeat(2, 1fr); }
  .row { grid-template-columns: 1fr; gap: 2px; }
  .title { font-size: 21px; }
  .section { padding: 56px 0; }
  .nav ul { gap: 16px; }
}

/* ── One-screen pages (home, building, living, connect, thinking) ─────────
   Desktop: the page is exactly one viewport; images flex to fill what's left.
   Phones: normal scrolling. */
.onescreen { height: 100vh; overflow: hidden; }
.onescreen .page { height: 100vh; display: flex; flex-direction: column; }
.onescreen .nav { padding: 24px 0 18px; }
.fill { flex: 1; min-height: 0; padding-bottom: 28px; }
.photo { display: block; width: 100%; height: 100%; object-fit: cover; background: var(--img); }
.k { font: 12px/1.4 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.label { font-size: 15px; color: var(--muted); margin-bottom: 14px; }
.tile:hover .cap { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
@media (max-width: 900px) {
  .onescreen { height: auto; overflow: auto; }
  .onescreen .page { height: auto; }
  .fill { flex: none; }
}

/* ── Projects (Building): large visuals in two columns, caption laid over the bottom of
   each card — name left, year · proof right. Caption appears on hover on pointer devices
   and is always on for touch. Cards keep their own aspect ratios, so the columns stagger. */
.projects { padding: 28px 0 72px; }
.projects > .k { max-width: 640px; margin: 0 auto 18px; }
.projects .pcols { columns: 3; column-gap: 14px; }
@media (max-width: 1100px) { .projects .pcols { columns: 2; } }
.pcard { break-inside: avoid; display: block; position: relative; margin: 0 0 14px; overflow: hidden; border-radius: 6px; background: var(--img); }
.pcard .frame img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.pcard:hover .frame img { transform: scale(1.02); }
.pcard .cap { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 40px 16px 14px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.55)); opacity: 0; transition: opacity .25s ease; }
.pcard .cap b { font-size: 15px; font-weight: 600; letter-spacing: var(--tight); line-height: 1.2; }
.pcard .cap span { font: 11px/1.4 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: rgba(255,255,255,.8); white-space: nowrap; }
.pcard:hover .cap, .pcard:focus-visible .cap { opacity: 1; }
@media (hover: none) { .pcard .cap { opacity: 1; } }
.r21 { aspect-ratio: 2 / 1; } .r43 { aspect-ratio: 4 / 3; } .r54 { aspect-ratio: 5 / 4; }
@media (max-width: 760px) {
  .projects { padding: 20px 0 56px; }
  .pcard { margin-bottom: 12px; border-radius: 5px; }
  .pcard .cap { padding: 32px 14px 12px; }
}
@media (max-width: 520px) {   /* true phones: one column of short crops, never a tower */
  .projects .pcols { columns: 1; }
  .pcard .frame { aspect-ratio: 3 / 2 !important; }
}

/* ── Site footer: contacts small on top, the name huge as the page's floor ───────── */
body { min-height: 100svh; display: flex; flex-direction: column; }
body > .wrap, body > .wide { width: 100%; min-width: 0; }   /* flex children: never wider than the window */
.wide.foot { margin-top: auto; }            /* short pages: the footer still sits at the bottom of the window */
.onescreen.scrolls { height: auto; overflow: auto; }
.site-footer { display: block; padding: 24px 0 24px; }
.site-footer .row { font-size: 15px; color: var(--muted); }
.site-footer .row { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.site-footer .row a { display: inline-block; padding: 12px 0; margin: -12px 0; }
.site-footer .row a:hover { color: var(--ink); }
.site-footer .huge { margin-top: 40px; font-size: clamp(76px, 12vw, 180px); line-height: .9; font-weight: 500; letter-spacing: -0.045em; color: var(--ink); text-wrap: balance; }
.site-footer .huge span { display: inline-block; }
@media (max-width: 760px) { .site-footer .huge { margin-top: 28px; } .site-footer { padding-bottom: 16px; } }

/* ── Intro + gallery (home, building, living) ───────────────────────────────
   Screen one is a few compact sentences in one readable column. The gallery starts
   just below, with the top of the first photos peeking into the bottom of the screen
   (--peek) so there's a reason to scroll. The cue line doubles as the gallery's title. */
:root { --nav-h: 92px; --peek: 88px; }
.intro { max-width: 640px; margin-left: auto; margin-right: auto; min-height: calc(100svh - var(--nav-h) - var(--peek)); display: flex; flex-direction: column; padding: 32px 0 20px; }
.intro .h1 { font-size: clamp(36px, 4.8vw, 56px); line-height: 1.05; margin-bottom: 28px; }
.intro p.say { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.42; max-width: 30em; }
.intro p.say + p.say { margin-top: 14px; }
.intro a.in { border-bottom: 1px solid currentColor; padding-bottom: 1px; }
.intro a.in:hover { border-bottom-width: 2px; }
.intro .links { margin-top: 28px; display: flex; gap: 22px; flex-wrap: wrap; font-size: 15px; color: var(--muted); }
.intro .links a { display: inline-block; padding: 12px 0; margin: -12px 0; }
.intro .links a:hover { color: var(--ink); }
/* The intro voice, shared by Home, Building, Living and Connect: a faded lowercase headline, then
   a few short paragraphs; the first one is the lede. Home floats a portrait into it. */
.hey { font-size: 40px; line-height: 48px; font-weight: 500; letter-spacing: -0.025em; color: var(--ink); opacity: .62; }
.story { margin-top: 18px; display: flow-root; }   /* contains a floated portrait */
.story p { font-size: 18px; line-height: 28px; text-wrap: pretty; max-width: none; color: var(--ink); }
.story p + p { margin-top: 18px; }
.story p.lede { font-weight: 600; letter-spacing: var(--tight); color: var(--muted); }
.story a.in { border-bottom: 1px solid currentColor; padding-bottom: 1px; }
.story a.in:hover { border-bottom-width: 2px; }
.portrait { float: right; width: 150px; margin: 4px 0 14px 26px; shape-outside: inset(0 round 4px); }
.portrait .frame { aspect-ratio: 4 / 5; overflow: hidden; border-radius: 4px; background: var(--img); }
@media (min-width: 901px) and (max-height: 820px) {   /* shorter laptops: a touch smaller so Home stays one screen */
  .hey { font-size: 36px; line-height: 44px; }
  .portrait { width: 140px; }
  .story { margin-top: 16px; }
  .story p { font-size: 17px; line-height: 26px; }
  .story p + p { margin-top: 14px; }
}
@media (max-width: 900px) {
  .hey { font-size: 30px; line-height: 36px; }
  .portrait { width: 38%; margin: 4px 0 10px 14px; }
  .story { margin-top: 16px; }
  .story p { font-size: 16px; line-height: 24.5px; }
  .story p + p { margin-top: 10px; }
}
@media (max-width: 900px) and (max-height: 700px) {
  .hey { font-size: 27px; line-height: 32px; }
  .portrait { width: 32%; }
  .story { margin-top: 12px; }
  .story p { font-size: 14.5px; line-height: 21px; }
  .story p + p { margin-top: 10px; }
}

/* The book. One 3D object at two sizes: tiny on Home (a bookmark of what I'm reading) and full
   size in the panel that opens when you hover or tap it. A hardcover: boards that overhang a block
   of cream pages, a rounded spine, soft light from the upper left, a shadow on the ground. */
.book3 { --w: 230px; --h: 340px; --d: 34px; --ov: 3px; width: var(--w); height: var(--h); perspective: 1600px; display: block; position: relative; }
.book3 .b { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transform: rotateY(-30deg); transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.book3 .f { position: absolute; inset: 0; display: block; backface-visibility: hidden; }
/* front board */
.book3 .cover { background: linear-gradient(105deg, #ebe9e3 0%, var(--img) 28%, #f4f2ed 62%, #ebe9e3 100%); border-radius: 2px 6px 6px 2px; transform: translateZ(calc(var(--d) / 2));
                display: flex; flex-direction: column; justify-content: space-between; padding: 30px 24px 24px;
                box-shadow: inset 1px 0 0 rgba(255,255,255,.5); }
.book3 .cover::before { content: ""; position: absolute; left: 12px; top: 0; bottom: 0; width: 2px; background: linear-gradient(90deg, rgba(33,32,28,.10), rgba(33,32,28,.02)); }   /* the hinge groove */
.book3 .cover::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(160deg, rgba(255,255,255,.35), transparent 45%); pointer-events: none; }   /* the light */
.book3 .cover .bt { font-size: 23px; line-height: 1.15; font-weight: 600; letter-spacing: var(--tight); text-wrap: balance; position: relative; }
.book3 .cover .ba { font: 12px var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); position: relative; }
/* back board */
.book3 .back { background: #e3e0d9; border-radius: 2px 6px 6px 2px; transform: translateZ(calc(-1 * var(--d) / 2)) rotateY(180deg); }
/* the four sides are rotated about an edge, which puts them at z ∈ [0, d]; translateZ(-d/2) centres them on the boards.
   spine: rounded by its gradient, the full height of the boards */
.book3 .spine { width: var(--d); left: 0; right: auto; border-radius: 3px 0 0 3px; transform-origin: left center; transform: translateZ(calc(-1 * var(--d) / 2)) rotateY(-90deg);
                background: linear-gradient(90deg, #d9d6cf, #ebe9e3 35%, #efede8 55%, #dedbd4); }
/* the page block: inset from the boards by --ov so the boards overhang it */
.book3 .edge, .book3 .top, .book3 .bottom { background: repeating-linear-gradient(90deg, #f8f6f1 0 2px, #e6e3dc 2px 3px); }
.book3 .edge { width: var(--d); right: var(--ov); left: auto; top: var(--ov); bottom: var(--ov); transform-origin: right center; transform: translateZ(calc(-1 * var(--d) / 2)) rotateY(90deg);
               box-shadow: inset 2px 0 4px rgba(33,32,28,.08); }
.book3 .top { height: var(--d); top: var(--ov); bottom: auto; left: var(--ov); right: var(--ov); transform-origin: center top; transform: translateZ(calc(-1 * var(--d) / 2)) rotateX(90deg);
              background: repeating-linear-gradient(0deg, #f8f6f1 0 2px, #e6e3dc 2px 3px); }
.book3 .bottom { height: var(--d); bottom: var(--ov); top: auto; left: var(--ov); right: var(--ov); transform-origin: center bottom; transform: translateZ(calc(-1 * var(--d) / 2)) rotateX(-90deg);
                 background: repeating-linear-gradient(0deg, #ebe8e1 0 2px, #dcd9d2 2px 3px); }
/* ground shadow */
.book3 .shadow { position: absolute; left: 6%; right: -4%; bottom: -22px; height: 26px; border-radius: 50%; background: rgba(33,32,28,.22); filter: blur(12px); transform: skewX(-18deg); pointer-events: none; transition: transform .6s cubic-bezier(.2,.7,.2,1), opacity .4s; }
/* tiny: 24×34, sits in the text like a bookmark */
/* "i’m reading" in small text, the book just to its right (the cover says which) */
.tiny { display: inline-flex; align-items: center; gap: 14px; margin: 22px 0 0; padding: 4px 0; background: transparent; border: 0; cursor: pointer; text-align: left; font: 400 14px/1 var(--sans); color: var(--muted); }
.tiny .book3 { --w: 34px; --h: 50px; --d: 7px; --ov: 1px; perspective: 360px; margin-left: 4px; }
.tiny .book3 .cover { padding: 0; border-radius: 1px 2px 2px 1px; box-shadow: 2px 3px 8px rgba(33,32,28,.14); }
.tiny .book3 .cover::before { left: 2px; width: 1px; }
.tiny .book3 .shadow { display: none; }
.tiny .book3 .edge, .tiny .book3 .top { background: repeating-linear-gradient(90deg, #f7f5f0 0 1px, #e9e6df 1px 2px); }
.tiny .book3 .top { background: repeating-linear-gradient(0deg, #f7f5f0 0 1px, #e9e6df 1px 2px); }
/* arming: while you linger, the book lifts off the line and turns toward you; leave early and it settles back */
.tiny .book3 .b { transform-origin: left bottom; transition: transform .7s cubic-bezier(.3,.6,.2,1); }
.tiny:hover .lbl, .tiny.arming .lbl { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.tiny.arming { color: var(--ink); }
.tiny.arming .book3 .b { transform: rotateY(-6deg) translateY(-4px) scale(1.5); }
/* the panel: the page blurs, the book zooms into focus; ‹ › step through what came before; the form sits on the right */
/* opening is one quiet fade: the overlay (blur included) comes up over .45s and the book eases a few degrees into place.
   No zoom, no stagger, and the panel is painted in advance (book.js), so nothing has to be built in the opening frame. */
.bookwin { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 24px var(--gutter); overflow: auto;
           background: rgb(252 251 248 / .72); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
           opacity: 0; visibility: hidden; pointer-events: none; will-change: opacity; transition: opacity .45s ease, visibility 0s linear .45s; }
.bookwin.on { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .45s ease; }
.bookwin .reading-quote { position: absolute; top: 34px; left: clamp(24px, 3vw, 56px); right: 76px; max-width: 430px; margin: 0; color: #6d6962; }
.bookwin .reading-quote blockquote { margin: 0; font: 400 16px/1.5 var(--sans); }
.bookwin .reading-quote figcaption { margin-top: 8px; font: 400 11px/1.5 var(--sans); color: #77736d; }
.bookwin .panel { width: 100%; max-width: 1000px; display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 32px 80px; align-items: center; }
/* entrance: the book turns a few degrees into its resting angle while the overlay fades; everything else simply rides the fade */
.bookwin .now .book3 .b { transform: rotateY(-40deg); will-change: transform; transition: transform .6s cubic-bezier(.22,.75,.2,1); }
.bookwin.on .now .book3 .b { transform: rotateY(-30deg); }
/* ‹ ›: a short turn away (quick, easing in), the face changes, and a slightly longer turn back */
.bookwin.on .now .book3.turn .b { transition: transform .15s ease-in; }
.bookwin.on .now .book3.back .b { transition: transform .34s cubic-bezier(.22,.75,.2,1); }
.bookwin .step { width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; color: var(--ink); font: 24px var(--mono); cursor: pointer; display: grid; place-items: center; }
.bookwin .step:hover { background: var(--img); }
.bookwin .step:disabled { opacity: .25; cursor: default; background: transparent; }
/* ‹ book › then the words; the arrows sit right beside the book, nothing else */
.bookwin .now { display: grid; grid-template-columns: 44px auto 44px minmax(0, 1fr); gap: 0 24px; align-items: center; }
/* anchored in place; dragging turns and tips it (--ry, --rx), and it swings back when released */
.bookwin .now .book3 { --w: 230px; --h: 340px; --d: 34px; margin: 12px 0 12px 30px; --ry: 0deg; --rx: 0deg; cursor: grab; touch-action: none; user-select: none; }
.bookwin.on .now .book3 .b { transform: rotateX(var(--rx)) rotateY(calc(-30deg + var(--ry))); transition: transform .7s cubic-bezier(.22,.75,.2,1); }
.bookwin .now .book3.held { cursor: grabbing; }
.bookwin .now .book3.held .b { transition: transform .12s ease-out; }
.bookwin.on .now .book3.released .b { transition: transform .7s cubic-bezier(.2,.9,.2,1.12); }   /* only the let-go has a little spring */
.bookwin.on .now .book3 .shadow { transform: skewX(calc(-18deg - var(--ry) * .3)) translateY(var(--shadow-y, 0px)); }
.bookwin .now .about { margin-left: 12px; max-width: 260px; }
.book3 .cover.art { padding: 0; overflow: hidden; }
.book3 .cover.art img { display: block; width: 100%; height: 100%; object-fit: cover; }

.bookwin .now .k { font: 12px var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.bookwin .now .k b { font-weight: 500; color: var(--ink); }
.bookwin .now .t { margin-top: 8px; font-size: 22px; line-height: 1.2; font-weight: 600; letter-spacing: var(--tight); text-wrap: balance; }
.bookwin .now .a { margin-top: 4px; font-size: 16px; color: var(--muted); }
.bookwin .now .n { margin-top: 14px; font-size: 14px; }
.bookwin .now .n a { border-bottom: 1px solid var(--line); }
.bookwin .now .n a:hover { border-color: var(--ink); }
.bookwin .x { position: absolute; top: 18px; right: 22px; width: 44px; height: 44px; border: 0; background: transparent; color: var(--muted); font: 22px var(--mono); cursor: pointer; }
.bookwin .x:hover { color: var(--ink); }
/* the form: a heading, one line, three underlined fields with the prompt as placeholder, one button */
.rec-form { width: 100%; justify-self: end; }
.rec-form .h { font-size: 16px; font-weight: 600; letter-spacing: var(--tight); }
.rec-form .sub { margin-top: 2px; font-size: 14px; color: var(--muted); }
.rec-form input, .rec-form textarea { display: block; width: 100%; margin-top: 14px; font: 400 15px/1.4 var(--sans); color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--line); padding: 4px 0; outline: 0; border-radius: 0; resize: none; }
.rec-form input::placeholder, .rec-form textarea::placeholder { color: var(--muted); }
.rec-form input:focus, .rec-form textarea:focus { border-bottom-color: var(--ink); }
.rec-form textarea { min-height: 64px; overflow: hidden; line-height: 1.45; }   /* grows as they write (book.js) */
.rec-form .send { margin-top: 18px; font: 600 15px var(--sans); letter-spacing: var(--tight); color: var(--ink); background: transparent; border: 0; border-bottom: 1.5px solid var(--ink); padding: 0 0 1px; cursor: pointer; }
.rec-form .send:hover { color: var(--accent); border-color: var(--accent); }
.rec-form .thanks { margin-top: 16px; font-size: 15px; }
@media (max-width: 1100px) {
  .bookwin { place-items: start center; padding-top: 132px; }
  .bookwin .panel { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .bookwin .now { grid-template-columns: 36px auto 36px; justify-content: center; gap: 0 10px; text-align: center; }
  .bookwin .now .book3 { --w: 180px; --h: 266px; --d: 28px; margin: 8px 0 20px 18px; }
  .bookwin .now .about { grid-column: 1 / -1; margin: 18px 0 0; max-width: none; }
  .bookwin .step { width: 36px; height: 36px; font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) { .bookwin, .book3 .b { transition: none; animation: none; } .bookwin .now .book3 .b { transform: rotateY(-30deg); } }

.cue { margin-top: auto; padding-top: 32px; text-align: center; font: 500 21px/1.25 var(--serif); letter-spacing: -0.005em; color: var(--accent); }
.cue a { display: inline-block; padding: 12px 8px; margin: -12px 0; }
.cue a:hover { color: var(--ink); }

/* a few photos of me, right under the words: who I am at a glance */
.slots { margin-top: 32px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; max-width: 820px; }
.slots figure { margin: 0; }
.slots .frame { aspect-ratio: 4 / 5; overflow: hidden; background: var(--img); border-radius: 6px; }
.slots figcaption { margin-top: 8px; font: 12px/1.3 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
/* shorter laptops: smaller slots so the gallery still peeks */
@media (min-width: 761px) and (max-height: 860px) { .slots { max-width: 560px; } }
@media (min-width: 761px) and (max-height: 680px) { .slots { max-width: 420px; } }

/* compact timeline: year, then what it is in one line */
.timeline { margin-top: 30px; display: flex; flex-direction: column; gap: 14px; }
.timeline a { display: grid; grid-template-columns: 60px minmax(0, 1fr); gap: 18px; align-items: baseline; font-size: 17.5px; line-height: 1.4; }
.timeline .y { font: 13px var(--mono); color: var(--muted); }
.timeline b { font-weight: 600; letter-spacing: var(--tight); }
.timeline .d { color: var(--muted); }
.timeline a:hover b { text-decoration: underline; text-underline-offset: 3px; }

/* gallery: varied crops in columns; each photo opens its note */
.gallery { padding: 0 0 96px; scroll-margin-top: 24px; }
.gallery > .label { margin-bottom: 22px; }
/* the gallery runs wider than the text: its own container with slim margins */
.wide { max-width: 1360px; margin: 0 auto; padding: 0 var(--gutter); }
.gallery .cols { columns: 3; column-gap: 20px; }
@media (min-width: 1200px) { .gallery .cols { columns: 4; } }
.gallery figure { break-inside: avoid; margin: 0 0 28px; }
.gallery figure a { display: block; }
.gallery .frame { position: relative; overflow: hidden; background: var(--img); container-type: size; }

/* note preview: one even blanket over the whole photo (a hint of it shows through),
   with just the note's title, one line of preview, and "Read". */
.veil { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 10%;
        background: rgb(252 251 248 / .88);
        opacity: 0; transition: opacity .25s ease; text-align: center; pointer-events: none; }
.pv { max-width: 24ch; display: flex; flex-direction: column; align-items: center; gap: 6px; transform: translateY(4px); transition: transform .3s ease; }
.pt { font-size: 16.5px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.2; color: var(--ink); text-wrap: balance;
      display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pd { font-size: 14px; line-height: 1.4; color: #3d3a34; text-wrap: balance;
      display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.go { margin-top: 2px; font-size: 13px; font-weight: 600; color: var(--ink); }
.go i { font-style: normal; display: inline-block; transition: transform .25s ease; }
.gallery figure a:hover .go i { transform: translateX(3px); }
.gallery figure a:hover .veil, .gallery figure a:focus-visible .veil, .gallery figure.preview .veil { opacity: 1; }
.gallery figure a:hover .pv, .gallery figure a:focus-visible .pv, .gallery figure.preview .pv { transform: none; }
/* small photos: just the title and Read */
@container (max-width: 230px) { .pd { display: none; } .pt { font-size: 15px; } .veil { padding: 8%; } }
@container (max-height: 170px) { .pd { display: none; } .pt { font-size: 15px; -webkit-line-clamp: 2; } }
.gallery .frame img { transition: transform .5s ease; }
.gallery figure a:hover .frame img { transform: scale(1.03); }
.gallery figcaption { margin-top: 10px; }
.gallery figcaption b { display: block; font-size: 15px; font-weight: 600; letter-spacing: var(--tight); line-height: 1.3; }
.gallery figure a:hover figcaption b { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.gallery figcaption span { display: block; margin-top: 3px; font: 12px/1.4 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.r45 { aspect-ratio: 4 / 5; } .r32 { aspect-ratio: 3 / 2; } .r11 { aspect-ratio: 1 / 1; } .r34 { aspect-ratio: 3 / 4; }
/* reveal on scroll (skipped when motion is reduced or JS is off) */
.js .gallery figure { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js .gallery figure.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .gallery figure { opacity: 1; transform: none; transition: none; } }

@media (max-width: 760px) {
  :root { --nav-h: 129px; --peek: 80px; }   /* nav wraps to two lines on phones */
  .intro { padding-top: 8px; }
  .intro .h1 { font-size: 34px; margin-bottom: 18px; }
  .intro p.say { font-size: 17.5px; line-height: 1.45; }
  .timeline a { grid-template-columns: 48px minmax(0, 1fr); gap: 12px; font-size: 16px; }
  .gallery { padding: 0 0 72px; }
  .gallery .cols { columns: 2; column-gap: 12px; }
  .gallery figure { margin-bottom: 20px; }
  .cue { font-size: 19px; }
}
/* shortest phones: tighten the timeline page so its cue stays on screen one */
@media (max-width: 900px) and (max-height: 700px) {
  .timeline { margin-top: 20px; gap: 8px; }
  .timeline a { font-size: 15px; line-height: 1.35; }
  .cue { padding-top: 20px; font-size: 18px; }
  .slots { gap: 8px; margin-top: 24px; }
  .slots figcaption { font-size: 10px; }
  .gallery .cols { columns: 2; column-gap: 12px; }
  .gallery figure { margin-bottom: 20px; }
  .gallery figcaption b { font-size: 14px; }
  .gallery figcaption span { font-size: 11px; }
}

/* A full list without empty image frames while the photo selection grows. */
.rest-of-list { max-width: 620px; margin: 36px auto 0; font-size: 16px; line-height: 1.6; }
.rest-of-list summary { cursor: pointer; color: var(--muted); padding: 12px 0; }
.rest-of-list ul { padding: 12px 0 0 22px; }
.rest-of-list li { margin-bottom: 12px; }
.rest-of-list a:hover { text-decoration: underline; text-underline-offset: 3px; }
.rec-form .delivery-hint { margin-top: 10px; font-size: 13px; }
.rec-form .email-fallback { margin-top: 12px; font-size: 14px; text-decoration: underline; }
.rec-form .email-fallback:not([hidden]) { display: inline-block; }
.rec-form .send:disabled { opacity: .5; cursor: wait; }
.bookwin :focus-visible { outline: 2px solid var(--muted); outline-offset: 5px; }
@media (prefers-reduced-motion: reduce) {
  .bookwin, .bookwin .now .book3 .b, .bookwin.on .now .book3 .b,
  .tiny .book3 .b, .book3 .shadow { transition: none !important; animation: none !important; }
}

/* A note without a photo stays readable instead of becoming an empty tile. */
.gallery .frame.text-only { aspect-ratio: auto; container-type: normal; background: transparent; }
.gallery .text-only .veil { position: static; opacity: 1; padding: 24px 8px; background: transparent; }
.gallery .text-only .pv { transform: none; }
.gallery .text-only .pd { display: block; }

/* Home hovers contain only the original phrase, with no ellipsis or added blurb. */
.phrase-only .veil { background: rgb(252 251 248 / .64); }
.phrase-only .pt { display: block; -webkit-line-clamp: unset; overflow: visible; font-size: clamp(13px, 6.2cqw, 22px); font-weight: 400; letter-spacing: 0; line-height: 1.45; color: #393832; }
.phrase-only.long-phrase .pt { font-size: clamp(12px, 5.6cqw, 19px); }
.photo-viewer { border: 0; padding: 54px 24px 28px; width: min(960px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); margin: auto; color: var(--ink); background: var(--paper); overflow: auto; }
.photo-viewer::backdrop { background: rgb(252 251 248 / .86); backdrop-filter: blur(12px); }
.photo-viewer figure { margin: 0; }
.photo-viewer img { display: block; width: 100%; max-height: 68dvh; object-fit: contain; }
.photo-viewer figcaption { max-width: 700px; margin: 22px auto 0; font-size: 20px; line-height: 1.4; text-align: center; }
.photo-viewer .image-credit { margin-top: 12px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.photo-viewer .image-credit a { text-decoration: underline; text-underline-offset: 3px; }
.photo-close { position: absolute; right: 12px; top: 8px; width: 44px; height: 44px; border: 0; background: transparent; color: var(--ink); font: 24px var(--sans); cursor: pointer; }
.photo-viewer :focus-visible { outline: 2px solid var(--muted); outline-offset: 4px; }
@media (max-width: 760px) { .photo-viewer { padding: 54px 16px 24px; } .photo-viewer figcaption { font-size: 18px; } }

@media (max-width: 360px) { .site-footer .huge { font-size: clamp(60px, 21vw, 76px); } }

/* A little steam on the existing coffee invitation. */
.coffee-cup { width: 22px; height: 26px; margin-right: 6px; vertical-align: -6px; color: var(--muted); transform-origin: 50% 90%; transition: transform .25s ease; }
.coffee-steam { opacity: .35; }
.coffee-invitation:is(:hover, :focus-visible) .coffee-cup { transform: rotate(-5deg); }
.coffee-invitation:is(:hover, :focus-visible, :active) .coffee-steam { animation: coffee-wisp 1s ease-out 1; }
@keyframes coffee-wisp { 0% { opacity: .35; transform: translateY(2px); } 45% { opacity: .8; } 100% { opacity: .35; transform: translateY(-1px); } }
@media (prefers-reduced-motion: reduce) {
  .coffee-cup { transition: none; }
  .coffee-invitation:is(:hover, :focus-visible) .coffee-cup { transform: none; }
  .coffee-invitation:is(:hover, :focus-visible, :active) .coffee-steam { animation: none; }
}
