@import url('fonts/fonts.css');

:root {
  --night: #030812; --deep: #061226; --soil: #02050b;
  --fiber: #2f8cff; --cyan: #6fe3ff; --azure: #5ab4ff; --hot: #e6fbff;
  --ink: #eaf2ff; --ink-2: #a9b8cd; --ink-3: #74879f;
  --glass: rgba(8, 17, 32, .66); --line: rgba(120, 180, 255, .14);
  --display: Anybody, system-ui, sans-serif; --text: Figtree, system-ui, sans-serif;
  /* The header: the oak stands at the right, seen from the front, with a hollow in its trunk. --trunk is the trunk's
     radius on screen and --axis where its middle stands; main3d.js reads both (and where the hollow is) from
     .door-probe, so this is the one place they are set. The intro keeps clear of it. Past the hollow the page is read
     inside the trunk, in one centred column (--col). */
  --pad: clamp(24px, 6vw, 110px);
  --trunk: clamp(120px, 10.5vw, 230px);
  --room: 100vw; /* the width the header is laid out in: the screen, up to 2400 px (below) */
  --off: 0px;    /* and how far in from the left that width starts */
  --axis: calc(var(--off) + var(--room) - var(--trunk) * 1.5);
  --col: min(860px, calc(100vw - 2 * var(--pad)));
  --door-dy: 28svh; /* (a phone only: where the hollow is, below the foot of the header; on a bigger screen main3d.js puts it 62% of the way down the first screen) */
  color-scheme: dark;
}
/* Wide screens: the sections take more of the width (up to 1560 px; from about 1150 px they split into a heading column
   and a body column). Past 2400 px the header is laid out in a 2400 px picture in the middle, so the oak never drifts
   away from the words, and the night goes on at both sides. */
