/* ============================================
   Taylor Prince — the grid

   One grid for the whole page. Twelve columns on a wide screen, six on a
   small one, two on a phone, with one gutter and one margin. The hero's words
   and the footer sit in its thirds. The work sits in modules of 16:9: each
   project is one module of words and five of pictures, six in all, so a row
   of six, three, two or one always closes even. A thumbnail size is only a
   number of modules a row; every module still starts and ends on a column.

   Motion follows site.css: one curve, three lengths, and anything leaving
   takes 0.7 of its way in. A hover quiets everything else.
   ============================================ */

.ix {
  /* The margin. With viewport-fit=cover a landscape phone draws under its
     notch and corners, so the margin is never less than they take. */
  --m: max(clamp(16px, 3.4vw, 56px), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  --sb: env(safe-area-inset-bottom, 0px);   /* the home bar's strip */
  --g: clamp(12px, 1.3vw, 20px);        /* the gutter, across and down */
  --cols: 12;
  --third: 4;                           /* columns in a third */
  --per-s: 6;                           /* modules a row, at each size */
  --per-m: 3;
  --per-l: 2;
  --per: var(--per-s);
  --pg: clamp(44px, 5.2vw, 84px);       /* between one block and the next */
  --two: 8;                             /* columns in two thirds */
  --r: 0px;                             /* hard edges: the grid's own */
  overflow-x: clip;
  /* A tap shows no grey flash: what it does shows instead. */
  -webkit-tap-highlight-color: transparent;
}

/* A quick second tap on a control is a second tap, not a zoom. */
.ix :is(a, button) {
  touch-action: manipulation;
}

/* A long press on a work picture doesn't bring up the picture's own menu. */
.ix-pic img {
  -webkit-touch-callout: none;
}

[data-size='m'] .ix { --per: var(--per-m); }
[data-size='l'] .ix { --per: var(--per-l); }

/* Small on a wide screen keeps the page's thirds, as medium does: a project's
   words take the first third, and the small pictures fill the other two, two
   to a third, so every edge falls where the hero's columns do. A row holds
   four, so the fifth picture (and the last photograph) wait for the larger
   sizes, and the rows still close even. */
@media (min-width: 1200px) {
  /* A small picture tall, so the words hold their row even before the
     photographs have arrived (or if they never do). */
  [data-size='s'] .ix-label {
    grid-column: span 2;
    aspect-ratio: auto;
    min-height: calc((100cqi - 5 * var(--g)) / 6 * 9 / 16);
  }

  /* grid.js marks what doesn't fit: each project's fifth picture, and the
     photographs past the last full row. */
  [data-size='s'] .ix-spare {
    display: none;
  }

  /* The words are a third wide but a small picture tall: the sentence has
     the room for two lines, at a third's measure, so it stays. */
  @container (max-height: 132px) and (min-width: 340px) {
    [data-size='s'] .ix-out {
      display: -webkit-box;
      -webkit-line-clamp: 2;
    }
  }
}

@media (max-width: 1199px) {
  .ix {
    --cols: 6;
    --third: 2;
    --two: 4;
    --per-s: 3;
    --per-m: 2;
    --per-l: 1;
  }
}

@media (max-width: 639px) {
  .ix {
    --cols: 2;
    --third: 2;
    --two: 2;
    --per-s: 2;
    --per-m: 2;
    --per-l: 1;
  }
}

html:has(.ix) {
  scroll-behavior: smooth;
  scroll-padding-top: var(--top-h);
  scrollbar-gutter: stable;
}

html.is-locked {
  overflow: hidden;
}

/* Hard edges, focus rings included. */
.ix :where(a, button, [tabindex], summary):focus-visible {
  border-radius: 0;
}

@media (prefers-reduced-motion: reduce) {
  html:has(.ix) { scroll-behavior: auto; }
}

.ix-cols {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  column-gap: var(--g);
  padding-inline: var(--m);
}

/* The thirds. On a phone each takes the width. */
.ix-third {
  grid-column: span var(--third);
  min-width: 0;
  margin: 0;
  max-width: 34em;
  font-size: 0.9375rem;
  line-height: 1.5;
  letter-spacing: 0;
  color: var(--text-secondary);
  text-wrap: pretty;
}

/* One look for every link in the words, the hero's and a project's alike:
   ink, a faint underline, and on hover the underline takes the colour the
   headline's full stop is resting on (--dot), which a project's own colour
   never overrides. The footer's and a project's foot follow it too, and so
   does Contact in the bar, with the ways to write behind it. */
.ix-third a,
.ix-ext,
.ix .sheet-link,
.ix .sheet-meta a,
.ix-contact-label,
.ix-contact-links a,
.ix-cp-item {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--text-faint);
  text-decoration-style: solid;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color var(--t-quick) var(--ease);
}

@media (hover: hover) and (pointer: fine) {
  :is(.ix-third a, .ix-ext, .ix .sheet-link, .ix .sheet-meta a, .ix-contact-label, .ix-contact-links a, .ix-cp-item):hover {
    color: var(--text);
    text-decoration-color: var(--dot);
  }
}

.ix-display {
  grid-column: 1 / -1;
  margin: 0;
  max-width: none;
  font-size: clamp(2.375rem, 0.9rem + 5.4vw, 6.75rem);
  font-weight: 500;
  line-height: 0.96;
  letter-spacing: -0.045em;
  color: var(--text);
  text-wrap: balance;
  /* The first letter's side bearing, taken back so the stem sits on the column. */
  margin-inline-start: -0.05em;
}

/* ---- The bar ---- */

.ix-bar {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--top-h);
  background: var(--bg);
}

.ix-bar::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: var(--border);
  opacity: 0;
  transition: opacity var(--t-base) var(--ease);
}

.is-scrolled .ix-bar::after {
  opacity: 1;
}

.ix-bar .ix-cols {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ix-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.ix-brand svg {
  width: 22px;
  height: 17px;
  fill: currentColor;
}

/* Back, while a project is open: in the bar, so it is always to hand and
   never over the project or Contact, set on the line where the page's second
   third starts, as the project's head is below it. It comes and goes with
   the project. A phone has its own Back, and no room for this one. */
.ix-back {
  position: absolute;
  top: 0;
  left: calc(var(--m) + (100% - 2 * var(--m) + var(--g)) / 3);
  height: var(--top-h);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-quick) var(--ease), visibility 0s var(--t-quick);
}

.in-project .ix-back {
  opacity: 1;
  visibility: visible;
  transition: opacity var(--t-base) var(--ease), visibility 0s;
}

.ix-back svg {
  width: 14px;
  height: 14px;
  margin-inline-start: -2px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: square;
  transition: translate var(--t-quick) var(--ease);
}

@media (hover: hover) and (pointer: fine) {
  .ix-back:hover svg {
    translate: -3px 0;
  }
}

@media (max-width: 639px) {
  .ix-back {
    display: none;
  }
}

/* The mark is a solid thing with two sides: ink on the front, the headline
   dot's colour on the back. When the pointer (or focus) arrives it turns half
   way round about its upright, with real perspective, and holds the colour;
   when it leaves the mark carries on round the same way to the ink, so a
   visit is one whole turn. Each face hides its back, so the colour shows
   only once the mark is past edge-on. grid.js adds half a turn to --turn at
   every change of mind and the transition picks up from wherever the mark
   is, so nothing jerks back. Fast out of the gate, a long settle. */
.ix-mark {
  display: grid;
  perspective: 160px;
}

.ix-mark svg {
  grid-area: 1 / 1;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: rotateY(var(--turn, 0deg));
  transition:
    transform 455ms cubic-bezier(0.25, 0.8, 0.25, 1),
    fill var(--t-quick) var(--ease);
}

/* The back, first, so a browser that can't hide a face shows the ink. */
.ix-mark svg:first-child {
  fill: var(--dot);
  transform: rotateY(calc(var(--turn, 0deg) + 180deg));
}

.ix-brand.is-over .ix-mark svg {
  transition-duration: 650ms, var(--t-quick);
}

/* Without the turn, the ink simply takes the colour. Only the fill
   transitions, so the turns already counted never play out at once. */
@media (prefers-reduced-motion: reduce) {
  .ix-mark svg:first-child { display: none; }
  .ix-brand .ix-mark svg {
    transform: none;
    transition: fill var(--t-quick) var(--ease);
  }
  .ix-brand.is-over .ix-mark svg {
    fill: var(--dot);
    transition-duration: var(--t-quick);
  }
}

