/* Web consultant profile, generated by web/render.mjs from the same content as the PDF.
   The hero is the PDF cover's blue, deepening into compiled.se's navy as you scroll
   and returning at the contact section; type and accent follow compiled.se so the
   page sits on the site without a seam.

   No inline styles anywhere: compiled.se's CSP forbids them. Per-element values come
   from SVG attributes (skill bars) or are set by profile.js through the CSSOM. */

@font-face {
  font-family: 'Space Grotesk';
  src: url('fonts/SpaceGrotesk-var.woff2') format('woff2');
  font-weight: 400 600;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('fonts/JetBrainsMono-var.woff2') format('woff2');
  font-weight: 400 600;
  font-display: swap;
}

:root {
  --bg: #070d16;
  --text: #e8edf4;
  --muted: #bbcde5;
  --dim: #9fb3ce;
  --accent: #4d9fff;
  --accent-hi: #7cb8ff;
  --accent-text: #7cb8ff;
  --on-accent: #070d16;
  --on-blue: #c9d3e6;
  --on-blue-muted: #9fb3d4;
  --cover: linear-gradient(165deg, #0a2452 0%, #0c3271 55%, #12428f 100%);

  --line: rgba(110, 160, 230, .14);
  --line-strong: rgba(110, 160, 230, .28);
  --line-hover: rgba(110, 160, 230, .5);
  --card: rgba(9, 20, 40, .55);

  --sans: 'Space Grotesk', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --shell: 1240px;
  --gutter: clamp(20px, 5vw, 48px);
  --bar-h: 64px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  overflow-x: clip;
  scroll-padding-top: calc(var(--bar-h) + 24px);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
::selection { background: rgba(77, 159, 255, .35); }

.shell { width: 100%; max-width: calc(var(--shell) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 14px; border-radius: 4px;
  background: var(--accent); color: var(--on-accent); font: 600 13px var(--mono);
}
.skip:focus { top: 12px; }

/* ---------- backdrop: the fixed layer behind the whole page ---------- */

.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--cover); pointer-events: none; }
.backdrop-glow {
  position: absolute; left: 30%; top: -30vh; width: 120vw; height: 110vh;
  background: radial-gradient(closest-side, rgba(77, 159, 255, .16), transparent);
  will-change: transform;
}
.backdrop-mark {
  --size: max(1000px, 118vh);
  position: absolute; top: -18vh; right: calc(var(--size) * -.34);
  width: var(--size); opacity: .075;
  /* The triangle's centroid, so a 120° turn brings the mark back onto itself. */
  transform-origin: 50% 61%;
  will-change: transform;
}
.backdrop-shade { position: absolute; inset: 0; background: var(--bg); opacity: 0; }

/* ---------- top bar ---------- */

.topbar {
  position: sticky; top: 0; z-index: 50; height: var(--bar-h);
  border-bottom: 1px solid transparent;
  transition: background-color .25s, border-color .25s;
}
.topbar.is-stuck {
  background: rgba(7, 13, 22, .74);
  border-bottom-color: var(--line);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
}
.topbar-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 11px; flex: none; }
.brand img { width: 30px; }
.brand-word { font: 600 14px var(--sans); letter-spacing: .14em; color: #c5ccd6; }
.toc { display: flex; gap: 28px; font: 500 13px var(--mono); }
.toc a { color: var(--muted); transition: color .15s; }
.toc a:hover, .toc a[aria-current="true"] { color: var(--accent-text); }
.bar-actions { display: flex; align-items: center; gap: 10px; }
.langs { display: flex; padding: 3px; border: 1px solid var(--line-strong); border-radius: 6px; font: 600 11.5px/1 var(--mono); }
.langs a { padding: 6px 8px; border-radius: 4px; color: var(--dim); transition: color .15s, background-color .15s; }
.langs a:hover { color: var(--text); }
.langs a[aria-current="page"] { background: rgba(110, 160, 230, .2); color: var(--text); }
.progress {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-hi));
  transform-origin: 0 50%; transform: scaleX(0);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 14px 24px; border: 1px solid transparent; border-radius: 4px;
  font: 600 13.5px/1 var(--mono);
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn--primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 0 32px rgba(77, 159, 255, .3); }
.btn--primary:hover { background: var(--accent-hi); box-shadow: 0 0 44px rgba(124, 184, 255, .45); }
.btn--ghost { border-color: rgba(201, 211, 230, .32); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent-text); }
.btn--sm { padding: 8px 13px; font-size: 12px; }
.arr { font-family: var(--sans); transition: transform .2s var(--ease); }
.btn:hover .arr { transform: translate(2px, -1px); }

