/* joshuawestad.com: the stem of the flower runs on as one hairline of
   cold light, and the page hangs off it.
   The stem first, then one section each for the photographs (PHOTO), the
   room, words and surfaces (SURFACE), the end of the line (BLOOM) and
   the printed page (PRINT). */

:root {
  color-scheme: dark;

  /* Ground and light */
  --ground: #040811;            /* the page starts on this, and the opener gradient ends on it */
  --field: rgba(26, 72, 170, 0.20);   /* the deep blue light in the room */
  --ink: #d6e0ee;               /* reading text */
  --ink-hi: #eef3fa;            /* headings, names, values */
  --ink-mute: #8ea2bf;          /* captions */
  --label: #7fb3e8;             /* small capitals */
  --link: #a6d3ff;
  --link-line: rgba(166, 211, 255, 0.42);
  --hair: rgba(132, 178, 245, 0.16);  /* rules between things */
  --frame: rgba(132, 178, 245, 0.2);  /* the frames of photographs, entries and cards */
  --frame-0: rgba(132, 178, 245, 0);
  --tick: rgba(196, 230, 255, 0.88);  /* the corner ticks of a frame */
  --tick-len: 12px;
  --line: rgba(122, 176, 250, 0.36);  /* the spine at rest */
  --lit-line: rgba(176, 224, 255, 0.78);  /* the lit stem, drawn by site.js */
  --hot: #ecf8ff;               /* the head of the light and its tail */
  --node: #a9d8ff;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);  /* every entrance */

  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;

  /* Type */
  --body: 17px;
  --body-lh: 1.6;
  --lead: 21px;
  --lead-lh: 1.45;
  --h2: 28px;
  --h2-lh: 1.2;
  --h3: 21px;
  --small: 11.5px;
  --step: 19px;

  /* The spine */
  --spine: 23px;                /* where the line runs, from the left edge */
  --gutter: 25px;               /* from the line to the words */
  --edge: 20px;                 /* right side margin */
  --bend: 136px;                /* height of the curve from the centre to the line */
  --section: 96px;              /* between sections */
  --reach-h: 48px;              /* the contact line */
  --bud-h: 40px;
  --end: 26vh;                  /* room under the contact (svh below, where known) */
  --tail: calc(var(--end) + var(--reach-h) / 2 + var(--bud-h) / 2 - 3px);
  --cue: min(96px, 11vh);       /* the stem below the name, at the foot of the opener */
  --leaf: 34px;                 /* length of a leaf on the stem */

  /* The light (site.js): how long its tails are */
  --tail-long: 132px;
  --tail-short: 30px;
  --tail-pulse: 58px;
}
/* the small viewport height, where the browser knows it: the room and the
   cue keep their size while a phone's browser bars come and go */
@supports (height: 1svh) {
  :root {
    --end: 26svh;
    --cue: min(96px, 11svh);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--ground);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--body);
  line-height: var(--body-lh);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

h1, h2, h3, p, figure, dl, dd, ol, ul { margin: 0; }

img { display: block; max-width: 100%; height: auto; }

a {
  color: var(--link);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--link-line);
  text-underline-offset: 0.24em;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}
a:hover { color: #e4f3ff; text-decoration-color: rgba(228, 243, 255, 0.9); }
a:focus-visible {
  outline: 2px solid #8fd4ff;
  outline-offset: 3px;
  border-radius: 2px;
}
[tabindex="-1"]:focus { outline: none; }

/* Skip link: off screen until it has focus */
.skip {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 16px;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  background: var(--ground);
  border: 1px solid var(--hair);
  transform: translateY(-140%);
}
.skip:focus-visible { transform: translateY(12px); }

/* ---------------------------------------------------------------
   The opener. opener.css draws the flower, the name and the line
   under it, and fades its own bottom into --ground. This file only
   draws the cue and the way to the contact, and lays the opener above
   the page, so nothing of the page (the first pool of light, the light
   before it enters the curve) ever paints over the flower.
   --------------------------------------------------------------- */

.opener { z-index: 1; }

/* A quiet way to the contact from the first screen: the words of its
   heading, small wide capitals at the top right, above the flower's
   canvas and clear of the flower and the name. A plain jump. */
.opener__reach {
  position: absolute;
  z-index: 2;
  top: 8px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  font-size: 11.5px;
  line-height: 1.4;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
  color: rgba(200, 216, 240, 0.85);
  text-decoration: none;
}
.opener__reach:hover { color: #f5f9ff; }

/* The cue: the stem leaving the flower, decoration only. It runs on,
   without a break, into the curve at the top of main. */
.opener__cue {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 0;
  width: 44px;
  height: calc(var(--cue) + 20px);
  margin-left: -22px;
  text-decoration: none;
}
.opener__cue::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 1px;
  height: var(--cue);
  margin-left: -0.5px;
  background: linear-gradient(to bottom, rgba(150, 205, 255, 0), var(--line) 62%);
}

/* ---------------------------------------------------------------
   The spine
   --------------------------------------------------------------- */

.stem {
  position: relative;
  isolation: isolate;
  padding-top: var(--bend);
  background:
    linear-gradient(to bottom, var(--ground) 0, rgba(4, 8, 17, 0) 260px),
    radial-gradient(70% 560px at var(--spine) 120px, var(--field), rgba(26, 72, 170, 0) 72%),
    radial-gradient(80% 460px at var(--spine) 100%, rgba(26, 72, 170, 0.16), rgba(26, 72, 170, 0) 70%),
    var(--ground);
}

.spine {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.spine::before {
  content: "";
  position: absolute;
  left: var(--spine);
  top: var(--bend);
  bottom: var(--tail);
  width: 1px;
  margin-left: -0.5px;
  background: var(--line);
  box-shadow: 0 0 5px rgba(90, 160, 255, 0.28);
}

/* a faint haze of blue light the stem gives off */
.spine::after {
  content: "";
  position: absolute;
  left: var(--spine);
  top: calc(var(--bend) + 40px);
  bottom: calc(var(--tail) + 40px);
  width: 360px;
  margin-left: -180px;
  background: linear-gradient(to right, rgba(30, 80, 190, 0), rgba(30, 80, 190, 0.075) 50%, rgba(30, 80, 190, 0));
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 400px, #000 calc(100% - 400px), transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 400px, #000 calc(100% - 400px), transparent);
}

.spine__bend {
  position: absolute;
  top: 0;
  left: var(--spine);
  width: calc(50% - var(--spine));
  height: var(--bend);
  overflow: visible;
}
.spine__bend path {
  fill: none;
  stroke: var(--line);
  stroke-width: 1.2px;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  shape-rendering: geometricPrecision;
}

/* Marks on the line: a node where each section begins, a glowing seed
   point on the stem with only a hair of ground round it. The heading
   carries it: --node-x is where the line runs, seen from the heading. */
.part__title { position: relative; --node-x: calc(var(--gutter) * -1); }
.part__title::before,
.about::before {
  content: "";
  position: absolute;
  left: var(--node-x, var(--spine));
  top: calc(var(--h2) * var(--h2-lh) / 2 - 4px);
  width: 8px;
  height: 8px;
  margin-left: -4px;
  border-radius: 50%;
  border: 0;
  background: radial-gradient(circle, #f2faff 0, #e8f6ff 1.5px, rgba(150, 214, 255, 0.6) 2.7px, var(--ground) 4px);
  box-shadow: 0 0 0 1.5px var(--ground), 0 0 14px 2px rgba(90, 168, 255, 0.45);
}
.about::before { top: calc(var(--lead) * var(--lead-lh) / 2 - 4px); }

/* a pool of deep blue light where each section begins */
.part__title::after,
.about::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: var(--node-x, var(--spine));
  top: calc(var(--h2) * var(--h2-lh) / 2);
  width: 440px;
  height: 440px;
  margin: -220px 0 0 -220px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(36, 92, 210, 0.16), rgba(36, 92, 210, 0.05) 55%, rgba(36, 92, 210, 0));
  pointer-events: none;
}
/* the summary's pool is smaller: it must fade out before the top of main,
   where the opener lies over the page */
.about::after {
  top: calc(var(--lead) * var(--lead-lh) / 2);
  width: 260px;
  height: 260px;
  margin: -130px 0 0 -130px;
}

/* A finer mark where an entry or a card begins */
.entry__name::before,
.card__title::before {
  content: "";
  position: absolute;
  left: var(--spine);
  width: 5px;
  height: 5px;
  margin: calc(var(--h3) * 0.65 - 2.5px) 0 0 -2.5px;
  border-radius: 50%;
  background: var(--node);
  box-shadow: 0 0 0 2px var(--ground), 0 0 10px rgba(110, 190, 255, 0.6);
}

/* ---------------------------------------------------------------
   Sections
   --------------------------------------------------------------- */

.about,
.part {
  position: relative;
  padding: 0 var(--edge) var(--section) calc(var(--spine) + var(--gutter));
}

.lead {
  font-size: var(--lead);
  line-height: var(--lead-lh);
  font-weight: 300;
  color: var(--ink-hi);
  letter-spacing: -0.003em;
  max-width: 30em;
}

.part__title {
  font-family: var(--display);
  font-size: var(--h2);
  line-height: var(--h2-lh);
  font-weight: 300;
  letter-spacing: -0.005em;
  color: var(--ink-hi);
  margin-bottom: 32px;
  text-wrap: balance;
}

.part__body { max-width: 31em; }
/* running text keeps a comfortable measure (about 65 characters) */
.path__step p,
.prose > p { max-width: 28.5em; }
.part__body p + p,
.prose p + p { margin-top: 1.05em; }

/* Photos */
.photo { margin-top: 40px; }
.photo picture {
  position: relative;
  display: block;
  background: #0a1426;
}
.photo picture::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow:
    inset 0 0 0 1px rgba(160, 205, 255, 0.14),
    inset 0 -90px 90px -60px rgba(4, 8, 17, 0.55);
}
.photo img {
  width: 100%;
  filter: saturate(0.86) contrast(1.04) brightness(0.94);
}
.photo figcaption {
  margin-top: 12px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-mute);
}
.photo--portrait { margin-right: calc(var(--edge) * -1); }
.photo--portrait figcaption { padding-right: var(--edge); }

