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

:root {
  --bg:        #F4F5FA;
  --surface:   #FFFFFF;
  --sunken:    #EBEDF5;
  --ink:       #151833;
  --ink-2:     #4B506C;
  --ink-3:     #7A7F99;
  --line:      #DEE1EC;
  --line-2:    #C5C9DA;
  --accent:    #4D5BFF;
  --accent-ink:#FFFFFF;
  --sun:       #FFB43B;
  --pop:       #FF5D8F;
  --mint:      #1FC39B;
  --on-bright: #151833;
  --shadow:    0 1px 2px rgba(21,24,51,.06), 0 18px 40px -18px rgba(21,24,51,.28);

  --display: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
  --body:    'Figtree', ui-sans-serif, system-ui, sans-serif;
  --wrap:    1200px;
  --gutter:  clamp(16px, 4vw, 40px);
  --nav-h:   72px;
  --ease-out:    cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1022; --surface: #171A33; --sunken: #121430;
    --ink: #EEF0FB; --ink-2: #AEB3CE; --ink-3: #7F84A3;
    --line: #282C4B; --line-2: #3A3F63;
    --accent: #7F8BFF; --accent-ink: #0E1022;
    --sun: #FFBE55; --pop: #FF74A0; --mint: #34D3AA;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 18px 44px -18px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E1022; --surface: #171A33; --sunken: #121430;
  --ink: #EEF0FB; --ink-2: #AEB3CE; --ink-3: #7F84A3;
  --line: #282C4B; --line-2: #3A3F63;
  --accent: #7F8BFF; --accent-ink: #0E1022;
  --sun: #FFBE55; --pop: #FF74A0; --mint: #34D3AA;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 18px 44px -18px rgba(0,0,0,.7);
  color-scheme: dark;
}

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 8px); overflow-x: clip; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  transition: background-color .4s ease, color .4s ease;
}
/* Menu open: lock the page. <html> is the scroller here (it has overflow-x: clip), so lock it too. */
html.menu-open, html.menu-open body { overflow: hidden; }

a { color: inherit; }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 100;
  padding: 10px 16px; border-radius: 999px;
  background: var(--ink); color: var(--bg); text-decoration: none; font-weight: 600;
  transform: translateY(-160%); transition: transform .3s var(--ease-out);
}
.skip-link:focus { transform: none; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  height: 54px; padding: 0 26px;
  border-radius: 999px;
  font-family: var(--body); font-size: 16px; font-weight: 600;
  text-decoration: none; white-space: nowrap;
  transition: transform .45s var(--ease-spring), background-color .25s, box-shadow .25s, color .25s;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; transition: transform .35s var(--ease-spring); }
.btn-accent { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 24px -12px var(--accent); }
.btn-accent:hover { box-shadow: 0 16px 32px -12px var(--accent); }
.btn-accent:hover svg { transform: translateY(3px); }
.btn-ghost { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-small { height: 40px; padding: 0 18px; font-size: 15px; }
.btn-ink { background: var(--ink); color: var(--bg); }
.btn-ink:hover { background: var(--accent); color: var(--accent-ink); }

.icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--ink);
  transition: background-color .25s, transform .45s var(--ease-spring);
}
.icon-btn:hover { background: var(--sunken); }
.icon-btn:active { transform: scale(.9); }

/* ── Nav ── */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: var(--nav-h);
  transition: transform .45s var(--ease-out), background-color .3s, box-shadow .3s;
}
.nav.is-scrolled {
  background: var(--bg);
  box-shadow: 0 1px 0 var(--line);
}
.nav.is-hidden { transform: translateY(-100%); }
.nav-inner { height: 100%; display: flex; align-items: center; gap: 24px; }

.progress {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: 0 50%;
}

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 750; font-size: 20px; letter-spacing: -.02em;
  text-decoration: none; margin-right: auto;
}
.brand-mark { position: relative; width: 26px; height: 26px; }
.brand-mark span { position: absolute; border-radius: 50%; }
.brand-mark span:nth-child(1) { inset: 0; background: var(--accent); }
.brand-mark span:nth-child(2) {
  width: 11px; height: 11px; right: -2px; top: -2px;
  background: var(--sun); box-shadow: 0 0 0 2.5px var(--bg);
  transition: transform .6s var(--ease-spring), box-shadow .4s;
}
.brand:hover .brand-mark span:nth-child(2) { transform: translate(-7px, 16px); }

.nav-links { position: relative; display: flex; gap: 4px; }
.nav-links a {
  position: relative; z-index: 1;
  padding: 8px 16px; border-radius: 999px;
  font-size: 16px; font-weight: 500; text-decoration: none; color: var(--ink-2);
  transition: color .25s;
}
.nav-links a:hover, .nav-links a.is-active { color: var(--ink); }
.nav-pill {
  position: absolute; left: 0; top: 0; height: 100%;
  border-radius: 999px; background: var(--sunken);
  opacity: 0; width: 0;
  transition: transform .5s var(--ease-out), width .5s var(--ease-out), opacity .3s;
}
.nav-actions { display: flex; align-items: center; gap: 8px; }
.menu-btn { display: none; }