/* ---------- hero ---------- */

.hero { position: relative; min-height: calc(100svh - var(--bar-h)); display: flex; }
.hero-inner { display: flex; flex-direction: column; padding-block: clamp(12px, 2.4vh, 40px) 24px; will-change: transform, opacity; }
.hero-main { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 48px; padding-bottom: clamp(28px, 4vh, 56px); }
.eyebrow { font: 600 11.5px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--on-blue-muted); }
.hero-name {
  margin: clamp(16px, 2.6vh, 26px) 0 clamp(18px, 3vh, 30px);
  font: 600 clamp(60px, min(12.5vw, 16vh), 184px)/.86 var(--sans);
  letter-spacing: -.05em;
}
.hero-name .line { display: block; overflow: hidden; padding-bottom: .07em; margin-bottom: -.07em; }
.hero-name .line > span { display: inline-block; }
.hero-roles { font: 500 clamp(18px, 1.9vw, 24px)/1.35 var(--sans); color: var(--on-blue); }
.hero-roles .sep { color: var(--on-blue-muted); padding-inline: .15em; }
.hero-statement { margin-top: clamp(16px, 2.6vh, 26px); max-width: 620px; font: 400 clamp(15.5px, 1.2vw, 17.5px)/1.7 var(--sans); color: rgba(255, 255, 255, .84); text-wrap: pretty; }
.hero-actions { margin-top: clamp(22px, 3.6vh, 36px); display: flex; flex-wrap: wrap; gap: 12px; }
.hero-portrait-wrap { align-self: start; margin-top: 4px; will-change: transform; }
.hero-portrait {
  width: clamp(96px, 13vw, 188px); aspect-ratio: 1; overflow: hidden; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .32);
  box-shadow: 0 0 0 12px rgba(255, 255, 255, .035), 0 0 0 26px rgba(255, 255, 255, .02), 0 30px 80px rgba(3, 10, 30, .55);
}
.hero-portrait img { width: 100%; height: 100%; object-fit: cover; }

.hero-facts { display: grid; grid-template-columns: 1.15fr 1fr .8fr; gap: 32px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .22); }
.fact-label { margin-bottom: 10px; font: 600 10.5px/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--on-blue-muted); }
.fact { font-size: 14px; line-height: 1.55; text-wrap: pretty; }
.fact + .fact { margin-top: 6px; }
.fact b { font-weight: 600; }
.fact a { border-bottom: 1px solid rgba(255, 255, 255, .25); transition: color .15s, border-color .15s; }
.fact a:hover { color: var(--accent-text); border-color: var(--accent-text); }
.fact-muted { margin-top: 8px; font-size: 12.5px; color: var(--on-blue-muted); }

.pulse { position: relative; display: inline-block; width: 7px; height: 7px; margin: 0 9px 1px 0; border-radius: 50%; background: var(--accent-hi); vertical-align: middle; }

.scroll-cue {
  position: absolute; right: calc(var(--gutter) - 6px); top: 50%;
  display: flex; align-items: center; gap: 12px;
  font: 500 10.5px/1 var(--mono); letter-spacing: .24em; text-transform: uppercase; color: var(--on-blue-muted);
  writing-mode: vertical-rl;
}
.scroll-cue::after { content: ""; width: 1px; height: 56px; background: linear-gradient(var(--on-blue-muted), transparent); }

