/* The homepage. Loaded after site.css and sky.css, only on index.html.
   Hero: the headline, a line about me, and "Last shipped …" (shipped.js) into the Shipped street.
   Work: a mosaic of colour tiles (after raylight.app), or the older glass cards (lab: Work).
   The lab bar (lab.js) switches options with data attributes on <body>. */


/* ───────── Hero ───────── */
.home .hero { position: relative; height: auto; min-height: 0; overflow: clip; padding: 96px var(--gutter) 220px; text-align: center;
  /* Keep the masked horizon on its own layer while the page scrolls. */
  transform: translateZ(0);
  -webkit-mask: linear-gradient(#000 calc(100% - 200px), transparent); mask: linear-gradient(#000 calc(100% - 200px), transparent); }
.stage { position: relative; height: 160px; max-width: 1380px; margin: 0 auto; }
.home .eclipse { left: calc(50% - 60vw); top: 70%; width: 120vw; }
.home .corona { opacity: .6; animation-duration: 180s; }
.home .hero-copy { position: relative; z-index: 6; left: auto; top: auto; translate: none; width: min(100%, 720px); margin: 0 auto; padding: 8px 0 0; }
.home .hero h1 { font-size: clamp(40px, 5.2vw, 76px); line-height: 1.05; }
.home .hero .intro { margin-top: 20px; max-width: 34em; font-size: clamp(16px, 1.2vw, 18px); }
.last { color: var(--ink); white-space: nowrap; }
.last a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--ink) 25%, transparent); text-underline-offset: 3px; transition: text-decoration-color .2s var(--ease); }
.last a:hover { text-decoration-color: var(--ink); }
.last::before { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 7px 2px 1px; border-radius: 50%; background: #f26419; box-shadow: 0 0 0 3px color-mix(in srgb, #f26419 22%, transparent); }

/* Work in the nav lands with air above the first cards, clear of the nav. */
#work { scroll-margin-top: clamp(96px, 8vw, 120px); }

/* ───────── Work as a mosaic: the grid. tiles.css draws the tiles. ───────── */
body[data-work="mosaic"] .work { display: none; }
body[data-work="cards"] .mosaic { display: none; }
.mosaic { position: relative; z-index: 6; max-width: 1380px; margin: -150px auto 0; padding: 0 var(--gutter) 110px; display: grid; grid-template-columns: repeat(12, 1fr); gap: 64px 24px; }
body[data-gap="tight"] .mosaic { gap: 40px 16px; }
body[data-gap="tight"] .work .grid { gap: 22px; }
body[data-gap="tight"] .tile { gap: 14px; }
.m-snap { grid-column: span 7; }
.m-quit { grid-column: span 5; }
.m-jump { grid-column: span 8; }
.m-brain { grid-column: span 4; }
.m-photo, .m-ship { grid-column: span 4; }
.m-jump .tile-art, .m-brain .tile-art { height: 480px; }
.m-photo .tile-art, .m-ship .tile-art { height: 380px; }

/* ───────── The older glass cards (lab: Work → Cards) ───────── */
.home .work { margin-top: -150px; padding-top: 0; }
body.home[data-brain="hide"] .work .item.t-brain { display: none; }
body[data-brain="hide"] .t-shipped { grid-column: span 12; }
.t-shipped { grid-column: span 6; }
.t-shipped .card { min-height: 0; height: 100%; }
.t-shipped .media { display: grid; place-items: center; padding: 30px 20px; }
.t-small .card { min-height: 0; }
.t-small .media { aspect-ratio: 4 / 3; flex: none; }
/* Shipped's light and accent follow its colour (lab: Shipped colour): red, or yellow. */
.t-shipped { --tone: #ff3d2e; --a: #ff3d2e; --b: #ff8a65; --c: #ffb347; }
.t-shipped .blob:nth-child(1) { --c: #ff3d2e; } .t-shipped .blob:nth-child(2) { --c: #ff8a65; } .t-shipped .blob:nth-child(3) { --c: #ffb347; }
body[data-ship="yellow"] .t-shipped { --tone: #f5a300; --a: #ffc21f; --b: #ff8a1f; --c: #ffd84d; }
body[data-ship="yellow"] .t-shipped .blob:nth-child(1) { --c: #ffc21f; } body[data-ship="yellow"] .t-shipped .blob:nth-child(2) { --c: #ff8a1f; } body[data-ship="yellow"] .t-shipped .blob:nth-child(3) { --c: #ffd84d; }

/* Card words (lab). Full: the cards as they were. Lean: the same cards, but each holds only its picture, with the
   name and one line underneath, small, like the mosaic. Just a caption: that, laid out like the mosaic. */
.item-cap { display: none; }
body:is([data-copy="cap"], [data-copy="lean"]) .work .grid { gap: 64px 24px; }
body:is([data-copy="cap"], [data-copy="lean"])[data-gap="tight"] .work .grid { gap: 22px; }
body:is([data-copy="cap"], [data-copy="lean"]) .work .item { display: flex; flex-direction: column; gap: 16px; }
body:is([data-copy="cap"], [data-copy="lean"]) .work .item-cap { display: flex; }
body:is([data-copy="cap"], [data-copy="lean"]) .work :is(.card-top, .card-copy) { display: none; }
body:is([data-copy="cap"], [data-copy="lean"]) .work .item > .card { flex: none; display: block; height: 540px; min-height: 0; }
body:is([data-copy="cap"], [data-copy="lean"]) .work .media { position: absolute; inset: 0; margin: 0; }
body:is([data-copy="cap"], [data-copy="lean"]) .work .t-small .media { inset: 14px; aspect-ratio: auto; }
body:is([data-copy="cap"], [data-copy="lean"]) .work .t-shipped .media { padding: 0; }
body:is([data-copy="cap"], [data-copy="lean"]) .work .t-shipped { order: 1; }
/* Snapshot: phone on the left, the results card behind it on the right, so it isn't next to Quit28's phone. */
body:is([data-copy="cap"], [data-copy="lean"]) .work .t-snapshot .device { position: absolute; width: 35%; height: auto; left: 5%; top: 8%; margin: 0; }
body:is([data-copy="cap"], [data-copy="lean"]) .work .t-snapshot .snap-results { width: 62%; left: 35%; top: 22%; transform: rotate(4deg); }
body:is([data-copy="cap"], [data-copy="lean"]) .work .item.is-hot .snap-results { transform: rotate(6deg) translate3d(4%, -3%, 0); }
/* JumpStart: a little further out than in the old card, so the three screens read as three. */
body:is([data-copy="cap"], [data-copy="lean"]) .work .screen-back { width: 58%; left: 4%; top: 7%; }
body:is([data-copy="cap"], [data-copy="lean"]) .work .screen-front { width: 46%; left: 33%; top: 21%; }
body:is([data-copy="cap"], [data-copy="lean"]) .work .screen-export { width: 32%; left: 63%; top: 47%; }
/* Just a caption: mosaic sizes. */
body[data-copy="cap"] .work .t-snapshot { grid-column: span 7; }
body[data-copy="cap"] .work .t-quit { grid-column: span 5; }
body[data-copy="cap"] .work .t-jump { grid-column: span 8; }
body[data-copy="cap"] .work :is(.t-brain, .t-small, .t-shipped) { grid-column: span 4; }
body[data-copy="cap"] .work :is(.t-jump, .t-brain) > .card { height: 480px; }
body[data-copy="cap"] .work :is(.t-small, .t-shipped) > .card { height: 380px; }
/* Lean: the cards' own sizes, Snapshot, Quit28 and JumpStart across the page and the rest in pairs. */
body[data-copy="lean"] .work :is(.t-snapshot, .t-quit, .t-jump) > .card { height: 640px; }
body[data-copy="lean"] .work :is(.t-brain, .t-small, .t-shipped) > .card { height: 500px; }
body[data-copy="lean"] .work .t-snapshot .device { width: 20%; left: 24%; top: 9%; }
body[data-copy="lean"] .work .t-snapshot .snap-results { width: 44%; left: 39%; top: 19%; }
body[data-copy="lean"] .work .screen-back { width: 44%; left: 9%; top: 8%; }
body[data-copy="lean"] .work .screen-front { width: 36%; left: 34%; top: 22%; }
body[data-copy="lean"] .work .screen-export { width: 25%; left: 63%; top: 44%; }
.earlier { display: none; }

@media (max-width: 900px) {
  .mosaic { gap: 44px 12px; }
  body[data-gap="tight"] .mosaic { gap: 30px 12px; }
  .m-snap, .m-quit, .m-jump, .m-brain, .m-photo, .m-ship { grid-column: span 12; }
  .tile-art, .m-jump .tile-art, .m-brain .tile-art { height: min(110vw, 460px); }
  .m-photo .tile-art, .m-ship .tile-art { height: min(80vw, 340px); }
  /* Tighter stages, so the products fill a phone-width tile. */
  .m-snap .tile-art { height: min(96vw, 420px); }
  .m-snap .art { --w: 400; --h: 420; }
  .m-snap-res { width: 300px; left: -14px; top: 150px; }
  .m-snap-phone { width: 188px; left: 206px; top: 38px; }
  .m-jump .tile-art { height: auto; aspect-ratio: 840 / 560; }
}
@media (max-width: 700px) {
  .home .hero { padding-top: 92px; }
  .home .eclipse { left: -45vw; width: 190vw; top: 72%; }
  .t-shipped { grid-column: span 12; }
  body:is([data-copy="cap"], [data-copy="lean"]) .work .item { grid-column: span 12; }
  body:is([data-copy="cap"], [data-copy="lean"]) .work .grid { gap: 44px 12px; }
  body:is([data-copy="cap"], [data-copy="lean"])[data-gap="tight"] .work .grid { gap: 22px 12px; }
  body:is([data-copy="cap"], [data-copy="lean"]) .work .item > .card { height: min(110vw, 460px); }
  body:is([data-copy="cap"], [data-copy="lean"]) .work :is(.t-small, .t-shipped, .t-jump) > .card { height: min(80vw, 340px); }
  body:is([data-copy="cap"], [data-copy="lean"]) .work .t-snapshot .device { width: 46%; top: 10%; left: 3%; }
  body:is([data-copy="cap"], [data-copy="lean"]) .work .t-snapshot .snap-results { width: 82%; left: 22%; top: 30%; }
  body:is([data-copy="cap"], [data-copy="lean"]) .work .screen-back { width: 66%; left: 3%; top: 7%; }
  body:is([data-copy="cap"], [data-copy="lean"]) .work .screen-front { width: 54%; left: 30%; top: 24%; }
  body:is([data-copy="cap"], [data-copy="lean"]) .work .screen-export { width: 38%; left: 60%; top: 50%; }
  .ship-hero { scale: .8; }
}

/* ───────── Page sky (lab): Shipped street ─────────
   The homepage under the street's sky (streetSky() in shipped.js, following the sun the same way): the gradient,
   the glow on the horizon at sunrise and sunset, the eclipse's disc in the sky's colour, and the glass cards
   frosted over it instead of sitting on white. */
/* A fixed body background repaints during scrolling in WebKit. Cache the same sky separately.
   The old negative-z sun glow sat behind the opaque body background and was not visible. */
body.home[data-skylook="street"] { --pane: rgb(255 255 255 / .45); background: transparent; }
[data-theme="dark"] body.home[data-skylook="street"] { --pane: rgb(24 46 92 / .62); --nav-glass: rgb(40 60 105 / .38); }
body.home[data-skylook="street"] { --nav-glass: rgb(243 247 252 / .42); }
body.home[data-skylook="street"]::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; transform: translateZ(0);
  background: linear-gradient(180deg, var(--sky-top, #9ec0e9) 0%, var(--sky-mid, #cdd9e9) 48%, var(--sky-low, #f9ede2) 92%); }
body.home[data-skylook="street"] .disc { background: var(--sky-top, var(--bg)); }
body.home[data-skylook="street"] .work .card { -webkit-backdrop-filter: blur(22px) saturate(1.4); backdrop-filter: blur(22px) saturate(1.4);
  background: linear-gradient(var(--pane), var(--pane)) padding-box, radial-gradient(260px circle at var(--rx, 50%) var(--ry, -400px), var(--rimc), var(--glass-edge) 72%) border-box; }
/* Cache the expensive soft phone shadows, rather than filtering them again on each scroll frame. */
.home .work :is(.device, .q28-phone, .q28-hand, .shots) { will-change: filter; }

/* ───────── Contact (lab: Contact) ─────────
   Big: as it was, with the LinkedIn and X logos underneath. Quiet: a smaller heading, the email as a plain link. */
.socials { display: flex; justify-content: center; gap: 10px; margin-top: 26px; }
.socials a { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--ink-2); transition: color .3s var(--ease), background-color .3s var(--ease); }
.socials a:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.socials a:hover { color: var(--ink); }
.socials .mark { width: 18px; height: 18px; background: currentColor; -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; }
body[data-contact="quiet"] .contact { padding: 120px var(--gutter) 110px; }
body[data-contact="quiet"] .contact h2 { font-size: clamp(40px, 5vw, 64px); }
body[data-contact="quiet"] .contact .sub { font-size: 16px; }
body[data-contact="quiet"] .email { padding: 0; background: none; color: var(--ink); box-shadow: none; font-size: 18px; text-decoration: underline; text-decoration-color: var(--hair); text-underline-offset: 5px; }
body[data-contact="quiet"] .email::before { display: none; }
body[data-contact="quiet"] .email-icon { width: 17px; height: 17px; }
/* Quiet: the email, then the one handle with the LinkedIn and X logos. Big: the email button, logos underneath. */
.socials .handle { display: none; }
body[data-contact="quiet"] :is(.cta, .socials) { display: inline-flex; vertical-align: middle; margin: 30px 0 0; }
body[data-contact="quiet"] .socials { align-items: center; gap: 0; margin-left: 10px; }
body[data-contact="quiet"] .socials a { width: 38px; height: 38px; padding: 0; justify-content: center; }
body[data-contact="quiet"] .socials .handle { display: inline; order: -1; margin-right: 4px; font-size: 17px; color: var(--ink-2); }
body[data-contact="quiet"] :is(.email, .socials a) { display: inline-flex; align-items: center; gap: 9px; width: auto; height: auto; padding: 8px 14px; border-radius: 999px; font-size: 17px; color: var(--ink); text-decoration: none; transition: background-color .3s var(--ease); }
body[data-contact="quiet"] :is(.email, .socials a):hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
body[data-contact="quiet"] .socials .mark { width: 16px; height: 16px; }
body[data-contact="quiet"] .socials a[aria-label="X"] .mark { width: 13px; height: 13px; }
body[data-contact="quiet"] .email:hover { box-shadow: none; }



/* Amp's card: the floating screens from its own page, no photo behind them, so it fills the card like the others.
   It moves with the pointer like the other cards' layers (data-depth), and doesn't zoom. */
body:is([data-copy="cap"], [data-copy="lean"]) .work :is(.t-amp, .t-cipher) .media { inset: 0; border-radius: 0; overflow: visible; }
.work :is(.t-amp, .t-cipher) .media img, .item.is-hot:is(.t-amp, .t-cipher) .media img { object-fit: contain; transform: scale(1.08); }
.work .t-cipher .media img, .item.is-hot.t-cipher .media img { transform: scale(.9); } /* a tall laptop: smaller, so it floats clear of the edge */

/* ───────── About (lab: About) ─────────
   Long: as it was. Short: the same, two paragraphs. Painting: the words on the right give way to The Herring Net,
   hung like a card with a caption. Sentence: one big sentence with my photo, the two logos and the painting in it. */
.about-short, .about-art, .about-line { display: none; }
body:is([data-about="short"], [data-about="art"], [data-about="off"]) .about-body { display: none; }
/* Photo and a line: a photo of something I do outside work, and one line about it.
   Anything in .is-gap is a placeholder for Shea's own words. */
.about-off { display: none; }
body[data-about="off"] .about-off { display: block; align-self: end; }
.about-off-photo { display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: 6px; border: 1px dashed var(--whisper); color: var(--whisper); font-size: 14px; rotate: -1.2deg; }
.about-off figcaption { margin-top: 20px; font-size: 20px; line-height: 1.5; color: var(--ink-2); max-width: 40ch; }
.is-gap { color: var(--whisper); font-style: italic; }
body[data-about="short"] .about-short { display: block; align-self: end; }
.about-short p { font-size: 20px; line-height: 1.55; color: var(--ink-2); max-width: 40ch; }
.about-short p + p { margin-top: 18px; }
body[data-about="art"] .about { align-items: end; }
body[data-about="art"] .about-art { display: grid; gap: 16px; rotate: 1.2deg; }
.about-art img { display: block; width: 100%; height: auto; border-radius: 6px; box-shadow: 0 1px 2px rgb(0 0 0 / .2), 0 30px 60px -20px rgb(0 0 0 / .45); }
.about-art .tile-cap { rotate: -1.2deg; }
body[data-about="line"] .about { display: block; padding-top: 120px; text-align: center; }
body[data-about="line"] .about > :not(.about-line) { display: none; }
body[data-about="line"] .about-line { display: block; max-width: 23em; margin: 0 auto; font-family: var(--serif); font-weight: 300; font-size: clamp(28px, 3.4vw, 50px); line-height: 1.26; letter-spacing: var(--track-heading); text-wrap: balance; }
.about-line .in-photo, .in-art { display: inline-block; height: 1.05em; width: auto; vertical-align: -.2em; }
.about-line .in-photo { aspect-ratio: 1; border-radius: 50%; object-fit: cover; }
.in-art { border-radius: .12em; rotate: -3deg; margin: 0 .1em; box-shadow: 0 .1em .3em rgb(0 0 0 / .3); transition: rotate .3s var(--ease), scale .3s var(--ease); }
/* The painting in the sentence opens bigger: it flies out of the line into a pop-up (site.js) and back on any click or Esc. */
/* The logos and the painting are small things in a line of text, so each takes clicks from a little way around it. */
.about-line .org-link, .in-art-btn { position: relative; z-index: 1; padding: .3em .22em; margin: -.3em -.22em; }
.in-art-btn { display: inline; cursor: zoom-in; }
.in-art-btn:is(:hover, :focus-visible) .in-art { rotate: 0deg; scale: 1.12; }
.in-art-btn:focus-visible { outline: none; }
.in-art-btn:focus-visible .in-art { outline: 2px solid var(--ink); outline-offset: 3px; }
.art-zoom { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 24px; border: 0; background: none; cursor: zoom-out; }
.art-zoom[open] { display: grid; place-content: center; justify-items: center; gap: 16px; }
.art-zoom::backdrop { background: rgb(8 8 12 / .78); opacity: 0; transition: opacity .35s var(--ease); }
.art-zoom.is-open::backdrop { opacity: 1; }
.art-zoom img { width: min(1200px, calc(100vw - 48px), (100dvh - 110px) * 1.63); height: auto; border-radius: 8px; box-shadow: 0 30px 80px -20px rgb(0 0 0 / .6); }
.art-zoom p { font-size: 15px; color: rgb(255 255 255 / .7); opacity: 0; transition: opacity .3s var(--ease); }
.art-zoom p b { font-weight: 400; font-style: italic; color: #fff; margin-right: 6px; }
.art-zoom.is-open p { opacity: 1; transition-delay: .2s; }
.about-line .org-mark { display: inline-block; height: .8em; vertical-align: -.08em; }
.about-line .org-mark.is-influential { width: 1.98em; vertical-align: .04em; }
.about-line .org-mark.is-ulster { width: 1.45em; }
.about-line .org-mark::before { opacity: .9; }
/* The logos in the sentence link to Influential and Ulster; on hover the grey mark gives way to the colour one. */
.org-link:is(:hover, :focus-visible) .org-mark::before { opacity: 0; }
.org-link:is(:hover, :focus-visible) .org-mark::after { opacity: 1; }
/* Sentence, big pictures: the photo and the painting grow into the line. */

/* ───────── Horizon (lab) ─────────
   Arc, none, or Sun and moon: a whole small circle above the headline. By day a pale sun with a clean edge and a
   soft bloom, turning the sky's own orange at sunset. At night the moon, in tonight's real phase (--moon, set by
   site.js: how far the lit edge reaches across, right when waxing), and only the lit part drawn.
   None has nothing to make room for, so the headline moves up. */
body[data-arc="none"] .eclipse { display: none; }
body[data-arc="none"] .stage { height: 84px; }
body:is([data-arc="none"], [data-arc="sun"]) :is(.sun, .corona) { display: none; }
/* The arc leans with the pointer (--lx, --ly from site.js). */
.home .disc, .home .corona { translate: var(--lx, 0px) var(--ly, 0px); }
/* The sun really sets (--sink from site.js: 0 up, about a half with its middle on the horizon at sunset, .84 just
   gone). It goes under a soft horizon at the foot of the stage as the page turns dark, and the moon comes up from
   the same line straight after. Which of the two is showing is the disc's own data-orb, not the theme, so they
   only ever swap below the horizon; site.js eases every move, however the time got there. */
/* The stage reaches up to the top of the page here, so the horizon only cuts the glow at the bottom. */
body[data-arc="sun"] .stage { height: 256px; margin-top: -96px; -webkit-mask: linear-gradient(#000 calc(100% - 30px), transparent); mask: linear-gradient(#000 calc(100% - 30px), transparent); }
body[data-arc="sun"] .disc { translate: var(--lx, 0px) calc(var(--ly, 0px) + var(--sink, 0) * 180px); opacity: clamp(0, (.84 - var(--sink, 0)) * 9, 1); }
body[data-arc="sun"] .disc[data-orb="moon"] { rotate: 22deg; }
body[data-arc="sun"] .eclipse { --d: 124px; width: var(--d); left: calc(50% - var(--d) / 2); top: 106px; }
body.home[data-arc="sun"] .disc { --sun: color-mix(in srgb, var(--sky-sun, #ff9a5c) calc(var(--sky-sun-a, 0) * 90%), #fffaf0);
  background: radial-gradient(circle at 50% 36%, color-mix(in srgb, var(--sun) 70%, #fff), var(--sun));
  box-shadow: 0 0 46px 6px color-mix(in srgb, var(--sun) 55%, transparent), 0 0 150px 50px color-mix(in srgb, var(--sun) 22%, transparent); }
body.home[data-arc="sun"] .disc[data-orb="moon"] { background: none; box-shadow: inset calc(var(--moon, -.4) * var(--d)) 0 0 0 #f1eee3;
  filter: drop-shadow(0 0 18px rgb(206 220 255 / .45)); }
@media (max-width: 700px) { body[data-arc="sun"] .eclipse { --d: 96px; top: 126px; } body[data-arc="sun"] .stage { height: 252px; margin-top: -92px; } }
/* Ring colour: the sky's own light, warm at sunrise and pearl white at night (lab: the brand rainbow). */
body[data-ring="sky"] .corona { background: conic-gradient(from 0deg, #ffd08a, #ff9d6e 60deg, #ffc9d8 120deg, #fff1d2 180deg, #ffb07c 240deg, #ffd9e4 300deg, #ffd08a); }
[data-theme="dark"] body[data-ring="sky"] .corona { background: conic-gradient(from 0deg, #fff, #a9c1ff 70deg, #f3f6ff 140deg, #7f9cf0 210deg, #fff 280deg, #c9d6ff 330deg, #fff); }

/* ───────── Contact ─────────
   The heading, then the email, LinkedIn and X as grey words with dots between. On hover a word goes
   full ink and a thick underline fades in, breaking around g, y and p (after pengzhe.ng). */
.socials .word { display: none; }
body[data-layout="peng"] .contact :is(.sub, .handle, .mark, .email-icon) { display: none; }
body[data-layout="peng"] .socials .word { display: inline; }
body[data-layout="peng"] .socials { margin-left: -.3em; gap: 0; } /* cancels the space after the email */
body[data-layout="peng"] .contact :is(.email, .socials a) { display: inline-block; padding: 0; border-radius: 0; background: none; font-size: 20px; color: var(--ink-2);
  text-decoration: underline transparent; text-decoration-thickness: .09em; text-underline-offset: .22em; text-decoration-skip-ink: auto; transition: color .15s ease, text-decoration-color .15s ease; }
body[data-layout="peng"] .contact :is(.email, .socials a):is(:hover, :focus-visible) { background: none; color: var(--ink); text-decoration-color: currentColor; }
body[data-layout="peng"] .socials a::before { content: "·"; display: inline-block; margin: 0 .55em; color: var(--whisper); }

@media (max-width: 700px) {
  .last { white-space: normal; }
  .home .hero .intro { text-wrap: pretty; }
  /* The gap from the last card to About was a third of the screen; half that still reads as a new section. */
  .home .work { padding-bottom: 56px; }
  body[data-about="line"] .about { padding-top: 64px; }
}

/* ───────── Card pictures arriving ─────────
   site.js marks each picture .is-loaded when it's ready; until then it's hidden, so nothing pops in half drawn. */
:root:not(.hop) .work .media img:not(.is-loaded) { opacity: 0; }
:root:not(.hop) .work .media img.is-loaded { animation: arrive-fade .8s var(--ease); }
@keyframes arrive-fade { from { opacity: 0; } }

/* ───────── Intro (intro.js) ─────────
   html.intro hides the first screen until it starts; .intro-go plays it; .intro-land brings the work in.
   --intro-land is when the sun has settled. The stage stops clipping it, so it comes up through the soft fade at
   the foot of the hero, as if over a horizon, big, and shrinks into its place above the headline. */
:root { --intro-land: 1.8s; }
.intro:not(.intro-go) :is(.home .hero-copy, .home .eclipse, .nav), .intro:not(.intro-land) #work { opacity: 0; }
.intro-go .home .stage { overflow: visible; -webkit-mask: none; mask: none; }
.intro-go .home .eclipse { z-index: 5; will-change: transform; animation: sun-rise 2.2s cubic-bezier(.4, 0, .2, 1) both; }
@keyframes sun-rise { from { transform: translateY(max(520px, 62vh)) scale(3); } 45% { transform: translateY(120px) scale(2.2); } to { transform: none; } }
/* The words: the first line rises out of a blur, then "something.", the line under it, and the nav. */
.intro-go .home .hero :is(h1, h1 em, .intro) { animation: intro-in 1.1s var(--ease) calc(var(--intro-land) - .5s) both; }
.intro-go .home .hero h1 em { animation-name: intro-blur; animation-delay: calc(var(--intro-land) - .25s); }
.intro-go .home .hero .intro { animation-delay: calc(var(--intro-land) - .05s); }
.intro-go .nav { animation: intro-blur .9s var(--ease) calc(var(--intro-land) + .1s) both; }
.intro-land #work { animation: intro-rise 1.1s var(--ease) both; }
@keyframes intro-in { from { opacity: 0; transform: translateY(26px); filter: blur(10px); } }
@keyframes intro-rise { from { opacity: 0; transform: translateY(90px); } }
@keyframes intro-blur { from { opacity: 0; filter: blur(10px); } }

/* ───────── Page (lab: Page) ─────────
   Sky: the time-of-day gradient. One colour: the sky as one flat colour that still changes through the day. */
body.home[data-page="tint"]::before { background: color-mix(in srgb, var(--sky-top, #9ec0e9) 35%, var(--sky-mid, #cdd9e9)); }

/* ───────── Cards (lab: Fill, Edge, Glow, Shadow) ─────────
   Each effect on the glass cards switches on its own. Frosted blurs what's behind; Clear is a light wash with no
   blur, so the card takes the colour of the sky behind it: a container more than a card. */
body.home { --clear: rgb(255 255 255 / .38); }
[data-theme="dark"] body.home { --clear: rgb(255 255 255 / .05); }
body.home[data-fill="clear"] .work .card { -webkit-backdrop-filter: none; backdrop-filter: none;
  background: linear-gradient(var(--clear), var(--clear)) padding-box, radial-gradient(260px circle at var(--rx, 50%) var(--ry, -400px), var(--rimc), var(--glass-edge) 72%) border-box; }
body.home[data-fill="clear"] .work .card::after { display: none; }
/* No edge: no lit border, and the fill runs to the very edge so no gap is left where the border was. */
body.home[data-edge="off"] .work .item { --rim: transparent; }
body.home[data-edge="off"] .work .card { --glass-edge: transparent; --rimc: transparent; background-clip: border-box; }
body.home[data-glow="off"] :is(.work .bleed, .contact-glow) { display: none; }
body.home[data-shadow="off"] .work .card { box-shadow: none; }

/* ───────── Top (lab: Top) ─────────
   Headline: the big serif line. A paragraph: no headline, just who I am and what I've made, at reading size. */
.intro-who { display: none; }
body.home[data-hero="line"] .hero .stage, body.home[data-hero="line"] .hero h1 { display: none; }
body.home[data-hero="line"] .hero { padding-top: clamp(120px, 21vh, 210px); padding-bottom: 250px; }
body.home[data-hero="line"] .intro-who { display: inline; }
body.home[data-hero="line"] .hero .intro, body[data-about="para"] .about-short { font-size: clamp(19px, 1.75vw, 25px); line-height: 1.45; font-weight: 400; letter-spacing: -.012em; color: var(--ink); }
body.home[data-hero="line"] .hero .intro { margin-top: 0; max-width: 23em; text-wrap: balance; }
body.home[data-hero="line"] .hero .intro .last { white-space: normal; color: var(--ink-2); }

/* ───────── About, two more ways (lab: About) ─────────
   Paragraph: the photo, then the short version at reading size, like the paragraph at the top.
   Index: the photo and the line, then a short list of facts, a label and a value a row (Peng's work list). */
.about-index { display: none; }
body:is([data-about="para"], [data-about="index"]) .about { display: block; padding-top: 120px; text-align: center; }
body:is([data-about="para"], [data-about="index"]) .about > :not(:first-child, .about-short, .about-index),
body[data-about="para"] .about > :first-child > :not(.about-photo), body[data-about="index"] .about-where { display: none; }
body:is([data-about="para"], [data-about="index"]) .about-photo { margin: 0 auto 28px; }
body[data-about="para"] .about-photo { width: 76px; height: 76px; }
body[data-about="index"] .about-photo { width: 104px; height: 104px; }
body[data-about="para"] .about-short { display: block; max-width: 23em; margin: 0 auto; }
body[data-about="para"] .about-short p { max-width: none; font: inherit; letter-spacing: inherit; color: var(--ink); text-wrap: pretty; }
body[data-about="para"] .about-short p + p { color: var(--ink-2); }
body[data-about="index"] .about-index { display: grid; gap: 12px; width: fit-content; margin: 44px auto 0; font-size: clamp(16px, 1.3vw, 19px); text-align: left; }
.about-index div { display: grid; grid-template-columns: 8.5em minmax(0, 24em); gap: 22px; }
.about-index dt { color: var(--whisper); text-align: right; }
.about-index dd { color: var(--ink); text-wrap: balance; }
@media (max-width: 700px) {
  body.home[data-hero="line"] .hero { padding-top: 120px; padding-bottom: 230px; }
  body.home[data-hero="line"] .hero .intro, body[data-about="para"] .about-short { font-size: 20px; }
  body:is([data-about="para"], [data-about="index"]) .about { padding-top: 64px; }
  body[data-about="index"] .about-index { text-align: center; margin-top: 32px; }
  .about-index div { grid-template-columns: 1fr; gap: 2px; }
  .about-index dt { text-align: center; }
}

/* ───────── Room around the top (lab: Room around the top) ─────────
   The first card starts where the hero ends, less the 150px it tucks under. Work shows early: as it is. Work peeks at
   the bottom: the words sit in the middle of the first screen and the top of the first card shows at its foot. */
body.home[data-air="airy"] .hero { display: flex; flex-direction: column; justify-content: center; padding-top: 72px; }
body.home[data-air="airy"] .hero { min-height: calc(82svh + 150px); }
body.home[data-air="airy"] .hero .stage { display: none; }

/* ───────── About: Built for me (lab: About) ─────────
   The photo, the line and where I work on the left; on the right, the tools I actually built, a name and a line each.
   With the paragraph at the top (which already says where I work), the left drops the two logos. */
.about-mine { display: none; }
body[data-about="mine"] :is(.about-body, .about-short, .about-art, .about-off, .about-line, .about-index) { display: none; }
body[data-about="mine"] .about { align-items: end; }
body[data-about="mine"] .about-mine { display: block; }
body[data-about="mine"][data-hero="line"] .about-where { display: none; }
.about-mine ul { list-style: none; display: grid; gap: 26px; margin-top: 18px; }
.about-mine li { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 18px; font-size: 18px; line-height: 1.45; }
.about-mine li > :not(img) { grid-column: 1; }
.about-mine li > img { grid-column: 2; grid-row: 1 / span 2; }
.about-mine b { font-weight: 400; color: var(--ink); }
.about-mine span { color: var(--ink-2); }
.about-mine img { width: 64px; height: auto; border-radius: 3px; rotate: 3deg; box-shadow: 0 .3em .8em rgb(0 0 0 / .25); }
@media (max-width: 700px) {
  body.home[data-air="airy"] .hero { min-height: calc(76svh + 150px); }
}

/* ───────── About: Index + contact (lab: About) ─────────
   The index with a last row for getting in touch, so there's no separate "Say hello" screen after it. It gets the
   room that screen had: it fills the screen on its own. */
.about-say { display: none !important; }
body[data-about="together"] .about-say { display: grid !important; }
/* No underlines at rest: "Say hello" and an email address already read as links. Underline on hover, like the case pages. */
.about-say a { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; transition: text-decoration-color .2s var(--ease); }
.about-say a:hover { text-decoration-color: color-mix(in srgb, var(--ink) 40%, transparent); }
body[data-about="together"] .about { display: flex; flex-direction: column; justify-content: center; min-height: 100svh; padding: 100px var(--gutter); text-align: center; }
body[data-about="together"] .about > :not(:first-child, .about-index), body[data-about="together"] .about-where { display: none; }
body[data-about="together"] .about-photo { width: 104px; height: 104px; margin: 0 auto 28px; }
body[data-about="together"] .about-index { display: grid; gap: 12px; width: fit-content; margin: 44px auto 0; font-size: clamp(16px, 1.3vw, 19px); text-align: left; }
body[data-about="together"] .contact { display: none; }
@media (max-width: 700px) {
  body[data-about="together"] .about { min-height: 0; padding: 64px var(--gutter) 96px; }
  body[data-about="together"] .about-index { text-align: center; margin-top: 32px; }
}

/* ───────── Cards: the pictures tilt ─────────
   The card stays put. What's inside it tilts towards the pointer (--px/--py, eased by q28-card.js) while its layers
   slide apart by depth (site.js), so a flat picture like Amp's or Cipher's turns rather than slides. */
@media (hover: hover) and (pointer: fine) {
  .home .work .item .media { transform: perspective(1200px) rotateX(calc(var(--py, 0) * -9deg)) rotateY(calc(var(--px, 0) * 11deg)); }
}

/* ───────── Cards arriving ─────────
   Each card fades up a little, the second in a row a beat after the first (--d), and its pictures settle from a
   touch bigger as it lands, so it arrives as one piece rather than a box and then its contents. */
.js .home .work .item.reveal { translate: 0 26px; transition: opacity .9s var(--ease), translate 1.2s var(--ease); transition-delay: var(--d, 0s); }
.js .home .work .item.reveal.in { translate: none; }
.js .home .work .item.reveal > .card > .media { scale: 1.045; transition: scale 1.6s var(--ease) var(--d, 0s); }
.js .home .work .item.reveal.in > .card > .media { scale: 1; }