/* theme toggle icon: sun ↔ moon */
.theme-toggle svg { width: 20px; height: 20px; overflow: visible; }
/* Light theme: a warm sun with a soft glow that brightens on hover. Dark theme: a plain moon. */
.theme-toggle { position: relative; isolation: isolate; color: var(--sun); transition: color .4s, transform .45s var(--ease-spring); }
.theme-toggle::before {
  content: ''; position: absolute; inset: 0; z-index: -1; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--sun) 42%, transparent) 0 30%, transparent 70%);
  transform: scale(.85); transition: transform .5s var(--ease-spring), opacity .4s;
}
.theme-toggle:hover { background: none; }
.theme-toggle:hover::before { transform: scale(1.2); }
:root:not([data-theme="dark"]) .theme-toggle:hover .sun-rays { animation: sun-spin 9s linear infinite; }
@keyframes sun-spin { to { transform: rotate(360deg); } }
[data-theme="dark"] .theme-toggle { color: var(--ink); }
[data-theme="dark"] .theme-toggle::before { opacity: 0; }
[data-theme="dark"] .theme-toggle:hover { background: var(--sunken); }
.sun-core { transform-origin: 12px 12px; transition: transform .6s var(--ease-spring); }
.moon-bite { transition: transform .6s var(--ease-out); }
.sun-rays { transform-origin: 12px 12px; transition: transform .6s var(--ease-out), opacity .35s; }
[data-theme="dark"] .sun-core { transform: scale(1.55); }
[data-theme="dark"] .moon-bite { transform: translate(-9px, 6px); }
[data-theme="dark"] .sun-rays { transform: rotate(-60deg) scale(.4); opacity: 0; }

@media (max-width: 760px) {
  .nav-links, .nav-cta { display: none; }
  .menu-btn { display: grid; }
}

.menu-btn .bars span { display: block; width: 18px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .4s var(--ease-out); }
.menu-btn .bars { display: grid; gap: 5px; }
.menu-btn[aria-expanded="true"] .bars span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .bars span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: var(--nav-h) 0 0; z-index: 49;
  background: var(--bg);
  padding: 24px var(--gutter);
  display: flex; flex-direction: column; gap: 4px;
  overflow-y: auto; overscroll-behavior: contain;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  visibility: hidden; opacity: 0;
  transition: opacity .3s, visibility 0s .3s;
}
.mobile-menu.is-open { visibility: visible; opacity: 1; transition: opacity .3s; }
.mobile-menu a {
  font-family: var(--display); font-weight: 700; font-size: 44px; letter-spacing: -.03em;
  text-decoration: none; padding: 6px 0;
  opacity: 0; transform: translateY(24px);
  transition: opacity .5s var(--ease-out), transform .6s var(--ease-out);
}
.mobile-menu.is-open a { opacity: 1; transform: none; }
.mobile-menu.is-open a:nth-child(2) { transition-delay: .06s; }
.mobile-menu.is-open a:nth-child(3) { transition-delay: .12s; }
.mobile-menu.is-open a:nth-child(4) { transition-delay: .18s; }
.mobile-menu.is-open a:nth-child(5) { transition-delay: .24s; }
@media (min-width: 761px) { .mobile-menu { display: none; } }
.mobile-menu .mm-email { margin-top: auto; font-family: var(--body); font-size: 18px; font-weight: 600; letter-spacing: 0; color: var(--accent); }

/* ── Split-word reveal ── */
.js .split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }
.js .split .wi { display: inline-block; transform: translateY(110%); transition: transform 1s var(--ease-out); transition-delay: calc(var(--i) * 55ms + var(--d, 0ms)); }
.js .split.is-in .wi { transform: none; }

.js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease-out), transform .9s var(--ease-out); transition-delay: var(--d, 0ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ── Hero ── */
.hero {
  min-height: 100svh;
  padding-top: calc(var(--nav-h) + clamp(24px, 6vh, 72px));
  padding-bottom: clamp(40px, 8vh, 88px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 28px; font-size: 15px; color: var(--ink-2); }
.meta-item { display: inline-flex; align-items: center; gap: 8px; }
.meta-item svg { width: 16px; height: 16px; color: var(--ink-3); }
.live-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--mint); }
.live-dot::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--mint);
  animation: ping 2.4s var(--ease-out) infinite;
}
@keyframes ping { 0% { transform: scale(1); opacity: .6; } 80%, 100% { transform: scale(3); opacity: 0; } }

.hero-title {
  font-family: var(--display);
  font-size: clamp(46px, 6.4vw, 94px);
  font-weight: 760;
  line-height: .98;
  letter-spacing: -.045em;
  margin-bottom: 28px;
  text-wrap: balance;
}
.hero-lede { font-size: clamp(18px, 1.5vw, 20px); color: var(--ink-2); max-width: 34em; margin-bottom: 36px; text-wrap: pretty; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }

/* physics playground */
.play { display: flex; flex-direction: column; gap: 12px; }
.playground {
  position: relative;
  height: clamp(400px, 64vh, 600px);
  border-radius: 32px;
  background-color: var(--surface);
  background-image: radial-gradient(var(--line) 1.3px, transparent 1.3px);
  background-size: 22px 22px;
  background-position: 11px 11px;
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
  touch-action: pan-y;
  transition: background-color .4s;
}
.ball {
  position: absolute; left: 0; top: 0;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; letter-spacing: -.02em; line-height: 1;
  user-select: none; -webkit-user-select: none;
  touch-action: none; cursor: grab;
  opacity: 0;
  will-change: transform;
  transform: translate3d(0, -200px, 0);
}
.ball.is-live { opacity: 1; }
.ball.is-held { cursor: grabbing; }
.tone-accent { background: var(--accent); color: var(--accent-ink); }
.tone-sun    { background: var(--sun);  color: var(--on-bright); }
.tone-pop    { background: var(--pop);  color: var(--on-bright); }
.tone-mint   { background: var(--mint); color: var(--on-bright); }
.tone-ink    { background: var(--ink);  color: var(--bg); }
.tone-line   { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }

