:root {
  --bg: #f7f6f2;
  --paper: #ffffff;
  --ink: #121212;
  --muted: #8b8a85;
  --soft: #55544f;
  --line: #e2e0d9;
  --art: #c9c7bf;          /* hairline colour of the hero illustrations */
  --sk: #dedcd5;           /* lo-fi skeleton fill */
  --sk-line: #c4c2ba;      /* lo-fi skeleton outline */
  --accent: #18181b;       /* brand: black (lines, text accents) */
  /* brand surface, same recipe as the AF logo */
  --brand-grad: linear-gradient(180deg, #262629 0%, #18181b 100%);
  --brand-edge: #000;
  --brand-glow: inset 0 1px 1px rgba(255,255,255,.32), inset 0 -1px 1px rgba(255,255,255,.32);
  --select: #2f6bff;       /* Figma-style selection colour used on link hover */
  --foot: #141413;
  --sans: "Manrope", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --gutter: clamp(16px, 3vw, 28px);
  --ease: cubic-bezier(.2,.8,.2,1);
  --ease-io: cubic-bezier(.76,0,.24,1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f0e;
    --paper: #1a1a19;
    --ink: #f2f1ec;
    --muted: #74736e;
    --soft: #a9a8a2;
    --line: #262624;
    --art: #3b3a37;
    --sk: #232321;
    --sk-line: #34332f;
    --foot: #070707;
    --accent: #e9e8e3;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  overflow-x: hidden;
}
.mono { font-family: var(--mono); }
a { color: inherit; text-decoration: none; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 14px; }
.brand__mark {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  color: var(--bg);
  background: var(--ink);
  transition: transform .5s var(--ease), background .3s, border-radius .4s var(--ease);
}
.brand:hover .brand__mark { transform: rotate(-90deg); border-radius: 50%; background: var(--accent); }

.topbar__right { display: flex; align-items: center; gap: 16px; }

.status { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--soft); }
.status__dot { position: relative; width: 7px; height: 7px; border-radius: 50%; background: #22c55e; }
.status__dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #22c55e;
  animation: ping 2s ease-out infinite;
}
@keyframes ping { to { transform: scale(2.8); opacity: 0; } }

.meta { font-size: 11px; color: var(--soft); }
.divider { width: 1px; height: 18px; background: var(--line); }
.toplink { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--soft); transition: color .2s; }
.toplink:hover { color: var(--ink); }
.dotted { border-bottom: 1px dashed currentColor; padding-bottom: 1px; }

