/* Radius rule: images and cards 20px, buttons and tags pill. One accent colour (blue), used only at varying strength. */
:root {
  --bg: #f4f5f8;
  --bg-2: #eceef3;
  --surface: #ffffff;
  --text: #0b0d12;
  --muted: #4a5160;
  --line: rgb(11 13 18 / .1);
  --accent: #2447d6;
  --accent-rgb: 36 71 214;
  --accent-ink: #ffffff;
  --radius: 20px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --nav-h: 68px;
}
/* Theme: Auto follows the system; data-theme on <html> (set by the theme button) forces light or dark */
:root { color-scheme: light dark; }
:root[data-theme="light"] { color-scheme: light; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #07080b;
    --bg-2: #0d0f14;
    --surface: #111319;
    --text: #eef0f5;
    --muted: #98a0ad;
    --line: rgb(255 255 255 / .09);
    --accent: #8aa8ff;
    --accent-rgb: 138 168 255;
    --accent-ink: #07080b;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #07080b;
  --bg-2: #0d0f14;
  --surface: #111319;
  --text: #eef0f5;
  --muted: #98a0ad;
  --line: rgb(255 255 255 / .09);
  --accent: #8aa8ff;
  --accent-rgb: 138 168 255;
  --accent-ink: #07080b;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); overflow-x: hidden;
  font: 400 17px/1.6 "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
/* Film grain: fixed, non-interactive layer so it never repaints with scroll */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 30; pointer-events: none; opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
em { font-style: normal; color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.skip { position: absolute; left: 16px; top: -48px; padding: 8px 14px; background: var(--text); color: var(--bg); border-radius: 999px; z-index: 40; }
.skip:focus { top: 12px; }

.eyebrow { font: 500 13px/1 "Geist Mono", ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.h2 { font-size: clamp(2.25rem, 4.4vw, 3.5rem); line-height: 1.05; letter-spacing: -.04em; font-weight: 600; }
.ico { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ico--fill { fill: currentColor; stroke: none; }

/* Aurora: layered radial gradients in the accent only */
.aurora {
  position: absolute; inset: -20% -10% auto; height: 120%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40% 45% at 72% 38%, rgb(var(--accent-rgb) / .32), transparent 70%),
    radial-gradient(30% 35% at 20% 20%, rgb(var(--accent-rgb) / .14), transparent 70%),
    radial-gradient(35% 30% at 55% 85%, rgb(var(--accent-rgb) / .12), transparent 70%);
  filter: blur(20px);
}
.aurora--low { inset: auto -10% -30%; height: 110%; }

/* Buttons and links */
.btn {
  display: inline-flex; align-items: center; gap: 10px; white-space: nowrap;
  height: 50px; padding: 0 24px; border-radius: 999px;
  font-weight: 500; font-size: 16px; text-decoration: none; border: 1px solid transparent;
  transition: transform .25s var(--ease), background-color .2s, border-color .2s, box-shadow .25s;
}
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--accent); color: var(--accent-ink); box-shadow: inset 0 1px 0 rgb(255 255 255 / .25); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgb(255 255 255 / .25), 0 12px 30px -12px rgb(var(--accent-rgb) / .7); }
.btn--primary .ico { transition: transform .25s var(--ease); }
.btn--primary:hover .ico { transform: translateX(3px); }
.btn--ghost { border-color: var(--line); background: color-mix(in srgb, var(--surface) 70%, transparent); backdrop-filter: blur(10px); }
.btn--ghost:hover { border-color: var(--muted); transform: translateY(-2px); }
.btn--sm { height: 40px; padding: 0 18px; font-size: 15px; }
.link { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 500; text-decoration: none; }
.link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Nav: floating glass bar */
.nav { position: fixed; top: 12px; left: 0; right: 0; z-index: 20; padding: 0 16px; }
.nav__inner {
  max-width: 1208px; margin: 0 auto; height: 56px; padding: 0 8px 0 18px;
  display: flex; align-items: center; justify-content: space-between;
  border-radius: 999px; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .06);
}
.nav__brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -.01em; text-decoration: none; }
.nav__logo { height: 20px; width: auto; flex: none; transition: transform .4s var(--ease); }
.nav__brand:hover .nav__logo { transform: rotate(-8deg) scale(1.08); }
.nav__links { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.nav__links a:not(.btn) { text-decoration: none; color: var(--muted); transition: color .2s; }
.nav__links a:not(.btn):hover { color: var(--text); }
@media (prefers-reduced-transparency: reduce) { .nav__inner, .btn--ghost { background: var(--bg); backdrop-filter: none; } }

/* Hero */
.hero { position: relative; isolation: isolate; overflow: clip; }
.hero__grid {
  display: grid; grid-template-columns: 1.3fr .7fr; align-items: center; gap: 72px;
  min-height: 100dvh; padding-top: calc(var(--nav-h) + 40px); padding-bottom: 56px;
}
.hero__title { margin: 22px 0 26px; font-size: clamp(2.6rem, 5.4vw, 4.75rem); line-height: 1.02; letter-spacing: -.05em; font-weight: 600; white-space: nowrap; }
.rot { display: inline-grid; }
.rot > span { grid-area: 1 / 1; opacity: 0; transform: translateY(.35em); filter: blur(6px); transition: opacity .6s var(--ease), transform .6s var(--ease), filter .6s var(--ease); }
.rot > .is-on { opacity: 1; transform: none; filter: none; }
.hero__name { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; color: var(--text); }
.say { color: var(--muted); text-transform: none; letter-spacing: .02em; }
.hero__sub { font-size: clamp(1.05rem, 1.4vw, 1.25rem); color: var(--muted); max-width: 46ch; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 38px; }
.hero__photo { justify-self: end; width: 100%; max-width: 400px; perspective: 900px; }
.hero__photo img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; max-height: calc(100dvh - var(--nav-h) - 120px);
  border-radius: var(--radius); background: #6e6e6e; border: 1px solid var(--line);
  box-shadow: 0 40px 80px -40px rgb(7 8 11 / .6), 0 0 0 8px color-mix(in srgb, var(--surface) 40%, transparent);
  transform: rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg)); transition: transform .5s var(--ease);
}