/* ---------- sections ---------- */

.section { position: relative; padding-block: clamp(88px, 13vh, 150px); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px 48px; flex-wrap: wrap; margin-bottom: clamp(40px, 6vh, 72px); }
.section-title { display: flex; align-items: flex-start; gap: 14px; font: 600 clamp(46px, 6.6vw, 100px)/.92 var(--sans); letter-spacing: -.045em; }
.section-num { padding-top: .5em; font: 500 13px/1 var(--mono); letter-spacing: 0; color: var(--accent-text); }
.section-aside { max-width: 460px; font-size: 15.5px; line-height: 1.65; color: var(--muted); text-wrap: pretty; }
.section-aside .mono { display: block; margin-bottom: 6px; font: 500 13px var(--mono); color: var(--accent-text); }

/* ---------- career: horizontal timeline, pinned on wide screens by profile.js ---------- */

.career-viewport { overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.career-rail {
  position: relative; width: max-content;
  padding-inline: max(var(--gutter), calc((100vw - var(--shell)) / 2));
  padding-bottom: 28px;
}
.career-line { position: absolute; top: 4px; left: 0; right: 0; height: 1px; background: var(--line-strong); }
.career-fill {
  position: absolute; inset: 0; transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, rgba(124, 184, 255, .1), var(--accent-hi));
  box-shadow: 0 0 12px rgba(124, 184, 255, .6);
}
.career-stops { display: flex; }
.stop { position: relative; width: clamp(236px, 21vw, 300px); flex: none; }
.stop-link { position: relative; display: flex; flex-direction: column; padding: 34px 28px 0 0; }
.stop-dot {
  position: absolute; left: 0; top: 0; width: 9px; height: 9px; border-radius: 50%;
  background: var(--text); box-shadow: 0 0 0 5px rgba(124, 184, 255, .14);
  transition: background-color .4s, box-shadow .4s, transform .4s var(--ease);
}
.stop.is-current .stop-dot { background: var(--accent-hi); }
/* The year again, outlined and large, under each stop. Sized to stay narrower than a
   stop even after profile.js's parallax pulls neighbours 10% closer together. */
.stop-ghost {
  position: absolute; left: -4px; top: 170px;
  font: 600 clamp(80px, 7vw, 108px)/1 var(--sans); letter-spacing: -.06em;
  color: transparent; -webkit-text-stroke: 1px rgba(124, 184, 255, .22);
  pointer-events: none; will-change: transform;
}
.stop-year { font: 500 13px var(--mono); color: var(--accent-text); }
.stop-company { margin-top: 10px; font: 600 23px/1.15 var(--sans); letter-spacing: -.02em; }
.stop-role { margin-top: 6px; font-size: 14.5px; line-height: 1.45; color: var(--muted); }
.stop-span { margin-top: 10px; font: 400 12px var(--mono); color: var(--dim); }
a.stop-link .stop-company { transition: color .15s; }
a.stop-link:hover .stop-company { color: var(--accent-text); }

.career.is-pinned { padding-block: 0; }
.career.is-pinned .career-pin {
  position: sticky; top: var(--bar-h); height: calc(100vh - var(--bar-h));
  display: flex; flex-direction: column; justify-content: center; overflow: hidden;
}
.career.is-pinned .career-viewport { overflow: visible; }
.career.is-pinned .career-rail { padding-bottom: 150px; will-change: transform; }
.career.is-pinned .stop:not(.is-reached) .stop-dot { background: transparent; box-shadow: 0 0 0 1px var(--line-hover); transform: scale(.8); }
.career.is-pinned .stop.is-reached .stop-dot { box-shadow: 0 0 0 5px rgba(124, 184, 255, .2), 0 0 18px rgba(124, 184, 255, .7); }

/* ---------- experience ---------- */