@media (min-width: 1600px) {
  :root {
    --pad: max(clamp(24px, 6vw, 110px), calc((100vw - 3400px) / 2 + 110px));
    --col: min(1560px, calc(100vw - 2 * var(--pad)));
  }
}
@media (min-width: 2400px) {
  :root { --trunk: 230px; --room: 2400px; --off: calc((100vw - 2400px) / 2); --pad: calc(var(--off) + 110px); }
}
* { box-sizing: border-box; }
html { background: var(--soil); }
/* Lenis (boot.js) smooths the mouse wheel; the rules it needs, from its own lenis.css */
html.lenis, html.lenis body { height: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis.lenis-smooth iframe { pointer-events: none; }
.lenis [data-lenis-prevent] { overscroll-behavior: contain; }
body { position: relative; margin: 0; color: var(--ink); font: 400 17px/1.6 var(--text); overflow-x: hidden; }
main, .foot { position: relative; z-index: 1; }

/* ── the night sky: plain CSS, so it is there from the first paint ────────
   a deep-blue gradient with a moon glow off the top left, an aurora drifting slowly across the top, stars.
   boot.js sets --sky from 1 at the top of the page to 0 two and a half screens down: the aurora and the
   stars fade as you go down into the forest. */
.sky {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background:
    radial-gradient(80vmax 55vmax at 20% -14%, rgba(54, 104, 220, .24), rgba(30, 70, 180, .08) 45%, transparent 70%),
    linear-gradient(180deg, #071736 0%, #051029 32%, #040b1e 62%, #030815 100%);
}
.sky i { position: absolute; display: block; }
.sky__aurora { inset: -10vh -20vw auto -20vw; height: 66vh; opacity: var(--sky, 1); mix-blend-mode: screen; filter: blur(26px); }
.sky__aurora b { position: absolute; display: block; border-radius: 50%; will-change: transform; }
.sky__aurora b:nth-child(1) { left: 22%; top: 16%; width: 66%; height: 24%; transform: rotate(-9deg);
  background: linear-gradient(90deg, transparent, rgba(43, 200, 255, .30) 28%, rgba(47, 108, 255, .34) 62%, transparent); animation: aur1 40s ease-in-out infinite alternate; }
.sky__aurora b:nth-child(2) { left: 44%; top: 34%; width: 60%; height: 18%; transform: rotate(-4deg);
  background: linear-gradient(90deg, transparent, rgba(47, 108, 255, .26) 34%, rgba(110, 170, 255, .2) 70%, transparent); animation: aur2 56s ease-in-out infinite alternate; }
.sky__aurora b:nth-child(3) { left: 4%; top: 6%; width: 52%; height: 16%; transform: rotate(-15deg);
  background: linear-gradient(90deg, transparent, rgba(43, 210, 255, .2) 45%, transparent); animation: aur3 47s ease-in-out infinite alternate; }
@keyframes aur1 { to { transform: translateX(7%) rotate(-6deg) scaleY(1.3); } }
@keyframes aur2 { to { transform: translateX(-9%) rotate(-7deg) scaleY(.8); } }
@keyframes aur3 { to { transform: translateX(10%) rotate(-11deg) scaleY(1.2); } }
.sky__stars { inset: 0 0 30% 0; opacity: var(--sky, 1); -webkit-mask-image: linear-gradient(#000 0, #000 30%, transparent); mask-image: linear-gradient(#000 0, #000 30%, transparent); }
.sky__stars::before, .sky__stars::after { content: ''; position: absolute; inset: 0; background-image: var(--stars); background-size: 520px 360px; }
.sky__stars::after { background-size: 760px 520px; background-position: 210px 90px; opacity: .7; animation: twinkle 6s ease-in-out infinite alternate; }
@keyframes twinkle { to { opacity: .15; } }
a { color: var(--cyan); }
:focus-visible { outline: 2px solid var(--azure); outline-offset: 3px; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 5; background: var(--deep); padding: 8px 12px; border-radius: 6px; }
.skip:focus { top: 12px; }

/* ── canopy ────────────────────────────────────────────────────────── */
.canopy {
  position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center;
  padding: max(180px, 25vh) calc(var(--off) + var(--trunk) * 2.5 + 40px) 120px var(--pad);
}
.intro { position: relative; isolation: isolate; max-width: 660px; padding: 30px 0 34px; }
/* the portrait large, beside the name and its words (a column of its own), so the first thing you meet is the person */
@media (min-width: 861px) {
  .intro { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto auto; column-gap: clamp(38px, 3.6vw, 66px); align-items: center; max-width: 1000px; }
  .intro .portrait { grid-row: 1 / span 3; width: clamp(220px, 19.5vw, 330px); height: auto; aspect-ratio: 1; margin: 0; align-self: center; }
  .intro h1 { align-self: end; font-size: clamp(44px, 5.4vw, 92px); }
  .intro .facts { align-self: start; }
}
.intro::before { /* a pool of shade under the crown so the words read over the leaves */
  content: ''; position: absolute; z-index: -1; inset: -60px -120px -60px calc(-1 * var(--pad)); pointer-events: none;
  background: radial-gradient(farthest-side at 36% 50%, rgba(3, 9, 20, .9), rgba(3, 9, 20, .7) 55%, transparent);
}
.portrait { position: relative; width: 148px; height: 148px; margin: 0 0 34px 16px; border-radius: 50%; }
.portrait .holo { box-shadow: 0 0 0 1px rgba(111, 227, 255, .4), 0 0 80px -8px rgba(47, 140, 255, .55); }
.portrait .holo { width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 0 0 1px rgba(111, 227, 255, .4), 0 0 60px -6px rgba(47, 140, 255, .55); }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.portrait__ring {
  position: absolute; inset: -16px; border-radius: 50%; pointer-events: none;
  background: repeating-conic-gradient(rgba(111, 227, 255, .55) 0 .6deg, transparent .6deg 6deg);
  -webkit-mask: radial-gradient(circle, transparent calc(50% - 7px), #000 calc(50% - 6px), #000 50%, transparent 50.5%);
          mask: radial-gradient(circle, transparent calc(50% - 7px), #000 calc(50% - 6px), #000 50%, transparent 50.5%);
  animation: spin 90s linear infinite;
}
@keyframes spin { to { transform: rotate(1turn); } }

/* holograms: photos arrive tinted blue with scan lines and turn real when they are in focus */
.holo { position: relative; display: block; overflow: hidden; border-radius: 8px; background: #0b1a33; }
.holo img { display: block; width: 100%; height: auto; filter: grayscale(1) contrast(1.08) brightness(.95); transition: filter .9s ease; }
.holo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(160deg, #3d8dff, #123a8a); mix-blend-mode: color; transition: opacity .9s ease; }
.holo::before { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(160, 225, 255, .09) 0 1px, transparent 1px 3px); transition: opacity .9s ease; }
.is-real .holo img, .holo.is-real img { filter: none; }
.is-real .holo::after, .is-real .holo::before, .holo.is-real::after, .holo.is-real::before { opacity: 0; }

.intro h1 { margin: 0; font: 850 clamp(44px, 6.4vw, 96px)/.92 var(--display); font-stretch: 128%; letter-spacing: -.01em; text-shadow: 0 0 40px rgba(47, 140, 255, .35); }
.intro__line { margin: 18px 0 0; max-width: 44ch; color: var(--ink-2); font-size: 19px; }
@media (min-width: 1600px) {
  .intro { max-width: 1180px; }
  .intro h1 { font-size: clamp(88px, 4.4vw, 128px); }
  .intro__line { max-width: 46ch; font-size: 21px; }
  .soil { width: min(var(--col), 1120px); }
}
/* three short facts under the line: the first two stacked in a 40% column, the third in the 60% column beside them */
.facts { display: grid; grid-template-columns: 2fr 3fr; gap: 18px 28px; max-width: 640px; margin: 34px 0 0; }
.facts > :nth-child(3) { grid-column: 2; grid-row: 1 / span 2; }
.fact dt { margin: 0 0 6px; font: 650 13px/1.2 var(--display); font-stretch: 85%; color: var(--azure); }
.fact dd { margin: 0; font-size: 16px; line-height: 1.4; }
.cue { position: absolute; left: calc(var(--axis) - 76px); top: calc(100svh - 74px); width: 152px; text-align: center; margin: 0; padding: 6px 12px; border-radius: 999px; background: rgba(3, 8, 18, .85); font: 600 13px var(--display); font-stretch: 80%; color: var(--ink-3); text-decoration: none; transition: color .25s, background-color .25s; }
.cue:hover { color: var(--ink); background: rgba(8, 20, 40, .95); }
/* The stretch between the header and the first section: nothing in it but the dive (main3d.js flies the camera through
   the hollow while this scrolls by). Without the 3D scene it takes no room. door-probe says where the hollow is: its
   left is the trunk's axis, its width the trunk's radius, its top the hollow's height measured from the stage. */
.stage { display: none; position: relative; }
.gl-on .stage { display: block; height: max(300px, calc(62svh - 210px)); }
.door-probe { position: absolute; left: var(--axis); top: var(--door-dy); width: var(--trunk); height: 0; visibility: hidden; pointer-events: none; }
/* the header goes out of view as the camera flies at the hollow (--out, 0 to 1, set by main3d.js): it fades, so it never
   stands over the glow of the hollow. It is back, in full, when you scroll up. */
/* a lens over the scene: darker towards the edges the deeper you are (--inside, 0 to 1, set by main3d.js), and the veil
   a short dark fade, used instead of the camera move when motion is reduced */
.veil { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0; background: #010409; }
.cue::after { content: ''; display: block; width: 8px; height: 8px; margin: 8px auto 0; border-right: 1.5px solid var(--cyan); border-bottom: 1.5px solid var(--cyan); transform: rotate(45deg); animation: bob 2.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(5px) rotate(45deg); } }

/* ── trunk: the sections, as the chapters of a story ─────────────────
   Each section is a chapter: a ring line across the page where it starts (drawn as it arrives, view.js), a big
   heading (the branch arrives level with it, at the column's right edge: main3d.js), a story line under it, then its
   items in a layout of its own (sections.mjs), so no two chapters scroll by alike: four tiles for Now, a ledger for
   What I do, a showcase for the projects, big statements for How I work, tags for the skills, a timeline for the
   path, a gallery for Away, one big voice for the quotes. A soft shadow under the letters keeps them clear where a
   light drifts by. */
:root {
  --panel: rgba(7, 17, 34, .34); --panel-line: rgba(120, 180, 255, .16);
  --chip: rgba(9, 22, 44, .84); --chip-line: rgba(111, 227, 255, .22);
  --ring-line: rgba(111, 227, 255, .3); --knot-gap: rgba(3, 8, 18, .92);
}
.trunk { position: relative; padding: 210px 0 150px; }
.nodes { position: relative; margin: 0 auto; padding: 0; width: var(--col); container: nodes / inline-size; }
.node { position: relative; }
.node + .node { margin-top: 290px; }
.card { position: relative; }
/* the ring line: where a chapter starts, from the edge of the page to where its branch arrives */
.node::before {
  content: ''; position: absolute; top: -145px; left: calc(50% - 50vw); right: calc(50% - 50vw); height: 1px; pointer-events: none; transform-origin: 50% 50%;
  background: linear-gradient(90deg, transparent, var(--ring-line) 18%, var(--ring-line) 82%, transparent);
}
.node:first-child::before { top: -115px; }
/* each chapter draws itself in once, as it comes into view (view.js sets .reveal and .is-in; without them all shows) */
.reveal .node::before { transform: scaleX(0); transition: transform 1.5s cubic-bezier(.2, .7, .2, 1); }
.reveal .node.is-in::before { transform: none; }
.reveal .node__side { opacity: 0; transform: translateY(28px); transition: opacity .9s ease .15s, transform 1.2s cubic-bezier(.2, .7, .2, 1) .15s; }
.reveal .node.is-in .node__side { opacity: 1; transform: none; }
.trunk :is(h2, h3, p, dt, dd, li, blockquote, figcaption) { text-shadow: 0 0 20px rgba(3, 8, 18, .95), 0 1px 3px rgba(3, 8, 18, .85); }
.node__title { margin: 0; max-width: 16ch; font: 820 clamp(40px, 4.3vw, 66px)/.98 var(--display); font-stretch: 124%; letter-spacing: -.01em; transition: text-shadow .8s; }
.trunk .node.is-active .node__title { text-shadow: 0 0 34px rgba(111, 227, 255, .32), 0 0 20px rgba(3, 8, 18, .95); }
.node__note { display: inline-block; margin: 18px 0 0; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--panel-line); color: var(--ink-3); font-size: 14px; }
/* the story line under the heading: lighter and larger than the text, the voice that carries you from chapter to chapter */
.node__lede { margin-top: 26px; }
.node__lede p { margin: 0; max-width: 44ch; color: var(--ink-2); font: 360 clamp(20px, 1.65vw, 25px)/1.48 var(--text); }
.node__lede p + p { margin-top: 14px; }
.node__media { display: grid; gap: 12px; margin-top: 30px; }
.node__body { margin-top: 52px; container: body / inline-size; }
.node__body:empty { display: none; }
.node p, .node dd, .node li, .node blockquote, .node figure { text-wrap: pretty; }
.list { list-style: none; margin: 0; padding: 0; }

/* room enough (wide screens): the heading, its words and its photos in a column of their own, staying in view while
   the items scroll past beside them; the branch still arrives level with the heading's first line */
@container nodes (min-width: 1150px) {
  .node { display: grid; grid-template-columns: minmax(0, 36fr) minmax(0, 64fr); column-gap: clamp(48px, 5cqi, 96px); align-items: start; }
  .node__side { position: sticky; top: 132px; }
  .node__title { font-size: clamp(48px, 4.1cqi, 70px); max-width: 11ch; }
  .node__lede p { font-size: clamp(19px, 1.5cqi, 23px); }
  .node__body { margin-top: 8px; }
}

/* a blank still to fill ({{…}} in SECTIONS.md): dimmer, with a dashed underline, so a half-written page shows what is left */
.ph { color: #8ea2bd; text-decoration: underline dashed rgba(111, 227, 255, .45); text-decoration-thickness: 1px; text-underline-offset: .2em; text-decoration-skip-ink: none; }
:is(h1, h2, h3, dt) .ph { color: #9fb2cc; }
:is(.now dt, .fact dt, .skill__title, .step__when, .role__when, .work__when, .part__when) .ph { color: inherit; } /* labels keep their colour */

/* a photo still wanted (- photo: …): an empty frame saying what it should show */
.holo--empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 22px; text-align: center; background: rgba(8, 20, 42, .5); border: 1px dashed rgba(111, 227, 255, .32); }
.holo--empty::after { display: none; }
.holo--empty svg { width: 30px; height: 30px; fill: none; stroke: var(--cyan); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; opacity: .7; }
.holo__want { position: relative; z-index: 2; max-width: 30ch; color: var(--ink-3); font-size: 15px; line-height: 1.4; }
.holo__want .ph { color: inherit; }

/* Now: four tiles, like a notice board, with the date it was last true */
.now { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0; }
.now__row { display: block; padding: 22px 24px 24px; border-radius: 16px; background: var(--panel); border: 1px solid var(--panel-line); }
.now dt { margin: 0 0 12px; font: 680 14px/1.2 var(--display); font-stretch: 88%; color: var(--azure); }
.now dd { margin: 0; }
.now dd p { margin: 0; font-size: 18px; line-height: 1.5; }

/* What I do: the roles as entries between thin lines, each its photo over its words and its icon (or its dates) beside
   its title; two side by side where the column fits two (an iPad and up), as Research's papers, one under the other on
   a phone */
.roles { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--panel-line); }
.role { display: grid; grid-template-columns: minmax(0, 1fr); row-gap: 10px; align-content: start; padding: 24px 0 28px; border-bottom: 1px solid var(--panel-line); }
.role__when { margin: 0; color: var(--azure); font: 700 15px/1.3 var(--display); font-stretch: 90%; font-variant-numeric: tabular-nums; }
.role__icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 15px; border: 1px solid var(--panel-line);
  background: radial-gradient(circle at 30% 20%, rgba(90, 190, 255, .28), rgba(40, 90, 200, .12) 60%, rgba(5, 12, 28, .5)); box-shadow: 0 0 36px rgba(60, 160, 255, .22), inset 0 0 18px rgba(120, 210, 255, .12); }
.role__icon svg { width: 27px; height: 27px; fill: none; stroke: var(--cyan); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 6px rgba(80, 200, 255, .6)); }
.role__title { margin: 0; font: 760 23px/1.15 var(--display); font-stretch: 108%; }
.role__where { margin: 4px 0 0; color: var(--ink-3); font-size: 15.5px; }
.role__media { order: -1; margin: 0 0 6px; }
.role__cap { margin-top: 8px; color: var(--ink-3); font-size: 13.5px; line-height: 1.35; }
.role__media .holo { aspect-ratio: 2 / 1; border-radius: 10px; }
.role__media .holo img { height: 100%; object-fit: cover; }
.role__main > p:not(.role__where) { margin: 12px 0 0; max-width: 62ch; color: var(--ink-2); font-size: 16.5px; line-height: 1.55; }
@container body (min-width: 720px) {
  .roles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 44px; }
  .role { grid-template-columns: 52px minmax(0, 1fr); column-gap: 16px; row-gap: 0; padding: 28px 0 32px; }
  .role__main { display: contents; } /* its title and place beside the icon, its words under both */
  .role__media { grid-column: 1 / -1; margin-bottom: 18px; }
  .role__when--icon { grid-column: 1; grid-row: span 2; }
  .role__title, .role__where { grid-column: 2; }
  .role__main > :not(.role__title):not(.role__where), .role__when:not(.role__when--icon),
  .role:not(:has(> .role__when--icon)) :is(.role__title, .role__where) { grid-column: 1 / -1; } /* (dates stand over the title) */
}

/* Things I've made: a carousel. Every project stands on one stage (one grid cell, so the chapter keeps its height and
   the tree its branches while they take turns): a looping clip or a picture, its name and two lines beside it, tabs
   with their short names under it. deck.js turns it (.deck--on); without it they stand one under the other. */
.deck__stage { display: grid; gap: 64px; }
.slide { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 38px; align-items: center; }
.slide__media .holo { aspect-ratio: 16 / 10; border-radius: 14px; box-shadow: 0 34px 70px -42px rgba(0, 0, 0, .85); }
.slide__media .holo img, .slide__media .holo video, .pastime__media .holo img, .pastime__media .holo video { display: block; width: 100%; height: 100%; object-fit: cover; }
.slide__title { margin: 0; font: 780 clamp(26px, 2.3vw, 34px)/1.1 var(--display); font-stretch: 108%; }
.slide__title a, .part__title a { color: inherit; text-decoration: none; background: linear-gradient(var(--cyan), var(--cyan)) 0 100% / 0 1px no-repeat; transition: background-size .4s, color .3s; }
.slide__title a:hover, .part__title a:hover { color: var(--hot); background-size: 100% 1px; }
.slide__when, .part__when { margin: 10px 0 0; color: var(--azure); font: 650 15px/1 var(--display); font-stretch: 85%; }
.slide__text > p:not(.slide__when) { margin: 14px 0 0; max-width: 46ch; color: var(--ink-2); font-size: 18px; }
.slide .list { margin-top: 12px; }
.slide .list li { color: var(--ink-2); font-size: 16px; }
.deck__nav { display: none; }
.deck--on .deck__stage { grid-template-areas: 'stage'; gap: 0; touch-action: pan-y; } /* a sideways swipe is the carousel's, up and down still scroll */
.deck--on .slide { grid-area: stage; opacity: 0; visibility: hidden; transform: translateX(14px); transition: opacity .55s ease, transform .8s cubic-bezier(.2, .7, .2, 1), visibility 0s .55s; }
.deck--on .slide.is-on { opacity: 1; visibility: visible; transform: none; transition: opacity .55s ease .05s, transform .8s cubic-bezier(.2, .7, .2, 1), visibility 0s; }
.deck--on .deck__nav { display: flex; align-items: center; gap: 12px; margin-top: 32px; }
.deck__tabs { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.deck__tab {
  position: relative; overflow: hidden; padding: 9px 15px; border-radius: 999px; border: 1px solid var(--chip-line); background: transparent;
  color: var(--ink-2); font: 650 14px/1 var(--display); font-stretch: 90%; cursor: pointer; transition: color .25s, border-color .25s, background-color .25s;
}
.deck__tab:hover { color: var(--ink); border-color: var(--cyan); }
.deck__tab[aria-current="true"] { color: var(--ink); border-color: var(--cyan); background: var(--chip); }
.deck__tab[aria-current="true"]::after { /* how soon the next one comes: a thin line filling under the tab (deck.js sets --turn) */
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--cyan); transform-origin: 0 50%; transform: scaleX(var(--turn, 0));
}
.deck__step {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border-radius: 50%;
  border: 1px solid var(--chip-line); background: var(--chip); color: var(--ink); cursor: pointer; transition: border-color .25s;
}
.deck__step:hover { border-color: var(--cyan); }
.deck__step svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.trunk .deck__tab { text-shadow: none; }
/* while editing, every project stands open, one under the other, to be changed in place */
html.editing .deck--on .deck__stage { grid-template-areas: none; gap: 64px; }
html.editing .deck--on .slide { grid-area: auto; opacity: 1; visibility: visible; transform: none; }
html.editing .deck--on .deck__nav { display: none; }

/* Research: talks, papers and theses, as the publications page of a CV: a picture beside each, where and when, two
   lines, and its links as small buttons */
/* each its photo over its words; two side by side where there is room (below), a line under each */
.papers { display: grid; column-gap: 44px; border-top: 1px solid var(--panel-line); }
.paper { display: grid; align-content: start; row-gap: 18px; padding: 28px 0 32px; border-bottom: 1px solid var(--panel-line); }
.paper__media .holo { aspect-ratio: 2 / 1; border-radius: 10px; }
.paper__media .holo img, .paper__media .holo video { display: block; width: 100%; height: 100%; object-fit: cover; }
.paper__where { margin: 0; color: var(--ink-3); font-size: 15px; }
.paper__when { color: var(--azure); font: 650 15px/1 var(--display); font-stretch: 85%; }
.paper__title { margin: 8px 0 0; max-width: 36ch; font: 740 21px/1.2 var(--display); font-stretch: 102%; text-wrap: balance; }
.paper__text > p:not(.paper__where) { margin: 12px 0 0; max-width: 62ch; color: var(--ink-2); font-size: 16.5px; line-height: 1.55; }
.paper .list, .quote .list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.paper .list li, .quote .list li { font-size: 15px; color: var(--ink-2); }
.paper .list a, .quote .list :is(a, button) {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--chip-line); background: var(--chip);
  color: var(--ink); text-decoration: none; transition: border-color .25s, color .25s;
}
.paper .list a::after, .quote .list :is(a, button)::after { content: ''; width: 7px; height: 7px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg); opacity: .7; }
.paper .list a:hover, .quote .list :is(a, button):hover { border-color: var(--cyan); color: var(--hot); }
.quote .list button { font: inherit; cursor: pointer; } /* the unblurred original (- original:): a chip like the links */
.trunk .paper .list li, .trunk .quote .list li { text-shadow: none; }
/* links that back a claim (a list of links under a role or a step on the path): the same chips, a size smaller */
.role .list, .step .list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.step:nth-child(odd) .list { justify-content: flex-end; }
.role .list li, .step .list li { font-size: 13.5px; color: var(--ink-2); text-shadow: none; }
.role .list a, .step .list a {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--chip-line); background: var(--chip);
  color: var(--ink); text-decoration: none; transition: border-color .25s, color .25s;
}
.role .list a::after, .step .list a::after { content: ''; width: 6px; height: 6px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg); opacity: .7; }
.role .list a:hover, .step .list a:hover { border-color: var(--cyan); color: var(--hot); }