/* Track record bento: 4 tiles, lead spans 2x2, last spans 2 columns */
.record { padding-top: 120px; padding-bottom: 120px; }
.bento { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(210px, auto); gap: 16px; margin-top: 56px; }
.tile {
  position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 28px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface);
}
.tile dt { order: 2; font-weight: 600; margin-top: 6px; }
.tile dd { display: contents; }
.tile__num { order: 1; font-size: clamp(2.5rem, 3.6vw, 3.25rem); line-height: 1; letter-spacing: -.05em; font-weight: 600; font-variant-numeric: tabular-nums; }
.tile__note { order: 3; color: var(--muted); font-size: 15px; margin-top: 8px; max-width: 34ch; }
.tile--lead { grid-column: span 2; grid-row: span 2; padding: 40px; background:
  radial-gradient(90% 80% at 85% 0%, rgb(var(--accent-rgb) / .35), transparent 60%),
  linear-gradient(160deg, var(--surface), var(--bg-2)); }
.tile--lead .tile__num { font-size: clamp(4.5rem, 10vw, 8.5rem); color: var(--accent); }
.tile--lead dt { font-size: 1.25rem; }
.tile--wide { grid-column: span 2; background: repeating-linear-gradient(135deg, transparent 0 14px, rgb(var(--accent-rgb) / .05) 14px 15px), var(--surface); }


/* Pointer spotlight on cards */
.glow::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; opacity: 0; transition: opacity .4s;
  background: radial-gradient(360px circle at var(--x, 50%) var(--y, 50%), rgb(var(--accent-rgb) / .14), transparent 60%);
}
.glow:hover::before { opacity: 1; }

/* Design, engineering, product */
.craft { padding-top: 40px; padding-bottom: 120px; }
.craft__statement { font-size: clamp(2rem, 4.2vw, 3.5rem); line-height: 1.12; letter-spacing: -.04em; font-weight: 500; max-width: 22ch; }
.craft__grid { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 64px; border-top: 1px solid var(--line); }
.craft__item { padding: 28px 32px 0 0; }
.craft__item + .craft__item { padding-left: 32px; border-left: 1px solid var(--line); }
.craft__item h3 { font: 500 13px/1 "Geist Mono", ui-monospace, monospace; letter-spacing: .04em; color: var(--accent); margin-bottom: 12px; }
.craft__item p { color: var(--muted); max-width: 32ch; }
.craft__bridge { margin-top: 48px; font-size: 1.25rem; line-height: 1.5; max-width: 52ch; color: var(--text); }

/* AI and people panel */
.belief { padding: 40px 0 140px; }
.belief__panel {
  position: relative; isolation: isolate; overflow: hidden; padding: 64px; border-radius: 28px; border: 1px solid var(--line);
  background:
    radial-gradient(60% 80% at 0% 0%, rgb(var(--accent-rgb) / .22), transparent 60%),
    radial-gradient(50% 70% at 100% 100%, rgb(var(--accent-rgb) / .14), transparent 60%),
    var(--surface);
}
.belief__panel::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background: radial-gradient(circle, rgb(var(--accent-rgb) / .18) 1px, transparent 1.5px) 0 0 / 22px 22px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 70%); mask-image: linear-gradient(180deg, #000, transparent 70%);
}
.belief__lead { font-size: clamp(2.25rem, 5vw, 4.25rem); line-height: 1.04; letter-spacing: -.05em; font-weight: 600; max-width: 16ch; }
.belief__split { display: grid; grid-template-columns: 1fr 120px 1fr; align-items: center; margin-top: 56px; }
.belief__side { padding: 28px; border-radius: var(--radius); border: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 55%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); height: 100%; }
.belief__tag { display: inline-block; font: 500 12px/1 "Geist Mono", ui-monospace, monospace; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); padding: 7px 11px; border-radius: 999px; border: 1px solid rgb(var(--accent-rgb) / .4); }
.belief__side h3 { font-size: 1.375rem; font-weight: 600; letter-spacing: -.03em; margin: 18px 0 8px; }
.belief__side p { color: var(--muted); }
/* Connector: a pulse travels both ways between AI and people */
.belief__bridge { position: relative; height: 2px; margin: 0 12px; background: linear-gradient(90deg, rgb(var(--accent-rgb) / .2), rgb(var(--accent-rgb) / .8), rgb(var(--accent-rgb) / .2)); }
.belief__bridge::before, .belief__bridge::after { content: ""; position: absolute; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; border: 2px solid var(--accent); background: var(--surface); }
.belief__bridge::before { left: -6px; }
.belief__bridge::after { right: -6px; }
.belief__bridge span { position: absolute; top: 50%; left: 0; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px 2px rgb(var(--accent-rgb) / .7); }
@media (prefers-reduced-motion: no-preference) { .belief__bridge span { animation: shuttle 2.6s ease-in-out infinite alternate; } }
@keyframes shuttle { to { left: 100%; } }
@keyframes shuttle-v { to { top: 100%; } }