/* ---- Contact ----
   Contact is a link like the rest. A click brings out the ways to write: on
   a wide screen they slide out to its left, the way they always used to, and
   slide back in a moment after you leave them be; on a narrow one the bar
   extends into a panel set on the grid. While they are out, Contact's
   underline holds the headline dot's colour. */

.ix-end {
  display: flex;
  align-items: center;
}

.ix-contact {
  display: flex;
  align-items: center;
}

.ix-contact-label {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
}

.ix-contact.open .ix-contact-label,
.ix-bar.is-contact .ix-contact-label {
  text-decoration-color: var(--dot);
}

/* ---- Wide: the links slide out to the left ----
   The drawer is pinned to Contact's left edge and opens from zero to just
   the width of what it holds (grid.js measures it), so the links ride out
   on its moving edge and the motion ends exactly when the drawer does. The
   timing is the old site's. */

@media (min-width: 900px) {
  .ix-contact {
    position: relative;
  }

  .ix-contact-drawer {
    position: absolute;
    inset-block: 0;
    inset-inline-end: 100%;
    display: flex;
    align-items: center;
    /* The space before Contact sits outside the moving edge, so the links
       ride in it and never pass over the label. */
    padding-inline-end: 1.5rem;
    pointer-events: none;
  }

  .ix-contact.open .ix-contact-drawer {
    pointer-events: auto;
  }

  .ix-contact-clip {
    overflow: hidden;
    max-width: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(1rem);
    transition: max-width 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s 0.4s;
  }

  .ix-contact.open .ix-contact-clip {
    max-width: var(--w, 40rem);
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: max-width 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s;
  }

  .ix-contact-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    width: max-content;
  }

  .ix-contact-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
  }

  .ix-contact-panel {
    display: none;
  }
}

/* ---- Narrow: the ways to write stand under Contact ----
   The bar extends down and the three stand on the margin under Contact, in
   its size, on its 44px rows. The motion is the page's own: the bar opens
   on the headline's curve over the long length, and each line settles in a
   beat after the edge has passed it, so no line is ever cut mid-reveal. To
   close, the lines fade where they are and the bar folds up behind them, in
   0.7 of the time. (A phone's margin is too narrow for the wide drawer's
   sideways travel, which would read as coming in from off screen.) */

@media (max-width: 899px) {
  .ix-contact-drawer {
    display: none;
  }

  .ix-contact-panel {
    --c-ease: cubic-bezier(0.32, 0.72, 0, 1);   /* the headline's curve */
    --c-in: var(--t-move);
    --c-out: 315ms;                             /* 0.7 of the way in */
    position: absolute;
    inset: 100% 0 auto;
    z-index: 1;   /* over the bar's hairline, which shows again as the edge passes it */
    display: grid;
    justify-items: end;
    padding: 0 var(--m) calc((var(--top-h) - 44px) / 2);
    background: var(--bg);
    clip-path: inset(0 0 100% 0);
    visibility: hidden;
    transition: clip-path var(--c-out) var(--ease) 60ms, visibility 0s calc(var(--c-out) + 60ms);
  }

  /* The panel's edge over the page. */
  .ix-contact-panel::after {
    content: '';
    position: absolute;
    inset: auto 0 0;
    height: 1px;
    background: var(--border);
  }

  .ix-bar.is-contact .ix-contact-panel {
    clip-path: inset(0 0 -1px 0);
    visibility: visible;
    transition: clip-path var(--c-in) var(--c-ease), visibility 0s;
  }

  /* While it is open the bar and panel are one surface: no seam. */
  .ix-bar.is-contact::after {
    opacity: 0;
  }

  .ix-cp-item {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
  }

  /* The first row starts where Contact's ends, so all four share one rhythm. */
  .ix-cp-item:first-child {
    margin-block-start: calc((44px - var(--top-h)) / 2);
  }

  /* Each line comes down the last few pixels with the bar and settles. */
  .ix-cp-line {
    display: block;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity var(--t-quick) var(--ease), transform 0s var(--t-quick);
  }

  .ix-bar.is-contact .ix-cp-line {
    opacity: 1;
    transform: none;
    transition: opacity var(--t-base) var(--ease) var(--d), transform var(--c-in) var(--c-ease) var(--d);
  }

  .ix-cp-item:nth-child(1) { --d: 60ms; }
  .ix-cp-item:nth-child(2) { --d: 100ms; }
  .ix-cp-item:nth-child(3) { --d: 140ms; }

  .ix-cp-copy-text {
    transition: opacity var(--t-quick) var(--ease);
  }

  .ix-cp-copy.is-swapping .ix-cp-copy-text {
    opacity: 0;
  }

  .ix-contact-veil {
    position: fixed;
    inset: 0;
    z-index: 55;
    background: var(--bg);
    opacity: 0;
    transition: opacity var(--t-base) var(--ease);
  }

  .ix-contact-veil.is-on {
    opacity: 0.78;
    transition: opacity var(--t-move) var(--ease);   /* in with the bar, out quicker */
  }
}

/* Asking for less motion, Contact still fades in and out; nothing slides,
   wipes or rises. On a wide screen the drawer simply has its width while its
   links fade, and gives it back once they have gone. */
@media (prefers-reduced-motion: reduce) {
  .ix-contact-clip,
  .ix-cp-line,
  .ix-cp-line > span {
    transform: none !important;
  }

  .ix-contact-clip {
    transition: opacity 0.3s, max-width 0s 0.3s, visibility 0s 0.3s !important;
  }

  .ix-contact.open .ix-contact-clip {
    transition: opacity 0.3s, max-width 0s, visibility 0s !important;
  }

  .ix-cp-line,
  .ix-cp-line > span {
    transition-delay: 0s !important;
  }

  .ix-contact-panel {
    clip-path: none !important;
    opacity: 0;
    transition: opacity var(--t-quick) var(--ease), visibility 0s var(--t-quick) !important;
  }

  .ix-bar.is-contact .ix-contact-panel {
    opacity: 1;
    transition: opacity var(--t-base) var(--ease), visibility 0s !important;
  }
}

/* ---- The hero ---- */

/* What I make, a colour each: the only colours on the page. The headline's
   full stop rests in one of them, and that one is the page's accent for the
   visit (grid.js sets --accent): the selection and the links' underline
   carry it. */
:root {
  --mk-1: #ff5b36;   /* brands */
  --mk-2: #2f5bff;   /* websites */
  --mk-3: #12a87a;   /* product UX */
  --mk-4: #e8a400;   /* the details */
  --mk-5: #b44bf0;   /* systems */
  --accent: var(--mk-2);
  /* The full stop's colour as the page holds it. Resolved here, so a
     project that sets its own --accent still passes this one down. */
  --dot: var(--accent);
  /* The ink that reads on it, for a selection (grid.js marks which colour it is). */
  --dot-ink: #0a0a0a;
}

:root:not([data-accent]),
:root[data-accent='2'] {
  --dot-ink: #fff;
}

/* Dark follows the system unless the footer's switch says otherwise, as in
   site.css. These come after the accent rule above and match its weight, so
   --dot-ink wins it in the dark. The two lists are the same. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --mk-1: #ff7a5a;
    --mk-2: #6f8cff;
    --mk-3: #34c796;
    --mk-4: #f5bd2c;
    --mk-5: #c97df7;
    --dot-ink: #0a0a0a;
  }
}

:root[data-theme='dark'] {
  --mk-1: #ff7a5a;
  --mk-2: #6f8cff;
  --mk-3: #34c796;
  --mk-4: #f5bd2c;
  --mk-5: #c97df7;
  --dot-ink: #0a0a0a;
}

.ix-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* The second line: the word that rolls, and the full stop after it.

   Without a script the line is plain text and the stop an inline mark on its
   baseline. Once the headline plays (.is-live), nothing on it changes layout
   again: the window is as wide as the widest word, every word lies in its
   corner and moves only by transform and opacity, and the stop, set once on
   the baseline where the browser first put it, only slides sideways. So the
   line never reflows, mid-roll or at rest. */