.play-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-inline: 8px; font-size: 15px; color: var(--ink-2); }
.play-foot svg { width: 18px; height: 18px; }
.shake-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px;
  font-size: 15px; font-weight: 600;
  box-shadow: inset 0 0 0 1.5px var(--line-2);
  transition: box-shadow .25s, transform .45s var(--ease-spring);
}
.shake-btn:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.shake-btn:active { transform: scale(.94); }
.shake-btn:hover svg { animation: wiggle .5s ease-in-out; }
@keyframes wiggle { 25% { transform: rotate(-14deg); } 75% { transform: rotate(14deg); } }

/* hero entrance */
.js .hero [data-enter] { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease-out), transform .9s var(--ease-out); transition-delay: var(--d, 0ms); }
.js .hero.is-in [data-enter] { opacity: 1; transform: none; }
.js .hero .play[data-enter] { transform: translateY(18px) scale(.97); }
.js .hero.is-in .play[data-enter] { transform: none; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: 0; align-items: start; }
  .playground { height: 320px; border-radius: 24px; }
}

/* ── Marquee ── */
.marquee {
  border-block: 1px solid var(--line);
  overflow: hidden;
  padding: 22px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track, .marquee.is-paused .marquee-track { animation-play-state: paused; }
.marquee ul { display: flex; align-items: center; }
.marquee li { display: flex; align-items: center; }
.marquee a {
  font-family: var(--display); font-weight: 650; font-size: clamp(26px, 3.4vw, 44px); letter-spacing: -.03em;
  color: var(--ink-3); text-decoration: none; padding: 0 clamp(20px, 3vw, 40px); white-space: nowrap;
  transition: color .25s;
}
.marquee a:hover { color: var(--ink); }
.shape { display: block; width: 14px; height: 14px; flex-shrink: 0; }
.shape.circle   { border-radius: 50%; background: var(--mint); }
.shape.square   { border-radius: 3px; background: var(--sun); transform: rotate(12deg); }
.shape.triangle { background: var(--pop); clip-path: polygon(50% 4%, 100% 96%, 0 96%); }
.shape.ring     { border-radius: 50%; box-shadow: inset 0 0 0 3px var(--accent); }
.shape.diamond  { border-radius: 2px; background: var(--ink); transform: rotate(45deg) scale(.82); }
.shape.plus     { background: var(--accent); clip-path: polygon(38% 0, 62% 0, 62% 38%, 100% 38%, 100% 62%, 62% 62%, 62% 100%, 38% 100%, 38% 62%, 0 62%, 0 38%, 38% 38%); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ── Sections ── */
.section { padding-block: clamp(88px, 12vw, 160px); }
.section-head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 26em);
  gap: 24px 48px; align-items: end;
  margin-bottom: clamp(40px, 6vw, 72px);
}
.section-title {
  font-family: var(--display);
  font-size: clamp(40px, 5.6vw, 76px);
  font-weight: 740; line-height: 1; letter-spacing: -.04em;
  text-wrap: balance;
}
.section-lede { color: var(--ink-2); text-wrap: pretty; }
@media (max-width: 760px) { .section-head { grid-template-columns: 1fr; } }

/* ── Work ── */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(40px, 5vw, 64px) clamp(24px, 3vw, 40px);
}
@media (max-width: 760px) { .work-grid { grid-template-columns: 1fr; } }

.project { position: relative; display: flex; flex-direction: column; gap: 22px; }

.project-media {
  --panel: color-mix(in srgb, var(--brand) 13%, var(--surface));
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 28px;
  background: var(--panel);
  padding: 8% 8% 0;
  display: flex;
  overflow: hidden;
  isolation: isolate;
  transition: background-color .4s;
}
.project-media::before {
  content: '';
  position: absolute; z-index: -1;
  width: 72%; aspect-ratio: 1; right: -22%; top: -34%;
  border-radius: 50%;
  background: var(--brand-2);
  opacity: .5;
  transition: transform 1s var(--ease-out);
}
.project-media::after {
  content: '';
  position: absolute; z-index: -1;
  width: 22%; aspect-ratio: 1; left: -6%; bottom: 12%;
  border-radius: 50%;
  background: var(--brand);
  opacity: .14;
  transition: transform 1.2s var(--ease-out);
}
.project:hover .project-media::before { transform: translate(-6%, 8%) scale(1.12); }
.project:hover .project-media::after { transform: translate(30%, -20%) scale(1.3); }