/* How I work: each rule a statement, its reason under it, a line down the left like a margin note; two by two where
   there is room (below), so the chapter fits on one screen */
.rules { display: grid; gap: 30px 40px; }
.rule { position: relative; padding-left: 20px; border-left: 2px solid var(--ring-line); }
.rule__title { margin: 0; max-width: 19ch; font: 790 clamp(21px, 1.7vw, 25px)/1.08 var(--display); font-stretch: 114%; letter-spacing: -.005em; }
.rule__text { margin-top: 9px; }
.rule__text p { margin: 0; max-width: 54ch; color: var(--ink-2); font-size: 15.5px; line-height: 1.5; }
/* its words over the statements are the smaller lede, the statements closer under them: the chapter fits on one screen,
   a laptop's included (1440 x 800 with the browser's bars) */
.node--principles .node__lede p { max-width: none; font-size: clamp(18px, 1.3vw, 20px); } /* as wide as the statements */
@container nodes (width < 1150px) { .node--principles .node__body { margin-top: 34px; } } /* (side by side, it is level with the heading) */
.rule__text p + p { margin-top: 12px; }

/* What I'm good at: each group a cluster of small tags */
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px 44px; }
.skill__title { margin: 0 0 16px; font: 700 18px/1.25 var(--display); font-stretch: 92%; color: var(--azure); }
.skill .list { display: flex; flex-wrap: wrap; gap: 8px; }
.skill .list li { padding: 8px 13px; border-radius: 10px; background: var(--chip); border: 1px solid var(--chip-line); font-size: 15.5px; line-height: 1.35; }
.trunk .skill .list li { text-shadow: none; }
.skill p { margin: 14px 0 0; color: var(--ink-2); font-size: 16px; }