.ix-roll-line {
  position: relative;
  display: block;
  /* A hair more room under the first line than its leading gives: set solid,
     the g of "design" all but touches the tall letters below it (the h of
     "whole", the f of "interfaces"). */
  margin-block-start: 0.05em;
  white-space: nowrap;
  --ix-ease: cubic-bezier(0.32, 0.72, 0, 1);
}

.ix-roll {
  position: relative;
  display: inline-block;
  vertical-align: baseline;
}

/* Holds the window's baseline once its words are out of the flow. */
.ix-roll::before {
  content: '\200b';
}

.ix-roll.is-live {
  width: var(--w);
  height: 1em;
}

/* While words move, the window is the line's own slot. Its top is just over
   this line's tallest letters, in the gap under the g of "design", so a word
   that leaves slips out of sight there and never comes nearer the line above
   than it sat. Its floor is just under this line's descenders, so a word
   comes up out of the line. Neither edge touches a word at rest, not even
   the faint pixel row over its ascenders on a 1x screen (hence the 1px),
   and to the sides it reaches well past the line. (A clip-path, which Safari
   keeps to as drawn; at rest there is none.) */
.ix-roll.is-live.is-rolling {
  clip-path: inset(calc(0.089em - 1px) -100vw -0.06em -100vw);
}

.ix-roll-w {
  display: inline-block;
  white-space: nowrap;
}

/* Until the headline plays the first time, the line stands open, "I design
   and build" alone, and the words and the stop wait unseen (index.html marks
   the page, unless less motion is asked for). If the script is slow or never
   comes, they show after a moment as plain text. */
.ix-wait .ix-roll:not(.is-live) .ix-roll-w,
.ix-wait .ix-stop:not(.is-live) {
  visibility: hidden;
  animation: ix-release 0s 2.5s forwards;
}

.ix-unseen .ix-roll:not(.is-live) .ix-roll-w,
.ix-unseen .ix-stop:not(.is-live) {
  animation-play-state: paused;
}

@keyframes ix-release {
  to { visibility: visible; }
}

.ix-roll.is-live .ix-roll-w {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  transform: translateY(100%);
  /* Each word's own top edge, where the window's is: clear of its tallest
     letters, so it never touches a word that stays (see .is-out). */
  clip-path: inset(calc(0.089em - 1px) -1em -0.5em -1em);
  transition: transform 600ms var(--ix-ease), opacity 340ms linear;
  will-change: transform, opacity;
}

/* Words out of sight lie just under the line, over the hero's first words,
   and each new one rises through them: none takes the pointer while out of
   sight or moving, or Snapbar's link would hover only now and then. */
.ix-roll.is-live .ix-roll-w:not(.is-in),
.ix-roll.is-rolling .ix-roll-w {
  pointer-events: none;
}

/* A word comes in once the one before is a third of the way out, so the two
   are never closer than a quarter of a line while both can be seen, and
   later still when the stop has far to go to make its room (--wd, grid.js). */
.ix-roll.is-live .ix-roll-w.is-in {
  opacity: 1;
  transform: none;
  transition-delay: var(--wd, 150ms);
}

/* A word leaves in 0.7 of its way in. It gathers speed from rest, rather than
   being snatched, and has faded before only its tails are left under the
   line above. Its top edge comes down the word a little faster than the
   word goes up, on the same curve, so the edge sinks away from the g as it
   leaves (half an em over the whole way): the gap under the g only ever
   widens. */
.ix-roll.is-live .ix-roll-w.is-out {
  opacity: 0;
  transform: translateY(-100%);
  clip-path: inset(calc(1.549em - 1px) -1em -0.5em -1em);
  transition: transform 420ms cubic-bezier(0.4, 0, 0.3, 1), clip-path 420ms cubic-bezier(0.4, 0, 0.3, 1), opacity 240ms linear;
}

.ix-roll.is-live .ix-roll-w.is-reset {
  transition: none;
}

/* An oversized full stop that holds its colour, and plays the line again.
   Empty, its bottom edge is its baseline: it stands on the line's. */
.ix-stop {
  position: relative;
  display: inline-block;
  vertical-align: baseline;
  width: 0.24em;
  height: 0.24em;
  margin-inline-start: 0.06em;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--stop, var(--accent));
  cursor: pointer;
  transition: background-color 360ms var(--ease), scale var(--t-base) var(--ease);
}

.ix-stop.is-live {
  position: absolute;
  left: 0;
  top: var(--dt);
  margin: 0;
  translate: var(--x) 0;
  /* To a longer word it goes ahead at once; back to a shorter one it waits
     for the word it would cross, the g of "thing" above all, to have risen
     out of its way (--dd, set by grid.js). */
  transition: translate 460ms var(--ix-ease) var(--dd, 0ms), background-color 360ms var(--ease), scale var(--t-base) var(--ease);
  will-change: translate;
}

.ix-stop.is-live.is-placing {
  transition: none;
}

/* A larger target than the mark. */
.ix-stop::after {
  content: '';
  position: absolute;
  inset: -0.3em;
  border-radius: 50%;
}

.ix-stop:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 50%;
}

/* Under the pointer it grows where it stands, from its centre, as a button
   does, not up off the baseline as a glyph would. */
@media (hover: hover) and (pointer: fine) {
  .ix-stop:hover {
    scale: 1.25;
  }
}

/* A small squash as each word lands, timed to the word settling rather than
   to it setting off, and against the line, like something landing: scale
   only, so it never fights the slide. */
.ix-stop.is-gulp {
  animation: ix-gulp 520ms var(--ix-ease) calc(var(--wd, 150ms) + 130ms);
}

@keyframes ix-gulp {
  0% { scale: 1; transform-origin: 50% 100%; }
  30% { scale: 1.32 0.82; transform-origin: 50% 100%; }
  100% { scale: 1; transform-origin: 50% 100%; }
}

/* The first time, the stop isn't there until the first word is: it waits
   unseen at that word's end, then comes up off the line with it and lands
   in the same squash. */
.ix-stop.is-await {
  scale: 0;
}

.ix-stop.is-arrive {
  animation: ix-arrive 640ms cubic-bezier(0.32, 0.72, 0, 1) 30ms backwards;
}

/* Round and whole first, then the same squash as a landing (ix-gulp). */
@keyframes ix-arrive {
  0% { scale: 0.3; opacity: 0; transform-origin: 50% 100%; }
  40% { scale: 1; opacity: 1; transform-origin: 50% 100%; }
  58% { scale: 1.32 0.82; transform-origin: 50% 100%; }
  100% { scale: 1; opacity: 1; transform-origin: 50% 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .ix-roll-w,
  .ix-stop {
    transition: none;
  }

  .ix-stop.is-gulp,
  .ix-stop.is-arrive {
    animation: none;
  }
}

/* The hero is short enough that the first project stands under it in the
   first screen: the headline, what I do, and the work by name. */
.ix-hero {
  padding-block: clamp(28px, 5vh, 96px) clamp(28px, 5vh, 80px);
  row-gap: 20px;
}

.ix-hero .ix-display {
  margin-block-end: clamp(12px, 2.4vw, 40px);
}

/* ---- The index ----
   Two thirds beside the hero's words: six projects in two columns, read
   down, each on a hairline, its lead role's dot before the name and the
   role itself at the line's end. */
.ix-index {
  grid-column: span var(--two);
  min-width: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  letter-spacing: 0;
}

.ix-index ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(3, auto);
  grid-auto-flow: column;
  column-gap: var(--g);
  margin: 0;
  padding: 0;
  list-style: none;
}

.ix-index a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-block: 8px;
  border-block-start: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
}

.ix-index li:nth-child(3n) a {
  border-block-end: 1px solid var(--border);
}

.ix-index a::before {
  content: '';
  flex: none;
  align-self: center;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c, var(--text));
  transition: transform var(--t-base) var(--ease);
}

.ix-index-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.ix-index-kind {
  flex: none;
  font-size: 0.8125rem;
  color: var(--text-muted);
  transition: color var(--t-quick) var(--ease);
}

@media (hover: hover) and (pointer: fine) {
  .ix-index a:hover::before {
    transform: scale(1.6);
  }

  .ix-index a:hover .ix-index-kind {
    color: var(--text);
  }
}

/* Narrower, a title needs its whole line: the role goes first, and under
   900px the two columns become one, so no name is ever cut short. */
@media (max-width: 1199px) {
  .ix-index-kind {
    display: none;
  }
}

