/* richardsondaniel.com, English site (redesign B, round 3). Our own code; behaviour modelled on astapable.com. */

@font-face {
  font-family: "General Sans";
  src: url("/fonts/GeneralSans-Variable.woff2") format("woff2");
  font-weight: 200 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --page: #fbfbfb;
  --ink: #1c1c1c;
  --ink-2: #4a4a4a;
  --muted: #6e6e6e;
  --grey: #cdcdcd;
  --line: #e2e2e2;
  --chip: #eaeaea;
  --panel: #f1f1f0;
  --white: #fff;
  --live: #2fae6b;
  --g: 1.23em;                                  /* 16px at the base size */
  --main: cubic-bezier(.65, .01, .05, .99);     /* the site's default ease */
  --menu: cubic-bezier(.5, .5, 0, 1);
  --cur: cubic-bezier(.625, .05, 0, 1);
  --dock: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}

/* Fluid root size: the whole layout is in em and scales with the window */
html { font-size: calc(100vw / 1244 * 13); -webkit-text-size-adjust: 100%; }
@media (max-width: 980px) { html { font-size: calc(100vw / 375 * 11); } }
@media (max-width: 480px) { html { font-size: calc(100vw / 375 * 16); } }

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font-family: "General Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem; line-height: 1.45; font-weight: 400;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
@supports (overflow: clip) { body { overflow-x: clip; } }
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--ink); color: var(--page); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: .2em; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1em; top: -4em; z-index: 200; background: var(--ink); color: var(--page); padding: .7em 1em; border-radius: .3em; }
.skip:focus { top: 1em; }
.ico { width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.u { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; text-decoration-color: var(--grey); }
.u:hover { text-decoration-color: var(--ink); }
.scr { display: inline-block; white-space: nowrap; }
.cmt { color: var(--grey); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  height: 2.75em; padding: 0 1.1em; border-radius: .3em; border: 1px solid transparent;
  font-size: 1em; font-weight: 500; white-space: nowrap;
  transition: background-color .25s var(--main), color .25s var(--main), border-color .25s var(--main);
}
.btn--dark { background: var(--ink); color: var(--white); }
.btn--dark:hover { background: #000; }
.btn--line { background: var(--page); color: var(--ink); border-color: var(--grey); }
.btn--line:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.btn--block { width: 100%; }
.icon-btn {
  display: inline-grid; place-items: center; width: 2.6em; height: 2.6em; border-radius: .3em;
  border: 1px solid var(--line); background: var(--page); color: var(--ink);
  transition: border-color .4s var(--main);
}
.icon-btn .ico { transition: transform .4s var(--main); }
.icon-btn:hover { border-color: var(--ink); }
.icon-btn:hover .ico { transform: scale(1.12); }
.pill { display: inline-flex; align-items: center; height: 2em; padding: 0 .7em; border-radius: .3em; background: var(--chip); font-size: .85em; color: var(--ink); }
.chip-link {
  display: inline-flex; align-items: center; gap: .35em; height: 2.2em; padding: 0 .75em; border-radius: .3em;
  border: 1px solid var(--line); background: var(--white); font-size: .9em; font-weight: 500;
  transition: border-color .25s, background-color .25s, color .25s;
}
.chip-link .ico { width: 1em; height: 1em; }
.chip-link:hover { background: var(--ink); border-color: var(--ink); color: var(--white); }
.live { display: inline-block; width: .55em; height: .55em; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 0 rgba(47, 174, 107, .5); animation: live 2.4s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 .45em rgba(47, 174, 107, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 174, 107, 0); } }

/* ---------- nav ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 100; display: flex; align-items: center; justify-content: space-between; gap: 1em; padding: var(--g); pointer-events: none; }
.nav > * { pointer-events: auto; }
.nav__brand { display: inline-flex; align-items: center; gap: .9em; }
.nav__name { font-weight: 600; font-size: 1.25em; letter-spacing: -.02em; }
.nav__links { position: absolute; left: 50%; transform: translateX(-50%); display: flex; gap: 2.4em; }
.nav__link { font-size: 1.1em; padding: .4em 0; }
.nav__right { display: flex; align-items: center; gap: .5em; }
.nav__div { width: 1px; height: 1.6em; background: var(--line); margin: 0 .6em; }
.nav__cta { height: 2.6em; }
.burger { display: none; width: 2.6em; height: 2.6em; border-radius: .3em; border: 1px solid var(--line); background: var(--page); position: relative; }
.burger span, .menu__x span { position: absolute; left: 30%; right: 30%; top: 50%; height: 1.5px; background: var(--ink); transition: transform .7s var(--menu); }
.burger span:first-child { transform: translateY(-.2em); }
.burger span:last-child { transform: translateY(.2em); }
@media (hover: hover) and (pointer: fine) {
  .burger:hover span:first-child { transform: translateY(.2em); }
  .burger:hover span:last-child { transform: translateY(-.2em); }
}
.menu, .menu__backdrop { display: none; }

@media (max-width: 980px) {
  .nav__links, .nav .icon-btn, .nav__div { display: none; }
  .nav__right > .icon-btn { display: none; }
  .burger { display: inline-block; }
  .menu__backdrop { display: block; position: fixed; inset: 0; background: var(--ink); opacity: 0; visibility: hidden; transition: all .7s var(--menu); z-index: 0; }
  .menu {
    display: flex; flex-direction: column; gap: 1.4em; position: fixed; top: var(--g); right: var(--g); z-index: 1;
    width: min(26em, calc(100vw - 2 * var(--g))); padding: 1.4em; border-radius: .5em; background: var(--page);
    box-shadow: 0 1.5em 3em -1.5em rgba(0, 0, 0, .35);
    transform-origin: top right; transform: scale(.15) rotate(.001deg); opacity: 0; visibility: hidden;
    transition: opacity .5s var(--menu), visibility .5s var(--menu), transform .7s var(--menu);
  }
  [data-nav-status="open"] .menu { transform: scale(1) rotate(.001deg); opacity: 1; visibility: visible; }
  [data-nav-status="open"] .menu__backdrop { opacity: .33; visibility: visible; }
  .menu__top { display: flex; align-items: center; justify-content: space-between; }
  .menu__label { font-size: .9em; color: var(--muted); }
  .menu__x { position: relative; width: 2.4em; height: 2.4em; }
  .menu__x span:first-child { transform: rotate(45deg); }
  .menu__x span:last-child { transform: rotate(-45deg); }
  .menu__list a { display: flex; align-items: center; justify-content: space-between; font-size: 2.4em; font-weight: 600; letter-spacing: -.03em; line-height: 1.15; }
  .menu__list a[aria-current] { opacity: .33; }
  .menu__list i { width: .22em; height: .22em; border-radius: 50%; background: var(--ink); transform: scale(0); transition: transform .7s var(--menu); }
  .menu__list a[aria-current] i { transform: scale(1); opacity: 1; }
  .menu__icons { display: flex; align-items: center; gap: .5em; padding-top: 1.2em; border-top: 1px solid var(--line); }
  .menu__icons .icon-btn { display: inline-grid; }
  .menu__ja { margin-left: auto; font-size: .95em; color: var(--muted); }
}

/* ---------- hero ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 34em; display: flex; flex-direction: column; justify-content: flex-end; padding: var(--g); }
.hero__stage { position: absolute; inset: 4.5em var(--g) 9em; display: grid; place-items: center; pointer-events: none; }
.hero__loop {
  height: 100%; width: auto; max-width: 100%; object-fit: contain;
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 66%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 66%, transparent 100%);
}
.hero__text { position: relative; max-width: 30em; }
.h1 { font-size: 3em; font-weight: 600; letter-spacing: -.035em; line-height: 1; }
.hero__intro { margin-top: .7em; font-size: 1.35em; line-height: 1.35; font-weight: 400; color: var(--ink-2); max-width: 22em; }
@media (max-width: 760px) {
  .hero__stage { inset: 4.5em 0 12em; }
}

/* ---------- sections ---------- */
.section { padding: 7em var(--g) 2em; }
.sh { text-align: center; font-size: 2.5em; font-weight: 500; letter-spacing: -.03em; color: var(--grey); margin-bottom: 1.3em; }
.section__sub { text-align: center; color: var(--muted); font-size: 1.15em; margin: -1.6em 0 2.4em; }

/* ---------- placeholders and media slots ---------- */
.slot { position: relative; overflow: hidden; background: var(--panel); }
.slot__media { width: 100%; height: 100%; object-fit: cover; }
.r-16x9 { aspect-ratio: 16 / 9; }
.r-4x3 { aspect-ratio: 4 / 3; }
.r-1x1 { aspect-ratio: 1 / 1; }
.r-3x4 { aspect-ratio: 3 / 4; }
.r-auto { height: 100%; min-height: 10em; }
.slot--empty {
  display: grid; place-items: center; padding: 1em;
  background:
    linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%) -150% 0 / 200% 100% no-repeat,
    repeating-linear-gradient(135deg, var(--panel) 0 .8em, #ebebe9 .8em calc(.8em + 1px));
  animation: shimmer 4.5s var(--main) infinite;
}
@keyframes shimmer { 0%, 30% { background-position: -150% 0, 0 0; } 100% { background-position: 250% 0, 0 0; } }
.slot__tag {
  display: inline-flex; align-items: center; gap: .5em; max-width: 100%; padding: .55em .9em; border-radius: 999px;
  background: var(--white); border: 1px solid var(--line); color: var(--muted); font-size: .85em; line-height: 1.25; text-align: left;
}
.slot__tag .ico { width: 1.15em; height: 1.15em; color: var(--ink-2); }
.slot--round { border-radius: 50%; }
.slot--round.slot--empty .slot__tag { font-size: .75em; max-width: 80%; }
.tslot { display: grid; gap: .55em; padding: 1em; border: 1px dashed var(--grey); border-radius: .4em; }
.tslot__lines { display: grid; gap: .45em; }
.tslot__lines i { display: block; height: .55em; border-radius: .3em; background: var(--chip); }
.tslot__lines i:nth-child(2) { width: 88%; }
.tslot__lines i:nth-child(3) { width: 60%; }
.tslot__label { display: inline-flex; align-items: center; gap: .45em; color: var(--muted); font-size: .85em; }
.tslot__label .ico { width: 1.1em; height: 1.1em; }

/* ---------- featured work ---------- */
.work { display: grid; grid-template-columns: 1fr 1fr; gap: 3.2em .75em; }
.work--collapsed .work__item--more { display: none; }
.work__more { display: flex; justify-content: center; margin-top: 3.2em; }
.work__more[hidden] { display: none; }
.case-card { display: block; }
.case-card__cover { position: relative; }
.case-card__logo { position: absolute; left: .9em; bottom: .9em; width: 2.9em; height: 2.9em; border-radius: .6em; box-shadow: 0 .4em 1em -.4em rgba(0, 0, 0, .35); }
.tags { display: flex; flex-wrap: wrap; gap: .4em; margin-top: 1em; }
.tags li { height: 1.9em; display: inline-flex; align-items: center; padding: 0 .55em; border-radius: .25em; background: var(--chip); font-size: .85em; }
.case-card__title { margin-top: .6em; font-size: 1.55em; font-weight: 600; letter-spacing: -.03em; }
.case-card__text { margin-top: .25em; color: var(--ink-2); max-width: 32em; }
@media (max-width: 760px) { .work { grid-template-columns: 1fr; } }

/* ---------- cursor label ---------- */
.cursor { position: fixed; left: 0; top: 0; z-index: 150; pointer-events: none; }
.cursor__pill {
  display: inline-flex; align-items: center; gap: .3em; height: 2.3em; padding: 0 .55em 0 .8em; margin: .9em 0 0 .9em;
  border-radius: .3em; background: var(--ink); color: var(--white); font-size: .95em; white-space: nowrap;
  opacity: 0; transform: translateX(0%) scale(.8) rotate(.001deg);
  transition: transform .4s var(--cur), opacity .2s ease .1s, margin .4s var(--cur);
}
.cursor__chev { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.cursor[data-cursor="active"] .cursor__pill { opacity: 1; transform: translateX(0%) scale(1) rotate(.001deg); transition: transform .4s var(--cur), opacity .2s ease 0s; }
.cursor[data-cursor="active-edge"] .cursor__pill { opacity: 1; margin-left: -.9em; transform: translateX(-100%) scale(1) rotate(.001deg); transition: transform .4s var(--cur), opacity .2s ease 0s, margin .4s var(--cur); }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ---------- live apps: astapable-style card in a frosted shelf ---------- */
.apps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4em 1em; max-width: 84em; margin: 0 auto; }
.app { position: relative; height: 20.5em; width: 100%; max-width: 26em; margin: 0 auto; }
.app__card {
  position: absolute; left: 50%; top: 0; width: 15em; margin-left: -7.5em; z-index: 0;
  border-radius: 1.5em; overflow: hidden; background: var(--white); box-shadow: 0 .8em 1.6em -1.2em rgba(0, 0, 0, .25);
  will-change: transform;
}
.app__cover { position: relative; height: 10.4em; background: var(--app-c, #888); }
.app__cover::after { content: ""; position: absolute; left: 0; right: 0; top: 7.1em; bottom: -1em; background: var(--white); border-radius: 2.6em 2.6em 0 0; }
.app__tile { position: absolute; z-index: 1; width: 6.2em; height: 6.2em; object-fit: cover; border-radius: 1.2em; border: .3em solid var(--white); background: var(--white); box-shadow: 0 .5em 1.1em -.4em rgba(0, 0, 0, .35); transition: transform .5s var(--main); }
.app__tile--back { left: 2.6em; top: 1.9em; transform: rotate(6deg); }
.app__tile--front { left: 6.3em; top: 3.9em; transform: rotate(-6deg); }
.app:hover .app__tile--back { transform: rotate(3deg) translateY(-.2em); }
.app:hover .app__tile--front { transform: rotate(-9deg) translateY(-.3em); }
.app__body { position: relative; z-index: 1; padding: 0 1.25em 2.5em; margin-top: -.2em; background: var(--white); display: grid; gap: .5em; }
.app__title { font-size: 1.5em; font-weight: 600; letter-spacing: -.03em; line-height: 1.1; }
.app__text { color: var(--ink); font-size: .95em; line-height: 1.4; }
.app__shelf {
  position: absolute; left: 50%; bottom: 0; width: 18.75em; margin-left: -9.375em; height: 8em; z-index: 1;
  border-radius: 0 0 1.5em 1.5em; background: rgba(251, 251, 251, .2);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, .6); border-top: 0;
  box-shadow: 0 1em 1.4em -1.2em rgba(0, 0, 0, .25), inset 0 -1px 0 rgba(0, 0, 0, .04);
}
.app__links { position: absolute; left: 1.2em; bottom: 1.2em; right: 4.4em; display: flex; flex-wrap: wrap; gap: .3em; opacity: 0; transform: translateY(.4em); transition: opacity .3s var(--main), transform .4s var(--main); }
.app__chip { display: inline-flex; align-items: center; height: 1.9em; padding: 0 .65em; border-radius: 999px; background: var(--white); border: 1px solid var(--line); font-size: .8em; font-weight: 500; transition: background-color .2s, color .2s; }
.app__chip:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.app:hover .app__links, .app:focus-within .app__links { opacity: 1; transform: none; }
.app__arrow { position: absolute; right: .9em; bottom: .9em; display: grid; place-items: center; width: 2.5em; height: 2.5em; border-radius: 50%; background: var(--white); color: var(--ink); box-shadow: 0 .3em .8em -.3em rgba(0, 0, 0, .3); transition: background-color .25s, color .25s; }
.app__arrow .ico { width: 1.1em; height: 1.1em; }
.app__arrow:hover { background: var(--ink); color: var(--white); }
@media (max-width: 991px) {
  .apps { grid-template-columns: 1fr; gap: 3em; }
  .app { height: auto; max-width: 20em; }
  .app__card { position: relative; left: auto; margin: 0 auto; }
  .app__shelf { position: relative; left: auto; width: 15em; margin: -.6em auto 0; height: auto; padding: 1em 3.6em 1em 1em; border-radius: 0 0 1.5em 1.5em; background: var(--white); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .app__links { position: static; opacity: 1; transform: none; }
}

/* ---------- services ---------- */
.svcs { max-width: 72em; margin: 0 auto; border-top: 1px solid var(--line); }
.svc { display: grid; grid-template-columns: 4em 1fr 1.4fr; gap: 1.2em 2em; padding: 2em 0; border-bottom: 1px solid var(--line); }
.svc__n { color: var(--grey); font-size: 1.2em; font-weight: 500; font-variant-numeric: tabular-nums; }
.svc__when { color: var(--muted); font-size: .9em; }
.svc__title { font-size: 1.8em; font-weight: 600; letter-spacing: -.035em; line-height: 1.05; margin-top: .2em; }
.svc__body { display: grid; gap: .7em; color: var(--ink-2); font-size: 1.05em; }
.svc__fit b { color: var(--ink); font-weight: 600; }
@media (max-width: 760px) { .svc { grid-template-columns: 1fr; gap: .6em; } .svc__n { display: none; } }

/* ---------- footer ---------- */
.footer { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; padding: 0 var(--g) var(--g); margin-top: 4em; }
.footer__cta { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2em; padding: 5em 0 3em; text-align: center; }
.cta { font-size: 4.6em; font-weight: 600; letter-spacing: -.045em; line-height: 1.02; display: flex; flex-direction: column; align-items: center; }
.cta__line { display: inline-flex; align-items: center; gap: .25em; }
.cta__arrow { width: .9em; height: .9em; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: square; }
.cta__word { display: inline-block; min-width: 4.6ch; text-align: left; white-space: nowrap; }
.footer__btns { display: flex; gap: .6em; justify-content: center; flex-wrap: wrap; }
.footer__bottom { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 1.5em; font-size: .95em; }
.footer__note { color: var(--muted); display: grid; gap: .3em; }
.footer__summary { text-align: center; display: grid; gap: .1em; }
.footer__summary p:first-child { font-weight: 600; }
.footer__status { display: inline-flex; align-items: center; justify-content: center; gap: .5em; margin-top: .6em; color: var(--ink-2); }
.clock { margin-top: .4em; font-weight: 600; font-variant-numeric: tabular-nums; }
.footer__right { display: flex; justify-content: flex-end; }
.sound { display: inline-flex; align-items: center; gap: .45em; height: 2.4em; padding: 0 .8em; border-radius: .3em; border: 1px solid var(--line); color: var(--ink-2); font-size: .9em; transition: border-color .25s; }
.sound:hover { border-color: var(--ink); }
.sound .ico { width: 1.15em; height: 1.15em; }
.sound__off, .sound[aria-pressed="false"] .sound__on { display: none; }
.sound[aria-pressed="false"] .sound__off { display: block; }
@media (max-width: 760px) {
  .cta { font-size: 2.6em; }
  .footer__bottom { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .footer__summary { order: -1; }
  .footer__note { text-align: center; }
}

/* ---------- case page ---------- */
.case { padding: 8em var(--g) 2em; }
.case__intro, .meta, .case__links, .cs, .case__next { max-width: 56em; margin-left: auto; margin-right: auto; }
.case__kicker { display: inline-flex; align-items: center; gap: .6em; color: var(--muted); }
.case__kicker .logo { width: 1.8em; height: 1.8em; border-radius: .4em; }
.case__statement { margin-top: .6em; font-size: 2.4em; font-weight: 600; letter-spacing: -.035em; line-height: 1.12; }
.case__hero { max-width: 56em; margin: 2.2em auto 0; }
.case__hero .slot, .cs .slot, .feat .slot { border-radius: .4em; }
.meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2em; margin-top: 1.6em; padding-top: 1.2em; border-top: 1px solid var(--line); font-size: .95em; }
.meta__k { color: var(--muted); margin-bottom: .35em; }
.case__links { display: flex; flex-wrap: wrap; gap: .4em; margin-top: 1.4em; }
.cs { margin-top: 5.5em; }
.case__h { font-size: 2em; font-weight: 600; letter-spacing: -.035em; line-height: 1.1; margin-bottom: .6em; }
.case__h--cmt { font-weight: 500; }
.cs__body { display: grid; gap: .8em; color: var(--ink-2); font-size: 1.1em; max-width: 40em; }
.cs--split { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5em; align-items: center; }
.cs--media { max-width: 56em; }
.feat { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5em; align-items: center; padding: 2.5em 0; border-top: 1px solid var(--line); }
.feat__t { font-size: 1.6em; font-weight: 600; letter-spacing: -.03em; }
.feat__c { font-size: 1.25em; font-weight: 500; margin: .1em 0 .7em; }
.case__next { margin-top: 6em; padding-top: 2em; border-top: 1px solid var(--line); }
.case__next a { display: inline-grid; gap: .2em; }
.case__next .cmt { font-size: 1.1em; }
.case__next-t { font-size: 2.6em; font-weight: 600; letter-spacing: -.04em; }
@media (max-width: 760px) {
  .case__statement { font-size: 1.8em; }
  .meta { grid-template-columns: 1fr 1fr; }
  .cs--split, .feat { grid-template-columns: 1fr; gap: 1.4em; }
}

/* ---------- about ---------- */
.about-top { display: grid; grid-template-columns: 1fr 1.25fr; gap: 3em; padding: 8em var(--g) 2em; max-width: 84em; margin: 0 auto; }
.slider { max-width: 22em; }
.slider__bar { position: relative; height: 2px; background: var(--line); overflow: hidden; }
.slider__progress { position: absolute; inset: 0; background: var(--ink); transform: translateX(-100%); }
.slider__ctrl { display: flex; align-items: center; gap: .4em; margin-top: 1em; }
.slider__count { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.slider__slides { position: relative; margin-top: 2em; min-height: 26em; }
.slide { position: absolute; inset: 0 0 auto; visibility: hidden; }
.slide.is-active { visibility: visible; }
.slide__img { width: 13em; }
.slide__value { margin-top: 1em; font-size: 3em; font-weight: 600; letter-spacing: -.04em; line-height: 1; }
.slide__cap { margin-top: .5em; color: var(--ink-2); max-width: 18em; }
.line-mask { display: block; overflow: hidden; padding-bottom: .12em; margin-bottom: -.12em; }
.about__statement { font-size: 2.5em; font-weight: 600; letter-spacing: -.035em; line-height: 1.1; max-width: 16em; }
.about__p { margin-top: 1.2em; color: var(--ink-2); font-size: 1.1em; max-width: 36em; }
.about__links { display: flex; gap: .5em; margin-top: 1.6em; flex-wrap: wrap; }
@media (max-width: 860px) { .about-top { grid-template-columns: 1fr; } .slider__slides { min-height: 24em; } }

/* toolkit dock */
.dock { display: flex; justify-content: center; align-items: flex-end; gap: .5em; height: 9em; }
.dock__item { position: relative; width: 5em; transition: width .5s var(--dock); }
.dock__tile { display: grid; place-items: center; aspect-ratio: 1; border-radius: 22%; background: var(--white); border: 1px solid var(--line); box-shadow: 0 .5em 1em -.6em rgba(0, 0, 0, .3); font-weight: 600; font-size: 1.2em; color: var(--ink); width: 100%; }
.dock__tip { position: absolute; left: 50%; top: 0; transform: translate(-50%, 0); opacity: 0; padding: .3em .6em; border-radius: .3em; background: var(--ink); color: var(--white); font-size: .85em; white-space: nowrap; pointer-events: none; transition: transform .5s var(--dock), opacity .5s var(--dock); }
@media (min-width: 993px) and (hover: hover) {
  .dock__item.is-far { width: 6em; }
  .dock__item.is-close { width: 7em; }
  .dock__item.is-hover { width: 8em; }
  .dock__item.is-hover .dock__tip { opacity: 1; transform: translate(-50%, -140%); }
}
@media (max-width: 992px) { .dock { flex-wrap: wrap; height: auto; } .dock__item { width: 4.2em; } }

/* experience timeline */
.tl { display: grid; grid-template-columns: 1.3fr 1fr; gap: 3em; max-width: 84em; margin: 0 auto; align-items: start; }
.tl__chart { position: relative; padding-top: 2.4em; }
.tl__axis { position: absolute; inset: 0 0 auto; height: 1.6em; display: flex; justify-content: space-between; color: var(--muted); font-size: .85em; font-variant-numeric: tabular-nums; border-bottom: 1px solid var(--line); }
.tl__rows { display: grid; gap: .5em; padding-top: .8em; }
.tl__bar {
  position: relative; display: flex; align-items: center; height: 2.4em; min-width: 3em; border-radius: .3em; padding: 0 .7em; text-align: left;
  background: var(--chip); color: var(--ink); overflow: hidden; transition: opacity .35s var(--main), background-color .35s var(--main), color .35s var(--main);
}
.tl__label { position: relative; z-index: 1; font-size: .95em; white-space: nowrap; }
.tl__fill { position: absolute; inset: 0; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--main); }
.tl.is-hovering .tl__bar { opacity: .35; }
.tl.is-hovering .tl__bar.is-on { opacity: 1; color: var(--white); }
.tl__bar.is-on .tl__fill { transform: scaleX(1); }
.tl__sweep { position: absolute; top: 0; bottom: 0; left: 0; width: 1px; background: var(--ink); pointer-events: none; }
.tl__year { position: absolute; top: -.2em; left: .4em; padding: .1em .4em; border-radius: .25em; background: var(--ink); color: var(--white); font-size: .8em; font-variant-numeric: tabular-nums; }
.tl__cards { position: relative; display: grid; }
.role { grid-area: 1 / 1; padding: 1.4em; border: 1px solid var(--line); border-radius: .5em; background: var(--white); opacity: 0; visibility: hidden; transform: translateY(.8em); transition: opacity .45s var(--main), transform .45s var(--main), visibility .45s; }
.role.is-on { opacity: 1; visibility: visible; transform: none; }
.role__when { color: var(--muted); font-size: .9em; }
.role__t { font-size: 1.4em; font-weight: 600; letter-spacing: -.03em; margin: .3em 0 .5em; }
.role p:not(.role__when) { color: var(--ink-2); }
.role__items { display: grid; gap: .7em; margin-top: .4em; }
.role__items b { display: block; font-weight: 600; }
.role__items span { color: var(--ink-2); font-size: .95em; }
@media (max-width: 860px) {
  .tl { grid-template-columns: 1fr; }
  .tl__cards { display: grid; gap: .8em; }
  .role { grid-area: auto; opacity: 1; visibility: visible; transform: none; }
}

/* records */
.recs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5em; max-width: 84em; margin: 0 auto; }
.rec__h { font-size: 1.1em; font-weight: 500; color: var(--muted); padding-bottom: .7em; border-bottom: 1px solid var(--ink); }
.rec__list li { display: grid; grid-template-columns: 3.4em 1fr; gap: .8em; padding: .85em 0; border-bottom: 1px solid var(--line); transition: padding-left .4s var(--main); }
.rec__list li:hover { padding-left: .4em; }
.rec__y { color: var(--muted); font-variant-numeric: tabular-nums; }
.rec__t { font-weight: 500; }
.rec__t small { display: block; font-size: .88em; color: var(--muted); font-weight: 400; margin-top: .15em; }
@media (max-width: 860px) { .recs { grid-template-columns: 1fr; } }

/* outside of work bento */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 13em; gap: .75em; max-width: 84em; margin: 0 auto; }
.bento__card { position: relative; display: flex; flex-direction: column; border-radius: .5em; background: var(--white); border: 1px solid var(--line); overflow: hidden; }
.bento__card--tall { grid-row: span 2; }
.bento__card--wide { grid-column: span 2; }
.bento__media { flex: 1; min-height: 0; }
.bento__text { padding: 1em; display: grid; gap: .35em; align-content: start; }
.bento__k { color: var(--muted); font-size: .85em; }
.bento__t { font-size: 1.25em; font-weight: 600; letter-spacing: -.02em; }
.bento__p { color: var(--ink-2); }
.bento .tslot { margin-top: .3em; }
.marquee { overflow: hidden; border-top: 1px solid var(--line); padding: .7em 0; white-space: nowrap; color: var(--grey); font-size: 1.8em; font-weight: 600; letter-spacing: -.03em; }
.marquee__list { display: inline-flex; animation: marquee 30s linear infinite; animation-play-state: paused; }
.marquee.is-live .marquee__list { animation-play-state: running; }
.marquee__list span { padding-right: 1.5em; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (max-width: 860px) { .bento { grid-template-columns: 1fr 1fr; } .bento__card--wide { grid-column: span 2; } }

/* ---------- 404 ---------- */
.nf { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 6em var(--g) 2em; }
.nf__card { width: min(24em, 100%); padding: 1.6em; border-radius: .6em; background: var(--white); border: 1px solid var(--line); text-align: center; display: grid; gap: .8em; justify-items: center; }
.nf__clay { width: 11em; border-radius: 50%; }
.nf__code { font-size: 4em; font-weight: 600; letter-spacing: -.05em; line-height: 1; }
.nf__text { color: var(--ink-2); }
.nf__btns { display: grid; gap: .5em; width: 100%; margin-top: .6em; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .slot--empty { animation: none; }
}
html.rm .slot--empty, html.rm .marquee__list, html.rm .live { animation: none !important; }

@media print { .nav, .cursor, .hero__stage, .footer__right { display: none !important; } }

/* ---------- round 3 fixes ---------- */
.tl__axis { display: block; }
.tl__axis span { position: absolute; top: 0; transform: translateX(-50%); }
.tl__bar.is-on { color: var(--white); }
.bento__card--wide:has(.bento__media) { flex-direction: row; }
.bento__card--wide .bento__media { flex: 1 1 50%; height: 100%; min-height: 0; }
.bento__card--wide .bento__text { flex: 1 1 50%; }
@media (max-width: 860px) { .bento__card--wide:has(.bento__media) { flex-direction: column; } .bento { grid-auto-rows: minmax(13em, auto); } }
@media (max-width: 560px) {
  .nav__cta { display: none; }
  .nav__name { white-space: nowrap; font-size: 1.1em; }
  .nav .pill { font-size: .75em; white-space: nowrap; }
  .hero__stage { inset: 4em 0 15em; }
  .h1 { font-size: 2.3em; }
  .hero__intro { font-size: 1.1em; }
  .sh { font-size: 1.7em; }
  .section { padding-top: 5em; }
}

/* ---------- round 5 ---------- */
/* header separation: a light blur that fades out downwards, only once scrolled */
.nav__veil {
  position: absolute; inset: 0 0 -1.6em; z-index: -1; pointer-events: none; opacity: 0;
  background: linear-gradient(rgba(251, 251, 251, .86) 55%, rgba(251, 251, 251, 0));
  -webkit-backdrop-filter: blur(.9em); backdrop-filter: blur(.9em);
  -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent);
  transition: opacity .35s var(--main);
}
.nav.is-scrolled .nav__veil { opacity: 1; }
.nav { isolation: isolate; }

/* global status pill */
.status {
  position: fixed; z-index: 90; right: var(--g); bottom: calc(var(--g) + env(safe-area-inset-bottom, 0px));
  display: inline-flex; align-items: center; gap: .65em; height: 2.9em; padding: 0 1.1em; border-radius: .35em;
  background: var(--ink); color: var(--white); font-size: .95em; white-space: nowrap;
  box-shadow: 0 1em 2em -1.2em rgba(0, 0, 0, .55);
  transition: transform .5s var(--main), opacity .4s var(--main), background-color .25s;
}
.status:hover { background: #000; }
.status__sep { width: 1px; height: 1.2em; background: rgba(255, 255, 255, .25); }
.status time { font-variant-numeric: tabular-nums; color: #bdbdbd; }
.status.is-away { transform: translateY(160%); opacity: 0; pointer-events: none; }
@media (max-width: 560px) {
  .status { left: 50%; right: auto; transform: translateX(-50%); font-size: .85em; height: 2.7em; }
  .status.is-away { transform: translate(-50%, 160%); }
}

/* services sticky CTA */
.svc-cta { position: sticky; bottom: calc(var(--g) + 3.8em + env(safe-area-inset-bottom, 0px)); z-index: 5; display: flex; justify-content: center; margin-top: 2em; pointer-events: none; }
.svc-cta__btn {
  pointer-events: auto; display: inline-flex; align-items: center; gap: .6em; height: 3.2em; padding: 0 1.3em; border-radius: 999px;
  background: var(--white); color: var(--ink); border: 1px solid var(--line); font-weight: 500;
  box-shadow: 0 1em 2.2em -1.2em rgba(0, 0, 0, .45); transition: background-color .25s, color .25s, border-color .25s;
}
.svc-cta__btn:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.svc-cta__btn .ico { width: 1em; height: 1em; }
@media (max-width: 560px) { .svc-cta { bottom: calc(var(--g) + env(safe-area-inset-bottom, 0px)); } }
body.in-services .status { opacity: 0; pointer-events: none; }

/* toolkit dock with real logos */
.dock__tile { padding: 22%; }
.dock__tile img { width: 100%; height: 100%; }

/* claymation: tilt, highlight and parallax */
.clay { perspective: 50em; }
.clay .slot--clay { transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transform-style: preserve-3d; transition: transform .5s var(--main); box-shadow: 0 1.4em 2.4em -1.6em rgba(0, 0, 0, .45); }
.clay .clay__video { transform: translate(var(--px, 0px), var(--py, 0px)) scale(1.08); transition: transform .5s var(--main); }
.clay__shine { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(circle at var(--hx, 30%) var(--hy, 25%), rgba(255, 255, 255, .45), rgba(255, 255, 255, 0) 45%); mix-blend-mode: soft-light; }
.slide__img .clay, .nf__clay { width: 100%; }

.menu__cv { margin-left: auto; font-size: .95em; color: var(--muted); }
.menu__cv + .menu__ja { margin-left: .9em; }
.clay .nf__clay { margin: 0 auto; width: 11em; }
html.cal-open .nav, html.cal-open .status, html.cal-open .svc-cta, html.cal-open .cursor { visibility: hidden; }
.calendly-overlay .calendly-popup { border-radius: .8em; overflow: hidden; }
.calendly-overlay { background-color: rgba(28, 28, 28, .55) !important; -webkit-backdrop-filter: blur(.4em); backdrop-filter: blur(.4em); }
@media (max-width: 560px) { .hero { padding-bottom: calc(4.6em + env(safe-area-inset-bottom, 0px)); } }
[data-nav-status="open"] .status { opacity: 0; pointer-events: none; }

/* next case with its cover loop */
.case__next a { display: grid; grid-template-columns: 1fr minmax(10em, 22em); align-items: center; gap: 2em; width: 100%; }
.case__next-text { display: grid; gap: .2em; }
.case__next-thumb .slot { border-radius: .4em; transition: transform .6s var(--main); }
.case__next a:hover .case__next-thumb .slot { transform: scale(1.03); }
@media (max-width: 560px) { .case__next a { grid-template-columns: 1fr; gap: 1em; } }

/* toolkit: two magnifying docks (make / run) */
.docks { display: grid; gap: 1.2em; justify-items: center; }
.dock-row { display: grid; gap: .5em; justify-items: center; max-width: 100%; }
.dock-row__label { color: var(--grey); font-size: .9em; }
.dock { height: 7.6em; gap: .45em; }
.dock__item { width: 4em; }
@media (min-width: 993px) and (hover: hover) {
  .dock__item.is-far { width: 4.7em; }
  .dock__item.is-close { width: 5.5em; }
  .dock__item.is-hover { width: 6.4em; }
}
.dock-hint { text-align: center; color: var(--muted); font-size: .85em; margin-top: 1em; }
@media (max-width: 992px) {
  .dock-row { width: 100%; }
  .dock { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; height: auto; width: 100%; padding: .4em .2em .8em; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .dock::-webkit-scrollbar { display: none; }
  .dock__item { width: 3.6em; flex: none; scroll-snap-align: start; }
}

/* ================= round 7 ================= */

/* header: same inset on both sides, matching the page gutter */
.nav { padding: var(--g) calc(var(--g) * 1.6); }
@media (max-width: 980px) { .nav { padding: var(--g); } }

/* ---------- live apps: Gohesive-style floating UI cards for every app ---------- */
.app__layer--card { border-radius: .8em; }

/* ---------- stats strip ---------- */
.stats { padding: 4em var(--g) 0; max-width: 84em; margin: 0 auto; }
.stats__h { text-align: center; font-size: 1.1em; font-weight: 500; color: var(--grey); margin-bottom: 1.4em; }
.stats__list { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: 1.6em 1.4em; display: grid; gap: .6em; align-content: start; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat__v { font-size: 3em; font-weight: 600; letter-spacing: -.045em; line-height: 1; }
.stat__reels { display: inline-flex; }
.reel { display: inline-block; height: 1em; overflow: hidden; }
.reel__strip { display: flex; flex-direction: column; transition: transform 1.4s var(--main); }
.reel__strip span { height: 1em; line-height: 1; }
.reel__c { display: inline-block; }
.stat__l { color: var(--ink-2); font-size: .92em; line-height: 1.35; max-width: 16em; }
@media (max-width: 900px) {
  .stats__list { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2n+1) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .stat:last-child { grid-column: span 2; }
}

/* ---------- services: rows that open on hover ---------- */
.svcs { max-width: 76em; }
.svc { display: block; padding: 0; border-bottom: 1px solid var(--line); }
.svc__link { position: relative; display: grid; grid-template-columns: 3.4em 1fr 1.4fr; gap: 1em 2em; padding: 2em .6em; border-radius: .5em; transition: background-color .4s var(--main); }
.svc__link::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--ink); transform: scaleY(0); transform-origin: top; transition: transform .5s var(--main); }
.svc__icon { width: 2.8em; height: 2.8em; border-radius: .6em; display: grid; place-items: center; background: var(--chip); transition: background-color .4s var(--main), color .4s var(--main); }
.svc__ico { width: 1.5em; height: 1.5em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.svc__main { display: grid; align-content: start; gap: .25em; }
.svc__when { display: flex; gap: .8em; color: var(--muted); font-size: .9em; }
.svc__n { color: var(--grey); font-variant-numeric: tabular-nums; }
.svc__title { display: block; font-size: 1.85em; font-weight: 600; letter-spacing: -.035em; line-height: 1.05; }
.svc__body { display: grid; gap: .7em; color: var(--ink-2); font-size: 1.05em; }
.svc__text, .svc__fit { display: block; }
.svc__fit b { color: var(--ink); font-weight: 600; }
.svc__more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .55s var(--main); }
.svc__more-in { overflow: hidden; display: grid; gap: .45em; }
.svc__inc-h { margin-top: .6em; font-size: .85em; color: var(--muted); }
.svc__inc { position: relative; padding-left: 1.3em; color: var(--ink); opacity: 0; transform: translateY(.4em); transition: opacity .4s var(--main), transform .5s var(--main); }
.svc__inc::before { content: ""; position: absolute; left: 0; top: .55em; width: .55em; height: .55em; border-radius: 50%; background: var(--live); }
.svc__book { display: inline-flex; align-items: center; gap: .4em; margin-top: .5em; font-weight: 600; color: var(--ink); opacity: 0; transition: opacity .4s var(--main) .2s; }
.svc__book .ico { width: 1em; height: 1em; }
.svc__link:hover, .svc__link:focus-visible { background: var(--white); }
.svc__link:hover::before, .svc__link:focus-visible::before { transform: scaleY(1); }
.svc__link:hover .svc__icon, .svc__link:focus-visible .svc__icon { background: var(--ink); color: var(--white); }
.svc__link:hover .svc__ico, .svc__link:focus-visible .svc__ico { animation: draw 1s var(--main); }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.svc__link:hover .svc__more, .svc__link:focus-visible .svc__more { grid-template-rows: 1fr; }
.svc__link:hover .svc__inc, .svc__link:focus-visible .svc__inc { opacity: 1; transform: none; }
.svc__link:hover .svc__inc:nth-of-type(2), .svc__link:focus-visible .svc__inc:nth-of-type(2) { transition-delay: .06s; }
.svc__link:hover .svc__inc:nth-of-type(3), .svc__link:focus-visible .svc__inc:nth-of-type(3) { transition-delay: .12s; }
.svc__link:hover .svc__inc:nth-of-type(4), .svc__link:focus-visible .svc__inc:nth-of-type(4) { transition-delay: .18s; }
.svc__link:hover .svc__inc:nth-of-type(5), .svc__link:focus-visible .svc__inc:nth-of-type(5) { transition-delay: .24s; }
.svc__link:hover .svc__book, .svc__link:focus-visible .svc__book { opacity: 1; }
@media (max-width: 760px), (hover: none) {
  .svc__link { grid-template-columns: 1fr; gap: .8em; padding: 1.6em .2em; }
  .svc__more { grid-template-rows: 1fr; }
  .svc__inc, .svc__book { opacity: 1; transform: none; }
}

/* ---------- toolkit: one dock, category tabs ---------- */
.tk { display: grid; justify-items: center; gap: 1.4em; }
.tk__tabs { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: .3em; padding: .3em; border-radius: 999px; background: var(--chip); }
.tk__tab { position: relative; display: inline-flex; align-items: center; gap: .45em; height: 2.4em; padding: 0 1em; border-radius: 999px; font-size: .95em; color: var(--ink-2); transition: background-color .3s var(--main), color .3s var(--main); }
.tk__tab:hover { color: var(--ink); }
.tk__tab[aria-selected="true"] { background: var(--white); color: var(--ink); box-shadow: 0 .3em .8em -.4em rgba(0, 0, 0, .3); }
.tk__count { font-size: .8em; color: var(--muted); font-variant-numeric: tabular-nums; }
.tk__stage { width: 100%; display: flex; justify-content: center; }
.tk .dock { height: 7.4em; gap: .5em; margin: 0; }
.tk .dock__item { width: 4.4em; }
@media (min-width: 993px) and (hover: hover) {
  .tk .dock__item.is-far { width: 5.1em; }
  .tk .dock__item.is-close { width: 5.9em; }
  .tk .dock__item.is-hover { width: 6.8em; }
}
@media (max-width: 992px) {
  .tk .dock { flex-wrap: wrap; justify-content: center; height: auto; overflow: visible; padding: 0; }
  .tk .dock__item { width: 3.8em; }
}
.dock-hint { margin-top: .4em; }

/* ---------- experience: list with a mini Gantt bar per role ---------- */
.xp { max-width: 84em; margin: 0 auto; }
.xp__axis-row, .xp__head { display: grid; grid-template-columns: 2.8em minmax(10em, 1.1fr) minmax(12em, 1.6fr) 7.5em minmax(10em, 1.3fr); align-items: center; gap: 1.2em; }
.xp__axis-row { padding: 0 1em .6em; }
.xp__axis-row > span:first-child { grid-column: 1 / 5; }
.xp__axis { position: relative; height: 1.4em; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .8em; font-variant-numeric: tabular-nums; }
.xp__axis i { position: absolute; bottom: .35em; transform: translateX(-50%); font-style: normal; }
.xp__sweep { position: absolute; left: 0; bottom: -.1em; height: 100vh; max-height: var(--xp-h, 40em); width: 1px; transform-origin: top; pointer-events: none; }
.xp__sweep b { position: absolute; left: 0; bottom: 100%; transform: translate(-50%, -.3em); padding: .1em .45em; border-radius: .3em; background: var(--ink); color: var(--white); font-weight: 500; white-space: nowrap; }
.xp__list { border-top: 1px solid var(--line); }
.xp__row { border-bottom: 1px solid var(--line); }
.xp__head { width: 100%; text-align: left; padding: 1.1em 1em; border-radius: .5em; transition: background-color .35s var(--main); }
.xp__row:hover .xp__head, .xp__row.is-open .xp__head { background: var(--white); }
.xp__logo { width: 2.8em; height: 2.8em; border-radius: .6em; box-shadow: 0 .3em .8em -.4em rgba(0, 0, 0, .35); }
.xp__logo--mono { display: grid; place-items: center; background: var(--ink); color: var(--white); font-size: .8em; font-weight: 600; }
.xp__id { display: grid; gap: .1em; }
.xp__org { display: inline-flex; align-items: center; gap: .6em; font-weight: 600; font-size: 1.15em; letter-spacing: -.02em; }
.xp__now { display: inline-flex; align-items: center; gap: .35em; font-size: .7em; font-weight: 500; color: var(--live); }
.xp__role { color: var(--muted); font-size: .92em; }
.xp__hl { color: var(--ink-2); font-size: .95em; line-height: 1.35; }
.xp__years { color: var(--muted); font-size: .9em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.xp__track { position: relative; height: .7em; border-radius: 999px; background: var(--chip); overflow: hidden; }
.xp__bar { position: absolute; top: 0; bottom: 0; left: var(--x0, 0%); width: var(--w, 0%); border-radius: 999px; background: var(--ink); transform-origin: left; }
.xp__row.is-current .xp__bar { background: linear-gradient(90deg, var(--ink) 70%, var(--live)); }
.xp__row:hover .xp__bar, .xp__row.is-open .xp__bar { background: var(--live); }
.xp__more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .55s var(--main); }
.xp__row.is-open .xp__more { grid-template-rows: 1fr; }
.xp__more-in { overflow: hidden; display: grid; grid-template-columns: minmax(0, 18em) 1fr; gap: 1.6em; padding: 0 1em; }
.xp__row.is-open .xp__more-in { padding: .4em 1em 1.6em 5em; }
.xp__thumb { display: block; border-radius: .5em; overflow: hidden; aspect-ratio: 16 / 9; background: var(--panel); }
.xp__thumb video { width: 100%; height: 100%; object-fit: cover; }
.xp__detail { display: grid; gap: .6em; align-content: start; }
.xp__when { color: var(--muted); font-size: .9em; }
.xp__text { color: var(--ink-2); }
.xp__facts { display: grid; gap: .5em; }
.xp__facts b { display: block; font-weight: 600; }
.xp__facts span { color: var(--ink-2); font-size: .95em; }
.xp__detail .chip-link { justify-self: start; }
.xp__more-in:not(:has(.xp__thumb)) { grid-template-columns: 1fr; }
@media (max-width: 860px) {
  .xp__axis-row { display: none; }
  .xp__head { grid-template-columns: 2.8em 1fr auto; grid-template-areas: "logo id years" "hl hl hl" "track track track"; gap: .6em 1em; padding: 1em .3em; }
  .xp__logo { grid-area: logo; } .xp__id { grid-area: id; } .xp__years { grid-area: years; } .xp__hl { grid-area: hl; } .xp__track { grid-area: track; }
  .xp__more-in, .xp__row.is-open .xp__more-in { grid-template-columns: 1fr; padding-left: .3em; padding-right: .3em; }
}

/* ---------- outside of work ---------- */
.bento { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 14em; }
.bento__card--tall { grid-row: span 2; }
.tile-tokyo { position: relative; overflow: hidden; color: var(--white); background: #2a3d66; }
.tile-tokyo__sky { position: absolute; inset: 0; background: linear-gradient(180deg, var(--sky1, #2b4d8f), var(--sky2, #e8a27a)); transition: background 1s; }
.tile-tokyo__sun { position: absolute; right: 14%; top: 22%; width: 3.2em; height: 3.2em; border-radius: 50%; background: var(--sun, #ffd27a); box-shadow: 0 0 2.4em var(--sun, #ffd27a); transition: transform 1.2s var(--main); }
.tile-tokyo:hover .tile-tokyo__sun { transform: translateY(-.6em) scale(1.08); }
.tile-tokyo__stars { position: absolute; inset: 0; opacity: var(--stars, 0); background-image: radial-gradient(1px 1px at 20% 30%, #fff, transparent), radial-gradient(1px 1px at 60% 20%, #fff, transparent), radial-gradient(1.5px 1.5px at 80% 45%, #fff, transparent), radial-gradient(1px 1px at 35% 60%, #fff, transparent), radial-gradient(1px 1px at 70% 70%, #fff, transparent); }
.tile-tokyo .bento__text { position: relative; }
.tile-tokyo .bento__k, .tile-tokyo .bento__p { color: rgba(255, 255, 255, .85); }
.tile-tokyo__now { position: absolute; left: 1em; bottom: 1em; display: grid; gap: .2em; }
.tile-tokyo__time { display: flex; align-items: baseline; gap: .35em; font-size: 2.6em; font-weight: 600; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.tile-tokyo__time span { font-size: .35em; font-weight: 500; letter-spacing: 0; opacity: .8; }
.tile-tokyo__wx { font-size: .95em; opacity: .9; }
.tile-tokyo.is-night { --sky1: #0e1733; --sky2: #2a3d66; --sun: #f3efe2; --stars: 1; }
.tile-tokyo.is-dawn { --sky1: #6a7fbf; --sky2: #f5b38a; --sun: #ffb27a; }
.tile-tokyo.is-day { --sky1: #4f8fe0; --sky2: #bfe1ff; --sun: #ffe08a; }
.tile-tokyo.is-dusk { --sky1: #3b3f7a; --sky2: #f08a5d; --sun: #ff9d5c; }
.tile-flip { padding: 1em 1em 0; }
.flip { display: block; width: 62%; margin: 0 auto; aspect-ratio: 388 / 576; perspective: 60em; cursor: pointer; }
.flip__inner { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .8s var(--main); }
.flip:hover .flip__inner, .flip[aria-pressed="true"] .flip__inner { transform: rotateY(180deg); }
.flip__face { position: absolute; inset: 0; border-radius: 4.5%; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 1em 2em -1em rgba(0, 0, 0, .45); }
.flip__back { transform: rotateY(180deg); }
.flip__back img { width: 100%; height: 100%; object-fit: cover; }
.flip__front { background: radial-gradient(circle at 50% 50%, #c9874a 0 22%, #6b3a1c 23% 30%, #2a1a10 31%); border: .45em solid #1b1210; display: grid; place-items: center; }
.flip__back-art { display: grid; place-items: center; width: 46%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, #f1d08a, #b8743a); color: #2a1a10; font-weight: 700; font-size: 1.6em; letter-spacing: -.04em; }
.tile-circuit { position: relative; overflow: hidden; background: #0f1a14; color: #e8f3ec; }
.tile-circuit .bento__k, .tile-circuit .bento__p { color: rgba(232, 243, 236, .75); }
.circuit { width: 100%; height: auto; margin-top: .6em; }
.circuit path { fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.circuit__base path { stroke: #2b4a37; }
.circuit__lit path { stroke: #7dffb0; stroke-dasharray: 1; stroke-dashoffset: 1; filter: drop-shadow(0 0 3px #7dffb0); transition: stroke-dashoffset 1.2s var(--main); }
.circuit__lit path:nth-child(2) { transition-delay: .1s; } .circuit__lit path:nth-child(3) { transition-delay: .2s; } .circuit__lit path:nth-child(4) { transition-delay: .35s; }
.circuit__pads circle, .circuit__pads rect { fill: #0f1a14; stroke: #4d7a5e; stroke-width: 2; transition: fill .4s .6s, stroke .4s .6s; }
.tile-circuit:hover .circuit__lit path, .tile-circuit.is-lit .circuit__lit path { stroke-dashoffset: 0; }
.tile-circuit:hover .circuit__pads circle, .tile-circuit.is-lit .circuit__pads circle { fill: #7dffb0; stroke: #7dffb0; }
.tile-circuit:hover .circuit__pads rect, .tile-circuit.is-lit .circuit__pads rect { stroke: #7dffb0; }
.circuit__sparks { position: absolute; inset: 0; pointer-events: none; }
.spark { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff4c2; box-shadow: 0 0 6px 2px #ffd35c; }
.tile-build { display: grid; grid-template-columns: 1.1fr 1fr; overflow: hidden; }
.tile-build__media { position: relative; overflow: hidden; }
.tile-build__media video { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--main); }
.tile-build:hover .tile-build__media video { transform: scale(1.05); }
.tile-build .bento__text > span { display: block; }
.tile-build .bento__k { color: var(--muted); font-size: .85em; }
.tile-build .bento__t { font-size: 1.25em; font-weight: 600; letter-spacing: -.02em; }
.tile-build__go { display: inline-flex !important; align-items: center; gap: .35em; margin-top: .4em; font-weight: 600; }
.tile-build__go .ico { width: 1em; height: 1em; transition: transform .4s var(--main); }
.tile-build:hover .tile-build__go .ico { transform: translate(.15em, -.15em); }
@media (max-width: 860px) {
  .bento { grid-template-columns: 1fr 1fr; grid-auto-rows: minmax(13em, auto); }
  .bento__card--wide { grid-column: span 2; }
  .tile-build { grid-template-columns: 1fr; }
  .tile-build__media { aspect-ratio: 16 / 9; }
}
html.rm .spark { display: none; }
/* round 7 fixes */
.tk .dock { height: 6em; }
.tk { gap: 1em; }
.bento .chip-link { justify-self: start; }
.tile-tokyo__sun { top: auto; bottom: 18%; right: 10%; }
@media (max-width: 560px) {
  .bento { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .bento__card--wide, .bento__card--tall { grid-column: auto; grid-row: auto; }
  .tile-tokyo { min-height: 15em; }
  .tile-flip .flip { width: 48%; }
  .tile-circuit .circuit { max-width: 22em; margin: 0 auto; }
}
body.in-xp .status { opacity: 0; pointer-events: none; }
@media (max-width: 991px) {
  .app__card { border-radius: 1.5em 1.5em 0 0; box-shadow: none; }
  .app__body { padding-bottom: 1em; }
  .app__shelf { margin-top: 0; box-shadow: 0 1em 1.6em -1.2em rgba(0, 0, 0, .25); border: 0; }
}

/* ---------- hero: render with live screens (site.heroScreens) ----------
   The frame keeps the render's 3:4 shape at any size, so the screens' corner points stay locked to it.
   Screens are fixed-size HTML scenes, scaled onto the render with matrix3d from site.js. */
.hero__stage { container-type: size; }
.hero__frame {
  position: relative; width: min(100cqw, 75cqh); height: min(100cqh, 133.333cqw);
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 66%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 66%, transparent 100%);
}
.hero__frame .hero__loop { display: block; width: 100%; height: 100%; max-width: none; object-fit: fill; -webkit-mask-image: none; mask-image: none; }
.hero__matte { position: absolute; pointer-events: none; }
.hs { position: absolute; left: 0; top: 0; transform-origin: 0 0; overflow: hidden; visibility: hidden; pointer-events: none; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; backface-visibility: hidden; }
.hero__frame.is-mapped .hs { visibility: visible; }
/* the screens sit behind dark glass: a thin inner bezel shadow and a barely-there diagonal glare, no wash */
.hs::after { content: ""; position: absolute; inset: 0; z-index: 5; pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0) 34%, rgba(255, 255, 255, .035) 44%, rgba(255, 255, 255, 0) 56%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .65), inset 0 2px 8px rgba(0, 0, 0, .4); }
/* plate mode: crisp still, only the person moves in a small video over his box */
.hero__frame--plate { -webkit-mask-image: none; mask-image: none; }
.hero__plate { display: block; width: 100%; height: 100%; }
.hero__person { position: absolute; left: 0; top: 0; display: block; object-fit: fill; pointer-events: none; visibility: hidden;
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.hs { image-rendering: auto; }
.hs i, .hs b { font-style: normal; }

/* monitor: a Figma design file in the dark theme (16:9, sized to the monitor) */
.hs--design { width: 640px; height: 360px; background: #1e1e1e; color: #e8e8e8; display: flex; flex-direction: column; font-size: 10.5px; line-height: 1.2; }
.fg-top { height: 30px; flex: none; background: #2c2c2c; border-bottom: 1px solid #3a3a3a; display: flex; align-items: center; gap: 4px; padding: 0 8px; }
.fg-menu { display: grid; grid-template-columns: 5px 5px; gap: 2px; padding: 5px; border-radius: 5px; margin-right: 4px; }
.fg-menu u { display: block; width: 5px; height: 5px; border-radius: 1px; background: #e8e8e8; }
.fg-tool { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 5px; color: #e8e8e8; font-weight: 700; font-size: 11px; }
.fg-tool.is-on { background: #0d99ff; }
.fg-tool svg { width: 10px; height: 12px; fill: #fff; }
.fg-tool u.sq { width: 9px; height: 9px; border: 1.5px solid #e8e8e8; border-radius: 1px; }
.fg-tool u.pen { width: 8px; height: 8px; border: 1.5px solid #e8e8e8; border-radius: 0 50% 50% 50%; transform: rotate(45deg); }
.fg-file { margin: 0 auto; font-size: 11.5px; font-weight: 600; color: #fff; }
.fg-file em { font-style: normal; color: #a0a0a0; font-weight: 500; }
.fg-av { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #2c2c2c; margin-left: -6px; font-size: 9.5px; font-weight: 700; color: #fff; }
.fg-av--a { background: #9747ff; margin-left: 0; } .fg-av--b { background: #e5703b; }
.fg-share { margin-left: 8px; background: #0d99ff; border-radius: 5px; padding: 4px 10px; font-size: 11px; font-weight: 600; color: #fff; }
.fg-play { width: 0; height: 0; margin: 0 6px 0 10px; border-left: 8px solid #e8e8e8; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.fg-zoom { font-size: 10.5px; font-weight: 500; color: #e8e8e8; }
.fg-body { flex: 1; display: grid; grid-template-columns: 112px 1fr 112px; min-height: 0; }
.fg-rail, .fg-panel { background: #2c2c2c; padding: 8px 8px; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.fg-rail { border-right: 1px solid #3a3a3a; } .fg-panel { border-left: 1px solid #3a3a3a; }
.fg-rail p, .fg-panel p { margin: 0; }
.fg-rh { font-weight: 600; color: #fff; padding: 3px 0 1px; }
.fg-row { padding: 3px 5px; border-radius: 4px; color: #d0d0d0; white-space: nowrap; overflow: hidden; }
.fg-row i { color: #8c8c8c; margin-right: 5px; font-weight: 700; font-style: normal; }
.fg-row.is-sel { background: #0b4f87; color: #fff; }
.fg-row--sub { padding-left: 17px; color: #a6a6a6; }
.fg-tabs { display: flex; gap: 10px; padding-bottom: 5px; border-bottom: 1px solid #3a3a3a; }
.fg-tabs b { font-weight: 600; color: #8c8c8c; } .fg-tabs b.is-on { color: #fff; }
.fg-fields { display: flex; gap: 4px; }
.fg-fields span { flex: 1; background: #383838; border-radius: 4px; padding: 4px 5px; color: #e8e8e8; white-space: nowrap; }
.fg-fields em { color: #8c8c8c; margin-right: 3px; font-style: normal; }
.fg-fill { display: flex; align-items: center; gap: 6px; color: #e8e8e8; }
.fg-fill .sw { display: block; width: 13px; height: 13px; border-radius: 3px; }
.sw--1 { background: #f4eff9; } .sw--2 { background: #e01fc1; } .sw--3 { background: #9b5de5; }
.fg-canvas { position: relative; overflow: hidden; background: #1e1e1e; }
.fg-frame { position: absolute; top: 40px; width: 104px; height: 216px; }
.fg-frame b { position: absolute; top: -16px; left: 0; font-size: 10px; font-weight: 500; color: #a0a0a0; }
.fg-frame img, .fg-app { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 3px; }
.fg-frame--1 { left: 18px; } .fg-frame--2 { left: 156px; } .fg-frame--3 { left: 294px; }
.fg-app { background: #f4eff9; padding: 8px; display: flex; flex-direction: column; gap: 7px; position: relative; }
.fg-app__bar { height: 18px; border-radius: 6px; background: linear-gradient(90deg, #9b5de5, #e01fc1); flex: none; }
.fg-stack { display: flex; flex-direction: column; gap: 7px; }
.fg-card { display: block; height: 28px; border-radius: 8px; flex: none; }
.fg-card--a { background: #9b5de5; } .fg-card--b { background: #f59e0b; } .fg-card--c { background: #12b5a6; }
.fg-card--slot { height: 0; margin-bottom: -7px; background: rgba(13, 153, 255, .22); outline: 2px dashed #0d99ff; outline-offset: -2px; opacity: 0; }
.fg-app__fab { position: absolute; left: 50%; bottom: 8px; width: 26px; height: 26px; margin-left: -13px; border-radius: 50%; background: #2d1e3e; box-shadow: 0 0 0 3px #e01fc1 inset; }
.fg-sel { position: absolute; top: 40px; left: 156px; width: 104px; height: 216px; border: 1.5px solid #0d99ff; margin: -1.5px 0 0 -1.5px; box-sizing: content-box; }
.fg-sel i { position: absolute; width: 6px; height: 6px; background: #fff; border: 1.5px solid #0d99ff; }
.fg-sel i:nth-child(1) { left: -5px; top: -5px; } .fg-sel i:nth-child(2) { right: -5px; top: -5px; } .fg-sel i:nth-child(3) { right: -5px; bottom: -5px; } .fg-sel i:nth-child(4) { left: -5px; bottom: -5px; }
.fg-sel b { position: absolute; left: 50%; bottom: -20px; transform: translateX(-50%); background: #0d99ff; border-radius: 3px; padding: 1px 5px; font-size: 9.5px; font-weight: 600; color: #fff; white-space: nowrap; }
.fg-drag { position: absolute; left: 0; top: 0; width: 88px; height: 28px; border-radius: 8px; background: #e01fc1; box-shadow: 0 8px 18px rgba(0, 0, 0, .5); opacity: 0; transform: translate(14px, 286px); }
.fg-cursor { position: absolute; left: 0; top: 0; display: flex; align-items: flex-start; transform: translate(205px, 110px); }
.fg-cursor svg { fill: #9747ff; stroke: #fff; stroke-width: 1.5; }
.fg-cursor b { margin: 18px 0 0 -4px; background: #9747ff; border-radius: 3px 9px 9px 9px; padding: 2px 7px; font-size: 11px; font-weight: 700; color: #fff; }
.hs--design.is-playing .fg-cursor { animation: fg-cursor 9s cubic-bezier(.45, 0, .2, 1) infinite; }
.hs--design.is-playing .fg-drag { animation: fg-drag 9s cubic-bezier(.45, 0, .2, 1) infinite; }
.hs--design.is-playing .fg-sel { animation: fg-sel 9s cubic-bezier(.45, 0, .2, 1) infinite; }
.hs--design.is-playing .fg-card--slot { animation: fg-slot 9s cubic-bezier(.45, 0, .2, 1) infinite; }
@keyframes fg-cursor {
  0%, 4% { transform: translate(66px, 160px); }
  14%, 20% { transform: translate(205px, 110px); }
  33%, 37% { transform: translate(34px, 290px); }
  60%, 68% { transform: translate(352px, 124px); }
  90%, 100% { transform: translate(66px, 160px); }
}
@keyframes fg-drag {
  0%, 33% { opacity: 0; transform: translate(14px, 286px) scale(1); }
  37% { opacity: 1; transform: translate(14px, 282px) scale(1.06) rotate(-3deg); }
  59% { opacity: 1; transform: translate(299px, 108px) scale(1.06) rotate(2deg); }
  63%, 86% { opacity: 1; transform: translate(302px, 112px) scale(1) rotate(0); }
  90%, 100% { opacity: 0; transform: translate(302px, 112px) scale(1); }
}
@keyframes fg-sel {
  0%, 10% { opacity: 0; transform: translateX(0); }
  14%, 58% { opacity: 1; transform: translateX(0); }
  64%, 86% { opacity: 1; transform: translateX(138px); }
  90%, 100% { opacity: 0; transform: translateX(138px); }
}
@keyframes fg-slot {
  0%, 52% { height: 0; margin-bottom: -7px; opacity: 0; }
  60%, 86% { height: 28px; margin-bottom: 0; opacity: 1; }
  92%, 100% { height: 0; margin-bottom: -7px; opacity: 0; }
}

/* laptop: a VS Code-style editor that types, then deploys */
.hs--code { width: 448px; height: 280px; background: #1e1f26; color: #e6e6e6; display: flex; flex-direction: column; }
.cd-top { height: 22px; flex: none; background: #15161b; display: flex; align-items: center; gap: 6px; padding: 0 9px; position: relative; }
.cd-top i { width: 9px; height: 9px; border-radius: 50%; background: #ff5f57; }
.cd-top i:nth-child(2) { background: #febc2e; } .cd-top i:nth-child(3) { background: #28c840; }
.cd-top b { position: absolute; left: 50%; transform: translateX(-50%); font-size: 11px; color: #9a9cab; font-weight: 500; }
.cd-body { flex: 1; display: grid; grid-template-columns: 30px 1fr; min-height: 0; }
.cd-act { background: #15161b; display: flex; flex-direction: column; align-items: center; gap: 12px; padding-top: 10px; }
.cd-act i { width: 14px; height: 14px; border-radius: 3px; border: 2px solid #5a5d6e; }
.cd-act i.is-on { border-color: #fff; }
.cd-main { display: grid; grid-template-rows: 22px 1fr 84px; min-width: 0; }
.cd-tabs { background: #15161b; display: flex; }
.cd-tabs b { font-size: 11px; font-weight: 500; color: #8a8c9a; padding: 5px 11px 0; }
.cd-tabs b.is-on { background: #1e1f26; color: #fff; box-shadow: inset 0 2px 0 #7c5cff; }
.cd-code { padding: 8px 0 0; font: 12.5px/18px "SF Mono", Menlo, Consolas, monospace; overflow: hidden; }
.cd-ln { display: block; white-space: pre; padding-left: 34px; position: relative; }
.cd-ln i { position: absolute; left: 0; width: 24px; text-align: right; color: #565a6e; }
.cd-code .k { color: #c792ea; } .cd-code .f { color: #82aaff; } .cd-code .s { color: #c3e88d; } .cd-code .p { color: #f78c6c; } .cd-code .c { color: #6c739a; font-style: italic; }
.hs--code.is-playing .cd-ln:not(.is-typed):not(.is-typing) { visibility: hidden; }
.cd-ln.is-typing { animation: cd-type var(--d, .6s) steps(var(--n, 16)) both; }
.cd-ln.is-typing::after { content: ""; display: inline-block; width: 7px; height: 14px; margin-left: 2px; vertical-align: -2px; background: #7c5cff; }
@keyframes cd-type { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.cd-term { border-top: 1px solid #2c2e38; background: #18191f; padding: 9px 12px; display: flex; flex-direction: column; gap: 7px; font: 12px/1.2 "SF Mono", Menlo, Consolas, monospace; color: #c9cbd6; }
.cd-tl em { color: #7c5cff; font-weight: 700; }
.cd-tl--ok { color: #3ddc84; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.cd-tl--ok .cd-tick { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: #3ddc84; color: #10131a; font-weight: 800; font-size: 11px; }
.hs--code.is-playing .cd-tl:not(.is-on) { visibility: hidden; }
.cd-tl.is-typing { animation: cd-type var(--d, .8s) steps(var(--n, 20)) both; }
.hs--code .cd-code, .hs--code .cd-term { transition: opacity .45s ease; }
.hs--code.is-clearing .cd-code, .hs--code.is-clearing .cd-term { opacity: 0; }
.cd-bar { display: inline-block; width: 92px; height: 7px; margin-left: 6px; vertical-align: 1px; border-radius: 4px; background: #2c2e38; overflow: hidden; }
.cd-bar i { display: block; height: 100%; width: 100%; background: #7c5cff; }
.hs--code.is-playing .cd-bar i { width: 0; }
.hs--code.is-playing .cd-bar i.is-going { width: 100%; transition: width 1.6s cubic-bezier(.4, 0, .2, 1); }
.hs--code.is-done .cd-tick { animation: cd-pop .45s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes cd-pop { from { transform: scale(.2); } to { transform: scale(1); } }

/* one-page About on home: same breathing room under the fixed header as the other sections */
.about-home { padding-top: 7em; }
.about-home .about-top { padding-top: 1em; }

/* laptop code at hero scale: realistic density, a little larger and crisper than editor size so it reads as code */
.hs--code { background: #16171d; }
.hs--code .cd-main { grid-template-rows: 22px 1fr 80px; }
.hs--code .cd-tabs b { font-size: 11.5px; font-weight: 600; }
.hs--code .cd-code { padding: 10px 0 0; font: 600 16px/24px "SF Mono", Menlo, Consolas, monospace; color: #eef0f4; }
.hs--code .cd-ln { padding-left: 36px; }
.hs--code .cd-ln i { width: 24px; color: #50546a; font-weight: 500; font-size: 13px; }
.hs--code .cd-code .k { color: #d2a6ff; } .hs--code .cd-code .f { color: #8ec5ff; } .hs--code .cd-code .s { color: #bfe98f; } .hs--code .cd-code .p { color: #ffa877; }
.hs--code .cd-ln.is-typing::after { width: 8px; height: 17px; vertical-align: -3px; }
.hs--code .cd-term { font: 600 13px/1.2 "SF Mono", Menlo, Consolas, monospace; gap: 7px; }

/* live Sankyo flip-clock face (heroClock): white numerals on dark flip cards behind a glossy window */
.hs--clock { width: 220px; height: 100px; background: linear-gradient(180deg, #1a1a1a, #0b0b0b 60%, #050505); filter: blur(.55px) contrast(.92); }
.hs--clock::after { background: linear-gradient(172deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .07) 20%, rgba(255, 255, 255, 0) 34%), linear-gradient(115deg, rgba(255, 255, 255, 0) 55%, rgba(255, 255, 255, .05) 62%, rgba(255, 255, 255, 0) 70%); box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .8), inset 0 8px 14px rgba(0, 0, 0, .7); }
.fc-scale { position: absolute; left: 14px; top: 18px; bottom: 18px; width: 14px; background: repeating-linear-gradient(180deg, rgba(220, 220, 220, .35) 0 1px, transparent 1px 6px); border-right: 1px solid rgba(220, 220, 220, .3); }
.fc-card { position: absolute; top: 20px; height: 62px; border-radius: 3px; background: linear-gradient(180deg, #232323 0 49%, #050505 49% 52%, #1b1b1b 52%); color: #d6d6d6; display: grid; place-items: center; font: 500 54px/1 "Helvetica Neue", Helvetica, Arial, sans-serif; letter-spacing: -.01em; transform-origin: 50% 50%; }
.fc-card b { font-weight: 500; text-shadow: 0 0 1px rgba(255, 255, 255, .25); }
.fc-card--h { left: 58px; width: 46px; }
.fc-card--m { left: 116px; width: 84px; }
.fc-card::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: rgba(0, 0, 0, .9); }
.fc-card.is-flip { animation: fc-flip .55s cubic-bezier(.3, 0, .2, 1); }
.fc-card.is-quick { animation: fc-flip .13s linear; }
@keyframes fc-flip { 0% { transform: perspective(160px) rotateX(0); } 45% { transform: perspective(160px) rotateX(-80deg); filter: brightness(.6); } 55% { transform: perspective(160px) rotateX(80deg); filter: brightness(.6); } 100% { transform: perspective(160px) rotateX(0); } }

/* toolkit as one row: twelve tools in a single magnifying dock; on phones it wraps into tidy centred rows */
.tk--single .dock { gap: .5em; }
.tk--single .dock__item { width: 4.4em; }
@media (hover: hover) and (pointer: fine) {
  .tk--single .dock__item.is-far { width: 5.1em; }
  .tk--single .dock__item.is-close { width: 6em; }
  .tk--single .dock__item.is-hover { width: 7em; }
}
@media (max-width: 760px) {
  .tk--single .dock { flex-wrap: wrap; justify-content: center; overflow: visible; height: auto; gap: .7em .6em; padding: .4em 0; max-width: 24em; margin: 0 auto; }
  .tk--single .dock__item { width: 3.6em; flex: none; }
}

/* Magic card: real proportions (63 x 88 mm), rounded corners, flips to its back; foil shine ported from Toad Tutor's
   CursorGloss (a contrast and saturation lift in a circle under the pointer, plus a band that sweeps across every 8 s) */
.tile-mtg { padding: 1.2em 1em 0; }
.mtg { display: block; width: 64%; margin: 0 auto; aspect-ratio: 600 / 838; cursor: pointer; perspective: 60em; }
.mtg__inner { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .8s var(--main); }
.mtg[aria-pressed="true"] .mtg__inner { transform: rotateY(180deg); }
.mtg__face { position: absolute; inset: 0; border-radius: 4.76% / 3.41%; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 .9em 1.6em -.9em rgba(0, 0, 0, .55), 0 .1em .25em rgba(0, 0, 0, .18); background: #111; }
.mtg__back { transform: rotateY(180deg); }
.mtg__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mtg__lift { filter: contrast(1.14) saturate(1.5) brightness(1.1); opacity: var(--tilt-hover, 0); transition: opacity .25s;
  -webkit-mask-image: radial-gradient(circle 7.5em at var(--sx, -1000px) var(--sy, -1000px), #000 0, #000 30%, transparent 100%);
  mask-image: radial-gradient(circle 7.5em at var(--sx, -1000px) var(--sy, -1000px), #000 0, #000 30%, transparent 100%); }
.mtg__sweep { filter: contrast(1.12) saturate(1.45) brightness(1.12); opacity: calc(1 - var(--tilt-hover, 0)); transition: opacity .25s;
  -webkit-mask-image: linear-gradient(115deg, rgba(0, 0, 0, .02) 45.5%, rgba(0, 0, 0, .6) 48.5%, #000 50%, rgba(0, 0, 0, .6) 51.5%, rgba(0, 0, 0, .02) 54.5%);
  mask-image: linear-gradient(115deg, rgba(0, 0, 0, .02) 45.5%, rgba(0, 0, 0, .6) 48.5%, #000 50%, rgba(0, 0, 0, .6) 51.5%, rgba(0, 0, 0, .02) 54.5%);
  -webkit-mask-size: 300% 100%; mask-size: 300% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; animation: mtg-sweep 8s linear infinite; }
@keyframes mtg-sweep { from { -webkit-mask-position: 100% 0; mask-position: 100% 0; } to { -webkit-mask-position: 0% 0; mask-position: 0% 0; } }
.mtg__holo { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: color-dodge; opacity: calc(var(--tilt-hover, 0) * .85); transition: opacity .25s; filter: saturate(135%) blur(18px);
  background: radial-gradient(circle 9em at var(--sx, -1000px) var(--sy, -1000px), rgba(255, 140, 210, .32) 0%, rgba(190, 140, 255, .24) 30%, rgba(110, 200, 255, .2) 55%, rgba(120, 255, 200, .1) 80%, transparent 100%); }
html.rm .mtg, html.rm .mtg__inner { transition: none; }
html.rm .mtg__sweep, html.rm .mtg__holo, html.rm .mtg__lift { display: none; }

/* Hardware tile: the Game Boy taken apart on the hero desk; on hover the parts lift and ease apart */
.tile-gb { background: radial-gradient(120% 85% at 50% 32%, #fdfcfa 0%, #f1eee9 70%, #ebe7e1 100%); }
.gb { position: relative; flex: 1; min-height: 0; container-type: size; }
.gb__set { position: absolute; left: 50%; top: 52%; width: min(calc(100cqw - 2.4em), calc((100cqh - 1.6em) * var(--ar, .735))); aspect-ratio: var(--ar, .735); transform: translate(-50%, -50%); }
.gb__part { position: absolute; display: block; height: auto; filter: drop-shadow(0 .12em .16em rgba(40, 30, 20, .28)); transition: transform .8s var(--main), filter .8s var(--main), opacity .5s var(--main); transition-delay: calc(var(--k, 0) * 28ms); will-change: transform; }
.tile-gb:hover .gb__part { transform: translate(calc(var(--dx, 0) * 2.2em), calc(var(--dy, 0) * 2.2em - .35em)) rotate(calc(var(--dx, 0) * 6deg)); filter: drop-shadow(0 .7em .7em rgba(40, 30, 20, .2)); }
html.rm .gb__part { transition: none; }
.tile-gb .bento__text { position: relative; }

/* ---------- easter eggs ---------- */
/* hero hotspots: invisible polygons over the plate; hover lifts the object itself (.glow), focus adds a dashed outline */
.hero__glow { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.glow { opacity: 0; transition: opacity .35s var(--main); }
.glow.is-on { opacity: 1; }
.hero__hot { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.hot { fill: rgba(255, 255, 255, 0); stroke: rgba(255, 255, 255, 0); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; pointer-events: all; cursor: pointer; outline: none; transition: fill .3s, stroke .3s; }
.hot:focus-visible { stroke: var(--ink); stroke-dasharray: 5 4; }

/* toast: one short line under the header */
.toast { position: fixed; left: 50%; top: calc(4.8em + env(safe-area-inset-top, 0px)); z-index: 140; max-width: calc(100vw - 2 * var(--g)); padding: .65em 1em; border-radius: .3em;
  background: var(--ink); color: var(--white); font-size: .95em; text-align: center; pointer-events: none; opacity: 0; transform: translate(-50%, -.6em); transition: opacity .3s var(--main), transform .45s var(--main); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast--gb { font-family: "SF Mono", Menlo, Consolas, monospace; font-weight: 700; letter-spacing: .2em; }
html.rm .toast { transform: translate(-50%, 0); }

/* helmet: both screens switch to a hologram-blue Imperial-style tactical console for about three seconds. In: a CRT power-on
   (a bright line opens to the full screen); hold with a faint holo flicker, scanlines and a turning radar; out: back
   to a line and off. Reduced motion: a plain fade. */
.imp { position: absolute; inset: 0; z-index: 4; display: none; background: #02070d; transform-origin: 50% 50%; }
.imp svg { display: block; width: 100%; height: 100%; }
.imp::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(0, 0, 0, .32) 0 1px, transparent 1px 3px), radial-gradient(ellipse 75% 70% at 50% 50%, transparent 55%, rgba(0, 0, 0, .55)); }
.imp-on { fill: #8fdcff; } .imp-off { fill: #8fdcff; fill-opacity: .18; }
.imp-a, .imp-t { filter: drop-shadow(0 0 3px rgba(110, 200, 255, .65)); }
.hero__frame.is-imperial .imp { display: block; animation: imp-crt 4.8s linear both; }
.hero__frame.is-imperial .imp svg { animation: imp-flicker 4.8s steps(1) both; }
.imp-sweep { transform-box: view-box; transform-origin: 130px 206px; }
.hero__frame.is-imperial .imp-sweep { animation: imp-spin 2.4s linear infinite; }
.hero__frame.is-imperial .imp-blips circle { animation: imp-blip 1.2s ease-out infinite; }
.hero__frame.is-imperial .imp-blips circle:nth-child(2) { animation-delay: .4s; } .hero__frame.is-imperial .imp-blips circle:nth-child(3) { animation-delay: .8s; }
.hero__frame.is-imperial .imp-lock { animation: imp-blink .5s steps(1) infinite; }
.hero__frame.is-imperial .imp-blink { animation: imp-blink .7s steps(1) infinite; }
.imp-m1, .imp-m2 { transform-box: view-box; }
.hero__frame.is-imperial .imp-m1 { animation: imp-mer 3s ease-in-out infinite alternate; }
.hero__frame.is-imperial .imp-m2 { animation: imp-mer2 3s ease-in-out infinite alternate; }
.hero__frame.is-imperial .imp-glyph path { animation: imp-type .9s steps(1) both; }
.hero__frame.is-imperial .imp-glyph path:nth-child(3n) { animation-delay: .35s; } .hero__frame.is-imperial .imp-glyph path:nth-child(3n+1) { animation-delay: .6s; }
@keyframes imp-crt {
  0% { transform: scale(1, .006); filter: brightness(3); opacity: 1; }
  6% { transform: scale(1, .006); filter: brightness(3); }
  12% { transform: scale(1, 1); filter: brightness(1.6); }
  16%, 86% { transform: scale(1, 1); filter: none; opacity: 1; }
  92% { transform: scale(1, .006); filter: brightness(2.5); opacity: 1; }
  96% { transform: scale(.02, .006); filter: brightness(3); opacity: 1; }
  100% { transform: scale(0, 0); opacity: 0; }
}
@keyframes imp-flicker { 0%, 100% { opacity: 1; } 21% { opacity: .82; } 22% { opacity: 1; } 47% { opacity: .9; } 48% { opacity: 1; } 71% { opacity: .78; } 72% { opacity: 1; } }
@keyframes imp-spin { to { transform: rotate(-360deg); } }
@keyframes imp-blip { 0% { opacity: 1; } 100% { opacity: .15; } }
@keyframes imp-blink { 50% { opacity: .2; } }
@keyframes imp-type { 0% { opacity: 0; } 100% { opacity: 1; } }
@keyframes imp-mer { from { rx: 46px; } to { rx: 8px; } }
@keyframes imp-mer2 { from { rx: 20px; } to { rx: 62px; } }
html.rm .hero__frame.is-imperial .imp { animation: imp-fade 4.8s ease both; }
html.rm .hero__frame.is-imperial .imp *, html.rm .hero__frame.is-imperial .imp svg { animation: none !important; }
@keyframes imp-fade { 0%, 100% { opacity: 0; } 12%, 88% { opacity: 1; } }

/* keyboard: what you type shows on the laptop, then its own script resumes */
.cd-echo { display: none; position: relative; padding-left: 36px; white-space: pre-wrap; word-break: break-all; }
.cd-echo i { position: absolute; left: 0; width: 24px; text-align: right; color: #50546a; font-weight: 500; font-size: 13px; }
.cd-echo::after { content: ""; display: inline-block; width: 8px; height: 17px; margin-left: 2px; vertical-align: -3px; background: #7c5cff; }
.hs--code.is-echo .cd-ln { display: none; }
.hs--code.is-echo .cd-echo { display: block; }
.hs--code.is-echo .cd-term { visibility: hidden; }

/* ---------- dark theme (data-theme="dark", set by /js/theme.js before paint) ---------- */
.footer__right { gap: .5em; }
.theme-btn .theme-btn__ico { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
html[data-theme="dark"] {
  --page: #0e0f11; --ink: #ecebe8; --ink-2: #b9b8b4; --muted: #8f8e8a; --grey: #4b4c50; --line: #26272b; --chip: #1e1f23; --panel: #17181b; --white: #151619; --live: #3ccf80;
  color-scheme: dark;
}
html[data-theme="dark"] .btn--dark:hover, html[data-theme="dark"] .status:hover { background: #fff; }
html[data-theme="dark"] .status time { color: #5b5c60; }
html[data-theme="dark"] .status__sep { background: rgba(0, 0, 0, .2); }
html[data-theme="dark"] .nav__veil { background: linear-gradient(rgba(14, 15, 17, .86) 55%, rgba(14, 15, 17, 0)); }
html[data-theme="dark"] .menu { box-shadow: 0 1.5em 3em -1.5em rgba(0, 0, 0, .8); }
html[data-theme="dark"] .menu__backdrop { background: #000; }
html[data-theme="dark"] .tile-gb { background: radial-gradient(120% 85% at 50% 32%, #24221f 0%, #1a1917 70%, #151413 100%); }
html[data-theme="dark"] .case-card__logo, html[data-theme="dark"] .xp__logo { box-shadow: 0 .4em 1em -.4em rgba(0, 0, 0, .8); }
html[data-theme="dark"] .toast { box-shadow: 0 .8em 2em -1em rgba(0, 0, 0, .8); }

/* ---------- round 2: desk interactions ---------- */
.hero__fx { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
/* mug: faint vapour on hover; a sip sends up a brief stronger puff */
.steam { display: none; }
.is-steam .steam, .is-sip .steam { display: inline; }
.steam__w { opacity: 0; transform-box: fill-box; transform-origin: 50% 100%; }
.is-steam .steam__w, .is-sip .steam__w { animation: steam 5.2s cubic-bezier(.35, .1, .4, 1) infinite; }
.is-steam .steam__w[data-k="1"], .is-sip .steam__w[data-k="1"] { animation-delay: -1.75s; }
.is-steam .steam__w[data-k="2"], .is-sip .steam__w[data-k="2"] { animation-delay: -3.5s; }
.is-sip .steam__w { animation-duration: 3.4s; }
@keyframes steam { 0% { opacity: 0; transform: translateY(10px) scale(.6, .7); } 18% { opacity: .95; } 55% { opacity: .6; } 100% { opacity: 0; transform: translateY(-230px) scale(1.7, 1.5); } }
html.rm .is-steam .steam__w, html.rm .is-sip .steam__w { animation: none; opacity: .35; transform: translateY(-50px) scale(1.1); }
/* headphones: a small status light on each cup (with a soft halo) while the lo-fi plays */
.hp-led .hp-halo { fill: #5dffb0; opacity: 0; filter: blur(4px); transition: opacity .5s; }
.hp-led .hp-dot { fill: #d9ffe9; opacity: 0; filter: drop-shadow(0 0 3px #3dff9a) drop-shadow(0 0 6px #3dff9a); transition: opacity .3s; }
.is-music .hp-led .hp-dot { opacity: 1; animation: hp-led 2.4s ease-in-out infinite; }
.is-music .hp-led .hp-halo { opacity: .38; animation: hp-led 2.4s ease-in-out infinite; }
@keyframes hp-led { 50% { opacity: .6; } }
html.rm .is-music .hp-led * { animation: none; }
/* Mojo84: the orange keys ripple through RGB on hover */
.kglow { fill: #ff4d1f; opacity: 0; filter: drop-shadow(0 0 5px currentColor); }
.is-rgb .kglow { animation: krgb 1.4s linear infinite; }
.is-rgb .kglow:nth-child(2) { animation-delay: .12s; } .is-rgb .kglow:nth-child(3) { animation-delay: .24s; } .is-rgb .kglow:nth-child(4) { animation-delay: .36s; }
@keyframes krgb { 0%, 100% { fill: #ff2d55; color: #ff2d55; opacity: .72; } 20% { fill: #ffd60a; color: #ffd60a; } 40% { fill: #30d158; color: #30d158; } 60% { fill: #0a84ff; color: #0a84ff; } 80% { fill: #bf5af2; color: #bf5af2; } }
html.rm .is-rgb .kglow { animation: none; fill: #0a84ff; opacity: .8; }
/* bonsai: the season in Japan, and a watering moment */
.bonsai-tint, .bonsai__dots circle { display: none; }
[data-season="spring"] .bonsai-tint { display: inline; filter: url(#bs-spring); }
[data-season="summer"] .bonsai-tint { display: inline; filter: url(#bs-summer); }
[data-season="autumn"] .bonsai-tint { display: inline; filter: url(#bs-autumn); }
[data-season="winter"] .bonsai-tint { display: inline; filter: url(#bs-winter); }
[data-season="spring"] .bonsai__dots circle { display: inline; fill: #f6b3c8; opacity: .95; }
[data-season="winter"] .bonsai__dots circle { display: inline; fill: #fff; opacity: .92; }
.grow { transform-box: fill-box; transform-origin: 50% 100%; animation: grow 1.1s cubic-bezier(.3, 1.5, .5, 1) both; }
@keyframes grow { from { transform: scale(0); } }
.drop { fill: #9fd3ff; opacity: .9; }
html.rm .grow { animation: none; }
/* helmet: on hover the eye lenses light up in hologram blue (the real lens shapes, so it fits at any size) */
.lens-glow polygon { opacity: 0; filter: drop-shadow(0 0 6px rgba(120, 210, 255, .9)); transition: opacity .45s var(--main); mix-blend-mode: screen; }
.is-eyes .lens-glow polygon { opacity: .82; }
/* the pendant lamp: dark mode's switch */
.lamp { transform-box: view-box; transform-origin: 900px 212px; }
.lamp__cord { stroke: #1d1d1f; stroke-width: 2.5; }
.lamp__cap { fill: #b4925c; }
.lamp__rim { fill: #2b2c30; }
.lamp__bulb { opacity: 0; transition: opacity .6s; }
.lamp__beam { opacity: 0; mix-blend-mode: screen; transition: opacity .8s; }
.lamp__shade { transition: filter .3s; }
.lamp.is-on .lamp__shade { filter: brightness(1.6); }
.lamp.is-swing { animation: swing 1.6s cubic-bezier(.3, 0, .2, 1); }
@keyframes swing { 20% { transform: rotate(2.4deg); } 45% { transform: rotate(-1.6deg); } 70% { transform: rotate(.8deg); } }
html.rm .lamp.is-swing { animation: none; }
.clock-keep { display: none; }
.hero__pool { position: absolute; left: 6%; top: 4%; width: 86%; height: 62%; pointer-events: none; opacity: 0; transition: opacity .8s var(--main);
  background: radial-gradient(closest-side at 50% 52%, rgba(255, 186, 112, .55), rgba(255, 164, 92, .22) 55%, rgba(255, 160, 90, 0)); mix-blend-mode: screen; }
/* iPad: wakes straight into Toad Tutor's life counter. The screen is fitted to the measured glass and rounded like it;
   his shoulder (the person video) covers its corner. */
.hs--ipad { width: 300px; height: 400px; border-radius: 15px; background: #050506; opacity: 0; transition: opacity .45s var(--main), background-color .6s var(--main); }
.hs--ipad::after { border-radius: inherit; }
.hs--ipad.is-on { opacity: 1; }
.ip-app { position: absolute; inset: 0; display: grid; grid-template-rows: 1fr 1fr; gap: 8px; padding: 10px; background: #0d0d10; border-radius: inherit;
  clip-path: circle(0% at 50% 50%); transition: clip-path .9s cubic-bezier(.65, 0, .25, 1); font-family: "General Sans", system-ui, sans-serif; }
.hs--ipad.is-shipped .ip-app { clip-path: circle(75% at 50% 50%); }
.ip-half { position: relative; display: grid; grid-template-columns: 1fr 2.2fr 1fr; align-items: center; justify-items: center; border-radius: 16px; color: #fff; overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), inset 0 -20px 40px rgba(0, 0, 0, .18); }
.ip-half span { font-size: 92px; font-weight: 600; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; text-shadow: 0 2px 12px rgba(0, 0, 0, .18); }
.ip-half b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .16); font: 500 22px/1 system-ui, sans-serif; }
.ip-half i { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); padding: 3px 10px; border-radius: 99px; background: rgba(0, 0, 0, .18); font: 600 11px/1.2 "General Sans", system-ui, sans-serif; font-style: normal; letter-spacing: .02em; }
.ip-half--a { background: radial-gradient(120% 90% at 30% 20%, #8f6bff, #5530d1 70%); transform: rotate(180deg); }
.ip-half--b { background: radial-gradient(120% 90% at 30% 20%, #2fd39a, #0c8a5f 70%); }
.ip-app em { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 6px 12px; border-radius: 99px; background: #0d0d10; color: #fff; font: 600 11px/1 "General Sans", system-ui, sans-serif; font-style: normal; letter-spacing: .08em; text-transform: uppercase; box-shadow: 0 0 0 4px #0d0d10; }
html.rm .ip-app { transition: opacity .5s; clip-path: none; opacity: 0; }
html.rm .hs--ipad.is-shipped .ip-app { opacity: 1; }

/* monitor: modes */
.ms { position: absolute; inset: 0; display: none; }
.ms.is-on { display: flex; flex-direction: column; }
.ms--code { background: #16171d; color: #e6e6e6; font: 500 12px/1.2 system-ui, sans-serif; }
.mv-top { height: 26px; flex: none; display: flex; align-items: center; gap: 6px; padding: 0 10px; background: #111217; position: relative; }
.mv-top i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; } .mv-top i:nth-child(2) { background: #febc2e; } .mv-top i:nth-child(3) { background: #28c840; }
.mv-top b { position: absolute; left: 50%; transform: translateX(-50%); color: #9a9cab; font-weight: 500; font-size: 11.5px; }
.mv-body { flex: 1; display: grid; grid-template-columns: 128px 1fr; min-height: 0; }
.mv-tree { background: #121318; padding: 10px 8px; color: #8a8c9a; font-size: 12px; display: grid; align-content: start; gap: 6px; }
.mv-tree .is-in { padding-left: 12px; } .mv-tree .is-sel { color: #fff; background: #23253a; border-radius: 4px; }
.mv-code { padding: 12px 0 0; font: 600 14.5px/22px "SF Mono", Menlo, Consolas, monospace; color: #eef0f4; overflow: hidden; }
.mv-ln { display: block; white-space: pre; padding-left: 44px; position: relative; }
.mv-ln i { position: absolute; left: 0; width: 30px; text-align: right; color: #50546a; font-weight: 500; font-size: 12px; font-style: normal; }
.ms--code .k { color: #d2a6ff; } .ms--code .f { color: #8ec5ff; } .ms--code .s { color: #bfe98f; } .ms--code .p { color: #ffa877; } .ms--code .c { color: #6c739a; font-style: italic; }
.ms--code.is-on .mv-ln { animation: mv-type 9s steps(1) infinite; }
.ms--code.is-on .mv-ln:nth-child(2) { animation-delay: .5s; } .ms--code.is-on .mv-ln:nth-child(3) { animation-delay: 1s; } .ms--code.is-on .mv-ln:nth-child(4) { animation-delay: 1.5s; } .ms--code.is-on .mv-ln:nth-child(5) { animation-delay: 2s; }
.ms--code.is-on .mv-ln:nth-child(6) { animation-delay: 2.5s; } .ms--code.is-on .mv-ln:nth-child(7) { animation-delay: 3s; } .ms--code.is-on .mv-ln:nth-child(8) { animation-delay: 3.5s; } .ms--code.is-on .mv-ln:nth-child(9) { animation-delay: 4s; }
@keyframes mv-type { 0% { clip-path: inset(0 100% 0 0); } 2% { clip-path: inset(0 60% 0 0); } 4% { clip-path: inset(0 20% 0 0); } 6%, 92% { clip-path: inset(0 0 0 0); } 100% { clip-path: inset(0 100% 0 0); } }
.mv-status { height: 20px; flex: none; display: flex; justify-content: space-between; align-items: center; padding: 0 10px; background: #5b3fd1; color: #fff; font-size: 11px; }
.ms--board { background: #191a1f; color: #e8e8ea; font: 500 12px/1.2 system-ui, sans-serif; padding: 12px; gap: 10px; }
.kb-head { display: flex; align-items: center; gap: 12px; color: #8b8d98; } .kb-head b { color: #fff; font-size: 14px; margin-right: 6px; }
.kb-cols { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; min-height: 0; }
.kb-col { background: #212228; border-radius: 6px; padding: 8px; display: flex; flex-direction: column; gap: 7px; }
.kb-col > p { color: #a3a5b1; font-size: 11.5px; } .kb-col > p i { font-style: normal; color: #6c6e7a; margin-left: 4px; }
.kb-card { display: grid; gap: 6px; padding: 8px; border-radius: 5px; background: #2b2d35; box-shadow: 0 1px 0 rgba(0, 0, 0, .4); }
.kb-card b { font-weight: 600; font-size: 12px; color: #f1f1f3; } .kb-card em { font-style: normal; font-size: 10.5px; color: #7d8090; }
.ms--board.is-on .kb-card--move { animation: kb-move 6s cubic-bezier(.6, 0, .2, 1) infinite; position: relative; z-index: 1; }
@keyframes kb-move { 0%, 30% { transform: none; box-shadow: 0 1px 0 rgba(0, 0, 0, .4); } 40% { transform: translate(40px, -8px) rotate(3deg); box-shadow: 0 10px 20px rgba(0, 0, 0, .5); } 55%, 90% { transform: translate(154px, 0); box-shadow: 0 1px 0 rgba(0, 0, 0, .4); } 100% { transform: none; } }
.ms--dash { flex-direction: row !important; background: #f6f6f4; color: #1c1c1c; font: 500 12px/1.2 system-ui, sans-serif; }
.db-side { width: 44px; background: #1c1c1f; display: flex; flex-direction: column; align-items: center; gap: 12px; padding-top: 14px; }
.db-side i { width: 16px; height: 16px; border-radius: 4px; background: #45464d; } .db-side i.is-on { background: #7c5cff; }
.db-main { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; min-width: 0; }
.db-head { display: flex; justify-content: space-between; } .db-head b { font-size: 15px; } .db-head span { color: #7a7a7a; }
.db-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.db-tiles p { display: grid; gap: 4px; padding: 9px 10px; border-radius: 7px; background: #fff; box-shadow: 0 0 0 1px #e8e8e5; }
.db-tiles em { font-style: normal; color: #7a7a7a; font-size: 11px; } .db-tiles b { font-size: 20px; letter-spacing: -.02em; } .db-tiles i { font-style: normal; font-size: 10.5px; color: #7a7a7a; } .db-tiles i.up { color: #1f9d55; }
.db-chart { flex: 1; position: relative; border-radius: 7px; background: #fff; box-shadow: 0 0 0 1px #e8e8e5; overflow: hidden; min-height: 0; }
.db-chart svg { position: absolute; inset: 10px 10px 34px; width: calc(100% - 20px); height: calc(100% - 44px); }
.db-area { fill: rgba(124, 92, 255, .12); }
.db-line { fill: none; stroke: #7c5cff; stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-dasharray: 1; }
.ms--dash.is-on .db-line { animation: db-draw 5s ease-in-out infinite; }
@keyframes db-draw { 0% { stroke-dashoffset: 1; } 45%, 100% { stroke-dashoffset: 0; } }
.db-bars { position: absolute; left: 10px; right: 10px; bottom: 8px; height: 22px; display: flex; align-items: flex-end; gap: 4px; }
.db-bars i { flex: 1; height: 60%; background: #d9d2ff; border-radius: 2px; transform-origin: bottom; }
.ms--dash.is-on .db-bars i { animation: db-bar 2.4s ease-in-out infinite alternate; }
.db-bars i:nth-child(3n) { animation-delay: -.8s; height: 85%; } .db-bars i:nth-child(3n+1) { animation-delay: -1.5s; height: 40%; }
@keyframes db-bar { from { transform: scaleY(.5); } to { transform: scaleY(1); } }
html.rm .ms.is-on *, html.rm .ms.is-on { animation: none !important; }
.hero__frame.is-switch .hs--design .ms.is-on { animation: ms-in .4s var(--main); }
@keyframes ms-in { from { opacity: 0; filter: brightness(2); } }
/* MacBook: deploy confetti */
.hero__confetti { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.confetti { position: absolute; width: .55em; height: .3em; border-radius: 1px; }
/* night (dark theme): the plate and the person get one shared grade; lamp light, glowing screens */
html[data-theme="dark"] .hero__frame--plate { -webkit-mask-image: radial-gradient(ellipse 72% 64% at 50% 44%, #000 62%, transparent 100%); mask-image: radial-gradient(ellipse 72% 64% at 50% 44%, #000 62%, transparent 100%); }
/* the room falls away from the lamp: darkness under the screens (so they still glow), over the plate and the person */
.hero__dusk { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .8s var(--main);
  background: radial-gradient(ellipse 54% 47% at 48% 42%, rgba(14, 15, 17, 0) 38%, rgba(14, 15, 17, .42) 64%, rgba(14, 15, 17, .86) 86%, #0e0f11 100%); }
html[data-theme="dark"] .hero__dusk { opacity: 1; }
html[data-theme="dark"] .hero__plate, html[data-theme="dark"] .hero__person, html[data-theme="dark"] .hero__matte, html[data-theme="dark"] .hero__glow { filter: url(#f-night); }
html[data-theme="dark"] .hero__pool, html[data-theme="dark"] .lamp__bulb { opacity: 1; }
html[data-theme="dark"] .lamp__beam { opacity: .5; }
html[data-theme="dark"] .clock-keep { display: inline; opacity: .92; }
html[data-theme="dark"] .hs--design, html[data-theme="dark"] .hs--code { box-shadow: 0 0 46px 6px rgba(120, 140, 255, .28); }
html[data-theme="dark"] .hs--ipad { box-shadow: 0 0 30px 4px rgba(255, 255, 255, .2); }
html[data-theme="dark"] .lamp__cord { stroke: #3a3b40; }

/* Game Boy mode (Konami code): the site in the four DMG greens */
html.gbmode { --page: #9bbc0f; --white: #9bbc0f; --chip: #8bac0f; --panel: #8bac0f; --line: #306230; --grey: #306230; --ink: #0f380f; --ink-2: #0f380f; --muted: #0f380f; --live: #0f380f; }
html.gbmode .nav__veil { background: linear-gradient(rgba(155, 188, 15, .9) 55%, rgba(155, 188, 15, 0)); }
html.gbmode .btn--dark:hover, html.gbmode .status:hover { background: #306230; }
html.gbmode .status time { color: #8bac0f; }
html.gbmode main img, html.gbmode main video, html.gbmode main canvas, html.gbmode main .hs, html.gbmode .bento__card { filter: url(#f-dmg); }
html.gbmode .hero__frame .hs, html.gbmode .hero__frame img, html.gbmode .hero__frame video, html.gbmode .hero__frame canvas { filter: none; }
html.gbmode .hero__frame { filter: url(#f-dmg); }

/* Game Boy boot intro (Game Boy parts, the tile, or the Konami code): RICHARDSON slides down an LCD, chime, then the site
   switches. It plays on the hero monitor, on the tile, or in a small floating screen when neither is in view. */
.gbboot { position: absolute; inset: 0; z-index: 7; display: grid; place-items: center; overflow: hidden; container-type: size; background: #9bbc0f; opacity: 0; transition: opacity .25s; }
.gbboot.is-in { opacity: 1; }
.gbboot__logo { font: 800 italic 12.5cqw/1 "General Sans", system-ui, sans-serif; letter-spacing: -.02em; color: #0f380f; transform: translateY(-70cqh); }
.gbboot.is-run .gbboot__logo { transform: translateY(0); transition: transform 1.6s steps(32); }
.gbboot__sub { position: absolute; left: 0; right: 0; bottom: 18cqh; text-align: center; font: 700 4.4cqw/1 "SF Mono", Menlo, Consolas, monospace; letter-spacing: .3em; color: #306230; opacity: 0; }
.gbboot.is-done .gbboot__sub { opacity: 1; }
.gbboot--float { position: fixed; left: 50%; top: 50%; inset: auto; width: min(22em, 80vw); aspect-ratio: 10 / 9; transform: translate(-50%, -50%); z-index: 160; border: .9em solid #4a4d5c; border-radius: .6em .6em 2.2em .6em; box-shadow: 0 2em 4em -1em rgba(0, 0, 0, .5); }
.gb .gbboot { border-radius: .3em; }
html.rm .gbboot__logo { transform: none; }
html.rm .gbboot.is-run .gbboot__logo { transition: none; }
/* while Game Boy mode is on: a sticky way out */
.gbpill { position: fixed; left: var(--g); bottom: calc(var(--g) + env(safe-area-inset-bottom, 0px)); z-index: 95; display: none; align-items: center; gap: .6em; height: 2.9em; padding: 0 1em; border-radius: .35em;
  background: #0f380f; color: #9bbc0f; border: 2px solid #306230; font: 700 .8em/1 "SF Mono", Menlo, Consolas, monospace; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.gbpill:hover { background: #306230; color: #e0f8d0; }
.gbpill kbd { font: inherit; padding: .2em .45em; border: 1px solid #8bac0f; border-radius: .2em; }
html.gbmode .gbpill { display: inline-flex; }
html.cal-open .gbpill, [data-nav-status="open"] .gbpill { visibility: hidden; }
@media (max-width: 560px) { .gbpill { bottom: calc(var(--g) + 3.7em + env(safe-area-inset-bottom, 0px)); } }
.tile-gb { cursor: pointer; }

/* lo-fi player: the status pill morphs into it (same place, size language and colours). Track, artist credit, a
   scrubber with times, and prev / play-pause / next / close. */
.player { position: fixed; z-index: 91; right: var(--g); bottom: calc(var(--g) + env(safe-area-inset-bottom, 0px)); display: inline-flex; align-items: center; gap: .85em;
  max-width: calc(100vw - 2 * var(--g)); padding: .55em .5em .55em 1em; border-radius: .35em; background: var(--ink); color: var(--white); font-size: .95em;
  box-shadow: 0 1em 2em -1.2em rgba(0, 0, 0, .55); visibility: hidden; opacity: 0; pointer-events: none; overflow: visible;
  clip-path: inset(var(--it, 0px) var(--ir, 0px) 0 var(--il, 0px) round .35em); transition: clip-path .55s var(--main), opacity .25s, visibility 0s .55s; }
.player.is-measure { visibility: hidden !important; transition: none !important; clip-path: none !important; }
.player.is-on { visibility: visible; opacity: 1; pointer-events: auto; clip-path: inset(0 0 0 0 round .35em); transition: clip-path .55s var(--main), opacity .2s; }
/* the moment it arrives: a soft green glow breathes out from the chip twice, so the eye goes there */
.player.is-arrive { clip-path: none; }
.player.is-arrive::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; animation: pl-arrive 1.1s ease-out 2; }
@keyframes pl-arrive { 0% { box-shadow: 0 0 0 0 rgba(61, 220, 132, .65), inset 0 0 0 1px rgba(61, 220, 132, .9); } 100% { box-shadow: 0 0 0 .9em rgba(61, 220, 132, 0), inset 0 0 0 1px rgba(61, 220, 132, 0); } }
.player > * { opacity: 0; transition: opacity .2s; }
.player.is-on > * { opacity: 1; transition: opacity .3s .22s; }
.player__eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 1em; flex: none; }
.player__eq i { width: 3px; height: 100%; border-radius: 1px; background: #3ddc84; transform-origin: bottom; animation: pl-eq .9s ease-in-out infinite alternate; }
.player__eq i:nth-child(2) { animation-duration: .62s; } .player__eq i:nth-child(3) { animation-duration: 1.1s; animation-delay: -.3s; } .player__eq i:nth-child(4) { animation-duration: .74s; animation-delay: -.5s; }
.player.is-paused .player__eq i { animation-play-state: paused; }
@keyframes pl-eq { from { transform: scaleY(.25); } to { transform: scaleY(1); } }
.player__meta { display: grid; gap: .35em; min-width: 0; width: 15.5em; }
.player__line { display: flex; align-items: baseline; gap: .5em; min-width: 0; line-height: 1.15; }
.player__t { font-size: .92em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.player__credit { flex: none; font-size: .75em; color: rgba(255, 255, 255, .5); white-space: nowrap; }
.player__credit:hover, .player__credit:focus-visible { color: rgba(255, 255, 255, .85); text-decoration: underline; }
.player__row { display: flex; align-items: center; gap: .5em; }
.player__time { flex: none; font-size: .72em; color: rgba(255, 255, 255, .6); font-variant-numeric: tabular-nums; min-width: 2.6em; }
.player__time--dur { text-align: right; }
.player__seek { flex: 1; min-width: 0; height: 1.1em; margin: 0; background: none; -webkit-appearance: none; appearance: none; cursor: pointer; --p: 0%; }
.player__seek::-webkit-slider-runnable-track { height: 3px; border-radius: 3px; background: linear-gradient(90deg, rgba(255, 255, 255, .85) var(--p), rgba(255, 255, 255, .18) var(--p)); }
.player__seek::-moz-range-track { height: 3px; border-radius: 3px; background: linear-gradient(90deg, rgba(255, 255, 255, .85) var(--p), rgba(255, 255, 255, .18) var(--p)); }
.player__seek::-webkit-slider-thumb { -webkit-appearance: none; width: 11px; height: 11px; margin-top: -4px; border-radius: 50%; background: #fff; border: 0; opacity: 0; transition: opacity .2s; }
.player__seek::-moz-range-thumb { width: 11px; height: 11px; border-radius: 50%; background: #fff; border: 0; opacity: 0; transition: opacity .2s; }
.player__seek:hover::-webkit-slider-thumb, .player__seek:focus-visible::-webkit-slider-thumb { opacity: 1; }
.player__seek:hover::-moz-range-thumb, .player__seek:focus-visible::-moz-range-thumb { opacity: 1; }
.player__seek:focus-visible { outline: 2px solid rgba(255, 255, 255, .8); outline-offset: 3px; border-radius: 2px; }
.player__ctl { display: flex; align-items: center; gap: .2em; flex: none; }
.player__btn { display: grid; place-items: center; width: 2.1em; height: 2.1em; border-radius: .25em; color: inherit; transition: background-color .2s; }
.player__btn:hover { background: rgba(255, 255, 255, .12); }
.player__btn--main { background: rgba(255, 255, 255, .12); }
.player__btn--main:hover { background: rgba(255, 255, 255, .22); }
.player__btn:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.player__btn svg { width: 1em; height: 1em; fill: currentColor; }
.player__btn--x svg { width: .8em; height: .8em; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.player .i-play { display: none; } .player.is-paused .i-play { display: block; } .player.is-paused .i-pause { display: none; }
.status { transition: transform .5s var(--main), opacity .3s var(--main), background-color .25s; }
.status.is-playing { opacity: 0; pointer-events: none; visibility: hidden; transition: transform .5s var(--main), opacity .3s var(--main), visibility 0s .3s; } /* hidden from keyboard and screen readers too */
html.cal-open .player { visibility: hidden; }
html.rm .player__eq i { animation: none; }
html.rm .player, html.rm .player.is-on { transition: opacity .2s; clip-path: none; }
@media (max-width: 560px) {
  .player { right: auto; left: 50%; transform: translateX(-50%); font-size: .85em; gap: .6em; padding-left: .8em; }
  .player__meta { width: auto; flex: 1; }
  .player__credit, .player__time { display: none; }
  .player__btn--prev { display: none; }
}

.hero__frame.is-mapped .hero__person.is-ready { visibility: visible; }

/* headphones on his head: the stand-empty patch, the worn pair (follows the head track) and the pair in flight */
.hp { position: absolute; left: 0; top: 0; display: block; max-width: none; pointer-events: none; opacity: 0; }
.hp--worn { will-change: transform; }
.hero__frame.is-worn .hp--patch, .hero__frame.is-worn .hp--worn { opacity: 1; }
.hero__frame.is-worn .hp-led { display: none; }
.hero__frame:not(.is-worn) [data-hot="head"] { pointer-events: none; }
.hero__frame.is-worn [data-glow="headphones"] { display: none; }
.hp-led { display: none; }

/* helmet: a short opening crawl on the laptop while the monitor shows the radar console; both run 4.8 s and end
   together (the crawl fades out over its last .45 s as the console's CRT closes) */
.crawl { position: absolute; inset: 0; z-index: 6; display: none; background: #020308; overflow: hidden; }
.crawl__stars { position: absolute; inset: 0; width: 100%; height: 100%; }
.crawl__view { position: absolute; inset: 0; perspective: 200px; perspective-origin: 50% 0%;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 30%, #000 100%); mask-image: linear-gradient(to bottom, transparent 0%, #000 30%, #000 100%); }
.crawl__text { position: absolute; left: 12%; right: 12%; top: 92%; transform-origin: 50% 0%; transform: rotateX(24deg) translateY(0);
  color: #ffd83a; font-family: "General Sans", "Helvetica Neue", Arial, sans-serif; font-weight: 700; font-size: 19px; line-height: 1.3; text-align: center; }
.crawl__text p { margin: 0 0 .7em; }
.crawl__ep { font-size: .78em; letter-spacing: .14em; text-transform: uppercase; margin-bottom: .2em !important; }
.crawl__title { font-size: 1.55em; letter-spacing: .08em; }
.crawl__card { display: none; position: absolute; inset: 12% 10%; color: #ffd83a; font: 700 17px/1.35 "General Sans", "Helvetica Neue", Arial, sans-serif; text-align: center; }
.crawl__card p { margin: 0 0 .6em; }
.crawl__card .crawl__title { font-size: 1.5em; }
.hero__frame.is-crawl .crawl { display: block; animation: crawl-in .35s ease both; }
.hero__frame.is-crawl .crawl__text { animation: crawl-up 4.5s linear .15s both; }
.hero__frame.is-crawl .crawl__stars { animation: crawl-stars 4.8s linear both; }
.hero__frame.is-crawl.is-crawl-out .crawl { animation: crawl-out .45s ease both; }
.hero__frame.is-crawl .hs--code .imp { display: none !important; }
@keyframes crawl-in { from { opacity: 0; filter: brightness(2.2); } }
@keyframes crawl-out { to { opacity: 0; } }
@keyframes crawl-up { from { transform: rotateX(24deg) translateY(0); } to { transform: rotateX(24deg) translateY(-118%); } }
@keyframes crawl-stars { from { transform: scale(1); } to { transform: scale(1.05); } }
html.rm .hero__frame.is-crawl .crawl__view { display: none; }
html.rm .hero__frame.is-crawl .crawl__card { display: block; }
html.rm .hero__frame.is-crawl .crawl, html.rm .hero__frame.is-crawl .crawl__stars { animation: none; }

/* command menu (Cmd/Ctrl+K or /) */
.kbd-hint { display: inline-flex; align-items: center; gap: .45em; color: var(--muted); font-size: .92em; }
.kbd-hint kbd { font: 500 .85em/1 "SF Mono", Menlo, Consolas, monospace; padding: .25em .45em; border: 1px solid var(--line); border-radius: .3em; background: var(--page); color: var(--ink-2); }
.kbd-hint:hover kbd, .kbd-hint:focus-visible kbd { border-color: var(--ink); color: var(--ink); }
.cmdk { position: fixed; inset: 0; z-index: 170; }
.cmdk[hidden] { display: none; }
.cmdk__backdrop { position: absolute; inset: 0; background: rgba(20, 20, 20, .32); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: cmdk-fade .2s ease both; }
.cmdk__panel { position: absolute; left: 50%; top: max(10vh, 4.5em); transform: translateX(-50%); width: min(36em, calc(100vw - 2 * var(--g))); max-height: min(30em, 76vh);
  display: flex; flex-direction: column; border-radius: .6em; background: var(--page); color: var(--ink); border: 1px solid var(--line);
  box-shadow: 0 2em 4em -1.5em rgba(0, 0, 0, .45); overflow: hidden; animation: cmdk-in .28s var(--main) both; }
.cmdk__search { display: flex; align-items: center; gap: .7em; padding: .9em 1em; border-bottom: 1px solid var(--line); }
.cmdk__ico { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.cmdk__input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: 1.1em; color: var(--ink); }
.cmdk__input::placeholder { color: var(--muted); }
.cmdk__esc { font: 500 .75em/1 "SF Mono", Menlo, Consolas, monospace; padding: .3em .45em; border: 1px solid var(--line); border-radius: .3em; color: var(--muted); }
.cmdk__list { overflow-y: auto; padding: .4em; overscroll-behavior: contain; }
.cmdk__group { padding: .8em .7em .35em; font-size: .78em; letter-spacing: .04em; color: var(--muted); }
.cmdk__item { display: flex; align-items: center; justify-content: space-between; gap: 1em; padding: .62em .7em; border-radius: .35em; cursor: pointer; }
.cmdk__item.is-active { background: var(--ink); color: var(--white); }
.cmdk__meta { font-size: .8em; color: var(--muted); }
.cmdk__item.is-active .cmdk__meta { color: inherit; opacity: .65; }
.cmdk__empty { padding: 1.2em 1.1em 1.4em; color: var(--muted); }
@keyframes cmdk-fade { from { opacity: 0; } }
@keyframes cmdk-in { from { opacity: 0; transform: translate(-50%, -.6em) scale(.98); } }
html.rm .cmdk__panel, html.rm .cmdk__backdrop { animation: none; }
@media (max-width: 560px) { .cmdk__panel { top: 4em; max-height: 70vh; } .cmdk__esc { display: none; } }

/* the grey comment-style headings, darkened just enough to pass contrast: 3:1 for large headings, 4.5:1 for smaller
   comment text (was var(--grey), #cdcdcd) */
:root { --cmt-lg: #919191; --cmt: #737373; }
.sh { color: var(--cmt-lg); }
.stats__h, .cmt { color: var(--cmt); }
html.gbmode .sh, html.gbmode .stats__h, html.gbmode .cmt { color: var(--grey); }

.hero__frame.is-imperial.is-crawl-out .imp { animation: crawl-out .3s ease both; }

/* ================= language switch and Japanese pages ================= */
/* EN / 日本語 in the header: a small segmented control; the current language is filled. Stays visible on phones. */
.lang { flex: none; white-space: nowrap; display: inline-flex; align-items: center; gap: .15em; height: 2.6em; padding: .25em; border: 1px solid var(--line); border-radius: .3em; background: var(--page); }
.lang__opt { display: inline-grid; place-items: center; height: 100%; min-width: 2.3em; padding: 0 .55em; border-radius: .2em; font-size: .9em; font-weight: 500; color: var(--muted); transition: color .25s, background-color .25s; }
.lang__opt[aria-current] { background: var(--chip); color: var(--ink); }
.lang__opt:not([aria-current]):hover { color: var(--ink); }
.lang__opt:lang(ja) { font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", YuGothic, Meiryo, sans-serif; }
.nav__right .lang { margin-right: .3em; }
@media (max-width: 980px) { .nav__right .lang { margin-right: 0; } }
/* phones: one compact button for the other language, and the role pill gives way so the burger keeps its place */
@media (max-width: 480px) {
  .nav .lang { padding: 0; border: 0; background: none; }
  .nav .lang__opt[aria-current] { display: none; }
  .nav .lang__opt { min-width: 2.6em; height: calc(2.6em / .85); padding: 0 .6em; border: 1px solid var(--line); border-radius: .3em; background: var(--page); color: var(--ink); font-size: .85em; }
  .nav .pill { display: none; }
}
.footer__lang-note { margin-top: 1.4em; text-align: center; color: var(--muted); font-size: .95em; }

/* Japanese: General Sans has no CJK glyphs, so Latin stays in General Sans and the Japanese falls through to the
   system's Japanese sans (no webfont shipped). Japanese reads better with more leading and no negative tracking. */
:root:lang(ja) {
  --ja-sans: "General Sans", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", YuGothic, Meiryo, sans-serif;
}
:root:lang(ja) body { font-family: var(--ja-sans); line-height: 1.75; line-break: strict; overflow-wrap: break-word; }
:root:lang(ja) :is(h1, h2, h3, .h1, .sh, .cta, .case__statement, .case__h, .about__statement, .svc__title, .case-card__title, .feat__t, .case__next-t, .bento__t, .menu__list a, .stat__l, .slide__cap) { word-break: auto-phrase; }
:root:lang(ja) :is(.h1, .sh, .cta, .case__statement, .case__h, .about__statement, .svc__title, .case-card__title, .feat__t, .case__next-t, .bento__t, .menu__list a, .app__title) { letter-spacing: 0; }
:root:lang(ja) .hero__intro { line-height: 1.7; max-width: 24em; }
:root:lang(ja) .case__statement { line-height: 1.45; font-size: 2.1em; }
:root:lang(ja) .about__statement { line-height: 1.4; font-size: 2.2em; }
:root:lang(ja) .case__h, :root:lang(ja) .svc__title, :root:lang(ja) .feat__t { line-height: 1.35; }
:root:lang(ja) .svc__title { font-size: 1.6em; }
:root:lang(ja) .cta { line-height: 1.25; font-size: 3.9em; }
:root:lang(ja) .stat__l, :root:lang(ja) .app__text, :root:lang(ja) .xp__hl { line-height: 1.6; }
:root:lang(ja) .case-card__text, :root:lang(ja) .cs__body p, :root:lang(ja) .about__p, :root:lang(ja) .svc__text, :root:lang(ja) .svc__fit, :root:lang(ja) .bento__p { line-height: 1.8; }
:root:lang(ja) .menu__list a { font-size: 2em; line-height: 1.4; }
:root:lang(ja) .crawl__text, :root:lang(ja) .crawl__card { font-family: "General Sans", "Hiragino Sans", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif; }
@media (max-width: 760px) {
  :root:lang(ja) .cta { font-size: 2.6em; }
  :root:lang(ja) .case__statement { font-size: 1.6em; }
  :root:lang(ja) .about__statement { font-size: 1.7em; }
}
/* the name in katakana, shown on the Japanese pages under the hero name and above the About statement */
.h1__kana { display: block; margin-top: .45em; font-size: .36em; font-weight: 500; letter-spacing: .08em; line-height: 1.3; color: var(--muted); }
.about__name { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2em .8em; margin-bottom: 1em; color: var(--muted); font-size: .95em; }
.about__name span:first-child { color: var(--ink); font-weight: 600; letter-spacing: .06em; }
