/* BR.UX Studio — shared styles for every page (home, case studies, 404) */

:root {
  --ink: #0c0e13;
  --paper: #fafbfc;
  --blue: #2e5bff;
  --blue-deep: #1a2fb0;
  --lime: #d6ff3f;
  --magenta: #ff2e88;
  --muted: #6b7280;
  --body-ink: #3b404c;
  --line: #d9dce3;
  --display: "Michroma", system-ui, sans-serif; /* headlines only */
  --primary: "Sora", system-ui, -apple-system, sans-serif; /* all other copy */
  --mono: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --gutter: 40px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

/* ---------- Header (fixed, shared by every page) ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter);
  transition: background-color .3s ease, box-shadow .3s ease, padding .3s ease;
}
.site-header.scrolled {
  padding-block: 12px;
  background: color-mix(in srgb, var(--paper) 80%, transparent);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  backdrop-filter: blur(12px) saturate(1.4);
  box-shadow: 0 1px 0 rgba(12, 14, 19, .06);
}
/* The mark is the "BR": at rest the header shows the mark alone; on hover it turns to read "Br" and
   ".UX Studio" slides out beside it, completing the name.
   Michroma caps are .766em, so 20px gives ~15px caps — half the mark's 32px box. The box is
   trimmed to cap height → alphabetic baseline, so centring it centres the caps exactly on the mark.
   Clipping is horizontal only (for the slide-out), so round letters can still overshoot the trimmed box. */
.logo-text {
  font-size: 20px; line-height: 1; text-box: trim-both cap alphabetic;
  white-space: nowrap; overflow: clip visible;
  /* the turned mark's ink reaches 29.3px (26.5px upright); this left pad keeps a 4px gap before the "." */
  padding: 0 1px 0 var(--lt-pad, 3.9px);
  max-width: 0; opacity: 0; transform: translateX(-6px);
  transition: max-width .45s ease, opacity .3s ease, transform .45s ease;
}
.logo:hover .logo-text, .logo:focus-visible .logo-text { max-width: 10em; opacity: 1; transform: none; }
.logo {
  display: flex; align-items: center; gap: 2px; line-height: 20px; /* tight, so mark + text read as one word */
  font-family: var(--display); font-weight: 400; font-synthesis: none; font-size: 14px; letter-spacing: .04em;
  -webkit-text-stroke: .06em currentColor; /* Michroma has no bold — embolden with a same-colour stroke */
  text-decoration: none; color: var(--ink);
}
/* top shape takes the text colour (white in the source art, made for dark backgrounds) */
/* 32×32 box; the mark is 26.5px wide and pinned left, so pull the text in by the 5.5px of empty space */
.logo-mark {
  width: 32px; height: 32px; display: block; flex: none; margin-right: -5.5px;
  transform-origin: 13.3px 16px; /* centre of the drawn mark, not the 32px box */
  transition: transform .45s cubic-bezier(.34, 1.56, .64, 1);
}
.logo:hover .logo-mark, .logo:focus-visible .logo-mark { transform: rotate(-90deg); }

.menu-wrap { position: relative; }
.menu-btn {
  width: 44px; height: 44px; display: grid; place-items: center;
  background: none; border: 1px solid transparent; border-radius: 12px; cursor: pointer;
}
.menu-btn:hover { border-color: var(--line); background: #fff; }
.menu-btn svg { width: 26px; height: 26px; }
.menu-btn .sweep { transform-origin: 12px 12px; }
.menu-btn:hover .sweep, .menu-btn[aria-expanded="true"] .sweep { animation: spin 1.6s linear infinite; }
.menu {
  position: absolute; right: 0; top: 52px; min-width: 220px;
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 8px;
  box-shadow: 0 20px 40px -18px rgba(15, 22, 50, .35);
}
.menu[hidden] { display: none; }
.menu button, .menu a {
  display: flex; width: 100%; justify-content: space-between; align-items: center;
  padding: 10px 12px; border: 0; background: none; border-radius: 10px; cursor: pointer;
  font-family: var(--mono); font-size: 13px; text-align: left; color: var(--ink); text-decoration: none;
}
.menu button:hover, .menu a:hover { background: #f1f3f7; }
.menu button span, .menu a span { color: var(--muted); font-size: 11px; }

/* ---------- Home: intro (the hero screen) ---------- */
/* Launch: the page zooms toward the viewer and fades under the warp. No blur — blurring a page
   several screens tall (with live canvases inside) stalls the first frame. The transform-origin is
   set from JS to the middle of the visible screen so the zoom happens in place. */
.card { position: relative; transition: transform .9s cubic-bezier(.7, 0, .3, 1), opacity .9s ease; }
.card.launching { transform: scale(1.12); opacity: 0; will-change: transform, opacity; }
.intro {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column;
  padding: 76px var(--gutter) 32px;
  overflow: hidden;
  overflow: clip; /* the background blobs overflow; clip stops focus from scrolling it */
}

.fx { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.fx .grid, .dots::before {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(12, 14, 19, .14) 1px, transparent 1.2px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 75%);
}
.dots::before { content: ""; pointer-events: none; z-index: 0; }
.fx .blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; }
.fx .b1 { width: 420px; height: 420px; left: -120px; top: -140px; background: #cdd9ff; }
.fx .b2 { width: 360px; height: 360px; right: -100px; bottom: -120px; background: #efffc2; }
.fx .b3 { width: 280px; height: 280px; right: 30%; top: 30%; background: #ffd9ee; opacity: .35; }
/* Gradient ASCII field — kept faint so it reads as texture, not content */
.fx .ascii {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: .4;
  /* Keep the texture out from behind text: clear ovals around the headline and the CTA + hint
     (positioned from JS), intersected with a fade toward the bottom edge. */
  --ax: 50%; --ay: 50%; --aw: 1px; --ah: 1px;
  --bx: 50%; --by: 50%; --bw: 1px; --bh: 1px;
  -webkit-mask-image:
    radial-gradient(var(--aw) var(--ah) at var(--ax) var(--ay), transparent 62%, #000 100%),
    radial-gradient(var(--bw) var(--bh) at var(--bx) var(--by), transparent 62%, #000 100%),
    linear-gradient(to bottom, #000 0%, #000 68%, transparent 90%);
  -webkit-mask-composite: source-in, source-in;
  mask-image:
    radial-gradient(var(--aw) var(--ah) at var(--ax) var(--ay), transparent 62%, #000 100%),
    radial-gradient(var(--bw) var(--bh) at var(--bx) var(--by), transparent 62%, #000 100%),
    linear-gradient(to bottom, #000 0%, #000 68%, transparent 90%);
  mask-composite: intersect, intersect;
}

.hero {
  position: relative; z-index: 2;
  flex: 1; min-height: 560px;
  display: grid; place-items: center;
}
.center { text-align: center; position: relative; z-index: 2; }

.headline {
  position: relative; z-index: 2; /* dragged letters pass over the CTA + hint, not under them */
  margin: 0;
  font-family: var(--display); font-weight: 400; font-synthesis: none; /* Michroma has one weight — never fake a bold */
  font-size: clamp(30px, 14vw, 124px); /* two short lines — can run larger on phones */
  line-height: .95; letter-spacing: -.05em;
  user-select: none;
}
.headline .line { display: block; white-space: nowrap; }

/* TechText: canvas drawn over the real text; text goes transparent only once the canvas is live */
.tt-word { position: relative; display: inline-block; touch-action: pan-y; }
/* Michroma has no bold cut — thicken "BR" with a same-colour stroke (the canvas reads this width) */
.tt-word .tt-bold { font-weight: inherit; -webkit-text-stroke: .04em currentColor; }
.tt-word.tt-on { color: transparent; }
.tt-canvas {
  position: absolute; left: -220px; top: -220px; /* matches PAD in the TechText script */
  width: calc(100% + 440px); height: calc(100% + 440px);
  pointer-events: none;
}

/* Energy core — stands in for a lowercase "o" (hero) or a "0" (404) */
.core {
  position: relative; display: inline-block;
  width: .78em; height: .78em; margin: 0 -.06em 0 -.02em; vertical-align: -.11em;
  padding: 0; border: 0; background: none; cursor: pointer; text-decoration: none;
  perspective: 500px; border-radius: 50%;
  /* real 3D context: each ring's near half draws over the orb, far half behind it */
  transform-style: preserve-3d;
}
.core .orb {
  position: absolute; inset: 14%; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #fff 0 5%, #b8c8ff 16%, var(--blue) 44%, var(--blue-deep) 74%, #0a1150 100%);
  box-shadow: 0 0 40px rgba(46, 91, 255, .55), inset -10px -12px 26px rgba(0, 0, 40, .45);
  animation: pulse 3.2s ease-in-out infinite;
}
.core .ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 3px solid rgba(46, 91, 255, .55);
  transform-style: preserve-3d;
}
.core .r1 { inset: -14%; transform: rotateX(72deg); animation: ring1 5s linear infinite; }
.core .r2 { inset: -8%; border: 2px dashed rgba(12, 14, 19, .45); transform: rotateY(68deg); animation: ring2 8s linear infinite; }
.core .r1::after {
  content: ""; position: absolute; top: -7px; left: 50%; width: 12px; height: 12px; margin-left: -6px;
  background: var(--lime); border: 2px solid var(--ink);
}
.core:hover .orb { box-shadow: 0 0 70px rgba(46, 91, 255, .8), inset -10px -12px 26px rgba(0, 0, 40, .45); }
.core-tip {
  position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translateX(-50%);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0; font-weight: 400;
  background: var(--ink); color: #fff; padding: 5px 9px; border-radius: 6px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.core:hover .core-tip, .core:focus-visible .core-tip { opacity: 1; }

/* ---------- Buttons + frames with Figma-style selection handles ---------- */
.cta-wrap { position: relative; z-index: 1; display: inline-block; margin-top: 56px; }
.cta {
  position: relative; display: inline-flex; align-items: center; gap: 14px;
  padding: 16px 28px; background: #fff; border: 1px solid #c9ccd4; cursor: pointer;
  font-family: var(--primary); font-weight: 600; font-size: 14px; letter-spacing: .04em;
  color: var(--ink); text-decoration: none;
  transition: border-color .2s, background-color .2s;
}
.cta svg { width: 16px; height: 16px; transition: transform .3s; }
.cta:hover svg { transform: translateY(3px); }
.cta.go:hover svg { transform: translateX(3px); }
.cta.start:hover svg { transform: translateX(3px) scale(1.1); } /* hero "Press start": the play triangle nudges forward */
.cta.primary { background: var(--blue); color: #fff; border-color: var(--blue-deep); }
.cta.primary svg path { stroke: #fff; }
.cta.primary:hover { background: var(--blue-deep); }
.cta .h, .frame > .h {
  position: absolute; width: 8px; height: 8px; background: #fff; border: 1px solid #a5abb6;
  transition: border-color .2s, opacity .2s;
}
.cta .h1, .frame > .h1 { left: -4px; top: -4px; }
.cta .h2, .frame > .h2 { right: -4px; top: -4px; }
.cta .h3, .frame > .h3 { left: -4px; bottom: -4px; }
.cta .h4, .frame > .h4 { right: -4px; bottom: -4px; }
.cta:hover, .cta:focus-visible { border-color: var(--blue); }
.cta:hover .h, .cta:focus-visible .h { border-color: var(--blue); }
.cta.primary .h { border-color: var(--blue-deep); }
.frame { position: relative; border: 1px solid #c9ccd4; }
.size-badge {
  position: absolute; left: 50%; top: calc(100% + 10px); transform: translateX(-50%);
  background: var(--blue); color: #fff; font-family: var(--mono); font-size: 10px;
  padding: 2px 6px; border-radius: 3px; opacity: 0; transition: opacity .2s; pointer-events: none;
}
.cta-wrap:hover .size-badge, .cta-wrap:focus-within .size-badge { opacity: 1; }
.hint { margin-top: 36px; font-family: var(--mono); font-size: 11px; color: var(--muted); }

/* ---------- Stickers (draggable, spring back on release) ---------- */
/* Hero stickers sit on a centred stage around the headline (the old card's hero size), so on a
   full-width page they cluster near the copy instead of drifting to the screen corners */
.stickers {
  position: absolute; inset: 0; margin: auto; z-index: 3; pointer-events: none;
  width: min(100%, 1160px); height: min(100%, 700px);
}
.sticker { position: absolute; pointer-events: auto; }
.sticker-inner {
  display: block; position: relative; touch-action: none; cursor: grab;
  transition: transform .65s cubic-bezier(.34, 1.56, .64, 1);
}
:where(button.sticker-inner) { padding: 0; border: 0; background: none; text-align: left; }
.sticker-inner.is-dragging { transition: none; cursor: grabbing; z-index: 5; }

.s-badge { left: 3%; top: 3%; rotate: -6deg; }
.s-robot { right: 5%; top: 3%; rotate: 5deg; }
.s-visor { left: 4%; bottom: 9%; rotate: -14deg; }
.s-slate { right: 3%; bottom: 3%; rotate: 1.5deg; }
/* crew call: stickers wait off to the side until the visitor scrolls (index.html) */
.stickers .sticker { transition: opacity .9s ease, transform 1.2s cubic-bezier(.16, 1, .3, 1); }
.stickers .sticker.pending { opacity: 0; transform: translateX(var(--from, -180px)); pointer-events: none; }
.s-badge, .s-visor { --from: -200px; }
.s-slate { --from: 220px; }

/* ID badge */
.badge {
  width: 236px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 18px 30px -16px rgba(15, 22, 50, .35);
}
.badge-top { display: flex; gap: 12px; align-items: center; }
.avatar {
  position: relative; flex: none; width: 64px; height: 64px; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 30% 25%, #e3e9ff, #7f9bff 40%, var(--blue) 70%, var(--ink));
  display: grid; place-items: center; color: #fff; font-family: var(--display); font-weight: 400; font-synthesis: none; font-size: 20px;
  -webkit-text-stroke: .05em currentColor; /* faux-free bold, as on the logo */
}
.avatar::after {
  content: ""; position: absolute; left: 0; right: 0; height: 30%;
  background: linear-gradient(transparent, rgba(214, 255, 63, .75), transparent);
  animation: scan 2.6s ease-in-out infinite;
}
.badge .id { font-family: var(--mono); font-size: 10px; color: var(--muted); }
.badge .name { font-family: var(--primary); font-weight: 600; font-size: 13px; line-height: 1.25; margin: 2px 0; max-width: 12ch; } /* wraps "Lead Product / Designer" inside the badge */
.badge .role { font-family: var(--mono); font-size: 10px; line-height: 1.3; }
.xp { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.xp .bar { display: flex; gap: 3px; flex: 1; }
.xp .seg { flex: 1; height: 10px; background: #e7e9ee; border: 1px solid #cfd3db; }
.xp .seg.on { background: var(--blue); border-color: var(--blue-deep); }
.xp .lbl { font-family: var(--primary); font-weight: 600; font-size: 10px; white-space: nowrap; }

/* Robot */
.robot svg { width: 122px; height: 122px; display: block; filter: drop-shadow(6px 6px 0 rgba(12, 14, 19, .12)); }
.robot .blink { transform-box: fill-box; transform-origin: center; }
.robot .blink.closed { transform: scaleY(.15); }
.bubble {
  position: absolute; right: 100%; top: 6px; margin-right: 6px;
  background: var(--ink); color: #fff; font-family: var(--primary); font-weight: 600; font-size: 11px;
  padding: 7px 10px; width: max-content; max-width: 210px; line-height: 1.45; opacity: 0; transform: translateY(4px);
  transition: opacity .2s, transform .2s; pointer-events: none;
}
.bubble.show { opacity: 1; transform: none; }

/* VR visor */
.visor { position: relative; width: 196px; height: 124px; }
.visor .strap {
  position: absolute; left: -6%; right: -6%; top: 34%; height: 26px; border-radius: 13px;
  background: linear-gradient(#bfc4cd, #858b96);
}
.visor .shell {
  position: absolute; inset: 14% 4% 8% 4%; border-radius: 40px 40px 50px 50px;
  background: linear-gradient(160deg, #f6f7f9, #c2c7d0);
  box-shadow: inset 0 -6px 12px rgba(0, 0, 0, .14), 0 22px 30px -12px rgba(12, 14, 19, .4);
}
.visor .lens {
  position: absolute; inset: 24% 10% 18% 10%; border-radius: 28px 28px 38px 38px; overflow: hidden;
  background: linear-gradient(115deg, #0d1030 0%, var(--blue) 30%, #9b7bff 50%, #ff9bd2 68%, var(--lime) 88%, #0d1030 100%);
  background-size: 220% 100%; animation: shimmer 6s ease-in-out infinite alternate;
}
.visor .lens::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(255, 255, 255, .55) 0 18%, transparent 30%);
}

/* Data slate (the "sticky note") */
.slate { position: relative; }
.note {
  display: block; width: 300px; padding: 26px 22px 18px; border: 0; cursor: inherit; text-align: left;
  background: var(--lime); box-shadow: 0 22px 30px -14px rgba(12, 14, 19, .35);
  background-image: repeating-linear-gradient(0deg, rgba(12, 14, 19, .045) 0 1px, transparent 1px 4px);
}
.note .head { font-family: var(--primary); font-weight: 600; font-size: 11px; display: flex; justify-content: space-between; }
.note .typed, .note .foot { display: block; }
.note .typed { font-family: var(--mono); font-size: 14px; line-height: 1.55; margin: 12px 0 14px; min-height: 6.2em; }
.note .caret, .caret { display: inline-block; width: .55em; height: 1.05em; background: var(--ink); vertical-align: -2px; animation: blink 1s steps(1) infinite; }
.note .foot { font-family: var(--mono); font-size: 10px; opacity: .7; }
.comm {
  position: absolute; right: 18px; top: -30px; width: 58px; height: 58px; padding: 0;
  border: 0; background: none; cursor: pointer;
}
.comm svg { width: 100%; height: 100%; filter: drop-shadow(4px 4px 0 rgba(12, 14, 19, .15)); }
.comm::before, .comm::after {
  content: ""; position: absolute; inset: 4px; border: 2px solid var(--blue); border-radius: 50%;
  opacity: 0; animation: ping 2.4s ease-out infinite;
}
.comm::after { animation-delay: 1.2s; }

/* Pixel sprites (drawn into <svg data-px> by site.js) */
.px { display: block; shape-rendering: crispEdges; filter: drop-shadow(4px 4px 0 rgba(12, 14, 19, .12)); }
.px.swap { animation: px-swap .45s cubic-bezier(.34, 1.56, .64, 1); }
/* mug steam: each grey pixel rises in whole-pixel steps, drifts and fades, then loops */
.px .steam rect { opacity: .75; animation: steam 2.2s steps(5, end) infinite; }

/* Idle micro-animations for every sticker emoji (chip icons keep their hover-only moves).
   Stepped timing keeps them feeling like pixel art; :not(.swap) lets the click-swap pop play first. */
.sticker .px:not(.swap) { transform-origin: 50% 60%; }
.sticker .px rect { transform-box: fill-box; transform-origin: center; }
/* heart: a double heartbeat */
.sticker .px[data-px="heart"]:not(.swap) { animation: px-beat 1.8s ease-in-out infinite; }
/* shades: cool head-bob, and the lens glints flash left → right */
.sticker .px[data-px="shades"]:not(.swap) { animation: px-bob 1.4s steps(1) infinite; }
.sticker .px[data-px="shades"] .c-w { animation: px-glint 2.8s steps(1) infinite; }
.sticker .px[data-px="shades"] .c-w + .c-w, .sticker .px[data-px="shades"] .c-w ~ .c-w { animation-delay: .18s; }
/* heart-eyes: love-struck sway, eyes throb */
.sticker .px[data-px="face-hearts"]:not(.swap) { animation: px-sway 1.6s steps(2) infinite; }
.sticker .px[data-px="face-hearts"] .c-p { animation: px-throb .8s steps(2) infinite; }
/* wink: a quick cheeky nod every couple of seconds */
.sticker .px[data-px="face-wink"]:not(.swap) { animation: px-nod 2.2s cubic-bezier(.34, 1.56, .64, 1) infinite; }
/* star-eyes: the stars twinkle, the face hops */
.sticker .px[data-px="face-stars"]:not(.swap) { animation: px-hop 1.2s steps(2) infinite; }
.sticker .px[data-px="face-stars"] .c-o { animation: px-twinkle-dot 1s steps(1) infinite; }
.sticker .px[data-px="face-stars"] .c-o:nth-of-type(odd) { animation-delay: .5s; }
/* sweat: nervous jitter, the drop slides down and drips off */
.sticker .px[data-px="face-sweat"]:not(.swap) { animation: px-jitter .5s steps(2) infinite; }
.sticker .px[data-px="face-sweat"] .c-b { animation: px-drip 1.6s steps(4) infinite; }
/* star: wobbles and shines */
.sticker .px[data-px="star"]:not(.swap) { animation: px-wobble 1.4s steps(3) infinite alternate; }
/* bolt: neon flicker with a jolt */
.sticker .px[data-px="bolt"]:not(.swap) { animation: px-flicker 2.4s steps(1) infinite; }
/* sparkle: turns and pulses */
.sticker .px[data-px="sparkle"]:not(.swap) { animation: px-spark 1.6s steps(4) infinite; }
/* cursor: keeps clicking */
.sticker .px[data-px="cursor"]:not(.swap) { animation: px-click 1.4s ease-in-out infinite; transform-origin: 20% 20%; }
@keyframes px-beat { 0%, 45%, 100% { transform: scale(1); } 12% { transform: scale(1.14); } 22% { transform: scale(.98); } 32% { transform: scale(1.08); } }
@keyframes px-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px) rotate(-3deg); } }
@keyframes px-glint { 0%, 62%, 100% { opacity: 1; } 64%, 70% { opacity: 0; } 72% { opacity: 1; } 74% { opacity: 0; } 78% { opacity: 1; } }
@keyframes px-sway { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
@keyframes px-throb { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.35); } }
@keyframes px-nod { 0%, 60%, 100% { transform: none; } 70% { transform: rotate(-12deg) translateY(-3px); } 82% { transform: rotate(4deg); } }
@keyframes px-hop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes px-twinkle-dot { 0%, 100% { opacity: 1; } 50% { opacity: .2; } }
@keyframes px-jitter { 0%, 100% { transform: translateX(-1px); } 50% { transform: translateX(1px); } }
@keyframes px-drip { 0% { transform: translateY(0); opacity: 1; } 75% { opacity: 1; } 100% { transform: translateY(4px); opacity: 0; } }
@keyframes px-wobble { from { transform: rotate(-10deg) scale(.96); } to { transform: rotate(10deg) scale(1.06); } }
@keyframes px-flicker { 0%, 100% { opacity: 1; transform: none; } 8% { opacity: .35; } 10% { opacity: 1; transform: translate(1px, -1px); } 12% { opacity: .5; } 14% { opacity: 1; transform: none; } 60% { opacity: 1; } 62% { opacity: .4; } 64% { opacity: 1; } }
@keyframes px-spark { 0% { transform: rotate(0) scale(1); } 50% { transform: rotate(45deg) scale(1.2); } 100% { transform: rotate(90deg) scale(1); } }
@keyframes px-click { 0%, 55%, 100% { transform: translate(0, 0) scale(1); } 68% { transform: translate(4px, 4px) scale(.86); } 78% { transform: translate(0, 0) scale(1.04); } }

/* ---------- Status bar (page footer) ---------- */
.status {
  position: relative; z-index: 2; display: flex; justify-content: space-between; gap: 16px;
  margin: 0 var(--gutter); padding: 16px 0 22px; border-top: 1px dashed var(--line);
  font-family: var(--mono); font-size: 11px; color: var(--muted);
}
.status .online::before {
  content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; vertical-align: 0;
  background: var(--lime); border: 1.5px solid var(--ink); animation: segpulse 1.6s ease-in-out infinite;
}

/* ---------- Sections (shared building blocks) ---------- */
.section {
  position: relative; padding: clamp(88px, 11vw, 140px) var(--gutter);
  scroll-margin-top: 40px;
}
.section + .section::after, .intro + .section::after {
  content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter);
  border-top: 1px dashed var(--line);
}
.wrap { position: relative; z-index: 1; max-width: 1160px; margin: 0 auto; }
.section-head { text-align: center; margin: 0 auto 72px; max-width: 760px; }
.kicker { font-family: var(--mono); font-size: 12px; color: var(--blue); letter-spacing: .04em; margin: 0; }
.section-title {
  font-family: var(--display); font-weight: 400; font-synthesis: none;
  font-size: clamp(30px, 5.2vw, 66px); line-height: 1.04; letter-spacing: -.045em;
  margin: 16px 0 0;
}
.section-title .accent { color: var(--blue); }
.lede { font-size: 17px; line-height: 1.7; color: var(--body-ink); margin: 20px auto 0; max-width: 620px; }

/* Scroll-in reveal (site.js adds .in) */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- About ---------- */
.about-stage { position: relative; width: min(100%, 820px); margin: 0 auto; }
/* the photo card sits inside the Module Lead box, beside the bio */
/* the photo card breaks out of the box: past its right edge and up over the title bar */
.pc-slot { position: relative; z-index: 2; translate: 76px -86px; rotate: 3deg; }
.pc-slot .profile-card { width: 100%; }
/* inner tile only: strip the component's outer frame (padding, glass, footer) */
.pc-slot .profile-card__body {
  padding: 0; background: none; border-radius: var(--pc-radius);
  -webkit-backdrop-filter: none; backdrop-filter: none;
  box-shadow: 0 34px 50px -24px rgba(12, 14, 19, .6), 0 0 0 1px rgba(12, 14, 19, .06);
}
.profile { background: #fff; box-shadow: 0 30px 60px -36px rgba(15, 22, 50, .35); }
.profile-bar {
  background: var(--ink); color: #fff; text-align: center; padding: 18px 24px;
  font-family: var(--display); font-weight: 400; font-synthesis: none; font-size: clamp(12px, 1.5vw, 16px); letter-spacing: .02em;
}
.profile-bar sup { font-size: .6em; }
.profile-body { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 40px; align-items: center; padding: 40px; }
.profile-copy {
  margin: 0; font-family: var(--mono); font-size: 21px; line-height: 1.8; text-transform: uppercase; /* sized to match the photo card's height */
  color: var(--ink); cursor: crosshair;
}
.profile-copy p { margin: 0; }
.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;
}
.profile-copy .hi { color: var(--blue); }
.pc-slot .tag {
  position: absolute; left: -18px; top: 26px; rotate: -8deg; z-index: 4;
  font-family: var(--mono); font-size: 10px; background: var(--lime); border: 1.5px solid var(--ink); padding: 4px 8px;
}
.about-stage .s-heart { right: -60px; top: -34px; rotate: 12deg; z-index: 3; } /* perched on the card's corner */
.about-stage .s-shades { left: -30px; top: 62%; rotate: -10deg; z-index: 3; }
.about-stage .s-mug { right: -96px; bottom: -40px; rotate: 6deg; }
.about-stage .s-memo { left: -110px; top: -70px; rotate: -7deg; z-index: 3; }
.memo {
  display: block; width: 150px; padding: 18px 16px; background: var(--lime);
  background-image: repeating-linear-gradient(0deg, rgba(12, 14, 19, .045) 0 1px, transparent 1px 4px);
  font-family: var(--mono); font-size: 12px; line-height: 1.5; text-transform: uppercase;
  box-shadow: 0 18px 26px -14px rgba(12, 14, 19, .35);
}
.memo b { color: var(--blue-deep); font-weight: 700; }

/* 3 × 2 grid of equal columns (as wide as the widest chip), shrink-wrapped and centred; 2 columns on phones */
.chips {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  width: max-content; max-width: 100%; margin: 80px auto 0; /* breathing room under the profile box */ padding: 0; list-style: none;
}
@media (max-width: 640px) { .chips { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; } }
.chips li {
  position: relative;
  font-family: var(--mono); font-size: 12px; padding: 11px 16px 11px 11px; background: #fff; border: 1px solid var(--line);
  display: inline-flex; align-items: center; gap: 8px; cursor: default;
  transition: border-color .2s ease, transform .25s cubic-bezier(.34, 1.56, .64, 1), box-shadow .25s ease,
    translate .4s cubic-bezier(.2, .7, .2, 1);
}
/* like the contact buttons: Figma-style corner handles appear on hover; the chip drifts toward the pointer */
.chips li .h {
  position: absolute; width: 8px; height: 8px; background: #fff; border: 1px solid var(--blue);
  opacity: 0; transition: opacity .2s ease;
}
.chips li .h1 { left: -4px; top: -4px; } .chips li .h2 { right: -4px; top: -4px; }
.chips li .h3 { left: -4px; bottom: -4px; } .chips li .h4 { right: -4px; bottom: -4px; }
.chips li:hover .h { opacity: 1; }
.chips li:hover { border-color: var(--blue); transform: translateY(-2px); box-shadow: 0 10px 18px -12px rgba(46, 91, 255, .5); }
/* fixed icon slot: the square bullet shrinks away and a pixel icon pops in, so nothing shifts */
.chips .ico { position: relative; width: 18px; height: 18px; flex: none; }
.chips .ico::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px;
  background: var(--blue); transition: transform .2s ease;
}
/* every chip gets its own bullet colour from the pixel-sprite palette — six chips, six colours */
.chips .ico::before { background: var(--dot, var(--blue)); }
.chips .chip-ux { --dot: var(--lime); }
.chips .chip-proto { --dot: #ff8a1f; }
.chips .chip-anim { --dot: #ff9bd2; }
.chips .chip-research { --dot: #ffd23f; }
.chips .chip-ds { --dot: var(--ink); }
.chips :is(.chip-ux, .chip-proto, .chip-anim, .chip-research) .ico::before { outline: 1px solid var(--ink); }
.chips .ico svg {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%; filter: none; overflow: visible;
  opacity: 0; scale: .3; transition: opacity .2s ease, scale .35s cubic-bezier(.34, 1.56, .64, 1);
}
.chips li:hover .ico::before { transform: scale(0); }
.chips li:hover .ico svg { opacity: 1; scale: 1; }
/* per-skill motion, running while hovered */
.chip-ai:hover svg { animation: twinkle 1.4s ease-in-out infinite; }
.chip-ux:hover svg { animation: click .9s ease-in-out infinite; }
.chip-proto:hover svg { animation: nudge .8s ease-in-out infinite; }
.chip-anim:hover svg { animation: bounce .7s cubic-bezier(.33, 0, .67, 1) infinite; transform-origin: 50% 100%; }
.chip-research:hover svg { animation: sweep-glass 1.2s ease-in-out infinite alternate; transform-origin: 40% 40%; }
.chip-ds:hover svg rect { animation: assemble 1.8s ease-in-out infinite both; }
.chip-ds:hover svg rect[fill="#ffd23f"] { animation-delay: .15s; }
.chip-ds:hover svg rect[fill="#0c0e13"] { animation-delay: .3s; }
.chip-ds:hover svg rect[fill="#ff9bd2"] { animation-delay: .45s; }

.teams { width: min(100%, 680px); margin: 64px auto 0; background: #fff; } /* its own beat after the skills */
.teams .label { position: absolute; left: 12px; top: -9px; padding: 0 6px; background: var(--paper); font-family: var(--mono); font-size: 10px; color: var(--muted); }
.teams ul { list-style: none; margin: 0; padding: 38px 32px; display: flex; justify-content: space-around; align-items: center; gap: 18px; flex-wrap: wrap; }
/* infinite carousel: site.js wraps the list in .marquee > .marquee-track and repeats it; the track slides
   by exactly half its width, so the second half lands where the first began and the loop never seams */
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: marquee var(--marquee-dur, 30s) linear infinite; }
.marquee-track ul { flex: none; flex-wrap: nowrap; justify-content: flex-start; gap: 80px; padding: 38px 40px; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
/* logos: solid ink at rest, brand colour on hover */
.logo-item { display: flex; align-items: center; cursor: default; transition: transform .25s cubic-bezier(.34, 1.56, .64, 1); }
.logo-item:hover { transform: translateY(-2px); }
.logo-aspire img { height: 36px; width: auto; filter: grayscale(1) brightness(0); transition: filter .35s ease; }
.logo-aspire:hover img { filter: none; }
.logo-softspell svg { height: 30px; width: auto; display: block; }
.logo-softspell svg :is(path, polygon) { fill: var(--ink); transition: fill .35s ease; }
.logo-softspell:hover .ss-teal { fill: #1abcbc; }
.logo-softspell:hover .ss-gold { fill: #f5b71a; }
.logo-softspell:hover .ss-grey { fill: #4d4d4e; }
.logo-freelance {
  font-family: var(--display); font-weight: 400; font-synthesis: none; font-size: 12px; line-height: 1.25; letter-spacing: .02em;
  border: 2px solid var(--ink); padding: 5px 9px; color: var(--ink);
  transition: background-color .35s ease, border-color .35s ease, color .35s ease, transform .25s cubic-bezier(.34, 1.56, .64, 1);
}
.logo-freelance:hover { background: var(--lime); border-color: var(--blue); color: var(--blue-deep); }


/* ---------- ProfileCard — vanilla port of React Bits <ProfileCard> (dark theme + dark foil) ---------- */
.profile-card {
  --pc-frame: rgba(38, 35, 46, 0.66);
  --pc-frame-edge: rgba(255, 255, 255, 0.08);
  --pc-frame-highlight: rgba(255, 255, 255, 0.07);
  --pc-frame-shadow: 0 22px 44px -20px rgba(0, 0, 0, 0.8), 0 6px 16px -8px rgba(0, 0, 0, 0.5);
  --pc-tile: linear-gradient(180deg, #3a3644 0%, #27242f 100%);
  --pc-tile-edge: rgba(255, 255, 255, 0.07);
  --pc-tile-highlight: rgba(255, 255, 255, 0.12);
  --pc-tile-shadow: 0 4px 10px -4px rgba(0, 0, 0, 0.7);
  --pc-ink: #f4f4f5;
  --pc-muted: rgba(244, 244, 245, 0.6);
  --pc-hover: brightness(1.12);
  --pc-press: brightness(0.8);
  --pc-shade: rgba(0, 0, 0, 0.4);
  --pc-blend: color-dodge;
  --pc-holo-filter: hue-rotate(0deg);
  --pc-sheen: rgba(255, 255, 255, 0.16);
  --pc-grain: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27500%27%20height%3D%27500%27%3E%3Cfilter%20id%3D%27g%27%20x%3D%270%27%20y%3D%270%27%20width%3D%27100%25%27%20height%3D%27100%25%27%20color-interpolation-filters%3D%27sRGB%27%3E%3CfeTurbulence%20type%3D%27fractalNoise%27%20baseFrequency%3D%270.85%27%20numOctaves%3D%272%27%20stitchTiles%3D%27stitch%27%2F%3E%3CfeColorMatrix%20values%3D%270.55%200%200%200%20-0.24%200.55%200%200%200%20-0.24%200.55%200%200%200%20-0.24%200%200%200%200%201%27%2F%3E%3C%2Ffilter%3E%3Crect%20width%3D%27100%25%27%20height%3D%27100%25%27%20filter%3D%27url%28%23g%29%27%2F%3E%3C%2Fsvg%3E");
  --pc-backdrop: var(--pc-tile);
  --pc-radius: 16px;
  --pc-holo: 0.8;
  --pc-glare: 0.5;
  --pc-parallax: 8px;
  --pc-status: var(--lime);
  --pc-pattern: url("img/br-pattern.svg");
  --pc-pattern-size: 180% auto;
  --pc-holo-gain: 1.25;
  --pc-holo-detail: 1;
  font-family: var(--primary);
}
.profile-card {
  --pc-light-x: 50%;
  --pc-light-y: 50%;
  --pc-pointer-x: 50%;
  --pc-pointer-y: 50%;
  --pc-band-x: 50%;
  --pc-band-y: 50%;
  --pc-reach: 0;
  --pc-rotate-x: 0deg;
  --pc-rotate-y: 0deg;
  --pc-shift-x: 0px;
  --pc-shift-y: 0px;
  --pc-tilt: 0;
  --pc-active: 0;
  position: relative;
  width: 340px;
  max-width: 100%;
  perspective: 1000px;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
}

.profile-card__body {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  border-radius: calc(var(--pc-radius) + 10px);
  background: var(--pc-frame);
  box-shadow: var(--pc-frame-shadow);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  backdrop-filter: blur(20px) saturate(1.6);
  transform: rotateX(var(--pc-rotate-x)) rotateY(var(--pc-rotate-y));
  will-change: transform;
}

.profile-card__tile {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--pc-radius);
  background: var(--pc-backdrop);
  box-shadow: var(--pc-tile-shadow);
  overflow: hidden;
  isolation: isolate;
}

.profile-card__sheen,
.profile-card__holo,
.profile-card__scrim,
.profile-card__tile-rim,
.profile-card__glare,
.profile-card__shade,
.profile-card__rim {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.profile-card__sheen {
  background: radial-gradient(
    farthest-corner circle at calc(var(--pc-light-x) - 10px) calc(var(--pc-light-y) - 10px),
    var(--pc-sheen) 0%,
    transparent 55%
  );
  opacity: calc(var(--pc-holo) * var(--pc-active));
}

.profile-card__holo {
  --pc-spectrum: repeating-linear-gradient(
    0deg,
    hsl(2, 100%, 73%) 5%,
    hsl(53, 100%, 69%) 10%,
    hsl(93, 100%, 69%) 15%,
    hsl(176, 100%, 76%) 20%,
    hsl(228, 100%, 74%) 25%,
    hsl(260, 100%, 76%) 30%,
    hsl(2, 100%, 73%) 35%
  );
  --pc-bars: repeating-linear-gradient(
    -45deg,
    #0e152e 0%,
    hsl(180, 10%, 60%) 3.8%,
    hsl(180, 29%, 66%) 4.5%,
    hsl(180, 10%, 60%) 5.2%,
    #0e152e 10%,
    #0e152e 12%
  );
  --pc-falloff: radial-gradient(
    farthest-corner circle at var(--pc-pointer-x) var(--pc-pointer-y),
    hsla(0, 0%, 0%, 0.1) 12%,
    hsla(0, 0%, 0%, 0.15) 20%,
    hsla(0, 0%, 0%, 0.25) 120%
  );
  background-image: var(--pc-spectrum), var(--pc-bars), var(--pc-falloff);
  background-position:
    0 var(--pc-band-y),
    var(--pc-band-x) var(--pc-band-y),
    center;
  background-size:
    500% 500%,
    300% 300%,
    200% 200%;
  background-blend-mode: color, hard-light;
  mix-blend-mode: var(--pc-blend);
  filter: brightness(calc(0.66 + 0.19 * var(--pc-active))) contrast(calc(1.33 + 0.17 * var(--pc-active)))
    saturate(calc(0.33 + 0.17 * var(--pc-active))) var(--pc-holo-filter);
  opacity: calc(var(--pc-holo) * var(--pc-holo-gain) * (0.5 + 0.5 * var(--pc-active)));
  -webkit-mask-image: var(--pc-pattern);
  -webkit-mask-size: var(--pc-pattern-size);
  -webkit-mask-position: calc(50% - var(--pc-shift-x) * 1.5) calc(65% - var(--pc-shift-y) * 1.5);
  -webkit-mask-repeat: repeat;
  mask-image: var(--pc-pattern);
  mask-size: var(--pc-pattern-size);
  mask-position: calc(50% - var(--pc-shift-x) * 1.5) calc(65% - var(--pc-shift-y) * 1.5);
  mask-repeat: repeat;
}

.profile-card__holo-glow,
.profile-card__holo-shift {
  position: absolute;
  inset: 0;
  opacity: calc(var(--pc-active) * var(--pc-holo-detail));
}

.profile-card__holo-glow {
  background-image:
    linear-gradient(
      45deg,
      hsl(176, 100%, 76%),
      hsl(228, 100%, 74%),
      hsl(260, 100%, 76%),
      hsl(2, 100%, 73%),
      hsl(53, 100%, 69%),
      hsl(93, 100%, 69%)
    ),
    radial-gradient(circle at var(--pc-pointer-x) var(--pc-pointer-y), hsl(0, 0%, 70%) 0%, hsla(0, 0%, 30%, 0.2) 90%),
    var(--pc-grain);
  background-size:
    250% 250%,
    100% 100%,
    220px 220px;
  background-position:
    var(--pc-pointer-x) var(--pc-pointer-y),
    center,
    0 0;
  background-blend-mode: color-dodge;
  filter: brightness(calc(2 - var(--pc-reach))) contrast(calc(var(--pc-reach) + 2))
    saturate(calc(0.5 + var(--pc-reach)));
  mix-blend-mode: luminosity;
}

.profile-card__holo-shift {
  background-image: var(--pc-spectrum), var(--pc-bars), var(--pc-falloff);
  background-position:
    0 var(--pc-band-y),
    calc(var(--pc-band-x) * 0.4) calc(var(--pc-band-y) * 0.5),
    center;
  background-size:
    200% 300%,
    700% 700%,
    100% 100%;
  background-blend-mode: color, hard-light;
  mix-blend-mode: difference;
  filter: brightness(0.8) contrast(1.5);
}

.profile-card__photo {
  position: absolute;
  inset: calc(var(--pc-parallax) * -1);
  width: calc(100% + var(--pc-parallax) * 2);
  height: calc(100% + var(--pc-parallax) * 2);
  object-fit: cover;
  object-position: center bottom;
  transform: translate3d(var(--pc-shift-x), var(--pc-shift-y), 0);
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.profile-card__scrim {
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.6) 0%,
    rgba(0, 0, 0, 0.57) 6%,
    rgba(0, 0, 0, 0.5) 12%,
    rgba(0, 0, 0, 0.4) 19%,
    rgba(0, 0, 0, 0.28) 26%,
    rgba(0, 0, 0, 0.16) 33%,
    rgba(0, 0, 0, 0.07) 40%,
    rgba(0, 0, 0, 0.02) 46%,
    rgba(0, 0, 0, 0) 52%
  );
}

.profile-card__info {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  color: #ffffff;
}

.profile-card__name {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: inherit;
}

.profile-card__title {
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.78);
}

.profile-card__tile-rim {
  box-shadow:
    inset 0 0 0 1px var(--pc-tile-edge),
    inset 0 1px 0 var(--pc-tile-highlight);
}

.profile-card__footer {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 6px 20px 8px;
}

.profile-card__avatar {
  position: relative;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--pc-tile);
  overflow: hidden;
}

.profile-card__avatar::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--pc-tile-edge);
}

.profile-card__avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.profile-card__meta {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.profile-card__handle {
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--pc-ink);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.profile-card__status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  line-height: 1.25;
  color: var(--pc-muted);
  white-space: nowrap;
}

.profile-card__status::before {
  content: '';
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pc-status);
}

.profile-card__contact {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
  height: 36px;
  padding: 0 14px;
  border: none;
  border-radius: calc(var(--pc-radius) * 0.75);
  background: var(--pc-tile);
  box-shadow:
    inset 0 0 0 1px var(--pc-tile-edge),
    inset 0 1px 0 var(--pc-tile-highlight),
    var(--pc-tile-shadow);
  color: var(--pc-ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition:
    filter 0.2s ease,
    transform 0.2s ease;
}

.profile-card__contact:active {
  filter: var(--pc-press);
  transform: scale(0.96);
  transition-duration: 0s;
}

.profile-card__contact:focus-visible {
  outline: 2px solid var(--pc-ink);
  outline-offset: 2px;
}

.profile-card__glare {
  background: radial-gradient(
    farthest-corner circle at var(--pc-light-x) var(--pc-light-y),
    rgba(255, 255, 255, 0.8) 0%,
    rgba(255, 255, 255, 0.36) 20%,
    rgba(255, 255, 255, 0) 60%
  );
  mix-blend-mode: overlay;
  opacity: calc(var(--pc-glare) * var(--pc-active));
}

.profile-card__shade {
  background: radial-gradient(
    farthest-corner circle at var(--pc-light-x) var(--pc-light-y),
    transparent 30%,
    var(--pc-shade) 100%
  );
  opacity: calc(var(--pc-glare) * var(--pc-tilt));
}

.profile-card__rim {
  box-shadow:
    inset 0 0 0 1px var(--pc-frame-edge),
    inset 0 1px 0 var(--pc-frame-highlight);
}

@media (hover: hover) {
  .profile-card__contact:hover {
    filter: var(--pc-hover);
  }

  .profile-card__contact:hover:active {
    filter: var(--pc-press);
  }
}

/* Photo overrides: the component expects a cut-out portrait with the foil showing around it.
   Ours is a full rectangle, so the foil sits on top and only wakes while the card is active,
   and the photo is blue-tinted monochrome at rest, full colour as the card lights up. */
.profile-card__photo {
  z-index: 1; object-position: center 22%;
  filter: grayscale(calc(1 - var(--pc-active))) contrast(calc(1.1 - 0.1 * var(--pc-active)));
}
.profile-card__tint {
  position: absolute; inset: 0; z-index: 2; border-radius: inherit; pointer-events: none;
  background: var(--blue); mix-blend-mode: color; opacity: calc(0.35 * (1 - var(--pc-active)));
}
.profile-card__holo { z-index: 3; opacity: calc(var(--pc-holo) * 0.45 * var(--pc-active)); }
.profile-card__sheen { z-index: 3; }
.profile-card__scrim { z-index: 4; }
.profile-card__info { z-index: 5; }
.profile-card__tile-rim { z-index: 6; }
.profile-card__name { font-family: var(--display); font-weight: 400; font-synthesis: none; font-size: 17px; letter-spacing: -.02em; -webkit-text-stroke: .03em currentColor; }
.profile-card__title { font-family: var(--mono); font-size: 12px; }
.profile-card__contact { text-decoration: none; }
.profile-card__contact svg { width: 16px; height: 16px; }

/* ---------- Process (sticky-note board) ---------- */
.board { position: relative; display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 40px 64px; } /* wide gaps give the connectors room */
.board .sticker { position: relative; z-index: 1; }
/* Flow: notes settle in one by one (site.js adds .flow-ready, then .in per card) */
.board.flow-ready .sticker {
  opacity: 0; translate: 0 34px; scale: .97;
  transition: opacity 1s ease, translate 1.3s cubic-bezier(.16, 1, .3, 1), scale 1.3s cubic-bezier(.16, 1, .3, 1);
}
.board.flow-ready .sticker.in { opacity: 1; translate: 0 0; scale: 1; }
/* Figma-style prototype connectors between the notes: dot → curve → open chevron */
.flow-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 0; }
.flow-link .wire {
  fill: none; stroke: var(--blue); stroke-width: 2; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; /* hidden outright: a round cap paints a dot even at zero length */
  transition: stroke-dashoffset 1s cubic-bezier(.65, 0, .35, 1), opacity .1s linear;
}
.flow-link .dot { fill: #fff; stroke: var(--blue); stroke-width: 2; opacity: 0; transition: opacity .35s ease; }
.flow-link .head {
  fill: none; stroke: var(--blue); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  opacity: 0; transition: opacity .3s ease .85s; /* lands as the line finishes drawing */
}
.flow-link.on .wire { stroke-dashoffset: 0; opacity: 1; }
.flow-link.on .dot, .flow-link.on .head { opacity: 1; }
.board .sticker:nth-child(even) { margin-top: 46px; }
.pnote {
  display: block; width: 236px; min-height: 260px; padding: 24px 22px;
  box-shadow: 0 24px 34px -18px rgba(12, 14, 19, .35);
  rotate: var(--r, 0deg);
}
.pnote .num { font-family: var(--mono); font-size: 11px; display: flex; justify-content: space-between; align-items: center; }
.pnote h3 { font-family: var(--primary); font-weight: 700; font-size: 21px; letter-spacing: -.01em; margin: 18px 0 10px; }
.pnote p { font-size: 14px; line-height: 1.6; margin: 0; }
.pnote .px { margin-top: 18px; }
.pnote.paper { background: #fffdf3; border: 1px solid #ebe6cf; }
.pnote.lime { background: var(--lime); background-image: repeating-linear-gradient(0deg, rgba(12, 14, 19, .045) 0 1px, transparent 1px 4px); }
.pnote.white { background: #fff; border: 1px solid var(--line); }
.pnote.blue { background: var(--blue); color: #fff; }
.pnote.blue .num { color: #cdd8ff; }
.todo { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 12px; font-family: var(--mono); font-size: 13px; }
.todo li { position: relative; display: flex; gap: 10px; align-items: baseline; white-space: nowrap; }
.todo li::before { content: "[ ]"; color: var(--muted); white-space: pre; }
/* done: a blue × drops into the box and a blue line strikes through the text */
.todo li.done::after { content: "x"; position: absolute; left: 1ch; top: 0; color: var(--blue); font-weight: 700; }
.todo li.done .t {
  color: var(--muted);
  background: linear-gradient(var(--blue), var(--blue)) 0 58% / 100% 2px no-repeat;
}
/* during the flow intro the list ticks off item by item once the card has settled */
.todo li:nth-child(1) { --tick: .35s; }
.todo li:nth-child(2) { --tick: .6s; }
.todo li:nth-child(3) { --tick: .85s; }
.board.flow-ready .todo li.done::after { opacity: 0; transform: scale(1.8); transition: opacity .2s ease var(--tick), transform .3s cubic-bezier(.34, 1.56, .64, 1) var(--tick); }
.board.flow-ready .todo li.done .t { background-size: 0% 2px; color: var(--ink); transition: background-size .45s ease var(--tick), color .4s ease var(--tick); }
.board.flow-ready .sticker.in .todo li.done::after { opacity: 1; transform: none; }
.board.flow-ready .sticker.in .todo li.done .t { background-size: 100% 2px; color: var(--muted); }
.board-hint { text-align: center; margin-top: 56px; }

/* ---------- Work (folder cards) ---------- */
.projects { display: grid; gap: 72px; }
.project {
  position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  min-height: 440px; color: inherit; text-decoration: none; border: 0;
  transition: transform .45s cubic-bezier(.2, .7, .2, 1);
}
.project:nth-child(even) { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.project:nth-child(even) .panel { order: 2; }
.project .panel {
  position: relative; display: flex; flex-direction: column; padding: 40px 36px 34px;
  background: var(--panel); color: var(--panel-ink);
}
/* folder tab (simple fallback; on the home page site.js replaces it with a true folder outline) */
.project .panel::before {
  content: ""; position: absolute; left: 0; top: -26px; width: 46%; height: 27px;
  background: var(--panel); border-radius: 12px 12px 0 0;
}
/* Home work list: the panel grows upward by the tab's height and is clipped to the React Bits Folder
   outline (rounded corners + a tab with S-curve shoulders) — one continuous shape, drawn in site.js */
#work .project { --tab-h: 26px; --fold-r: 14px; }
#work .project .panel { margin-top: calc(var(--tab-h) * -1); padding-top: calc(40px + var(--tab-h)); }
#work .project .panel.folded::before { display: none; }
/* mission number lives in the tab; it rises into place as the card reveals */
#work .tab-label {
  position: absolute; top: 0; left: 0; height: var(--tab-h); z-index: 1;
  display: flex; align-items: center; justify-content: center; white-space: nowrap;
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em; color: var(--panel-ink); opacity: .85;
  transition: transform .8s cubic-bezier(.16, 1, .3, 1) .25s, opacity .6s ease .25s;
}
#work .project.reveal:not(.in) .tab-label { transform: translateY(70%); opacity: 0; }
/* Each mission loads in stages as it scrolls in: the folder rises, the screenshot wipes open from the
   folder's side while settling from a slight zoom, then the copy follows line by line.
   (The card itself stays put — its own transition is kept for the hover lift.) */
#work .project.reveal:not(.in) { opacity: 1; transform: none; }
#work .project .panel { transition: transform 1s cubic-bezier(.16, 1, .3, 1), opacity .7s ease; }
#work .project:not(.in) .panel { transform: translateY(40px); opacity: 0; }
#work .project .shot { clip-path: inset(0); transition: clip-path 1.2s cubic-bezier(.65, 0, .35, 1) .2s; }
#work .project:not(.in) .shot { clip-path: inset(0 100% 0 0); }
#work .project:nth-child(even):not(.in) .shot { clip-path: inset(0 0 0 100%); }
#work .project .shot img { transition: transform 1.4s cubic-bezier(.16, 1, .3, 1) .2s; }
#work .project:hover .shot img { transition-delay: 0s; }
#work .project:not(.in) .shot img { transform: scale(1.15); }
#work .project .panel > :is(.meta-row, h3, p, .open) { transition: transform .8s cubic-bezier(.16, 1, .3, 1), opacity .6s ease; }
#work .project:not(.in) .panel > :is(.meta-row, h3, p, .open) { transform: translateY(14px); opacity: 0; }
#work .project.in .panel > .meta-row { transition-delay: .35s; }
#work .project.in .panel > h3 { transition-delay: .45s; }
#work .project.in .panel > p { transition-delay: .55s; }
#work .project.in .panel > .open { transition-delay: .7s; }
#work .project.in .panel > .open svg { transition-delay: 0s; }
/* hover outline traces the folder (tab + rounded corners) instead of a rectangle */
#work .project::after { display: none; }
#work .fold-outline { position: absolute; left: 0; top: calc(var(--tab-h) * -1); overflow: visible; pointer-events: none; z-index: 3; }
#work .fold-outline path { fill: none; stroke: var(--blue); stroke-width: 1.5; opacity: 0; transition: opacity .2s ease; }
#work .project:hover .fold-outline path, #work .project:focus-visible .fold-outline path { opacity: 1; }
#work .project .h1, #work .project .h2 { top: calc(-5px - var(--tab-h)); }
#work .project .shot { border-radius: 0 var(--fold-r) var(--fold-r) 0; }
#work .project:nth-child(even) .shot { border-radius: var(--fold-r) 0 0 var(--fold-r); }
.project.ink { --panel: var(--ink); --panel-ink: #fff; }
.project.blue { --panel: var(--blue); --panel-ink: #fff; }
.project.lime { --panel: var(--lime); --panel-ink: var(--ink); }
.project .no { font-family: var(--mono); font-size: 12px; opacity: .7; display: flex; justify-content: space-between; }
.project .tags { display: flex; gap: 8px; margin: 22px 0 0; flex-wrap: wrap; }
/* tags and timeline share one row */
.project .meta-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.project .meta-row .tags { margin: 0; }
.project .meta-row .when { font-family: var(--mono); font-size: 12px; opacity: .7; white-space: nowrap; }
.project .tags span {
  font-family: var(--mono); font-size: 11px; padding: 5px 9px; background: #fff; color: var(--ink);
  border: 1px solid var(--ink); rotate: -2deg;
}
.project .tags span:nth-child(2) { background: var(--lime); rotate: 2deg; }
.project.lime .tags span:nth-child(2) { background: var(--ink); color: var(--lime); }
.project h3 {
  font-family: var(--display); font-weight: 400; font-synthesis: none;
  font-size: clamp(26px, 3.3vw, 44px); line-height: 1.02; letter-spacing: -.045em; margin: 28px 0 14px;
}
.project p { font-family: var(--mono); font-size: 13px; line-height: 1.65; margin: 0; opacity: .85; max-width: 34ch; }
.project .open { margin-top: auto; padding-top: 28px; font-family: var(--primary); font-weight: 600; font-size: 13px; letter-spacing: .04em; display: inline-flex; gap: 10px; align-items: center; }
.project .open svg { width: 16px; height: 16px; transition: transform .3s; }
.project .shot { position: relative; overflow: hidden; background: #0c0e13; }
.project .shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.project .h { position: absolute; width: 9px; height: 9px; background: #fff; border: 1px solid var(--blue); opacity: 0; transition: opacity .2s; z-index: 2; }
.project .h1 { left: -5px; top: -5px; } .project .h2 { right: -5px; top: -5px; }
.project .h3 { left: -5px; bottom: -5px; } .project .h4 { right: -5px; bottom: -5px; }
.project::after {
  content: ""; position: absolute; inset: -1px; border: 1px solid var(--blue); opacity: 0; transition: opacity .2s; pointer-events: none;
}
.project .dims {
  position: absolute; left: 50%; bottom: -26px; transform: translateX(-50%); z-index: 2;
  background: var(--blue); color: #fff; font-family: var(--mono); font-size: 10px; padding: 2px 6px; border-radius: 3px;
  opacity: 0; transition: opacity .2s;
}
.project:hover, .project:focus-visible { transform: translateY(-6px); }
.project:hover::after, .project:hover .h, .project:hover .dims,
.project:focus-visible::after, .project:focus-visible .h, .project:focus-visible .dims { opacity: 1; }
.project:hover .shot img { transform: scale(1.04); }
.project:hover .open svg { transform: translateX(4px); }
.project:focus-visible { outline: none; }

/* ---------- Journey ---------- */
.journey { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: start; }
.story p { font-size: 17px; line-height: 1.75; color: var(--body-ink); margin: 0 0 20px; }
.story .sign { display: flex; align-items: center; gap: 14px; margin-top: 30px; }
.story .sign .avatar { width: 52px; height: 52px; font-size: 16px; }
/* photo avatar: the face fills the circle, with a thin ring and a softer scan line than the lettermark's */
.avatar.photo { background: var(--ink); box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--line); }
.avatar.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.photo::after { opacity: .45; }
.story .sign b { display: block; font-weight: 600; font-size: 15px; }
.story .sign small { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.timeline { position: relative; list-style: none; margin: 0; padding: 4px 0 0 36px; display: grid; gap: 22px; margin-left: 8px; }
/* the rail is its own layer so it can draw downward (clip, not scale — scaling would stretch the dashes) */
.timeline::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; border-left: 2px dashed var(--line);
  clip-path: inset(0 0 100% 0); transition: clip-path 1.6s cubic-bezier(.65, 0, .35, 1) .1s;
}
.timeline.in::before { clip-path: inset(0); }
.timeline li {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px;
  box-shadow: 0 18px 30px -22px rgba(15, 22, 50, .35);
}
.timeline li::before {
  content: ""; position: absolute; left: -43px; top: 26px; width: 14px; height: 14px;
  background: #fff; border: 2px solid var(--ink);
}
.timeline li.now::before { background: var(--lime); animation: segpulse 1.6s ease-in-out infinite; }
.timeline .yrs { font-family: var(--mono); font-size: 11px; color: var(--blue); display: flex; justify-content: space-between; align-items: center; }
.timeline .live { font-family: var(--mono); font-size: 10px; background: var(--lime); color: var(--ink); border: 1px solid var(--ink); padding: 1px 6px; }
.timeline .role { font-weight: 600; font-size: 18px; margin: 10px 0 4px; }
.timeline .org { font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* Journey loads in sequence instead of in two blocks: the story rises a paragraph at a time, the
   rail draws down, and each stop lands as the rail reaches it — marker pops, card slides in, LIVE flickers on */
.journey .reveal { opacity: 1; transform: none; } /* the children carry the entrance */
#journey { overflow-x: clip; } /* cards waiting to slide in sit past the edge on phones — don't let them widen the page */
.story > * {
  opacity: 0; transform: translateY(18px); filter: blur(6px);
  transition: opacity .8s ease, transform .9s cubic-bezier(.2, .7, .2, 1), filter .8s ease;
}
.story.in > * { opacity: 1; transform: none; filter: none; }
.story.in > :nth-child(2) { transition-delay: .3s; }
.story.in > :nth-child(3) { transition-delay: .6s; }
.story.in > :nth-child(4) { transition-delay: .85s; }
/* résumé link under the signature — the arrow nudges forward on hover */
.story .cta.resume { margin-top: 28px; padding: 13px 22px; font-size: 13px; }
.story .cta.resume:hover svg { transform: translateX(3px); }
.timeline li { opacity: 0; transform: translateX(28px); transition: opacity .7s ease, transform .9s cubic-bezier(.2, .7, .2, 1); }
.timeline li::before { transform: scale(0); transition: transform .5s cubic-bezier(.34, 1.56, .64, 1); }
.timeline.in li { opacity: 1; transform: none; }
.timeline.in li::before { transform: none; }
.timeline.in li:nth-child(1) { transition-delay: .2s; }
.timeline.in li:nth-child(2) { transition-delay: .7s; }
.timeline.in li:nth-child(3) { transition-delay: 1.2s; }
.timeline.in li:nth-child(1)::before { transition-delay: .15s; }
.timeline.in li:nth-child(2)::before { transition-delay: .65s; }
.timeline.in li:nth-child(3)::before { transition-delay: 1.15s; }
.timeline:not(.in) .live { opacity: 0; }
.timeline.in .live { animation: liveon .7s steps(1) both; }
.timeline.in li:nth-child(1) .live { animation-delay: .9s; }
.timeline.in li:nth-child(2) .live { animation-delay: 1.4s; }
@keyframes liveon { 0% { opacity: 0; } 20% { opacity: 1; } 35% { opacity: 0; } 55% { opacity: 1; } 70% { opacity: .3; } 85%, 100% { opacity: 1; } }

/* ---------- Contact ---------- */
.contact { text-align: center; overflow: hidden; overflow: clip; }
.bigword {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 0;
  font-family: var(--display); font-weight: 400; font-synthesis: none; white-space: nowrap;
  font-size: clamp(90px, 21vw, 330px); letter-spacing: -.07em; line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px #dde2ec; pointer-events: none; user-select: none;
}
.contact .section-title { font-size: clamp(40px, 7vw, 96px); }
.contact .lede { max-width: 520px; }
/* equal-width buttons: a shrink-wrapped grid of 1fr columns makes every column as wide as the widest button */
.contact-actions {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 22px;
  width: max-content; max-width: 100%; margin: 44px auto 0;
}
.contact-actions .cta { justify-content: center; }
@media (max-width: 640px) { .contact-actions { grid-auto-flow: row; width: min(100%, 340px); } }
.socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 40px 0 0; padding: 0; list-style: none; }
.socials a {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px; background: #fff;
  border: 1px solid var(--line); font-family: var(--mono); font-size: 12px; color: var(--ink); text-decoration: none;
  transition: border-color .2s, transform .2s;
}
.socials a:hover { border-color: var(--blue); transform: translateY(-2px); }
/* brand icons: ink at rest, brand colour on hover (as the team logos), each with its own little move */
.socials svg { width: 14px; height: 14px; flex: none; transition: color .3s ease, transform .5s cubic-bezier(.34, 1.56, .64, 1); }
.socials .so-linkedin:hover svg { color: #0a66c2; transform: scale(1.15); }
.socials .so-dribbble:hover svg { color: #ea4c89; transform: rotate(360deg); } /* the ball spins */
.socials .so-instagram:hover svg { color: #e4405f; transform: rotate(-12deg) scale(1.12); }
/* IxDF: the official tree mark (a touch larger so the branches read); it grows like it's sprouting */
.socials .so-ixdf img { width: 18px; height: 18px; flex: none; margin: -2px 0; transition: transform .5s cubic-bezier(.34, 1.56, .64, 1); }
.socials .so-ixdf:hover img { transform: scale(1.18) rotate(-8deg); }
.contact .sticker { z-index: 2; }
.contact .s-clip { right: 6%; top: 16%; rotate: 7deg; }
.contact .s-cheart { left: 9%; top: 24%; rotate: -10deg; }

/* ---- Contact: interactive bits ---- */
/* HELLO letters lean toward the cursor: site.js sets --p (0 far → 1 under the pointer) on each one */
.bigword span {
  display: inline-block; --p: 0;
  transform: translateY(calc(var(--p) * -18px)) rotate(calc(var(--p) * -3deg));
  color: color-mix(in srgb, var(--lime) calc(var(--p) * 55%), transparent);
  -webkit-text-stroke-color: color-mix(in srgb, var(--blue) calc(var(--p) * 100%), #dde2ec);
  transition: transform .35s cubic-bezier(.2, .7, .2, 1), color .35s ease, -webkit-text-stroke-color .35s ease,
    translate 1.1s cubic-bezier(.16, 1, .3, 1), opacity .8s ease;
}
.avail {
  display: inline-flex; align-items: center; gap: 8px; margin: 22px 0 0; padding: 6px 12px;
  font-family: var(--mono); font-size: 11px; color: var(--muted); border: 1px dashed var(--line); background: #fff;
}
.avail i { position: relative; width: 7px; height: 7px; background: var(--lime); border: 1px solid var(--ink); }
.avail i::after { content: ""; position: absolute; inset: -1px; border: 1px solid var(--lime); animation: ping 1.6s ease-out infinite; }
/* CTAs drift toward the pointer (site.js sets translate) */
.contact .cta { transition: border-color .2s, background-color .2s, translate .4s cubic-bezier(.2, .7, .2, 1); }
/* email: opens a Gmail compose window; small letters, arrow points out of the page */
.cta.mail { text-transform: none; letter-spacing: .02em; font-size: 15px; }
.cta.mail:hover svg { transform: translate(2px, -2px); }
/* Figma-style W × H badge under each contact button (filled by the [data-dims] measurer in site.js) */
.contact .cta .size-badge { font-weight: 400; letter-spacing: 0; text-transform: none; white-space: nowrap; }
.contact .cta:hover .size-badge, .contact .cta:focus-visible .size-badge { opacity: 1; }

/* ---- Contact: lazy entrance — runs once the copy scrolls in ---- */
.contact .wrap.reveal { opacity: 1; transform: none; }
.contact .wrap > *, .socials li {
  transition: opacity .7s ease, transform .9s cubic-bezier(.16, 1, .3, 1);
}
.contact .wrap:not(.in) > *, .contact .wrap:not(.in) .socials li { opacity: 0; transform: translateY(22px); }
.contact .wrap.in > :nth-child(2) { transition-delay: .1s; }
.contact .wrap.in > :nth-child(3) { transition-delay: .2s; }
.contact .wrap.in > :nth-child(4) { transition-delay: .3s; }
.contact .wrap.in > :nth-child(5) { transition-delay: .4s; }
.contact .wrap.in .socials li { transition-delay: calc(.55s + var(--n, 0) * .07s); }
.contact .wrap.in .socials li:nth-child(2) { --n: 1; }
.contact .wrap.in .socials li:nth-child(3) { --n: 2; }
.contact .wrap.in .socials li:nth-child(4) { --n: 3; }
.contact:not(:has(.wrap.in)) .bigword span { translate: 0 80px; opacity: 0; }
.contact:has(.wrap.in) .bigword span { transition-delay: 0s, 0s, 0s, calc(var(--i) * .09s), calc(var(--i) * .09s); }
.contact .sticker { transition: opacity .9s ease .5s, translate 1.2s cubic-bezier(.16, 1, .3, 1) .5s; }
.contact:not(:has(.wrap.in)) .s-cheart { opacity: 0; translate: -160px 0; }
.contact:not(:has(.wrap.in)) .s-clip { opacity: 0; translate: 0 -120px; }
.clipnote {
  display: block; position: relative; width: 190px; padding: 30px 18px 20px; background: #fff; text-align: left;
  font-family: var(--mono); font-size: 12px; line-height: 1.6; text-transform: uppercase;
  box-shadow: 0 22px 30px -16px rgba(12, 14, 19, .35);
}
/* gem paperclip over the top edge: the svg's y = 14 sits exactly on the paper's edge (14 × 1.1 scale ≈ 15.4px) */
.clipnote .paperclip {
  position: absolute; top: -15.4px; left: 24px; color: var(--blue); overflow: visible;
  filter: drop-shadow(1px 1.5px 0 rgba(12, 14, 19, .14));
}

/* ---------- Case study pages ---------- */
.case-hero { position: relative; padding: 140px var(--gutter) 64px; overflow: hidden; overflow: clip; }
.back { font-family: var(--mono); font-size: 12px; color: var(--ink); text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.back:hover { color: var(--blue); }
.case-kicker { margin-top: 40px; }
.case-title {
  font-family: var(--display); font-weight: 400; font-synthesis: none;
  font-size: clamp(42px, 8.4vw, 120px); line-height: .98; letter-spacing: -.055em; margin: 18px 0 0;
}
.case-summary { font-size: clamp(17px, 1.8vw, 21px); line-height: 1.6; color: var(--body-ink); max-width: 720px; margin: 26px 0 0; }
.case-summary mark { background: var(--lime); color: var(--ink); padding: 0 4px; }
.case-tags { display: flex; gap: 8px; margin-top: 26px; flex-wrap: wrap; }
.case-tags span { font-family: var(--mono); font-size: 11px; padding: 5px 9px; background: #fff; border: 1px solid var(--ink); }
.case-tags span:nth-child(2) { background: var(--lime); }
.case-actions { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 36px; }
.meta-wrap { margin-top: 56px; background: #fff; }
.meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin: 0; }
.meta > div { padding: 18px 22px; border-right: 1px dashed var(--line); }
.meta > div:last-of-type { border-right: 0; }
.meta dt { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.meta dd { margin: 6px 0 0; font-weight: 600; font-size: 15px; line-height: 1.45; }
.shots { display: grid; gap: 48px; }
.shots .row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
figure.shotframe { margin: 0; }
.shotframe .frame { background: #0c0e13; }
.shotframe img { width: 100%; height: auto; }
.shotframe .fname {
  position: absolute; left: -1px; top: -22px; font-family: var(--mono); font-size: 10px; color: var(--blue);
}
.shotframe figcaption { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 12px; display: flex; justify-content: space-between; }
.more .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px 32px; }
.more .project, .more .project:nth-child(even) { grid-template-columns: 1fr; min-height: 0; }
.more .project:nth-child(even) .panel { order: 0; }
.more .project .shot { aspect-ratio: 16 / 10; order: -1; }
.more .project .panel::before { display: none; }
.more .project .shot::before { content: ""; }

/* ---------- 404 ---------- */
.nf {
  position: relative; min-height: 100vh; min-height: 100svh; display: grid; place-items: center;
  text-align: center; padding: 100px var(--gutter) 60px; overflow: hidden; overflow: clip;
}
.nf-code {
  font-family: var(--display); font-weight: 400; font-synthesis: none; margin: 0;
  font-size: clamp(110px, 22vw, 290px); line-height: 1; letter-spacing: -.07em;
}
.nf-code .core { width: .74em; height: .74em; margin: 0 .02em; vertical-align: -.02em; }
.nf p { font-family: var(--mono); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; margin: 26px 0 0; }
.nf .floater { position: absolute; animation: drift 7s ease-in-out infinite alternate; }
.nf .f1 { left: 12%; top: 22%; rotate: -12deg; }
.nf .f2 { right: 10%; bottom: 16%; rotate: 9deg; animation-delay: -3s; }
.nf .bubble { opacity: 1; transform: none; }
.nf .f1 .bubble { right: auto; left: 100%; margin: 0 0 0 6px; } /* left robot talks toward the centre */

/* ---------- Warp + arrival (full-screen launch overlay) ---------- */
#warp { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 50; pointer-events: none; }
#warp[hidden] { display: none; }
.arrival {
  position: fixed; inset: 0; z-index: 60; color: var(--ink);
  background:
    radial-gradient(circle at 18% 12%, rgba(205, 217, 255, .7), transparent 40%),
    radial-gradient(circle at 85% 88%, rgba(239, 255, 194, .8), transparent 38%),
    radial-gradient(rgba(12, 14, 19, .12) 1px, transparent 1.2px) 0 0 / 26px 26px,
    var(--paper);
  opacity: 0; transition: opacity .8s cubic-bezier(.4, 0, .2, 1); /* a slow cross-fade over the coasting warp */
}
.arrival[hidden] { display: none; }
.arrival.show { opacity: 1; }

/* Mini-game: pixel alien shooter */
#game { position: absolute; inset: 0; width: 100%; height: 100%; display: block; outline: none; touch-action: none; cursor: crosshair; }
.game-hud {
  position: absolute; top: 0; left: 0; right: 0; z-index: 2; pointer-events: none;
  display: flex; align-items: center; gap: 28px; padding: 16px var(--gutter);
  font-family: var(--mono); font-size: 12px; color: var(--muted);
}
.game-hud b { color: var(--ink); font-weight: 700; margin-left: 6px; }
.game-hud .lives { display: inline-flex; gap: 5px; }
.game-hud .lives i { width: 11px; height: 11px; background: var(--blue); border: 1.5px solid var(--ink); }
.game-hud .lives i.lost { background: transparent; border-color: var(--line); }
.game-hud .cta { margin-left: auto; pointer-events: auto; padding: 12px 20px; font-size: 12px; }
.game-msg {
  position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); z-index: 2; width: min(92vw, 640px);
  text-align: center; pointer-events: none; opacity: 0; transition: opacity .3s ease;
  padding: 30px 24px; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 84%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.game-msg:empty { display: none; }
.game-msg.show { opacity: 1; }
.game-msg .k { font-family: var(--mono); font-size: 12px; color: var(--blue); letter-spacing: .1em; margin: 0; }
.game-msg h2 {
  font-family: var(--display); font-weight: 400; font-synthesis: none; -webkit-text-stroke: .02em currentColor;
  font-size: clamp(28px, 5vw, 60px); line-height: 1.05; letter-spacing: -.045em; margin: 16px 0;
}
.game-msg .hint { font-family: var(--mono); font-size: 12px; color: var(--muted); margin: 0; }
.game-msg .go { font-family: var(--primary); font-weight: 600; font-size: 13px; letter-spacing: .06em; color: var(--blue); margin: 22px 0 0; animation: blink 1.1s steps(1) infinite; }

/* ---- Game screen loads in stages (after the warp) ----
   field first, then the HUD drops in item by item, then the title card rises and its lines follow.
   HUD + field use transitions keyed on .arrival.show, so they also leave in reverse on the way back;
   message lines use keyframes, so every new message (game over, next wave…) arrives the same way. */
#game { opacity: 0; transition: opacity .9s ease .15s; }
.arrival.show #game { opacity: 1; }
.game-hud > * { opacity: 0; transform: translateY(-14px); transition: opacity .5s ease, transform .7s cubic-bezier(.16, 1, .3, 1); }
.arrival.show .game-hud > * { opacity: 1; transform: none; }
.arrival.show .game-hud > :nth-child(1) { transition-delay: .35s; }
.arrival.show .game-hud > :nth-child(2) { transition-delay: .42s; }
.arrival.show .game-hud > :nth-child(3) { transition-delay: .49s; }
.arrival.show .game-hud > :nth-child(4) { transition-delay: .56s; }
.arrival.show .game-hud > :nth-child(5) { transition-delay: .66s; }
.arrival.show .game-msg.show { animation: msg-card .8s cubic-bezier(.16, 1, .3, 1) .45s both; }
.game-msg > * { animation: msg-line .7s cubic-bezier(.16, 1, .3, 1) both; animation-delay: calc(.6s + var(--n, 0) * .09s); }
.game-msg > :nth-child(2) { --n: 1; } .game-msg > :nth-child(3) { --n: 2; }
.game-msg > :nth-child(4) { --n: 3; } .game-msg > :nth-child(5) { --n: 4; }
.game-msg > .go { animation: msg-line .7s cubic-bezier(.16, 1, .3, 1) both, blink 1.1s steps(1) infinite; animation-delay: calc(.6s + var(--n, 0) * .09s), calc(1.4s + var(--n, 0) * .09s); }
@keyframes msg-card { from { opacity: 0; transform: translate(-50%, calc(-50% + 18px)) scale(.96); } to { opacity: 1; transform: translate(-50%, -50%); } }
@keyframes msg-line { from { opacity: 0; transform: translateY(12px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@media (max-width: 860px) {
  .game-hud { gap: 14px; flex-wrap: wrap; font-size: 11px; }
  .game-hud .cta { padding: 10px 14px; }
}
html.docked { overflow: hidden; }
html.crew-lock { overflow: hidden; } /* hero holds the page until the crew has arrived */
html { scrollbar-gutter: stable; } /* no layout jump when scrolling is locked */ /* the page underneath stays put while the overlay is up */

/* ---------- Smooth scrolling (Lenis 1.1.13 base styles) ---------- */
html.lenis, html.lenis body { height: auto; }
html.lenis { scroll-behavior: auto; } /* native smooth scrolling would double-animate Lenis's own */
.lenis.lenis-smooth { scroll-behavior: auto !important; } /* Lenis eases the scroll itself */
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-smooth iframe { pointer-events: none; }

/* ---------- Keyframes ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes ring1 { from { transform: rotateX(72deg) rotateZ(0); } to { transform: rotateX(72deg) rotateZ(360deg); } }
@keyframes ring2 { from { transform: rotateY(68deg) rotateZ(0); } to { transform: rotateY(68deg) rotateZ(-360deg); } }
@keyframes scan { 0% { top: -30%; } 100% { top: 100%; } }
@keyframes segpulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@keyframes shimmer { from { background-position: 0% 0; } to { background-position: 100% 0; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes ping { 0% { transform: scale(.7); opacity: .7; } 100% { transform: scale(1.6); opacity: 0; } }
@keyframes drift { from { translate: 0 0; } to { translate: 14px -22px; } }
@keyframes px-swap { 0% { transform: scale(.6) rotate(-12deg); } 60% { transform: scale(1.15) rotate(4deg); } 100% { transform: none; } }
@keyframes steam {
  0% { transform: translate(0, 1px); opacity: 0; }
  20% { opacity: .85; }
  60% { transform: translate(1px, -2px); opacity: .55; }
  100% { transform: translate(0, -4px); opacity: 0; }
}
@keyframes twinkle { 0%, 100% { transform: rotate(0) scale(1); } 50% { transform: rotate(90deg) scale(1.25); } }
@keyframes click { 0%, 55%, 100% { transform: translate(0, 0) scale(1); } 70% { transform: translate(2px, 2px) scale(.82); } }
@keyframes nudge { 0%, 100% { transform: translateX(-1px); opacity: 1; } 50% { transform: translateX(3px); opacity: .75; } }
@keyframes bounce {
  0%, 100% { transform: translateY(0) scale(1.18, .78); }
  15% { transform: translateY(-2px) scale(.92, 1.1); }
  50% { transform: translateY(-9px) scale(1, 1); }
  85% { transform: translateY(-2px) scale(.92, 1.1); }
}
@keyframes sweep-glass { from { transform: translateX(-2px) rotate(-14deg); } to { transform: translateX(2px) rotate(14deg); } }
@keyframes assemble { 0% { opacity: 0; } 18%, 80% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- Mid screens: pull side stickers in ---------- */
@media (max-width: 1240px) {
  .about-stage .s-mug, .about-stage .s-memo { display: none; }
}

/* ---------- Small screens ---------- */
@media (max-width: 860px) {
  :root { --gutter: 16px; }
  .fx .ascii { opacity: .28; }
  .intro { padding-top: 70px; padding-bottom: 16px; }
  .hero { min-height: 0; display: flex; flex-direction: column; align-items: center; padding: 48px 0 12px; }
  .stickers {
    position: static; display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
    gap: 28px 18px; margin-top: 44px; pointer-events: auto;
    width: auto; height: auto;
  }
  .stickers .sticker { position: relative; left: auto; right: auto; top: auto; bottom: auto; }
  .s-slate { order: 1; }
  .s-robot { order: -1; } /* the greeter comes first on phones */
  .bubble { right: auto; left: 50%; top: auto; bottom: 100%; margin: 0 0 8px; translate: -50% 0; }
  .note { width: min(300px, calc(100vw - 64px)); }
  .visor { transform: scale(.85); }
  .status { flex-direction: column; gap: 6px; }

  .section-head { margin-bottom: 48px; }
  .profile-body { grid-template-columns: 1fr; gap: 28px; padding: 28px 22px 32px; }
  .profile-copy { font-size: 15px; }
  .pc-slot { width: min(280px, 100%); justify-self: center; translate: none; rotate: none; }
  .about-stage .s-heart { right: -8px; top: 44px; }
  .about-stage .s-shades { display: none; } /* no free edge on a phone without covering text */
  .board .sticker:nth-child(even) { margin-top: 0; }
  .pnote { width: min(300px, calc(100vw - 48px)); min-height: 0; }
  .project, .project:nth-child(even) { grid-template-columns: 1fr; min-height: 0; }
  .project:nth-child(even) .panel { order: 0; }
  .project .shot { aspect-ratio: 16 / 10; }
  .project .panel { padding: 30px 24px 26px; }
  #work .project .panel { padding-top: calc(30px + var(--tab-h)); }
  #work .project .shot, #work .project:nth-child(even) .shot { border-radius: 0 0 var(--fold-r) var(--fold-r); }
  .journey { grid-template-columns: 1fr; gap: 48px; }
  .contact .sticker { display: none; }
  .case-hero { padding-top: 110px; }
  .shots .row, .more .projects { grid-template-columns: 1fr; }
  .meta > div { border-right: 0; border-bottom: 1px dashed var(--line); }
  .nf .f1 { left: 4%; top: 14%; } .nf .f2 { right: 4%; bottom: 10%; }
  .nf .robot svg { width: 84px; height: 84px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Menu: résumé stands out as plain blue link text (no fill) ---------- */
.menu a.menu-resume { color: var(--blue); font-weight: 700; }
.menu a.menu-resume span { color: var(--blue); opacity: .7; }
.menu a.menu-resume:hover { background: none; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Résumé page ---------- */
.cv-section { padding-top: 90px; padding-bottom: 90px; }
.cv-head { margin: 0 0 40px; }
.cv-title { font-family: var(--display); font-weight: 400; font-synthesis: none; font-size: clamp(30px, 4.4vw, 56px); letter-spacing: -.04em; line-height: 1.05; margin: 12px 0 0; }
.cv-title .accent { color: var(--blue); }
.case-summary b { color: var(--ink); }
.meta dd a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); }
.meta dd a:hover { color: var(--blue); border-color: var(--blue); }
.cv-jobs, .cv-edu { display: grid; gap: 18px; }
.cv-job {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 24px 28px 22px;
  box-shadow: 0 18px 30px -24px rgba(15, 22, 50, .35); transition: border-color .2s, transform .3s cubic-bezier(.2, .7, .2, 1);
}
.cv-job:hover { border-color: var(--blue); transform: translateY(-2px); }
.cv-job header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 20px; }
.cv-job h3 { margin: 0; font-size: 18px; font-weight: 500; line-height: 1.4; }
.cv-job h3 b { font-weight: 700; }
.cv-job h3 span { color: var(--muted); margin: 0 4px; }
.cv-when { margin: 0; font-family: var(--mono); font-size: 11px; color: var(--blue); letter-spacing: .02em; display: inline-flex; align-items: center; gap: 10px; }
.cv-when .live { font-size: 10px; background: var(--lime); color: var(--ink); border: 1px solid var(--ink); padding: 1px 6px; }
.cv-job ul { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.cv-job li { position: relative; padding-left: 20px; font-size: 15px; line-height: 1.6; color: var(--body-ink); }
.cv-job li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 7px; height: 7px; background: var(--blue); }
.cv-job > p { margin: 12px 0 0; font-size: 15px; line-height: 1.6; color: var(--body-ink); }
.cv-job ul.cv-certs { display: flex; flex-wrap: wrap; gap: 8px; }
.cv-job ul.cv-certs li, .cv-skill li, .cv-tools li {
  padding: 6px 11px; font-family: var(--mono); font-size: 12px; line-height: 1.4; color: var(--ink);
  background: #fff; border: 1px solid var(--line);
}
.cv-job ul.cv-certs li::before { display: none; }
.cv-link { display: inline-block; margin-top: 14px; font-family: var(--mono); font-size: 12px; color: var(--blue); text-decoration: none; }
.cv-link:hover { text-decoration: underline; }
.cv-skills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.cv-skill { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 22px 24px; }
.cv-skill h3, .cv-tools h3 { margin: 0 0 14px; font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; display: flex; align-items: center; gap: 10px; }
.cv-skill h3::before { content: ""; width: 10px; height: 10px; border: 1px solid var(--ink); background: var(--k, var(--blue)); }
.cv-skill.k-ai { --k: var(--blue); } .cv-skill.k-ds { --k: var(--lime); } .cv-skill.k-pr { --k: #ff9bd2; } .cv-skill.k-co { --k: var(--ink); }
.cv-skill ul, .cv-tools ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.cv-skill li { transition: border-color .2s, transform .2s; }
.cv-skill li:hover, .cv-tools li:hover { border-color: var(--blue); transform: translateY(-2px); }
.cv-tools { margin-top: 28px; }
.cv-tools li { transition: border-color .2s, transform .2s; }
@media (max-width: 860px) {
  .cv-skills { grid-template-columns: 1fr; }
  .cv-job { padding: 20px 20px 18px; }
  .cv-section { padding-top: 64px; padding-bottom: 64px; }
}

/* ---------- Rotating word (About heading): letters roll out on a 3D flip, the next word rolls in ---------- */
.rotator {
  display: inline-grid; vertical-align: bottom; white-space: nowrap; perspective: 700px;
  transition: width .6s cubic-bezier(.65, 0, .35, 1);
}
.rot-word { grid-area: 1 / 1; justify-self: start; }
.rot-ch {
  display: inline-block; transform-origin: 50% 50% -.45em; backface-visibility: hidden;
  transform: rotateX(-95deg); opacity: 0;
  transition: transform .6s cubic-bezier(.2, .7, .2, 1) calc(var(--k) * 35ms), opacity .35s ease calc(var(--k) * 35ms);
}
.rot-word.is-in .rot-ch { transform: none; opacity: 1; }
.rot-word.is-out .rot-ch { transform: rotateX(95deg); opacity: 0; }