/* The path so far: a timeline that scrolls sideways (path.js gives it its arrows), newest first. A line runs along it
   with a knot for every step, and a year shows once, over the first step of that year (sections.mjs marks the others
   --again). Under the line each step's first photo, with how many more it has (they open in the big view), then its
   words. The strip scrolls on its own, by touch, trackpad, a sideways wheel or the keys; the page's scrolling is left
   alone. The edge that has more steps behind it fades out (path.js: .trail--more-*). */
.trail { position: relative; border-radius: 12px; }
.trail:has(> .path:focus-visible) { outline: 2px solid var(--azure); outline-offset: 6px; }
.trail__nav { display: flex; justify-content: flex-end; gap: 10px; margin: -6px 0 12px; }
.trail__nav[hidden] { display: none; }
.trail__step {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border-radius: 50%;
  border: 1px solid var(--chip-line); background: var(--chip); color: var(--ink); cursor: pointer; transition: border-color .25s, opacity .25s;
}
.trail__step:hover:not(:disabled) { border-color: var(--cyan); }
.trail__step:disabled { opacity: .35; cursor: default; }
.trail__step svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.path { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0 0 16px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline-start: 28px; scrollbar-width: thin; scrollbar-color: var(--chip-line) transparent; }
/* (a step comes to rest one gap in from the left edge, so the fade there only ever covers the gap before it) */
.path:focus-visible { outline: none; } /* the strip's ring is drawn around it (.trail), outside the fade */
.trail--more-r .path { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 64px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 64px), transparent); }
.trail--more-l .path { -webkit-mask-image: linear-gradient(90deg, transparent, #000 28px); mask-image: linear-gradient(90deg, transparent, #000 28px); }
.trail--more-l.trail--more-r .path { -webkit-mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 64px), transparent); mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 64px), transparent); }
.step { position: relative; flex: none; width: min(78vw, 330px); scroll-snap-align: start; }
.step::before { content: ''; position: absolute; left: 0; right: -28px; top: 52px; height: 1px; background: var(--ring-line); } /* the line, on to the next step */
.step:last-child::before { right: 0; background: linear-gradient(90deg, var(--ring-line), transparent); }
.step::after { content: ''; position: absolute; left: 0; top: 48px; width: 9px; height: 9px; border-radius: 50%; background: var(--azure); box-shadow: 0 0 0 5px var(--knot-gap), 0 0 16px rgba(111, 227, 255, .45); }
.step__when { height: 40px; margin: 0; font: 820 34px/1.1 var(--display); font-stretch: 104%; color: var(--azure); font-variant-numeric: tabular-nums; white-space: nowrap; }
.step--again .step__when, .step__when:empty { visibility: hidden; }
html.editing .step--again .step__when { visibility: visible; opacity: .45; } /* still there to change while editing */
.step__media { position: relative; margin-top: 34px; }
.step__media .holo { aspect-ratio: 4 / 3; border-radius: 12px; }
.step__media .holo img, .step__media .holo video { display: block; width: 100%; height: 100%; object-fit: cover; }
/* a step with several photos: they take turns in one frame (path.js), each with its caption; nothing turns by itself */
.shots__frame { position: relative; display: grid; }
.shot, .shots__caps > .step__cap { grid-area: 1 / 1; visibility: hidden; opacity: 0; transition: opacity .35s ease, visibility 0s .35s; }
.shot.is-on, .shots__caps > .step__cap.is-on { visibility: visible; opacity: 1; transition: opacity .35s ease, visibility 0s; }
.shots__caps { display: grid; }
.shots__flip { position: absolute; top: 50%; z-index: 2; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; margin-top: -17px; border-radius: 50%; border: 1px solid var(--chip-line); background: rgba(3, 8, 18, .62); color: var(--ink); cursor: pointer; opacity: .88; transition: opacity .2s, border-color .2s; }
.shots__flip[data-flip="-1"] { left: 8px; }
.shots__flip[data-flip="1"] { right: 8px; }
.shots__flip[hidden] { display: none; }
.shots__flip:hover { opacity: 1; border-color: var(--cyan); }
.shots__flip svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.shots__count { position: absolute; top: 10px; right: 10px; z-index: 2; padding: 5px 9px; border-radius: 99px; background: rgba(3, 8, 18, .74); border: 1px solid var(--chip-line); color: var(--ink); font: 680 13px/1 var(--display); font-stretch: 96%; font-variant-numeric: tabular-nums; pointer-events: none; }
.step__cap { margin: 8px 0 0; color: var(--ink-3); font-size: 13.5px; line-height: 1.35; }
.step__body { margin-top: 16px; }
.step__media + .step__body { margin-top: 14px; }
.step__when + .step__body { margin-top: 34px; } /* no photo: the words come straight under the line */
.step__title { margin: 0; font: 720 20px/1.22 var(--display); font-stretch: 102%; }
.step__body > p { margin: 8px 0 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.5; }
.path .step .list { justify-content: flex-start; }

/* Away from the screen: one spread for each pastime, the sides turning. The main photo, the title and the words on one
   side; the other photos on the other as a wall of prints pinned up at angles (mosaic of different sizes, no carousel). */
.away { display: grid; gap: 84px; }
.pastime { display: grid; grid-template-columns: minmax(0, 1fr); gap: 30px 44px; align-items: center; }
.pastime--wall { grid-template-columns: minmax(0, .8fr) minmax(0, 1.25fr); }
.pastime--wall:nth-child(even) { grid-template-columns: minmax(0, 1.25fr) minmax(0, .8fr); }
.pastime--wall:nth-child(even) > .pastime__main { order: 2; }
.pastime__main { display: grid; gap: 18px; min-width: 0; }
.pastime:not(.pastime--wall) .pastime__main { max-width: 440px; }
.pastime__media .holo { aspect-ratio: 5 / 4; border-radius: 12px; }
.pastime__title { margin: 0; font: 760 28px/1.15 var(--display); font-stretch: 104%; }
.pastime p { margin: 8px 0 0; color: var(--ink-2); font-size: 17.5px; max-width: 42ch; }
.wall { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: repeat(10, minmax(0, 1fr)); aspect-ratio: 6 / 5; min-width: 0; }
.wall__p { position: relative; z-index: var(--z, 1); min-width: 0; min-height: 0; padding: 5px; border-radius: 4px; background: #e6edf8; transform: rotate(var(--r, 0deg));
  box-shadow: 0 20px 38px -20px rgba(0, 0, 0, .85), 0 0 0 1px rgba(111, 227, 255, .12); transition: transform .55s cubic-bezier(.2, .7, .2, 1), box-shadow .55s; }