@media (max-width: 899px) {
  .ix-index ol {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-auto-flow: row;
  }

  .ix-index li:nth-child(3n) a {
    border-block-end: 0;
  }

  .ix-index li:last-child a {
    border-block-end: 1px solid var(--border);
  }
}

/* On a phone the first project is a thumb's reach away, and the room goes
   to it instead. */
@media (max-width: 639px) {
  .ix-hero {
    padding-block: 28px 36px;
  }

  .ix-index {
    display: none;
  }
}

/* ---- About ----
   After the work: a label in the first third, the story in the other two. */
.ix-about {
  padding-block: calc(var(--pg) / 2 + clamp(32px, 6vh, 80px)) calc(var(--pg) / 2);
  row-gap: 20px;
}

.ix-about-title {
  font-weight: 400;
  color: var(--text-muted);
}

/* ---- The work and the photographs ----
   Every block pads half the space between blocks above and below, so the
   blocks touch and the pointer never falls between two of them. */

.ix-blocks {
  margin-block-start: calc(var(--pg) / -2);
}

.ix-work {
  padding: 0;
}

.ix-block {
  padding: calc(var(--pg) / 2) var(--m);
  transition: opacity var(--t-base) var(--ease);
}

.ix-mods {
  container-type: inline-size;   /* its width, for wide Small's words (see above) */
  display: grid;
  grid-template-columns: repeat(var(--per), minmax(0, 1fr));
  gap: var(--g);
}

.ix-reel {
  display: contents;   /* on the grid the pictures are modules like the words */
}

.ix-dots {
  display: none;
}

.ix-mod {
  position: relative;
  min-width: 0;
  aspect-ratio: 16 / 9;
}

/* ---- A module of words ---- */

.ix-label {
  container-type: size;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.ix-title {
  margin: 0;
  max-width: 100%;
  font-size: clamp(0.875rem, 6.2cqi, 1.75rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.012em;
  color: var(--text);
  text-wrap: balance;
  /* The capitals' tops on the pictures' top edge. */
  text-box: trim-start cap alphabetic;
}

/* A name is never cut short. A button sets its words as one block, so it
   trims its own first line: as an inline block in the heading's line, a name
   that wrapped stood a line above the pictures' top edge. */
.ix-open {
  display: block;
  text-box: trim-start cap alphabetic;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

/* The whole module opens the project. */
.ix-open::before {
  content: '';
  position: absolute;
  inset: 0;
}

.ix-open:focus-visible {
  outline: none;
}

.ix-out {
  margin: 0;
  max-width: 30em;
  font-size: clamp(0.8125rem, 3.1cqi, 1rem);
  line-height: 1.38;
  letter-spacing: 0;
  color: var(--text-muted);
  text-wrap: pretty;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

/* A project's roles, lead first: a mark in each one's colour. */
.ix-roles,
.ix .sheet-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.3;
  letter-spacing: 0;
  color: var(--text-secondary);
}

:is(.ix-roles, .sheet-roles) span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

:is(.ix-roles, .sheet-roles) span::before {
  content: '';
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c);
}

/* How it was built rather than what: a ring, not a dot. */
:is(.ix-roles, .sheet-roles) span.is-ai::before {
  background: none;
  box-shadow: inset 0 0 0 1.5px var(--text);
}

/* In a module, the address and then the roles close it, the roles' baseline
   on the pictures' bottom edge. Nothing hangs below the module, so nothing
   meets the marks at its corners (an address's underline and descenders
   did). The roles are set as a line of text, not a row of boxes, so the type
   itself can be trimmed: 14px from the address's baseline to their capitals,
   and each dot centred on the capitals as before. */
.ix-label .ix-roles {
  display: block;
  margin-top: 8px;   /* and the module's 6px gap */
  line-height: 1.6;
  text-box: trim-both cap alphabetic;
}

.ix-label .ix-roles span {
  display: inline;
  margin-inline-end: 14px;
}

.ix-label .ix-roles span:last-child {
  margin-inline-end: 0;
}

.ix-label .ix-roles span::before {
  display: inline-block;
  margin-inline-end: 7px;
  vertical-align: calc(0.36em - 3.5px);
}

@container (max-height: 132px) {
  .ix-label .ix-roles { display: none; }
}

.ix-meta {
  margin: auto 0 0;
  max-width: 100%;
  font-size: 0.8125rem;
  line-height: 1.2;
  letter-spacing: 0;
  color: var(--text-muted);
  white-space: nowrap;
  text-overflow: ellipsis;
  /* The baseline on the pictures' bottom edge; the descenders hang below it,
     in a padding the margin takes back, so the clip that cuts a long address
     short never cuts them (Safari has no overflow-clip-margin). */
  text-box: trim-end cap alphabetic;
  overflow: hidden;
  padding-block-end: 0.45em;   /* a link's underline, too */
  margin-block-end: -0.45em;
}

.ix-ext {
  position: relative;
  z-index: 1;
}

/* Too small a module for the sentence whole: the name and the address stand
   alone, an index, rather than a sentence cut off half way. */
@container (max-height: 132px) {
  .ix-out { display: none; }
}

@container (min-height: 220px) {
  .ix-out { -webkit-line-clamp: 5; }
}

/* ---- A module of pictures ---- */

.ix-frame,
.ix-photo {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  transition: scale var(--t-quick) var(--ease);   /* on the base, so a release eases back too */
}

.ix-frame:focus-visible,
.ix-photo:focus-visible {
  outline: none;
}

.ix-pic {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: var(--r);
  background: var(--ground, var(--bg-alt));
  container-type: size;
}

/* A hairline inside the edge, so a white screen still has one on a white page. */
.ix-pic::before,
.ix-ph::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--edge);
  pointer-events: none;
}

.ix-pic > img,
.ix-ph > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% var(--fy, 0%);
  opacity: 0;
  transition: opacity var(--t-base) var(--ease);
  -webkit-user-drag: none;
}

.ix-pic > img.is-in,
.ix-ph > img.is-in {
  opacity: 1;
}

/* A clip over the picture (Drift's opening turn). */
.ix-pic > .ix-loop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity var(--t-base) var(--ease);
}

.ix-pic > .ix-loop.is-in {
  opacity: 1;
}

/* A phone capture: the whole screen, standing a little in from the module's
   top and running off the bottom (or the reverse, .is-low). The module is a shade lighter than the screen so the
   screen's own edge reads. */
.ix-pic.is-phone {
  --phone: 40%;                         /* matches PHONE_W in grid.js */
  --inset: 9%;
  background: #1a1a19;
}

.ix-pic.is-phone > img {
  inset: auto;
  left: 50%;
  top: var(--inset);
  width: var(--phone);
  height: auto;
  object-fit: fill;
  transform: translateX(-50%);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.1), 0 2cqi 6cqi -1cqi rgb(0 0 0 / 0.6);
}

.ix-pic.is-phone.is-low > img {
  top: auto;
  bottom: var(--inset);
}

/* Frames drawn live, in ems of the module's width (site.css draws them). */
.ix-pic .lv {
  inset: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: none;
  font-size: 2.5cqi;
}

/* Snapbar's brand board: the app icon and the mark side by side, the palette
   in a band beneath, in the proportions it is used. */
.ix-pic .lv-kit {
  display: grid;
  grid-template: 1fr 6em / 1fr 1fr;
}

.lv-kit > b {
  display: grid;
  place-items: center;
  min-width: 0;
}

.lv-kit .kit-app {
  background: #f5f5f7;
}

.lv-kit .kit-app i {
  display: grid;
  place-items: center;
  width: 7.5em;
  height: 7.5em;
  border-radius: 23%;
  background: #4c00ff;
  fill: #fff;
}

.lv-kit .kit-app svg {
  width: 64%;
  height: 64%;
}

.lv-kit .kit-mark svg {
  width: 6.25em;
  height: 6.25em;
  fill: #0a0a0a;
}

.lv-kit .kit-palette {
  grid-column: 1 / -1;
  display: flex;
  align-items: stretch;
}

.lv-kit .kit-palette span {
  flex: var(--w);
  background: var(--c);
}

.ix-pic .lv-icons img {
  position: static;
  width: 2.8em;
  height: 2.8em;
}

.ix-pic .lv-phones {
  inset: auto;
  left: 50%;
  top: 50%;
  width: auto;
  height: calc(100% / 1.08);
  aspect-ratio: 1920 / 1299;
  transform: translate(-50%, -50%);
}