/* Legacy to Flutter */
.shift { position: relative; padding: 120px 0; background: var(--bg-2); border-block: 1px solid var(--line); overflow: hidden; }
.shift__inner { display: grid; grid-template-columns: 1.2fr .8fr; gap: 72px; align-items: center; }
.shift__copy { color: var(--muted); font-size: 1.125rem; margin: 22px 0 32px; max-width: 52ch; }
.shift__cos { display: flex; flex-wrap: wrap; gap: 10px 28px; font-size: 1.125rem; font-weight: 600; letter-spacing: -.02em; }
.shift__cos li { color: var(--text); opacity: .85; }
.shift__proof {
  position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start;
  padding: 36px; border-radius: var(--radius); border: 1px solid var(--line);
  background: radial-gradient(90% 70% at 100% 0%, rgb(var(--accent-rgb) / .28), transparent 60%), var(--surface);
}
.shift__from { font: 400 14px/1.4 "Geist Mono", ui-monospace, monospace; color: var(--muted); text-decoration: line-through; }
.shift__arrow { margin: 10px 0; color: var(--accent); width: 20px; height: 20px; }
.shift__to { font: 500 14px/1.4 "Geist Mono", ui-monospace, monospace; color: var(--accent); }
.shift__num { font-size: clamp(3rem, 5vw, 4.25rem); line-height: 1; letter-spacing: -.05em; font-weight: 600; margin: 28px 0 10px; }
.shift__proof p { color: var(--muted); font-size: 15px; max-width: 34ch; }

/* Experience */
.exp { padding-top: 120px; padding-bottom: 120px; }
.exp .jobs { margin-bottom: 32px; }
.jobs { margin-top: 48px; counter-reset: job; }
.job { position: relative; display: grid; grid-template-columns: 280px 1fr; gap: 32px; padding: 40px 0; border-top: 1px solid var(--line); }
.job::before { content: ""; position: absolute; left: 0; top: -1px; height: 1px; width: 0; background: var(--accent); transition: width .9s var(--ease); }
.job:hover::before { width: 100%; }
.job__meta { display: flex; flex-direction: column; gap: 6px; }
.job__years, .job__where { font: 400 14px/1.4 "Geist Mono", ui-monospace, monospace; color: var(--muted); }
.job__co { font-size: 1.625rem; letter-spacing: -.03em; font-weight: 600; line-height: 1.15; }
.job__co a { text-decoration: none; }
.job__co a:hover { color: var(--accent); }
.job__body { max-width: 70ch; }
.roles { display: grid; gap: 6px; margin-bottom: 14px; }
.roles li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; }
.roles span { color: var(--muted); font-size: 15px; }
.job__body p { color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tags li { font-size: 14px; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 80%, transparent); }
.earlier { border-top: 1px solid var(--line); padding-top: 30px; color: var(--muted); max-width: 80ch; }
.earlier strong { color: var(--text); font-weight: 600; }

/* Venture */
.venture { position: relative; background: var(--bg-2); border-block: 1px solid var(--line); padding: 128px 0; overflow: hidden; }
.venture__inner { display: grid; grid-template-columns: .9fr 1.1fr; gap: 72px; align-items: center; }
.venture__logo { width: 64px; height: 64px; border-radius: 16px; margin-bottom: 32px; box-shadow: 0 20px 40px -20px rgb(7 8 11 / .6); }
.venture .eyebrow { margin-bottom: 12px; }
.venture__copy { color: var(--muted); margin: 20px 0 26px; max-width: 46ch; }
.products { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.products li:nth-child(2) { transform: translateY(48px); }
.product {
  position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; height: 100%;
  padding: 30px; text-decoration: none; min-height: 300px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  transition: transform .45s var(--ease), border-color .2s;
}
.product:hover { transform: translateY(-6px); border-color: rgb(var(--accent-rgb) / .5); }
.product img { width: 80px; height: 80px; object-fit: contain; margin-bottom: auto; padding-bottom: 40px; box-sizing: content-box; }
.product .product__tile { border-radius: 18px; object-fit: cover; padding-bottom: 0; margin-bottom: auto; }
.product__name { font-size: 1.5rem; font-weight: 600; letter-spacing: -.03em; margin-top: 40px; }
.product__desc { color: var(--muted); margin-top: 4px; }
.product__url { display: inline-flex; align-items: center; gap: 6px; margin-top: 22px; color: var(--accent); font-weight: 500; font-size: 15px; }

/* "Before that" strip: compact summary that hands off to LinkedIn */
.more {
  position: relative; isolation: isolate; overflow: hidden; margin-top: 8px;
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  padding: 32px 36px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface);
}
.more__title { font-size: 1.25rem; font-weight: 600; letter-spacing: -.02em; margin-bottom: 6px; }
.more p { color: var(--muted); max-width: 62ch; }
.more .tags { margin-top: 16px; }
.more .btn { flex: none; }