.wall__p .holo { display: block; width: 100%; height: 100%; border-radius: 1px; }
.wall__p .holo img, .wall__p .holo video { display: block; width: 100%; height: 100%; object-fit: cover; }
.wall__p:hover, .wall__p:focus-within { z-index: 9; transform: rotate(0deg) scale(1.06); box-shadow: 0 30px 56px -22px rgba(0, 0, 0, .95), 0 0 0 1px rgba(111, 227, 255, .5); }
.wall__cap { position: absolute; left: 5px; right: 5px; bottom: 5px; padding: 26px 10px 8px; border-radius: 0 0 1px 1px; background: linear-gradient(transparent, rgba(3, 8, 18, .82));
  color: #eaf2ff; font: 600 13px/1.25 var(--display); font-stretch: 90%; opacity: 0; transition: opacity .35s; pointer-events: none; }
.wall__p:hover .wall__cap, .wall__p:focus-within .wall__cap { opacity: 1; }
@media (hover: none) { .wall__cap { opacity: 1; } }
/* the prints' places, tilts and layers come from the page itself (sections.mjs PLACES); a spread with a wall keeps its
   words in view while the wall goes by */
.walls { display: grid; gap: 26px; min-width: 0; }
.wall--tall { grid-template-rows: repeat(12, minmax(0, 1fr)); aspect-ratio: 1 / 1; }
.pastime--wall { align-items: start; }
.pastime--wall > .pastime__main { position: sticky; top: 14vh; }
.holo--whole img, .holo--whole video { object-fit: contain !important; }
.wall__p .holo--whole { background: #eef3fa; }
.pastime__media .holo.holo--whole { aspect-ratio: 4 / 5; }
.pastime__media .holo.holo--tall { aspect-ratio: 3 / 4; max-width: 360px; } /* {tall}: the main photo is portrait */

/* In other people's words, on a panel of its own: one quote is one big voice; two or more stand side by side where there
   is room for them (below, after the phone's rules) and one under the other on a phone */
.said { display: grid; gap: 48px; padding: 44px 48px 46px; border-radius: 20px; background: var(--panel); border: 1px solid var(--panel-line); }
.quote { margin: 0; }
.quote::before { content: '\201C'; display: block; height: 52px; font: 800 100px/1 var(--display); color: var(--cyan); opacity: .55; }
.quote blockquote { margin: 0; max-width: 40ch; font: 520 22px/1.4 var(--display); font-stretch: 96%; }
.quote:only-child blockquote { max-width: 30ch; font-size: clamp(25px, 2.4vw, 36px); line-height: 1.3; }
.quote figcaption { margin-top: 18px; color: var(--ink-3); font-size: 15.5px; }
.quote .list { margin-top: 12px; } /* where it was said: the research chips, close under the name */
/* a quote that opens where it was said (- link:, e.g. the letter in files/): its words are the link, quiet until pointed at;
   a block, so the gaps between its lines and the space after the last open it too */
.quote__src { display: block; color: inherit; text-decoration-line: underline; text-decoration-color: transparent; text-decoration-thickness: 1px; text-underline-offset: .22em; transition: color .3s, text-decoration-color .3s; }
.quote__src:hover { color: var(--hot); text-decoration-color: var(--cyan); }
.quote__note { margin: 12px 0 0; max-width: 52ch; font-size: 13.5px; line-height: 1.45; color: var(--ink-3); } /* why the letter is blurred */

/* a section of his own: headings, photos and paragraphs in order */
.part + .part { margin-top: 46px; }
.part__title { margin: 0; font: 720 25px/1.15 var(--display); font-stretch: 106%; }
.part__media { margin-top: 18px; }
.part p:not(.part__when) { margin: 14px 0 0; max-width: 62ch; color: var(--ink-2); font-size: 18px; }
.node__lede blockquote, .part blockquote { margin: 18px 0 0; max-width: 58ch; padding: 2px 0 2px 14px; border-left: 2px solid var(--azure); color: var(--ink); font-size: 17px; }

/* a wide body (the split on wide screens, or the simple view): the skills two by two (after the rules above, which they
   override) */
@container body (min-width: 900px) {
  .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── ground and roots ──────────────────────────────────────────────── */
.ground { position: relative; padding-top: 250px; min-height: 1080px; overflow: hidden; }
.soil { position: relative; margin: 0 auto; width: min(var(--col), 1120px); }
.summary {
  padding: 26px 30px 30px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 24px 60px -30px rgba(0, 0, 0, .8);
}
.summary h2 { margin: 0; font: 820 38px/1 var(--display); font-stretch: 125%; }
.summary p { margin: 14px 0 0; max-width: 56ch; font-size: 18px; }
.values { list-style: none; margin: 150px 0 0; display: flex; justify-content: space-between; padding: 0 2%; }
.value { font: 620 14px/1 var(--display); font-stretch: 90%; color: var(--ink-2); padding: 8px 14px; border-radius: 999px; background: rgba(4, 12, 26, .8); border: 1px solid rgba(74, 156, 240, .3); }
.contacts { list-style: none; padding: 0; margin: 150px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tip { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 12px; border-radius: 12px; text-decoration: none; color: var(--ink); background: var(--glass); border: 1px solid rgba(111, 227, 255, .3); box-shadow: 0 0 40px -16px rgba(111, 227, 255, .55); transition: border-color .3s, box-shadow .3s; }
.tip strong { font: 780 22px/1 var(--display); font-stretch: 115%; }
.tip span { font-size: 14px; color: var(--ink-3); }
.tip:not(.tip--cv):hover { border-color: rgba(111, 227, 255, .75); box-shadow: 0 0 50px -10px rgba(111, 227, 255, .7); }
.contacts--4 { grid-template-columns: repeat(4, 1fr); }
.contacts--2 { grid-template-columns: repeat(2, 1fr); }
.contacts--1 { grid-template-columns: minmax(0, 320px); }
.tip--blank { border-style: dashed; box-shadow: none; }
.tip--blank strong { color: var(--ink-2); }
.contacts > li > .tip { box-sizing: border-box; height: 100%; justify-content: center; } /* every card as tall as the tallest */
.tip--cv { cursor: default; } /* not a link itself, so it does not light up: its languages are the links */
.tip__langs { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 4px; }
.tip span.tip__langs a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--chip-line); background: var(--chip); color: var(--ink); font-size: 14px; text-decoration: none; transition: border-color .25s, color .25s; }
.tip span.tip__langs a:hover { border-color: var(--cyan); color: var(--hot); }
.foot { text-align: center; padding: 30px 16px 40px; color: var(--ink-3); font-size: 13px; }
/* the motion switch (boot.js): in the footer on phones, a small round button at the foot of the HUD on bigger screens */
.motion { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; padding: 7px 13px; border-radius: 999px; border: 1px solid rgba(111, 227, 255, .22); background: rgba(3, 8, 18, .85); color: var(--ink-3); font: 600 13px/1 var(--display); font-stretch: 80%; cursor: pointer; }
.motion:hover { color: var(--ink); border-color: rgba(111, 227, 255, .5); }
.motion[hidden] { display: none; }
/* the private preview only (boot.js): why this is the drawn tree and not the 3D one */
.gl-note {
  position: fixed; left: 50%; bottom: 16px; z-index: 6; transform: translateX(-50%); width: max-content; max-width: min(560px, calc(100vw - 32px));
  margin: 0; padding: 10px 40px 10px 14px; border-radius: 12px; border: 1px solid rgba(111, 227, 255, .35); background: rgba(3, 10, 22, .92);
  color: #cdeeff; font: 400 14px/1.45 var(--text);
}
.gl-note__close { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border: 0; border-radius: 8px; background: none; color: inherit; font: 400 20px/1 var(--text); cursor: pointer; }
.gl-note__close:hover { background: rgba(111, 227, 255, .14); }
.motion i { display: block; width: 9px; height: 10px; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.still .motion i { width: 0; height: 0; border-right: 0; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 9px solid currentColor; }
@media (min-width: 861px) {
  .motion { position: fixed; z-index: 3; left: calc(var(--pad) / 2 - 18px); bottom: 24px; width: 36px; height: 36px; margin: 0; padding: 0; justify-content: center; }
  .motion span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
.still .sky__aurora b, .still .sky__stars::after, .still .portrait__ring, .still .cue::after { animation-play-state: paused; }

/* ── phone ─────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  :root { --pad: 16px; --trunk: clamp(84px, 26vw, 120px); --axis: 50vw; --door-dy: 28svh; }
  .gl-on .stage { height: max(300px, calc(123svh - 150px)); }
  .cue { display: none; }
  .canopy { justify-content: flex-start; padding: 33vh 16px 40px; padding-top: 33svh; }
  .intro { padding: 0; }
  .intro::before { inset: -40px -40px -40px -16px; }
  .portrait { width: 168px; height: 168px; margin: 0 0 26px 6px; }
  .intro h1 { font-size: clamp(40px, 12vw, 56px); }
  .intro__line { font-size: 17px; }
  .soil { margin: 0 auto; width: calc(100vw - 32px); }
  .trunk { padding: 150px 0 100px; }
  .node + .node { margin-top: 190px; }
  .node::before { top: -96px; }
  .node:first-child::before { top: -76px; }
  .node__title { font-size: clamp(32px, 9.2vw, 42px); font-stretch: 112%; }
  .node__lede p { font-size: 19px; }
  .node__body { margin-top: 34px; }
  .facts { grid-template-columns: 1fr; gap: 14px; margin-top: 26px; }
  .facts > :nth-child(3) { grid-column: auto; grid-row: auto; }
  .now { grid-template-columns: 1fr; gap: 12px; }
  .now__row { padding: 18px 18px 20px; }
  .now dd p { font-size: 17px; }
  .role__main > p:not(.role__where), .slide__text > p:not(.slide__when), .part p:not(.part__when) { font-size: 17px; }
  .slide { grid-template-columns: 1fr; gap: 18px; align-items: start; }
  .slide__title { font-size: 24px; }
  .deck--on .deck__nav { gap: 8px; margin-top: 22px; }
  .deck__tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .deck__tabs::-webkit-scrollbar { display: none; }
  .deck__tab { flex: none; padding: 8px 12px; font-size: 13px; }
  .deck__step { width: 36px; height: 36px; }
  .paper { row-gap: 14px; padding: 24px 0 28px; }
  .paper__title { font-size: 21px; }
  .rules { gap: 32px; }
  .rule { padding-left: 18px; }
  .rule__title { font-size: 24px; }
  .rule__text p { font-size: 16px; }
  .skills { grid-template-columns: 1fr; gap: 28px; }
  .skill .list li { font-size: 15px; }
  .path { gap: 20px; scroll-padding-inline-start: 20px; }
  .step::before { right: -20px; top: 42px; }
  .step::after { top: 38px; }
  .step__when { height: 32px; font-size: 27px; }
  .step__media, .step__when + .step__body { margin-top: 30px; }
  .step__title { font-size: 19px; }
  .trail__step { width: 36px; height: 36px; }
  .away { gap: 64px; }
  .pastime--wall { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .pastime--wall:nth-child(even) { grid-template-columns: minmax(0, 1fr); }
  .pastime--wall:nth-child(even) > .pastime__main { order: 0; }
  .pastime__title { font-size: 24px; }
  .wall { aspect-ratio: 1 / 1; }
  .pastime--wall > .pastime__main { position: static; }
  .said { padding: 26px 22px 28px; gap: 36px; }
  .quote blockquote, .quote:only-child blockquote { font-size: 22px; }
  .contacts--4, .contacts--2 { grid-template-columns: 1fr; }
  .ground { min-height: 1180px; }
  .summary { padding: 20px; }
  .values { flex-wrap: wrap; gap: 10px; margin-top: 120px; padding: 0; }
  .contacts { grid-template-columns: 1fr; margin-top: 120px; }
}
/* Room for two side by side (from an iPad up; never a phone): Research's papers and the statements of How I work two by
   two; in other people's words the quotes on one line, the same size, each part level with the other's (a subgrid of
   three rows: the marks, the words, the names and their links), a single quote still filling the panel (auto-fit).
   After the phone's rules, whose gaps these replace. */
@container body (min-width: 720px) {
  .papers, .rules { grid-template-columns: repeat(2, minmax(0, 1fr)); } /* Research and How I work, two by two */
  .said { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 56px; align-items: start; }
  .said > .quote:not(:only-child) { display: grid; grid-row: span 3; grid-template-rows: subgrid; }
  .said > .quote:not(:only-child) blockquote { max-width: none; font-size: clamp(21px, 2.5cqi, 25px); line-height: 1.38; }
  .said > .quote:nth-child(n+3) { margin-top: 44px; } /* a third, on a line of its own */
}
@media (prefers-reduced-motion: reduce) {
  .portrait__ring, .cue::after, .sky__aurora b, .sky__stars::after { animation: none; }
  .holo img, .holo::after, .holo::before, .card, .node__title, .wall__p, .trail__step, .shot, .shots__caps > .step__cap, .shots__flip { transition: none; }
}

/* ── sections: light ─────────────────────────────────────────────────
   the chapters' own surfaces on the winter morning (the rest of the light theme is at the end of this file) */
:root[data-theme="light"] {
  --panel: rgba(244, 248, 255, .46); --panel-line: rgba(31, 92, 184, .18);
  --chip: rgba(244, 248, 255, .94); --chip-line: rgba(31, 92, 184, .22);
  --ring-line: rgba(31, 92, 184, .3); --knot-gap: rgba(232, 239, 249, .96);
}
[data-theme="light"] .step::after { box-shadow: 0 0 0 5px var(--knot-gap), 0 0 14px rgba(42, 111, 214, .28); }
[data-theme="light"] .slide__media .holo { box-shadow: 0 30px 60px -40px rgba(20, 50, 110, .5); }

/* ── the simple view (view.js): the same chapters as a plain blog ─────
   For a slower machine, or just for reading: no 3D tree, no drawn tree, no aurora (boot.js loads no tree at all).
   The words stand in one column down the middle; what is left of the trunk is a thin line down its left side with a
   knot where each chapter starts. The chapters still draw themselves in, photos still turn real in focus, and the
   gauge on the left still follows the page (view.js). */
[data-view="simple"] { --read: min(1000px, calc(100vw - 2 * var(--pad))); }
[data-view="simple"] :is(.gl-wrap, .ghost, .veil, .stage, .sky__aurora, .cue) { display: none; }
[data-view="simple"] .sky__stars::after { animation: none; }
[data-view="simple"] .canopy { min-height: 0; padding: clamp(120px, 21vh, 230px) 0 40px; }
[data-view="simple"] .intro { width: var(--read); max-width: none; margin: 0 auto; padding-left: 56px; }
[data-view="simple"] .intro::before { display: none; }
[data-view="simple"] .trunk { padding: 190px 0 110px; }
[data-view="simple"] .nodes { width: var(--read); margin: 0 auto; padding-left: 56px; }
[data-view="simple"] .nodes::before { /* the spine: what is left of the trunk */
  content: ''; position: absolute; left: 11px; top: -150px; bottom: 0; width: 2px; border-radius: 2px;
  background: linear-gradient(transparent, var(--ring-line) 120px, var(--ring-line) calc(100% - 60px), transparent);
}
[data-view="simple"] .node { padding-right: 0; }
[data-view="simple"] .node::before { left: -56px; }
[data-view="simple"] .node::after { /* a knot on the spine where the chapter starts, level with its heading */
  content: ''; position: absolute; left: -50px; top: 24px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--azure); box-shadow: 0 0 0 6px var(--knot-gap), 0 0 18px rgba(111, 227, 255, .5);
}
[data-view="simple"] .trunk :is(h2, h3, p, dt, dd, li, blockquote, figcaption) { text-shadow: none; } /* nothing behind the words now */
[data-view="simple"] .trunk .work--lead :is(.work__title, .work__when) { text-shadow: 0 2px 18px rgba(0, 0, 0, .7); }
[data-view="simple"] .ground { min-height: 0; padding: 90px 0 30px; overflow: visible; }
[data-view="simple"] .soil { width: var(--read); margin: 0 auto; padding: 0 0 0 56px; }
[data-view="simple"] .summary { -webkit-backdrop-filter: none; backdrop-filter: none; }
[data-view="simple"] .values { justify-content: flex-start; flex-wrap: wrap; gap: 10px; margin-top: 40px; padding: 0; }
[data-view="simple"] .contacts { margin-top: 26px; }
[data-theme="light"][data-view="simple"] .node::after { box-shadow: 0 0 0 6px var(--knot-gap), 0 0 16px rgba(42, 111, 214, .35); }
@media (max-width: 860px) {
  [data-view="simple"] { --pad: 16px; }
  [data-view="simple"] .canopy { padding-top: 120px; }
  [data-view="simple"] :is(.intro, .nodes, .soil) { padding-left: 30px; }
  [data-view="simple"] .nodes::before { left: 5px; }
  [data-view="simple"] .node::before { left: -30px; }
  [data-view="simple"] .node::after { left: -29px; top: 14px; width: 10px; height: 10px; }
  [data-view="simple"] .node { padding-right: 0; }
}

/* the view switch (view.js): beside the theme switch, the same round button; a page on the tree, a tree on the page */
.view { display: none; }
.js .view {
  position: fixed; top: 14px; right: 56px; z-index: 7; display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0; border-radius: 50%; border: 1px solid rgba(111, 227, 255, .35);
  background: rgba(3, 8, 18, .86); color: var(--cyan); cursor: pointer; box-shadow: 0 8px 30px -12px rgba(0, 0, 0, .8);
  transition: border-color .25s, box-shadow .25s, background-color .25s;
}
.view:hover { border-color: rgba(111, 227, 255, .8); box-shadow: 0 0 30px -8px rgba(111, 227, 255, .5); }
.view svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.view__tree { display: none; }
[data-view="simple"] .view__page { display: none; }
[data-view="simple"] .view__tree { display: block; }
.view span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[data-theme="light"] .view { border-color: rgba(31, 92, 184, .3); background: rgba(246, 249, 255, .9); color: var(--azure); box-shadow: 0 8px 26px -14px rgba(20, 50, 110, .45); }
[data-theme="light"] .view:hover { border-color: rgba(31, 92, 184, .65); box-shadow: 0 8px 26px -10px rgba(20, 60, 140, .45); }
@media (max-width: 860px) {
  .js .view { right: 52px; }
  html.editing .view { display: none; }
}

/* ── the way to the pages (page.mjs, sections.mjs): the topics icon, "Go straight to" and "Read more" ──────────
   The icon: fixed at the top right beside the view switch, the same round 34 px button, with no word in it (its
   aria-label says Topics). topics.js opens its menu, the topics that have a page, with their counts. A page's own bar
   (page.css) carries the same menu. It works only with scripts, so without them it is not there. */
.tmenu { position: relative; }
html:not(.js) .tmenu { display: none; }
.tmenu--fixed { position: fixed; top: 14px; right: 98px; z-index: 8; }
.tmenu__btn {
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; border-radius: 50%; border: 1px solid rgba(111, 227, 255, .35);
  background: rgba(3, 8, 18, .86); color: var(--cyan); cursor: pointer; box-shadow: 0 8px 30px -12px rgba(0, 0, 0, .8);
  transition: border-color .25s, box-shadow .25s, background-color .25s;
}
.tmenu__btn:hover, .tmenu__btn[aria-expanded="true"] { border-color: rgba(111, 227, 255, .8); box-shadow: 0 0 30px -8px rgba(111, 227, 255, .5); }
.tmenu__btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
/* (the panel is shown and hidden by its hidden attribute, so no rule here sets its display) */
.tmenu__panel { position: absolute; right: 0; top: 44px; width: min(290px, calc(100vw - 32px)); padding: 10px; border-radius: 16px; background: rgba(6, 15, 31, .97); border: 1px solid rgba(120, 180, 255, .16); box-shadow: 0 30px 70px -30px #000; }
.tmenu__panel a { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 11px 14px; border-radius: 10px; color: var(--ink); text-decoration: none; font-size: 16px; }
.tmenu__panel a:hover { background: rgba(47, 140, 255, .14); }
.tmenu__panel a span { color: var(--ink-3); font-size: 14px; }
@media (max-width: 860px) {
  .tmenu--fixed { right: 94px; }
  .tmenu--fixed .tmenu__panel { position: fixed; top: 58px; right: 10px; width: min(290px, calc(100vw - 20px)); } /* (kept on a narrow screen) */
  html.editing .tmenu--fixed { display: none; }
}
/* martijanm.com has no theme switch (dark only): on a wide screen the view switch takes its place in the corner and the icon
   follows, so the pair does not stand a button's width away from the edge (the preview keeps theirs, with Edit left of the
   icon). A phone keeps them where they were: headless Chrome lays the main page out 24 px wider than a 390 px phone, and a
   button at the very edge was cut off there (the theme switch on the preview is, before and after this) */
@media (min-width: 861px) {
  html[data-public].js .view { right: 14px; }
  html[data-public] .tmenu--fixed { right: 56px; }
}
[data-theme="light"] .tmenu__btn { border-color: rgba(31, 92, 184, .3); background: rgba(246, 249, 255, .9); color: var(--azure); box-shadow: 0 8px 26px -14px rgba(20, 50, 110, .45); }
[data-theme="light"] .tmenu__btn:hover { border-color: rgba(31, 92, 184, .65); box-shadow: 0 8px 26px -10px rgba(20, 60, 140, .45); }
[data-theme="light"] .tmenu__panel { background: rgba(246, 249, 255, .97); border-color: rgba(31, 92, 184, .2); box-shadow: 0 30px 70px -30px rgba(20, 50, 110, .5); }
[data-theme="light"] .tmenu__panel a:hover { background: rgba(31, 92, 184, .1); }

/* "Go straight to": under the three facts in the header, a chip for each topic that has a page */
.goto { margin: 30px 0 0; grid-column: 2; }
.goto__label { margin: 0 0 10px; color: var(--azure); font: 700 13px/1.3 var(--display); font-stretch: 92%; letter-spacing: .06em; text-transform: uppercase; }
.goto__list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.goto__list a {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--chip-line);
  background: var(--chip); color: var(--ink); text-decoration: none; font-size: 15px; transition: border-color .25s, color .25s;
}
.goto__list a::after { content: ''; width: 6px; height: 6px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg); opacity: .7; }
.goto__list a:hover { border-color: var(--cyan); color: var(--hot); }
@media (max-width: 860px) { .goto { grid-column: auto; } .goto__list a { font-size: 14px; padding: 7px 12px; } }

/* "Read more" (or "All of <topic>") under every item that has a page: words, and an arrow drawn here on an empty
   element that screen readers skip, growing on hover */
.more-link { display: inline-flex; align-items: center; gap: 9px; margin-top: 16px; color: var(--cyan); font: 680 15.5px/1 var(--display); font-stretch: 104%; text-decoration: none; text-shadow: none; }
.more-link i { display: inline-block; width: 18px; height: 1.5px; background: currentColor; position: relative; transition: width .25s; }
.more-link i::after { content: ''; position: absolute; right: 0; top: -3.5px; width: 7px; height: 7px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg); }
.more-link:hover { color: var(--hot); }
.more-link:hover i { width: 26px; }
.step__body .more-link { margin-top: 10px; font-size: 14.5px; }
@media (prefers-reduced-motion: reduce) { .more-link i, .goto__list a, .tmenu__btn { transition: none; } }

/* ── the 3D scene ──────────────────────────────────────────────────── */
/* the scene before the scene: a small blurred picture of the header's 3D scene (tools/ghost.mjs, inlined by
   template.mjs) is part of the first paint, so the right side is never empty; the live scene fades in over it and the
   picture goes once it is up. It sits at the top of the page and scrolls away with it. */
.ghost { display: none; }
.gl-on .ghost { display: block; position: absolute; left: 0; top: 0; width: 100%; z-index: 0; pointer-events: none; overflow: hidden; transition: opacity 1.4s ease 1s; }
.tree-on .ghost { opacity: 0; }
.tree-lost .ghost { transition-duration: .4s; transition-delay: 0s; } /* the GPU took the canvas away: the picture, at once, */
.tree-lost .gl { visibility: hidden; }                                   /* and not the dead canvas (Chrome shows it grey) */
.ghost__top { display: block; aspect-ratio: var(--g-ar, 16 / 10); background-size: 100% 100%; filter: blur(6px); }
/* the canvas stands still on the screen (main3d.js sets its height: the large viewport's, so a phone's bars sliding in
   and out change nothing) and the camera moves with the scroll */
.gl-wrap { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.gl { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; pointer-events: none; opacity: 0; transition: opacity 2.2s cubic-bezier(.35, 0, .25, 1); }
.gl.is-on { opacity: 1; }
/* ── the wall of the page ─────────────────────────────────────────────
   The picture of the inside of the trunk (assets/wall/, drawn once by tools/wall.mjs; it joins itself on every side), laid behind the
   words once the camera is inside. main3d.js sets its size on the screen and where it starts (--wall-w, --wall-h, --wall-y) from the
   layout, and gl/wall.js (wallOnPage) says how: a layer as big as the screen with one more picture below it, moved up one picture-height
   over each stretch of scroll in which the wall slides that far, --wall-turns times between the dive and the foot. The browser moves it
   (scroll-driven), in the frame the page moves in, so it cannot lag; where it cannot, main3d.js does, and in WebKit too, where so
   tall a layer moved that way came in late at the bottom of the screen in a quick scroll (gl/wall.js wallMovedByBrowser). Through its
   knot-holes (alpha 0) the page's own sky shows, which does not move. Without the scene (the simple view) it is a background of the
   page that scrolls with it. */
.wallclip { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.wallpic { position: absolute; inset: 0; }
.wallpic > i { position: absolute; left: 0; right: 0; top: 0; height: calc(100% + var(--wall-h, 2448px)); background: 50% var(--wall-y, 0px) / var(--wall-w, 1632px) var(--wall-h, 2448px) repeat; }
.gl-on .wallpic { opacity: 0; visibility: hidden; } /* (main3d.js shows it as the camera comes to rest on it) */
html:is(.wall-on, [data-view="simple"]) .wallpic > i { background-image: url(wall/wall-dark.webp); }
@media (max-width: 860px) { html:is(.wall-on, [data-view="simple"]) .wallpic > i { background-image: url(wall/wall-dark-s.webp); } }
[data-theme="light"]:is(.wall-on, [data-view="simple"]) .wallpic > i { background-image: url(wall/wall-light.webp); }
@media (max-width: 860px) { [data-theme="light"]:is(.wall-on, [data-view="simple"]) .wallpic > i { background-image: url(wall/wall-light-s.webp); } }
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .gl-on .wallpic > i { animation: wall-up linear both; animation-timeline: scroll(root block); animation-range: var(--wall-from, 0px) var(--wall-to, 100%); animation-iteration-count: var(--wall-turns, 1); }
  }
}
@keyframes wall-up { to { transform: translateY(calc(var(--wall-h, 2448px) * -1)); } }
/* the simple view: the same picture as the page's background, scrolling with it */
[data-view="simple"] .wallclip { position: absolute; }
[data-view="simple"] .wallpic { opacity: .7; }
[data-view="simple"] .wallpic > i { height: 100%; background-size: 1200px 1800px; }
@media (max-width: 860px) { [data-view="simple"] .wallpic > i { background-size: 800px 1200px; } }

.lens { display: none; }
.gl-on .lens { /* a soft lens vignette over the scene, under the page: tighter the deeper inside the trunk you are (--inside, on this element only) */
  display: block; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse calc(75% - 20% * var(--inside, 0)) calc(70% - 18% * var(--inside, 0)) at 50% 46%, transparent 55%, rgba(1, 3, 8, calc(.5 + .3 * var(--inside, 0))));
}
/* inside the trunk the picture before the scene is not drawn (main3d.js sets .deep), and the sky stands still behind the wall */
.deep .ghost { visibility: hidden; }
.deep .sky__aurora b, .deep .sky__stars::after, .lite .sky__aurora b, .lite .sky__stars::after, .lite .portrait__ring { animation-play-state: paused; }
.ghost-gone .ghost { display: none; }
@media (prefers-reduced-motion: reduce) { .gl, .ghost { transition: none; } }
.gl-on .summary { background: rgba(6, 14, 28, .78); }
/* phones: no blur behind the cards. The 3D picture under them changes every frame, so a phone would re-blur it
   every frame (a known cost on phone GPUs, research 2026-10-15); a denser card reads as well and costs nothing. */