/* The four facts: right under the summary, before the portrait */
.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 20px;
  margin-top: 32px;
}
.facts__item {
  padding: 14px 0 18px;
  border-top: 1px solid var(--hair);
}
.facts dt {
  font-size: var(--small);
  line-height: 1.4;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--label);
}
.facts dd {
  margin-top: 6px;
  font-size: 17px;
  line-height: 1.4;
  color: var(--ink-hi);
}
.about .photo--portrait { margin-top: 28px; }
/* the narrowest phones: one fact a row, so no label breaks */
@media (max-width: 22.4375em) {
  .facts { grid-template-columns: 1fr; }
}

/* What I do (the frames of entries and cards: SURFACE, section A) */
.entry__head { margin-bottom: 14px; }
.entry__name {
  text-wrap: balance;
  font-family: var(--display);
  font-size: var(--h3);
  line-height: 1.3;
  font-weight: 400;
  color: var(--ink-hi);
}
.entry__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: 4px;
}
.entry__role {
  font-size: var(--small);
  line-height: 1.4;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--label);
}
.entry__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.entry__meta .entry__link { margin-top: -4px; margin-bottom: -6px; }
.part__body .entry__terms {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--hair);
  font-size: 19px;
  line-height: 1.45;
  font-weight: 300;
  color: var(--ink-hi);
}
.part__body .entry__more { margin-top: 4px; }

/* How I got into pest control: six leaves on the stem, left and right
   in turn. Each leaf is a long lily leaf (assets/leaf.svg) fixed to the
   line at its base. */
.path {
  list-style: none;
  padding: 0;
  counter-reset: step;
}
.path__step { counter-increment: step; }
.path__step + .path__step { margin-top: 34px; }
.path__label {
  text-wrap: balance;
  font-family: var(--display);
  font-size: var(--step);
  line-height: 1.35;
  font-weight: 400;
  color: var(--ink-hi);
  margin-bottom: 6px;
}
.path__label::before {
  content: counter(step);
  content: counter(step) / "";
  display: inline-block;
  min-width: 1.5em;
  font-weight: 300;
  color: var(--label);
  font-variant-numeric: tabular-nums;
}
.path__step::before {
  content: "";
  position: absolute;
  left: var(--spine);
  width: var(--leaf);
  height: calc(var(--leaf) * 0.3);
  margin: calc(var(--step) * 0.675 - var(--leaf) * 0.15) 0 0 0;
  background: url("leaf.svg") 0 0 / 100% 100% no-repeat;
  transform-origin: 0 50%;
  rotate: -57deg;
  filter: drop-shadow(0 0 3px rgba(90, 170, 255, 0.55));
}
.path__step:nth-child(even)::before { rotate: -123deg; transform: scaleY(-1); }