.browser {
  flex: 1;
  display: flex; flex-direction: column;
  border-radius: 14px 14px 0 0;
  background: var(--surface);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 18%, transparent), 0 30px 60px -28px color-mix(in srgb, var(--brand) 70%, #000);
  transform: translateY(14px);
  transition: transform .7s var(--ease-out);
  overflow: hidden;
}
.project:hover .browser, .project:focus-within .browser { transform: translateY(0); }
.browser-bar {
  display: flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 12px; flex-shrink: 0;
  border-bottom: 1px solid var(--line);
}
.browser-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.browser-url {
  margin-inline: auto; transform: translateX(-14px);
  padding: 2px 12px; border-radius: 999px;
  background: var(--sunken); color: var(--ink-2);
  font-size: 12px; font-weight: 500; line-height: 1.5;
  max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.browser-view { position: relative; flex: 1; overflow: hidden; background: #fff; }
.browser-view img {
  width: 100%; height: auto;
  transition: transform 1.2s var(--ease-out);
}
.project:hover .browser-view img, .project:focus-within .browser-view img {
  transform: translateY(var(--dist, 0px));
  transition: transform var(--dur, 4s) cubic-bezier(.45, .05, .4, 1) .2s;
}

.project-body { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: baseline; }
.project-name {
  font-family: var(--display); font-size: clamp(24px, 2.2vw, 30px); font-weight: 720; letter-spacing: -.025em; line-height: 1.15;
}
.project-name a { text-decoration: none; }
.project-name a::after { content: ''; position: absolute; inset: 0; z-index: 2; border-radius: 28px; }
.project-name a:focus-visible { outline: none; }
.project-name a:focus-visible::after { outline: 2px solid var(--accent); outline-offset: 6px; }
.project-url {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 15px; font-weight: 600; color: var(--ink-2);
  transition: color .25s;
}
.project-url svg { width: 16px; height: 16px; flex-shrink: 0; transition: transform .45s var(--ease-spring); }
.project:hover .project-url { color: var(--ink); }
.project:hover .project-url svg { transform: translate(3px, -3px); }
.project-desc { grid-column: 1 / -1; color: var(--ink-2); max-width: 36em; text-wrap: pretty; }
.tags { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.tags li {
  padding: 5px 12px; border-radius: 999px;
  font-size: 14px; font-weight: 500; color: var(--ink-2);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
/* quiet "at Appetiser" credit; the link sits above the card's stretched link */
.project-credit {
  grid-column: 1 / -1;
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 2px; font-size: 13px; color: var(--ink-3);
}
.project-credit svg { width: 12px; height: 12px; }
.project-credit a {
  position: relative; z-index: 5;
  color: inherit; text-decoration: none;
  transition: color .25s;
}
.project-credit a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* odd one out spans the full row */
@media (min-width: 761px) {
  .work-grid:not(.work-grid--dense) > .project:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: clamp(24px, 4vw, 64px); align-items: center;
  }
  .work-grid:not(.work-grid--dense) > .project:last-child:nth-child(odd) .project-media { aspect-ratio: 16 / 10; }
}

.project[hidden] { display: none !important; }

.work-more { display: flex; justify-content: center; margin-top: clamp(48px, 6vw, 80px); }
.work-more .btn:hover svg { transform: translateX(4px); }

/* card entrance */
.js .project .project-media { clip-path: inset(100% 0 0 0 round 28px); transition: clip-path 1.1s var(--ease-out), background-color .4s; transition-delay: var(--d, 0ms); }
.js .project .browser { transform: translateY(80px); }
.js .project .project-body { opacity: 0; transform: translateY(20px); transition: opacity .8s var(--ease-out), transform .9s var(--ease-out); transition-delay: calc(var(--d, 0ms) + 250ms); }
.js .project.is-in .project-media { clip-path: inset(0 0 0 0 round 28px); }
.js .project.is-in .browser { transform: translateY(14px); transition: transform 1.2s var(--ease-out) calc(var(--d, 0ms) + 150ms); }
.js .project.is-in:hover .browser, .js .project.is-in:focus-within .browser { transform: none; transition: transform .7s var(--ease-out); }
.js .project.is-in .project-body { opacity: 1; transform: none; }

/* cursor follower over previews */
.cursor-pill { position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none; }
.cursor-pill span {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 16px; border-radius: 999px;
  background: var(--ink); color: var(--bg);
  font-size: 15px; font-weight: 600; white-space: nowrap;
  transform: translate(-50%, -50%) scale(0);
  transition: transform .35s var(--ease-spring);
}
.cursor-pill svg { width: 15px; height: 15px; }
.cursor-pill.is-on span { transform: translate(-50%, -50%) scale(1); }
@media (hover: none) { .cursor-pill { display: none; } }

/* ── Work page ── */
.page-head { padding-top: calc(var(--nav-h) + clamp(32px, 7vw, 88px)); }
.back-link {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 28px;
  font-size: 15px; font-weight: 600; color: var(--ink-2); text-decoration: none;
  transition: color .25s;
}
.back-link svg { width: 18px; height: 18px; transition: transform .45s var(--ease-spring); }
.back-link:hover { color: var(--ink); }
.back-link:hover svg { transform: translateX(-4px); }
.page-title {
  font-family: var(--display);
  font-size: clamp(48px, 8.4vw, 124px);
  font-weight: 760; line-height: .94; letter-spacing: -.05em;
  margin-bottom: 24px;
}
.page-lede { color: var(--ink-2); max-width: 38em; font-size: clamp(18px, 1.5vw, 20px); text-wrap: pretty; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 40px; }
.filter-groups { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.filter-group { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-group button {
  display: inline-flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 999px;
  font-size: 15px; font-weight: 600;
  box-shadow: inset 0 0 0 1.5px var(--line-2);
  transition: background-color .25s, color .25s, box-shadow .25s, transform .45s var(--ease-spring);
}
.filter-group button span { font-weight: 500; opacity: .55; }
.filter-group button:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.filter-group button:active { transform: scale(.95); }
.filter-group button[aria-pressed="true"] { background: var(--ink); color: var(--bg); box-shadow: none; }
.work-count { margin-left: auto; font-size: 15px; color: var(--ink-3); }
.work-page { padding-top: clamp(40px, 5vw, 64px); }
.work-empty { padding: 48px 0; font-size: 18px; color: var(--ink-2); }
.work-empty button { margin-left: 8px; font-weight: 600; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.work-grid--dense {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(36px, 4vw, 56px) clamp(20px, 2.2vw, 32px);
}
.work-grid--dense .project { gap: 18px; }
.work-grid--dense .project-media { border-radius: 24px; padding: 9% 9% 0; }
.work-grid--dense .project-body { grid-template-columns: 1fr; gap: 6px; }
.work-grid--dense .project-name { font-size: clamp(22px, 1.8vw, 26px); }
.work-grid--dense .project-desc { font-size: 16px; }
.work-grid--dense .tags li { font-size: 13px; padding: 4px 10px; }
@media (max-width: 1080px) { .work-grid--dense { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .work-grid--dense { grid-template-columns: 1fr; } }

::view-transition-group(*) { animation-duration: .5s; animation-timing-function: cubic-bezier(.22, 1, .36, 1); }

.contact-card--compact { padding-block: clamp(40px, 6vw, 72px); }
.contact-card--compact .contact-title { font-size: clamp(36px, 5vw, 64px); }
.contact-card--compact .email-row { margin-bottom: 0; }

/* ── Own apps ── */
#apps { padding-top: 0; }
#work[hidden] + #apps { padding-top: clamp(40px, 6vw, 88px); } /* straight after the hero */
.apps-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 40px); }
.app { position: relative; display: flex; flex-direction: column; gap: 22px; }
.app-media {
  position: relative; overflow: hidden; isolation: isolate;
  aspect-ratio: 4 / 5; border-radius: 28px;
  background: color-mix(in srgb, var(--brand) 14%, var(--surface));
  perspective: 1100px;
  transition: background-color .4s;
}
.app-media::before {
  content: ''; position: absolute; z-index: -1;
  width: 80%; aspect-ratio: 1; left: -26%; bottom: -30%;
  border-radius: 50%; background: var(--brand-2); opacity: .45;
  transition: transform 1.2s var(--ease-out);
}
.app:hover .app-media::before { transform: rotate(40deg) scale(1.12); }
.app-fan {
  position: absolute; inset: 0;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transform-style: preserve-3d;
  transition: transform .7s var(--ease-out);
}
.app-fan {
  --w: 42%; --top: 11%;         /* screenshot width and top offset inside the panel */
  --spread: 64%; --spread-hover: 80%;  /* side cards' offset, in screenshot widths */
}
.project-media--app { padding: 0; perspective: 1100px; }
.project-media--app .app-fan { --w: 29%; --top: 9%; --spread: 92%; --spread-hover: 112%; }
.app-fan img {
  position: absolute; left: 50%; top: var(--top);
  width: var(--w); height: auto;
  border-radius: 16px;
  box-shadow: 0 26px 50px -22px color-mix(in srgb, var(--brand) 55%, #000), 0 0 0 1px rgba(0,0,0,.06);
  opacity: 0; z-index: 1;
  transform: translate(-50%, 10%) scale(.7);
  transition: transform .9s var(--ease-out), opacity .6s var(--ease-out);
}
.app-fan img[data-pos="0"]  { opacity: 1; z-index: 3; transform: translate(-50%, 0); }
.app-fan img[data-pos="1"]  { opacity: 1; z-index: 2; transform: translate(calc(-50% + var(--spread)), 7%) rotate(9deg) scale(.84); }
.app-fan img[data-pos="-1"] { opacity: 1; z-index: 2; transform: translate(calc(-50% - var(--spread)), 7%) rotate(-9deg) scale(.84); }
:is(.app, .project):hover .app-fan img[data-pos="0"]  { transform: translate(-50%, -3%) scale(1.03); }
:is(.app, .project):hover .app-fan img[data-pos="1"]  { transform: translate(calc(-50% + var(--spread-hover)), 5%) rotate(13deg) scale(.84); }
:is(.app, .project):hover .app-fan img[data-pos="-1"] { transform: translate(calc(-50% - var(--spread-hover)), 5%) rotate(-13deg) scale(.84); }

.app-body { display: grid; grid-template-columns: 56px 1fr; gap: 10px 14px; align-items: center; }
.app-icon { width: 56px; height: 56px; border-radius: 14px; box-shadow: 0 0 0 1px var(--line); transition: transform .5s var(--ease-spring); }
.app:hover .app-icon { transform: rotate(-8deg) scale(1.06); }
.app-name { font-family: var(--display); font-size: clamp(22px, 1.8vw, 26px); font-weight: 720; letter-spacing: -.025em; line-height: 1.1; }
.app-name a { text-decoration: none; }
.app-name a::after { content: ''; position: absolute; inset: 0; z-index: 4; border-radius: 28px; }
.app-name a:focus-visible { outline: none; }
.app-name a:focus-visible::after { outline: 2px solid var(--accent); outline-offset: 6px; }
.app-tagline { font-size: 15px; color: var(--ink-2); }
.app-desc, .app .tags, .app-stores { grid-column: 1 / -1; }
.app-stores { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
/* sits above the card's stretched App Store link so it can be clicked on its own */
.app-store--link { position: relative; z-index: 5; text-decoration: none; }
.app-store--link:hover { color: var(--accent); }
.app-desc { font-size: 16px; color: var(--ink-2); text-wrap: pretty; }
.app .tags { margin-top: 0; }
.app-store { display: inline-flex; align-items: center; gap: 8px; width: fit-content; font-size: 15px; font-weight: 600; color: var(--ink-2); transition: color .25s; }
.app-store svg { width: 16px; height: 16px; margin-top: -2px; }
.app:hover .app-store { color: var(--ink); }

/* entrance */
.js .app .app-media { clip-path: inset(100% 0 0 0 round 28px); transition: clip-path 1.1s var(--ease-out), background-color .4s; transition-delay: var(--d, 0ms); }
.js .app .app-body { opacity: 0; transform: translateY(20px); transition: opacity .8s var(--ease-out), transform .9s var(--ease-out); transition-delay: calc(var(--d, 0ms) + 250ms); }
.js .app.is-in .app-media { clip-path: inset(0 0 0 0 round 28px); }
.js .app.is-in .app-body { opacity: 1; transform: none; }

/* phones: a swipeable shelf instead of a squeezed grid */
@media (max-width: 900px) {
  .apps-grid {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(80%, 340px);
    overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    margin-inline: calc(var(--gutter) * -1); padding: 0 var(--gutter) 8px;
    scroll-padding-inline: var(--gutter); scrollbar-width: none;
  }
  .apps-grid::-webkit-scrollbar { display: none; }
  .app { scroll-snap-align: start; }
}

/* ── About ── */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.about-copy .section-title { margin-bottom: 32px; }
.about-side .jobs-title:first-child { margin-top: 14px; }
.about-copy p { color: var(--ink-2); margin-bottom: 1.1em; max-width: 34em; text-wrap: pretty; }
.about-copy p:first-of-type { font-size: clamp(19px, 1.6vw, 22px); color: var(--ink); }
.about-copy strong { color: var(--ink); font-weight: 600; }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; } }

.toolkit {
  margin-top: clamp(48px, 6vw, 88px);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  padding: clamp(24px, 3vw, 36px);
  transition: background-color .4s;
}
.toolkit-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 20px; margin-bottom: 12px; }
.toolkit-title { font-family: var(--display); font-size: 24px; font-weight: 720; letter-spacing: -.02em; }
.toolkit-intro { color: var(--ink-2); font-size: 16px; }
/* groups flow into columns like a masonry grid */
.kit-groups { columns: 3 250px; column-gap: clamp(24px, 3.5vw, 48px); }
.kit-groups .kit-group { break-inside: avoid; }
.kit-group { padding: 18px 0; border-top: 1px solid var(--line); }
.kit-group dt { display: flex; align-items: center; gap: 10px; font-weight: 600; margin-bottom: 12px; }
.kit-group dt .shape { width: 12px; height: 12px; }
.kit-group dd ul { display: flex; flex-wrap: wrap; gap: 8px; }
.kit-group dd li {
  padding: 6px 14px; border-radius: 999px;
  background: var(--sunken); font-size: 15px; font-weight: 500;
  transition: transform .4s var(--ease-spring), background-color .25s, color .25s;
}
.kit-group dd li:hover { transform: translateY(-3px) rotate(-2deg); background: var(--ink); color: var(--bg); }
.kit-note { color: var(--ink-3); font-size: 15px; margin-top: 10px; }

.jobs-title { font-family: var(--display); font-size: 22px; font-weight: 720; letter-spacing: -.02em; margin: 44px 0 10px; }
.jobs { max-width: 34em; border-top: 1px solid var(--line); list-style: none; }
.job {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.job > span { display: flex; flex-direction: column; }
.job-company { font-weight: 600; }
.job-role { font-size: 15px; color: var(--ink-2); }
.job-years { font-size: 14px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.job-link {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font-size: 15px; font-weight: 600; color: var(--ink-2); text-decoration: none;
  transition: color .25s;
}
.job-link svg { width: 16px; height: 16px; transition: transform .45s var(--ease-spring); }
.job-link:hover { color: var(--accent); }
.job-link:hover svg { transform: translateX(4px); }

.js [data-stagger] > * { opacity: 0; transform: translateY(10px) scale(.9); }
.js [data-stagger].is-in > * {
  opacity: 1; transform: none;
  transition: opacity .5s var(--ease-out), transform .6s var(--ease-spring);
  transition-delay: calc(var(--i) * 40ms + var(--d, 0ms));
}
.js [data-stagger].is-in > *:hover { transition-delay: 0ms; transform: translateY(-3px) rotate(-2deg); }

/* ── Contact ── */
.contact-card {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: clamp(28px, 4vw, 44px);
  background: var(--ink); color: var(--bg);
  padding: clamp(40px, 7vw, 96px) clamp(24px, 6vw, 88px);
  transition: background-color .4s, color .4s;
}
.contact-title {
  font-family: var(--display);
  font-size: clamp(42px, 6.4vw, 92px);
  font-weight: 760; line-height: .98; letter-spacing: -.045em;
  max-width: 11em; margin-bottom: 24px;
  text-wrap: balance;
}
.contact-lede { max-width: 32em; opacity: .75; margin-bottom: clamp(32px, 5vw, 56px); }
.email-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-bottom: 32px; }
.email-link {
  font-family: var(--display); font-weight: 650;
  font-size: clamp(22px, 3.4vw, 44px); letter-spacing: -.03em;
  text-decoration: none; overflow-wrap: anywhere;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
  transition: background-size .5s var(--ease-out);
  padding-bottom: 4px;
}
.email-link:hover { background-size: 100% 2px; }
.copy-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 999px;
  background: var(--bg); color: var(--ink);
  font-size: 15px; font-weight: 600;
  transition: transform .45s var(--ease-spring), background-color .25s, color .25s;
}
.copy-btn svg { width: 16px; height: 16px; }
.copy-btn:active { transform: scale(.94); }
.copy-btn .ic-check { display: none; }
.copy-btn.is-copied { background: var(--mint); color: var(--on-bright); }
.copy-btn.is-copied .ic-copy { display: none; }
.copy-btn.is-copied .ic-check { display: block; }
.socials { display: flex; flex-wrap: wrap; gap: 12px; }
.socials a {
  display: inline-flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 20px 0 16px; border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--bg) 30%, transparent);
  text-decoration: none; font-weight: 600; font-size: 16px;
  transition: box-shadow .25s, transform .45s var(--ease-spring);
}
.socials a:hover { box-shadow: inset 0 0 0 1.5px var(--bg); }
.socials svg { width: 20px; height: 20px; }

.floaty { position: absolute; z-index: -1; pointer-events: none; animation: bob 7s ease-in-out infinite; }
.floaty.f1 { width: clamp(120px, 18vw, 260px); aspect-ratio: 1; border-radius: 50%; background: var(--accent); right: -4%; top: -12%; }
.floaty.f2 { width: clamp(44px, 6vw, 80px); aspect-ratio: 1; border-radius: 16px; background: var(--sun); right: 16%; bottom: 14%; animation-duration: 9s; animation-delay: -2s; --r: 18deg; }
.floaty.f3 { width: clamp(36px, 4.5vw, 60px); aspect-ratio: 1; background: var(--pop); clip-path: polygon(50% 4%, 100% 96%, 0 96%); right: 8%; top: 46%; animation-duration: 8s; animation-delay: -4s; --r: -14deg; }
.floaty.f4 { width: clamp(22px, 3vw, 36px); aspect-ratio: 1; border-radius: 50%; background: var(--mint); right: 30%; top: 16%; animation-duration: 6s; animation-delay: -1s; }
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
  50% { transform: translateY(-18px) rotate(calc(var(--r, 0deg) * -1)); }
}
@media (max-width: 760px) { .floaty.f2, .floaty.f3 { display: none; } }

/* ── Footer ── */
.footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px;
  padding-block: 40px 56px;
  font-size: 15px; color: var(--ink-2);
}
.footer a { text-decoration: none; font-weight: 600; color: var(--ink); }
.footer a:hover { color: var(--accent); }