/* Contact */
.contact { position: relative; isolation: isolate; overflow: clip; padding: 160px 0 128px; border-top: 1px solid var(--line); }
.contact__inner { display: flex; flex-direction: column; align-items: flex-start; }
.contact__title { font-size: clamp(3rem, 8.5vw, 7rem); line-height: .98; letter-spacing: -.055em; font-weight: 600; max-width: 12ch; }
.contact__sub { color: var(--muted); font-size: 1.125rem; margin: 26px 0 40px; max-width: 46ch; }
.contact__email {
  font-size: clamp(1.4rem, 3.8vw, 2.75rem); font-weight: 500; letter-spacing: -.035em; color: var(--text);
  text-decoration: none; margin-bottom: 26px; overflow-wrap: anywhere;
  background: linear-gradient(var(--accent), var(--accent)) 0 100% / 100% 2px no-repeat; padding-bottom: 6px;
  transition: background-size .5s var(--ease), color .2s;
}
.contact__email:hover { color: var(--accent); background-size: 0% 2px; background-position: 100% 100%; }

.footer { display: flex; justify-content: space-between; gap: 16px; padding-top: 28px; padding-bottom: 88px; color: var(--muted); font-size: 14px; }

/* Motion: entry, reveal, ambient drift. All gated on reduced-motion. */
.has-reveal .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.has-reveal .reveal.is-in { opacity: 1; transform: none; }
.has-reveal .products li:nth-child(2).reveal.is-in { transform: translateY(48px); }
@media (prefers-reduced-motion: no-preference) {
  .hero__text > *, .hero__photo { animation: rise 1s var(--ease) both; }
  .hero__text > :nth-child(2) { animation-delay: .08s; }
  .hero__text > :nth-child(3) { animation-delay: .16s; }
  .hero__text > :nth-child(4) { animation-delay: .24s; }
  .hero__photo { animation: rise-photo 1.2s var(--ease) .12s both; }
  .aurora { animation: drift 18s ease-in-out infinite alternate; }
}
@keyframes rise { from { opacity: 0; transform: translateY(24px); filter: blur(8px); } }
@keyframes rise-photo { from { opacity: 0; transform: translateY(40px) scale(.96); } }
@keyframes drift { to { transform: translate3d(-4%, 3%, 0) scale(1.08); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .product, .btn, .hero__photo img, .rot > span { transition: none; }
}

/* ---------- Effects layer ---------- */

/* Reading progress, driven by the scroll timeline where supported */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 25; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none; }
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) { .progress { animation: grow linear both; animation-timeline: scroll(root); } }
}
@keyframes grow { to { transform: scaleX(1); } }

/* Interactive dot field behind the hero */
.hero__dots {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 60% 45%, #000 30%, transparent 85%);
  mask-image: radial-gradient(ellipse 80% 70% at 60% 45%, #000 30%, transparent 85%);
}

/* Headline: words rise out of their own line masks */
.hero__text > .hero__title { animation: none; }
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }
.w > span { display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  .w > span { animation: word-up 1s var(--ease) both; animation-delay: calc(.15s + var(--i) * .07s); }
}
@keyframes word-up { from { transform: translateY(105%); } }