/* Things I've built */
.built { display: grid; }
.card {
  display: flex;
  flex-direction: column;
}
.card__title {
  text-wrap: balance;
  font-family: var(--display);
  font-size: var(--h3);
  line-height: 1.3;
  font-weight: 400;
  color: var(--ink-hi);
  margin-bottom: 12px;
}
.card__title a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: -8px 0 -8px;
  /* a title first, like the other card's title; the underline says it is a link */
  color: var(--ink-hi);
  text-decoration-color: var(--link-line);
}
.card__title a:hover { color: #ffffff; text-decoration-color: rgba(228, 243, 255, 0.9); }
.card p + p { margin-top: 1em; }
.part__body .card__foot { margin-top: auto; padding-top: 6px; }

/* Official links */
.links {
  list-style: none;
  padding: 0;
  border-bottom: 1px solid var(--hair);
}
.links li { border-top: 1px solid var(--hair); break-inside: avoid; }
.links a {
  text-wrap: balance;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 54px;
  padding: 8px 0;
  text-decoration: none;
  color: var(--ink-hi);
}
.links a::after {
  content: "";
  flex: none;
  width: 18px;
  height: 10px;
  background: url("arrow.svg") 0 0 / 18px 10px no-repeat;
  opacity: 0.7;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.links a:hover { color: #ffffff; }
.links a:hover::after { opacity: 1; transform: translateX(4px); }

/* How to reach me: the line ends here, in a bud */
.part--reach { padding-bottom: var(--end); }
.part--reach .part__title { margin-bottom: 18px; }
.reach {
  display: flex;
  align-items: center;
  height: var(--reach-h);
}
.bud {
  position: absolute;
  left: var(--spine);
  width: calc(var(--bud-h) / 2);
  height: var(--bud-h);
  margin-left: calc(var(--bud-h) / -4);
  overflow: visible;
}
.bud path { vector-effect: non-scaling-stroke; }
.bud__halo { fill: rgba(120, 196, 255, 0.22); stroke: none; filter: blur(4px); }
.bud__shell { fill: url(#bud-light); stroke: var(--node); stroke-width: 1px; }
.bud__seam { fill: none; stroke: rgba(180, 225, 255, 0.55); stroke-width: 0.75px; }
.reach__mail {
  display: inline-flex;
  align-items: center;
  height: var(--reach-h);
  font-family: var(--display);
  font-size: clamp(19px, 5.6vw, 23px);
  font-weight: 300;
  letter-spacing: 0.01em;
  white-space: nowrap;
  color: var(--ink-hi);
}

/* ---------------------------------------------------------------
   The light on the stem (site.js). Everything below exists only when
   the script runs and motion is welcome: the script adds the class
   stem-live to html and builds the light itself. Without it every
   mark is simply lit and still. Only transform and opacity move.

   Any element with data-wake is a mark too: the light stops there and
   it gets the class is-lit when the light reaches it. Waiting states
   are styled under html.stem-live only.
   --------------------------------------------------------------- */

/* Waiting marks: dimmer and smaller, never hidden */
.stem-live .part__title::before,
.stem-live .about::before,
.stem-live .entry__name::before,
.stem-live .card__title::before {
  transition: transform 0.7s var(--ease), opacity 0.5s ease;
}
.stem-live .part__title:not(.is-lit)::before,
.stem-live .about:not(.is-lit)::before { opacity: 0.55; transform: scale(0.72); }
.stem-live .entry:not(.is-lit) .entry__name::before,
.stem-live .card:not(.is-lit) .card__title::before { opacity: 0.35; transform: scale(0.6); }

/* The pool of blue light behind a section title swells a little when
   the light reaches its node, then settles */
.stem-live .part__title:not(.is-lit)::after,
.stem-live .about:not(.is-lit)::after { opacity: 0.5; transform: scale(0.84); }
.stem-live .part__title.is-lit::after,
.stem-live .about.is-lit::after { animation: pool-swell 2.4s var(--ease); }
@keyframes pool-swell {
  0% { opacity: 0.5; transform: scale(0.84); }
  34% { opacity: 1; transform: scale(1.14); }
  100% { opacity: 1; transform: scale(1); }
}

/* A leaf that is waiting is a small closed sliver against the stem.
   When the light reaches it, it unfurls from its base with a small
   turn: it grows to its length, swings out and opens to its width. */
.stem-live .path__step::before {
  transition:
    rotate 1.1s var(--ease),
    scale 0.85s var(--ease),
    transform 0.95s var(--ease) 0.14s,
    opacity 0.45s ease;
}
.stem-live .path__step:not(.is-lit)::before { opacity: 0.6; rotate: -82deg; scale: 0.44 1; transform: scaleY(0.2); }
.stem-live .path__step:nth-child(even):not(.is-lit)::before { rotate: -98deg; transform: scaleY(-0.2); }

.stem-live .bud { transition: opacity 0.8s ease; }
.stem-live .part--reach:not(.is-lit) .bud { opacity: 0.55; }

/* The light itself. On the S curve: windows onto copies of the curve;
   each window shows its copy above its own lower edge and moves with
   transform alone (once the light is past the curve they stand still).
   On the straight line: plain strips sliding inside one still clip. */
.fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.fx-win {
  position: absolute;
  top: 0;
  left: calc(var(--spine) - 22px);
  width: calc(50% - var(--spine) + 44px);
  overflow: hidden;
  will-change: transform, opacity;
}
.fx-in {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: var(--bend);
  will-change: transform;
}
.fx-curve {
  position: absolute;
  left: 22px;
  top: 0;
  width: calc(100% - 44px);
  height: var(--bend);
  overflow: visible;
}
.fx-curve path {
  fill: none;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.fx-straight {
  position: absolute;
  left: calc(var(--spine) - 10px);
  width: 20px;
  top: var(--bend);
  bottom: var(--tail);
  overflow: hidden;
}
.fx-straight > * {
  position: absolute;
  left: 50%;
  top: 0;
  will-change: transform, opacity;
}

/* the lit stem: where the light has been */
.fx-win--lit { height: calc(var(--bend) + 4px); }
.fx-win--lit .fx-curve { filter: drop-shadow(0 0 2.5px rgba(96, 176, 255, 0.6)); }
.fx-win--lit .fx-curve path { stroke: var(--lit-line); stroke-width: 1.2px; }
.fx-straight__lit,
.cue-fx__lit {
  width: 1px;
  height: 100%;
  margin-left: -0.5px;
  background: var(--lit-line);
  box-shadow: 0 0 6px rgba(96, 176, 255, 0.5);
  transform: translateY(-100%);
}

/* the tails: a hot copy of the stem seen through a short window, or a
   hot strip, that fades toward the top */
.fx-win--long,
.fx-win--short,
.fx-win--pulse,
.fx-streak,
.cue-fx__tail {
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000);
  mask-image: linear-gradient(to bottom, transparent, #000);
  opacity: 0;
}
.fx-win--long,
.fx-streak--long,
.cue-fx__tail--long { height: var(--tail-long); }
.fx-win--short,
.fx-streak--short,
.cue-fx__tail--short { height: var(--tail-short); transition: opacity 0.3s ease; }
.fx-win--pulse,
.fx-streak--pulse,
.cue-fx__tail--pulse { height: var(--tail-pulse); }
.fx-streak,
.cue-fx__tail {
  width: 13px;
  margin-left: -6.5px;
  background: linear-gradient(to right,
    rgba(80, 160, 255, 0) 0,
    rgba(80, 160, 255, 0.22) 30%,
    rgba(170, 222, 255, 0.7) 44%,
    var(--hot) 46.5%,
    var(--hot) 53.5%,
    rgba(170, 222, 255, 0.7) 56%,
    rgba(80, 160, 255, 0.22) 70%,
    rgba(80, 160, 255, 0) 100%);
}
.fx-win--long .fx-curve,
.fx-win--short .fx-curve,
.fx-win--pulse .fx-curve { filter: drop-shadow(0 0 2px rgba(120, 200, 255, 0.8)) drop-shadow(0 0 5px rgba(80, 160, 255, 0.4)); }
.fx-win--long .fx-curve path,
.fx-win--short .fx-curve path,
.fx-win--pulse .fx-curve path { stroke: var(--hot); stroke-width: 1.5px; }

/* the head of the light */
.fx-head {
  position: absolute;
  left: 0;
  top: 0;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  opacity: 0;
  will-change: transform, opacity;
  transition: opacity 0.5s ease;
}
.fx-head::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle,
    #f7fcff 0,
    #eef9ff 1.3px,
    rgba(176, 224, 255, 0.78) 2.6px,
    rgba(110, 186, 255, 0.3) 6.5px,
    rgba(80, 160, 255, 0.09) 13px,
    rgba(80, 160, 255, 0) 22px);
  transition: opacity 0.3s ease;
}
.fx-head--pulse { transition: none; }
.is-on > .fx-head:not(.fx-head--pulse) { opacity: 1; }
.is-on.is-done > .fx-head:not(.fx-head--pulse) { opacity: 0; transition-duration: 1.4s; }
/* handed over at the end of the line: what carries the light on draws it */
.is-on.is-handed > .fx-head:not(.fx-head--pulse) { opacity: 0; transition: none; }
.is-on .fx-win--short,
.is-on .fx-streak--short,
.is-on .cue-fx__tail--short { opacity: 1; }
.is-on.is-done .fx-win--short,
.is-on.is-done .fx-streak--short,
.is-on.is-done .cue-fx__tail--short { opacity: 0; }
/* it rests when the reader rests: the tail draws in and the head
   settles to an ember */
.is-resting .fx-win--short,
.is-resting .fx-streak--short,
.is-resting .cue-fx__tail--short { opacity: 0; transition: opacity 1s ease 0.5s; }
.is-resting > .fx-head:not(.fx-head--pulse)::before { opacity: 0.62; transition: opacity 1.8s ease 0.9s; }
.fx-head.is-flare::before { animation: head-flare 1.2s ease-out; }
@keyframes head-flare {
  35% { opacity: 1; scale: 1.35; }
}

/* a node rings once when the light reaches it */
.fx-ring {
  position: absolute;
  left: 0;
  top: 0;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  border-radius: 50%;
  border: 1px solid rgba(196, 232, 255, 0.9);
  box-shadow: 0 0 10px rgba(90, 170, 255, 0.35), inset 0 0 8px rgba(90, 170, 255, 0.2);
  opacity: 0;
  scale: 0.17;
}
.fx-ring--dot { width: 30px; height: 30px; margin: -15px 0 0 -15px; border-color: rgba(196, 232, 255, 0.7); }
.fx-ring.is-ringing { animation: ring 1.5s var(--ease); }
@keyframes ring {
  0% { opacity: 0; scale: 0.17; }
  10% { opacity: 0.95; }
  100% { opacity: 0; scale: 1; }
}

/* with a mouse: light gathers a little around a node near the pointer */
.fx-halo {
  position: absolute;
  left: 0;
  top: 0;
  width: 132px;
  height: 132px;
  margin: -66px 0 0 -66px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(140, 206, 255, 0.34), rgba(90, 165, 255, 0.11) 45%, rgba(90, 165, 255, 0));
  opacity: 0;
  transition: opacity 0.6s ease;
}

/* the same light on the cue, inside the opener */
.cue-fx {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: var(--cue);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 62%);
  mask-image: linear-gradient(to bottom, transparent, #000 62%);
  pointer-events: none;
}
.cue-fx > * { position: absolute; top: 0; }
.cue-fx > .fx-head { left: 50%; }
.cue-fx__lit,
.cue-fx__tail {
  left: 50%;
  will-change: transform, opacity;
}

/* ---------------------------------------------------------------
   Tablet: the same stem, more room
   --------------------------------------------------------------- */

@media (min-width: 40em) {
  :root {
    --spine: clamp(30px, 6vw, 56px);
    --gutter: 34px;
    --edge: 40px;
    --body: 18px;
    --lead: 24px;
    --h2: 32px;
    --h3: 23px;
    --step: 20px;
    --section: 128px;
    --bend: 168px;
    --leaf: 46px;
  }
  .entry__meta { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 18px; margin-top: 0; }
  .entry__meta .entry__link { margin: 0; }
  .photo--portrait { margin-right: 0; max-width: 420px; }
  .about .photo--portrait { margin-top: 36px; }
}

/* ---------------------------------------------------------------
   Desktop: the line runs a third of the way in, headings on its
   left, the words on its right
   --------------------------------------------------------------- */

@media (min-width: 60em) {
  :root {
    --spine: max(34vw, calc(50vw - 170px));
    --gutter: 46px;
    --edge: 48px;
    --body: 18px;
    --body-lh: 1.62;
    --lead: 27px;
    --lead-lh: 1.42;
    --h2: 34px;
    --h2-lh: 1.18;
    --h3: 23px;
    --step: 21px;
    --small: 12px;
    --section: 168px;
    --bend: 200px;
    --end: 30vh;
    --bud-h: 50px;
    --cue: min(104px, 11vh);
    --leaf: 60px;
    --tail-long: 160px;
    --tail-short: 34px;
    --tail-pulse: 70px;
  }
  @supports (height: 1svh) {
    :root { --cue: min(104px, 11svh); }
  }

  .about,
  .part {
    display: grid;
    grid-template-columns: var(--spine) minmax(0, 1fr);
    padding-left: 0;
    padding-right: var(--edge);
    align-items: start;
  }
  /* the heading sits on the same baseline as the first line beside it */
  .part { align-items: baseline; }

  .part__title {
    --node-x: 100%;
    grid-column: 1;
    grid-row: 1 / span 2;
    padding-right: var(--gutter);
    padding-left: 24px;
    text-align: right;
    margin-bottom: 0;
  }
  .part__body {
    grid-column: 2;
    grid-row: 1 / span 2;
    padding-left: var(--gutter);
    max-width: calc(29em + var(--gutter));
  }

  .about { grid-template-rows: auto 1fr; }
  .about .lead { grid-column: 2; grid-row: 1; padding-left: var(--gutter); max-width: calc(21em + var(--gutter)); }
  .about .facts { grid-column: 2; grid-row: 2; margin-left: var(--gutter); max-width: 38em; margin-top: 40px; }
  .about .photo--portrait {
    grid-column: 1;
    grid-row: 1 / span 2;
    justify-self: end;
    width: min(340px, calc(100% - var(--gutter) - 24px));
    max-width: none;
    margin: 6px var(--gutter) 0 0;
  }
  .about .photo--portrait figcaption { text-align: right; padding-right: 0; }

  /* the first entry and the first card begin on the heading's own node,
     and the path begins on its first leaf */
  .entry:first-child .entry__name::before,
  .card:first-child .card__title::before,
  #how-i-got-into-pest-control .part__title::before { display: none; }

  .links { max-width: 40em; }

  .part--reach { align-items: center; }
  .part--reach .part__title { grid-row: 1; margin-bottom: 0; }
  .part--reach .part__title::before { display: none; }
  .reach { grid-column: 2; grid-row: 1; padding-left: var(--gutter); }
  .reach__mail { font-size: 34px; }
}

/* ===============================================================
   PHOTO: the photograph (fx-photo.js)
   The photograph sits in a hairline plate with four corner ticks.
   Before the light reaches it, the script holds it as a cold blue
   scan of itself; when the light arrives a line of light develops it
   once, top to bottom, the corners light and the caption wakes.
   Everything here that waits is switched on by fx-photo.js only:
   without the script, or with "reduce motion", the photograph is
   natural, the corners are lit and the caption is awake.
   =============================================================== */

/* The plate: a hairline a few pixels outside the photograph, with a
   short tick at each corner. Static, part of the finished page. */
.photo picture { --fxp-out: 7px; }

.photo picture::before {
  content: "";
  position: absolute;
  z-index: 2;                       /* above the develop canvas */
  top: calc(var(--fxp-out) * -1);
  right: calc(var(--fxp-out) * -1);
  bottom: calc(var(--fxp-out) * -1);
  left: calc(var(--fxp-out) * -1);
  pointer-events: none;
  border: 1px solid var(--frame);
  background:
    linear-gradient(var(--tick), var(--tick)) 0 0 / var(--tick-len) 1px no-repeat,
    linear-gradient(var(--tick), var(--tick)) 0 0 / 1px var(--tick-len) no-repeat,
    linear-gradient(var(--tick), var(--tick)) 100% 0 / var(--tick-len) 1px no-repeat,
    linear-gradient(var(--tick), var(--tick)) 100% 0 / 1px var(--tick-len) no-repeat,
    linear-gradient(var(--tick), var(--tick)) 0 100% / var(--tick-len) 1px no-repeat,
    linear-gradient(var(--tick), var(--tick)) 0 100% / 1px var(--tick-len) no-repeat,
    linear-gradient(var(--tick), var(--tick)) 100% 100% / var(--tick-len) 1px no-repeat,
    linear-gradient(var(--tick), var(--tick)) 100% 100% / 1px var(--tick-len) no-repeat;
  background-origin: border-box;
  background-clip: border-box;
}

/* the caption steps clear of the plate */
.photo figcaption { margin-top: 20px; }

/* On a phone the photograph stops at the page margin like the words
   do, so the plate keeps its four corners. */
@media (max-width: 39.99em) {
  .photo--portrait { margin-right: 0; }
  .photo--portrait figcaption { padding-right: 0; }
}

/* Script only. The waiting state has no transition (so it is simply
   there before anything is seen); waking out of it does. */
.fxp-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* The develop canvas lies exactly over the img (the script sizes it in
   whole device pixels). It comes in and goes out over a few frames, so a
   resampling difference of a pixel can never show as a jump. */
.fxp-canvas {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  pointer-events: none;
  opacity: 0;
}
.fxp-canvas.fxp-in { opacity: 1; transition: opacity 0.16s linear; }
.fxp-canvas.fxp-in.fxp-gone { opacity: 0; transition: opacity 0.3s linear; }

.fxp-on .photo.fxp-wait picture::before { opacity: 0.3; }
.fxp-on .photo.fxp-wait figcaption { opacity: 0.8; }

.fxp-on .photo:not(.fxp-wait) picture::before {
  transition: opacity 0.6s var(--ease);
}
.fxp-on .photo:not(.fxp-wait) figcaption {
  transition: opacity 0.7s var(--ease) 0.18s, transform 0.7s var(--ease) 0.18s;
}

/* ===============================================================
   SURFACE: the room the page stands in, the words that wake when the
   light reaches them, and the surfaces they sit on (fx-surface.js).
   A. Still styles. They hold with JavaScript off and with "reduce
      motion" on: the surfaces with their frames and corner ticks, the
      contact's light, the links' hover light.
   B. Motion styles, only under html.fx-live, a class that only
      fx-surface.js adds (and only when motion is welcome).
   =============================================================== */

:root {
  --fx-flash: rgba(214, 240, 255, 0.95);       /* light while it draws */
  --fx-flash-0: rgba(214, 240, 255, 0);
  /* the faint light inside a surface: it pools in the top left corner,
     where the light comes in from the stem, and fades out before the
     other edges (so a surface that runs off a phone screen has no edge) */
  --fx-inner: radial-gradient(130% 100% at 0 0, rgba(38, 86, 186, 0.17), rgba(38, 86, 186, 0.13) 25%, rgba(38, 86, 186, 0.075) 50%, rgba(38, 86, 186, 0.03) 75%, rgba(38, 86, 186, 0));
  --fx-rise: 0px;                              /* how far waiting words sit low: 0, words never move while they are read */
}

/* A. STILL STYLES (no script needed) ------------------------------- */

/* --- Surfaces: the two entries of "What I do" and the two cards of
   "Things I've built". A hairline frame, corner ticks, a faint inner
   light. On a phone the surface runs off the right edge of the screen,
   so only its left corners carry ticks and its top and bottom lines fade
   out toward the edge. --- */
.entry,
.card {
  margin-right: calc(var(--edge) * -1);
  padding: 22px var(--edge) 24px 18px;
  border: 1px solid transparent;
  border-right: 0;
  background:
    /* ticks, top left */
    linear-gradient(var(--tick), var(--tick)) 0 0 / var(--tick-len) 1px no-repeat,
    linear-gradient(var(--tick), var(--tick)) 0 0 / 1px var(--tick-len) no-repeat,
    /* ticks, bottom left */
    linear-gradient(var(--tick), var(--tick)) 0 100% / var(--tick-len) 1px no-repeat,
    linear-gradient(var(--tick), var(--tick)) 0 100% / 1px var(--tick-len) no-repeat,
    /* frame */
    linear-gradient(to right, var(--frame) 0, var(--frame) 50%, var(--frame-0) 100%) 0 0 / 100% 1px no-repeat,
    linear-gradient(to right, var(--frame) 0, var(--frame) 50%, var(--frame-0) 100%) 0 100% / 100% 1px no-repeat,
    linear-gradient(var(--frame), var(--frame)) 0 0 / 1px 100% no-repeat,
    /* inner light */
    var(--fx-inner);
  background-origin: border-box;
}
.entry + .entry { margin-top: 20px; }
.built { gap: 20px; }

@media (min-width: 40em) {
  .entry,
  .card {
    margin-right: 0;
    padding: 26px 30px 28px;
    border-right: 1px solid transparent;
    background:
      linear-gradient(var(--tick), var(--tick)) 0 0 / var(--tick-len) 1px no-repeat,
      linear-gradient(var(--tick), var(--tick)) 0 0 / 1px var(--tick-len) no-repeat,
      linear-gradient(var(--tick), var(--tick)) 100% 0 / var(--tick-len) 1px no-repeat,
      linear-gradient(var(--tick), var(--tick)) 100% 0 / 1px var(--tick-len) no-repeat,
      linear-gradient(var(--tick), var(--tick)) 0 100% / var(--tick-len) 1px no-repeat,
      linear-gradient(var(--tick), var(--tick)) 0 100% / 1px var(--tick-len) no-repeat,
      linear-gradient(var(--tick), var(--tick)) 100% 100% / var(--tick-len) 1px no-repeat,
      linear-gradient(var(--tick), var(--tick)) 100% 100% / 1px var(--tick-len) no-repeat,
      linear-gradient(var(--frame), var(--frame)) 0 0 / 100% 1px no-repeat,
      linear-gradient(var(--frame), var(--frame)) 0 100% / 100% 1px no-repeat,
      linear-gradient(var(--frame), var(--frame)) 0 0 / 1px 100% no-repeat,
      linear-gradient(var(--frame), var(--frame)) 100% 0 / 1px 100% no-repeat,
      var(--fx-inner);
    background-origin: border-box;
  }
}

/* On a desktop the two framed sections get the frame's padding back, so
   the words inside keep the page's reading measure (29em). */
@media (min-width: 60em) {
  #what-i-do .part__body,
  #things-ive-built .part__body { max-width: calc(29em + var(--gutter) + 62px); }
}

/* --- The fact strip: its hairlines are drawn lines (so they can draw in) --- */
.facts__item { position: relative; }

/* --- Official links: a row lights up on hover and on keyboard focus.
   A line of light along its top edge, and a soft wash behind its words. --- */
.links li { position: relative; }
.links li::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(to right, rgba(206, 238, 255, 0.95), rgba(150, 210, 255, 0.4) 55%, rgba(150, 210, 255, 0));
  transform: scaleX(0);
  transform-origin: 0 50%;
}
.links a { position: relative; }
.links a::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to right, rgba(64, 146, 255, 0.13), rgba(64, 146, 255, 0.04) 55%, rgba(64, 146, 255, 0));
  opacity: 0;
}
.links li:hover::before,
.links li:focus-within::before { transform: none; }
.links a:hover::before,
.links a:focus-visible::before { opacity: 1; }