/* Back to top rocket: tilted at rest, straightens and idles on hover, launches from site.js */
.to-top { display: inline-flex; align-items: center; gap: 10px; }
.rocket { display: inline-block; width: 21px; height: 35px; flex: none; margin-block: -6px; }
.rocket svg {
  display: block; width: 100%; height: 100%; overflow: visible;
  transform: rotate(45deg); transform-origin: 50% 36%;
  transition: transform .5s var(--ease-spring);
}
.rocket-hull   { fill: var(--surface); }
.rocket-nose,
.rocket-fin    { fill: var(--pop); }
.rocket-window { fill: var(--accent); }
.rocket-fin, .rocket-line, .rocket-window { stroke: var(--ink); stroke-width: 1.5; stroke-linejoin: round; }
.rocket-line   { fill: none; }
.rocket-flame  { transform-box: fill-box; transform-origin: 50% 0; transform: scaleY(0); transition: transform .25s var(--ease-out); }
.rocket-flame path:first-child { fill: var(--pop); }
.rocket-flame path:last-child  { fill: var(--sun); }
.to-top:hover .rocket svg, .to-top:focus-visible .rocket svg { transform: translateY(-3px); }
.to-top:hover .rocket-flame, .to-top:focus-visible .rocket-flame { animation: flicker .14s ease-in-out infinite alternate; --lo: .35; --hi: .55; }
.rocket.is-away { visibility: hidden; }
.rocket.is-landing svg { animation: land 1.3s var(--ease-out) both; }
.rocket.is-landing .rocket-flame { animation: land-flame 1.3s ease-in both; }
@keyframes flicker { from { transform: scaleY(var(--lo)) scaleX(.9); } to { transform: scaleY(var(--hi)); } }
@keyframes land {
  0%   { transform: translateY(-90px); opacity: 0; }
  20%  { opacity: 1; }
  70%  { transform: translateY(2px); }
  82%  { transform: translateY(0); }
  100% { transform: rotate(45deg); }
}
@keyframes land-flame { 0%, 55% { transform: scaleY(.8); } 80%, 100% { transform: scaleY(0); } }