.xp-wrap { position: relative; --when: 200px; }
.xp-rail { position: absolute; top: 0; bottom: 0; left: var(--when); width: 1px; background: var(--line-strong); }
.xp-fill {
  position: absolute; inset: 0; transform-origin: 50% 0; transform: scaleY(0);
  background: linear-gradient(var(--accent-hi), rgba(124, 184, 255, .25));
}
.xp { display: grid; grid-template-columns: var(--when) minmax(0, 1fr); padding-bottom: clamp(56px, 9vh, 96px); }
.xp:last-child { padding-bottom: 0; }
.xp-when-inner { position: sticky; top: calc(var(--bar-h) + 36px); display: flex; flex-direction: column; align-items: flex-end; padding-right: 32px; }
.xp-dot {
  position: absolute; right: -5px; top: 12px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--bg); box-shadow: 0 0 0 1px var(--line-hover);
  transition: background-color .4s, box-shadow .4s;
}
.xp.is-reached .xp-dot, .xp.is-current .xp-dot { background: var(--accent-hi); box-shadow: 0 0 0 4px rgba(124, 184, 255, .18), 0 0 16px rgba(124, 184, 255, .6); }
.xp-y1 { font: 600 clamp(40px, 4.4vw, 64px)/1 var(--sans); letter-spacing: -.05em; }
.xp-y2 { margin-top: 8px; font: 500 13px var(--mono); color: var(--dim); }
.xp-body { padding: 4px 0 0 56px; }
.xp-role { font: 600 clamp(24px, 2.4vw, 32px)/1.2 var(--sans); letter-spacing: -.025em; }
.xp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 10px 0 22px; font: 500 13.5px var(--mono); }
.xp-company { color: var(--accent-text); }
.xp-dates { color: var(--dim); }
.badge {
  display: inline-flex; align-items: center; padding: 5px 10px 5px 9px; border-radius: 99px;
  border: 1px solid rgba(124, 184, 255, .35); background: rgba(77, 159, 255, .1);
  font: 500 11px/1 var(--mono); color: var(--accent-text);
}
.badge .pulse { margin: 0 7px 0 0; width: 6px; height: 6px; }
.xp-text { max-width: 720px; }
.xp-text p { font-size: 16.5px; line-height: 1.75; color: var(--muted); text-wrap: pretty; }
.xp-text p + p { margin-top: 14px; }

.tech { margin-top: 24px; }
.tech-label { margin-bottom: 10px; font: 600 10.5px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags li {
  padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: 4px;
  background: rgba(9, 20, 40, .4); font: 500 12px/1.1 var(--mono); color: var(--muted);
  transition: border-color .15s, color .15s;
}
.tags li:hover { border-color: var(--line-hover); color: var(--text); }

/* ---------- projects ---------- */

.projects { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.project {
  --px: 50%; --py: 0%;
  position: relative; grid-column: span 2; overflow: hidden; isolation: isolate;
  padding: 30px 30px 28px; border: 1px solid var(--line); border-radius: 10px; background: var(--card);
  transition: border-color .25s, transform .4s var(--ease), opacity .9s var(--ease);
}
.projects--lead-2 .project:nth-child(-n+2) { grid-column: span 3; }
.projects--lead-1 .project:first-child { grid-column: span 6; }
.project::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--px) var(--py), rgba(77, 159, 255, .14), transparent 65%);
}
.project:hover { border-color: var(--line-hover); }
.project:hover::before { opacity: 1; }
.project-client { font: 500 12.5px var(--mono); color: var(--accent-text); }
.project-name { margin: 10px 0 14px; font: 600 26px/1.15 var(--sans); letter-spacing: -.025em; }
.project p:not([class]) { font-size: 15px; line-height: 1.7; color: var(--muted); text-wrap: pretty; }
.project .tech { margin-top: 20px; }

/* ---------- skills ---------- */

