/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; border: 0 solid; letter-spacing: -.03em; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans); font-size: 16px; line-height: 1.5;
  background: var(--paper); background-image: var(--grain); background-size: 240px 240px;
  color: var(--ink); -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; }
img { -webkit-user-drag: none; user-select: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; cursor: pointer; }
ol, ul { list-style: none; }
::selection { background: var(--accent-red); color: var(--paper); }
:focus-visible { outline: 2px solid var(--accent-blue); outline-offset: 3px; border-radius: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.muted { color: var(--ink-muted); }
.tabular { font-variant-numeric: tabular-nums; }
.skip-link { position: fixed; left: 1rem; top: -3rem; z-index: 200; background: var(--ink); color: var(--paper); padding: .5rem .9rem; border-radius: 999px; font-size: .8125rem; transition: top .2s; }
.skip-link:focus { top: 1rem; }

.column { width: 100%; max-width: var(--col); margin-inline: auto; }
.section { padding: var(--section-y) var(--gutter); }
.section-title { font-size: .875rem; line-height: 1.25rem; font-weight: 500; }

/* ==========================================================================
   Reveal (after preloader)
   ========================================================================== */
html:not([data-revealed]) .reveal { opacity: 0; }
html[data-revealed] .reveal { animation: blur-in 1.1s var(--ease-reveal) calc(var(--i, 0) * .13s) both; }
@keyframes blur-in { 0% { opacity: 0; filter: blur(10px); translate: 0 6px; } }
@keyframes fade-in { 0% { opacity: 0; } }

/* ==========================================================================
   Preloader — signature draws, a line types in, the page peels away
   ========================================================================== */
html[data-preloader="active"] { overflow: hidden; }
.preloader { position: fixed; inset: 0; z-index: 100; pointer-events: none; filter: drop-shadow(-4px -4px 10px #1414121f); }
.preloader-page { position: absolute; inset: 0; display: grid; place-items: center; background: var(--paper); background-image: var(--grain); background-size: 240px 240px; }
.preloader-stack { display: grid; justify-items: center; width: min(78vw, 22rem); }
.preloader-line { display: flex; align-items: center; min-height: 1.25rem; margin-top: .6rem; font-size: .8125rem; line-height: 1.25rem; color: var(--ink-muted); opacity: 0; transition: opacity .3s; }
.preloader-line[data-on] { opacity: 1; }
.preloader-line-text::first-letter { text-transform: uppercase; }
.preloader-caret { width: 1px; height: 1em; margin-left: 2px; background: var(--accent-red); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.preloader-signature { width: 100%; height: auto; color: var(--ink); overflow: visible; }
/* the folded-back corner: a mirror of the cut-off part, shaded like the back of a sheet */
.preloader-flap-shadow { position: absolute; inset: 0; filter: drop-shadow(-10px -10px 18px #14141238); }
.preloader-flap { position: absolute; inset: 0; clip-path: polygon(0 0, 0 0, 0 0); }

/* signature: written stroke-first by JS (Web Animations), hidden until then */
.sig-text { font-family: var(--font-hand); font-weight: 500; letter-spacing: 0; fill: transparent; stroke: currentColor; stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; paint-order: stroke;
  stroke-dasharray: 1600; stroke-dashoffset: 1600; }
.sig-line { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-dasharray: 400; stroke-dashoffset: 400; }
@media (prefers-reduced-motion: reduce) { .sig-text { fill: currentColor; stroke-width: .4; stroke-dashoffset: 0; } .sig-line { stroke-dashoffset: 0; } }

/* ==========================================================================
   Header
   ========================================================================== */
.header-veil { position: fixed; inset: 0 0 auto; height: 5.5rem; z-index: 49; pointer-events: none; opacity: 0;
  transition: opacity .35s, translate .35s var(--ease-out); }
.header-veil[data-scrolled] { opacity: 1; }
.header-veil[data-hidden], html[data-menu-open] .header-veil { translate: 0 -100%; }
.header-veil span, .header-veil::after { position: absolute; inset: 0; }
/* a plain paper fade, not stacked backdrop blurs: those re-blur the page on every scroll frame */
.header-veil span { display: none; }
.header-veil::after { content: ""; background: linear-gradient(to bottom, color-mix(in srgb, var(--paper) 94%, transparent) 15%, color-mix(in srgb, var(--paper) 60%, transparent) 55%, transparent); }

.header-shell { position: fixed; inset: 0 0 auto; z-index: 50; color: #fff; mix-blend-mode: difference; transition: translate .35s var(--ease-out); }
.header-shell[data-hidden] { translate: 0 -100%; }
html[data-menu-open] .header-shell { mix-blend-mode: normal; color: var(--ink); }
.header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem var(--gutter); font-size: .75rem; line-height: 1rem; }
.header-left { display: flex; align-items: center; gap: 1.25rem; }
.header-logo { display: block; width: fit-content; flex-shrink: 0; }
.header-logo svg { height: 1.75rem; width: auto; overflow: visible; }
.header-nav { display: none; align-items: center; gap: 1.25rem; }
.header-right { display: flex; align-items: center; justify-content: flex-end; gap: 1.25rem; color: #ffffff8c; }
.header-right .ink { color: #fff; }
html[data-menu-open] .header-right, html[data-menu-open] .header-right .ink { color: var(--ink); }
.header-call { color: #000; background: #fff; border-radius: 999px; padding: .4rem .8rem; font-weight: 500; white-space: nowrap; }
html[data-menu-open] .header-call { background: var(--ink); color: var(--paper); }
.md-only, .lg-only { display: none !important; }
.clock { display: flex; gap: .5rem; }
@media (min-width: 768px) {
  .header-left { gap: 2rem; }
  .header-logo svg { height: 2rem; }
  .header-nav { display: flex; }
  .md-only { display: inline-flex !important; }
  .mobile-only { display: none !important; }
}
@media (min-width: 1024px) { .lg-only { display: flex !important; } }

.link-underline { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .3s; }
.link-underline:hover, .link-underline:focus-visible { background-size: 100% 1px; }

.theme-toggle { display: inline-flex; align-items: center; gap: .35rem; }
.theme-toggle-icon { width: .95rem; height: .95rem; fill: none; stroke: currentColor; stroke-width: 1.7px; stroke-linecap: round; stroke-linejoin: round; transition: rotate .5s var(--ease-spring); }
.theme-toggle:hover .theme-toggle-icon { rotate: -20deg; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
html.theme-switching *, html.theme-switching *::before, html.theme-switching *::after { transition: none !important; }

/* Mobile menu sheet */
.mobile-menu { position: fixed; inset: 0; z-index: 45; visibility: hidden; transition: visibility 0s linear .45s; --sheet: 25.5rem; }
.mobile-menu[data-open] { visibility: visible; transition: none; }
.mobile-menu::before { content: ""; position: absolute; inset: 0 0 auto; height: var(--sheet); z-index: 0; background: var(--paper); background-image: var(--grain); border-radius: 0 0 18px 18px; translate: 0 -101%; transition: translate .45s var(--ease-sheet); box-shadow: 0 24px 50px -30px #14141280; }
.mobile-menu[data-open]::before { translate: 0; }
.mobile-menu-scrim { position: absolute; inset: 0; z-index: -1; background: #14141240; opacity: 0; transition: opacity .35s; width: 100%; }
.mobile-menu[data-open] .mobile-menu-scrim { opacity: 1; }
html[data-menu-open] { overflow: hidden; }
.mobile-menu-links, .mobile-menu-controls { position: relative; z-index: 1; }
.mobile-menu-links { display: grid; padding: 4.75rem 1.25rem 0; }
.mobile-menu-links a, .mobile-menu-controls { opacity: 0; filter: blur(6px); translate: 0 -.6rem; transition: opacity .25s, translate .25s, filter .25s; }
.mobile-menu-links a { border-bottom: 1px dashed var(--line); padding: .45rem 0; color: var(--ink); font-size: 2.125rem; font-weight: 500; line-height: 1.1; letter-spacing: -.045em; }
.mobile-menu[data-open] .mobile-menu-links a, .mobile-menu[data-open] .mobile-menu-controls {
  opacity: 1; filter: blur(0); translate: 0;
  transition: opacity .45s ease calc(.12s + var(--i) * 50ms), translate .5s var(--ease-out) calc(.12s + var(--i) * 50ms), filter .45s ease calc(.12s + var(--i) * 50ms); }
.mobile-menu-controls { display: flex; justify-content: space-between; align-items: center; padding: 1.25rem 1.25rem 0; font-size: .8125rem; color: var(--ink-muted); }
.mobile-menu-theme { display: flex; gap: .4rem; }
.mobile-menu-controls button[aria-pressed="true"] { color: var(--ink); }

/* ==========================================================================
   Intro
   ========================================================================== */
.intro { padding: 8rem var(--gutter) 5rem; }
@media (min-width: 768px) { .intro { padding: 16vh var(--gutter) 7rem; } }
.intro-top { display: flex; align-items: flex-end; gap: 1.1rem; }
.intro-tag { display: flex; align-items: flex-end; gap: .2rem; margin-bottom: .9rem; font-family: var(--font-hand); font-size: 1.3rem; line-height: 1; letter-spacing: 0; color: var(--ink-muted); rotate: -4deg; }
.intro-tag svg { width: 2.3rem; height: auto; flex: none; margin-bottom: -.35rem; color: var(--accent-red); }

.photo-stack { position: relative; width: clamp(118px, 13vw, 150px); aspect-ratio: 4 / 5; margin-left: .25rem; cursor: pointer; }
.photo-stack-print { position: absolute; inset: 0; overflow: hidden; border-radius: .375rem; rotate: var(--lean); box-shadow: var(--shadow-print);
  transition: rotate .6s var(--ease-out), translate .6s var(--ease-out), scale .6s var(--ease-out), opacity .45s; }
.photo-stack-print img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); transition: filter .5s; }
.photo-stack-print[data-place="1"] { translate: -5px 4px; scale: .96; }
.photo-stack-print[data-place="2"] { translate: 4px 7px; scale: .92; }
.photo-stack-print[data-place="3"] { opacity: 0; scale: .9; }
.photo-stack:hover .photo-stack-print[data-place="0"], .photo-stack:focus-visible .photo-stack-print[data-place="0"] { rotate: 0deg; scale: 1.03; }
.photo-stack:hover .photo-stack-print[data-place="0"] img { filter: grayscale(0); }
.photo-stack-print[data-leaving] { opacity: 0; translate: 40% -18%; rotate: 14deg; transition-duration: .46s; transition-timing-function: var(--ease-leave); }

.hello { margin-top: 2rem; display: flex; align-items: baseline; gap: .625rem; }
.hello-clip { position: relative; display: inline-flex; overflow: hidden; padding-bottom: .12em; }
.hello-word { display: inline-block; font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 500; line-height: 1; animation: hello-in .55s var(--ease-out) both; }
.hello-language { font-size: .75rem; line-height: 1rem; color: var(--ink-muted); animation: fade-in .55s both; }
@keyframes hello-in { 0% { opacity: 0; filter: blur(4px); transform: translateY(65%); } }

.hero-bio { margin-top: 1.25rem; font-size: 1rem; line-height: 1.65; text-wrap: pretty; }
.hero-bio p + p { margin-top: 1em; }
@media (max-width: 767px) and (prefers-reduced-motion: no-preference) { .hero-bio:not([data-inking]) .hero-word { opacity: .2; } }
.hero-bio-link { text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: color-mix(in srgb, var(--ink) 35%, transparent); text-underline-offset: 4px; transition: text-decoration-color .25s, color .25s; }
.hero-bio-link:hover { text-decoration-color: var(--accent-red); }

.inline-doodle { display: inline-block; width: 1.35em; height: 1.35em; margin-inline: .06em; vertical-align: -.3em; }
.inline-doodle svg { width: 100%; height: 100%; overflow: visible; }
.inline-doodle g { transform-box: fill-box; transform-origin: 50%; transition: rotate .6s var(--ease-out), translate .45s var(--ease-out); }
.doodle-accent { fill: color-mix(in srgb, var(--accent-red) 85%, transparent); stroke: currentColor; }
.doodle-accent-stroke { stroke: var(--accent-red); }
.doodle-screen { fill: color-mix(in srgb, var(--accent-blue) 80%, transparent); }
.inline-doodle:hover .doodle-spin { rotate: 90deg; }
.inline-doodle:hover .doodle-lift { translate: 0 -2px; }
.doodle-flame { transform-box: fill-box; transform-origin: top; }
.inline-doodle:hover .doodle-flame { animation: doodle-flicker .18s ease-in-out infinite alternate; }
@keyframes doodle-flicker { to { scale: 1 1.35; } }
.inline-doodle:hover .doodle-screen { animation: doodle-channel .5s step-end infinite; }
@keyframes doodle-channel { 33% { fill: color-mix(in srgb, var(--accent-red) 85%, transparent); } 66% { fill: color-mix(in srgb, var(--ink) 15%, transparent); } }
.inline-doodle:hover .doodle-tv { rotate: -6deg; }

.intro-actions { margin-top: 2.25rem; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 2rem 2.5rem; }
.intro-cta { display: flex; flex-direction: column; align-items: flex-start; gap: .75rem; }
.availability { display: flex; align-items: center; gap: .5rem; font-size: .75rem; line-height: 1rem; color: var(--ink-muted); }

.button-ink { display: inline-flex; align-items: center; gap: .5rem; padding: .7rem 1.1rem; border-radius: 999px; background: var(--ink); color: var(--paper); line-height: 1.5rem; transition: transform .2s var(--ease-out); }
.button-ink:hover { transform: translateY(-1px); }
.button-ink:active { transform: scale(.97); }
.chat-arrow { display: inline-grid; overflow: hidden; }
.chat-arrow > span { grid-area: 1 / 1; transition: translate .4s var(--ease-swap); }
.chat-arrow > span:last-child { translate: -120%; }
.chat-button:hover .chat-arrow > span:first-child, .chat-button:focus-visible .chat-arrow > span:first-child { translate: 120%; }
.chat-button:hover .chat-arrow > span:last-child, .chat-button:focus-visible .chat-arrow > span:last-child { translate: 0; }

.status-dot { width: 7px; height: 7px; border-radius: 999px; background: var(--accent-red); flex: none;
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent-red) 45%, transparent); animation: status-pulse 2.4s ease-out infinite; }
@keyframes status-pulse { 70%, 100% { box-shadow: 0 0 0 7px #0000; } }

.paper-note { --rule: 24px; position: relative; width: 13.5rem; rotate: var(--lean, -2deg);
  padding: calc(var(--rule) * .5) 1.1rem calc(var(--rule) * .5) 2.4rem; line-height: var(--rule);
  background: linear-gradient(to right, transparent 1.7rem, var(--note-margin) 1.7rem, var(--note-margin) calc(1.7rem + 1px), transparent calc(1.7rem + 1px)),
    repeating-linear-gradient(to bottom, transparent 0 calc(var(--rule) - 1px), var(--note-rule) calc(var(--rule) - 1px) var(--rule)), var(--note);
  background-position: 0 0, 0 calc(var(--rule) * .5), 0 0;
  box-shadow: 0 1px 1px #1414120f, 0 10px 24px -12px #1414124d; transition: rotate .4s var(--ease-out); }
.paper-note:hover { rotate: 0deg; }
.paper-note > p { min-height: var(--rule); line-height: var(--rule); }
.paper-note-pin { position: absolute; top: -13px; right: -6px; width: 26px; overflow: visible; scale: -1 1; }
.paper-note .note-label { font-size: .75rem; color: var(--ink-muted); }
.paper-note .note-company { display: flex; align-items: center; gap: .5rem; font-weight: 500; }
.company-badge { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 5px; background: var(--accent-red); color: #fff; font-size: .7rem; font-weight: 700; letter-spacing: 0; }

/* ==========================================================================
   Work — pinned horizontal rail
   ========================================================================== */
.projects { --card-w: min(calc(100vw - 48px), 1040px, calc((100dvh - 9rem) * 1.5)); --gutter-x: calc((100vw - var(--card-w)) / 2);
  --stick: max(1rem, calc(50svh - (var(--card-w) * 2 / 3 + 3.5rem) / 2)); scroll-margin-top: var(--stick); }
.projects::after { content: ""; display: block; height: var(--travel, 0px); }
.projects-sticky { position: sticky; top: var(--stick); }
.projects-rail { display: flex; gap: 8px; overflow-x: auto; padding-inline: var(--gutter-x); overscroll-behavior-x: contain; scrollbar-width: none; user-select: none; -webkit-user-select: none; }
.projects-rail::-webkit-scrollbar { display: none; }
.projects-card { flex: 0 0 var(--card-w); }
.projects-card:last-child { margin-right: var(--gutter-x); }
.projects-link { display: block; }
.projects-thumb { position: relative; aspect-ratio: 3 / 2; border-radius: 16px; overflow: hidden; background: color-mix(in srgb, var(--ink) 5%, transparent); }
.cover-slides, .cover-slides img { position: absolute; inset: 0; width: 100%; height: 100%; }
.cover-slides img { object-fit: cover; opacity: 0; transition: scale .7s var(--ease-out); will-change: opacity; }
.cover-slides img[data-on] { opacity: 1; }
.projects-link:hover .cover-slides img { scale: 1.03; }
.projects-meta { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-top: .75rem; padding-inline: max(0px, calc((var(--card-w) - 38rem) / 2)); }
.projects-meta h3 { font-size: .875rem; line-height: 1.25rem; font-weight: 500; }
.projects-meta p { font-size: .875rem; line-height: 1.25rem; color: var(--ink-muted); }
.projects-read { flex: none; white-space: nowrap; font-size: .875rem; }
.projects-read span { display: inline-block; transition: translate .35s var(--ease-out); }
.projects-link:hover .projects-read span, .projects-link:focus-visible .projects-read span { translate: .25rem; }
@media (max-width: 767px) { .projects { --card-w: min(82vw, calc((100svh - 9rem) * 1.5)); --gutter-x: 20px; } }

/* ==========================================================================
   Experience
   ========================================================================== */
.experience-list { margin-top: 2rem; }
.experience-list li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 9.5rem; align-items: baseline; gap: 1rem; padding: 1rem 0; border-bottom: 1px dashed var(--line); font-size: .9375rem; }
.experience-list li:first-child { border-top: 1px dashed var(--line); }
.experience-company { font-weight: 500; }
.experience-role, .experience-time { color: var(--ink-muted); }
.experience-time { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 639px) { .experience-list li { grid-template-columns: 1fr auto; gap: .15rem 1rem; } .experience-role { grid-row: 2; } }

/* ==========================================================================
   Clients — dashed grid
   ========================================================================== */
.dashed-grid { position: relative; margin-top: 2rem; }
.clients-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.clients-cell { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 5 / 4; }
.clients-cta { grid-column: span var(--rest-2); aspect-ratio: auto; justify-content: flex-start; padding-inline: 1.5rem; }
@media (min-width: 640px) { .clients-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .clients-cta { grid-column: span var(--rest-3); } }
@media (min-width: 768px) { .clients-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .clients-cta { grid-column: span var(--rest-4); } }
.client-logo { opacity: .4; transition: opacity .3s; max-width: 70%; max-height: 40%; }
.clients-cell:hover .client-logo { opacity: 1; }
.client-wordmark { max-width: 88%; max-height: none; white-space: nowrap; font-weight: 700; font-size: clamp(.8rem, 1.3vw, 1.05rem); letter-spacing: -.05em; color: var(--ink); text-align: center; line-height: 1; display: flex; align-items: center; gap: .35rem; }
.client-wordmark i { display: grid; place-items: center; width: 1.6em; height: 1.6em; border-radius: .38em; background: var(--ink); color: var(--paper); font-style: normal; font-size: .8em; }
.client-cta-link { display: block; text-align: left; }
.client-cta-link .t { display: block; font-size: .875rem; line-height: 1.25rem; font-weight: 500; }
.client-cta-link .s { display: block; margin-top: .25rem; font-size: .75rem; line-height: 1rem; color: var(--ink-muted); transition: color .2s; }
.client-cta-link:hover .s { color: var(--ink); }
.dashed-grid-lines { position: absolute; inset: 0 auto auto 0; pointer-events: none; overflow: visible; }
.dashed-grid-lines line { stroke: var(--line); stroke-width: 1px; stroke-dasharray: 5 5; }
.dashed-grid-lines circle { fill: var(--ink-muted); opacity: .7; }

/* ==========================================================================
   Testimonials — paper stack
   ========================================================================== */
.kind-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.kind-count { font-size: .875rem; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.kind-stack { position: relative; margin-top: 2.5rem; margin-right: .5rem; transition: height .6s cubic-bezier(.25, .8, .25, 1); }
.kind-note { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 1.6rem 1.75rem 1.5rem; background: var(--surface); rotate: var(--lean); box-shadow: var(--shadow-paper);
  transition: rotate .5s var(--ease-out), translate .5s var(--ease-out), opacity .4s; }
.kind-note[data-place="0"] { position: relative; cursor: pointer; touch-action: pan-y; }
.kind-note[data-place="1"] { translate: 6px 8px; }
.kind-note[data-place="2"] { translate: -4px 14px; }
.kind-note[data-place="3"], .kind-note[data-place="1"] > *, .kind-note[data-place="2"] > * { opacity: 0; }
.kind-note[data-place="0"]:hover { rotate: 0deg; }
.kind-note[data-dragging] { transition: none; }
.kind-note[data-leaving] { opacity: 0; transition-duration: .42s; transition-timing-function: var(--ease-leave); }
.kind-note[data-leaving="right"] { translate: 75% -5%; rotate: 10deg; }
.kind-note[data-leaving="left"] { translate: -75% -5%; rotate: -10deg; }
.kind-note > * { transition: opacity .35s .1s; }
.kind-note-label { padding-right: 5.5rem; font-size: .75rem; line-height: 1.125rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); }
.kind-note-quote { margin-top: 1rem; font-size: 1.0625rem; line-height: 1.6; text-wrap: pretty; }
.kind-note-quote::before { content: "“"; } .kind-note-quote::after { content: "”"; }
.kind-note-from { margin-top: auto; padding-top: 1.4rem; }
.kind-note-sign { display: block; font-family: var(--font-hand); font-size: 1.5rem; line-height: 1.1; color: var(--accent-blue); letter-spacing: 0; }
.kind-note-role { display: block; font-size: .875rem; line-height: 1.25rem; color: var(--ink-muted); }
.kind-note-prints { position: absolute; top: -1.5rem; right: 1.25rem; display: flex; }
.kind-note-print { display: block; width: 3.6rem; padding: .22rem .22rem .75rem; background: var(--note); rotate: var(--tilt); box-shadow: 0 1px 1px #14141214, 0 6px 14px -6px #14141259; transition: rotate .4s var(--ease-out); }
.kind-note-print + .kind-note-print { margin-left: -.9rem; }
.kind-note-print img { width: 100%; aspect-ratio: 1; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.kind-note[data-place="0"]:hover .kind-note-print { rotate: 0deg; }
.kind-next { margin-top: 2.75rem; font-size: .875rem; line-height: 1.25rem; }

/* ==========================================================================
   Playground — rotary dial
   ========================================================================== */
.dial-section { --d: min(135vw, 40rem); --stage: calc(var(--d) * .38); --around: 13rem; --hole: calc(var(--d) * .1925); --ring: calc(var(--d) * .38); overflow-x: clip; scroll-margin-top: -3rem; }
@media (min-width: 768px) { .dial-section { --d: min(40rem, 62svh); } }
.dial { display: flex; flex-direction: column; align-items: center; margin-top: 1rem; touch-action: pan-y pinch-zoom; }
.dial-print { position: relative; display: block; width: min(100%, max(15rem, calc(100svh - var(--stage) - var(--around)))); aspect-ratio: 1; border-radius: 12px; overflow: hidden;
  background: color-mix(in srgb, var(--ink) 5%, transparent); transition: translate .4s var(--ease-out), rotate .4s var(--ease-out); }
.dial-print:hover, .dial-print:focus-visible { translate: 0 -4px; rotate: -.8deg; }
.dial-print img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s; }
.dial-print img[data-on] { opacity: 1; }
.dial-stage { position: relative; flex: none; width: 100vw; height: var(--stage); margin-top: 1rem; overflow: hidden; user-select: none; -webkit-user-select: none;
  mask-image: linear-gradient(#000 68%, #0000 98%); -webkit-mask-image: linear-gradient(#000 68%, #0000 98%); }
.dial-body { position: absolute; top: .75rem; left: 50%; width: var(--d); height: var(--d); margin-left: calc(var(--d) / -2); border-radius: 50%; cursor: grab; touch-action: none;
  box-shadow: 0 1px 2px #1414124d, 0 24px 44px -18px #14141299; }
.dial-body:active { cursor: grabbing; }
/* Brass, rendered in CSS */
.dial-wheel { --step: 36deg; position: absolute; inset: 0; border-radius: 50%; overflow: hidden; transform: rotate(var(--angle, 0deg)); will-change: transform; outline: none;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 27%, #0000002e 27.4%, transparent 29.5%),
    repeating-conic-gradient(from 0deg, #ffffff0a 0deg 1.3deg, #0000000c 1.3deg 2.9deg, #ffffff05 2.9deg 4deg),
    radial-gradient(circle at 50% 50%, #9c7633 0 27%, #b98f48 29%, #d2ad67 42%, #ad8443 55%, #5e4219 63.5%, #8f6930 66%, #dcbc78 72%, #a57c3a 82%, #6b4c1c 93%, #4a3311 100%); }
.dial-wheel::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 210deg, #fff0 0deg, #ffffff38 40deg, #fff0 95deg, #fff0 200deg, #ffffff26 250deg, #fff0 300deg); mix-blend-mode: soft-light; }
.dial-wheel:focus-visible { box-shadow: 0 0 0 2px var(--accent-red); }
.dial-hole { position: absolute; top: 50%; left: 50%; width: var(--hole); height: var(--hole); margin: calc(var(--hole) / -2);
  transform: rotate(calc(var(--i) * var(--step))) translateY(calc(var(--ring) * -1)); }
.dial-hole-face { position: absolute; inset: 0; transform: rotate(calc((var(--angle, 0deg) + var(--i) * var(--step)) * -1)); border-radius: 50%;
  background: radial-gradient(circle, transparent 0 59%, #5c3f15 60%, #f6dc98 64%, #b78a3d 72%, #7a5520 80%, #e6c37a 88%, #94692a 96%, transparent 97%); box-shadow: 0 2px 4px #3a260c55; }
.dial-hole-window { position: absolute; inset: 9.5%; border-radius: 50%; overflow: hidden; background: #1c1712; }
.dial-hole-window img { width: 100%; height: 100%; object-fit: cover; }
.dial-hole-window::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #18100657; box-shadow: inset 2px 6px 12px #140c04a6; transition: background .3s; }
.dial-hole[data-on] .dial-hole-window::after { background: transparent; }
.dial-stop { position: absolute; z-index: 2; pointer-events: none; width: calc(var(--d) * .07); height: calc(var(--d) * .13); top: calc(var(--d) * .04); left: calc(50% + var(--d) * .11);
  background: linear-gradient(100deg, #6b4a1a, #f4dc9e 45%, #a87b33 60%, #4f3410); clip-path: polygon(50% 100%, 0 0, 100% 0); rotate: 18deg; filter: drop-shadow(0 4px 4px #0006); }
.dial-hub { position: absolute; z-index: 1; pointer-events: none; inset: 27%; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #f7e2a6, #c89b48 40%, #8a6224 75%, #5d4015); box-shadow: inset 0 2px 6px #fff6, inset 0 -6px 14px #0005, 0 6px 16px #0004; }
.dial-fade { position: absolute; inset: 62% 0 0; pointer-events: none; backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); mask-image: linear-gradient(#0000, #000 40%); -webkit-mask-image: linear-gradient(#0000, #000 40%); }
.dial-cta { position: relative; display: flex; flex-direction: column; align-items: center; margin-top: .5rem; text-align: center; }
.dial-cta p { max-width: 24rem; margin-top: .75rem; font-size: .8125rem; line-height: 1.4; opacity: .4; text-wrap: balance; }

/* ==========================================================================
   Contact — notepad chat
   ========================================================================== */
.footer { padding: 7rem var(--gutter) 2rem; }
.contact-sheet { --rule: 32px; position: relative; min-height: 22rem; margin-top: 2rem; padding: 3.25rem 1.25rem 1.5rem 3rem; border-radius: 6px; rotate: -.6deg;
  background: linear-gradient(to right, transparent 2.1rem, var(--note-margin) 2.1rem, var(--note-margin) calc(2.1rem + 1px), transparent calc(2.1rem + 1px)),
    repeating-linear-gradient(to bottom, transparent 0 calc(var(--rule) - 1px), var(--note-rule) calc(var(--rule) - 1px) var(--rule)), var(--note);
  background-position: 0 0, 0 2.25rem, 0 0; box-shadow: 0 1px 1px #1414120f, 0 18px 40px -22px #14141259; }
.paper-note-holes { position: absolute; inset: 12px 20px auto; display: flex; justify-content: space-between; }
.paper-note-holes span { width: 9px; height: 9px; border-radius: 999px; background: var(--paper); box-shadow: inset 0 1px 1px #1414122e; }
.contact-thread { display: flex; flex-direction: column; gap: .9rem; }
.contact-group { display: flex; align-items: flex-end; gap: .6rem; }
.contact-group--mine { justify-content: flex-end; transform-origin: 100% 100%; animation: bubble-in .45s var(--ease-spring) both; }
.contact-stack { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; min-width: 0; }
.contact-line { display: flex; align-items: center; gap: .5rem; transform-origin: 0 100%; animation: bubble-in .45s var(--ease-spring) both; }
@keyframes bubble-in { 0% { opacity: 0; translate: 0 6px; scale: .85; } }
.contact-avatar { flex: none; width: 2.5rem; height: 2.5rem; border-radius: 999px; overflow: hidden; background: var(--paper); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 10%, transparent); }
.contact-avatar img { width: 100%; height: 100%; object-fit: cover; }
.contact-bubble { max-width: 26rem; padding: .6rem .95rem; border-radius: 18px; background: var(--surface); font-size: .9375rem; line-height: 1.4; box-shadow: 0 1px 1px #1414120f, 0 4px 10px -6px #14141240; }
.contact-stack > .contact-line:last-child .contact-bubble { border-bottom-left-radius: 6px; }
.contact-bubble--mine { background: var(--ink); color: var(--paper); white-space: pre-line; border-radius: 18px 18px 6px; }
.contact-mail-link { font-weight: 500; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--ink) 30%, transparent); text-underline-offset: 3px; transition: text-decoration-color .2s; }
.contact-mail-link:hover { text-decoration-color: var(--accent-red); }
.contact-invite { display: grid; gap: .6rem; }
.contact-invite-card { display: flex; align-items: center; gap: .8rem; padding: .6rem; border-radius: 14px; background: var(--paper); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 10%, transparent); transition: box-shadow .2s; }
.contact-invite-card:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 24%, transparent); }
.contact-invite-cal { flex: none; display: grid; width: 2.75rem; overflow: hidden; border-radius: 8px; background: var(--surface); text-align: center; line-height: 1; box-shadow: 0 1px 1px #14141214; }
.contact-invite-cal span:first-child { padding: .2rem 0; background: var(--accent-red); color: #fff; font-size: .5625rem; font-weight: 600; letter-spacing: .08em; }
.contact-invite-cal span:last-child { padding: .3rem 0 .35rem; font-size: 1.125rem; font-weight: 600; }
.contact-invite-doc { position: relative; flex: none; display: grid; align-content: center; gap: .22rem; width: 2.4rem; height: 2.9rem; margin-inline: .18rem; padding: 0 .45rem; border-radius: 4px 9px 4px 4px; background: var(--surface); box-shadow: 0 1px 1px #14141214, 0 0 0 1px #1414120f; }
.contact-invite-doc::before { content: ""; position: absolute; top: 0; right: 0; width: .6rem; height: .6rem; background: var(--paper-fold); border-radius: 0 9px 0 3px; }
.contact-invite-doc span { height: 2px; border-radius: 2px; background: color-mix(in srgb, var(--ink) 22%, transparent); }
.contact-invite-doc span:first-child { width: 70%; background: var(--accent-red); }
.contact-invite-text { flex: 1; display: grid; gap: .1rem; min-width: 0; }
.contact-invite-title { font-weight: 500; }
.contact-invite-meta { font-size: .8125rem; color: var(--ink-muted); }
.contact-invite-button { flex: none; padding: .5rem .9rem; font-size: .8125rem; line-height: 1.2rem; }
@media (max-width: 479px) { .contact-invite-card { flex-wrap: wrap; } .contact-invite-button { width: 100%; justify-content: center; } }
.contact-icon-button { flex: none; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 999px; background: var(--surface); box-shadow: 0 1px 1px #1414120f, 0 4px 10px -6px #14141240; transition: scale .2s; }
.contact-icon-button:hover { scale: 1.08; }
.contact-icon-button svg { width: 1.05rem; fill: none; stroke: currentColor; stroke-width: 1.7px; stroke-linecap: round; stroke-linejoin: round; }
.contact-icon-button[data-copied] { color: var(--accent-red); }
.contact-typing { display: inline-flex; gap: .3rem; padding: .85rem 1rem; }
.contact-typing span { width: 6px; height: 6px; border-radius: 999px; background: var(--ink-muted); animation: typing-dot 1s ease-in-out infinite; }
.contact-typing span:nth-child(2) { animation-delay: .15s; } .contact-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes typing-dot { 0%, 60%, 100% { opacity: .45; translate: 0; } 30% { opacity: 1; translate: 0 -4px; } }

.contact-compose { position: relative; display: flex; flex-direction: column; align-items: flex-end; gap: .75rem; margin-top: 1.25rem; transform-origin: 100% 0; animation: bubble-in .45s var(--ease-spring) both; }
.contact-slip { --slip-rule: 1.75rem; position: relative; width: min(100%, 22rem); padding: .35rem .9rem .5rem; rotate: 1.2deg; perspective: 520px;
  background: repeating-linear-gradient(to bottom, transparent 0 calc(var(--slip-rule) - 1px), var(--note-rule) calc(var(--slip-rule) - 1px) var(--slip-rule)), var(--surface);
  background-position: 0 .35rem; box-shadow: 0 1px 1px #14141214, 0 10px 20px -12px #14141259; transition: rotate .3s; }
.contact-slip:focus-within { rotate: 0deg; }
.contact-slip textarea, .contact-slip-text { display: block; width: 100%; margin: 0; border: 0; outline: 0; resize: none; background: none; color: var(--ink);
  font-family: var(--font-hand); font-size: 1.35rem; line-height: var(--slip-rule); letter-spacing: 0; }
.contact-slip textarea::placeholder, .contact-from input::placeholder { color: var(--ink-muted); opacity: .7; }
.contact-from, .contact-slip-from { display: flex; align-items: baseline; gap: .4rem; height: var(--slip-rule); margin: 0; font-size: .8125rem; line-height: var(--slip-rule); color: var(--ink-muted); }
.contact-from input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; color: var(--ink); }
.contact-send { padding: .55rem .95rem; font-size: .875rem; line-height: 1.25rem; }
.contact-send:disabled { opacity: .35; cursor: not-allowed; transform: none; }
.contact-send-plane { width: 1rem; fill: none; stroke: currentColor; stroke-width: 1.7px; stroke-linejoin: round; }
.contact-slip[data-folding] { background: none; box-shadow: none; rotate: 0deg; animation: slip-to-plane .25s cubic-bezier(.5, 0, .75, 0) .55s both; }
.contact-slip[data-folding] > textarea, .contact-slip[data-folding] > .contact-from { visibility: hidden; }
.contact-compose[data-phase="folding"] .contact-send { opacity: 0; transition: opacity .2s; }
.contact-fold-half { position: absolute; inset-inline: 0; height: 50%; overflow: hidden; }
.contact-fold-bottom { top: 50%; box-shadow: 0 1px 1px #14141214; }
.contact-fold-top { top: 0; transform-origin: 50% 100%; background: linear-gradient(to top, var(--paper-fold), var(--surface) 70%); animation: fold-down .55s cubic-bezier(.55, 0, .35, 1) both; box-shadow: 0 2px 6px -2px #14141240; }
.contact-slip-face { position: absolute; inset: 0 0 auto; height: 200%; padding: .35rem .9rem .5rem; background: repeating-linear-gradient(to bottom, transparent 0 calc(var(--slip-rule) - 1px), var(--note-rule) calc(var(--slip-rule) - 1px) var(--slip-rule)), var(--surface); background-position: 0 .35rem; }
.contact-fold-bottom .contact-slip-face { top: -100%; }
.contact-fold-top .contact-slip-face { animation: fold-face .55s step-end both; }
.contact-slip-text { white-space: pre-line; max-height: calc(var(--slip-rule) * 3); overflow: hidden; }
@keyframes fold-down { to { transform: rotateX(-180deg); } }
@keyframes fold-face { 50%, 100% { opacity: 0; } }
@keyframes slip-to-plane { 0% { clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 100%, 0 100%); } 100% { clip-path: polygon(4% 80%, 100% 52%, 66% 100%, 52% 86%, 34% 90%); opacity: 0; rotate: -12deg; scale: .4; } }
.contact-plane { position: absolute; right: calc(min(100%, 22rem) / 2 - 2.5rem); width: 5rem; margin-top: -2.5rem; opacity: 0; pointer-events: none; fill: var(--surface); stroke: var(--ink); stroke-width: 1.3px; stroke-linejoin: round; filter: drop-shadow(0 6px 6px #1414122e); animation: plane-fly 1.15s cubic-bezier(.4, 0, .6, 1) .6s both; }
@keyframes plane-fly { 0% { opacity: 0; translate: 0; rotate: 8deg; scale: .45; } 14% { opacity: 1; rotate: 0deg; scale: 1; } 32% { translate: -36px 22px; rotate: -4deg; } 70% { opacity: 1; translate: 200px -150px; rotate: -18deg; scale: .9; } 100% { opacity: 0; translate: 460px -360px; rotate: -24deg; scale: .7; } }
.contact-again { display: block; margin: 1rem 0 0 auto; font-size: .8125rem; color: var(--ink-muted); }
.contact-trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.contact-list { margin-top: 2.5rem; }
.contact-list > div { display: flex; justify-content: space-between; align-items: baseline; gap: 1.5rem; padding: 1rem 0; border-bottom: 1px dashed var(--line); font-size: .9375rem; }
.contact-list dt { color: var(--ink-muted); }
.contact-list dd { text-align: right; }
.socials { display: flex; flex-wrap: wrap; justify-content: flex-end; column-gap: .5rem; }
.footer-social { display: inline-flex; gap: .3em; color: var(--ink-muted); transition: color .2s; }
.footer-social span { transition: translate .3s var(--ease-out); }
.footer-social:hover { color: var(--ink); }
.footer-social:hover span { translate: 2px -2px; }
@media (max-width: 639px) {
  .contact-sheet { padding: 3rem .9rem 1.25rem 1.6rem; background-image: linear-gradient(to right, transparent 1rem, var(--note-margin) 1rem, var(--note-margin) calc(1rem + 1px), transparent calc(1rem + 1px)), repeating-linear-gradient(to bottom, transparent 0 calc(var(--rule) - 1px), var(--note-rule) calc(var(--rule) - 1px) var(--rule)); }
  .contact-list > div { flex-direction: column; gap: .25rem; }
  .contact-list dd { text-align: left; } .socials { justify-content: flex-start; }
}

.footer-scene { display: block; width: 100%; max-width: 46rem; height: auto; margin: 4rem auto 0; overflow: visible; }
.footer-cat-tail, .footer-cat-head { transform-box: fill-box; }
.footer-cat-tail { transform-origin: 0 100%; }
.footer-cat-head { transform-origin: 50% 90%; transition: rotate .5s cubic-bezier(.3, 1.6, .5, 1); }
.footer-cat:hover .footer-cat-tail { animation: tail-wag .22s ease-in-out infinite alternate; }
.footer-cat:hover .footer-cat-head { rotate: -9deg; }
.footer-cat-wag { opacity: 0; transition: opacity .2s; }
.footer-cat:hover .footer-cat-wag { opacity: 1; }
@keyframes tail-wag { 0% { rotate: -10deg; } 100% { rotate: 14deg; } }
.footer-steam { stroke-dasharray: 26 14; animation: steam-rise 1.6s linear infinite; }
@keyframes steam-rise { to { stroke-dashoffset: 40px; } }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .5rem 1.5rem; margin-top: 1.5rem; font-size: .75rem; line-height: 1rem; color: var(--ink-muted); }
.footer-bottom p + p { margin-top: .25rem; }

/* ==========================================================================
   Section progress (≥1024px)
   ========================================================================== */
.section-progress { --row-h: 16px; position: fixed; top: 50%; right: 1.25rem; z-index: 40; display: none; transform: translateY(-50%); }
@media (min-width: 1024px) { .section-progress { display: block; } }
.section-progress ol { display: flex; flex-direction: column; align-items: flex-end; }
.section-progress [data-tick] { display: block; height: var(--row-h); padding: 5px 0 5px 12px; }
.section-progress svg { display: block; width: 14px; height: 6px; overflow: visible; transition: width .45s var(--ease-out); }
.section-progress [data-state="read"] svg { width: 18px; }
.section-progress [data-state="current"] svg, .section-progress [data-state="current"]:hover svg { width: 30px; }
.section-progress [data-tick]:hover svg, .section-progress [data-tick]:focus-visible svg { width: 24px; }
.section-progress path { fill: none; stroke-width: 2.25px; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.tick-base { stroke: var(--line); }
.tick-ink { stroke: var(--ink-muted); stroke-dasharray: 1; stroke-dashoffset: 1px; transition: stroke .3s; }
[data-state="read"] .tick-ink { stroke-dashoffset: 0; }
[data-state="current"] .tick-ink { stroke: var(--accent-red); stroke-dashoffset: calc(1 - var(--read, 0)); }
.section-progress-label { position: absolute; right: calc(100% + .5rem); top: calc(var(--row) * var(--row-h) + var(--row-h) / 2); display: flex; align-items: center; height: 1.75rem; padding: 0 .8rem;
  border-radius: 999px; background: var(--ink); color: var(--paper); font-size: .75rem; white-space: nowrap; pointer-events: none; opacity: 0; transform: translate(6px, -50%);
  transition: opacity .3s, transform .4s var(--ease-out), top .45s var(--ease-out); }
.section-progress-label::after { content: ""; position: absolute; top: 50%; left: calc(100% - 1px); border: 5px solid #0000; border-left-color: var(--ink); transform: translateY(-50%); }
.section-progress[data-show] .section-progress-label { opacity: 1; transform: translateY(-50%); }
.section-progress-text { display: inline-flex; gap: .5em; animation: hello-in .45s var(--ease-out) both; }
.section-progress-number { color: var(--accent-red); font-variant-numeric: tabular-nums; }

/* ==========================================================================
   Custom cursor (fine pointers only)
   ========================================================================== */
html.has-custom-cursor, html.has-custom-cursor * { cursor: none !important; }
@supports not selector(:popover-open) { html.has-custom-cursor dialog, html.has-custom-cursor dialog * { cursor: auto !important; } }
.cursor-layer { position: fixed; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; background: none; overflow: visible; pointer-events: none; }
.cursor-dot, .cursor-ring { position: fixed; top: 0; left: 0; z-index: 300; pointer-events: none; opacity: 0; transition: opacity .2s; }
html[data-cursor-visible] .cursor-dot, html[data-cursor-visible] .cursor-ring { opacity: 1; }
.cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 999px; background: var(--ink); box-shadow: 0 0 0 1.5px var(--paper); }
.cursor-ring { --size: 32px; display: grid; place-items: center; width: var(--size); height: var(--size); margin: calc(var(--size) / -2) 0 0 calc(var(--size) / -2); border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--ink) 35%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--paper) 40%, transparent);
  transition: opacity .2s, width .3s var(--ease-out), height .3s var(--ease-out), margin .3s var(--ease-out), background-color .3s, border-color .3s, scale .15s; }
.cursor-ring[data-state="link"] { --size: 52px; background: color-mix(in srgb, var(--ink) 6%, transparent); border-color: #0000; }
.cursor-ring[data-state="label"] { --size: 76px; background: var(--ink); border-color: var(--ink); }
.cursor-ring[data-pressed] { scale: .85; }
.cursor-label { font-size: 11px; font-weight: 500; color: var(--paper); white-space: nowrap; opacity: 0; transition: opacity .2s; }
.cursor-ring[data-state="label"] .cursor-label { opacity: 1; }
html:has(.cursor-ring[data-state="label"]) .cursor-dot { opacity: 0; }


/* ==========================================================================
   Sub-pages (project, playground, résumé)
   ========================================================================== */
.page { padding: 8rem var(--gutter) 4rem; }
.project-back { font-size: .8125rem; color: var(--ink-muted); }
.project-title { margin-top: 1.5rem; font-weight: 500; font-size: 1.125rem; }
.project-summary { margin-top: .25rem; text-wrap: pretty; color: var(--ink-muted); }
.project-details { margin-top: 1.5rem; display: grid; gap: .35rem; font-size: .90625rem; }
.project-details > div { display: grid; grid-template-columns: 5rem 1fr; gap: .75rem; }
.project-details dt { color: var(--ink-muted); }
.project-cover { position: relative; aspect-ratio: 3 / 2; margin-top: 2.5rem; border-radius: 12px; overflow: hidden; }
.project-cover img { width: 100%; height: 100%; object-fit: cover; }
.project-body { margin-top: 3rem; font-size: .90625rem; line-height: 1.5rem; }
.project-body > * + * { margin-top: 1rem; }
.project-body h2 { font-weight: 500; margin-top: 2.5rem; }
.placeholder-box { padding: 1rem 1.25rem; border: 1px dashed var(--line); border-radius: 12px; color: var(--ink-muted); }
.project-hire { width: min(100%, 38rem); margin: 6rem auto 0; padding: 1.5rem; border: 1px dashed color-mix(in srgb, var(--ink) 22%, transparent); border-radius: 14px; }
.project-hire-title { font-size: 1.125rem; font-weight: 500; letter-spacing: -.02em; }
.project-hire-text { margin-top: .35rem; color: var(--ink-muted); }
.project-hire-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; margin-top: 1.1rem; }
.project-next { width: min(100%, 38rem); margin: 4rem auto 0; }
.project-next a { display: block; }
.project-next-thumb { position: relative; aspect-ratio: 3; margin-top: 1rem; border-radius: 12px; overflow: hidden; }
.project-next-thumb img { width: 100%; height: 100%; object-fit: cover; transition: scale .7s var(--ease-out); }
.project-next a:hover .project-next-thumb img { scale: 1.03; }

.playground-hero { width: min(100% - 2.5rem, 72rem); margin: 0 auto; padding-top: clamp(9rem, 22vh, 14rem); }
.playground-wordmark { font-size: clamp(4.25rem, 15vw, 12.5rem); font-weight: 600; line-height: .82; letter-spacing: -.065em; margin-bottom: 2rem; }
.playground-wordmark .dot { color: var(--accent-red); }
.playground-grid { --gap: 12px; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--gap); width: min(100% - 2.5rem, 72rem); margin: 0 auto 6rem; }
.playground-tile { position: relative; flex: 0 0 calc((100% - 2 * var(--gap)) / 3 - .1px); min-width: 0; }
.playground-tile:nth-child(5n+4), .playground-tile:nth-child(5n+5) { flex-basis: calc((100% - var(--gap)) / 2 - .1px); }
@media (max-width: 639px) { .playground-tile, .playground-tile:nth-child(n) { flex-basis: calc((100% - var(--gap)) / 2 - .1px); } }
.playground-tile-open { position: relative; display: block; width: 100%; aspect-ratio: var(--ratio, 1); overflow: hidden; border-radius: 12px; background: color-mix(in srgb, var(--ink) 5%, transparent); transition: translate .4s var(--ease-out), rotate .4s var(--ease-out); }
.playground-tile-open:hover, .playground-tile-open:focus-visible { translate: 0 -4px; rotate: var(--lean); }
.playground-tile img { width: 100%; height: 100%; object-fit: cover; }
.playground-lightbox { position: fixed; inset: 0; width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 1.5rem; border: 0; background: none; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; }
.playground-lightbox[open] { display: flex; animation: fade-in .25s both; }
.playground-lightbox::backdrop { background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(6px); }
.playground-lightbox img { max-width: min(100%, 72rem); max-height: calc(100dvh - 7rem); width: auto; height: auto; border-radius: 12px; box-shadow: 0 24px 60px -24px #14141280; }
.playground-lightbox-bar { display: flex; gap: 1.5rem; font-size: .8125rem; color: var(--ink); }

/* 404 — "Wrong number" */
.not-found { display: flex; flex-direction: column; justify-content: center; min-height: 100svh; padding: 4.5rem var(--gutter); }
.not-found-copy { text-align: center; }
.not-found-copy h1 { font-size: clamp(1.75rem, 4vw, 2.25rem); font-weight: 500; line-height: 1.1; letter-spacing: -.03em; }
.not-found-copy p { max-width: 26rem; margin: .5rem auto 0; font-size: .9375rem; line-height: 1.4; color: var(--ink-muted); text-wrap: balance; }
.not-found-print { --led: #ffb02e; display: flex; align-items: center; justify-content: center; width: 100%; height: clamp(7rem, 24svh, 19rem); aspect-ratio: auto; background: #15110c;
  box-shadow: inset 0 2px 10px #000000b3, inset 0 0 0 1px #ffffff0d; }
.not-found-display { display: flex; gap: 7%; height: min(66%, 32vw); transform: skew(-6deg); }
.not-found-display svg { width: auto; height: 100%; overflow: visible; }
.not-found-display polygon { fill: #ffb02e12; }
.not-found-display svg[data-on] polygon[data-lit] { fill: var(--led); filter: drop-shadow(0 0 5px #ffb02ea6); animation: led-on .28s step-end both; }
@keyframes led-on { 0%, 50% { opacity: .35; } 25%, 75% { opacity: 1; } }
.not-found-digit { display: grid; place-items: center; font-size: calc(var(--hole) * .34); font-weight: 500; color: #f4efe6; }
.not-found-links { display: flex; gap: 1.25rem; margin-top: .875rem; font-size: .8125rem; color: var(--ink-muted); }

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html[data-revealed] .reveal, .hello-word, .hello-language, .status-dot, .contact-line, .contact-group--mine, .contact-compose, .contact-typing span, .footer-steam, .section-progress-text, .not-found-display svg[data-on] polygon[data-lit] { animation: none !important; }
  .photo-stack-print, .paper-note, .kind-note, .kind-note > *, .inline-doodle g, .section-progress svg, .section-progress-label, .chat-arrow > span, .button-ink, .link-underline, .header-veil, .header-shell, .mobile-menu::before, .mobile-menu-links a, .mobile-menu-controls, .cover-slides img, .dial-print { transition: none !important; }
  .inline-doodle:hover *, .footer-cat:hover * { animation: none !important; }
}
@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  .projects-sticky { position: static; }
  .projects-rail { scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter-x); }
  .projects-card { scroll-snap-align: start; }
}

/* ---- footer scene extras: the bot and the mug ---- */
.footer-mug-text { font-family: var(--font-hand); font-size: 17px; fill: var(--figure-ink); stroke: none; }
.footer-cable { fill: none; stroke: var(--accent-blue); stroke-width: 3.2; stroke-linecap: round; }
.footer-router-body { transform-box: fill-box; transform-origin: 50% 100%; }
.footer-router-led { fill: var(--accent-blue); animation: router-blink 1.6s steps(1) var(--d, 0s) infinite; }
.footer-router-power { fill: var(--accent-red); }
@keyframes router-blink { 0%, 60% { opacity: 1; } 61%, 100% { opacity: .25; } }
.footer-router-waves path { opacity: 0; }
.footer-router:hover .footer-router-led { animation-duration: .28s; }
.footer-router:hover .footer-router-waves path { animation: router-wave .9s ease-out var(--d, 0s) infinite; }
.footer-router:hover .footer-router-body { animation: router-hop .45s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes router-wave { 0% { opacity: 0; } 30% { opacity: 1; } 100% { opacity: 0; } }
@keyframes router-hop { 40% { translate: 0 -3px; } }
.footer-glasses { pointer-events: none; }
.doodle-blink { fill: var(--accent-blue); stroke: none; }
.doodle-blink:first-of-type { fill: var(--accent-red); }
.inline-doodle:hover .doodle-blink { animation: router-blink .5s steps(1) var(--d, 0s) infinite; }
.inline-doodle:hover .doodle-wave { animation: router-wave .9s ease-out var(--d, 0s) infinite; }

/* ---- new inline doodles ---- */
.doodle-led { fill: var(--accent-red); stroke: none; }
.inline-doodle:hover .doodle-led { animation: doodle-led .5s step-end infinite; }
@keyframes doodle-led { 50% { fill: var(--accent-blue); } }
.inline-doodle:hover .doodle-tilt { rotate: -8deg; }
.doodle-flash { fill: #fff; stroke: none; opacity: 0; }
.inline-doodle:hover .doodle-flash { animation: doodle-flash .5s ease-out; }
@keyframes doodle-flash { 15% { opacity: .9; } 100% { opacity: 0; } }
.inline-doodle:hover .doodle-hop { animation: doodle-hop .6s var(--ease-out); }
@keyframes doodle-hop { 40% { translate: 0 -4px; } 70% { translate: 2px -3px; } 100% { translate: 0 0; } }
.doodle-speed { opacity: 0; transition: opacity .2s; }
.inline-doodle:hover .doodle-drive { translate: 2px 0; }
.inline-doodle:hover .doodle-speed { opacity: 1; }

/* ==========================================================================
   Project pages
   ========================================================================== */
.project-kicker { margin-top: 2rem; font-size: .75rem; line-height: 1rem; color: var(--ink-muted); }
.project-page .project-title { margin-top: .5rem; font-size: clamp(1.75rem, 4.4vw, 2.5rem); line-height: 1.08; letter-spacing: -.045em; }
.project-page .project-summary { margin-top: .9rem; font-size: 1.0625rem; line-height: 1.55; color: var(--ink); }
.project-page .project-details { margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px dashed var(--line); }
.project-page .project-details > div { grid-template-columns: 5.5rem 1fr; }
.project-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; margin-top: 1.75rem; font-size: .875rem; }
.project-wide { width: min(100%, 72rem); margin: 3.5rem auto 0; }

/* live simulator */
.sim-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; font-size: .8125rem; }
.sim-title { display: flex; align-items: center; gap: .5rem; font-weight: 500; }
.sim-frame { position: relative; overflow: hidden; border-radius: 16px; background: #0d1117; box-shadow: 0 1px 0 #ffffff14 inset, 0 30px 60px -30px #14141299, 0 0 0 1px color-mix(in srgb, var(--ink) 12%, transparent); }
.sim-frame iframe { display: block; width: 100%; height: clamp(540px, min(62vw, 80vh), 760px); border: 0; opacity: 0; transition: opacity .5s; }
.sim-frame[data-loaded] iframe { opacity: 1; }
.sim-frame[data-live] .sim-poster { position: absolute; inset: 0; z-index: 1; pointer-events: none; transition: opacity .5s; }
.sim-frame[data-loaded] .sim-poster { opacity: 0; visibility: hidden; transition: opacity .5s, visibility 0s .5s; }
.sim-poster { position: relative; display: block; }
.sim-poster img { width: 100%; height: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.sim-frame[data-live] .sim-poster img { aspect-ratio: auto; filter: blur(6px) brightness(.7); }
.sim-poster-button { position: absolute; left: 50%; bottom: 1.25rem; translate: -50% 0; background: var(--paper); color: var(--ink); white-space: nowrap; box-shadow: 0 10px 30px -12px #000; }
.sim-frame[data-live] .sim-poster-button { display: none; }
.sim-hint { max-width: 46rem; margin-top: .9rem; font-size: .8125rem; line-height: 1.3rem; color: var(--ink-muted); }
.sim-hint strong { font-weight: 500; color: var(--ink); }

/* video slot (web projects) */
.video-slot { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 16px; background: #0d0c0b; box-shadow: 0 30px 60px -30px #14141299; }
.video-slot iframe, .video-slot video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.video-slot--empty { background: transparent; box-shadow: none; border: 1.5px dashed color-mix(in srgb, var(--ink) 26%, transparent);
  background-image: repeating-linear-gradient(-45deg, transparent 0 14px, color-mix(in srgb, var(--ink) 3.5%, transparent) 14px 15px); }
.video-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: .35rem; padding: 1.5rem; text-align: center; }
.video-empty-play { display: grid; place-items: center; width: 3.75rem; height: 3.75rem; margin-bottom: .6rem; border-radius: 999px; border: 1.5px dashed color-mix(in srgb, var(--ink) 35%, transparent); }
.video-empty-play svg { width: 1.6rem; height: 1.6rem; fill: color-mix(in srgb, var(--ink) 40%, transparent); }
.video-empty-title { font-weight: 500; }
.video-empty-meta { max-width: 26rem; font-size: .8125rem; line-height: 1.25rem; color: var(--ink-muted); text-wrap: balance; }

/* explanation */
.project-page .project-body { margin-top: 4rem; font-size: .9375rem; line-height: 1.6rem; }
.project-section + .project-section { margin-top: 2.75rem; }
.project-section h2 { display: flex; align-items: baseline; gap: .6rem; margin: 0 0 .75rem; font-size: 1rem; font-weight: 500; }
.project-section-num { font-size: .75rem; font-variant-numeric: tabular-nums; color: var(--accent-red); }
.project-section p + p { margin-top: .85rem; }
.project-section p, .project-list li { text-wrap: pretty; }
.project-list { display: grid; gap: .5rem; margin-top: .85rem; }
.project-list li { position: relative; padding-left: 1.15rem; }
.project-list li::before { content: ""; position: absolute; left: .1rem; top: .72em; width: .45rem; height: 1.5px; border-radius: 2px; background: var(--accent-red); }
.project-credit { margin-top: 2.75rem; padding-top: 1.1rem; border-top: 1px dashed var(--line); font-size: .8125rem; line-height: 1.3rem; color: var(--ink-muted); }

/* gallery */
.project-gallery { display: grid; gap: 1.5rem; margin-top: 4.5rem; }
@media (min-width: 900px) { .project-gallery { grid-template-columns: 1fr 1fr; } .project-gallery--web .browser:first-child { grid-column: 1 / -1; } }
.project-shot { overflow: hidden; border-radius: 14px; box-shadow: 0 24px 50px -30px #14141280; }
.project-shot img { width: 100%; height: auto; }
.browser { overflow: hidden; border-radius: 14px; background: var(--surface); box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 10%, transparent), 0 24px 50px -30px #14141280; }
.browser-bar { display: flex; align-items: center; gap: .9rem; padding: .55rem .8rem; border-bottom: 1px solid color-mix(in srgb, var(--ink) 8%, transparent); }
.browser-dots { display: flex; gap: .35rem; }
.browser-dots i { width: .55rem; height: .55rem; border-radius: 999px; background: color-mix(in srgb, var(--ink) 16%, transparent); }
.browser-url { flex: 1; max-width: 18rem; margin-inline: auto; padding: .2rem .7rem; border-radius: 999px; background: color-mix(in srgb, var(--ink) 6%, transparent); font-size: .6875rem; line-height: 1rem; color: var(--ink-muted); text-align: center; }
.browser-shot { display: block; overflow: hidden; }
.browser-shot img { width: 100%; height: auto; transition: scale .7s var(--ease-out); }
.browser-shot:hover img { scale: 1.015; }

/* ==========================================================================
   Lab page
   ========================================================================== */
.lab-intro { max-width: 34rem; color: var(--ink-muted); text-wrap: pretty; }
.lab-caption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1rem; margin-top: .6rem; font-size: .8125rem; line-height: 1.2rem; }
.lab-caption a { color: var(--ink-muted); }
.playground-lightbox-bar { flex-wrap: wrap; justify-content: center; }
.playground-lightbox-bar [hidden] { display: none; }

/* ==========================================================================
   Résumé page
   ========================================================================== */
.resume-head { margin-top: 2rem; padding-bottom: 2rem; border-bottom: 1px dashed var(--line); }
.resume-name { font-size: clamp(2rem, 5vw, 2.75rem); font-weight: 500; line-height: 1.05; letter-spacing: -.05em; }
.resume-headline { margin-top: .5rem; font-size: 1.0625rem; }
.resume-contact { display: flex; flex-wrap: wrap; gap: .25rem .6rem; margin-top: .75rem; font-size: .875rem; color: var(--ink-muted); }
.resume-note { margin-top: 1.25rem; font-size: .8125rem; line-height: 1.3rem; color: var(--ink-muted); }
.resume-section { margin-top: 2.5rem; font-size: .9375rem; line-height: 1.55rem; }
.resume-section h2 { margin-bottom: .9rem; font-size: .75rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-red); }
.resume-skills { display: grid; gap: .6rem; }
.resume-skills > div { display: grid; gap: .1rem 1rem; }
@media (min-width: 640px) { .resume-skills > div { grid-template-columns: 9rem 1fr; } }
.resume-skills dt { font-weight: 500; }
.resume-skills dd { color: var(--ink-muted); }
.resume-jobs { display: grid; gap: 1.6rem; }
.resume-job-head, .resume-edu li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .1rem 1rem; }
.resume-job-head strong, .resume-edu strong, .resume-projects strong { font-weight: 500; }
.resume-time { font-size: .8125rem; color: var(--ink-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.resume-jobs .project-list { margin-top: .5rem; color: var(--ink-muted); }
.resume-edu { display: grid; gap: .9rem; }
.resume-projects { display: grid; gap: .8rem; }
.resume-projects li { display: grid; gap: .1rem; }
.resume-projects span { color: var(--ink-muted); }
@media print {
  #header-root, #footer-root, .section-progress, .cursor-layer, .project-back, .project-actions, .resume-note, .skip-link { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .page { padding: 0; }
  .resume-section { break-inside: avoid; margin-top: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  .footer-router-led, .preloader-caret, .inline-doodle:hover *, .footer-router:hover * { animation: none !important; }
  .sim-frame iframe, .sim-poster, .browser-shot img { transition: none !important; }
}

/* ==========================================================================
   Interactive hardware model (project pages)
   ========================================================================== */
.hw-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; font-size: .8125rem; }
.hw-body { display: grid; gap: 1rem; }
@media (min-width: 1000px) { .hw-body { grid-template-columns: minmax(0, 1fr) 19.5rem; align-items: start; } }
.hw-stage { position: relative; overflow: hidden; border-radius: 16px; background: #17392c; box-shadow: 0 30px 60px -30px #14141299, 0 0 0 1px color-mix(in srgb, var(--ink) 12%, transparent); }
.hw-stage svg { display: block; width: 100%; height: auto; user-select: none; -webkit-user-select: none; }
.hw-part { cursor: pointer; outline: none; transition: opacity .2s; }
.hw-stage[data-focus] .hw-robot .hw-part:not([data-active]):not([data-part="chassis"]) { opacity: .42; }
.hw-part[data-active]:not([data-part="chassis"]) { filter: drop-shadow(0 0 .8px #fff) drop-shadow(0 0 2.4px #ffd54a); }
.hw-part[data-part="chassis"][data-active] { stroke: #ffd54a; stroke-width: 1; }
.hw-part:focus-visible { filter: drop-shadow(0 0 1px #fff) drop-shadow(0 0 2.6px #6cb4ff); }
.hw-led { opacity: 0; transition: opacity .15s; pointer-events: none; }
[data-power="on"] .hw-pwr, [data-power="on"] .hw-campwr, [data-power="on"] .hw-hubpwr { opacity: 1; }
[data-power="on"] [data-c13] .hw-c13 { opacity: 1; animation: hw-blink 1s steps(1) infinite; }
@keyframes hw-blink { 50% { opacity: .15; } }
.hw-irflash.hw-blink { animation: hw-flash .5s ease-out; }
@keyframes hw-flash { 0% { opacity: 1; } 100% { opacity: 0; } }
.hw-ir { opacity: 0; pointer-events: none; }
[data-power="on"] .hw-ir { opacity: 1; animation: hw-pulse 1.4s ease-in-out infinite; }
@keyframes hw-pulse { 50% { opacity: .45; } }
.hw-white { opacity: 0; }
.hw-line[data-white] .hw-white { opacity: 1; animation: hw-pulse .8s ease-in-out infinite; }
.hw-beam { fill: #ff3b30; fill-opacity: .09; pointer-events: none; }
.hw-beam--hit { fill-opacity: .2; }
.hw-beam-line { fill: none; stroke: #ff7a6e; stroke-width: 1.4; stroke-dasharray: 3 7; animation: hw-dash .6s linear infinite; pointer-events: none; }
@keyframes hw-dash { to { stroke-dashoffset: -10; } }
.hw-cone { fill: #a78bfa; fill-opacity: .13; stroke: #c4b5fd; stroke-opacity: .5; stroke-width: 1.2; pointer-events: none; }
.hw-cone--hit { fill: #ff5a4e; fill-opacity: .18; stroke: #ff8a80; }
.hw-hit { fill: #ffd54a; stroke: #3a2c00; stroke-width: 1.5; pointer-events: none; }
.hw-hit-text, .hw-token-label, .hw-labels text { font-family: var(--font-sans); font-weight: 600; font-size: 13px; paint-order: stroke; stroke: #0f2a20; stroke-width: 4px; stroke-linejoin: round; pointer-events: none; }
.hw-hit-text { fill: #fff; }
.hw-token { cursor: grab; outline: none; }
.hw-stage[data-drag] .hw-token { cursor: grabbing; }
.hw-token:focus-visible { filter: drop-shadow(0 0 4px #6cb4ff); }
.hw-token-shadow { fill: #0007; }
.hw-token-label { fill: #e8f2ec; }
.hw-labels { opacity: 0; transition: opacity .25s; pointer-events: none; }
@media (hover: hover) { .hw-stage[data-power="off"]:hover .hw-labels { opacity: 1; } }
.hw-stage[data-labels] .hw-labels { opacity: 1; }
.hw-stage[data-drag] .hw-labels { opacity: 0; }
.hw-labels text { fill: #f3f6f4; }
.hw-leader { fill: none; stroke: #ffffffb0; stroke-width: 1.2; }
.hw-dot { fill: #ffd54a; stroke: #0f2a20; stroke-width: 1.5; }
.hw-stage[data-focus] .hw-labels > g:not([data-on]) { opacity: .3; }
.hw-labels > g[data-on] text { fill: #ffd54a; }
.hw-scale { fill: #cfe3d9; font-family: var(--font-sans); font-size: 12px; opacity: .7; }
.hw-ripple { opacity: 0; transform-box: fill-box; transform-origin: center; }
.hw-hear .hw-ripple { animation: hw-ripple 1.1s ease-out calc(var(--i) * .22s) 2; }
@keyframes hw-ripple { 0% { opacity: .95; transform: scale(.5); } 100% { opacity: 0; transform: scale(2.6); } }
.hw-panel { display: flex; flex-direction: column; gap: 1rem; padding: 1.1rem; border-radius: 16px; background: var(--surface); box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 10%, transparent); font-size: .875rem; }
.hw-power { display: flex; align-items: center; gap: .8rem; }
.hw-switch { position: relative; flex: none; width: 3.2rem; height: 1.8rem; border-radius: 999px; background: color-mix(in srgb, var(--ink) 20%, transparent); transition: background .2s; }
.hw-switch span { position: absolute; top: .2rem; left: .2rem; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #0006; transition: translate .25s var(--ease-out); }
.hw-switch[aria-checked="true"] { background: #2fb36b; }
.hw-switch[aria-checked="true"] span { translate: 1.4rem 0; }
.hw-switch:focus-visible { outline: 2px solid var(--accent-blue); outline-offset: 2px; }
.hw-power-title { font-weight: 500; }
.hw-power-state { font-size: .8125rem; line-height: 1.25rem; color: var(--ink-muted); }
.hw-info { padding-top: 1rem; border-top: 1px dashed var(--line); }
.hw-info-kicker { font-size: .75rem; color: var(--accent-red); }
.hw-info-name { margin-top: .15rem; font-size: 1rem; font-weight: 500; }
.hw-info-text { margin-top: .35rem; line-height: 1.45; color: var(--ink-muted); text-wrap: pretty; }
.hw-info-pins { margin-top: .5rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .6875rem; line-height: 1.45; }
.hw-live { display: grid; gap: .8rem; padding-top: 1rem; border-top: 1px dashed var(--line); }
.hw-live[hidden] { display: none; }
.hw-read { display: grid; gap: .35rem; font-size: .8125rem; }
.hw-read > div { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.hw-read dt { color: var(--ink-muted); white-space: nowrap; }
.hw-read dd { text-align: right; font-variant-numeric: tabular-nums; }
.hw-state { display: inline-block; padding: .1rem .55rem; border-radius: 999px; background: color-mix(in srgb, var(--ink) 9%, transparent); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .75rem; font-weight: 600; }
.hw-state[data-s="SEARCH"], .hw-state[data-s="PATROL"] { background: color-mix(in srgb, var(--accent-blue) 16%, transparent); color: var(--accent-blue); }
.hw-state[data-s="ATTACK"], .hw-state[data-s="HOLD"] { background: color-mix(in srgb, var(--accent-red) 16%, transparent); color: var(--accent-red); }
.hw-state[data-s="RETREAT"], .hw-state[data-s="EDGE"], .hw-state[data-s="AVOID"], .hw-state[data-s="INVESTIGATE"] { background: #f5a5242a; color: #b86b00; }
[data-theme="dark"] .hw-state[data-s="RETREAT"], [data-theme="dark"] .hw-state[data-s="EDGE"], [data-theme="dark"] .hw-state[data-s="AVOID"], [data-theme="dark"] .hw-state[data-s="INVESTIGATE"] { color: #f5b452; }
.hw-dim { font-size: .75rem; color: var(--ink-muted); }
.hw-btns { display: flex; flex-wrap: wrap; gap: .4rem; }
.hw-btn { padding: .45rem .8rem; border-radius: 999px; background: color-mix(in srgb, var(--ink) 8%, transparent); font-size: .8125rem; font-weight: 500; transition: background .15s; }
.hw-btn:hover { background: color-mix(in srgb, var(--ink) 15%, transparent); }
.hw-btn--go { background: var(--ink); color: var(--paper); }
.hw-btn--go:hover { background: color-mix(in srgb, var(--ink) 85%, transparent); }
.hw-btn--sm { padding: .35rem .65rem; font-size: .75rem; }
.hw-sub { margin-bottom: -.4rem; font-size: .75rem; color: var(--ink-muted); }
.hw-bar { display: inline-block; width: 4.5rem; height: .4rem; margin-right: .45rem; overflow: hidden; border-radius: 9px; background: color-mix(in srgb, var(--ink) 10%, transparent); vertical-align: middle; }
.hw-bar i { display: block; width: 0; height: 100%; background: var(--accent-red); }
.hw-cam { display: grid; grid-template-columns: 6rem 1fr; gap: .6rem; align-items: start; }
.hw-cam canvas { width: 6rem; height: 6rem; border-radius: 8px; background: #000; image-rendering: pixelated; }
.hw-phone { display: grid; gap: .35rem; }
.hw-msg { padding: .4rem .55rem; border-radius: 10px 10px 10px 2px; background: color-mix(in srgb, #2fb36b 15%, var(--surface)); font-size: .75rem; line-height: 1.3; }
.hw-msg img { display: block; width: 2.75rem; margin-top: .3rem; border-radius: 4px; image-rendering: pixelated; }
.hw-phone-empty { font-size: .75rem; line-height: 1.3; color: var(--ink-muted); }
@media (max-width: 640px) { .hw-labels-btn { display: none; } }
@media (prefers-reduced-motion: reduce) { .hw-beam-line, .hw-ir, .hw-white, [data-c13] .hw-c13 { animation: none !important; } }

/* ---------- 3D product view (js/hardware3d.js): floats like a product shot, comes apart on hover ---------- */
.hw3d-wrap { position: relative; }
.hw3d-stage { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 18px; cursor: grab; touch-action: pan-y; outline: none;
  background: radial-gradient(120% 95% at 50% 34%, #fdfcf9 0%, #efebe4 48%, #ddd6ca 100%);
  box-shadow: 0 30px 60px -32px #14141280, 0 0 0 1px color-mix(in srgb, var(--ink) 9%, transparent); }
html[data-theme="dark"] .hw3d-stage { background: radial-gradient(120% 95% at 50% 34%, #3a3732 0%, #23211e 50%, #121110 100%); }
.hw3d-stage:focus-visible { box-shadow: 0 0 0 2px var(--accent-blue), 0 30px 60px -32px #14141280; }
.hw3d-stage.is-dragging { cursor: grabbing; }
.hw3d-stage.is-pointing { cursor: pointer; }
.hw3d-stage--wait { display: grid; place-items: center; }
.hw3d-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.hw3d-loading { position: absolute; inset: 0; display: grid; place-items: center; font-size: .8125rem; color: var(--ink-muted); pointer-events: none; transition: opacity .4s; }
.hw3d.is-ready .hw3d-loading { opacity: 0; }
.hw3d-fallback { padding: 2rem; font-size: .875rem; color: var(--ink-muted); text-align: center; }
.hw3d--nogl .hw3d-stage { display: grid; place-items: center; aspect-ratio: auto; min-height: 9rem; cursor: default; }

.hw3d-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; transition: opacity .2s; }
.hw3d-lines path { fill: none; stroke: color-mix(in srgb, var(--ink) 45%, transparent); stroke-width: 1; }
.hw3d-lines circle { fill: var(--surface); stroke: var(--ink); stroke-width: 1.3; }
.hw3d-lines .is-active { stroke: var(--accent-red); }
.hw3d-lines circle.is-active { fill: var(--accent-red); }
.hw3d-labels { position: absolute; inset: 0; pointer-events: none; }
.hw3d-label { position: absolute; top: 0; left: 0; padding: .3rem .6rem; border-radius: 999px; white-space: nowrap; font-size: .75rem; font-weight: 500; line-height: 1.1rem; color: var(--ink);
  background: color-mix(in srgb, var(--surface) 90%, transparent); box-shadow: 0 1px 2px #1414121a, 0 0 0 1px color-mix(in srgb, var(--ink) 10%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); pointer-events: auto; cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; }
.hw3d-label--minor { font-weight: 400; color: color-mix(in srgb, var(--ink) 75%, transparent); }
.hw3d-label.is-active, .hw3d-label:focus-visible { background: var(--ink); color: var(--paper); outline: none; }

.hw3d-info { display: grid; grid-template-columns: minmax(10rem, 15rem) 1fr; gap: .2rem 1.25rem; margin-top: .85rem; padding: .9rem 1.1rem; border-radius: 14px; font-size: .8125rem; line-height: 1.4;
  background: var(--surface); box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 10%, transparent); animation: hw3d-in .25s var(--ease-out); }
.hw3d-info[hidden] { display: none; }
.hw3d-info-kicker { grid-column: 1; font-size: .6875rem; letter-spacing: .02em; color: var(--ink-muted); }
.hw3d-info-name { grid-column: 1; font-weight: 600; }
.hw3d-info-text { grid-column: 2; grid-row: 1 / span 3; color: color-mix(in srgb, var(--ink) 82%, transparent); }
.hw3d-info-pins { grid-column: 1; font-size: .6875rem; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.hw3d-info.is-default .hw3d-info-name { color: var(--ink-muted); font-weight: 500; }
@keyframes hw3d-in { from { opacity: 0; translate: 0 6px; } }

.hw3d-chip { position: absolute; top: .9rem; right: .9rem; display: flex; align-items: center; gap: .45rem; padding: .3rem .7rem; border-radius: 999px; font-size: .6875rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink); background: color-mix(in srgb, var(--surface) 85%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 10%, transparent); pointer-events: none; }
.hw3d-chip i { width: .45rem; height: .45rem; border-radius: 50%; background: color-mix(in srgb, var(--ink) 30%, transparent); }
.hw3d-chip[data-state="BOOT"] i { background: #f5b301; animation: hw3d-blink .25s steps(2) infinite; }
.hw3d-chip:is([data-state="SEARCH"], [data-state="PATROL"], [data-state="LEFT"], [data-state="RIGHT"], [data-state="HEARD"]) i { background: #2fb36b; }
.hw3d-chip:is([data-state="ATTACK"], [data-state="ALERT"]) i { background: var(--accent-red); animation: hw3d-blink .4s steps(2) infinite; }
.hw3d-chip[data-state="TRACK"] i { background: #3d8bff; }
@keyframes hw3d-blink { 50% { opacity: .2; } }
.hw3d-toast { position: absolute; top: .9rem; left: 50%; z-index: 3; translate: -50% 0; max-width: calc(100% - 2rem); padding: .55rem .9rem; border-radius: 14px; font-size: .8125rem; line-height: 1.3;
  color: var(--paper); background: var(--ink); box-shadow: 0 14px 30px -12px #14141299; animation: hw3d-drop .35s var(--ease-spring); }
.hw3d-toast strong { margin-right: .4rem; }
.hw3d-toast[hidden] { display: none; }
@keyframes hw3d-drop { from { opacity: 0; translate: -50% -12px; } }
.hw3d-hint { position: absolute; left: 50%; bottom: .9rem; translate: -50% 0; padding: .3rem .75rem; border-radius: 999px; white-space: nowrap; font-size: .75rem; color: var(--ink-muted);
  background: color-mix(in srgb, var(--surface) 70%, transparent); pointer-events: none; transition: opacity .3s; }
.hw3d-hint.is-hidden, .hw3d.is-open .hw3d-hint { opacity: 0; }

.hw3d-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem; margin-top: .85rem; font-size: .8125rem; }
.hw3d-power { display: flex; align-items: center; gap: .6rem; font-weight: 500; }
.hw3d-explode { flex: none; white-space: nowrap; }
.hw3d-caption { margin-top: .75rem; }

@media (max-width: 640px) {
  .hw3d-stage { aspect-ratio: 4 / 5; border-radius: 14px; }
  .hw3d-head .muted { display: none; }
  .hw3d-hint { white-space: normal; width: max-content; max-width: calc(100% - 2rem); text-align: center; }
  .hw3d-info { grid-template-columns: 1fr; }
  .hw3d-info-text { grid-column: 1; grid-row: auto; margin-top: .2rem; }
  .hw3d-label { padding: .22rem .5rem; font-size: .6875rem; }
}
@media (prefers-reduced-motion: reduce) { .hw3d-info, .hw3d-toast { animation: none; } }
@media print { .hw3d-wrap { display: none; } }

/* ---------- Lab: filters, tiles and a viewer that opens the real thing ---------- */
.lab-chips { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 2rem; }
.lab-chip { padding: .45rem .85rem; border-radius: 999px; font-size: .8125rem; font-weight: 500; background: color-mix(in srgb, var(--ink) 7%, transparent); transition: background .15s, color .15s; }
.lab-chip span { margin-left: .2rem; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.lab-chip:hover { background: color-mix(in srgb, var(--ink) 13%, transparent); }
.lab-chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.lab-chip[aria-pressed="true"] span { color: color-mix(in srgb, var(--paper) 65%, transparent); }
.lab-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem 1rem; width: min(100% - 2.5rem, 72rem); margin: 3rem auto 6rem; }
.lab-tile[hidden] { display: none; }
.lab-tile-open { position: relative; display: block; width: 100%; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 14px; background: color-mix(in srgb, var(--ink) 6%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent); transition: translate .35s var(--ease-out), box-shadow .35s; }
.lab-tile-open:hover, .lab-tile-open:focus-visible { translate: 0 -4px; box-shadow: 0 18px 34px -22px #14141273, 0 0 0 1px color-mix(in srgb, var(--ink) 12%, transparent); }
.lab-tile-open img { width: 100%; height: 100%; object-fit: cover; transition: scale .6s var(--ease-out); }
.lab-tile-open:hover img { scale: 1.03; }
.lab-badge { position: absolute; left: .6rem; top: .6rem; display: inline-flex; align-items: center; gap: .4rem; padding: .25rem .6rem; border-radius: 999px; font-size: .6875rem; font-weight: 600;
  color: #141412; background: #ffffffe6; box-shadow: 0 1px 3px #14141226; }
.lab-badge i { width: .45rem; height: .45rem; border-radius: 50%; background: #2fb36b; box-shadow: 0 0 0 3px #2fb36b33; }
.lab-tile .lab-caption { align-items: baseline; }
.lab-tile .lab-caption span { font-weight: 500; }
@media (max-width: 899px) { .lab-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 539px) { .lab-grid { grid-template-columns: 1fr; gap: 1.25rem; } }

.lab-viewer { width: min(100vw - 1.5rem, 76rem); max-width: none; max-height: calc(100dvh - 1.5rem); margin: auto; padding: 0; border: 0; border-radius: 18px; overflow: auto;
  color: var(--ink); background: var(--paper); box-shadow: 0 40px 90px -30px #141412a6; overscroll-behavior: contain; }
.lab-viewer[open] { animation: fade-in .25s both; }
.lab-viewer::backdrop { background: color-mix(in srgb, #141412 55%, transparent); }
.lab-viewer-bar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; padding: .8rem 1rem;
  background: color-mix(in srgb, var(--paper) 96%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--ink) 8%, transparent); }
.lab-viewer-title { display: grid; font-size: .875rem; line-height: 1.3; }
.lab-viewer-title span { font-size: .6875rem; color: var(--ink-muted); }
.lab-viewer-nav { display: flex; gap: .35rem; }
.lab-viewer-nav [hidden] { display: none; }
.lab-viewer-body { padding: 1rem; }
.lab-viewer-body > img, .lab-viewer-body > video { display: block; width: 100%; max-height: calc(100dvh - 9rem); object-fit: contain; border-radius: 12px; background: #000; }
.lab-viewer-body > img { background: none; }
.lab-viewer-body iframe { display: block; width: 100%; height: min(78dvh, 760px); border: 0; border-radius: 12px; background: #0b0d12; }
.lab-viewer-body .hw3d-wrap, .lab-viewer-body .lab-3d, .lab-viewer-body .lab-board { width: 100%; margin: 0; }
.lab-viewer-body .project-wide { margin-top: 0; }
@media (max-width: 640px) {
  .lab-viewer { width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; }
  .lab-viewer-body { padding: .75rem; }
}

/* ---------- motion résumé on the home page ---------- */
.resume-video-frame { width: min(100% - 2.5rem, 60rem); margin: 1.5rem auto 0; overflow: hidden; border-radius: 16px; background: #000;
  box-shadow: 0 30px 60px -32px #14141280, 0 0 0 1px color-mix(in srgb, var(--ink) 10%, transparent); }
.resume-video-frame video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.resume-video-caption { margin-top: 1rem; color: var(--ink-muted); text-wrap: pretty; }
@media (max-width: 640px) { .resume-video-frame { width: calc(100% - 1.5rem); border-radius: 12px; } }
.lab-tile[data-group="web"] .lab-tile-open img { object-position: 50% 0; }

/* ---------- touch screens: every small text button gets a finger-sized hit area (no layout change) ---------- */
@media (pointer: coarse) {
  [data-menu-button], [data-back-top], .project-back, .lab-caption a, .sim-head a, .sim-hint a, .contact-row a, .footer a.link-underline { position: relative; }
  [data-menu-button]::after, [data-back-top]::after, .project-back::after, .lab-caption a::after, .sim-head a::after, .sim-hint a::after { content: ""; position: absolute; inset: -14px -10px; }
  .hw-btn, .lab-chip { min-height: 40px; }
}

.paper-note .note-role { margin-top: .15rem; font-size: .6875rem; line-height: 1.25; color: var(--ink-muted); }