/* Travelling light around key cards */
@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.spin::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: conic-gradient(from var(--a), transparent 0 65%, rgb(var(--accent-rgb) / .95) 82%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
@media (prefers-reduced-motion: no-preference) { .spin::after { animation: spin 6s linear infinite; } }
@keyframes spin { to { --a: 360deg; } }

/* Section headings wipe up into view */
.has-reveal .h2.reveal { clip-path: inset(0 0 100% 0); transform: translateY(40px); transition: clip-path 1s var(--ease), transform 1s var(--ease), opacity .6s; }
.has-reveal .h2.reveal.is-in { clip-path: inset(0 0 -20% 0); transform: none; }

/* Magnetic buttons: JS sets --mx/--my */
.magnetic { translate: var(--mx, 0) var(--my, 0); transition: translate .35s var(--ease), transform .25s var(--ease), background-color .2s, box-shadow .25s; }

/* ---------- Background bug game ---------- */
.bugs { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 15; pointer-events: none; }
html.on-bug, html.on-bug * { cursor: crosshair !important; }
.bughud {
  position: fixed; left: 20px; bottom: 20px; z-index: 22; display: flex; align-items: center; gap: 14px;
  height: 42px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 75%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  font-size: 14px; color: var(--muted); pointer-events: none;
  opacity: 0; transform: translateY(12px); transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.bughud.is-on { opacity: 1; transform: none; }
.bughud b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.bughud__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgb(var(--accent-rgb) / .2); }
.bughud__score, .bughud__best { display: none; }
.bughud.has-score .bughud__hint { display: none; }
.bughud.has-score .bughud__score, .bughud.has-score .bughud__best { display: inline; }
.bughud.bump .bughud__score b { display: inline-block; animation: bump .35s var(--ease); }
@keyframes bump { 40% { transform: scale(1.5); color: var(--accent); } }

@media (max-width: 767px) {
  .bughud { left: 12px; bottom: 12px; height: 38px; font-size: 13px; }
}

/* Tablet */
@media (max-width: 1000px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .tile--lead { grid-row: span 1; }
  
  .venture__inner, .shift__inner { grid-template-columns: 1fr; gap: 48px; }
  .job { grid-template-columns: 220px 1fr; }
}

/* Mobile */
@media (max-width: 767px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .nav { top: 8px; padding: 0 8px; }
  .nav__links a:not(.btn) { display: none; }
  .hero__grid { grid-template-columns: 1fr; gap: 32px; min-height: 0; padding-top: calc(var(--nav-h) + 24px); padding-bottom: 72px; }
  .hero__photo { order: -1; justify-self: start; max-width: 190px; }
  .hero__photo img { max-height: none; }
  .hero__title { margin-top: 14px; white-space: normal; }
  .hero__ctas .btn { flex: 1 1 auto; justify-content: center; }
  .record { padding-top: 72px; padding-bottom: 72px; }
  .bento { grid-template-columns: 1fr; margin-top: 32px; }
  .tile--lead, .tile--wide { grid-column: auto; }
  .tile--lead { padding: 28px; }
  .exp { padding-bottom: 72px; }
  .jobs { margin-top: 24px; }
  .job { grid-template-columns: 1fr; gap: 14px; padding: 30px 0; }
  .roles li { flex-direction: column; }
  .venture, .shift { padding: 80px 0; }
  .craft { padding-top: 16px; padding-bottom: 80px; }
  .belief { padding: 8px 0 80px; }
  .belief__panel { padding: 28px 20px; border-radius: 22px; }
  .belief__split { grid-template-columns: 1fr; margin-top: 32px; }
  .belief__side { padding: 22px; }
  .belief__bridge { width: 2px; height: 56px; margin: 12px auto; background: linear-gradient(180deg, rgb(var(--accent-rgb) / .2), rgb(var(--accent-rgb) / .8), rgb(var(--accent-rgb) / .2)); }
  .belief__bridge::before { left: 50%; top: -6px; margin: 0 0 0 -5px; }
  .belief__bridge::after { left: 50%; right: auto; top: auto; bottom: -6px; margin: 0 0 0 -5px; }
  .belief__bridge span { left: 50%; top: 0; margin: -4px 0 0 -4px; animation-name: shuttle-v; }
  .craft__grid { grid-template-columns: 1fr; margin-top: 40px; }
  .craft__item, .craft__item + .craft__item { padding: 22px 0; border-left: 0; }
  .craft__item + .craft__item { border-top: 1px solid var(--line); }
  .craft__bridge { margin-top: 24px; font-size: 1.125rem; }
  .exp { padding-top: 72px; }
  .shift__proof { padding: 28px; }
  .products { grid-template-columns: 1fr; }
  .products li:nth-child(2), .has-reveal .products li:nth-child(2).reveal.is-in { transform: none; }
  .product { min-height: 0; }
  .more { flex-direction: column; align-items: stretch; padding: 24px; }
  .more .btn { justify-content: center; }
  .contact { padding: 96px 0 80px; }
  .footer { flex-direction: column; gap: 4px; }
}

/* ================= Premium layer ================= */
/* Display type: larger, lighter, tighter */
.hero__title { font-weight: 500; letter-spacing: -.055em; font-size: clamp(2.8rem, 6vw, 5.5rem); }
.h2, .craft__statement, .belief__lead, .contact__title { font-weight: 500; }
.h2 { letter-spacing: -.045em; }

.hero__photo picture { display: contents; }
/* Cut-out portrait standing in a soft halo, fading into the page at the bottom */
.hero__grid { grid-template-columns: 1.05fr .95fr; gap: 32px; }
.hero__photo { position: relative; max-width: 620px; align-self: end; margin-bottom: -56px; }
.hero__grid { padding-bottom: 0; }
.hero__photo { margin-bottom: 0; }
.hero__photo::before {
  content: ""; position: absolute; z-index: -1; left: 8%; right: 8%; top: 12%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgb(var(--accent-rgb) / .38), rgb(var(--accent-rgb) / .08) 55%, transparent 70%); filter: blur(10px);
}
.hero__photo::after {
  content: ""; position: absolute; z-index: -1; left: 14%; right: 14%; top: 18%; aspect-ratio: 1; border-radius: 50%;
  border: 1px solid rgb(var(--accent-rgb) / .25);
}
.hero__photo img {
  border: 0; border-radius: 0; box-shadow: none; background: none; transform: none; max-height: calc(100dvh - var(--nav-h) - 24px); width: auto; margin-inline: auto;
  filter: drop-shadow(0 30px 40px rgb(0 0 0 / .35));
  -webkit-mask-image: linear-gradient(180deg, #000 62%, transparent 100%); mask-image: linear-gradient(180deg, #000 62%, transparent 100%);
}
.hero__dots { opacity: .7; }

/* Career at a glance */
.creds { position: relative; border-block: 1px solid var(--line); background: linear-gradient(180deg, var(--bg-2), var(--bg)); }
.creds__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.cred { display: flex; flex-direction: column; gap: 10px; padding: 44px 28px 40px; }
.cred + .cred { border-left: 1px solid var(--line); }
.cred:first-child { padding-left: 0; }
.cred__num { font-size: clamp(2.5rem, 4.6vw, 4rem); line-height: 1; letter-spacing: -.05em; font-weight: 400; font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, var(--text) 30%, color-mix(in srgb, var(--text) 45%, var(--accent))); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cred__label { color: var(--muted); font-size: 15px; max-width: 22ch; }

/* Cards: hairline top highlight for a machined edge */
.tile, .product, .shift__proof, .belief__panel, .belief__side, .more { box-shadow: inset 0 1px 0 rgb(255 255 255 / .06), 0 30px 60px -40px rgb(0 0 0 / .5); }

/* Editorial timeline */
.job { grid-template-columns: 320px 1fr; padding: 48px 0; }
.job__big { font-size: clamp(3rem, 5vw, 4.5rem); line-height: .9; letter-spacing: -.06em; font-weight: 300; color: color-mix(in srgb, var(--text) 30%, transparent); font-variant-numeric: tabular-nums; margin-bottom: 14px; transition: color .5s var(--ease); }
.job:hover .job__big { color: var(--accent); }

/* Signature wordmark */
.signature {
  margin-top: 40px; font-size: clamp(4rem, 15.5vw, 15rem); line-height: .8; letter-spacing: -.07em; font-weight: 600; white-space: nowrap; overflow: hidden;
  background: linear-gradient(180deg, color-mix(in srgb, var(--text) 16%, transparent), transparent 85%); -webkit-background-clip: text; background-clip: text; color: transparent;
  user-select: none; padding-bottom: .05em;
}

@media (max-width: 1000px) {
  .creds__grid { grid-template-columns: 1fr 1fr; }
  .cred:nth-child(3) { border-left: 0; padding-left: 0; }
  .cred:nth-child(n+3) { border-top: 1px solid var(--line); }
  .job { grid-template-columns: 220px 1fr; }
}
@media (max-width: 767px) {
  .hero__photo { max-width: 240px; margin-bottom: 0; align-self: start; justify-self: center; }
  .hero__grid { grid-template-columns: 1fr; gap: 24px; padding-bottom: 56px; }
  .hero__photo img { -webkit-mask-image: linear-gradient(180deg, #000 75%, transparent 100%); mask-image: linear-gradient(180deg, #000 75%, transparent 100%); }
  .cred { padding: 28px 16px 26px; }
  .cred:nth-child(odd) { padding-left: 0; }
  .job { grid-template-columns: 1fr; padding: 32px 0; }
  .job__big { margin-bottom: 6px; }
  .signature { margin-top: 24px; }
}

/* ================= Motion layer 2 ================= */
/* Page-wide cursor spotlight (JS sets --cx/--cy) */
.spotlight { position: fixed; inset: 0; z-index: 14; pointer-events: none; opacity: 0; transition: opacity .6s;
  background: radial-gradient(520px circle at var(--cx, 50%) var(--cy, 50%), rgb(var(--accent-rgb) / .07), transparent 60%); }
.spotlight.is-on { opacity: 1; }

/* Hero: shimmer across the emphasised word */
.hero__title em { background: linear-gradient(110deg, var(--accent) 35%, color-mix(in srgb, var(--accent) 35%, #fff) 50%, var(--accent) 65%) 0 0 / 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (prefers-reduced-motion: no-preference) {
  .hero__title em { animation: shimmer 5s ease-in-out 1.6s infinite; }
  /* Halo ring turns slowly behind the portrait */
  .hero__photo::after { border-style: dashed; animation: halo 60s linear infinite; }
}
@keyframes shimmer { 0%, 55% { background-position: 100% 0; } 100% { background-position: -50% 0; } }
@keyframes halo { to { rotate: 360deg; } }

/* Portrait drifts as the hero scrolls away */
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .hero__photo img { animation: portrait-drift linear both; animation-timeline: scroll(root); animation-range: 0 100vh; }
  }
}
@keyframes portrait-drift { to { translate: 0 70px; scale: 1.05; opacity: .5; } }

/* 3D tilt toward the cursor: JS sets the individual rotate property, so it never fights reveal transforms */
.bento, .products, .belief__split, .shift__inner { perspective: 1200px; }
.tilt3d { transition: rotate .5s var(--ease), transform .45s var(--ease), border-color .2s; will-change: rotate; }

/* Main buttons: periodic sheen */
.btn--primary { position: relative; overflow: hidden; isolation: isolate; }
.btn--primary::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgb(255 255 255 / .45) 50%, transparent 65%); transform: translateX(-120%); }
@media (prefers-reduced-motion: no-preference) { .btn--primary::after { animation: sheen 6s ease-in-out 2.5s infinite; } }
@keyframes sheen { 0%, 80% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }

/* Tags lift on hover */
.tags li { transition: transform .3s var(--ease), border-color .2s, color .2s; }
.tags li:hover { transform: translateY(-2px); border-color: rgb(var(--accent-rgb) / .6); color: var(--accent); }

/* Scroll-filled statements: JS wraps words in .fw and lights them as you scroll */
.fw { opacity: .16; transition: opacity .35s ease; }
.fw.on { opacity: 1; }

/* Experience: a timeline that draws itself as you read */
@media (min-width: 1001px) {
  .jobs { position: relative; }
  .jobs::before, .jobs::after { content: ""; position: absolute; left: -24px; top: 48px; bottom: 0; width: 1px; }
  .jobs::before { background: var(--line); }
  .jobs::after { background: linear-gradient(180deg, var(--accent), rgb(var(--accent-rgb) / .2)); transform-origin: top; transform: scaleY(1); }
  @supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) {
      .jobs::after { animation: draw-line linear both; animation-timeline: view(); animation-range: entry 10% exit 60%; }
    }
  }
  .job::after { content: ""; position: absolute; left: -28px; top: 66px; width: 9px; height: 9px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
}
@keyframes draw-line { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* Products I've built: app-icon gallery, 8 cells (4x2, then 2x4) */
.apps { padding-top: 40px; padding-bottom: 140px; }
.apps__sub { color: var(--muted); font-size: 1.125rem; margin-top: 18px; max-width: 52ch; }
.apps__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 56px; }
.apps__grid > li { display: flex; }
.app {
  position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; width: 100%;
  padding: 26px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); text-decoration: none;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .06), 0 30px 60px -40px rgb(0 0 0 / .5);
}
.app__icon {
  display: grid; place-items: center; width: 76px; height: 76px; border-radius: 20px; overflow: hidden; margin-bottom: 28px;
  box-shadow: 0 14px 30px -14px rgb(0 0 0 / .6), inset 0 0 0 1px rgb(255 255 255 / .08);
  transition: transform .5s var(--ease);
}
.app__icon img { width: 100%; height: 100%; object-fit: cover; }
/* Marks and white wordmarks sit on a dark brand tile so they read like app icons */
.app__icon--mark, .app__icon--wordmark { background: radial-gradient(120% 120% at 30% 0%, #2a2f3a, #0d0f14); }
.app__icon--mark img { width: 74%; height: 74%; object-fit: contain; }
.app__icon--wordmark img { width: 84%; height: auto; object-fit: contain; }
.app:hover .app__icon { transform: translateY(-4px) scale(1.04); }
.app__name { font-size: 1.25rem; font-weight: 600; letter-spacing: -.03em; }
.app__meta { font: 400 13px/1.4 "Geist Mono", ui-monospace, monospace; color: var(--accent); margin-top: 6px; }
.app__desc { color: var(--muted); font-size: 15px; margin-top: 10px; }
.app--more { background: radial-gradient(90% 90% at 100% 0%, rgb(var(--accent-rgb) / .22), transparent 60%), var(--surface); border-color: rgb(var(--accent-rgb) / .35); }
.app__stack { display: flex; height: 76px; align-items: center; margin-bottom: 28px; }
.app__stack img { width: 60px; height: 60px; border-radius: 16px; object-fit: cover; box-shadow: 0 12px 26px -12px rgb(0 0 0 / .6); border: 2px solid var(--surface); }
.app__stack img + img { margin-left: -14px; rotate: 8deg; }
.app__go { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 18px; color: var(--accent); font-weight: 500; font-size: 15px; }
.apps__more { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding: 20px 26px; border-radius: var(--radius); border: 1px dashed rgb(var(--accent-rgb) / .35); color: var(--muted); font-size: 1.0625rem; }
.apps__more .ico { flex: none; width: 20px; height: 20px; color: var(--accent); }
@media (max-width: 1000px) { .apps__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 767px) {
  .apps { padding-top: 8px; padding-bottom: 80px; }
  .apps__grid { gap: 12px; margin-top: 32px; }
  .app { padding: 18px; }
  .app__icon, .app__stack { margin-bottom: 18px; }
  .app__icon { width: 60px; height: 60px; border-radius: 16px; }
  .app__stack { height: 60px; }
  .app__stack img { width: 48px; height: 48px; border-radius: 13px; }
  .app__name { font-size: 1.0625rem; }
  .app__desc { font-size: 14px; }
  .apps__more { align-items: flex-start; padding: 16px 18px; font-size: 15px; margin-top: 12px; }
  .apps__more .ico { margin-top: 2px; }
}

/* Contact QR: scan on desktop, download the card on phones */
.contact__grid { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 64px; }
.qr {
  position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 18px; width: 284px;
  padding: 24px; border-radius: 24px; border: 1px solid var(--line); text-align: center;
  background: radial-gradient(90% 70% at 50% 0%, rgb(var(--accent-rgb) / .2), transparent 70%), var(--surface);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .06), 0 30px 60px -40px rgb(0 0 0 / .5);
}
/* Off-white tile with padding gives the code its quiet zone in both themes */
.qr__code { width: 224px; height: 224px; padding: 6px; border-radius: 20px; background: #f4f5f8; box-shadow: 0 18px 40px -20px rgb(0 0 0 / .5); transition: transform .5s var(--ease); }
.qr:hover .qr__code { transform: scale(1.03); }
.qr figcaption { display: grid; gap: 4px; }
.qr strong { font-weight: 600; letter-spacing: -.02em; }
.qr figcaption > span { color: var(--muted); font-size: 14px; }
.qr__mob { display: none; }
.qr__save { height: 42px; font-size: 15px; }
@media (max-width: 1000px) { .contact__grid { grid-template-columns: 1fr; gap: 40px; } }
@media (max-width: 767px) {
  .qr { width: 100%; flex-direction: row; flex-wrap: wrap; text-align: left; align-items: center; padding: 20px; }
  .qr__code { display: none; }
  .qr figcaption { flex: 1 1 180px; }
  .qr__desk { display: none; }
  .qr__mob { display: inline; }
  .qr__save { flex: 1 1 100%; justify-content: center; }
}

/* ================= Premium finish ================= */
::selection { background: rgb(var(--accent-rgb) / .35); color: var(--text); }
html { scrollbar-width: thin; scrollbar-color: rgb(var(--accent-rgb) / .35) transparent; }

/* Hairlines that fade out at the edges instead of hard-stopping */
:root { --hair: linear-gradient(90deg, transparent, var(--line) 15%, var(--line) 85%, transparent); }
.job, .creds, .shift, .venture, .contact, .craft__grid { border-image: var(--hair) 1; }

/* Platinum finish on section headlines (accent words keep their own colour) */
.h2, .contact__title {
  background: linear-gradient(180deg, var(--text) 35%, color-mix(in srgb, var(--text) 62%, var(--bg)));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.h2 em, .contact__title em { -webkit-text-fill-color: var(--accent); }

/* Intro: first visit per session only; head script toggles the classes */
.intro { display: none; }
.intro-playing .intro, .intro-out .intro {
  position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: radial-gradient(60% 50% at 50% 45%, rgb(var(--accent-rgb) / .14), transparent 70%), var(--bg);
}
.intro__name { font-size: clamp(2.75rem, 8vw, 6.5rem); font-weight: 500; letter-spacing: -.055em; line-height: 1; display: flex; gap: .25em; overflow: hidden; padding-bottom: .08em; }
.intro__name span { display: inline-block; animation: word-up 1s var(--ease) both; }
.intro__name span + span { animation-delay: .1s; color: var(--accent); }
.intro__line { width: min(280px, 50vw); height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); transform-origin: center; animation: line-grow 1.1s var(--ease) .25s both; }
.intro__role { font: 500 12px/1 "Geist Mono", ui-monospace, monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); animation: rise 1s var(--ease) .45s both; }
.intro-out .intro { transform: translateY(-100%); transition: transform 1s cubic-bezier(.77, 0, .18, 1); }
.intro-playing body { overflow: hidden; }
/* Hold the hero's entrance until the curtain lifts */
.intro-playing .hero, .intro-playing .hero * { animation-play-state: paused !important; }
@keyframes line-grow { from { transform: scaleX(0); opacity: 0; } }

/* Top menu: a pill slides to the section being read (JS sets position) */
.nav__links { position: relative; }
.nav__pill { position: absolute; top: 50%; height: 32px; margin-top: -16px; left: 0; width: 0; border-radius: 999px; pointer-events: none;
  background: rgb(var(--accent-rgb) / .12); border: 1px solid rgb(var(--accent-rgb) / .25); opacity: 0;
  transition: left .5s var(--ease), width .5s var(--ease), opacity .3s; }
.nav__pill.is-on { opacity: 1; }
.nav__links a.is-active { color: var(--text); }
.nav__links a:not(.btn) { position: relative; padding: 6px 2px; }

/* Shipped at: monochrome logo strip */
.shipped { display: flex; align-items: center; gap: 48px; padding-top: 34px; padding-bottom: 38px; border-top: 1px solid transparent; border-image: var(--hair) 1; }
.shipped__label { flex: none; font-size: 14px; color: var(--muted); }
.shipped__logos { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.shipped__logos li { display: flex; align-items: center; gap: 10px; opacity: .55; transition: opacity .3s; }
.shipped__logos li:hover { opacity: 1; }
.shipped__logos img { height: 30px; width: auto; filter: brightness(0) invert(1); }
.shipped__logos li:nth-child(2) img { height: 38px; }
.shipped__lockup img { height: 30px; }
/* Full-colour marks can't be flattened to a silhouette without losing their letters: greyscale, colour on hover */
.shipped__logos .shipped__lockup--color img { height: 34px; filter: grayscale(1) contrast(1.15) brightness(1.1); transition: filter .4s; }
.shipped__logos .shipped__lockup--color:hover img { filter: none; }
.shipped__more a { font-size: 1.0625rem; font-style: italic; color: var(--muted); text-decoration: none; white-space: nowrap; }
.shipped__logos .shipped__more:hover a { color: var(--accent); }
.shipped__lockup span { font-size: 1.125rem; font-weight: 600; letter-spacing: -.03em; color: var(--text); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .shipped__logos li:not(.shipped__lockup--color) img { filter: brightness(0); } }
:root[data-theme="light"] .shipped__logos li:not(.shipped__lockup--color) img { filter: brightness(0); }

@media (max-width: 1240px) {
  .shipped { flex-direction: column; align-items: flex-start; gap: 20px; }
  .shipped__logos { width: 100%; gap: 24px; }
}
@media (max-width: 767px) {
  .shipped { flex-direction: column; align-items: flex-start; gap: 20px; padding-top: 26px; padding-bottom: 30px; }
  .shipped__logos { justify-content: flex-start; gap: 22px 32px; }
  .shipped__logos img { height: 24px; }
  .shipped__logos li:nth-child(2) img { height: 30px; }
}

/* Theme button: cycles Auto, Light, Dark; shows the icon for the current mode */
.theme-btn { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; transition: color .2s, border-color .2s, transform .2s var(--ease); }
.theme-btn:hover { color: var(--text); border-color: var(--muted); }
.theme-btn:active { transform: scale(.92); }
.theme-btn svg { display: none; width: 17px; height: 17px; }
.theme-btn[data-mode="auto"] .i-auto, .theme-btn[data-mode="light"] .i-light, .theme-btn[data-mode="dark"] .i-dark { display: block; }
@media (prefers-reduced-motion: no-preference) { .theme-btn svg { animation: pop-in .35s var(--ease); } }
@keyframes pop-in { from { opacity: 0; transform: rotate(-60deg) scale(.6); } }
/* Brief cross-fade while the theme switches */
.theme-fade, .theme-fade *, .theme-fade *::before, .theme-fade *::after { transition: background-color .45s ease, color .45s ease, border-color .45s ease, fill .45s ease !important; }
@media (max-width: 767px) { .theme-btn { width: 36px; height: 36px; } .nav__links { gap: 10px; } }

/* &$.! logo placements (shared <symbol id="logo">) */
.intro__logo { height: clamp(40px, 6vw, 64px); width: auto; color: var(--text); margin-bottom: 6px; animation: rise 1s var(--ease) both; }
.footer__brand { display: inline-flex; align-items: center; gap: 10px; }
.footer__logo { height: 16px; width: auto; color: var(--text); }