.skill-group { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px 40px; padding: 30px 0; border-top: 1px solid var(--line); }
.skill-group:last-child { border-bottom: 1px solid var(--line); }
.skill-title { padding-top: 6px; font: 600 12px/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--on-blue-muted); }
.bars { display: grid; gap: 14px; max-width: 700px; }
.bars + .tags { margin-top: 22px; }
.bar { display: grid; grid-template-columns: 7.5em minmax(0, 1fr) 4.6em; align-items: center; gap: 4px 18px; }
.bar-name { font: 600 16px/1.2 var(--sans); }
.bar-track { width: 100%; height: 6px; border-radius: 3px; background: rgba(110, 160, 230, .14); overflow: hidden; }
.bar-fill { fill: var(--accent-hi); transform-box: fill-box; transform-origin: 0 50%; }
.bar-years { text-align: right; font: 500 13px var(--mono); color: var(--accent-text); white-space: nowrap; }
.bar-note { grid-column: 2 / -1; margin-top: -2px; font: 400 12px var(--mono); color: var(--dim); }
.skills-outro { margin-top: 36px; max-width: 720px; font-size: 16px; line-height: 1.7; color: var(--muted); }

/* ---------- about ---------- */

.about { display: grid; grid-template-columns: minmax(240px, 420px) minmax(0, 1fr); gap: clamp(36px, 7vw, 104px); align-items: start; }
.about-portrait {
  position: relative; overflow: hidden; aspect-ratio: 1; border-radius: 12px;
  border: 1px solid var(--line-strong); box-shadow: 0 40px 90px rgba(2, 6, 16, .55);
}
.about-portrait img { width: 100%; height: 112%; margin-top: -6%; object-fit: cover; will-change: transform; }
.about-portrait::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(7, 13, 22, .45)); }
.about-copy .section-title { margin-bottom: 36px; }
.about-text p { font-size: 17px; line-height: 1.75; color: var(--muted); max-width: 640px; text-wrap: pretty; }
.about-text p:first-child { font-size: clamp(20px, 2vw, 25px); line-height: 1.5; color: var(--text); letter-spacing: -.01em; }
.about-text p + p { margin-top: 16px; }
.spoken { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.spoken li { font-size: 15.5px; line-height: 1.7; color: var(--muted); }

/* ---------- contact ---------- */

.contact { padding-block: clamp(110px, 20vh, 220px); }
.contact-mail {
  display: inline-block; max-width: 100%; margin-top: clamp(28px, 5vh, 48px);
  font: 600 clamp(30px, 6.8vw, 100px)/1.04 var(--sans); letter-spacing: -.045em; overflow-wrap: anywhere;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 3px no-repeat;
  transition: color .2s, background-size .5s var(--ease);
}
.contact-mail:hover { color: var(--accent-text); background-size: 100% 3px; }
.contact-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(32px, 5vh, 52px); }

.footer { border-top: 1px solid rgba(201, 211, 230, .16); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-block: 26px; font: 400 12.5px var(--mono); color: var(--on-blue-muted); }
.footer-brand { display: inline-flex; align-items: center; gap: 9px; transition: color .15s; }
.footer-brand img { width: 18px; }
.footer-brand:hover { color: var(--text); }

/* ---------- motion (profile.js adds .js; reduced motion opts out) ---------- */