.ix-pic .lv-phones img {
  position: static;
  width: auto;
  height: 100%;
  box-shadow: 0 0 0 1px var(--edge);
}

/* The agent's eight states act on their own, all the time (reduced motion
   holds them still; v2.css), and rest where a clip would (grid.js wake()). */
.ix-pic .lv-agent.is-still * {
  animation-play-state: paused;
}

/* A photograph fills its module, which takes the photograph's own shape. */
.ix-photo {
  cursor: zoom-in;
}

.ix-ph {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: var(--r);
  background: var(--bg-alt);
}

.ix-ph > img {
  object-position: 50% var(--fy, 50%);
}

/* ---- Pointing at the work ----
   The block under the pointer stays; every other one steps back. The module
   under it is marked at its corners, the way a crop is marked on a proof. */

@media (hover: hover) and (pointer: fine) {
  .ix-blocks:has(.ix-block:hover) .ix-block:not(:hover) {
    opacity: 0.26;
  }
}

.ix-blocks:has(:focus-visible) .ix-block:not(:has(:focus-visible)) {
  opacity: 0.26;
}

.ix-label::after,
.ix-frame::after,
.ix-ph::after {
  --arm: 10px;
  --wt: 1px;
  content: '';
  position: absolute;
  inset: -2px;
  z-index: 2;
  color: var(--text);
  pointer-events: none;
  background:
    linear-gradient(currentColor 0 0) 0 0 / var(--arm) var(--wt),
    linear-gradient(currentColor 0 0) 0 0 / var(--wt) var(--arm),
    linear-gradient(currentColor 0 0) 100% 0 / var(--arm) var(--wt),
    linear-gradient(currentColor 0 0) 100% 0 / var(--wt) var(--arm),
    linear-gradient(currentColor 0 0) 0 100% / var(--arm) var(--wt),
    linear-gradient(currentColor 0 0) 0 100% / var(--wt) var(--arm),
    linear-gradient(currentColor 0 0) 100% 100% / var(--arm) var(--wt),
    linear-gradient(currentColor 0 0) 100% 100% / var(--wt) var(--arm);
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity var(--t-quick) var(--ease), inset var(--t-base) var(--ease);
}

@media (hover: hover) and (pointer: fine) {
  .ix-label:hover::after,
  .ix-frame:hover::after,
  .ix-photo:hover .ix-ph::after {
    opacity: 1;
    inset: -6px;
  }
}

.ix-label:has(:focus-visible)::after,
.ix-photo:focus-visible .ix-ph::after {
  --wt: 2px;
  opacity: 1;
  inset: -6px;
}

.ix-frame:active,
.ix-photo:active {
  scale: 0.99;
}

/* ---- A phone app ----
   Its screens stand whole, at a phone's own shape, never cropped into a
   picture's 16:9. The block lays them on the page's columns rather than in
   modules a row: the words take the first third as every project's do, and
   each screen takes two columns, so four fill the other two thirds and every
   pair stands under one of the pictures above. The row is as tall as a phone,
   not a picture: the columns hold, the row height gives way.

   Twelve columns: the words and four screens. Six: the words and two, then
   three. Two (a phone): the words across, then two screens a row. */

.ix-proj--phone .ix-mods {
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
}

.ix-proj--phone .ix-label {
  grid-column: span var(--third);
  aspect-ratio: auto;
}

.ix-screen {
  grid-column: span 2;
  aspect-ratio: var(--ar, 9 / 19.5);
}

/* Square, like every other module: a display's round corners cut into what
   sits at a screen's edge (Dungym's rest timer). */