/* The launched copy and its exhaust live on <body>, above the nav */
.rocket-flight { position: fixed; z-index: 56; pointer-events: none; }
.rocket-flight svg { transform: none; }
.rocket-flight .rocket-flame { animation: flicker .08s linear infinite alternate; --lo: .85; --hi: 1.1; }
.rocket-puff {
  position: fixed; z-index: 55; pointer-events: none;
  border-radius: 50%; background: color-mix(in srgb, var(--ink-3) 45%, transparent);
}
.rocket-puff.is-spark { background: var(--sun); }
/* The crash (page coordinates, so embers stay on the letters they land on) */
.rocket-boom {
  position: absolute; z-index: 57; pointer-events: none;
  width: 110px; height: 110px; border-radius: 50%;
  background: radial-gradient(circle, #FFF6D5 0 14%, #FFD166 26%, #FF8A1F 44%, color-mix(in srgb, #E8431A 55%, transparent) 60%, transparent 71%);
}
.fire-puff { position: absolute; z-index: 56; pointer-events: none; border-radius: 50%; }
.ember {
  position: absolute; z-index: 57; pointer-events: none; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #FFF3B0, #FFB43B 40%, #FF6A1A 72%, #B8300A);
}
.ember::before {
  content: ''; position: absolute; inset: -160%; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 138, 40, .55), rgba(255, 90, 20, .18) 45%, transparent 70%);
  animation: ember-flicker .16s ease-in-out infinite alternate;
}
.ember::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: #6B6570; opacity: 0; }
.ember.is-dying::before { animation: ember-flicker .22s ease-in-out infinite alternate, ember-cool var(--life) ease-in forwards; }
.ember.is-dying::after { animation: ember-ash var(--life) ease-in forwards; }
.ember-wisp {
  position: absolute; z-index: 56; pointer-events: none;
  width: 5px; height: 5px; border-radius: 50%;
  background: color-mix(in srgb, var(--ink-3) 40%, transparent);
}
@keyframes ember-flicker { from { transform: scale(.8); } to { transform: scale(1.15); } }
@keyframes ember-cool { 0%, 30% { opacity: 1; } 100% { opacity: 0; } }
@keyframes ember-ash { 0%, 35% { opacity: 0; } 100% { opacity: .85; } }
main:focus { outline: none; }