.js .reveal { opacity: 0; transform: translate3d(0, 30px, 0); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--delay, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .project.reveal.is-in:hover { transform: translateY(-4px); transition-delay: 0s; }
.js .reveal .bar-fill { transform: scaleX(0); transition: transform 1.4s var(--ease) .15s; }
.js .reveal.is-in .bar-fill { transform: none; }
.js .reveal .bar:nth-child(2) .bar-fill { transition-delay: .22s; }
.js .reveal .bar:nth-child(3) .bar-fill { transition-delay: .29s; }
.js .reveal .bar:nth-child(4) .bar-fill { transition-delay: .36s; }
.js .reveal .bar:nth-child(5) .bar-fill { transition-delay: .43s; }
.js .reveal .bar:nth-child(6) .bar-fill { transition-delay: .5s; }
.js .reveal .bar:nth-child(n+7) .bar-fill { transition-delay: .57s; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .hero-name .line > span { animation: rise 1.15s var(--ease) both; }
  .hero-name .line + .line > span { animation-delay: .09s; }
  .hero .eyebrow, .hero-roles, .hero-statement, .hero-actions, .hero-facts, .hero-portrait, .scroll-cue { animation: fade-up 1s var(--ease) both; }
  .hero .eyebrow { animation-delay: .05s; }
  .hero-roles { animation-delay: .3s; }
  .hero-statement { animation-delay: .4s; }
  .hero-actions { animation-delay: .5s; }
  .hero-portrait { animation: pop 1.2s var(--ease) .25s both; }
  .hero-facts { animation-delay: .65s; }
  .scroll-cue { animation-delay: 1s; }
  .scroll-cue::after { animation: cue 2.4s ease-in-out 1.6s infinite; transform-origin: top; }
  .pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: ping 2.4s ease-out infinite; }
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .reveal .bar-fill { opacity: 1; transform: none; transition: none; }
}
@keyframes rise { from { transform: translateY(108%); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(18px); } }
@keyframes pop { from { opacity: 0; transform: scale(.86); } }
@keyframes ping { 0% { transform: scale(1); opacity: .7; } 80%, 100% { transform: scale(3.2); opacity: 0; } }
@keyframes cue { 0% { transform: scaleY(0); } 45% { transform: scaleY(1); transform-origin: top; } 55% { transform: scaleY(1); transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- smaller screens ---------- */

@media (max-width: 1080px) {
  .toc { display: none; }
  .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project, .projects--lead-2 .project:nth-child(-n+2), .projects--lead-1 .project:first-child { grid-column: auto; }
  .projects .project:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .skill-group { grid-template-columns: 200px minmax(0, 1fr); }
}

@media (max-width: 899px) {
  .scroll-cue { display: none; }
  .hero-facts { grid-template-columns: 1fr 1fr; }
  .hero-facts > :first-child { grid-column: 1 / -1; }

  .career-viewport { overflow: visible; }
  .career-rail { width: auto; padding: 0 var(--gutter); }
  .career-line { top: 0; bottom: 0; left: calc(var(--gutter) + 4px); right: auto; width: 1px; height: auto; }
  .career-stops { flex-direction: column; gap: 30px; }
  .stop { width: auto; }
  .stop-link { padding: 0 0 0 30px; }
  .stop-dot { top: 4px; }
  .stop-ghost { display: none; }
  .stop-company { margin-top: 4px; }

  .xp-wrap { --when: 0px; }
  .xp { position: relative; grid-template-columns: minmax(0, 1fr); padding-left: 30px; }
  .xp-when-inner { position: static; flex-direction: row; align-items: baseline; gap: 12px; padding: 0; margin-bottom: 10px; }
  .xp-dot { left: -4px; right: auto; top: 12px; }
  .xp-y1 { font-size: 34px; }
  .xp-body { padding: 0; }

  .skill-group { grid-template-columns: minmax(0, 1fr); }
  .about { grid-template-columns: minmax(0, 1fr); }
  .about-portrait { max-width: 360px; }
}

@media (max-width: 640px) {
  :root { --bar-h: 58px; }
  .backdrop-mark { --size: 165vw; top: -2vh; }
  .brand-word { display: none; }
  .hero-main { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .hero-portrait-wrap { grid-row: 1; margin-bottom: 26px; }
  .hero-portrait { width: 84px; box-shadow: 0 0 0 8px rgba(255, 255, 255, .035), 0 20px 50px rgba(3, 10, 30, .5); }
  .hero-facts { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .btn { padding: 13px 18px; }
  .projects { grid-template-columns: minmax(0, 1fr); }
  .project { padding: 24px 22px; }
  .bar { grid-template-columns: 6.2em minmax(0, 1fr) 4.2em; gap: 4px 12px; }
  .bar-name { font-size: 15px; }
}

@media print {
  .backdrop, .topbar, .scroll-cue { display: none; }
  body { background: #fff; color: #111; }
  .js .reveal { opacity: 1; transform: none; }
}