.ix-screen .ix-pic {
  background: var(--ground, #0a0a0a);
}

.ix-screen .ix-pic > img {
  object-position: 50% 0;
}

/* Only as many screens as close the rows: four, then five on six columns,
   then four on a phone. The rest are a click away in the project. */
.ix-proj--phone .ix-screen:nth-of-type(n + 5) {
  display: none;
}

@media (max-width: 1199px) and (min-width: 640px) {
  .ix-proj--phone .ix-screen:nth-of-type(5) {
    display: block;
  }
}

/* ---- On a phone ----
   Two columns. Every project's words run across the page, as tall as they
   are, straight onto its pictures, and the pictures are one row that swipes
   sideways and still keeps to the grid: each picture spans both columns,
   margin to margin, the next a gutter away, and every swipe comes to rest on
   the margin. A phone app's screens take a column each. The row is the shape
   of its tallest picture, so none loses height (a wider one gives a little
   at its sides). Dots under the row say which picture leads; a tap opens the
   project, as anywhere else. */

@media (max-width: 639px) {
  /* The words in two groups, close inside and apart between: the name and
     its sentence, then the address and the roles, 16 between and 24 down to
     the pictures, so the words read as one block over the row rather than a
     caption pressed on it. */
  .ix-proj .ix-label {
    grid-column: 1 / -1;
    container-type: inline-size;
    aspect-ratio: auto;
    gap: 8px;
    margin-block-end: calc(24px - var(--g));
  }

  .ix-proj .ix-label .ix-out {
    -webkit-line-clamp: 4;
  }

  .ix-proj .ix-label .ix-meta {
    margin-block-start: 8px;
  }

  .ix-proj .ix-label .ix-roles {
    margin-block-start: 6px;   /* 14 to their capitals, as on the grid */
  }

  .ix-proj .ix-reel {
    grid-column: 1 / -1;
    display: flex;
    gap: var(--g);
    margin-inline: calc(-1 * var(--m));
    padding-inline: var(--m) 0;
    scroll-padding-inline: var(--m);
    overflow-x: auto;
    overflow-y: hidden;   /* sideways only: a picture can't be pulled down inside its row */
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .ix-proj .ix-reel::-webkit-scrollbar {
    display: none;
  }

  /* The margin at the row's far end, which a scroller's own padding loses. */
  .ix-proj .ix-reel::after {
    content: '';
    flex: 0 0 calc(var(--m) - var(--g));
  }

  /* The row's box runs on past the far margin, so a page is its width less
     that margin: the columns' span. */
  .ix-proj .ix-reel > .ix-mod {
    flex: 0 0 calc(100% - var(--m));
    aspect-ratio: var(--rr, 16 / 9);
    scroll-snap-align: start;
  }

  .ix-proj--phone .ix-reel > .ix-screen {
    display: block;
    flex-basis: calc((100% - var(--m) - var(--g)) / 2);
    aspect-ratio: var(--ar, 9 / 19.5);
  }

  .ix-proj .ix-dots {
    grid-column: 1 / -1;
    display: flex;
    gap: 6px;
    margin-top: calc(12px - var(--g));
  }

  .ix-dots i {
    width: 6px;
    height: 6px;
    background: var(--text-muted);
    opacity: 0.35;
    transition: opacity var(--t-quick) var(--ease), width var(--t-quick) var(--ease);
  }

  .ix-dots i.is-on {
    width: 18px;
    opacity: 1;
  }
}

/* ---- The footer ---- */

.ix-foot {
  padding-block: clamp(88px, 15vh, 184px) calc(clamp(28px, 4vw, 52px) + var(--sb));
  row-gap: clamp(48px, 8vw, 128px);
}

.ix-mail {
  justify-self: start;
  font-size: clamp(1.625rem, 0.5rem + 4.6vw, 5.25rem);
  line-height: 1;
  text-decoration: underline;
  text-decoration-color: var(--text-faint);
  text-decoration-thickness: 0.045em;
  text-underline-offset: 0.12em;
  overflow-wrap: anywhere;
  transition: text-decoration-color var(--t-base) var(--ease);
}

@media (hover: hover) and (pointer: fine) {
  .ix-mail:hover {
    text-decoration-color: var(--dot);
  }
}

.ix-foot .ix-third {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.ix-foot .ix-third a + a {
  margin-inline-start: 1.5em;
}

/* The last third: Back to the top, and the theme switch at the page's right
   edge, under Contact's. The choices sit quiet in the footer's grey; the one
   that holds takes ink and keeps its underline in --dot, as Contact does
   while it's open. A choice that can be made gains contrast on hover. */
.ix-foot-end {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  column-gap: 1.5em;
  max-width: none;
}

.ix-theme {
  display: flex;
  column-gap: 1.5em;
}

.ix-theme[hidden] {
  display: none;
}

.ix-theme button {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--text-muted);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color var(--t-quick) var(--ease), text-decoration-color var(--t-quick) var(--ease);
}

.ix-theme button[aria-pressed='true'] {
  color: var(--text);
  text-decoration-color: var(--dot);
  cursor: default;
}

@media (hover: hover) and (pointer: fine) {
  .ix-theme button[aria-pressed='false']:hover {
    color: var(--text);
    text-decoration-color: var(--text-faint);
  }
}

/* On a phone the ways out stand in one column, as Contact's do in the bar:
   one to a 44px row, in its size and weight, the year last and quiet. */
@media (max-width: 639px) {
  .ix-foot {
    row-gap: 0;
  }

  .ix-mail {
    margin-block-end: 32px;
  }

  .ix-foot .ix-third {
    display: grid;
    justify-items: start;
    margin: 0;
    font-size: 0.875rem;
    font-weight: 500;
  }

  .ix-foot .ix-third a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .ix-foot .ix-third a + a {
    margin-inline-start: 0;
  }

  /* The switch takes a row of its own under Back to the top (the third is
     a grid here), each choice a 44px target. */
  .ix-theme button {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .ix-foot .ix-third:first-of-type {
    order: 1;
    margin-block-start: 28px;
    font-weight: 400;
    font-size: 0.8125rem;
  }
}

/* ---- A photograph, large ---- */

.ix-look {
  position: fixed;
  inset: 0;
  z-index: 70;
  cursor: zoom-out;
  /* Every touch on it is the photograph's (grid.js): across to step, down to
     put it away. On a tablet or a phone on its side too, not only upright. */
  touch-action: none;
}

.ix-look[hidden] {
  display: none;
}

.ix-look-veil {
  position: absolute;
  inset: 0;
  background: var(--bg);
  opacity: 0;
  transition: opacity var(--t-base) var(--ease);
}

.ix-look.is-in .ix-look-veil {
  opacity: 0.985;
  transition: opacity var(--t-move) var(--ease);   /* in slower than out */
}

/* The photograph opens out of its crop: the window grows to the whole picture. */
.ix-look-img {
  position: fixed;
  left: 0;
  top: 0;
  transform-origin: 0 0;   /* grid.js scales it from its corner */
  overflow: hidden;
  border-radius: var(--r);
  transition: opacity var(--t-quick) var(--ease);
}

.ix-look-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ix-look-cap {
  position: absolute;
  left: var(--m);
  right: var(--m);
  bottom: calc(clamp(16px, 3vw, 32px) + var(--sb));
  margin: 0;
  max-width: none;
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  opacity: 0;
  transition: opacity var(--t-quick) var(--ease);
}

.ix-look.is-in .ix-look-cap {
  opacity: 1;
  transition: opacity var(--t-base) var(--ease) var(--t-quick);
}

/* Pulled down, the photograph is on its way out: its words and ways step
   aside at once, and come back if it settles. */
.ix-look.is-in.is-pulling :is(.ix-look-cap, .ix-look-go, .ix-look-close) {
  opacity: 0;
  transition: opacity var(--t-quick) var(--ease);
}

/* Its way to the next and the last: arrows at the sides, quiet until wanted,
   and a way out, top right. Swipes on a touch screen (grid.js). */
.ix-look-go,
.ix-look-close {
  position: absolute;
  z-index: 1;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--t-quick) var(--ease);
}

.ix-look.is-in :is(.ix-look-go, .ix-look-close) {
  opacity: 0.5;
  transition: opacity var(--t-base) var(--ease) var(--t-quick);
}

/* A tap leaves no hover behind: on a touch screen the arrow pressed would
   stay lit while its twin sat at half. */
.ix-look.is-in :is(.ix-look-go, .ix-look-close):is(:focus-visible, :active) {
  opacity: 1;
  transition-delay: 0s;
}

@media (hover: hover) and (pointer: fine) {
  .ix-look.is-in :is(.ix-look-go, .ix-look-close):hover {
    opacity: 1;
    transition-delay: 0s;
  }
}

.ix-look-go {
  top: 50%;
  translate: 0 -50%;
  display: grid;
  place-items: center;
  width: 64px;
  height: 96px;
}

.ix-look-go svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: square;
}

.ix-look-prev { left: calc(var(--m) - 20px); }
.ix-look-next { right: calc(var(--m) - 20px); }

.ix-look-close {
  top: calc(16px + env(safe-area-inset-top, 0px));
  right: var(--m);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  font: inherit;
  font-size: 0.8125rem;
}

/* A finger's height of target round a 36px line, without moving the words. */
.ix-look-close::before {
  content: '';
  position: absolute;
  inset: -4px 0;
}

.ix-look-close kbd {
  font: inherit;
  font-size: 0.6875rem;
  color: var(--text-muted);
  padding: 2px 5px;
  outline: 1px solid var(--edge);
  outline-offset: -1px;
}

/* On a phone the photograph takes the width: the arrows step down beside the
   count, and a swipe does the rest. */
@media (max-width: 639px) {
  .ix-look-go {
    top: auto;
    bottom: calc(clamp(16px, 3vw, 32px) - 13px + var(--sb));
    translate: none;
    width: 44px;
    height: 44px;
  }

  .ix-look-go svg {
    width: 20px;
    height: 20px;
  }

  .ix-look-prev { left: calc(50% - 48px); }
  .ix-look-next { right: auto; left: calc(50% + 4px); }

}

/* "esc" only where there is likely a keyboard: a mouse or trackpad. */
.ix-look-close kbd { display: none; }

@media (hover: hover) and (pointer: fine) {
  .ix-look-close kbd { display: inline-block; }
}

/* ---- A project, opened ----
   The sheet is the orbit's own (site.css); its cover travels here from the grid. */

.ix-fly {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 45;
  overflow: hidden;
  background: var(--bg-alt);
  pointer-events: none;
  /* Laid out once at the sheet's size; only its transform and clip move. */
  transform-origin: 0 0;
  will-change: transform, clip-path;
  contain: layout paint;
}

/* Out of a drawn module (a live board) only the project's picture moves,
   fading as it goes, so there is no ground behind it to show. */
.ix-fly.is-bare {
  background: none;
}

.ix-fly img,
.ix-fly canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0;
}

/* One picture coming in over another: the opened project's over the
   module's, or going back, the module's over the project's. */
.ix-fly > img:not(:first-child) {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
}

.ix-fly video,
.ix .sheet-hero > video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* A cover that plays: the large clip over the still, the module's clip
   standing in under it until the large one is playing. */
.ix .sheet-hero.has-loop {
  position: relative;
}

.ix .sheet-standin {
  z-index: 1;
}

.ix .sheet-loop {
  z-index: 2;
  opacity: 0;
  transition: opacity var(--t-quick) var(--ease);
}

/* The large clip comes in over the cover once the cover has landed, so one
   that arrives without its clip (opened from another picture) fades into it
   rather than cutting. Carried home in the flier, it shows as it is. */
.ix .sheet.is-landed .sheet-loop.is-in,
.ix-fly .sheet-loop {
  opacity: 1;
}

.ix-fly .sheet-loop {
  transition: none;
}

.ix .sheet:not(.is-landed) .sheet-hero > video {
  visibility: hidden;
}

/* ---- The project, on the grid ----
   The orbit's sheet and case files, laid on the page's columns. Every part
   below spans whole columns: the words sit in thirds as on the home page,
   pictures in column pairs, and each grid inside the case files keeps the
   page's gutter so its cells land on column lines too. Only this page sees
   these rules; the orbit's sheet is unchanged. */

.ix .sheet-inner {
  max-width: none;
  padding: 0 var(--m) clamp(48px, 6vw, 88px);
}

.ix :is(.sheet-head, .case-inner, .sheet-foot) {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  column-gap: var(--g);
}

/* Parts inside the case file share its columns exactly. */
.ix :is(.case-stats, .case-scope, .case-columns, .case-flow) {
  display: grid;
  grid-template-columns: subgrid;
  grid-column: 1 / -1;
  column-gap: var(--g);   /* a subgrid's own gutter would move its lines */
  padding: 0;
  border: 0;
}

/* No Close on screen: it either covered Contact or sat over the project.
   Escape, the browser's Back and the name in the bar all leave a project. */
.ix .sheet-bar {
  display: none;
}