/* ── Footer: shy workers tidying the © line (built by site.js) ── */
.shy { position: relative; }
.shy-ch { display: inline-block; transform-origin: 50% 70%; }
.shy-base { display: inline-block; width: 0; height: 0; }
.shy-crew { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: visible; pointer-events: none; visibility: hidden; }
.shy.is-ready .shy-crew { visibility: visible; }
.shy-dust  { fill: color-mix(in srgb, var(--ink-3) 50%, transparent); transform-box: fill-box; transform-origin: center; }
.shy-shine { fill: var(--sun); transform-box: fill-box; transform-origin: center; }

.w-leg line, .w-limb { fill: none; stroke: var(--ink); stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; }
.w-vest      { fill: var(--accent); }
.w--polish .w-vest { fill: var(--pop); }
.w--push .w-vest   { fill: var(--mint); }
.w-head      { fill: var(--ink); }
.w-hat       { fill: var(--sun); }
.w-brim      { stroke: var(--sun); stroke-width: 3; stroke-linecap: round; }
.w-level-bar { fill: var(--sun); stroke: var(--ink); stroke-width: 1.2; }
.w-bubble    { fill: var(--mint); }
.w-rag       { fill: var(--sun); }
.shy-crew .w-halo * { fill: var(--bg); stroke: var(--bg); stroke-width: 9px; }
.w-alert { font: 800 30px var(--display); fill: var(--pop); text-anchor: middle; opacity: 0; transform-origin: 1px -66px; }

