/* ---------- Homepage: an empty room, one floor, and everybody who is here ---------- */
body[data-seo-page="home"] {
  --font-hack: "Tektur", "Eurostile", "Arial Narrow", sans-serif;
  --code: clamp(13px, 1.02vw, 18px);
  --person: clamp(72px, 12.5svh, 116px);
  --paper: #efefee;
}
html[data-theme="dark"] body[data-seo-page="home"] { --paper: #070708; }
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* top right: theme and language */
body[data-seo-page="home"] .site-header {
  z-index: 20;
  top: 24px;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 0 24px;
  pointer-events: none;
}
body[data-seo-page="home"] .site-header > * { pointer-events: auto; }
body[data-seo-page="home"] .site-header .logo { display: none; }
body[data-seo-page="home"] .lang-switch button,
body[data-seo-page="home"] .lang-switch span,
.walker-you,
.walker-say,
.walker.pose-sleep::after,
.code {
  font: 500 var(--code) / 1.03 var(--font-hack);
  letter-spacing: -0.06em;
  word-spacing: 0.14em;
  text-transform: uppercase;
}
body[data-seo-page="home"] .lang-switch { align-items: baseline; }
body[data-seo-page="home"] .lang-switch .theme-toggle { display: block; width: auto; height: auto; margin: 0 14px 0 0; padding: 0; border: 0; border-radius: 0; background: none; color: var(--ink); }
body[data-seo-page="home"] .theme-toggle svg { display: none !important; }
body[data-seo-page="home"] .theme-toggle::after { content: "Dark"; }
html[data-theme="dark"] body[data-seo-page="home"] .theme-toggle::after { content: "Light"; }
body[data-seo-page="home"] .lang-switch button:hover { text-decoration: underline; text-underline-offset: 3px; }

/* the room */
body[data-seo-page="home"] .hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  max-height: none;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  color: var(--ink);
  --ink: #0b0b0c;
  background: linear-gradient(180deg, var(--paper) 62%, var(--bg) 100%);
  touch-action: pan-y;
  user-select: none;
}
html[data-theme="dark"] body[data-seo-page="home"] .hero { --ink: #f3f3f4; background: linear-gradient(180deg, var(--paper) 62%, var(--bg) 100%); }

/* source text, scattered */
.code { position: absolute; z-index: 6; margin: 0; padding: 0; color: var(--ink); list-style: none; text-align: left; }
.code p { margin: 0; }
.code-name { top: 24px; left: 24px; }
.code-who { top: 24px; left: 64vw; padding-left: 14px; border-left: 6px solid currentColor; min-height: 3.1em; }
.code-who[hidden] { display: none; }
.code-menu { left: 24px; bottom: calc(var(--person) + 74px); }
.code-nav a { display: table; padding: 0 0.28em; margin-left: -0.28em; color: inherit; text-decoration: none; }
.code-nav a:hover, .code-nav a:focus-visible { background: var(--ink); color: var(--paper); outline: 0; }
.prompt { position: relative; display: table; min-width: 10em; margin-top: 0.5em; cursor: text; }
.prompt input { position: absolute; inset: -8px 0; width: 100%; padding: 0; border: 0; opacity: 0; font-size: 16px; user-select: text; -webkit-user-select: text; }
.prompt:focus-within { outline: 1px dashed currentColor; outline-offset: 5px; }
.prompt .is-hint { opacity: 0.62; }
.caret { display: inline-block; width: 0.5em; height: 0.86em; margin-left: 0.22em; vertical-align: -0.06em; background: currentColor; animation: caret 1.1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.code-log { left: 64vw; bottom: calc(var(--person) + 74px); max-width: calc(36vw - 24px); pointer-events: none; }
.code-log li { opacity: 0.6; }
.code-log li:nth-last-child(2) { opacity: 0.8; }
.code-log li:last-child { opacity: 1; }

/* there is more below */
.code-scroll { left: 50%; bottom: calc(var(--person) + 74px); translate: -50% 0; display: flex; align-items: center; gap: 0.5em; color: inherit; text-decoration: none; transition: opacity 0.3s ease; }
.code-scroll svg { width: 0.62em; height: 0.72em; fill: currentColor; animation: cue 1.4s steps(3) infinite; }
.code-scroll:hover, .code-scroll:focus-visible { background: var(--ink); color: var(--paper); outline: 0; box-shadow: 0 0 0 4px var(--ink); }
.code-scroll.is-gone { opacity: 0; visibility: hidden; }
@keyframes cue { 0% { transform: translateY(-3px); } 60%, 100% { transform: translateY(3px); } }

/* the legend */
body[data-seo-page="home"] .lang-switch .help-open { order: -1; margin-right: 14px; padding: 0 0.42em; border: 0; background: var(--ink); color: var(--paper); opacity: 1; }
body[data-seo-page="home"] .lang-switch .help-open:hover { text-decoration: none; outline: 2px solid var(--ink); outline-offset: 2px; }
.help {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 26px 28px 24px;
  overflow: auto;
  border: 0;
  border-left: 7px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font: 500 14px/1.36 var(--font-hack);
  letter-spacing: -0.045em;
  word-spacing: 0.1em;
  text-align: left;
}
.help::backdrop { background: rgba(0, 0, 0, 0.55); }
html[data-theme="dark"] .help { --paper: #151517; --ink: #f3f3f4; }
.help, .help * { cursor: default !important; }
.help button { cursor: pointer !important; }
.help h2 { margin: 0 36px 14px 0; font: 500 19px/1.1 var(--font-hack); text-transform: uppercase; }
.help h3 { margin: 18px 0 8px; font: 500 13px/1.1 var(--font-hack); text-transform: uppercase; opacity: 0.66; }
.help p { margin: 0 0 10px; max-width: 52ch; }
.help .help-small { margin-top: 18px; font-size: 12.5px; opacity: 0.72; }
.help-words { display: flex; flex-wrap: wrap; gap: 6px; }
.help button { padding: 5px 9px 6px; border: 1px solid currentColor; border-radius: 0; background: none; color: inherit; font: 500 13px/1 var(--font-hack); letter-spacing: -0.04em; text-transform: uppercase; }
.help button:hover, .help button:focus-visible { background: var(--ink); color: var(--paper); outline: 0; }
.help .help-close { position: absolute; top: 20px; right: 20px; padding: 5px 10px 7px; }

/* the sphere of dots: people come out of it */
.orb { position: absolute; z-index: 4; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* the floor and the people */
.walkers {
  position: absolute;
  z-index: 5;
  left: 24px;
  right: 24px;
  bottom: 10px;
  height: var(--person);
  pointer-events: none;
}
.walker { position: absolute; left: 0; bottom: 0; height: 100%; aspect-ratio: 2 / 3; color: #8b8e95; transform-origin: 50% 100%; will-change: transform; }
.walker.is-me { color: var(--ink); z-index: 2; }
.walker-hop, .walker-turn { width: 100%; height: 100%; transform-origin: 50% 100%; }
.walker svg { display: block; width: 100%; height: 100%; overflow: visible; }
.walker:not(.is-walking) :is(.walker-body, .walker-arm, .walker-leg) { animation: none; }
.walker.is-walking :is(.walker-body, .walker-arm, .walker-leg) { animation-duration: 0.4s; }
.walker.is-running :is(.walker-body, .walker-arm, .walker-leg) { animation-duration: 0.24s; }
.walker.is-air .walker-arm-front { transform: rotate(-128deg); }
.walker.is-air .walker-arm-back { transform: rotate(118deg); }
.walker.is-air .walker-leg-front { transform: rotate(-24deg); }
.walker.is-air .walker-leg-back { transform: rotate(26deg); }
.walker.is-air .walker-you, .walker:has(.walker-say) .walker-you, .walker.pose-sleep .walker-you { visibility: hidden; }
/* what people say and do */
.walker-say { position: absolute; z-index: 3; left: 50%; bottom: calc(100% + 8px); translate: -50% 0; padding: 0.12em 0.4em 0.16em 0.36em; background: var(--ink); color: var(--paper); white-space: nowrap; animation: walker-say 3.4s ease both; }
@keyframes walker-say { 0% { opacity: 0; transform: translateY(8px) scale(0.7); } 6%, 88% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.walker.pose-wave .walker-arm-front { animation: pose-wave 0.34s ease-in-out infinite alternate; transform: rotate(-118deg); }
@keyframes pose-wave { from { transform: rotate(-136deg); } to { transform: rotate(-92deg); } }
.walker.pose-dance .walker-body { animation: pose-bob 0.26s ease-in-out infinite alternate; }
.walker.pose-dance .walker-arm-front { animation: pose-arm 0.52s ease-in-out infinite alternate; }
.walker.pose-dance .walker-arm-back { animation: pose-arm 0.52s ease-in-out -0.52s infinite alternate-reverse; }
.walker.pose-dance .walker-leg-front { animation: pose-leg 0.52s ease-in-out infinite alternate; }
.walker.pose-dance .walker-leg-back { animation: pose-leg 0.52s ease-in-out infinite alternate-reverse; }
.walker.pose-dance svg { animation: pose-sway 0.52s ease-in-out infinite alternate; transform-origin: 50% 100%; }
@keyframes pose-bob { to { transform: translateY(-9px); } }
@keyframes pose-arm { from { transform: rotate(-150deg); } to { transform: rotate(-30deg); } }
@keyframes pose-leg { from { transform: rotate(-16deg); } to { transform: rotate(14deg); } }
@keyframes pose-sway { from { transform: rotate(-7deg); } to { transform: rotate(7deg); } }
.walker.pose-sit .walker-body { transform: translateY(43px); }
.walker.pose-sit .walker-leg { transform: rotate(-84deg); }
.walker.pose-sit .walker-arm { transform: rotate(-14deg); }
.walker.pose-sleep svg { transform: translate(74%, -13%) rotate(-90deg); transform-origin: 50% 100%; transition: transform 0.5s cubic-bezier(0.5, 0, 0.6, 1); }
.walker.pose-sleep::after { content: "zzz"; position: absolute; left: 50%; bottom: 46%; translate: -50% 0; animation: pose-zzz 2.4s ease-in-out infinite; }
@keyframes pose-zzz { 0% { opacity: 0; transform: translateY(8px); } 50% { opacity: 1; } 100% { opacity: 0; transform: translateY(-10px); } }
.walker-you { position: absolute; left: 50%; bottom: calc(100% + 8px); translate: -50% 0; animation: walker-you 7s ease both; }
@keyframes walker-you { 0%, 12% { opacity: 0; } 20%, 82% { opacity: 1; } 100% { opacity: 0; } }

/* the about section no longer has a picture next to it */
body[data-seo-page="home"] .about-preview { grid-template-columns: minmax(0, 720px); justify-content: center; }

@media (max-width: 620px) {
  .code-who { top: 84px; left: 24px; }
  .code-scroll { left: auto; right: 24px; bottom: calc(var(--person) + 188px); translate: none; }
  .help { padding: 22px 20px 20px; }
  .help button { padding: 8px 10px 9px; }
  .prompt { min-width: 7.5em; }
  .code-log { left: 46vw; right: 24px; max-width: none; font-size: 12px; }
  .code-nav a { padding-block: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .code-scroll svg, .walker-you, .walker-say, .caret, .walker[class*="pose-"] *, .walker.pose-sleep::after { animation: none !important; }
}

/* ---------- The portrait of dust: a quiet first screen with my name, my work and nothing else ---------- */
body[data-seo-page="home"] { --m: clamp(20px, 4.6vw, 80px); }
html[data-theme="dark"] body[data-seo-page="home"] { --paper: #27262b; }
body[data-seo-page="home"] .hero-dust { background: var(--paper); }
html[data-theme="dark"] body[data-seo-page="home"] .hero-dust { background: linear-gradient(180deg, var(--paper) 80%, var(--bg) 100%); }
.dust { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.dust-side, .dust-nav a, .dust-menu, .dust-scroll,
body[data-seo-page="home"] .lang-switch button,
body[data-seo-page="home"] .lang-switch span {
  font: 400 clamp(15px, 1.3vw, 21px) / 1.2 "DM Sans", Arial, sans-serif;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--ink);
}
.dust-side { position: absolute; z-index: 2; top: 50%; margin: 0; translate: 0 -50%; }
.dust-name { left: var(--m); }
.dust-role { right: var(--m); text-align: right; }
.dust-nav { position: absolute; z-index: 3; top: clamp(20px, 3vw, 40px); left: var(--m); display: flex; gap: 1.4em; }
body[data-seo-page="home"] .site-header { top: clamp(20px, 3vw, 40px); padding: 0 var(--m); }
.dust-nav a, .dust-scroll { text-decoration: none; opacity: 0.62; transition: opacity 0.25s ease; }
.dust-nav a:hover, .dust-nav a:focus-visible, .dust-scroll:hover, .dust-scroll:focus-visible { opacity: 1; outline: 0; text-decoration: underline; text-underline-offset: 4px; }
body[data-seo-page="home"] .lang-switch button { opacity: 0.62; }
body[data-seo-page="home"] .lang-switch button.is-active, body[data-seo-page="home"] .lang-switch button:hover { opacity: 1; }
.dust-scroll { position: absolute; z-index: 3; bottom: clamp(20px, 3vw, 40px); right: var(--m); }
@media (max-width: 700px) {
  .dust-side { top: 96px; translate: none; }
  .dust-scroll { right: auto; left: 50%; translate: -50% 0; bottom: 20px; }
}
.hero-dust .dust-side, .hero-dust .dust-nav, .hero-dust .dust-scroll, body[data-seo-page="home"] .site-header { transition: opacity 0.9s ease; }
.hero-dust.is-intro:not(.is-ready) :is(.dust-side, .dust-nav, .dust-scroll) { opacity: 0; }
html[data-theme="dark"] body[data-seo-page="home"] .hero-dust { --ink: #e8e8ea; }
/* the menu: one word, a short list under it */
.dust-nav { display: block; }
.dust-menu { display: inline-flex; gap: 0.5em; padding: 0; border: 0; background: none; cursor: pointer; opacity: 0.62; transition: opacity 0.25s ease; }
.dust-menu span { display: inline-block; width: 0.7em; text-align: center; }
.dust-menu:hover, .dust-menu:focus-visible, .dust-menu[aria-expanded="true"] { opacity: 1; outline: 0; }
.dust-menu:focus-visible { text-decoration: underline; text-underline-offset: 4px; }
.dust-list { margin: 0.7em 0 0; padding: 0; list-style: none; display: grid; gap: 0.35em; animation: dust-list 0.35s ease both; }
.dust-list[hidden] { display: none; }
.dust-list a { opacity: 0.62; }
@keyframes dust-list { from { opacity: 0; transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .dust-list { animation: none; } }
.dust-list, .dust-list li { text-align: left; justify-items: start; }
.dust-list li { margin: 0; padding: 0; }
@media (max-width: 700px) {
  /* on a phone the list falls over the name: the name steps aside while it is open */
  .dust-nav:has(.dust-list:not([hidden])) ~ .dust-side { opacity: 0; }
}

/* ---------- About: one big sentence that lights up while you scroll, three small facts ---------- */
body[data-seo-page="home"] .about-statement {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
  gap: clamp(28px, 6vw, 110px);
  align-items: start;
  max-width: none;
  padding: clamp(110px, 16vh, 200px) var(--m) clamp(90px, 13vh, 160px);
  background: #27262b;
  color: #e8e8ea;
}
.about-label { margin: 0.6em 0 0; font: 400 clamp(13px, 1vw, 15px) / 1.3 "DM Sans", Arial, sans-serif; letter-spacing: -0.01em; color: rgba(232, 232, 234, 0.55); }
.about-num { margin-right: 0.4em; }
.about-big { max-width: 22ch; margin: 0; font: 400 clamp(30px, 4.3vw, 68px) / 1.12 "DM Sans", Arial, sans-serif; letter-spacing: -0.04em; color: #e8e8ea; }
.about-big.is-split .w { opacity: calc(0.16 + 0.84 * var(--lit, 0)); transition: opacity 0.15s linear; }
.about-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--m); margin: clamp(56px, 8vh, 96px) 0 0; padding-top: 18px; border-top: 1px solid rgba(232, 232, 234, 0.16); }
.about-facts div { margin: 0; }
.about-facts dt { margin-bottom: 6px; font-size: 13px; color: rgba(232, 232, 234, 0.5); }
.about-facts dd { margin: 0; font-size: clamp(15px, 1.2vw, 18px); color: #e8e8ea; }
body[data-seo-page="home"] .about-statement .about-preview-link { margin-top: clamp(40px, 6vh, 64px); color: #e8e8ea; }
@media (max-width: 700px) {
  body[data-seo-page="home"] .about-statement { grid-template-columns: 1fr; gap: 24px; }
  .about-big { max-width: none; }
  .about-facts { grid-template-columns: 1fr; gap: 16px; }
}
.about-statement :is(.about-facts, .about-preview-link, .about-big, .about-label) { text-shadow: none; word-spacing: normal; }
.about-statement :is(.about-facts, .about-preview-link) { letter-spacing: -0.005em; }
html[data-theme="dark"] body[data-seo-page="home"] .hero-dust { background: #27262b; }   /* one surface with the about section below */
.dust-online { margin-top: 0.5em !important; padding-top: 0.55em !important; border-top: 1px solid rgba(232, 232, 234, 0.16); font: 400 clamp(13px, 1vw, 15px) / 1.2 "DM Sans", Arial, sans-serif; color: rgba(232, 232, 234, 0.55); }
.dust-online #onlineCount { color: #e8e8ea; font-variant-numeric: tabular-nums; }

/* ---------- Toolkit and selected projects: their own design, only the colours of the homepage ---------- */
body[data-seo-page="home"] :is(.toolkit, .selected-work) { background: #27262b; color: #e8e8ea; }
body[data-seo-page="home"] :is(.toolkit-heading h2, .selected-work-heading h2, .selected-work-title, .tool-tile span) { color: #e8e8ea; }
body[data-seo-page="home"] :is(.toolkit-eyebrow, .toolkit-intro, .selected-work-eyebrow) { color: rgba(232, 232, 234, 0.58); }
html[data-theme="dark"] body[data-seo-page="home"], html[data-theme="dark"] body[data-seo-page="home"] main { background: #27262b; }   /* no darker strips beside narrower sections */
/* each chapter a shade apart, so you feel where one stops and the next begins */
body[data-seo-page="home"] .toolkit { background: #1c1c1c; }   /* the colour of the footer */
html[data-theme="dark"] body[data-seo-page="home"], html[data-theme="dark"] body[data-seo-page="home"] main, body[data-seo-page="home"] .selected-work { background: #222126; }