@media (max-width: 860px) {
  .summary { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .gl-on .summary { background: rgba(6, 14, 28, .9); }
}

/* ── the theme switch (boot.js): top right, beside Edit on the preview ───────────────────────── */
.theme { display: none; }
.js .theme {
  position: fixed; top: 14px; right: 14px; z-index: 7; display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0; border-radius: 50%; border: 1px solid rgba(111, 227, 255, .35);
  background: rgba(3, 8, 18, .86); color: var(--cyan); cursor: pointer; box-shadow: 0 8px 30px -12px rgba(0, 0, 0, .8);
  transition: border-color .25s, box-shadow .25s, background-color .25s;
}
.theme:hover { border-color: rgba(111, 227, 255, .8); box-shadow: 0 0 30px -8px rgba(111, 227, 255, .5); }
.theme svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.theme__moon { display: none; }
.theme span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 860px) {
  .js .theme { right: 10px; }
  html.editing .theme { display: none; } /* the editing bar takes the top of a phone */
}
/* switching cross-fades the whole page (boot.js, where the browser has view transitions) */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .55s; animation-timing-function: ease; }

/* ── the light theme: the same oak on a winter morning, still only blue ──────────────────────────
   Night is the designed look and the default; the switch turns this on and the browser remembers it. A pale blue sky
   (no stars, no aurora, a faint haze where the sun is), the tree in deep blue ink, navy words, light frosted cards.
   No brown, no green, no warm cream: every colour here has a blue hue (test/theme.test.mjs checks). */
