/* Self-hosted Google Fonts, latin subset, variable weights (SIL Open Font License 1.1) */
@font-face{font-family:'Inter';font-style:normal;font-weight:400 600;font-display:swap;src:url(../fonts/Inter.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:500 700;font-display:swap;src:url(../fonts/JetBrainsMono.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'Unbounded';font-style:normal;font-weight:600 800;font-display:swap;src:url(../fonts/Unbounded.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}

/* Portfolio V2 — "live board". Deep black, acid lime signal, mint + violet accents. No blue/orange.
   Print (PDF) layout at the bottom is light. */
:root {
  --bg: #050706;
  --panel: rgba(17, 22, 20, .6);
  --panel-2: rgba(24, 31, 28, .72);
  --solid: #0e1311;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .13);
  --ink: #f0f5f1;
  --soft: #cdd6d1;
  --muted: #8a968f;
  --dim: #7d8983;     /* text-level grey: 4.5:1 on the background */
  --deco: #56615b;    /* decoration only */
  --lime: #c6f432;
  --lime-rgb: 198, 244, 50;
  --mint: #3ef0a8;
  --mint-rgb: 62, 240, 168;
  --violet: #b48cff;
  --violet-rgb: 180, 140, 255;
  --early: #a8afab;
  --r: 18px;
  --maxw: 1280px;
  --gut: max(18px, calc((100vw - var(--maxw)) / 2));
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Unbounded", "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 84px; }
body { margin: 0; color: var(--ink); background: var(--bg); font: 400 16px/1.62 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body.has-cursor, body.has-cursor a, body.has-cursor button, body.has-cursor [data-open] { cursor: none; }
body.has-cursor input { cursor: text; }
/* open dialogs (project viewer, palette) sit in the browser's top layer, above the custom cursor: use the normal pointer there */
body.has-cursor dialog { cursor: auto; }
body.has-cursor dialog a, body.has-cursor dialog button, body.has-cursor dialog [data-open] { cursor: pointer; }
body.has-cursor dialog input { cursor: text; }
body:has(dialog[open]) .cursor, body:has(dialog[open]) .cursor-dot { opacity: 0; }
::selection { background: var(--lime); color: #050706; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; }
h2 { font: 700 clamp(2.1rem, 1.3rem + 3vw, 4.2rem)/1 var(--display); letter-spacing: -.035em; }
h3 { font-family: var(--display); font-size: 1.02rem; letter-spacing: -.01em; line-height: 1.25; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 8px; }
kbd { font: 500 11px var(--mono); color: var(--muted); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; background: rgba(255,255,255,.03); }

/* ambient layers */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(60vw 40vw at 85% 110%, rgba(var(--violet-rgb), .07), transparent 70%),
    radial-gradient(50vw 40vw at -10% 40%, rgba(var(--mint-rgb), .05), transparent 70%),
    linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px) 0 0 / 72px 72px,
    var(--bg);
}
.noise {
  position: fixed; inset: -50%; z-index: 60; pointer-events: none; opacity: .06; 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");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain { 0%{transform:translate(0,0)} 20%{transform:translate(-3%,2%)} 40%{transform:translate(2%,-3%)} 60%{transform:translate(-2%,-1%)} 80%{transform:translate(3%,3%)} 100%{transform:translate(0,0)} }
.progress { position: fixed; left: 0; top: 0; height: 2px; width: 100%; z-index: 70; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--lime), var(--mint), var(--violet)); box-shadow: 0 0 12px rgba(var(--lime-rgb), .7); }


/* cursor */
.cursor, .cursor-dot { position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none; }
.cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px var(--lime); }
.cursor {
  width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%; border: 1.5px solid rgba(var(--lime-rgb), .55);
  display: grid; place-items: center; transition: width .3s var(--ease), height .3s var(--ease), margin .3s var(--ease), background .3s, border-color .3s, opacity .3s;
  mix-blend-mode: normal;
}
.cursor span { font: 700 10.5px var(--mono); letter-spacing: .1em; color: #050706; opacity: 0; transition: opacity .2s; }
.cursor.act { width: 56px; height: 56px; margin: -28px 0 0 -28px; background: rgba(var(--lime-rgb), .08); border-color: var(--lime); }
.cursor.label { width: 84px; height: 84px; margin: -42px 0 0 -42px; background: var(--lime); border-color: var(--lime); }
.cursor.label span { opacity: 1; }
.cursor.down { width: 26px; height: 26px; margin: -13px 0 0 -13px; }
.cursor.gone { opacity: 0; }

/* top bar */
.topbar { position: fixed; inset: 0 0 auto; z-index: 50; display: flex; align-items: center; gap: 24px; padding: 16px var(--gut); transition: padding .4s var(--ease), background .4s, border-color .4s; border-bottom: 1px solid transparent; }
.topbar.scrolled { padding-block: 10px; background: rgba(5, 7, 6, .7); backdrop-filter: blur(16px) saturate(1.5); border-color: var(--line); }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 14px var(--mono); letter-spacing: .12em; transition: transform .25s var(--ease); }
.die { width: 26px; height: 26px; border: 1.5px solid var(--lime); border-radius: 7px; position: relative; box-shadow: 0 0 18px rgba(var(--lime-rgb), .4), inset 0 0 8px rgba(var(--lime-rgb), .3); }
.die::after { content: ""; position: absolute; inset: 7px; background: var(--lime); border-radius: 2px; animation: pulse 2.4s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.nav { display: flex; gap: 12px; flex: 1; justify-content: center; }
.nav a { text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 500; padding: 8px 14px; border-radius: 99px; transition: color .2s, background .2s, transform .25s var(--ease); }
.nav a span { font: 500 10.5px var(--mono); color: var(--lime); margin-right: 6px; }
.nav a:hover { color: var(--ink); background: rgba(255,255,255,.05); }
.tools { display: flex; gap: 8px; align-items: center; }
.kbd-btn { display: inline-flex; align-items: center; gap: 10px; padding: 6px 8px 6px 14px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(255,255,255,.03); color: var(--muted); font: 500 13px var(--sans); }
.kbd-btn:hover { color: var(--ink); border-color: rgba(var(--lime-rgb), .5); }

/* buttons, badges, chips */
.btn { display: inline-flex; align-items: center; gap: 9px; padding: 12px 20px; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(255,255,255,.035); color: var(--ink); font: 500 14.5px var(--sans); text-decoration: none; transition: border-color .25s, background .25s, box-shadow .25s, transform .3s var(--ease); white-space: nowrap; }
.btn:hover { border-color: rgba(var(--lime-rgb), .6); background: rgba(var(--lime-rgb), .07); }
.btn.primary { background: var(--lime); border-color: var(--lime); color: #050706; font-weight: 600; }
.btn.primary:hover { box-shadow: 0 0 0 5px rgba(var(--lime-rgb), .16), 0 12px 40px rgba(var(--lime-rgb), .35); }
.btn.small { padding: 7px 13px; font-size: 13px; border-radius: 10px; }
.btn.disabled { opacity: .5; }
.btn.primary.disabled { background: transparent; color: var(--muted); border-color: var(--line-2); }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(255,255,255,.03); color: var(--soft); transition: all .2s; }
.icon-btn:hover { border-color: var(--lime); color: var(--lime); }
.meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px; border-radius: 99px; font: 600 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; border: 1px solid currentColor; }
.badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.s-done { color: var(--lime); background: rgba(var(--lime-rgb), .07); }
.s-wip { color: var(--violet); background: rgba(var(--violet-rgb), .08); }
.s-wip i { animation: pulse 1.4s infinite; }
.s-early { color: var(--early); background: rgba(255,255,255,.04); }
.stage, .year, .pid { color: var(--dim); font: 500 11.5px var(--mono); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 11.5px; color: var(--muted); border: 1px solid var(--line); padding: 2px 9px; border-radius: 99px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chips span, .sk { font: 500 12px var(--mono); color: var(--soft); background: rgba(255,255,255,.04); border: 1px solid var(--line); padding: 5px 10px; border-radius: 9px; }

/* spotlight border */
.spot { position: relative; isolation: isolate; }
.spot::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; z-index: -1; pointer-events: none;
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 0%), rgba(var(--lime-rgb), .75), rgba(var(--mint-rgb), .25) 40%, transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .35s;
}
.spot::after { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none; background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(var(--lime-rgb), .06), transparent 60%); opacity: 0; transition: opacity .35s; }
.spot:hover::before, .spot:hover::after { opacity: 1; }
.tilt { transition: transform .5s var(--ease); transform-style: preserve-3d; will-change: transform; }

