/* The night theme: white surfaces and quiet beige threads on a dark ground. ?theme=paper brings back the cream one. */
html[data-theme='night'] {
  --paper: #1e2125;
  --paper-rgb: 30, 33, 37;
  --ink: #e9e6df;
  --ink-soft: #9c998f;
  --accent: #e3a55c;
  --rule: rgba(233, 230, 223, 0.38);
  color-scheme: dark;
}
html[data-theme='night'] .grain { mix-blend-mode: soft-light; opacity: 0.35; }
:root {
  --paper: #f2ece2;
  --paper-rgb: 242, 236, 226;
  --ink: #2a2623;
  --ink-soft: #6f675f;
  --accent: #c2461b;
  --rule: rgba(42, 38, 35, 0.42);
  --edge: 48px;
  --ui: 17px;
  --title: 40px;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--paper); color: var(--ink); overflow: hidden; }
body {
  font-family: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  font-size: var(--ui);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

#stage { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.grain {
  position: fixed; inset: 0; pointer-events: none; opacity: 0.5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.45 0 0 0 0 0.4 0 0 0 0 0.34 0 0 0 0.09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* edges */
.masthead { position: fixed; left: var(--edge); top: 34px; z-index: 5; }
/* a soft clear zone so the form never crowds the name or tagline */
.masthead::before {
  content: ''; position: absolute; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(var(--paper-rgb), 0.94) 62%, rgba(var(--paper-rgb), 0));
}
.masthead::before { inset: -40px -90px -36px -60px; }
.masthead .name {
  font-family: 'Source Serif 4', Georgia, serif; font-size: 46px; line-height: 1.05; letter-spacing: -0.012em;
  text-decoration: none; color: var(--ink);
}
.masthead .line { margin: 10px 0 0; font-size: var(--ui); color: var(--ink); }
/* who, in a line: out of the flow, so the sections keep their place; it gives way when one opens */
.masthead .bio {
  position: absolute; left: 0; top: 100%; width: min(31em, 40vw); margin: 12px 0 0;
  font-size: 15px; line-height: 1.5; color: var(--ink-soft);
  transition: opacity 450ms ease, visibility 450ms;
}
.masthead .bio::before {
  content: ''; position: absolute; z-index: -1; pointer-events: none; inset: -22px -70px -30px -50px;
  background: radial-gradient(closest-side, rgba(var(--paper-rgb), 0.9) 58%, rgba(var(--paper-rgb), 0));
}
/* only at the face: the network keeps the masthead to the name and the line */
.masthead .bio { opacity: 0; visibility: hidden; }
body.at-face:not(.in-section) .masthead .bio { opacity: 1; visibility: visible; }
body.in-section .masthead .bio { transition-duration: 200ms; }
.face-details {
  position: fixed; left: var(--edge); right: calc(var(--edge) + 110px); bottom: 34px; z-index: 5;
  opacity: 0; visibility: hidden; transform: translateY(6px); pointer-events: none;
  transition: opacity 450ms ease, transform 450ms ease, visibility 450ms;
}
body.at-face .face-details { opacity: 1; visibility: visible; transform: none; }
.face-details dl { display: flex; flex-wrap: wrap; gap: 16px 52px; margin: 0; }
.face-details dt { margin-bottom: 5px; color: var(--ink-soft); font-size: 12px; line-height: 1.4; }
.face-details dd {
  margin: 0; color: var(--ink); font: 13px/1.5 ui-monospace, 'SFMono-Regular', Consolas, monospace;
  letter-spacing: 0.025em;
}
.back:hover, .back:focus-visible { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
:focus-visible { outline: none; }

/* labels on the form */
.labels { position: fixed; inset: 0; pointer-events: none; z-index: 4; }
.leaders { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }
.leaders line { stroke: var(--ink); stroke-width: 0.8; opacity: 0; transition: opacity 400ms ease; }
.leaders line.in { opacity: 0.5; }
body.in-section .leaders line { opacity: 0 !important; transition-duration: 200ms; }

.label {
  position: absolute; left: 0; top: 0; transform-origin: 0 0; white-space: nowrap;
  pointer-events: auto; text-decoration: none; color: var(--ink); line-height: 1.2;
  opacity: 0; transition: opacity 450ms ease, color 200ms ease;
  will-change: transform;
}
.label::after { content: ''; position: absolute; inset: -14px -10px; }
.label.in { opacity: 1; }
.label .arrow { display: inline-block; opacity: 0; transform: translateX(-4px); transition: opacity 180ms ease, transform 180ms ease; }
.label.near .arrow, .label:hover .arrow, .label:focus-visible .arrow { opacity: 1; transform: none; }
.label:hover .txt, .label:focus-visible .txt, .label.near .txt { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.label .txt { position: relative; }
.label.visited { color: var(--accent); }
html[data-theme='night'] .label.visited { color: var(--ink-soft); } /* no colour at home */
.label.pulse .txt { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.label.pulse .arrow { animation: nudge 1000ms ease; }
@keyframes nudge {
  0% { opacity: 0; transform: translateX(-6px); }
  18% { opacity: 1; transform: translateX(5px); }
  36% { transform: translateX(0); }
  54% { transform: translateX(5px); }
  100% { opacity: 1; transform: translateX(0); }
}
body.in-section .label:not(.travelling) { opacity: 0 !important; pointer-events: none; transition-duration: 200ms; }
.label.travelling .arrow { opacity: 0 !important; }
.label.travelling .txt { text-decoration: none !important; }
.label.landed { visibility: hidden; }

.dot {
  position: absolute; left: 0; top: 0; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%;
  background: var(--ink); pointer-events: auto; cursor: pointer; opacity: 0; transition: opacity 400ms ease;
}
.dot::after { content: ''; position: absolute; inset: -18px; border-radius: 50%; }
.dot.in { opacity: 0.85; }
body.in-section .dot { opacity: 0 !important; pointer-events: none; }
body.secret-portrait .label, body.secret-portrait .dot { opacity: 0 !important; pointer-events: none; }
body.secret-portrait .leaders line { opacity: 0 !important; }

/* a section */
.section { position: fixed; z-index: 4; width: min(520px, 40vw); max-height: calc(100vh - 140px); overflow: auto; }
.section[hidden] { display: block; visibility: hidden; pointer-events: none; }
.section-title { margin: 14px 0 18px; font-weight: 400; font-size: var(--title); line-height: 1.2; }
.section-title .slot { visibility: hidden; }
.section.landed .section-title .slot { visibility: visible; }
.section-body p { margin: 0 0 14px; line-height: 1.55; max-width: 34em; }
.section-body .meta { color: var(--ink-soft); font-size: 15px; letter-spacing: 0.01em; }
.section-body em { font-style: italic; }
.section-body .links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 20px; }
.section-body .links a, .section-body ul a { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; text-decoration-color: var(--rule); }
.section-body .links a:hover, .section-body ul a:hover { text-decoration-color: currentColor; }
.section-body ul { list-style: none; margin: 0; padding: 0; }
.section-body li { margin: 0 0 12px; line-height: 1.45; }
.section-body li span { display: block; color: var(--ink-soft); font-size: 15px; }
.social-links { display: grid; gap: 6px; }
.social-links a { display: flex; align-items: center; gap: 16px; min-height: 44px; padding: 8px 0; color: var(--ink-soft); font-size: 17px; line-height: 1.5; text-decoration: none; transition: color 180ms ease; }
.social-links svg { width: 18px; height: 18px; flex: 0 0 18px; }
.social-links span { min-width: 0; overflow-wrap: anywhere; }
.social-links a.active, .social-links a:hover, .social-links a:focus-visible { color: var(--ink); }
.social-links a:hover span, .social-links a:focus-visible span { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.social-links a:focus-visible { outline: 1px solid var(--rule); outline-offset: 5px; }
.back { font-size: var(--ui); text-decoration: none; display: inline-block; }
.section--cv { overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--ink-soft) transparent; padding: 0 24px 24px 0; }
.section--cv > .back { position: sticky; top: 0; z-index: 1; display: block; padding: 8px 0 14px; background: var(--paper); }
.cv-content { font-size: 18px; line-height: 1.7; }
.cv-content p, .cv-content li { line-height: 1.7; max-width: 64ch; }
.cv-content .cv-section { margin-bottom: 42px; }
.cv-content .cv-section + .cv-section { border-top: 1px solid color-mix(in srgb, var(--ink) 16%, transparent); padding-top: 28px; }
.cv-content h2 { margin: 0 0 20px; font-size: 25px; font-weight: 500; }
.cv-content h3 { margin: 0 0 8px; font-size: 20px; font-weight: 500; line-height: 1.4; }
.cv-content .position { display: block; font-size: 15px; letter-spacing: 0.015em; }
.cv-content .timeline-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 8px 0 14px; color: var(--ink-soft); font-size: 15px; }
html[data-theme='night'] .cv-content .meta, html[data-theme='night'] .cv-content .timeline-meta { color: #b8b5ad; }
.cv-content .timeline-item + .timeline-item, .cv-content .sub-item + .sub-item { margin-top: 34px; }
.cv-content .group-title { margin-bottom: 14px; }
.cv-content .skill-card + .skill-card { margin-top: 24px; }
.cv-content ul { list-style: disc; padding-left: 22px; }
.cv-content li { margin-bottom: 14px; }
.cv-timeline { position: fixed; inset: 0; z-index: 4; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity 300ms ease, visibility 300ms; }
.cv-timeline.on { opacity: 1; visibility: visible; }
.cv-timeline button { position: absolute; left: 0; top: 0; text-align: left; pointer-events: auto; padding: 3px 0; max-width: 150px; }
.cv-year { display: block; color: var(--ink-soft); font: 14px/1.4 ui-monospace, 'SFMono-Regular', Consolas, monospace; transition: color 200ms ease; }
.cv-timeline button.active .cv-year { color: #e2c2a8; }
.cv-timeline button::before { content: ''; position: absolute; left: -16px; top: 10px; width: 4px; height: 4px; border-radius: 50%; background: #e2c2a8; opacity: 0; transform: translateX(var(--cv-marker-offset, 0px)); transition: opacity 200ms ease; }
.cv-timeline button.active::before { opacity: 1; }
html[data-theme='paper'] .cv-timeline button.active .cv-year { color: #8e6445; }
html[data-theme='paper'] .cv-timeline button::before { background: #8e6445; }
.cv-event { display: block; margin-top: 3px; font-size: 13px; line-height: 1.4; color: var(--ink-soft); }
.cv-timeline button:hover .cv-year, .cv-timeline button:focus-visible .cv-year { text-decoration: underline; text-underline-offset: 4px; }
.cv-timeline button:focus-visible { outline: 1px solid var(--ink-soft); outline-offset: 5px; }
.cv-timeline.compact .cv-event { display: none; }
.cv-timeline.compact .cv-year { font-size: 12px; }
.cv-timeline.compact button::before { left: -10px; top: 9px; }
.project-choices { position: fixed; inset: 0; z-index: 4; pointer-events: none; }
.project-choices[hidden] { display: none; }
.project-choices button { position: absolute; left: 0; top: 0; min-height: 44px; padding: 12px 6px 12px 34px; pointer-events: auto; white-space: nowrap; color: var(--ink-soft); font-size: var(--ui); transition: color 180ms ease; }
.project-choices button[aria-pressed='true'] { color: var(--ink); }
.project-choices button:hover, .project-choices button:focus-visible { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.project-choices button:focus-visible { outline: 1px solid var(--rule); outline-offset: 4px; }
.project-choices.compact button { padding: 36px 5px 8px; }
.project-choices.sky button { padding: 30px 6px 8px; }
/* Projects as a constellation: crisp dots and hairlines, one warm lit path, the chosen work in the centre */
:root { --trail: #e2c2a8; --sky-label: clamp(14px, calc(0.55vw + 9px), 20px); }
.sky { position: fixed; inset: 0; z-index: 4; pointer-events: none; }
.sky[hidden] { display: none; }
/* the lines sit under the canvas, so the drawing passes over them; the names stay in front */
.sky-under { position: fixed; inset: 0; pointer-events: none; }
.sky-under[hidden] { display: none; }
.sky-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.sky-svg .line { fill: none; stroke: var(--ink); stroke-width: 0.9; stroke-opacity: 0.2; stroke-linecap: round; stroke-linejoin: round; transition: stroke-opacity 400ms ease; }
.sky-svg .line.dim { stroke-opacity: 0.13; }
.sky-svg .line.gap, .sky-svg .line.under { stroke-opacity: 0; }
/* the lit path: a matte thread in the network threads' pastel, drawn along piece by piece */
.sky-svg .trail { fill: none; stroke: var(--trail); stroke-width: 1.1; stroke-opacity: 0.85; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transition: opacity 260ms ease; }
.sky-svg .trail.on { opacity: 1; stroke-dasharray: var(--len) 10000; animation: sky-draw 560ms cubic-bezier(0.3, 0.6, 0.2, 1) both; animation-delay: var(--d, 0ms); }
@keyframes sky-draw { from { stroke-dashoffset: var(--len); } to { stroke-dashoffset: 0; } }
/* stars: fine matte dots; the chosen one in full ink and ringed, those off the trail faint */
.sky-svg .star .core { fill: var(--ink); fill-opacity: 0.85; transition: fill-opacity 400ms ease; }
.sky-svg .star.trail .core { fill-opacity: 0.72; }
.sky-svg .star.dim .core { fill-opacity: 0.38; }
.sky-svg .star.on .core { fill-opacity: 1; }
.sky-svg .ring { fill: none; stroke: var(--trail); stroke-width: 1; stroke-opacity: 0.85; transform-box: fill-box; transform-origin: center; }
.sky-svg .ring.arrive { animation: sky-ring 480ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes sky-ring { from { opacity: 0; transform: scale(1.5); } to { opacity: 1; transform: scale(1); } }
.sky-dyn { transition: opacity 180ms ease; }
.sky-dyn.out { opacity: 0; }
.sky-cats, .sky-nodes { position: absolute; inset: 0; }
.sky-cat, .sky-node {
  position: absolute; transform: translateY(-50%); padding: 7px 8px 7px 23px; pointer-events: auto; text-align: left;
  font-size: var(--sky-label); line-height: 1.25; color: rgba(233, 230, 223, 0.8); white-space: normal; transition: color 200ms ease, opacity 360ms ease;
}
.sky-cat { color: rgba(233, 230, 223, 0.72); }
.sky-cat.dim { color: rgba(233, 230, 223, 0.45); }
.sky-cat.on { color: var(--ink); }
.sky-node { opacity: 0; }
.sky-node.in { opacity: 1; }
/* off the trail, the names recede; on it, they hold; the chosen one leads */
.sky-node.trail { color: rgba(233, 230, 223, 0.74); }
.sky-node.dim { color: rgba(233, 230, 223, 0.42); }
.sky-node.on { color: var(--ink); font-weight: 500; }
.sky-cat:hover, .sky-node:hover { color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .sky-svg .trail.on, .sky-svg .ring.arrive { animation: none; } }
.sky-cat:focus-visible, .sky-node:focus-visible { outline: none; }
.sky-cat:focus-visible span, .sky-node:focus-visible span { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.sky-feature { position: absolute; left: 0; right: 0; top: 0; padding: 0 16px; text-align: center; transition: opacity 260ms ease; }
.sky-feature.swap { opacity: 0; transition-duration: 160ms; }
.sky-title { margin: 0; font-family: 'Source Serif 4', Georgia, serif; font-weight: 400; font-size: clamp(28px, 2.8vw, 54px); line-height: 1.1; letter-spacing: -0.01em; color: #f3eee6; }
.sky-view {
  display: inline-block; margin-top: 4px; padding: 8px 4px; pointer-events: auto; white-space: nowrap;
  font-size: clamp(14px, 1.1vw, 20px); color: var(--ink); text-decoration: none;
}
.sky-view:hover, .sky-view:focus-visible { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; outline: none; }
.sky.compact .sky-cat, .sky.compact .sky-node { font-size: 14px; padding: 10px 6px 10px 21px; min-height: 44px; display: flex; align-items: center; }
.sky.compact .sky-title { font-size: 22px; line-height: 1.15; }
.sky.compact .sky-view { margin-top: 2px; }
.section--sky { text-align: center; overflow: visible; background: none !important; box-shadow: none !important; }
.section--sky .section-body { display: none; }
.section--sky.section--projects > .back { position: fixed; top: 38px; right: var(--edge); left: auto; display: inline-block; padding: 0; background: none; font-size: 16px; }
.section--sky .section-title { margin: 4px 0 0; font-family: 'Source Serif 4', Georgia, serif; font-size: clamp(26px, 1.8vw, 34px); letter-spacing: -0.005em; }
@media (max-width: 720px) { .section--sky.section--projects > .back { top: 24px; font-size: 15px; } }
.section--projects { padding-right: 16px; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--ink-soft) transparent; }
.section--projects > .back { position: sticky; top: 0; z-index: 1; display: block; padding: 8px 0 14px; background: var(--paper); }
.section--research .section-title { font-size: clamp(25px, 2.5vw, 31px); margin: 14px 0 8px; letter-spacing: -0.015em; }
.section--research .back { font-size: 13px; color: var(--ink-soft); }
.section--research .research-statement { font-size: 17px; margin-bottom: 15px; }
.section--research .research-affiliation { font-size: 14px; margin-bottom: 3px; }
.section--research .research-date { font-size: 13px; margin: 0; }
.bead-note { position: fixed; left: 0; top: 0; margin: 0; z-index: 4; font-size: 12px; line-height: 1.3; letter-spacing: 0.01em; color: var(--ink-soft); white-space: nowrap; opacity: 0; transition: opacity 500ms ease; pointer-events: none; }
.bead-note.on { opacity: 0.9; }
/* on a phone the text sits over the faded form; give it paper to stand on */
body.portrait .section { background: rgba(var(--paper-rgb), 0.9); box-shadow: 0 0 22px 22px rgba(var(--paper-rgb), 0.9); }
body.portrait .section--cv { background: var(--paper); box-shadow: none; }
body.portrait .section--research { background: none; box-shadow: none; }

.reveal { opacity: 0; transition: opacity 250ms ease, transform 250ms ease; }
html[data-route='unfold'] .reveal { transform: translateY(8px); }
.section.show .reveal { opacity: 1; transform: none; }
.section.show .reveal:nth-child(2) { transition-delay: 60ms; }
.section.show .section-body > .reveal:nth-child(1) { transition-delay: 60ms; }
.section.show .section-body > .reveal:nth-child(2) { transition-delay: 120ms; }
.section.show .section-body > .reveal:nth-child(3) { transition-delay: 180ms; }
.section.show .section-body > .reveal:nth-child(4) { transition-delay: 240ms; }
.section.leaving .reveal { transition-duration: 140ms; transition-delay: 0ms !important; }

.fade-veil { position: fixed; inset: 0; background: var(--paper); opacity: 0; pointer-events: none; z-index: 7; transition: opacity 100ms linear; }
.fade-veil.on { opacity: 1; }

.demo-cursor { position: fixed; left: 0; top: 0; z-index: 9; pointer-events: none; will-change: transform; }
.demo-cursor.press svg { transform: scale(0.86); transform-origin: 2px 2px; }
.demo-cursor .ring {
  position: absolute; left: -13px; top: -13px; width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid var(--accent); opacity: 0; transform: scale(0.35); transition: transform 350ms linear, opacity 120ms ease;
}
.demo-cursor.holding .ring { opacity: 0.9; transform: scale(1); }

.noscript { position: fixed; left: var(--edge); bottom: 34px; max-width: 30em; }

/* cursors over the form: drag turns it, hold-then-drag brushes or pulls */
#stage { cursor: grab; }
body.grabbing #stage { cursor: grabbing; }
body.brushing #stage { cursor: crosshair; }
body.in-section #stage { cursor: default; }
body.in-section.spinnable #stage { cursor: grab; }
body.in-section.spinnable.grabbing #stage { cursor: grabbing; }
/* scroll mode: the form is not grabbed; a layer you can zoom into says so */
body.input-scroll #stage { cursor: default; }
body.input-scroll.near-layer #stage { cursor: zoom-in; }
body.input-scroll.grabbing #stage { cursor: grabbing; }
body.input-scroll.brushing #stage { cursor: crosshair; }
.section.peek .section-title, .section.peek .section-body { display: none; }
body.in-section.route-unfold #stage, body.in-section.route-hybrid #stage { cursor: pointer; }
.back.hint { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }

@media (max-width: 720px) {
  :root { --edge: 20px; --ui: 15px; --title: 30px; }
  .masthead { top: 20px; }
  .masthead .name { font-size: 30px; }
  .masthead .line { margin-top: 6px; }
  .masthead .bio { width: calc(100vw - 2 * var(--edge)); margin-top: 8px; font-size: 13.5px; line-height: 1.45; }
  .face-details { right: var(--edge); bottom: 66px; }
  .face-details dl { flex-direction: column; gap: 10px; }
  .face-details dl > div { display: grid; grid-template-columns: 80px minmax(0, 1fr); align-items: baseline; gap: 10px; }
  .face-details dt { margin-bottom: 0; }
  .section { max-height: 50vh; }
  .section--cv { padding-right: 12px; }
  .cv-content { font-size: 17px; }
  .cv-content h2 { font-size: 23px; }
  .cv-content h3 { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal, .face-details, .cv-timeline { transition-duration: 1ms !important; transform: none !important; }
}

/* ---------- a phone: the page scrolls ---------- */
/* one gesture: a vertical swipe anywhere moves the page, over the drawing too */
.runway, .index { display: none; }
html.phone-scroll, body.phone-scroll { height: auto; min-height: 100%; overflow-x: clip; overflow-y: auto; }
/* the masthead's soft clear zones must not widen the page once it scrolls with it */
body.phone-scroll .masthead::before { inset: -20px -12px -24px -20px; }
body.phone-scroll .masthead .bio::before { inset: -14px -8px -20px -20px; }
body.phone-scroll #stage { touch-action: pan-y pinch-zoom; }
body.phone-scroll .runway { display: block; }
body.phone-scroll .index {
  display: block; position: relative; z-index: 5; padding: 64px var(--edge) 96px;
  background: linear-gradient(to bottom, rgba(var(--paper-rgb), 0), var(--paper) 80px);
}
body.phone-scroll.in-section .runway, body.phone-scroll.in-section .index { display: none; }
.index-item { display: block; width: 100%; padding: 16px 0 17px; text-align: left; border-top: 1px solid rgba(233, 230, 223, 0.12); }
.index-item:last-child { border-bottom: 1px solid rgba(233, 230, 223, 0.12); }
.index-name { display: block; font-family: 'Source Serif 4', Georgia, serif; font-size: 24px; line-height: 1.2; color: var(--ink); }
.index-line { display: block; margin-top: 4px; font-size: 14px; line-height: 1.45; color: var(--ink-soft); }
/* as the index comes up, the names on the network give way */
body.phone-scroll .labels, body.phone-scroll .leaders { opacity: calc(1 - var(--cover, 0)); }
body.phone-scroll.covered .label { pointer-events: none !important; }
/* in a section the page is its text */
body.phone-scroll .section { position: absolute; max-height: none !important; overflow: visible; }
body.phone-scroll.in-section .masthead { position: absolute; }
body.phone-scroll .section:not(.section--sky) > .back { position: sticky; top: 0; z-index: 2; display: block; padding: 12px 0; background: var(--paper); }

/* the projects on a phone: the branches in a row, the chosen work under them, the names in one list that scrolls */
.sky-cats.row { position: absolute; left: 0; right: 0; bottom: auto; display: flex; align-items: center; justify-content: center; gap: 20px; }
.sky.compact .sky-cats.row .sky-cat { position: relative; transform: none; left: auto; top: auto; min-height: 40px; padding: 10px 2px 10px 14px; }
.sky.compact .sky-cat::before { content: ''; position: absolute; left: 2px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: currentColor; }
.sky-list {
  display: none; position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 20px 28px; overflow-y: auto; overscroll-behavior: contain;
  pointer-events: auto; transition: opacity 180ms ease;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 16px, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 16px, #000 calc(100% - 28px), transparent);
}
.sky.compact .sky-list { display: block; }
.sky-list.out { opacity: 0; }
.sky-row { position: relative; display: flex; align-items: center; width: 100%; min-height: 44px; padding: 8px 0 8px 22px; text-align: left; font-size: 15px; line-height: 1.3; color: rgba(233, 230, 223, 0.6); }
.sky-row::before { content: ''; position: absolute; left: 5px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: currentColor; }
.sky-row.on { color: var(--ink); font-weight: 500; }
.sky-row.on::before { background: var(--ink); box-shadow: 0 0 0 3px var(--paper), 0 0 0 4px var(--trail); }