:root[data-theme="light"] {
  --night: #e8eff9; --deep: #d4e2f4; --soil: #e7eef9;
  --fiber: #2a6fd6; --cyan: #1a63c6; --azure: #1f5cb8; --hot: #0b357a;
  --ink: #0b1d3b; --ink-2: #2a4368; --ink-3: #4e6688;
  --glass: rgba(244, 248, 255, .74); --line: rgba(31, 92, 184, .17);
  color-scheme: light;
}
[data-theme="light"] .sky {
  background:
    radial-gradient(80vmax 55vmax at 18% -16%, rgba(255, 255, 255, .8), rgba(240, 246, 255, .35) 45%, transparent 70%),
    linear-gradient(180deg, #c2d6f0 0%, #d3e2f5 30%, #e1ebf8 62%, #ebf1fa 100%);
}
[data-theme="light"] .sky__aurora, [data-theme="light"] .sky__stars { display: none; }
[data-theme="light"] .theme { border-color: rgba(31, 92, 184, .3); background: rgba(246, 249, 255, .9); color: var(--azure); box-shadow: 0 8px 26px -14px rgba(20, 50, 110, .45); }
[data-theme="light"] .theme:hover { border-color: rgba(31, 92, 184, .65); box-shadow: 0 8px 26px -10px rgba(20, 60, 140, .45); }
[data-theme="light"] .theme__sun { display: none; }
[data-theme="light"] .theme__moon { display: block; }

/* the words: navy, with a pale halo instead of a dark one where a branch passes behind them */
[data-theme="light"] .intro::before { background: radial-gradient(farthest-side at 36% 50%, rgba(236, 243, 252, .92), rgba(236, 243, 252, .72) 55%, transparent); }
[data-theme="light"] .intro h1 { text-shadow: 0 0 34px rgba(255, 255, 255, .7); }
[data-theme="light"] .trunk :is(h2, h3, p, dt, dd, li, blockquote, figcaption) { text-shadow: 0 0 18px rgba(236, 243, 252, .96), 0 1px 3px rgba(236, 243, 252, .9); }
[data-theme="light"] .trunk .node.is-active .node__title { text-shadow: 0 0 30px rgba(42, 111, 214, .22), 0 0 18px rgba(236, 243, 252, .96); }
[data-theme="light"] .ph { color: #5d7396; text-decoration-color: rgba(26, 99, 198, .45); }
[data-theme="light"] :is(h1, h2, h3, dt) .ph { color: #4f678c; }
[data-theme="light"] :is(.now dt, .fact dt, .skill__title, .step__when, .role__when, .work__when, .part__when) .ph { color: inherit; }

/* photos and frames */
[data-theme="light"] .portrait .holo { box-shadow: 0 0 0 1px rgba(31, 92, 184, .35), 0 0 50px -10px rgba(42, 111, 214, .4); }
[data-theme="light"] .portrait__ring { background: repeating-conic-gradient(rgba(26, 99, 198, .5) 0 .6deg, transparent .6deg 6deg); }
[data-theme="light"] .holo { background: #cddbef; }
[data-theme="light"] .holo--empty { background: rgba(226, 236, 250, .65); border-color: rgba(31, 92, 184, .35); }
[data-theme="light"] .cue { background: rgba(244, 248, 255, .88); }

/* cards, values and the ways to get in touch */
[data-theme="light"] .summary { box-shadow: 0 24px 60px -32px rgba(20, 50, 110, .45); }
/* the roots run behind these, in dark ink on a pale ground: so by day the cards are nearly opaque and the words sit on
   a clean ground (the blur behind the Say hello card does not reach the 3D canvas in every browser, so it cannot be
   relied on to soften what shows through) */
[data-theme="light"].gl-on .summary { background: rgba(244, 248, 255, .96); -webkit-backdrop-filter: blur(26px); backdrop-filter: blur(26px); }
[data-theme="light"] .value { background: rgba(246, 249, 255, .96); border-color: rgba(31, 92, 184, .28); }
[data-theme="light"] .tip { background: rgba(246, 249, 255, .96); border-color: rgba(31, 92, 184, .28); box-shadow: 0 14px 34px -20px rgba(20, 60, 140, .5); }
[data-theme="light"] .tip:not(.tip--cv):hover { border-color: rgba(31, 92, 184, .65); box-shadow: 0 16px 38px -18px rgba(20, 60, 140, .6); }
[data-theme="light"] .tip--blank { box-shadow: none; }

/* the controls and notes */
[data-theme="light"] .motion { border-color: rgba(31, 92, 184, .25); background: rgba(246, 249, 255, .9); }
[data-theme="light"] .motion:hover { border-color: rgba(31, 92, 184, .6); }
[data-theme="light"] .gl-note { border-color: rgba(31, 92, 184, .35); background: rgba(246, 249, 255, .96); color: var(--ink); box-shadow: 0 12px 34px -18px rgba(20, 50, 110, .5); }
[data-theme="light"] .gl-note__close:hover { background: rgba(31, 92, 184, .1); }

/* the 3D tree's surroundings: a pale lens edge, the year tags on the rings, and the band that stands in for the trunk
   further down the page until the tree is up */
[data-theme="light"].gl-on .lens { background: radial-gradient(ellipse 75% 70% at 50% 46%, transparent 60%, rgba(70, 105, 160, .12)); }
@media (max-width: 860px) { [data-theme="light"].gl-on .summary { background: rgba(244, 248, 255, .97); -webkit-backdrop-filter: none; backdrop-filter: none; } }

/* ++underlined++ in the content: a thin, offset line, so it does not read as a link */
u { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }

[data-theme="light"] .wall__p { background: #fff; box-shadow: 0 18px 34px -20px rgba(20, 50, 110, .55), 0 0 0 1px rgba(31, 92, 184, .14); }

/* the big view of a photo (lightbox.js) */
.holo[data-lb] { cursor: zoom-in; }
.holo[data-lb]:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
html.lb-open { overflow: hidden; }
.lb { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; opacity: 0; transition: opacity .22s ease; }
.lb[hidden] { display: none; }
.lb.is-open { opacity: 1; }
.lb__back { position: absolute; inset: 0; background: rgba(2, 6, 14, .975); }
.lb__fig { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; width: 100%; height: 100%; margin: 0; padding: 64px 76px 78px; box-sizing: border-box; }
.lb__img { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(100vh - 170px); max-height: calc(100dvh - 170px); flex: 0 1 auto; min-height: 0; object-fit: contain; border-radius: 6px; box-shadow: 0 30px 80px -30px #000; background: #0b1a33; }
.lb__img.is-in { animation: lb-in .38s cubic-bezier(.2, .7, .2, 1); }
.lb.is-loading .lb__img { opacity: .35; }
@keyframes lb-in { from { opacity: 0; transform: translateX(var(--from, 0)); } to { opacity: 1; transform: none; } }
.lb__cap { flex: none; display: flex; flex-direction: column; align-items: center; gap: 3px; max-width: min(70ch, 92vw); text-align: center; color: #c5d3e8; font-size: 15px; line-height: 1.35; }
.lb__cap strong { color: #eaf2ff; font: 700 17px/1.25 var(--display); }
.lb__btn { position: absolute; z-index: 1; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0; border-radius: 50%; border: 1px solid rgba(111, 227, 255, .3); background: rgba(9, 22, 44, .8); color: #eaf2ff; cursor: pointer; transition: border-color .2s, background-color .2s; }
.lb__btn:hover, .lb__btn:focus-visible { border-color: var(--cyan); background: rgba(14, 34, 66, .95); }
.lb__btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.lb__btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.lb__close { top: 16px; right: 16px; }
.lb__prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb__next { right: 16px; top: 50%; transform: translateY(-50%); }
.lb__btn[hidden] { display: none; }
.lb__count { position: absolute; top: 24px; left: 24px; margin: 0; color: #a9b8cd; font: 600 14px/1 var(--display); font-variant-numeric: tabular-nums; }
@media (max-width: 860px) {
  .lb__fig { padding: 60px 12px 70px; }
  .lb__btn { width: 42px; height: 42px; }
  .lb__prev, .lb__next { top: auto; bottom: 14px; transform: none; }
  .lb__prev { left: calc(50% - 56px); } .lb__next { right: calc(50% - 56px); }
}
@media (prefers-reduced-motion: reduce) { .lb, .lb__img.is-in { animation: none; transition: none; } }
.lb__img[hidden] { display: none; }