/* The project takes focus as it opens, for its keys; no ring round the page. */
/* Where scrollbars take width, the project keeps its scrollbar's room from
   the moment it opens, so its columns (and Back above them) don't shift as
   the case file below arrives and makes it long enough to scroll. */
.ix .sheet-scroll {
  scrollbar-gutter: stable;
}

.ix .sheet-scroll:focus-visible {
  outline: none;
}

/* The head: the name across the page, then three thirds. */
.ix .sheet-head {
  max-width: none;
  padding-top: clamp(40px, 8vh, 104px);
  row-gap: 20px;
  align-items: baseline;
}

.ix .sheet-head h1 {
  grid-column: 1 / -1;
  margin: 0 0 clamp(12px, 3vw, 44px) -0.05em;
  font-size: clamp(2.25rem, 0.8rem + 4.6vw, 6rem);
  font-weight: 500;
  line-height: 0.96;
  letter-spacing: -0.045em;
}

/* Under the name, across the page: what I did on it. */
.ix .sheet-roles {
  grid-column: 1 / -1;
  margin-top: calc(-1 * clamp(4px, 2vw, 28px));
  margin-bottom: clamp(4px, 1vw, 12px);
  font-size: 0.9375rem;
  gap: 6px 20px;
}

.ix .sheet-roles span::before {
  width: 9px;
  height: 9px;
}

.ix .sheet-outcome,
.ix .sheet-body,
.ix .sheet-link {
  grid-column: span var(--third);
  margin: 0;
  max-width: 34em;
}

.ix .sheet-outcome {
  font-size: clamp(1.0625rem, 0.95rem + 0.4vw, 1.3125rem);
  line-height: 1.35;
  text-wrap: pretty;
}

.ix .sheet-body {
  font-size: 0.9375rem;
  line-height: 1.5;
}

.ix .sheet-link {
  justify-self: start;
  min-height: 0;
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.5;
}

.ix .sheet-link::after {
  content: none;
}

/* The cover, the page's full width. A phone stands on its own ground. */
.ix .sheet-hero {
  display: block;
  margin-top: clamp(40px, 6vw, 88px);
  border-radius: 0;
  background: none;
}

/* A phone app has no cover. Without this the display above beats `hidden`,
   and the last project's picture showed under it. */
.ix .sheet-hero[hidden] {
  display: none;
}

.ix .sheet-hero img {
  max-width: 100%;
  max-height: none;
  box-shadow: 0 0 0 1px var(--edge);
}

.ix .sheet-hero.is-tall {
  display: grid;
  place-items: center;
  padding: clamp(24px, 5vw, 72px) 0;
  background: #1a1a19;
}

.ix .sheet-hero.is-tall img {
  border-radius: 0;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.1), 0 24px 60px -24px rgb(0 0 0 / 0.7);
}

/* A phone app's lead: its screens, whole, in rows on the page's columns, in
   place of one cover. A phone is a column pair, as on the home page, so every
   third above holds exactly two and every edge falls on the thirds' lines:
   six a row on twelve columns, three on six, two on a phone. grid.js shows a
   whole number of sixes, so every row fills at every width. The case file's
   own row of phones would repeat them, so it steps aside. */
.ix .sheet-screens {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: clamp(20px, 2.4vw, 36px) var(--g);
  margin-top: clamp(40px, 6vw, 88px);
}

.ix .sheet-screens[hidden] {
  display: none;
}

.ix .sheet-screens > figure {
  grid-column: span 2;
  margin: 0;
  aspect-ratio: var(--ar, 9 / 19.5);
  border-radius: var(--r);   /* square, as on the grid */
  overflow: hidden;
  background: #0a0a0a;
  box-shadow: 0 0 0 1px var(--edge);
}

.ix .sheet-screens img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0;
}

@media (max-width: 639px) {
  .ix .sheet-screens > figure { grid-column: span 1; }
}

/* They come in with the sheet, one after another, a short rise each. */
.ix .sheet-screens > figure {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--t-quick) var(--ease), transform 0s linear var(--t-quick);   /* they leave by fading, not sinking */
}

.ix .sheet.is-in .sheet-screens > figure {
  opacity: 1;
  transform: none;
  transition:
    opacity 480ms var(--ease) calc(120ms + var(--k, 0) * 45ms),
    transform 640ms cubic-bezier(0.16, 1, 0.3, 1) calc(120ms + var(--k, 0) * 45ms);
}

.ix .sheet.is-phone-app .case-phones,
.ix .sheet.is-phone-app .case-phones + .swipe-dots {
  display: none;
}

/* Asking for less motion, the screens fade in together and don't rise. */
@media (prefers-reduced-motion: reduce) {
  .ix .sheet-screens > figure {
    transform: none;
    transition: opacity var(--t-quick) var(--ease);
  }

  .ix .sheet.is-in .sheet-screens > figure {
    transform: none;
    transition: opacity var(--t-base) var(--ease);
  }
}

/* The case file: one column grid, its parts a long step apart. */
.ix .sheet-case .case-inner {
  --gap: clamp(64px, 8vw, 128px);
  margin-top: clamp(72px, 10vw, 144px);
  padding-top: 0;
  border-top: 0;
  gap: var(--gap) var(--g);
}

.ix .case-inner > * {
  grid-column: 1 / -1;
  min-width: 0;
}

.ix .case-heading {
  margin: 0 0 12px;
  max-width: none;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
}