/* sections */
main { position: relative; z-index: 1; }
.section { max-width: var(--maxw); margin: 0 auto; padding: 150px 18px 0; }
.kicker { display: flex; align-items: center; gap: 14px; margin: 0 0 18px; font: 500 12.5px var(--mono); color: var(--lime); text-transform: uppercase; letter-spacing: .12em; }
.kicker i { flex: 0 0 56px; height: 1px; background: linear-gradient(90deg, var(--lime), transparent); }
.kicker em { font-style: normal; color: var(--dim); }
.section h2 { margin-bottom: 22px; }
.sec-sub { color: var(--muted); margin: 0 0 34px; max-width: 640px; }
.count { font: 500 13px var(--mono); color: var(--muted); }

/* ===== hero ===== */
.hero { position: relative; min-height: max(780px, 100svh); display: flex; align-items: center; padding: 104px var(--gut) 90px; overflow: hidden; }
/* hero stage: a still poster paints instantly; the live 3D canvas fades in over it once loaded */
#stage { position: absolute; inset: 0; z-index: 0; background: var(--bg); overflow: hidden; }
#stage picture, #stage .poster { position: absolute; inset: 0; width: 100%; height: 100%; }
#stage .poster { object-fit: cover; object-position: center; }
#stage canvas { position: absolute; inset: 0; display: block; width: 100% !important; height: 100% !important; opacity: 0; transition: opacity 1.2s ease; }
#stage.ready canvas { opacity: 1; }
/* no WebGL (old GPU, hardware acceleration off): the poster stays and breathes */
#stage.no-webgl .poster { animation: breathe 9s ease-in-out infinite alternate; }
#stage.no-webgl::after { content: ""; position: absolute; inset: 0; background: radial-gradient(30vw 22vw at 70% 50%, rgba(var(--lime-rgb), .16), transparent 70%); animation: glow 3.2s ease-in-out infinite alternate; }
@keyframes breathe { to { transform: scale(1.05); } }
@keyframes glow { from { opacity: .35; } to { opacity: 1; } }
.hero-vignette { position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(5,7,6,.92) 0%, rgba(5,7,6,.55) 38%, transparent 62%), linear-gradient(transparent 70%, var(--bg)); }
body.chip-hot .hero-vignette { background: linear-gradient(90deg, rgba(5,7,6,.92) 0%, rgba(5,7,6,.5) 36%, transparent 60%), linear-gradient(transparent 70%, var(--bg)); }
.hero-inner { position: relative; z-index: 2; max-width: 820px; pointer-events: none; }
.hero-inner a, .hero-inner button { pointer-events: auto; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 20px; padding: 7px 14px; border-radius: 99px; border: 1px solid rgba(var(--lime-rgb), .3); background: rgba(var(--lime-rgb), .06); font: 500 12px var(--mono); color: var(--lime); text-transform: uppercase; letter-spacing: .12em; backdrop-filter: blur(8px); }
.led { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px var(--lime); animation: pulse 1.6s infinite; }
.name { font: 800 clamp(2.3rem, .9rem + 4.6vw, 5.4rem)/.95 var(--display); letter-spacing: -.055em; text-transform: uppercase; }
.name > span { display: block; overflow: hidden; padding: .04em 0 .06em; }
.name .word { display: inline-block; white-space: nowrap; }
.name .l1 { font-size: .78em; color: var(--soft); }
.name .ch { display: inline-block; will-change: transform; }
.name .l2 .ch { color: var(--lime); animation: wave 4.2s ease-in-out infinite; animation-delay: calc(var(--i) * 110ms); }
.name .l2 { filter: drop-shadow(0 0 28px rgba(var(--lime-rgb), .32)); }
@keyframes wave { 0%, 100% { color: var(--lime); } 35% { color: var(--mint); } 60% { color: #e9ffa8; } }
.roleline { margin: 18px 0 0; font: 500 clamp(1.05rem, .9rem + .7vw, 1.5rem) var(--sans); color: var(--soft); min-height: 1.6em; }
.role { color: var(--lime); font-family: var(--mono); font-weight: 500; }
.caret { display: inline-block; width: .55em; height: 1.05em; vertical-align: -.15em; margin-left: 3px; background: var(--lime); animation: pulse 1s steps(1) infinite; }
.pitch { margin: 14px 0 0; max-width: 620px; color: var(--muted); font-size: 1.02rem; }
.links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero-foot { display: flex; flex-wrap: wrap; align-items: stretch; gap: 14px; margin-top: 28px; }
.stats { display: flex; margin: 0; border: 1px solid var(--line-2); border-radius: var(--r); background: rgba(5,7,6,.5); backdrop-filter: blur(12px); }
.stats div { padding: 14px 24px; }
.stats div + div { border-left: 1px solid var(--line); }
.stats dt { font: 700 2rem/1 var(--mono); }
.stats dd { margin: 7px 0 0; font: 500 10.5px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.seeking { display: flex; align-items: center; gap: 12px; margin: 0; padding: 14px 18px; max-width: 360px; border-radius: var(--r); border: 1px solid rgba(var(--lime-rgb), .25); background: rgba(var(--lime-rgb), .06); font-size: 14px; font-weight: 500; backdrop-filter: blur(12px); }
.seeking i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(var(--lime-rgb), .2), 0 0 12px var(--lime); animation: pulse 1.6s infinite; }
.school { margin: 22px 0 0; color: var(--dim); font: 500 12.5px var(--mono); }
.hero-hint { position: absolute; z-index: 2; right: var(--gut); bottom: 46px; display: flex; align-items: center; gap: 10px; font: 500 11.5px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .1em; pointer-events: none; }
.ping { width: 9px; height: 9px; border-radius: 50%; background: var(--lime); position: relative; }
.ping::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid var(--lime); animation: ping 1.8s infinite; }
@keyframes ping { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.8); opacity: 0; } }
.scroll-cue { position: absolute; z-index: 2; left: 50%; bottom: 34px; width: 24px; height: 38px; border: 1.5px solid var(--line-2); border-radius: 14px; transform: translateX(-50%); }
.scroll-cue span { position: absolute; left: 50%; top: 7px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px; background: var(--lime); animation: wheel 1.8s infinite; }
@keyframes wheel { 60% { transform: translateY(12px); opacity: 0; } 61% { transform: none; opacity: 0; } }