/* ---------- Sheet ---------- */
.sheet {
  position: relative;
  margin: 0 auto;
  max-width: 1440px;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.ruler {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 22px;
  padding: 0 var(--gutter);
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
  border-bottom: 1px dashed var(--line);
}
.ruler__ticks {
  flex: 1;
  height: 6px;
  background-image:
    repeating-linear-gradient(90deg, var(--muted) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 8px);
  opacity: .8;
}

/* ---------- Hero band: sheet in the middle, illustrations in the outer gutters ---------- */
.hero-band { position: relative; }

.side {
  position: absolute;
  top: 0;
  bottom: 0;
  width: calc((100% - min(1440px, 100% - 2 * var(--gut, 0px))) / 2);
  display: none;
  flex-direction: column;
  overflow: hidden;
  background-image: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: 16px 16px;
}
.side--left { left: 0; align-items: flex-end; }   /* anchored to the sheet border */
.side--right { right: 0; align-items: flex-start; }
/* boards never shrink below 300px; extra width is cropped at the screen edge, not the border */
.side svg { flex: none; width: max(100%, 300px); height: auto; }

/* On every desktop width the sheet leaves a gutter on both sides,
   so the illustrations always have room outside the border. */
@media (min-width: 1200px) {
  .hero-band { --gut: clamp(120px, 12vw, 260px); }
  .hero-band > .sheet { max-width: min(1440px, calc(100% - 2 * var(--gut))); }
  .side { display: flex; }
}

/* Keep the boards quiet: one faint hairline tone, no dark or coloured fills,
   fading out toward the screen edge and the bottom of the hero. */
/* subtle but readable in both themes (contrast tuned against --bg) */
.side { --art: #c4c1b7; opacity: .9; }
@media (prefers-color-scheme: dark) { .side { --art: #4a4944; } }
.side--left  { -webkit-mask-image: linear-gradient(to left, #000 55%, rgba(0,0,0,.25) 100%); mask-image: linear-gradient(to left, #000 55%, rgba(0,0,0,.25) 100%); }
.side--right { -webkit-mask-image: linear-gradient(to right, #000 55%, rgba(0,0,0,.25) 100%); mask-image: linear-gradient(to right, #000 55%, rgba(0,0,0,.25) 100%); }
.side .fill-ink, .side .fill-accent, .side .fill-select { fill: none !important; stroke: var(--art) !important; }
.side circle.fill-ink, .side circle.fill-accent { fill: var(--art) !important; stroke: none !important; } /* small dots stay dots */
.side .stroke-ink, .side .stroke-accent { stroke: var(--art) !important; }
.side .fill-bg { fill: var(--bg) !important; }
.side svg text { fill: var(--art) !important; }
.side svg text.on-ink, .side svg text.t-btn { fill: var(--bg) !important; }
.side .sig { stroke: var(--accent) !important; opacity: .35; stroke-width: 1.2 !important; }

.side svg {
  overflow: visible;
  fill: none;
  stroke: var(--art);
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.side svg text {
  fill: var(--muted);
  stroke: none;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .08em;
}
.side .fill-ink { fill: var(--ink); stroke: none; }
.side .fill-art { fill: var(--art); stroke: none; }
.side .fill-bg { fill: var(--bg); }
.side .fill-accent { fill: var(--accent); stroke: none; }
.side .stroke-accent { stroke: var(--accent); }
.side .stroke-ink { stroke: var(--ink); }
.side text.on-ink { fill: var(--bg); font-size: 22px; font-weight: 500; letter-spacing: 0; }
.side text.ring { font-size: 7.5px; letter-spacing: .32em; fill: var(--soft); }

.side .fill-select { fill: var(--select); stroke: none; }
.side .stroke-bg { stroke: var(--bg); }
.side text.t-spec { font-family: var(--sans); font-size: 150px; font-weight: 800; letter-spacing: -0.06em; fill: var(--art); }
.side text.t-btn { font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: 0; fill: var(--bg); }
.side text.t-btn-o { font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: 0; fill: var(--ink); }
.side text.t-md { font-size: 10px; letter-spacing: .02em; fill: var(--soft); }
.side text.t-sm { font-size: 8px; letter-spacing: 0; fill: var(--soft); }
.side text.t-accent { fill: var(--accent); }

.side .toggle-knob { animation: toggle 3.2s var(--ease-io) infinite; }
@keyframes toggle { 0%, 40% { transform: none; } 50%, 90% { transform: translateX(30px); } }
.side .ring-anim { stroke-dasharray: 163.4; animation: ring 6s var(--ease-io) infinite; }
@keyframes ring { 0% { stroke-dashoffset: 163.4; } 55%, 100% { stroke-dashoffset: 46; } }

/* signal pulses travelling along the traces */
.side .sig {
  stroke: var(--accent);
  stroke-width: 1.6;
  stroke-dasharray: 10 420;
  animation: sig 4.2s linear infinite;
}
.side .sig:nth-of-type(2n) { animation-duration: 5.6s; animation-delay: -1.8s; }
.side .sig:nth-of-type(3n) { animation-duration: 3.6s; animation-delay: -2.6s; }
@keyframes sig { from { stroke-dashoffset: 430; } to { stroke-dashoffset: 0; } }

.side .knob-dial { transform-box: fill-box; transform-origin: center; animation: dial 9s var(--ease-io) infinite; }
@keyframes dial { 0%, 100% { transform: rotate(-40deg); } 50% { transform: rotate(70deg); } }
.side .slide { animation: slide 6s var(--ease-io) infinite; }
.side .slide.s2 { animation-delay: -2s; }
.side .slide.s3 { animation-delay: -4s; }
@keyframes slide { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-46px); } }
.side .blink { animation: blink 1.6s steps(2, jump-none) infinite; }
@keyframes blink { 50% { opacity: .15; } }
.side .cursor-move { animation: cursorMove 7s var(--ease-io) infinite; }
@keyframes cursorMove { 0%, 100% { transform: translate(0, 0); } 45% { transform: translate(-46px, -20px); } 70% { transform: translate(-20px, 10px); } }

/* Hero fills the first screen (below the 56px top bar); its content sits in the middle */
.hero-band > .sheet {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 56px);
  min-height: calc(100svh - 56px);
}
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-self: flex-start;
  padding: clamp(40px, 7vh, 96px) clamp(24px, 6vw, 96px);
  max-width: 600px;
  box-sizing: content-box;
}
.hero__hello { font-size: 15px; font-weight: 500; margin-bottom: 4px; color: var(--soft); }

.hero__name {
  font-size: clamp(40px, 7.5vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 800;
  cursor: default;
}
.hero__name .first, .hero__name .last { display: inline-block; white-space: nowrap; }
.hero__name .last { font-weight: 300; color: var(--muted); }
.hero__name .ch { display: inline-block; font-weight: var(--w, inherit); transition: font-weight .25s var(--ease), color .25s; }
.hero__name .last .ch.is-hot { color: var(--ink); }

.hero__role { color: var(--muted); font-size: 15px; margin-top: 10px; }

.hero__bio { margin-top: 30px; }
.hero__bio p { font-size: 16.5px; line-height: 1.65; color: var(--soft); margin-bottom: 14px; }

/* Link hover: a Figma-style selection box with corner handles */
.ink { position: relative; color: var(--ink); font-weight: 600; white-space: nowrap; transition: color .2s; }
.ink::after {
  content: "";
  position: absolute;
  inset: -2px -4px;
  border: 1px solid var(--select);
  background: color-mix(in srgb, var(--select) 8%, transparent);
  opacity: 0;
  transform: scale(1.15);
  transition: opacity .18s, transform .3s var(--ease);
  pointer-events: none;
}
.ink::before {
  content: "";
  position: absolute;
  inset: -4.5px -6.5px;
  background:
    linear-gradient(var(--select), var(--select)) left top / 6px 6px,
    linear-gradient(var(--select), var(--select)) right top / 6px 6px,
    linear-gradient(var(--select), var(--select)) left bottom / 6px 6px,
    linear-gradient(var(--select), var(--select)) right bottom / 6px 6px;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.15);
  transition: opacity .18s, transform .3s var(--ease);
  pointer-events: none;
  z-index: 1;
}
.ink:hover { color: var(--select); }
.ink:hover::after, .ink:hover::before { opacity: 1; transform: none; }

.coord { position: relative; cursor: help; color: var(--ink); }
.coord::after {
  content: attr(data-coord);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translate(-50%, 4px);
  padding: 4px 8px;
  font-family: var(--mono);
  font-size: 10px;
  white-space: nowrap;
  color: var(--bg);
  background: var(--ink);
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.coord:hover::after { opacity: 1; transform: translate(-50%, 0); }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 30px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.stats > div { padding: 14px 12px 14px 0; }
.stats > div + div { padding-left: 14px; border-left: 1px dashed var(--line); }
.stats dt { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.stats dd { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; margin-top: 4px; }

.quote { margin-top: 26px; padding-left: 16px; border-left: 2px solid var(--accent); }
.quote p { font-size: 17px; font-weight: 500; letter-spacing: -0.01em; }
.quote cite { display: block; margin-top: 6px; font-size: 10.5px; font-style: normal; color: var(--muted); }

/* ---------- Work: full-bleed 3 × 3 ---------- */
.work { border-top: 1px solid var(--line); scroll-margin-top: 56px; }

.work__head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 28px var(--gutter) 22px;
}
.work__head h2 { font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -0.035em; font-weight: 700; }
.work__head p { font-size: 11px; color: var(--muted); }
.work__count {
  margin-left: auto;
  font-size: 11px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--soft);
}

.work__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  border-top: 1px solid var(--line);
}

.tile {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  isolation: isolate;
  background: var(--paper);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: opacity .5s var(--ease), filter .5s var(--ease);
}
.tile:nth-child(3n) { border-right: 0; }

.tile__media {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: var(--paper);
  transition: transform 1.1s var(--ease);
}

.tile__no {
  position: absolute;
  top: 14px;
  left: 14px;
  font-size: 10.5px;
  padding: 3px 8px;
  border-radius: 99px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 0 0 1px var(--line);
  transition: background .3s, color .3s;
}

/* info bar that rises from the bottom edge on hover */
.tile__info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  background: var(--paper);
  border-top: 1px solid var(--line);
  transform: translateY(101%);
  transition: transform .55s var(--ease);
}
.tile__text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tile__text b {
  font-size: 16px;
  letter-spacing: -0.015em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transform: translateY(8px);
  opacity: 0;
  transition: transform .55s var(--ease) .06s, opacity .4s .06s;
}
.tile__text i {
  font-style: normal;
  font-size: 10.5px;
  color: var(--muted);
  transform: translateY(8px);
  opacity: 0;
  transition: transform .55s var(--ease) .12s, opacity .4s .12s;
}
.tile__go {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 15px;
  color: #fff;
  background: var(--ink);
  transform: rotate(-45deg) scale(.6);
  opacity: 0;
  transition: transform .5s var(--ease) .1s, opacity .3s .1s, background .3s;
}

.tile:hover .tile__media { transform: scale(1.045); }
.tile:hover .tile__info { transform: none; }
.tile:hover .tile__text b, .tile:hover .tile__text i { transform: none; opacity: 1; }
.tile:hover .tile__go { transform: none; opacity: 1; background: var(--accent); }
.tile:hover .tile__no { background: var(--ink); color: var(--bg); }

/* the rest of the grid steps back while one tile is in focus */
.work__grid:has(.tile:hover) .tile:not(:hover) { opacity: .45; filter: grayscale(1) contrast(.9); }

/* follow cursor shown over tiles */
.cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  margin: -43px 0 0 -43px;
  border-radius: 50%;
  font-size: 11px;
  color: #fff;
  background: var(--accent);
  pointer-events: none;
  transform: translate3d(var(--cx, -200px), var(--cy, -200px), 0) scale(0);
  transition: transform .35s var(--ease);
  will-change: transform;
}
.cursor.is-on { transform: translate3d(var(--cx), var(--cy), 0) scale(1); transition: transform .12s linear; }

@media (hover: hover) and (pointer: fine) {
  .tile { cursor: none; }
}

/* touch: info always visible */
@media (hover: none) {
  .tile__info { transform: none; }
  .tile__text b, .tile__text i, .tile__go { transform: none; opacity: 1; }
}

/* ---------- Footer reveal (parallax) ----------
   The page sits above the footer; as it scrolls away the footer is
   uncovered and its content rises and settles (--reveal: 0 → 1). */
main {
  position: relative;
  z-index: 1;
  background: var(--bg);
  box-shadow: 0 30px 50px -20px rgba(0,0,0,.35);
}
.foot.is-reveal { position: sticky; bottom: 0; z-index: 0; }


/* ---------- Footer ---------- */
.foot {
  position: relative;
  overflow: hidden;
  color: #f2f1ec;
  background: var(--foot);
  padding: clamp(36px, 5vw, 64px) var(--gutter) 0;
}
.foot::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 16px 16px;
  pointer-events: none;
}

.foot__top {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 24px;
}
.foot__meta { display: flex; flex-direction: column; gap: 6px; }
.foot__meta span { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: #8d8c86; }
.foot__meta b { font-size: 14px; font-weight: 600; }
.foot__meta--right { text-align: right; }

/* perforated work-order ticket */
.ticket {
  --notch: 10px;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 124px;
  width: min(540px, 92vw);
  padding: 0;
  color: #141413;
  background:
    radial-gradient(circle at 0 50%, transparent var(--notch), #fbfaf6 calc(var(--notch) + .5px)) left / 51% 100% no-repeat,
    radial-gradient(circle at 100% 50%, transparent var(--notch), #fbfaf6 calc(var(--notch) + .5px)) right / 51% 100% no-repeat;
  border-radius: 6px;
  transform: rotate(-2deg);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.6);
  transition: transform .6s var(--ease);
}
.ticket:hover { transform: rotate(0deg) translateY(-4px); }

.ticket__head {
  display: flex;
  justify-content: space-between;
  padding-bottom: 12px;
  margin-bottom: 6px;
  font-size: 9.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #8b8a85;
  border-bottom: 1px dashed #cfcdc5;
}
.ticket__line {
  padding: 9px 0 7px;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.015em;
  border-bottom: 1px solid #e6e4dc;
}
.ticket__line a { color: var(--accent); font-weight: 700; white-space: nowrap; }
.ticket__line a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ticket__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  font-size: 10px;
  color: #8b8a85;
}
.ticket__barcode {
  width: 92px;
  height: 22px;
  background: repeating-linear-gradient(90deg, #141413 0 1px, transparent 1px 3px, #141413 3px 5px, transparent 5px 6px, #141413 6px 7px, transparent 7px 10px);
}
.foot__word {
  position: relative;
  margin-top: clamp(20px, 3vw, 36px);
  font-size: clamp(72px, 13vw, 200px);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: .78;
  text-align: center;
  color: transparent;
  background: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.02) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  user-select: none;
  white-space: nowrap;
}

.foot__base {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 0 22px;
  font-size: 10.5px;
  color: #8d8c86;
  border-top: 1px solid rgba(255,255,255,.1);
}

/* ---------- Intro: lo-fi wireframe → hi-fi ---------- */
html.is-intro, html.is-intro body { overflow: hidden; }
/* hide the page until the lo-fi layer is ready (prevents a flash) */
html.is-intro:not(.lofi-ready) .topbar,
html.is-intro:not(.lofi-ready) main,
html.is-intro:not(.lofi-ready) .foot { opacity: 0; }

.lofi { display: none; }
html.is-intro .lofi {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
}
.lofi__layer { position: absolute; inset: 0; }

.lofi-hide { opacity: 0 !important; filter: blur(10px) !important; transform: translateY(8px) !important; }
.lofi-anim { transition: opacity .8s var(--ease), filter .8s var(--ease), transform .8s var(--ease) !important; }

.sk {
  position: absolute;
  border-radius: 4px;
  background: var(--sk);
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform .55s var(--ease), opacity .45s ease, filter .45s ease;
}
.sk.is-on { transform: none; }
.sk.is-out { opacity: 0; filter: blur(6px); }
.sk--center { transform-origin: center; }

.sk--box {
  border-radius: 0;
  background: color-mix(in srgb, var(--sk) 55%, transparent);
  outline: 1.5px solid var(--sk-line);
  outline-offset: -1.5px;
  transform: scale(.96);
  opacity: 0;
  transition: transform .6s var(--ease), opacity .45s ease, filter .45s ease;
}
.sk--box.is-on { transform: none; opacity: 1; }
.sk--box.is-out { opacity: 0; filter: blur(6px); transform: scale(1.02); }
.sk--box svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.sk--box line { stroke: var(--sk-line); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.sk--box em {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 3px 8px;
  font: 500 10px/1.3 var(--mono);
  font-style: normal;
  letter-spacing: .08em;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--sk-line);
  border-radius: 99px;
  white-space: nowrap;
}

.lofi__meter {
  position: absolute;
  left: 50%;
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  font-size: 10.5px;
  color: var(--soft);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 99px;
  box-shadow: 0 10px 30px -12px rgba(0,0,0,.25);
  transform: translate(-50%, 20px);
  opacity: 0;
  transition: transform .5s var(--ease), opacity .4s;
}
.lofi.is-on .lofi__meter { transform: translate(-50%, 0); opacity: 1; }
.lofi.is-done .lofi__meter { transform: translate(-50%, 20px); opacity: 0; }
.lofi__bar { position: relative; width: 120px; height: 4px; border-radius: 99px; background: var(--line); overflow: hidden; }
.lofi__bar i {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--resolve, 1.6s) var(--ease-io);
}
.lofi.is-resolving .lofi__bar i { transform: none; }
.lofi__pct { min-width: 34px; color: var(--ink); font-weight: 500; }

@media (prefers-reduced-motion: reduce) {
  .side .sig, .side .knob-dial, .side .slide, .side .blink, .side .cursor-move { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .status { display: none; }
  .foot__top { grid-template-columns: 1fr 1fr; }
  .ticket { grid-column: 1 / -1; grid-row: 1; justify-self: center; }
}
@media (max-width: 720px) {
  .work__grid { grid-template-columns: repeat(2, 1fr); }
  .tile:nth-child(3n) { border-right: 1px solid var(--line); }
  .tile:nth-child(2n) { border-right: 0; }
  .meta, .divider { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats > div:nth-child(3) { padding-left: 0; border-left: 0; border-top: 1px dashed var(--line); }
  .stats > div:nth-child(4) { border-top: 1px dashed var(--line); }
  .work__head p { display: none; }
}
@media (max-width: 480px) {
  .work__grid { grid-template-columns: 1fr; }
  .tile { border-right: 0 !important; }
}

/* ---------- Smooth scrolling (Lenis) ---------- */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* ---------- Scroll timeline (motion-frame style indicator) ---------- */
.tl {
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 30;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: min(640px, calc(100vw - 32px));
  padding: 8px 14px 8px 12px;
  color: var(--soft);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 14px 34px -14px rgba(0,0,0,.28);
  transform: translateX(-50%);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
/* hidden until the page scrolls; fades away again once scrolling stops */
.tl:not(.is-visible), html.is-intro .tl { opacity: 0; transform: translate(-50%, 24px); pointer-events: none; }

.tl__meta { display: flex; align-items: center; gap: 8px; font-size: 10.5px; white-space: nowrap; }
.tl__rec { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.tl.is-moving .tl__rec { animation: blinkRec 0.8s steps(2, jump-none) infinite; }
@keyframes blinkRec { 50% { opacity: .2; } }
.tl__tc { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.tl__fr { color: var(--muted); font-variant-numeric: tabular-nums; }

.tl__track {
  position: relative;
  height: 34px;
  cursor: ew-resize;
  touch-action: none;
  outline: none;
  border-radius: 6px;
}
.tl__track:focus-visible { box-shadow: 0 0 0 2px var(--select); }

/* section clips along the top */
.tl__segs { position: absolute; inset: 0 0 12px; }
.tl__seg {
  position: absolute;
  top: 0;
  bottom: 0;
  padding: 3px 6px;
  overflow: hidden;
  font: 500 9px/1.2 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--muted);
  background: color-mix(in srgb, var(--ink) 4%, transparent);
  border: 1px solid var(--line);
  border-radius: 4px;
  transition: background .3s, color .3s, border-color .3s;
}
.tl__seg.is-active {
  color: var(--ink);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
}

/* frame ruler + keyframes along the bottom */
.tl__ruler {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 9px;
  background:
    repeating-linear-gradient(90deg, var(--muted) 0 1px, transparent 1px 10%) bottom / 100% 9px no-repeat,
    repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 2%) bottom / 100% 5px no-repeat;
  opacity: .9;
}
.tl__key {
  position: absolute;
  bottom: 1px;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  padding: 0;
  background: var(--paper);
  border: 1px solid var(--soft);
  transform: rotate(45deg);
  cursor: pointer;
  transition: background .25s, border-color .25s, transform .25s var(--ease);
}
.tl__key:hover { transform: rotate(45deg) scale(1.35); }
.tl__key.is-passed { background: var(--accent); border-color: var(--accent); }

/* visible-area bracket and playhead */
.tl__view {
  position: absolute;
  top: -3px;
  bottom: -3px;
  border: 1px solid color-mix(in srgb, var(--ink) 35%, transparent);
  border-radius: 5px;
  background: color-mix(in srgb, var(--ink) 4%, transparent);
  pointer-events: none;
}
.tl__head {
  position: absolute;
  top: -8px;
  bottom: -3px;
  width: 1.5px;
  margin-left: -.75px;
  background: var(--accent);
  pointer-events: none;
}
.tl__head::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 11px;
  height: 8px;
  transform: translateX(-50%);
  background: var(--accent);
  clip-path: polygon(0 0, 100% 0, 100% 55%, 50% 100%, 0 55%);
}

.tl__sec { display: flex; align-items: baseline; gap: 8px; font-size: 10.5px; white-space: nowrap; }
.tl__name { color: var(--ink); font-weight: 500; min-width: 52px; text-align: right; }
.tl__pct { min-width: 30px; text-align: right; font-variant-numeric: tabular-nums; }

/* keep the last footer line clear of the timeline */
.foot__base { padding-bottom: 28px; }

@media (max-width: 720px) {
  .tl { gap: 10px; padding: 7px 10px; bottom: 10px; width: calc(100vw - 20px); }
  .tl__fr, .tl__name { display: none; }
  .tl__seg { font-size: 8px; padding: 3px 4px; }
}

/* ---------- Nav logo ---------- */
.brand__logo { display: block; width: 26px; height: 26px; border-radius: 6px; transition: transform .5s var(--ease); }
.brand:hover .brand__logo { transform: rotate(-8deg) scale(1.08); }

/* ---------- Lost badge: struck through, fun fact on hover / tap ---------- */
.lost {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: help;
  outline: none;
}
.lost s {
  color: var(--muted);
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
}
.lost__hint {
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  font-size: 9px;
  font-style: normal;
  font-weight: 500;
  color: var(--soft);
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: color .2s, border-color .2s, background .2s;
}
.lost:hover .lost__hint, .lost:focus .lost__hint { color: #fff; background: var(--accent); border-color: var(--accent); }
.fact {
  position: absolute;
  left: -12px;
  bottom: calc(100% + 12px);
  z-index: 5;
  width: 250px;
  padding: 11px 13px;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0;
  color: var(--bg);
  background: var(--ink);
  border-radius: 10px;
  box-shadow: 0 16px 30px -14px rgba(0,0,0,.45);
  opacity: 0;
  transform: translateY(6px) scale(.97);
  transform-origin: 24px 100%;
  pointer-events: none;
  transition: opacity .2s, transform .3s var(--ease);
}
.fact::after {
  content: "";
  position: absolute;
  left: 22px;
  top: 100%;
  border: 6px solid transparent;
  border-top-color: var(--ink);
}
.fact b {
  display: block;
  margin-bottom: 4px;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
}
.lost:hover .fact, .lost:focus .fact { opacity: 1; transform: none; }

/* ---------- Testimonial card ---------- */
.review {
  position: relative;
  margin-top: 28px;
  padding: 20px 22px 16px;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 1px 0 var(--line), 0 18px 36px -28px rgba(0,0,0,.35);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.review:hover { transform: translateY(-2px); box-shadow: 0 1px 0 var(--line), 0 26px 44px -28px rgba(0,0,0,.45); }
.review::before {
  content: none;
  position: absolute;
  right: 14px;
  top: -22px;
  font-size: 150px;
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
  opacity: .12;
  pointer-events: none;
}
.review__top { display: flex; align-items: center; gap: 10px; font-size: 10.5px; color: var(--muted); }
.review__stars { font-size: 12px; letter-spacing: 2px; color: var(--accent); }
.review blockquote p {
  position: relative;
  margin-top: 12px;
  font-size: 16.5px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.review mark {
  color: inherit;
  background: none;
  padding: 0 1px;
}
.review__by {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}
.review__avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  font-size: 10.5px;
  color: var(--bg);
  background: var(--ink);
  border-radius: 50%;
}
.review__by b { display: block; font-size: 13px; }
.review__by i { display: block; margin-top: 2px; font-size: 10.5px; font-style: normal; color: var(--muted); }

/* ---------- Brand surface: black, styled like the AF logo ---------- */
.tile__go,
.tile:hover .tile__go,
.cursor,
.review__avatar,
.lost:hover .lost__hint, .lost:focus .lost__hint,
.tl__rec,
.tl__key.is-passed,
.fact {
  color: #fff;
  background: var(--brand-grad);
  border: 1px solid var(--brand-edge);
  box-shadow: var(--brand-glow);
}
.cursor { box-shadow: var(--brand-glow), 0 12px 26px -10px rgba(0,0,0,.45); }
.fact { box-shadow: var(--brand-glow), 0 16px 30px -14px rgba(0,0,0,.45); }
.fact::after { border-top-color: #18181b; }
.fact b { color: rgba(255,255,255,.55); }
.lofi__bar i { background: var(--brand-grad); }

/* the ticket is always light paper, so its accents stay black in both themes */
.ticket__line a { color: #18181b; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }


/* ---------- Ticket: main + perforated stub with the seal ---------- */
.ticket__main { padding: 20px 22px 16px 26px; min-width: 0; }
.ticket__line { font-size: 17px; }
.ticket__stub {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 18px 10px 16px;
  border-left: 2px dashed #d6d3ca;
}
/* little half-moon bites where the perforation meets the edges */
.ticket__stub::before, .ticket__stub::after {
  content: "";
  position: absolute;
  left: -9px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--foot);
}
.ticket__stub::before { top: -8px; }
.ticket__stub::after { bottom: -8px; }
.ticket__stub-label { font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: #8b8a85; }

.seal { display: block; width: 96px; height: 96px; }
.seal svg { display: block; width: 100%; height: 100%; overflow: visible; }
.seal__ring { font: 500 9.6px/1 var(--mono); letter-spacing: 2.1px; fill: #18181b; }
.seal__core { font: 800 13px/1 var(--sans); letter-spacing: .18em; fill: #18181b; }
/* stamped in when the ticket comes into view */
.seal svg {
  transform: rotate(-16deg) scale(1.7);
  opacity: 0;
  transition: transform .45s cubic-bezier(.2,1.5,.45,1), opacity .2s ease;
}
.ticket.is-stamped .seal svg { transform: rotate(-12deg) scale(1); opacity: .9; }
.ticket:hover .seal svg { transform: rotate(-4deg) scale(1.04); }

/* ---------- Macro pad: light mechanical keycaps ---------- */
.pad {
  --u: 64px;                 /* 1 key unit */
  position: relative;
  width: max-content;
  max-width: 100%;
  margin: clamp(28px, 4vw, 44px) auto 0;
  padding: 12px 14px 16px;
  border-radius: 22px;
  background: linear-gradient(180deg, #ecebe6 0%, #d9d6ce 100%);
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 -2px 0 rgba(0,0,0,.08),
    0 0 0 1px rgba(0,0,0,.55),
    0 34px 60px -26px rgba(0,0,0,.85);
}
.pad__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 10px;
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #8b8a85;
}
.pad__leds { display: flex; gap: 6px; }
.pad__leds i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #c3c0b7;
  box-shadow: inset 0 1px 1px rgba(0,0,0,.25);
}
.pad__leds i.is-on { background: #22c55e; box-shadow: 0 0 6px 1px rgba(34,197,94,.65); }

/* the plate the keys sit in */
.keys {
  display: flex;
  gap: 8px;
  padding: 8px;
  border-radius: 14px;
  background: #2a2a2c;
  box-shadow: inset 0 2px 6px rgba(0,0,0,.6), 0 1px 0 rgba(255,255,255,.7);
}

/* keycap = skirt (the darker side wall) + top face */
.key {
  --skirt-top: #d3d0c7;
  --skirt-bot: #a9a59b;
  --face: linear-gradient(155deg, #ffffff 0%, #f4f2ec 48%, #e6e3da 100%);
  --legend: #1b1b1d;
  --sub: #9a968c;
  position: relative;
  display: block;
  flex: none;
  height: var(--u);
  padding: 3px 5px 9px;
  border-radius: 11px;
  background: linear-gradient(180deg, var(--skirt-top), var(--skirt-bot));
  box-shadow: 0 0 0 1px rgba(0,0,0,.45), 0 4px 0 -1px rgba(0,0,0,.35), 0 8px 12px -6px rgba(0,0,0,.6);
  transition: transform .09s ease, box-shadow .09s ease, padding .09s ease;
}
.key--u1  { width: var(--u); }
.key--u15 { width: calc(var(--u) * 1.5); }
.key--u25 { width: calc(var(--u) * 2.5); }

.key__cap {
  position: relative;
  display: block;
  height: 100%;
  border-radius: 8px;
  background: var(--face);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    inset 0 -3px 5px rgba(0,0,0,.05),
    0 1px 1px rgba(0,0,0,.18);
  transition: background .2s;
}
.key__legend {
  position: absolute;
  top: 8px;
  left: 10px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--legend);
  white-space: nowrap;
}
.key--u1 .key__legend { left: 50%; top: 50%; transform: translate(-50%, -58%); font-size: 18px; }
.key__sub { position: absolute; right: 9px; bottom: 6px; font-size: 9px; color: var(--sub); }

/* accent key: the black brand surface, like the logo */
.key--accent {
  --skirt-top: #1b1b1e;
  --skirt-bot: #050506;
  --face: linear-gradient(180deg, #2c2c30 0%, #18181b 100%);
  --legend: #fff;
  --sub: rgba(255,255,255,.45);
}
.key--accent .key__cap { box-shadow: inset 0 1.5px 1px rgba(255,255,255,.32), inset 0 -1.5px 1px rgba(255,255,255,.18), 0 1px 1px rgba(0,0,0,.4); }

.key:hover .key__cap { background: linear-gradient(155deg, #ffffff 0%, #fbfaf6 60%, #efece4 100%); }
.key--accent:hover .key__cap { background: linear-gradient(180deg, #34343a 0%, #1c1c20 100%); }
.key:focus-visible { outline: 2px solid var(--select); outline-offset: 3px; }
/* press: the cap travels down into the skirt */
.key:active, .key.is-down {
  transform: translateY(3px);
  padding-bottom: 5px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.45), 0 1px 0 -1px rgba(0,0,0,.35), 0 3px 6px -4px rgba(0,0,0,.6);
}

@media (max-width: 720px) {
  .ticket { grid-template-columns: 1fr; }
  .ticket__stub {
    flex-direction: row;
    padding: 12px 22px 14px 26px;
    border-left: 0;
    border-top: 2px dashed #d6d3ca;
  }
  .ticket__stub::before, .ticket__stub::after { top: -9px; bottom: auto; left: auto; }
  .ticket__stub::before { left: -8px; }
  .ticket__stub::after { right: -8px; }
  .seal { width: 76px; height: 76px; }
  .pad { --u: 54px; padding: 10px 10px 12px; }
  .ticket { width: 86vw; }
  .key__legend { top: 7px; left: 8px; font-size: 11.5px; }
  .keys { flex-wrap: wrap; justify-content: center; }
  .key--u25 { width: calc(var(--u) * 2.6); }
  .key--u15 { width: calc(var(--u) * 1.75); }
}
@media (max-width: 400px) {
  .pad { --u: 50px; }
}

/* ---------- Footer reveal: pinned underneath, layers rise at different speeds ---------- */
.foot.is-reveal .foot__top  { transform: translateY(calc((1 - var(--reveal, 1)) * 120px)); }
.foot.is-reveal .pad        { transform: translateY(calc((1 - var(--reveal, 1)) * 200px)); }
.foot.is-reveal .foot__word { transform: translateY(calc((1 - var(--reveal, 1)) * 300px)); letter-spacing: calc(-0.06em + (1 - var(--reveal, 1)) * 0.08em); }
.foot.is-reveal .foot__base { opacity: calc(var(--reveal, 1) * 1.4 - .4); }
.foot.is-reveal .ticket { transform: rotate(calc(-9deg + 7deg * var(--reveal, 1))); }
.foot.is-reveal .ticket:hover { transform: rotate(0deg) translateY(-4px); }
/* shadow cast by the page lifting off; fades as the footer is uncovered */
.foot.is-reveal::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,.85), rgba(0,0,0,.35));
  opacity: calc(1 - var(--reveal, 1));
}

/* ---------- Mobile keypad: 2 rows that fill the case ----------
   row 1: Email | Hire on Upwork      row 2: LinkedIn (fills) | ↑ */
@media (max-width: 720px) {
  .pad { width: 100%; }
  .keys {
    display: grid;
    /* equal side columns (Email, ↑) so Hire on Upwork and LinkedIn come out the same width */
    grid-template-columns: calc(var(--u) * 1.3) minmax(0, 1fr) calc(var(--u) * 1.3);
    gap: 8px;
  }
  .keys .key { width: auto; }
  .keys .key--accent { grid-column: span 2; }       /* Hire on Upwork */
  .keys .key:nth-child(3) { grid-column: span 2; }  /* LinkedIn fills the row */
}

/* ---------- Experience ---------- */
.xp { border-top: 1px solid var(--line); scroll-margin-top: 56px; }
.xp__sheet {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: clamp(32px, 6vw, 96px);
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(56px, 8vw, 112px) clamp(24px, 6vw, 96px);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}
.xp__head { position: sticky; top: 88px; align-self: start; }
.xp__eyebrow { font-size: 10.5px; color: var(--muted); }
.xp__head h2 { margin-top: 10px; font-size: clamp(30px, 4vw, 44px); font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.xp__lede { margin-top: 14px; max-width: 34ch; font-size: 15px; line-height: 1.6; color: var(--soft); }
.xp__facts { display: flex; gap: 22px; margin-top: 26px; padding-top: 16px; border-top: 1px dashed var(--line); }
.xp__facts dt { font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.xp__facts dd { margin-top: 4px; font-family: var(--sans); font-size: 15px; font-weight: 700; color: var(--ink); }

/* mini timeline (2018 → end of 2026 = 9 years) */
.xp__chart {
  margin-bottom: 28px;
  padding: 16px 16px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.xp__years {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  font-size: 9.5px;
  color: var(--muted);
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
}
.xp__years span { border-left: 1px solid var(--line); padding-left: 5px; }
.xp__bars {
  position: relative;
  display: grid;
  gap: 6px;
  padding-top: 10px;
  background-image: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 25%);
}
.xp__bar {
  position: relative;
  display: flex;
  align-items: center;
  height: 20px;
  margin-left: calc(var(--from) / var(--span, 48) * 100%);
  width: calc((var(--to) - var(--from)) / var(--span, 48) * 100%);
  padding: 0 8px;
  overflow: hidden;
  border-radius: 6px;
  background: color-mix(in srgb, var(--ink) 9%, transparent);
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  transition: background .3s, color .3s, opacity .3s, transform .3s var(--ease);
}
.xp__bar b { font: 500 9.5px/1 var(--mono); white-space: nowrap; color: var(--soft); }
.xp__bar.is-edu { background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--ink) 7%, transparent) 0 4px, transparent 4px 8px); }
.xp__bar.is-now, .xp__bar.is-active { background: var(--brand-grad); border-color: var(--brand-edge); box-shadow: var(--brand-glow); }
.xp__bar.is-now b, .xp__bar.is-active b { color: #fff; }
.xp__bar.is-now::after {           /* still running: a soft pulse at the leading edge */
  content: "";
  position: absolute;
  right: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34,197,94,.6);
  animation: nowPulse 1.8s ease-out infinite;
}
@keyframes nowPulse { to { box-shadow: 0 0 0 7px rgba(34,197,94,0); } }
.xp__chart.has-active .xp__bar:not(.is-active) { opacity: .35; }
.xp__chart.has-active .xp__bar.is-now:not(.is-active) { background: color-mix(in srgb, var(--ink) 9%, transparent); border-color: transparent; box-shadow: none; }
.xp__chart.has-active .xp__bar.is-now:not(.is-active) b { color: var(--soft); }

/* list */
.xp__list { list-style: none; border-bottom: 1px solid var(--line); }
.xp__row {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 18px 6px;
  font: inherit;
  color: inherit;
  text-align: left;
  background: none;
  border: 0;
  border-top: 1px solid var(--line);
  cursor: pointer;
  transition: background .25s;
}
.xp__row:hover { background: color-mix(in srgb, var(--ink) 3%, transparent); }
.xp__row:focus-visible { outline: 2px solid var(--select); outline-offset: -2px; }
.xp__logo {
  display: grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 11px;
  box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--ink) 5%, transparent);
}
.xp__logo.is-brand { color: #fff; background: var(--brand-grad); border-color: var(--brand-edge); box-shadow: var(--brand-glow); }
.xp__main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.xp__role { font-size: 16.5px; font-weight: 700; letter-spacing: -0.015em; }
.xp__co { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); }
.xp__now {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  font-size: 9.5px;
  font-style: normal;
  color: var(--soft);
  border: 1px solid var(--line);
  border-radius: 99px;
}
.xp__now::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #22c55e; }
.xp__lead { flex: 1; min-width: 24px; border-bottom: 1px dashed var(--line); transform: translateY(2px); }
.xp__when { flex: none; text-align: right; font-size: 12px; color: var(--soft); }
.xp__when small { display: block; margin-top: 3px; font-size: 10px; color: var(--muted); }
.xp__toggle {
  position: relative;
  flex: none;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: transform .4s var(--ease), background .25s, border-color .25s;
}
.xp__toggle::before, .xp__toggle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 11px;
  height: 1.5px;
  margin: -.75px 0 0 -5.5px;
  background: var(--ink);
  transition: background .25s;
}
.xp__toggle::after { transform: rotate(90deg); }
.xp__item.is-open .xp__toggle { transform: rotate(45deg); background: var(--brand-grad); border-color: var(--brand-edge); box-shadow: var(--brand-glow); }
.xp__item.is-open .xp__toggle::before, .xp__item.is-open .xp__toggle::after { background: #fff; }

.xp__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); }
.xp__item.is-open .xp__panel { grid-template-rows: 1fr; }
.xp__inner { overflow: hidden; padding-left: 64px; padding-right: 46px; }
.xp__points { list-style: none; padding-bottom: 6px; }
.xp__points li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 9px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--soft);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .35s, transform .45s var(--ease);
}
.xp__points li::before { content: ""; position: absolute; left: 0; top: .8em; width: 9px; height: 1.5px; background: var(--ink); }
.xp__item.is-open .xp__points li { opacity: 1; transform: none; }
.xp__item.is-open .xp__points li:nth-child(2) { transition-delay: .05s; }
.xp__item.is-open .xp__points li:nth-child(3) { transition-delay: .1s; }
.xp__item.is-open .xp__points li:nth-child(4) { transition-delay: .15s; }
.xp__chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 0 22px; }
.xp__chips span { padding: 4px 9px; font-size: 10.5px; color: var(--soft); background: var(--paper); border: 1px solid var(--line); border-radius: 99px; }
.xp__item.is-edu .xp__role { font-weight: 600; }

@media (max-width: 900px) {
  .xp__sheet { grid-template-columns: 1fr; }
  .xp__head { position: static; }
}
@media (max-width: 720px) {
  .xp__row { display: grid; grid-template-columns: 42px minmax(0, 1fr) 30px; column-gap: 14px; row-gap: 4px; }
  .xp__logo { grid-row: span 2; }
  .xp__lead { display: none; }
  .xp__when { grid-column: 2; grid-row: 2; text-align: left; }
  .xp__when small { display: inline; margin-left: 8px; }
  .xp__toggle { grid-column: 3; grid-row: 1 / span 2; }
  .xp__inner { padding-left: 0; padding-right: 0; }
  .xp__bar b { display: none; }
}

/* company logos in the experience tiles */
.xp__logo svg { width: 20px; height: 20px; }
.xp__logo.is-mi { background: #c9282d; border-color: #9a1a1e; box-shadow: inset 0 1px 1px rgba(255,255,255,.25), inset 0 -2px 0 rgba(0,0,0,.18); }
.xp__logo.is-mi svg { width: 17px; height: 19px; }
.xp__cv { display: inline-block; margin-top: 22px; font-size: 11px; color: var(--soft); border-bottom: 1px solid var(--line); padding-bottom: 2px; transition: color .2s, border-color .2s; }
.xp__cv:hover { color: var(--ink); border-color: var(--ink); }
@media (max-width: 720px) { .xp__bar b { display: block; font-size: 8.5px; } }

/* ---------- Experience: story paragraph instead of bullets ---------- */
.xp__desc {
  max-width: 62ch;
  padding-bottom: 4px;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--soft);
  opacity: 0;
  transform: translateY(8px);
  filter: blur(3px);
  transition: opacity .4s ease .05s, transform .5s var(--ease) .05s, filter .4s ease .05s;
}
.xp__desc strong { color: var(--ink); font-weight: 600; }
.xp__item.is-open .xp__desc { opacity: 1; transform: none; filter: none; }
.xp__inner { padding-top: 2px; }

/* ---------- Footer spotlight: follows the cursor, drifts when idle ---------- */
@property --sx { syntax: "<length-percentage>"; inherits: true; initial-value: 50%; }
@property --sy { syntax: "<length-percentage>"; inherits: true; initial-value: 20%; }
.foot__spot {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(560px circle at var(--sx) var(--sy), rgba(255,255,255,.10), rgba(255,255,255,.03) 40%, transparent 65%);
  animation: spotDrift 14s ease-in-out infinite alternate;
}
/* the dot grid lights up inside the beam */
.foot__spot::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.34) 1px, transparent 1.2px);
  background-size: 16px 16px;
  -webkit-mask-image: radial-gradient(240px circle at var(--sx) var(--sy), #000, transparent 75%);
  mask-image: radial-gradient(240px circle at var(--sx) var(--sy), #000, transparent 75%);
}
@keyframes spotDrift {
  0%   { --sx: 28%; --sy: 18%; }
  50%  { --sx: 72%; --sy: 34%; }
  100% { --sx: 46%; --sy: 62%; }
}
.foot.is-tracking .foot__spot { animation: none; }
@media (prefers-reduced-motion: reduce) { .foot__spot { animation: none; } }

/* ---------- Keypad LEDs: green blinks like an activity light ---------- */
.pad__leds i.is-on { animation: ledBlink 2.4s steps(1, end) infinite; }
@keyframes ledBlink {
  0%, 62%  { background: #22c55e; box-shadow: 0 0 6px 1px rgba(34,197,94,.75); }
  64%, 70% { background: #0f5a2a; box-shadow: none; }
  72%, 80% { background: #22c55e; box-shadow: 0 0 6px 1px rgba(34,197,94,.75); }
  82%, 100%{ background: #0f5a2a; box-shadow: none; }
}
/* second LED flashes on every key press */
.pad__leds i.is-flash { background: #fff; box-shadow: 0 0 6px 1px rgba(255,255,255,.8); }

.xp__logo.is-img { padding: 0; overflow: hidden; border-color: rgba(0,0,0,.12); }
.xp__logo.is-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