/* --- The contact: the brightest light on the page. A drawn underline
   with a soft glow under it, and the address in the coldest white. --- */
.reach__mail {
  position: relative;
  color: #f5f9ff;
  text-decoration-color: transparent;
  text-shadow: 0 0 18px rgba(110, 186, 255, 0.32);
}
.reach__mail::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(50% + 0.6em);
  height: 1px;
  pointer-events: none;
  background: linear-gradient(to right, rgba(200, 234, 255, 0.95), rgba(170, 220, 255, 0.8));
  box-shadow: 0 0 6px rgba(120, 196, 255, 0.55);
  transform-origin: 0 50%;
}
.reach__mail::before {
  content: "";
  position: absolute;
  left: -14px;
  right: -14px;
  top: calc(50% + 0.6em - 9px);
  height: 19px;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(120, 196, 255, 0.5), rgba(120, 196, 255, 0.14) 55%, rgba(120, 196, 255, 0));
  opacity: 0.5;
}
.reach__mail:hover { color: #ffffff; }
.reach__mail:hover::before,
.reach__mail:focus-visible::before { opacity: 1; }

@media (prefers-reduced-motion: no-preference) {
  .links li::before { transition: transform 0.5s var(--ease); }
  .links a::before { transition: opacity 0.35s ease; }
  .reach__mail::before { transition: opacity 0.4s ease; }
}

/* High contrast: let the system draw plain lines, and the nodes as plain dots */
@media (forced-colors: active) {
  .part__title::before, .about::before { forced-color-adjust: none; background: CanvasText; box-shadow: none; }
  .entry, .card { border-color: CanvasText; }
  .reach__mail { text-decoration-color: currentColor; }
  .reach__mail::before, .reach__mail::after, .links li::before, .links a::before { display: none; }
}

/* B. MOTION (only under html.fx-live, set by fx-surface.js) --------- */

/* --- 1. The room: two large, soft lights that drift very slowly.
   They live behind everything in the page (z -1 inside main) and stay
   with the screen while the page scrolls past it (sticky). The lights fade
   to nothing before the top and bottom of the screen, so the room has no
   edge where main begins under the flower. (No mask here on purpose: a
   full-screen mask costs the graphics chip a whole extra picture a frame.) --- */
.fx-room {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.fx-room__view {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
.fx-room__light {
  position: absolute;
  border-radius: 50%;
  animation: 1s ease-in-out infinite alternate both;
  animation-play-state: paused;
}
.fx-room.is-awake .fx-room__light { animation-play-state: running; }
.fx-room__light--a {
  left: -55%;
  top: 14%;
  width: 150%;
  height: 72%;
  /* a soft, bell-shaped falloff (no knee in the gradient, so no ring) */
  background: radial-gradient(closest-side, rgba(30, 84, 204, 0.11), rgba(30, 84, 204, 0.094) 20%, rgba(30, 84, 204, 0.064) 40%, rgba(30, 84, 204, 0.033) 60%, rgba(30, 84, 204, 0.011) 80%, rgba(30, 84, 204, 0));
  animation-name: fx-drift-a;
  animation-duration: 57s;
}
.fx-room__light--b {
  left: 38%;
  top: 40%;
  width: 110%;
  height: 56%;
  background: radial-gradient(closest-side, rgba(56, 150, 240, 0.06), rgba(56, 150, 240, 0.051) 20%, rgba(56, 150, 240, 0.035) 40%, rgba(56, 150, 240, 0.018) 60%, rgba(56, 150, 240, 0.006) 80%, rgba(56, 150, 240, 0));
  animation-name: fx-drift-b;
  animation-duration: 71s;
  animation-delay: -23s;
}
@media (min-width: 60em) {
  .fx-room__light--a { left: -6%; top: 12%; width: 90%; height: 80%; }
  .fx-room__light--b { left: 48%; top: 34%; width: 70%; height: 60%; }
}
@keyframes fx-drift-a {
  from { transform: translate3d(-5%, -4%, 0); }
  to { transform: translate3d(6%, 5%, 0); }
}
@keyframes fx-drift-b {
  from { transform: translate3d(4%, 3%, 0); }
  to { transform: translate3d(-7%, -5%, 0); }
}
/* the drift holds while the page scrolls and goes on from where it was */
.fx-room.is-scrolling .fx-room__light { animation-play-state: paused; }

/* --- 2. Words wake. Waiting words are a little dimmer (and sit
   --fx-rise low, set to 0: words never move while they are read); when
   the light reaches them they brighten. Waiting, they stay easy to read:
   the opacity is set per kind of text, well above a contrast of 4.5 to 1
   on the lightest ground they stand on. --- */
.fx-t { display: inline-block; }
.fx-live .fx-b {
  --fx-wait: 0.76;
  opacity: var(--fx-wait);
  transform: translateY(var(--fx-rise));
  transition: opacity 0.75s var(--ease), transform 0.85s var(--ease), color 0.2s ease;
}
.fx-live .fx-t.fx-b,
.fx-live .facts dd.fx-b,
.fx-live .links li.fx-b,
.fx-live .reach__mail.fx-b,
.fx-live .entry__terms.fx-b { --fx-wait: 0.72; }
.fx-live .card__title .fx-b,
.fx-live .card__title .fx-t.fx-b { --fx-wait: 0.78; }
.fx-live .facts dt.fx-b,
.fx-live .entry__meta.fx-b,
.fx-live .path__label.fx-b { --fx-wait: 0.88; }
.fx-live .fx-b.fx-on { opacity: 1; transform: none; }
/* the first frame: things take their waiting look without fading to it */
.fx-boot .stem *,
.fx-boot .stem *::before,
.fx-boot .stem *::after,
.fx-live .fx-now,
.fx-live .fx-now::before,
.fx-live .fx-now::after,
.fx-live .fx-now *,
.fx-live .fx-now *::before,
.fx-live .fx-now *::after { transition: none !important; }

/* --- 3. Surfaces. With motion, the still frame of A steps aside and the
   overlay the script lays over each surface takes its place: the same
   frame, ticks and inner light, but drawn in when the light arrives. --- */
.fx-live .entry.fx-framed,
.fx-live .card.fx-framed { background: none; }

.fx-layer {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.fx-s {
  position: absolute;
  pointer-events: none;
  --fx-o: 0ms;      /* stagger before it starts */
  --fx-tw: 400ms;   /* time the light takes along the top */
  --fx-lh: 500ms;   /* time it takes down the left side */
}

/* the inner light and the light that follows the pointer (behind words) */
.fx-s__fill {
  position: absolute;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity 1.4s ease var(--fx-o, 0ms);
}
.fx-s__fill::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--fx-inner);
}
.fx-s__glow {
  position: absolute;
  left: 0;
  top: 0;
  width: 560px;
  height: 560px;
  margin: -280px 0 0 -280px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(84, 160, 255, 0.15), rgba(84, 160, 255, 0.128) 20%, rgba(84, 160, 255, 0.087) 40%, rgba(84, 160, 255, 0.045) 60%, rgba(84, 160, 255, 0.015) 80%, rgba(84, 160, 255, 0));
  opacity: 0;
  transition: opacity 0.6s ease;
}
.fx-s.is-on .fx-s__fill { opacity: 1; }
.fx-s.is-near .fx-s__glow { opacity: 1; }

/* the four sides: ::before is the resting line, ::after the light that
   draws it. The light enters at the top left corner, where the stem is,
   and runs both ways round, meeting itself at the bottom right. */
.fx-s__side { position: absolute; }
.fx-s__side--t { left: 0; top: 0; width: 100%; height: 1px; }
.fx-s__side--b { left: 0; bottom: 0; width: 100%; height: 1px; }
.fx-s__side--l { left: 0; top: 0; width: 1px; height: 100%; }
.fx-s__side--r { right: 0; top: 0; width: 1px; height: 100%; }
.fx-s__side::before,
.fx-s__side::after {
  content: "";
  position: absolute;
  inset: 0;
}
.fx-s__side--t::before,
.fx-s__side--b::before,
.fx-s__side--t::after,
.fx-s__side--b::after { transform: scaleX(0); transform-origin: 0 50%; }
.fx-s__side--l::before,
.fx-s__side--r::before,
.fx-s__side--l::after,
.fx-s__side--r::after { transform: scaleY(0); transform-origin: 50% 0; }
.fx-s__side::before { background: var(--frame); }
.fx-s__side--t::before,
.fx-s__side--b::before { background: linear-gradient(to right, var(--frame) 0, var(--frame) 50%, var(--frame-0) 100%); }
.fx-s__side--t::after,
.fx-s__side--b::after { background: linear-gradient(to right, var(--fx-flash-0), rgba(170, 220, 255, 0.4) 55%, var(--fx-flash)); }
.fx-s__side--l::after,
.fx-s__side--r::after { background: linear-gradient(to bottom, var(--fx-flash-0), rgba(170, 220, 255, 0.4) 55%, var(--fx-flash)); }
.fx-s__side--r { display: none; }

/* when each side draws: --fx-o the stagger, --fx-tw the time along the
   top (and the bottom), --fx-lh the time down the left (and the right) */
.fx-s__side--t::before,
.fx-s__side--t::after { transition: transform var(--fx-tw) linear var(--fx-o), opacity 0.9s ease calc(var(--fx-o) + var(--fx-tw)); }
.fx-s__side--l::before,
.fx-s__side--l::after { transition: transform var(--fx-lh) linear var(--fx-o), opacity 0.9s ease calc(var(--fx-o) + var(--fx-lh)); }
.fx-s__side--r::before,
.fx-s__side--r::after { transition: transform var(--fx-lh) linear calc(var(--fx-o) + var(--fx-tw)), opacity 0.9s ease calc(var(--fx-o) + var(--fx-tw) + var(--fx-lh)); }
.fx-s__side--b::before,
.fx-s__side--b::after { transition: transform var(--fx-tw) linear calc(var(--fx-o) + var(--fx-lh)), opacity 0.9s ease calc(var(--fx-o) + var(--fx-tw) + var(--fx-lh)); }
.fx-s.is-on .fx-s__side::before,
.fx-s.is-on .fx-s__side::after { transform: none; }
.fx-s.is-on .fx-s__side::after { opacity: 0; }

/* corner ticks: there while waiting, faint; they light as the light
   passes their corner */
.fx-s__tick {
  position: absolute;
  width: var(--tick-len);
  height: var(--tick-len);
  opacity: 0.32;
}
.fx-s__tick::before,
.fx-s__tick::after {
  content: "";
  position: absolute;
  background: var(--tick);
}
.fx-s__tick::before { left: 0; width: 100%; height: 1px; }
.fx-s__tick::after { top: 0; width: 1px; height: 100%; }
.fx-s__tick--tl { left: 0; top: 0; }
.fx-s__tick--tr { right: 0; top: 0; }
.fx-s__tick--bl { left: 0; bottom: 0; }
.fx-s__tick--br { right: 0; bottom: 0; }
.fx-s__tick--tl::before, .fx-s__tick--tr::before { top: 0; }
.fx-s__tick--bl::before, .fx-s__tick--br::before { bottom: 0; }
.fx-s__tick--tl::after, .fx-s__tick--bl::after { left: 0; }
.fx-s__tick--tr::after, .fx-s__tick--br::after { right: 0; }
.fx-s__tick--tr,
.fx-s__tick--br { display: none; }
.fx-s__tick--tl { transition: opacity 0.5s ease var(--fx-o); }
.fx-s__tick--tr { transition: opacity 0.5s ease calc(var(--fx-o) + var(--fx-tw)); }
.fx-s__tick--bl { transition: opacity 0.5s ease calc(var(--fx-o) + var(--fx-lh)); }
.fx-s__tick--br { transition: opacity 0.5s ease calc(var(--fx-o) + var(--fx-lh) + var(--fx-tw)); }
.fx-s.is-on .fx-s__tick { opacity: 1; }

/* the frame brightens near the pointer: a light that follows the pointer,
   seen only through the frame's own lines */
.fx-s__rim {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.6s ease;
  -webkit-mask:
    linear-gradient(#000, #000) 0 0 / 100% 1px no-repeat,
    linear-gradient(#000, #000) 0 100% / 100% 1px no-repeat,
    linear-gradient(#000, #000) 0 0 / 1px 100% no-repeat;
  mask:
    linear-gradient(#000, #000) 0 0 / 100% 1px no-repeat,
    linear-gradient(#000, #000) 0 100% / 100% 1px no-repeat,
    linear-gradient(#000, #000) 0 0 / 1px 100% no-repeat;
}
.fx-s__rim-light {
  position: absolute;
  left: 0;
  top: 0;
  width: 420px;
  height: 420px;
  margin: -210px 0 0 -210px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(214, 240, 255, 0.85), rgba(150, 208, 255, 0.32) 42%, rgba(150, 208, 255, 0));
}
.fx-s.is-near.is-on .fx-s__rim { opacity: 1; }

@media (min-width: 40em) {
  .fx-s__side--r { display: block; }
  .fx-s__tick--tr,
  .fx-s__tick--br { display: block; }
  .fx-s__side--t::before,
  .fx-s__side--b::before { background: var(--frame); }
  .fx-s__rim {
    -webkit-mask:
      linear-gradient(#000, #000) 0 0 / 100% 1px no-repeat,
      linear-gradient(#000, #000) 0 100% / 100% 1px no-repeat,
      linear-gradient(#000, #000) 0 0 / 1px 100% no-repeat,
      linear-gradient(#000, #000) 100% 0 / 1px 100% no-repeat;
    mask:
      linear-gradient(#000, #000) 0 0 / 100% 1px no-repeat,
      linear-gradient(#000, #000) 0 100% / 100% 1px no-repeat,
      linear-gradient(#000, #000) 0 0 / 1px 100% no-repeat,
      linear-gradient(#000, #000) 100% 0 / 1px 100% no-repeat;
  }
}

/* On a phone an entry or a card is taller than the screen and runs off its
   right edge, so no light runs round it (it would be a second line beside
   the stem): the still frame, its ticks and the inner light simply come up
   with the words, by opacity only. */
@media (max-width: 39.99em) {
  .fx-s__side::after { display: none; }
  .fx-s__side--t::before,
  .fx-s__side--b::before,
  .fx-s__side--l::before {
    transform: none;
    opacity: 0;
    transition: opacity 0.75s var(--ease) calc(var(--fx-o) + 160ms);
  }
  .fx-s.is-on .fx-s__side::before { opacity: 1; }
  .fx-s__tick--tl,
  .fx-s__tick--bl,
  .fx-s__fill { transition: opacity 0.75s var(--ease) calc(var(--fx-o) + 160ms); }
}

/* --- 4. The fact strip: the hairlines draw, one after another, then the
   labels and values wake in order. --- */
.fx-live .facts__item { border-top-color: transparent; }
.fx-live .facts__item::before,
.fx-live .facts__item::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 1px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.8s var(--ease) var(--fx-d, 0ms), opacity 0.8s ease calc(var(--fx-d, 0ms) + 0.55s);
}
.fx-live .facts__item::before { background: var(--hair); }
.fx-live .facts__item::after { background: linear-gradient(to right, var(--fx-flash-0), rgba(170, 220, 255, 0.45) 60%, var(--fx-flash)); }
.fx-live .facts__item:nth-child(2) { --fx-d: 70ms; }
.fx-live .facts__item:nth-child(3) { --fx-d: 140ms; }
.fx-live .facts__item:nth-child(4) { --fx-d: 210ms; }
.fx-live .facts.fx-on .facts__item::before,
.fx-live .facts.fx-on .facts__item::after { transform: none; }
.fx-live .facts.fx-on .facts__item::after { opacity: 0; }

/* --- 6. The contact wakes last: the address brightens, its underline
   draws from the stem's side, and its soft glow comes up to rest. --- */
.fx-live .reach__mail::after {
  transform: scaleX(0);
  transition: transform 1s var(--ease) calc(var(--fx-o, 0ms) + 0.25s);
}
.fx-live .reach__mail.fx-on::after { transform: none; }
.fx-live .reach__mail::before {
  opacity: 0;
  transition: opacity 1.6s ease calc(var(--fx-o, 0ms) + 0.7s);
}
.fx-live .reach__mail.fx-on::before { opacity: 0.5; }
.fx-live .reach__mail.fx-on:hover::before,
.fx-live .reach__mail.fx-on:focus-visible::before { opacity: 1; transition-duration: 0.4s; transition-delay: 0s; }

/* High contrast: every word at full strength and no light effects,
   also when the script has run. */
@media (forced-colors: active) {
  .fx-live .fx-b { opacity: 1 !important; transform: none !important; }
  .fx-room, .fx-layer { display: none !important; }
  .fx-live .facts__item { border-top-color: CanvasText; }
  .fx-live .facts__item::before,
  .fx-live .facts__item::after { display: none; }
}

/* ===============================================================
   BLOOM: the end of the line (fx-bloom.js)
   At "How to reach me" the stem swings out of its place, turns upward
   and ends in a small lily that opens: the same flower as the opener,
   drawn small by fx-bloom.js on its own canvas.

   Every rule here waits for a class that fx-bloom.js sets:
     fx-bloom-room   on <html>: the room under the address grows to hold the flower
     fx-bloom-drawn  on #how-to-reach-me: the flower really draws, the line
                     shows, the bud goes
   Without them (no JavaScript, no WebGL, any failure) nothing here applies
   and the page keeps its bud exactly as it is.
   =============================================================== */

/* Room for the flower, through the token for the room under the contact
   (--end), so the spine's end (--tail) moves with the contact row. These
   follow the values of --end above, each with a floor: the flower stands
   under the address at every size. */
:root.fx-bloom-room { --end: max(26vh, 312px); }
@supports (height: 1svh) {
  :root.fx-bloom-room { --end: max(26svh, 312px); }
}
@media (min-width: 40em) {
  :root.fx-bloom-room { --end: max(26vh, 338px); }
  @supports (height: 1svh) {
    :root.fx-bloom-room { --end: max(26svh, 338px); }
  }
}
@media (min-width: 60em) {
  :root.fx-bloom-room { --end: max(30vh, 362px); }
}

.bloom {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* the line of light: the spine's own end runs on into it */
.bloom__line {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;              /* one user unit is one css pixel, from the block's top left */
  overflow: visible;
  opacity: 0;
}
#how-to-reach-me.fx-bloom-drawn .bloom__line { opacity: 1; }
.bloom__line path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* at rest: the colour and glow of the spine at rest (--line, its 5 px box-shadow).
   1.1 px, not 1: Chrome draws a 1 px curve dotted at 1x. */
.bloom__rest { stroke: var(--line); stroke-width: 1.1px; }
.bloom__rest-glow { stroke: rgba(90, 160, 255, 0.28); stroke-width: 1px; }
/* lit: the colour and glow of the lit stem (--lit-line, its 6 px box-shadow) */
.bloom__lit { stroke: var(--lit-line); stroke-width: 1.1px; }
.bloom__lit-glow { stroke: rgba(96, 176, 255, 0.5); stroke-width: 1px; }
/* the core of light inside the flower's own stem, fading into the head */
.bloom__core-rest { stroke: url(#fx-bloom-fade-rest); stroke-width: 1.1px; }
.bloom__core-lit { stroke: url(#fx-bloom-fade-lit); stroke-width: 1.1px; }
.bloom__stop-rest { stop-color: rgb(122, 176, 250); }
.bloom__stop-lit { stop-color: rgb(176, 224, 255); }

/* the small flower: premultiplied light, so it lies on the page like a
   screen of the flower (fx-bloom.js draws it so) */
.bloom__gl {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  opacity: 0;
}

/* the drop of light that runs the curve: the head of the stem's own light */
.bloom__head {
  position: absolute;
  left: 0;
  top: 0;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  background: radial-gradient(circle,
    #f7fcff 0,
    #eef9ff 1.3px,
    rgba(176, 224, 255, 0.78) 2.6px,
    rgba(110, 186, 255, 0.3) 6.5px,
    rgba(80, 160, 255, 0.09) 13px,
    rgba(80, 160, 255, 0) 22px);
  opacity: 0;
}

#how-to-reach-me.fx-bloom-drawn .bud { opacity: 0; }

@media (prefers-reduced-motion: no-preference) {
  .bloom__line { transition: opacity 0.7s ease; }
  .bloom__gl { transition: opacity 0.9s var(--ease); }
}

/* ===============================================================
   PRINT: a page saved or printed is black on white, every section
   awake and still. The name and the line under it head the first
   page; no flower, no stem, no light, no canvas. Each link out is
   followed by its address.
   =============================================================== */
@media print {
  @page { margin: 16mm 17mm 18mm; }
  html, body { background: #fff !important; }
  body { color: #1a1a1a; font-size: 10.5pt; line-height: 1.5; }
  *, *::before, *::after { text-shadow: none !important; box-shadow: none !important; transition: none !important; animation: none !important; }

  /* the opener becomes the head of the first page */
  .skip,
  .opener__canvas,
  .opener noscript,
  .opener__still,
  .opener__reach,
  .opener__cue { display: none !important; }
  .opener {
    height: auto !important;
    min-height: 0 !important;
    container-type: normal !important;
    overflow: visible !important;
    background: none !important;
    color: #000 !important;
    padding: 0 0 7mm;
    margin-bottom: 8mm;
    border-bottom: 0.75pt solid #000;
  }
  .opener__words { position: static !important; padding: 0 !important; text-align: left !important; }
  .opener__name { font-size: 24pt !important; font-weight: 300 !important; color: #000 !important; letter-spacing: 0.16em !important; text-indent: 0 !important; }
  .opener__line { margin-top: 2mm !important; font-size: 9.5pt !important; color: #333 !important; letter-spacing: 0.22em !important; text-indent: 0 !important; }

  /* the page: one column, no stem and no light */
  .stem { padding-top: 0; background: none !important; isolation: auto; }
  .spine,
  .fx-room,
  .fx-layer,
  .bloom,
  .bud,
  .fxp-canvas,
  .fxp-defs,
  .cue-fx { display: none !important; }
  .about::before, .about::after,
  .part__title::before, .part__title::after,
  .entry__name::before, .card__title::before,
  .path__step::before,
  .photo picture::before, .photo picture::after,
  .facts__item::before, .facts__item::after,
  .links li::before, .links a::before,
  .reach__mail::before, .reach__mail::after { display: none !important; }
  .about,
  .part { display: block !important; padding: 0 0 8mm !important; }
  .part__body,
  .about .lead,
  .about .facts { max-width: none !important; padding: 0 !important; margin-left: 0 !important; }
  .part__title {
    font-size: 17pt; color: #000; text-align: left !important; padding: 0 !important;
    margin: 0 0 4mm !important;
    break-after: avoid;
  }
  .lead { font-size: 13pt; color: #000; }
  .lead, .part__body p, .prose > p { orphans: 3; widows: 3; }

  /* everything awake, whatever the light had reached */
  .fx-b, .fx-t,
  .photo figcaption,
  .stem-live .bud { opacity: 1 !important; transform: none !important; }

  /* the four facts */
  .facts { margin-top: 5mm; break-inside: avoid; }
  .facts__item { border-top: 0.5pt solid #999 !important; padding: 2mm 0 3mm; }
  .facts dt, .entry__role, .path__label::before { color: #444 !important; }
  .facts dd, .entry__name, .card__title, .path__label { color: #000 !important; }

  /* photographs: natural, a little smaller, never split */
  .photo,
  .about .photo--portrait {
    width: 62mm !important; max-width: 62mm !important;
    margin: 5mm 0 0 !important;
    break-inside: avoid;
  }
  .photo picture { background: none !important; }
  .photo img { filter: none !important; }
  .photo figcaption { margin-top: 2mm; font-size: 8.5pt; color: #444; text-align: left !important; }

  /* entries, cards and steps */
  .entry,
  .card {
    background: none !important;
    border: 0 !important;
    border-top: 0.5pt solid #999 !important;
    margin: 0 0 5mm !important;
    padding: 3mm 0 0 !important;
  }
  .entry + .entry { margin-top: 0 !important; }
  .built { gap: 0; }
  .entry__head { margin-bottom: 2mm; }
  .entry__meta { flex-direction: row; flex-wrap: wrap; gap: 0 4mm; align-items: baseline; margin-top: 0; }
  .entry__link, .card__title a { display: inline !important; min-height: 0 !important; margin: 0 !important; }
  .part__body .entry__terms { border-top-color: #bbb; color: #000; font-size: 11.5pt; margin-top: 3mm; padding-top: 3mm; }
  .path__step { break-inside: avoid; }
  .path__step + .path__step { margin-top: 3mm; }
  .card p + p { margin-top: 0.6em; }

  /* links: readable, and followed by where they go */
  a { color: #000 !important; text-decoration-color: #777 !important; }
  .part__body a[href^="http"]:not(.entry__meta a):not(.card__foot a)::after,
  .card__title a::after {
    content: " (" attr(href) ")";
    font-size: 8.5pt;
    font-weight: 400;
    color: #555;
    text-decoration: none;
    word-break: break-all;
  }
  .links { columns: 1 !important; border-bottom: 0.5pt solid #bbb; }
  .links li { border-top: 0.5pt solid #bbb !important; border-bottom: 0 !important; break-inside: avoid; }
  .links a { display: block; min-height: 0; padding: 1.6mm 0; color: #000 !important; }
  .links a::after {
    content: " " attr(href) !important;
    display: inline !important;
    width: auto !important;
    height: auto !important;
    background: none !important;
    opacity: 1 !important;
    transform: none !important;
    margin-left: 3mm;
  }

  /* the contact */
  .part--reach { padding-bottom: 0 !important; break-inside: avoid; }
  .part--reach .part__title { margin-bottom: 2mm !important; }
  .reach { height: auto; }
  .reach__mail { height: auto; font-size: 15pt; color: #000 !important; text-decoration: underline !important; text-decoration-color: #777 !important; }
}