/* marquees */
.marquees { position: relative; z-index: 1; border-block: 1px solid var(--line); background: rgba(255,255,255,.012); padding: 6px 0; transform: rotate(-1.2deg) scale(1.02); margin: 10px 0 0; }
.marquee { overflow: hidden; padding: 12px 0; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 40px; width: max-content; }
.marquee-track span { font: 600 clamp(1rem, .8rem + .8vw, 1.5rem) var(--display); color: var(--dim); white-space: nowrap; text-transform: uppercase; letter-spacing: -.01em; }
.marquee-track span::after { content: "✦"; margin-left: 40px; color: var(--lime); font-size: .7em; vertical-align: .15em; }
.marquee.rev .marquee-track span { font: 500 13px var(--mono); letter-spacing: .08em; color: var(--muted); }
.marquee.rev .marquee-track span::after { content: "/"; color: var(--violet); }

/* method */
.method { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 20px; }
.wire { position: absolute; left: 0; right: 0; top: 52px; width: 100%; height: 10px; z-index: 0; overflow: visible; }
.wire path { stroke: var(--lime); stroke-width: 2; fill: none; stroke-dasharray: 1000; stroke-dashoffset: 1000; filter: drop-shadow(0 0 6px var(--lime)); vector-effect: non-scaling-stroke; }
.m-item { position: relative; z-index: 1; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 26px 24px 28px; backdrop-filter: blur(10px); }
.m-ic { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 14px; background: var(--bg); border: 1px solid rgba(var(--lime-rgb), .4); color: var(--lime); box-shadow: 0 0 24px rgba(var(--lime-rgb), .15); }
.m-item .num { display: block; margin: 24px 0 8px; font: 500 11.5px var(--mono); color: var(--dim); }
.m-item h3 { margin-bottom: 10px; font-size: 1.05rem; }
.m-item p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.55; }