.w-leg  { transform-origin: 0 -17px; }
.w-lean { transition: transform .25s var(--ease-out); }
.w-rub  { transform-origin: 1px -31px; transform: rotate(262deg); }
.w-level { transform-origin: 11px -27px; }
.is-leveling .w-level { animation: level 2.2s ease-in-out infinite; }
.is-rubbing .w-rub    { animation: rub .3s ease-in-out infinite alternate; }
.is-pushing .w-lean   { transform: rotate(14deg); }
.is-pushing .w-leg    { animation: stride .6s ease-in-out infinite alternate; }
.is-pushing .w-leg--b, .is-running .w-leg--b { animation-direction: alternate-reverse; }
.is-running .w-lean   { transform: rotate(16deg); }
.is-running .w-leg    { animation: stride .13s linear infinite alternate; }
.is-startled .w-body  { animation: startle .45s cubic-bezier(.2, .8, .3, 1); }
.is-startled .w-alert { animation: alert .5s var(--ease-spring) both; }
.shy.is-idle * { animation-play-state: paused !important; }
@keyframes stride  { from { transform: rotate(-26deg); } to { transform: rotate(26deg); } }
@keyframes level   { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(5deg); } }
@keyframes rub     { from { transform: rotate(238deg); } to { transform: rotate(286deg); } }
@keyframes startle { 35% { transform: translateY(-14px); } }
@keyframes alert   { from { opacity: 0; transform: scale(.2); } 40% { opacity: 1; transform: scale(1.3); } to { opacity: 1; transform: scale(1); } }

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0ms !important;
  }
  .marquee-track { animation: none; }
  .project:hover .browser-view img, .project:focus-within .browser-view img { transform: none; }
}