.ix .case-flow-head p:not(.case-heading),
.ix .case-note p:not(.case-heading) {
  margin: 0;
  max-width: 34em;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

/* Stats: a third each, a rule over each, as the head's words above them sit,
   so every stat starts on a third's line: three to a row, and a row that
   doesn't fill stays flush left. */
.ix .case-stats {
  row-gap: 32px;
}

.ix .case-stat,
.ix .case-stat:first-child,
.ix .case-stats > .case-stat:last-child,
.ix .case-stats--4 > .case-stat,
.ix .case-stats--4 > .case-stat:last-child {
  grid-column: span var(--third);
  padding: 14px 0 0;
  border: 0;
  border-top: 1px solid var(--border);
}

/* Four share one row rather than leave one alone under three: three columns
   each, a quarter of twelve, and on six columns half, two by two. (A phone
   sets its own pairs below.) */
.ix .case-stats--4 > .case-stat,
.ix .case-stats--4 > .case-stat:last-child {
  grid-column: span 3;
}

.ix .case-stat dd {
  margin: 0;
  font-size: clamp(1.75rem, 1rem + 2.2vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.045em;
}

.ix .case-stat dt {
  margin-top: 10px;
  font-size: 0.8125rem;
}

/* The scope in one breath, across two thirds. */
.ix .case-statement {
  grid-column: 1 / span var(--two);
  margin: 0;
  max-width: none;
  font-size: clamp(1.375rem, 0.9rem + 1.6vw, 2.375rem);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -0.03em;
}

/* A flow: its words in the first third, its pictures in the other two. */
.ix .case-flow {
  row-gap: 24px;
  align-items: start;
}

.ix .case-flow + .case-flow {
  padding-top: 0;
  border-top: 0;
}

.ix .case-flow-head {
  grid-column: 1 / span var(--third);
  max-width: none;
}

.ix .case-flow > :not(.case-flow-head):not(.swipe-dots) {
  grid-column: span var(--two);
  min-width: 0;
}

/* Stacked: the words over a row the width of the page. */
.ix .case-flow--stack > :not(.case-flow-head):not(.swipe-dots) {
  grid-column: 1 / -1;
}

/* Pictures inside: halves of the flow's two thirds, a column pair a phone. */
.ix .case-frames,
.ix .case-phones {
  display: grid;
  gap: 28px var(--g);
  margin: 0;
  padding: 0;
  overflow: visible;
  cursor: auto;
}

.ix .case-frames {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ix .case-phones {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* A row of phones the width of the page: six to a row, a pair each. */
.ix :is(.case-inner, .case-flow--stack) > .case-phones,
.ix .case-flow--stack .case-phones {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.ix .case-frames > .case-frame,
.ix .case-phones > .case-phone {
  flex: none;
  min-width: 0;
  margin: 0;
}

.ix .case-flow-media > .case-phones {
  margin-top: 28px;
}

.ix .case-frame img,
.ix .case-phone img,
.ix .case-wall li,
.ix .clip button,
.ix .bento-tile {
  border: 0;
  border-radius: 0;
  outline: 1px solid var(--edge);
  outline-offset: -1px;
}

.ix .case-clip-box > video {
  border-radius: 0;
  outline: 1px solid var(--edge);
  outline-offset: -1px;
}

.ix .case-phone figcaption,
.ix .case-frame figcaption,
.ix .clip-caption {
  margin-top: 10px;
  max-width: none;
}

.ix .swipe-dots {
  display: none;
}

/* The brand board: four to a row, a column pair each. */
.ix .bento {
  --bento-gap: var(--g);
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ix .bento-hero {
  grid-column: span 3;
  grid-row: span 2;
  aspect-ratio: auto;
}

/* The design system: tiles in halves of the flow's two thirds, as the frames,
   on the grid's hard edges; the components inside keep the dashboard's own
   round shapes. The rules take the same halves, so each starts on a third. */
.ix .ds-board {
  column-gap: var(--g);
}

.ix .ds-tile {
  border: 0;
  border-radius: 0;
  outline: 1px solid var(--edge);
  outline-offset: -1px;
}

.ix .ds-spec figcaption {
  margin: 10px 0 18px;   /* with the 10 above, the frames' 28 between rows */
}

.ix .ds-rules {
  gap: 28px var(--g);
  margin-top: 38px;      /* 56 under the last caption, with its 18 */
}

.ix .ds-rules li {
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.ix .ds-rules li::before {
  color: var(--text-muted);
}

/* The screen wall: one column a screen, the library across three. */
.ix .case-wall {
  gap: var(--g);
}

.ix .case-wall li:hover,
.ix .clip button:hover {
  transform: none;
  box-shadow: none;
}

/* Launch clips: four to a row, three columns each. */
.ix .clip-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px var(--g);
}

/* What isn't pictured: thirds, a rule over each. */
.ix .case-scope {
  row-gap: 28px;
}

.ix .case-scope > div,
.ix .case-scope > div:first-child {
  grid-column: span var(--third);
  padding: 14px 0 0;
  border: 0;
  border-top: 1px solid var(--border);
}

/* Two columns of notes and charts: a third, then two thirds. The timeline
   keeps the columns too: its dates in the first pair. */
.ix .case-columns {
  row-gap: 56px;
  align-items: start;
}

.ix .case-columns > :first-child {
  grid-column: 1 / span var(--third);
}

.ix .case-columns > :last-child {
  grid-column: span var(--two);
}

.ix .case-columns > :last-child,
.ix .arcs,
.ix .arc {
  display: grid;
  grid-template-columns: subgrid;
  column-gap: var(--g);
}

.ix .arcs,
.ix .arc,
.ix .case-columns > :last-child > * {
  grid-column: 1 / -1;
}

.ix .arc {
  column-gap: var(--g);
}

.ix .arc time {
  grid-column: span 2;
}

.ix .arc > div {
  grid-column: span calc(var(--two) - 2);
}

.ix .case-note {
  border-top: 1px solid var(--border);
}

.ix .case-note--first {
  border-top: 0;
}

.ix .cadence-bar i,
.ix .areas-key li::before {
  border-radius: 0;
}

.ix .areas-bar,
.ix .case-file.is-open .areas-bar {
  border-radius: 0;
}

.ix .areas-bar {
  clip-path: inset(0 100% 0 0);
}

.ix .case-file.is-open .areas-bar {
  clip-path: inset(0 0 0 0);
}

/* The foot: the next project across two thirds, the way to reach me in the last. */
.ix .sheet-foot {
  margin-top: clamp(96px, 12vw, 176px);
  padding-top: 24px;
  border-top: 1px solid var(--border);
  row-gap: 40px;
  align-items: start;
}

.ix .sheet-next {
  grid-column: 1 / span var(--two);
}

.ix .sheet-next strong {
  font-size: clamp(2rem, 1rem + 3.2vw, 4.5rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.045em;
  text-decoration-color: var(--text-faint);
  text-decoration-thickness: 0.045em;
  text-underline-offset: 0.12em;
}

/* Like the footer's address: a faint line that takes the full stop's colour,
   never the project's own. */
@media (hover: hover) and (pointer: fine) {
  .ix .sheet-next:hover strong {
    text-decoration-color: var(--dot);
  }
}

/* Contact answers Next: its label on Next's line, in Next's words, and the
   links under it at the footer's size. Beside Next it holds the page's right
   edge, under the bar's Contact; under Next, on a phone, it reads down the
   left with everything else. */
.ix .sheet-meta {
  grid-column: span var(--third);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.8125rem;
  line-height: 1.5;
  letter-spacing: normal;
}

@media (min-width: 640px) {
  .ix .sheet-meta {
    align-items: flex-end;
    text-align: right;
  }
}

.ix .sheet-meta p {
  line-height: inherit;
  letter-spacing: inherit;
}

.ix .sheet-meta a {
  margin-right: 0;
}

/* A smaller screen: the words take a third still, so pictures take four
   columns, phones one each. */
@media (max-width: 1199px) {
  .ix .clip-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ix .case-wall {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .ix .arc time {
    grid-column: span 1;
  }

  .ix .arc > div {
    grid-column: span calc(var(--two) - 1);
  }
}

/* A phone: everything takes the width; rows of pictures run sideways, each
   picture the column width or one column, with dots to say where you are. */
@media (max-width: 639px) {
  /* Two a row: four make two by two; an odd last one takes the row. */
  .ix .case-stat,
  .ix .case-stat:first-child,
  .ix .case-stats > .case-stat:last-child,
  .ix .case-stats--4 > .case-stat,
  .ix .case-stats--4 > .case-stat:last-child {
    grid-column: span 1;
  }

  .ix .case-stats > .case-stat:nth-child(odd):last-child {
    grid-column: span 2;
  }

  .ix .case-frames,
  .ix .case-phones,
  .ix :is(.case-inner, .case-flow--stack) > .case-phones,
  .ix .case-flow--stack .case-phones {
    display: flex;
    gap: var(--g);
    overflow-x: auto;
    margin-right: calc(var(--m) * -1);
    padding-right: var(--m);
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .ix .case-frames > .case-frame {
    flex: 0 0 100%;
    scroll-snap-align: start;
  }

  .ix .case-phones > .case-phone {
    flex: 0 0 calc((100% - var(--g)) / 2);
    scroll-snap-align: start;
  }

  .ix .swipe-dots {
    display: flex;
    grid-column: 1 / -1;
    justify-content: flex-start;
    margin-top: 12px;
  }

  .ix .case-inner > .swipe-dots {
    margin-top: calc(12px - var(--gap));
  }

  .ix .case-flow > .swipe-dots {
    margin-top: -12px;
  }

  .ix .swipe-dots button {
    position: relative;
    border-radius: 0;
  }

  /* A dot is 6px; a finger needs about 44. The hit area runs up and down and
     meets its neighbours halfway across the gap, so no tap falls between. */
  .ix .swipe-dots button::before {
    content: '';
    position: absolute;
    inset: -19px -3px;
  }

  .ix .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ix .bento-hero {
    grid-column: span 2;
    grid-row: auto;
    aspect-ratio: 2 / 1;
  }

  .ix .case-wall {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ix .case-wall .case-wall-lib {
    grid-column: 1 / span 2;
  }

  .ix .clip-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ix .arc time,
  .ix .arc > div {
    grid-column: 1 / -1;
  }
}

/* ---- The lead into the photographs ----
   Set like the hero, a size down: a line across the page, then a third. It
   sits between blocks, so it pads the half-spaces they leave. */

.ix-lead {
  padding-block: calc(var(--pg) / 2 + clamp(48px, 9vh, 112px)) calc(var(--pg) / 2);
  row-gap: 16px;
}

.ix-lead-title {
  grid-column: 1 / -1;
  margin: 0 0 clamp(4px, 1.4vw, 24px);
  margin-inline-start: -0.04em;
  font-size: clamp(1.75rem, 0.7rem + 3.4vw, 4.25rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--text);
  text-wrap: balance;
}

/* The photographs: a masonry on the grid. Its columns are the modules'
   columns, its gaps the gutter, and each photograph stands at its own
   shape in its column (grid.js lays them). */
.ix-photos .ix-mods {
  align-items: start;
}

.ix-col {
  display: flex;
  flex-direction: column;
  gap: var(--g);
  min-width: 0;
}