/* featured: a horizontal bar with its own sideways scroll; the page keeps scrolling vertically */
.feat-wrap { margin-top: 10px; }
.feat-tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 18px; }
.feat-tabs::-webkit-scrollbar { display: none; }
.ft-item { flex: none; display: inline-flex; align-items: center; gap: 10px; max-width: 300px; padding: 9px 14px; border-radius: 99px; border: 1px solid var(--line-2); background: rgba(255,255,255,.02); color: var(--muted); font: 500 13.5px var(--sans); white-space: nowrap; transition: all .3s var(--ease); }
.ft-t { overflow: hidden; text-overflow: ellipsis; }
.ft-item:hover { color: var(--ink); border-color: rgba(var(--lime-rgb), .5); }
.ft-item.on { color: #050706; background: var(--lime); border-color: var(--lime); box-shadow: 0 0 24px rgba(var(--lime-rgb), .3); }
.ft-n { font: 700 11px var(--mono); color: var(--dim); }
.ft-item.on .ft-n { color: rgba(5,7,6,.6); }
.ft-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.ft-item.on .ft-dot { color: #050706; box-shadow: none; }
.feat-view {
  /* full-bleed track, content aligned with the page gutter */
  margin-inline: calc(50% - 50vw); padding: 6px 0 14px; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scroll-padding-inline: var(--gut); overscroll-behavior-x: contain;
  scrollbar-width: none; outline: none; cursor: grab;
}
.feat-view::-webkit-scrollbar { display: none; }
.feat-view.dragging { cursor: grabbing; scroll-snap-type: none; }
.feat-view.dragging .panel { pointer-events: none; }
.feat-view:focus-visible .panel.in { box-shadow: 0 0 0 2px var(--lime); }
.feat-list { display: flex; gap: 24px; width: max-content; padding-inline: var(--gut); }
.panel { scroll-snap-align: start; width: min(1060px, calc(100vw - 2 * var(--gut) - 90px)); display: grid; grid-template-columns: 1.25fr 1fr; gap: 34px; align-items: center; padding: 26px; border-radius: 24px; border: 1px solid var(--line); background: linear-gradient(150deg, rgba(24,31,28,.75), rgba(10,14,12,.75)); backdrop-filter: blur(10px); perspective: 1200px; transform: scale(.95); transition: transform .6s var(--ease), border-color .6s; user-select: none; }
/* inactive panels are darkened by an overlay (not opacity), so the text keeps its contrast for screen readers and audits */
.panel::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; background: rgba(5,7,6,.58); z-index: 3; pointer-events: none; transition: opacity .6s var(--ease); }
.panel.in::before { opacity: 0; }
.panel img { -webkit-user-drag: none; }
.panel.in { transform: none; border-color: rgba(var(--lime-rgb), .25); }
.feat-foot { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 14px; margin-top: 18px; }
.ft-bar { height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.ft-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--lime), var(--mint)); transform-origin: 0 50%; transform: scaleX(0); box-shadow: 0 0 12px rgba(var(--lime-rgb), .6); transition: transform .25s var(--ease); }
.ft-count { font: 500 12px var(--mono); color: var(--muted); min-width: 56px; text-align: center; }
.ft-hint { grid-column: 1 / -1; margin: 0; font: 500 11.5px var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: .08em; }
.panel-media { position: relative; border-radius: 18px; padding: 0 12px 12px; background: linear-gradient(160deg, #161d1a, #0a0e0c); border: 1px solid var(--line-2); box-shadow: 0 40px 80px -30px rgba(0,0,0,.9); }
.screen-bar { display: flex; align-items: center; gap: 6px; height: 36px; }
.screen-bar span { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.14); }
.screen-bar span:first-child { background: var(--lime); box-shadow: 0 0 8px var(--lime); }
.screen-bar em { margin-left: auto; font: 500 10.5px var(--mono); font-style: normal; color: var(--dim); }
.screen-img { position: relative; background: #fff; border-radius: 10px; aspect-ratio: 16 / 10; display: grid; place-items: center; overflow: hidden; }
.screen-img img { width: 100%; height: 100%; object-fit: contain; padding: 10px; transition: transform .8s var(--ease); }
.panel:hover .screen-img img { transform: scale(1.04); }
.scan { position: absolute; left: 12px; right: 12px; top: 36px; bottom: 12px; border-radius: 10px; pointer-events: none; background: linear-gradient(transparent 0, rgba(var(--lime-rgb), .18) 50%, transparent 52%) 0 0 / 100% 220%; mix-blend-mode: multiply; animation: scan 4s linear infinite; opacity: 0; transition: opacity .4s; }
.panel:hover .scan { opacity: 1; }
@keyframes scan { from { background-position: 0 -120%; } to { background-position: 0 120%; } }
.panel-body .idx { margin: 0 0 16px; font: 700 13px var(--mono); color: var(--lime); }
.panel-body .idx span { color: var(--dim); margin-left: 4px; }
.panel-body h3 { font-size: clamp(1.4rem, 1rem + 1.1vw, 2rem); letter-spacing: -.03em; margin: 16px 0 14px; line-height: 1.12; }
.headline { margin: 0 0 18px; color: var(--soft); padding-left: 14px; border-left: 2px solid var(--lime); }
.panel-body .chips { margin-bottom: 24px; }

/* projects */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 16px; }
.search { flex: 1 1 340px; display: flex; align-items: center; gap: 10px; padding: 0 8px 0 16px; height: 50px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--panel); color: var(--muted); transition: border-color .2s, box-shadow .2s; }
.search:focus-within { border-color: var(--lime); box-shadow: 0 0 0 4px rgba(var(--lime-rgb), .12); color: var(--lime); }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--ink); font: 500 15px var(--sans); outline: none; }
.search input::-webkit-search-cancel-button { display: none; }
.search button { width: 32px; height: 32px; border-radius: 9px; border: 0; background: rgba(255,255,255,.05); color: var(--muted); font-size: 18px; }
.status-seg { display: inline-flex; padding: 4px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--panel); }
.status-seg button { border: 0; background: transparent; color: var(--muted); font: 500 13.5px var(--sans); padding: 9px 14px; border-radius: 10px; transition: all .25s; }
.status-seg button.on { background: var(--ink); color: var(--bg); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 99px; border: 1px solid var(--line-2); background: rgba(255,255,255,.02); color: var(--muted); font: 500 13.5px var(--sans); transition: all .25s; }
.chip:hover { color: var(--ink); border-color: rgba(var(--lime-rgb), .5); }
.chip small { font: 500 11px var(--mono); color: var(--dim); }
.chip.on { background: var(--lime); border-color: var(--lime); color: #050706; box-shadow: 0 0 24px rgba(var(--lime-rgb), .3); }
.chip.on small { color: #2c3b07; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; position: relative; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 22px 20px; display: flex; flex-direction: column; gap: 12px; backdrop-filter: blur(10px); transition: transform .5s var(--ease), background .3s; }
.card:hover { background: var(--panel-2); }
.card-top { display: flex; justify-content: space-between; align-items: center; }
.go { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); color: var(--muted); transition: all .4s var(--ease); }
.card:hover .go { background: var(--lime); border-color: var(--lime); color: #050706; transform: rotate(45deg) scale(1.1); }
.card h3 { font-size: 1.04rem; }
.card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-top: 6px; }
.empty { text-align: center; color: var(--muted); padding: 60px 0; font: 500 14px var(--mono); }
.more-wrap { display: flex; justify-content: center; margin-top: 28px; }

/* skills */
.skills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.skill-group { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; backdrop-filter: blur(10px); }
.skill-group .num { margin: 0 0 10px; font: 500 11.5px var(--mono); color: var(--lime); }
.skill-group h3 { margin-bottom: 18px; }
.sk { display: inline-flex; align-items: center; gap: 7px; transition: all .25s var(--ease); }
.sk small { font-size: 10px; color: #050706; background: var(--lime); border-radius: 5px; padding: 0 5px; line-height: 16px; }
.sk:not(:disabled):hover { border-color: var(--lime); color: var(--ink); transform: translateY(-2px); box-shadow: 0 8px 24px -8px rgba(var(--lime-rgb), .4); }
.sk:disabled { opacity: .6; }
.langs { color: var(--muted); margin-top: 26px; }
.langs strong { color: var(--lime); font: 500 11.5px var(--mono); text-transform: uppercase; letter-spacing: .12em; margin-right: 12px; }

/* path */
.timeline-wrap { position: relative; margin-top: 30px; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.tl-line { position: absolute; left: 8px; top: 10px; bottom: 10px; width: 2px; background: var(--line); }
.tl-line i { position: absolute; inset: 0; background: linear-gradient(var(--lime), var(--mint), var(--violet)); transform-origin: 50% 0; transform: scaleY(0); box-shadow: 0 0 12px rgba(var(--lime-rgb), .6); }
.timeline li { display: grid; grid-template-columns: 170px 1fr; gap: 24px; padding: 0 0 20px 48px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 18px; width: 18px; height: 18px; border-radius: 5px; background: var(--bg); border: 1.5px solid var(--line-2); transition: all .5s var(--ease); }
.timeline li.lit::before { border-color: var(--lime); background: var(--lime); box-shadow: 0 0 18px var(--lime); }
.timeline .when { font: 500 13px var(--mono); color: var(--muted); padding-top: 18px; transition: color .4s; }
.timeline li.lit .when { color: var(--lime); }
.tl-card { padding: 16px 20px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); }
.tl-card p { margin: 6px 0 0; color: var(--muted); font-size: 14.5px; }

/* contact */
.contact { padding-bottom: 140px; }
.contact-card { position: relative; overflow: hidden; border-radius: 32px; border: 1px solid rgba(var(--lime-rgb), .3); padding: clamp(32px, 6vw, 80px); background: radial-gradient(ellipse 70% 110% at 100% 0%, rgba(var(--lime-rgb), .14), transparent 60%), radial-gradient(ellipse 50% 80% at 0% 100%, rgba(var(--violet-rgb), .1), transparent 60%), var(--panel); }
.contact-card .big { position: relative; z-index: 1; margin: 0 0 20px; max-width: 900px; font: 700 clamp(2rem, 1.2rem + 3.4vw, 4.6rem)/1.02 var(--display); letter-spacing: -.045em; }
.w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .06em; }
.w > span { display: inline-block; }
.contact-card .sub { position: relative; z-index: 1; color: var(--muted); margin: 0; max-width: 620px; }
.contact-card .links { position: relative; z-index: 1; }
.orbit { position: absolute; right: -120px; top: 50%; width: 520px; height: 520px; transform: translateY(-50%); pointer-events: none; }
.orbit i { position: absolute; inset: 0; border-radius: 50%; border: 1px dashed rgba(var(--lime-rgb), .2); animation: spin 40s linear infinite; }
.orbit i:nth-child(2) { inset: 70px; border-style: solid; border-color: rgba(var(--violet-rgb), .18); animation-duration: 28s; animation-direction: reverse; }
.orbit i:nth-child(3) { inset: 150px; border-color: rgba(var(--mint-rgb), .22); animation-duration: 18s; }
.orbit i::after { content: ""; position: absolute; left: 50%; top: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 12px var(--lime); }
@keyframes spin { to { transform: rotate(360deg); } }
.footer { position: relative; z-index: 1; border-top: 1px solid var(--line); padding: 28px var(--gut); display: flex; justify-content: space-between; align-items: center; gap: 18px 28px; flex-wrap: wrap; color: var(--dim); font: 500 12px var(--mono); }
.footer a { color: var(--lime); text-decoration: none; }
.f-l, .f-r { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.lh { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border: 1px solid var(--line); border-radius: 12px; }
.lh:hover { border-color: rgba(var(--lime-rgb), .5); }
.lh-s { --c: var(--lime); position: relative; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: conic-gradient(var(--c) calc(var(--v) * 1%), var(--line) 0); }
.lh-s::before { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--bg); }
.lh-s b { position: relative; font: 700 11.5px var(--mono); color: var(--ink); }
.lh-s i { position: absolute; bottom: -15px; font: 500 8.5px var(--mono); font-style: normal; color: var(--dim); text-transform: uppercase; }
.lh em { font-style: normal; color: var(--dim); margin-left: 6px; }
.lh { padding-bottom: 18px; }

/* modal */
.modal { width: min(880px, calc(100vw - 24px)); max-height: calc(100vh - 40px); padding: 0; border: 1px solid var(--line-2); border-radius: 26px; background: var(--solid); color: var(--ink); box-shadow: 0 50px 140px rgba(0,0,0,.75), 0 0 100px -30px rgba(var(--lime-rgb), .35); }
.modal::backdrop { background: rgba(2, 3, 3, .75); backdrop-filter: blur(8px); }
.modal-body { padding: 26px 38px 30px; }
.m-nav { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; }
.m-nav .pid { margin-right: auto; order: -1; }
.modal-body h2 { margin: 14px 0 14px; font-size: clamp(1.4rem, 1.1rem + 1.3vw, 2.2rem); letter-spacing: -.035em; line-height: 1.1; }
.modal-body h3 { margin: 28px 0 12px; font: 500 11.5px var(--mono); text-transform: uppercase; letter-spacing: .14em; color: var(--lime); }
.lead { margin: 0; color: var(--soft); font-size: 1.03rem; }
.modal figure { margin: 22px 0 0; background: #fff; border-radius: 14px; padding: 10px; }
.modal figure img { margin: 0 auto; max-height: 420px; object-fit: contain; }
.results { margin: 0; padding: 0; list-style: none; }
.results li { position: relative; padding-left: 24px; margin-bottom: 10px; color: var(--soft); }
.results li::before { content: ""; position: absolute; left: 2px; top: .7em; width: 10px; height: 2px; background: var(--lime); box-shadow: 0 0 8px var(--lime); }
.note { margin: 14px 0 0; padding: 12px 16px; border-radius: 12px; background: rgba(var(--violet-rgb), .1); border: 1px solid rgba(var(--violet-rgb), .3); color: #e3d6ff; font-size: 14.5px; }
.modal-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 30px; flex-wrap: wrap; }
.kbd-hint { display: inline-flex; gap: 6px; }
.repo-url { font: 500 12.5px var(--mono); }

/* palette */
.palette { width: min(640px, calc(100vw - 24px)); margin-top: 12vh; padding: 0; border: 1px solid var(--line-2); border-radius: 20px; background: rgba(14, 19, 17, .96); color: var(--ink); box-shadow: 0 40px 120px rgba(0,0,0,.8), 0 0 80px -30px rgba(var(--lime-rgb), .4); overflow: hidden; }
.palette::backdrop { background: rgba(2, 3, 3, .6); backdrop-filter: blur(6px); }
.palette[open] { animation: palIn .25s var(--ease); }
@keyframes palIn { from { opacity: 0; transform: translateY(-10px) scale(.98); } }
.pal-in { display: flex; align-items: center; gap: 12px; padding: 0 16px; height: 60px; border-bottom: 1px solid var(--line); color: var(--lime); }
.pal-in input { flex: 1; border: 0; background: transparent; color: var(--ink); font: 500 16px var(--sans); outline: none; }
.pal-list { list-style: none; margin: 0; padding: 8px; max-height: 52vh; overflow: auto; }
.pal-g { padding: 10px 12px 6px; font: 500 10.5px var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: .14em; }
.pal-it { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--soft); font-size: 14.5px; cursor: pointer; }
.pal-it svg { color: var(--dim); flex: none; }
.pal-it em { margin-left: auto; font: 500 11px var(--mono); font-style: normal; color: var(--dim); }
.pal-it.sel, .pal-it:hover { background: rgba(var(--lime-rgb), .1); color: var(--ink); }
.pal-it.sel svg { color: var(--lime); }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 95; transform: translate(-50%, 20px); opacity: 0; padding: 12px 18px; border-radius: 12px; background: var(--lime); color: #050706; font: 600 14px var(--sans); transition: all .35s var(--ease); pointer-events: none; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.print-list { display: none; }


/* ===== V3 additions ===== */
/* pre-rendered hero: only the visitor's language is shown at first paint (app.js then takes over) */
html[data-lang="en"] #heroInner .pre[data-l="fr"], html[data-lang="fr"] #heroInner .pre[data-l="en"] { display: none; }
#heroInner .pre { display: contents; }
/* the letters of the name rise one by one (CSS, so it does not wait for any library) */
.name .ch { transition: transform .9s cubic-bezier(.2, .8, .2, 1) calc(var(--i) * 28ms); }
html[data-motion="full"]:not(.intro) .name .ch { transform: translateY(115%) rotate(6deg); }
html[data-motion="calm"] .name { animation: fadeIn .8s ease both; }
@keyframes fadeIn { from { opacity: 0; } }

.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 200; padding: 10px 16px; border-radius: 10px; background: var(--lime); color: #050706; font-weight: 600; text-decoration: none; transition: top .2s; }
.skip:focus { top: 12px; }
.btn.icon-only { padding: 11px 13px; }
.btn.small.icon-only { padding: 7px 9px; }
#motionBtn.calm { color: var(--muted); }
#motionBtn:not(.calm) svg { color: var(--lime); }

/* availability chips (hero, contact) */
.avail { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; }
.avail li { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 99px; border: 1px solid var(--line-2); background: rgba(5,7,6,.55); backdrop-filter: blur(8px); font: 500 12.5px var(--mono); color: var(--soft); }
.avail li:first-child { color: #050706; background: var(--lime); border-color: var(--lime); font-weight: 700; }
.avail .dot { width: 7px; height: 7px; border-radius: 50%; background: #050706; animation: pulse 1.6s infinite; }
.hero .stats { margin-top: 26px; width: max-content; max-width: 100%; }

/* stretched links: the whole card / panel is clickable, the title link carries keyboard focus */
.card, .panel { position: relative; }
.open-link { color: inherit; text-decoration: none; }
.open-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: 1; }
.open-link:focus-visible { outline: none; }
.open-link:focus-visible::after { outline: 2px solid var(--lime); outline-offset: 2px; }
.panel .problem { margin: 0 0 12px; color: var(--muted); font-size: 14.5px; }

/* datasheet */
.sheet { width: 100%; border-collapse: collapse; margin: 18px 0 22px; font-size: 14px; border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden; display: table; }
.sheet th, .sheet td { text-align: left; vertical-align: top; padding: 9px 14px; border-bottom: 1px solid var(--line); }
.sheet tr:last-child th, .sheet tr:last-child td { border-bottom: 0; }
.sheet th { width: 120px; font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--lime); background: rgba(var(--lime-rgb), .05); white-space: nowrap; }
.sheet td { color: var(--soft); }

/* writing & demos */
.writing { display: grid; grid-template-columns: 1.25fr 1fr; gap: 22px; align-items: start; }
.w-col { display: grid; gap: 12px; }
.w-h { display: flex; align-items: center; gap: 10px; margin: 0 0 4px; font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--lime); }
.post, .demo-card { display: grid; gap: 8px; padding: 18px 20px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); text-decoration: none; color: inherit; backdrop-filter: blur(10px); transition: background .3s, transform .4s var(--ease); }
.post:hover, .demo-card:hover { background: var(--panel-2); transform: translateY(-2px); }
.post-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font: 500 11.5px var(--mono); color: var(--dim); }
.post-t { font: 600 1.05rem/1.3 var(--display); letter-spacing: -.015em; color: var(--ink); }
.post-s { color: var(--muted); font-size: 14px; }
.post-go { display: inline-flex; align-items: center; gap: 6px; font: 600 13px var(--sans); color: var(--lime); }
.demo-art { height: 74px; border-radius: 12px; background: #0a0f0c; border: 1px solid var(--line); display: flex; align-items: flex-end; gap: 4%; padding: 10px 14px; overflow: hidden; }
.demo-art i { flex: 1; border-radius: 3px 3px 0 0; background: rgba(var(--lime-rgb), .28); height: 30%; transform-origin: 50% 100%; animation: bars 2.6s ease-in-out infinite alternate; }
.demo-art i:nth-child(2) { height: 45%; animation-delay: -.4s; } .demo-art i:nth-child(3) { height: 25%; animation-delay: -.8s; }
.demo-art i:nth-child(4) { height: 38%; animation-delay: -1.2s; } .demo-art i:nth-child(5) { height: 95%; background: var(--lime); box-shadow: 0 0 14px rgba(var(--lime-rgb), .6); }
.demo-art i:nth-child(6) { height: 33%; animation-delay: -1.6s; } .demo-art i:nth-child(7) { height: 22%; animation-delay: -2s; } .demo-art i:nth-child(8) { height: 41%; animation-delay: -.2s; }
.demo-bpe { align-items: center; gap: 6px; }
.demo-bpe i { flex: 0 0 auto; width: 12%; height: 24px; border-radius: 6px; background: rgba(var(--violet-rgb), .25); border: 1px solid rgba(var(--violet-rgb), .5); animation: none; }
.demo-bpe i:nth-child(odd) { background: rgba(var(--lime-rgb), .2); border-color: rgba(var(--lime-rgb), .5); width: 9%; }
.demo-bpe i:nth-child(n) { height: 24px; box-shadow: none; }
@keyframes bars { to { transform: scaleY(1.25); } }
[data-motion="calm"] .demo-art i { animation: none; }

/* reports & theses */
.pubs { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 12px; }
.pub { display: grid; grid-template-columns: 110px 1fr auto; gap: 20px; align-items: center; padding: 18px 20px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); }
.pub .when { font: 500 13px var(--mono); color: var(--lime); }
.pub-kind { margin: 0 0 4px; font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--dim); }
.pub h3 { font-size: 1rem; }
.pub-where { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

/* phone tab bar */
.tabbar { display: none; }
.print-only { display: none; }

/* below-the-fold sections are laid out only when needed */
#skills, #path, #pubs, #writing { content-visibility: auto; contain-intrinsic-size: auto 900px; }

/* responsive */
@media (max-width: 1100px) {
  .nav { display: none; }
  .tools { margin-left: auto; }
  .method, .skills { grid-template-columns: repeat(2, 1fr); }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .wire { display: none; }
}
@media (max-width: 899px) {
  /* phone / tablet: same horizontal bar, one stacked card per swipe */
  .panel { width: calc(100vw - 2 * var(--gut) - 28px); grid-template-columns: 1fr; gap: 18px; padding: 16px; }
  .feat-list { gap: 14px; }
}
@media (max-width: 720px) {
  .kbd-btn kbd, #cmdLabel { display: none; }
  .kbd-btn { padding: 7px 10px; }
  .kbd-btn::before { content: "⌕"; font-size: 17px; line-height: 1; }
  .hero { align-items: flex-end; padding-top: 300px; padding-bottom: 90px; }
  .hero-vignette { background: linear-gradient(rgba(5,7,6,0) 0%, rgba(5,7,6,.65) 38%, rgba(5,7,6,.95) 60%, var(--bg)); }
  .hero-hint { display: none; }
  .scroll-cue { display: none; }
  .stats { width: 100%; }
  .stats div { flex: 1; padding: 12px 14px; }
  .stats dt { font-size: 1.6rem; }
  .seeking { max-width: none; }
  .method, .grid, .skills { grid-template-columns: 1fr; }
  .section { padding-top: 110px; }
  .timeline li { grid-template-columns: 1fr; gap: 6px; padding-left: 38px; }
  .timeline .when { padding-top: 14px; }
  .modal-body { padding: 18px 18px 22px; }
  .orbit { opacity: .5; }
}
@media (max-width: 720px) {
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: rgba(8, 11, 10, .92); backdrop-filter: blur(16px) saturate(1.4); border-top: 1px solid var(--line-2); }
  .tabbar a { display: grid; justify-items: center; gap: 3px; padding: 6px 2px; border-radius: 12px; color: var(--muted); text-decoration: none; font: 500 10.5px var(--sans); }
  .tabbar a.on { color: var(--lime); background: rgba(var(--lime-rgb), .08); }
  .toast { bottom: 84px; }
  #pdfLink { display: none; }
  .topbar { padding-inline: 14px; gap: 10px; }
  .hero .links .btn:not(.primary):not(.icon-only) { flex: 1 1 auto; justify-content: center; }
  .avail li { font-size: 11.5px; padding: 6px 10px; }
  .writing { grid-template-columns: 1fr; }
  .pub { grid-template-columns: 1fr; gap: 8px; }
  .sheet th { width: 92px; padding: 8px 10px; font-size: 10px; }
  .sheet td { padding: 8px 10px; font-size: 13.5px; }
  /* the project viewer becomes a full-screen sheet */
  .modal { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; border: 0; }
  .m-nav { position: sticky; top: -18px; z-index: 2; margin: -18px -18px 14px; padding: 12px 14px; background: rgba(14,19,17,.95); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
  .kbd-hint { display: none; }
}

/* calm motion (default when the OS asks for less motion; switchable in the header): keep gentle fades, drop big movement */
[data-motion="calm"] .noise { animation: none; }
[data-motion="calm"] .name .l2 .ch { animation-duration: 9s; }
[data-motion="calm"] .tilt, [data-motion="calm"] .screen-img img, [data-motion="calm"] .panel { transform: none !important; }
[data-motion="calm"] .card:hover, [data-motion="calm"] .sk:not(:disabled):hover { transform: none; }
[data-motion="calm"] .orbit i { animation-duration: 120s; }
[data-motion="calm"] .scroll-cue span, [data-motion="calm"] .mouse i { animation: none; }

/* ===== print / PDF (light) ===== */
@page { size: A4; margin: 14mm 14mm 16mm; }
@media print {
  :root { --bg: #fff; --panel: #fff; --panel-2: #fff; --solid: #fff; --ink: #121815; --soft: #222b26; --muted: #4f5a55; --dim: #6c7671; --line: #dcdcd4; --line-2: #cfcfc6; --lime: #4a7a00; --lime-rgb: 74, 122, 0; --violet: #6d3fb0; --violet-rgb: 109, 63, 176; --early: #62655d; color-scheme: light; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; animation: none !important; transition: none !important; }
  body { font-size: 10pt; line-height: 1.45; background: #fff; color: var(--ink); overflow: visible; }
  body::before, .noise, .progress, .boot, .cursor, .cursor-dot, .stage, .hero-vignette, .hero-hint, .scroll-cue, .marquees, .topbar, #featured, #projects, .modal, .palette, .toast, .footer, .caret, .orbit, .print-hide, .kicker, .sec-sub, .wire { display: none !important; }
  .rv, .w > span, .name .ch, #heroInner, .hero-inner, .hero-inner * { opacity: 1 !important; transform: none !important; }
  .section h2 { break-after: avoid; }
  #copyMail { display: none !important; }
  .sk:disabled { opacity: 1; color: var(--dim); }
  main { display: flex; flex-direction: column; }
  .hero { order: 1; min-height: 0; padding: 0 0 5mm; display: block; }
  #method { order: 2; } #path { order: 3; } #skills { order: 4; } #contact { order: 5; } #printList { order: 6; }
  .hero-inner { max-width: none; }
  .eyebrow { margin-bottom: 3mm; padding: 2px 8px; font-size: 7.5pt; color: var(--lime); background: #eef5e2; border-color: #c9dca7; }
  .led { box-shadow: none; }
  .name { font-size: 26pt; text-transform: none; letter-spacing: -.04em; }
  .name > span { overflow: visible; }
  .name .l2 .ch { background: none; color: var(--lime); -webkit-text-fill-color: var(--lime); }
  .name .l2 { filter: none; }
  .roleline { display: none; }
  .pitch { font-size: 10pt; color: var(--ink); margin-top: 3mm; max-width: none; }
  .links { margin-top: 3mm; gap: 2mm; }
  .hero-inner .links .btn:first-child { display: none; }
  .btn { padding: 2px 8px; font-size: 8.5pt; background: #fff; color: var(--ink); border-color: var(--line-2); border-radius: 8px; }
  .btn.primary { background: var(--lime); color: #fff; border-color: var(--lime); }
  .hero-foot { margin-top: 4mm; gap: 3mm; }
  .stats, .seeking { background: #fff; backdrop-filter: none; }
  .stats div { padding: 5px 12px; }
  .stats dt { font-size: 15pt; }
  .seeking { padding: 5px 10px; font-size: 9pt; background: #eef5e2; border-color: #c9dca7; max-width: 90mm; }
  .seeking i { box-shadow: none; }
  .school { margin-top: 3mm; }
  .section { padding: 6mm 0 0; max-width: none; }
  .section h2 { font-size: 15pt; margin-bottom: 3mm; }
  .method { grid-template-columns: repeat(4, 1fr); gap: 2mm; margin: 0; break-inside: avoid; }
  .m-item { padding: 7px 9px; backdrop-filter: none; }
  .m-ic { width: 22px; height: 22px; border-radius: 6px; box-shadow: none; background: #fff; }
  .m-ic svg { width: 14px; height: 14px; }
  .m-item .num { margin: 1.5mm 0 1mm; }
  .m-item h3 { font-size: 9.5pt; }
  .m-item p { font-size: 8.3pt; }
  .skills { grid-template-columns: repeat(3, 1fr); gap: 2.5mm; }
  .skill-group { padding: 7px 9px; break-inside: avoid; backdrop-filter: none; }
  .skill-group h3 { margin-bottom: 2mm; font-size: 9.5pt; }
  .chips span, .sk { font-size: 7.3pt; padding: 1px 5px; color: var(--ink); background: #f1f1ec; }
  .sk small { display: none; }
  .langs { margin-top: 3mm; }
  .timeline { margin-top: 0; }
  .tl-line { display: none; }
  .timeline li { grid-template-columns: 30mm 1fr; padding: 0 0 2mm 0; gap: 4mm; break-inside: avoid; }
  .timeline li::before { display: none; }
  .timeline .when { padding-top: 0; color: var(--lime); }
  .tl-card { padding: 0; border: 0; background: none; }
  .timeline h3 { font-size: 10pt; }
  .timeline p { font-size: 8.8pt; margin-top: .5mm; }
  .contact { padding-bottom: 0; }
  .contact-card { padding: 5mm 6mm; background: #fff; border-color: var(--line-2); border-radius: 10px; }
  .contact-card .big { font-size: 14pt; margin-bottom: 2mm; letter-spacing: -.02em; }
  .print-list { display: block; break-before: page; }
  .print-list > h2 { font-size: 17pt; margin-bottom: 2mm; }
  .print-dom { font-size: 11.5pt; color: var(--lime); margin: 6mm 0 2mm; padding-bottom: 1.5mm; border-bottom: 1.5px solid var(--lime); break-after: avoid; }
  .print-item { break-inside: avoid; padding: 3.5mm 0 4mm; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr 62mm; column-gap: 6mm; font-size: 9.4pt; line-height: 1.38; }
  .print-item > * { grid-column: 1; }
  .print-item figure { grid-column: 2; grid-row: 1 / span 8; margin: 0; padding: 4px; align-self: start; border: 1px solid var(--line); border-radius: 8px; }
  .print-item figure img { max-height: 36mm; margin: 0 auto; object-fit: contain; }
  .print-item h2 { font: 600 11.5pt var(--display); margin: 1.5mm 0 1mm; letter-spacing: -.02em; }
  .print-item .lead { font-size: 9.4pt; color: var(--ink); }
  .print-item h3 { font: 500 7.3pt var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--lime); margin: 2mm 0 1mm; }
  .results li { color: var(--ink); font-size: 9pt; margin-bottom: .4mm; padding-left: 4mm; }
  .results li::before { box-shadow: none; width: 6px; left: 0; }
  .badge { font-size: 6.8pt; padding: 1px 6px; }
  .badge i { box-shadow: none; }
  .note { padding: 3px 8px; font-size: 8.6pt; margin-top: 1.5mm; color: var(--ink); background: #f3eefb; }
  .print-item .modal-foot { margin-top: 1.5mm; }
  .repo-url { color: var(--lime); }
}
.search.skill-on { border-color: rgba(var(--lime-rgb), .6); }
.search.skill-on input { color: var(--lime); font-family: var(--mono); font-size: 14px; }

@media print {
  .tabbar, #motionBtn, .skip, .avail .dot, #writing, .hero .links, .lh, .f-r, .noise { display: none !important; }
  #pubs { order: 5; } #contact { order: 6; }
  .avail { margin-top: 3mm; }
  .avail li, .avail li:first-child { background: #fff; color: var(--ink); border-color: var(--line-2); font-size: 8pt; padding: 1px 7px; }
  .sheet { margin: 2mm 0; font-size: 8.4pt; border-color: var(--line-2); }
  .sheet th, .sheet td { padding: 1.2mm 2.5mm; }
  .sheet th { width: 24mm; font-size: 6.6pt; background: #f4f7ee; }
  .sheet td { color: var(--ink); }
  .print-item { grid-template-columns: 1fr 52mm; }
  .print-item .lead { display: none; }
  .pubs { gap: 2mm; }
  .pub { padding: 2.5mm 3mm; grid-template-columns: 22mm 1fr; background: #fff; break-inside: avoid; }
  .pub .btn { display: none; }
  .pub h3 { font-size: 9.6pt; }
  .pub-where, .pub-kind { font-size: 8pt; }
  #skills, #path, #pubs, #writing { content-visibility: visible; }
  #stage { display: none; }
  /* on paper: keep the e-mail and the CV link only */
  .contact-card .links, .contact-card .avail { display: none !important; }
  .section { padding-top: 4mm; }
  .section h2 { font-size: 13pt; margin-bottom: 2mm; }
  .print-only { display: block; margin: 2mm 0 0; font: 500 8.6pt var(--mono); color: var(--lime); }
  .contact-card .sub { margin-bottom: 0; }
  .contact-card .links { margin-top: 2mm; }
  .pub { padding: 2mm 3mm; }
}
