/* ---------- fonts ---------- */
@font-face {
  font-family: "Geist";
  src: url("assets/fonts/geist-latin-wght-normal.woff2") format("woff2-variations"),
       url("assets/fonts/geist-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("assets/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("assets/fonts/jetbrains-mono-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  color-scheme: dark;
  --bg: #08090c;
  --bg-2: #0d0f14;
  --surface: rgba(255, 255, 255, 0.025);
  --surface-2: #11141a;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #e8ebf0;
  --text-2: #a3abb8;
  --muted: #6b7380;
  --accent: #6ee7a0;
  --accent-2: #3ccf7e;
  --accent-ink: #03170b;
  --accent-glow: rgba(110, 231, 160, 0.14);
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --max: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  --radius: 14px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
/* faint engineering grid that fades out below the hero */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 0%, transparent 70%);
  opacity: .55;
}
body::after {
  content: "";
  position: fixed; left: 50%; top: -280px; z-index: -1; pointer-events: none;
  width: 900px; height: 600px; transform: translateX(-50%);
  background: radial-gradient(closest-side, var(--accent-glow), transparent);
  filter: blur(20px);
}

a { color: inherit; }
img { max-width: 100%; display: block; }
.mono { font-family: var(--mono); }
.accent { color: var(--accent); }
.muted { color: var(--muted); }
.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: var(--accent-ink); }

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 50;
  background: var(--accent); color: var(--accent-ink);
  padding: 8px 12px; border-radius: 8px; font-weight: 600;
}
.skip:focus { left: 8px; }

kbd {
  font-family: var(--mono); font-size: 11px; line-height: 1;
  padding: 3px 5px; border-radius: 4px;
  border: 1px solid var(--line-2); color: var(--text-2);
}

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 28px;
  padding: 14px max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
  background: rgba(8, 9, 12, 0.72);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s;
  font-size: 13.5px;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__brand { text-decoration: none; font-weight: 700; letter-spacing: -0.01em; }
.nav__links { display: flex; gap: 24px; margin-left: auto; }
.nav__links a { text-decoration: none; color: var(--text-2); transition: color .15s; }
.nav__links a:hover, .nav__links a.is-active { color: var(--text); }
.nav__links a.is-active::before { content: "> "; color: var(--accent); }
.nav__resume {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 10px 7px 12px;
  background: transparent; color: var(--text);
  border: 1px solid var(--line-2); border-radius: 8px;
  font-size: 13px; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.nav__resume:hover { border-color: var(--accent); background: var(--accent-glow); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px;
  border: 1px solid var(--line-2); border-radius: 10px;
  background: var(--surface); color: var(--text);
  font: 500 15px/1.2 var(--sans); text-decoration: none; cursor: pointer;
  transition: border-color .15s, background .15s, transform .15s var(--ease), box-shadow .2s;
}
.btn:hover { border-color: rgba(255,255,255,.28); background: rgba(255,255,255,.05); transform: translateY(-1px); }
.btn--primary {
  background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600;
  box-shadow: 0 0 0 0 var(--accent-glow), 0 8px 24px -10px rgba(110,231,160,.55);
}
.btn--primary:hover { background: #8af0b6; border-color: #8af0b6; box-shadow: 0 0 0 6px var(--accent-glow), 0 10px 28px -10px rgba(110,231,160,.7); }
.btn--sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 64px; align-items: center;
  min-height: calc(100svh - 64px);
  padding-block: 64px 96px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 28px; padding: 6px 12px 6px 10px;
  border: 1px solid var(--line-2); border-radius: 999px;
  background: var(--surface);
  font-size: 12.5px; color: var(--text-2);
}
.eyebrow { padding: 4px 14px 4px 4px; }
.eyebrow strong { color: var(--text); font-weight: 700; }
.eyebrow__avatar {
  width: 28px; height: 28px; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 1px var(--line-2);
}
.sig { display: flex; align-items: center; gap: 22px; margin-bottom: 32px; }
.sig .lede { margin: 0; }
.sig__photo {
  flex: none; width: 84px; height: 84px; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px rgba(110,231,160,.55), 0 10px 30px -10px rgba(0,0,0,.8);
}
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 0 rgba(110,231,160,.6);
  animation: pulse 2.4s infinite;
}
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(110,231,160,.55); } 70%,100% { box-shadow: 0 0 0 9px rgba(110,231,160,0); } }

.hero h1 {
  margin: 0 0 24px;
  font-size: clamp(2.4rem, 4.8vw, 3.7rem);
  line-height: 1.04; letter-spacing: -0.045em; font-weight: 640;
  text-wrap: balance;
}
.hl {
  background: linear-gradient(92deg, var(--accent) 10%, #b5f5cf 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede__name { color: var(--text); font-weight: 600; }
.lede { margin: 0 0 36px; max-width: 46ch; color: var(--text-2); font-size: 1.12rem; text-wrap: pretty; }

/* terminal card */
.term {
  position: relative;
  border: 1px solid var(--line-2); border-radius: var(--radius);
  background: linear-gradient(180deg, #11141a, #0b0d11);
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(0,0,0,.4), 0 0 80px -20px var(--accent-glow);
  overflow: hidden;
}
.term__bar {
  display: flex; align-items: center; gap: 7px;
  padding: 12px 14px; border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.02);
}
.term__bar span, .sheet__dots span { width: 11px; height: 11px; border-radius: 50%; background: #2a2f38; }
.term__bar span:nth-child(1), .sheet__dots span:nth-child(1) { background: #ff5f57; }
.term__bar span:nth-child(2), .sheet__dots span:nth-child(2) { background: #febc2e; }
.term__bar span:nth-child(3), .sheet__dots span:nth-child(3) { background: #28c840; }
.term__bar { position: relative; }
.term__bar p {
  position: absolute; left: 50%; transform: translateX(-50%);
  margin: 0; font-size: 12px; color: var(--muted); white-space: nowrap;
}
/* portrait badge overlapping the terminal's top-right corner */
.term-wrap { position: relative; }
.portrait {
  position: absolute; z-index: 2; top: -40px; right: 18px; margin: 0;
  width: 88px; height: 88px; border-radius: 50%;
}
.portrait img {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 4.5px rgba(110,231,160,.6), 0 18px 40px -12px rgba(0,0,0,.9);
}
.portrait__status {
  position: absolute; right: 4px; bottom: 4px;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--accent); border: 3px solid var(--bg);
  animation: pulse 2.4s infinite;
}
.term__body {
  margin: 0; padding: 22px 22px 26px;
  font-size: 13.5px; line-height: 1.85;
  white-space: pre-wrap; word-break: break-word;
  display: grid;
  color: var(--text);
}
.term__ghost, .term__live { grid-area: 1 / 1; }
.term__ghost { visibility: hidden; }
.term__body .p { color: var(--accent); }
.term__body .o { color: var(--text-2); }
.term__body .ok { color: var(--accent); }
.term__body .hint { color: var(--muted); }
.cursor {
  display: inline-block; width: .6ch; height: 1.1em; vertical-align: -0.2em;
  background: var(--accent); animation: blink 1.05s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.scroll-cue {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); text-decoration: none; transition: color .2s;
}
.scroll-cue:hover { color: var(--accent); }
.scroll-cue .wheel { animation: wheel 1.8s var(--ease) infinite; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(7px); opacity: 0; } 100% { opacity: 0; } }

/* ---------- sections ---------- */
.section { padding-block: 112px 0; }
.section__head { margin-bottom: 48px; }
.kicker { margin: 0 0 14px; font-size: 12.5px; color: var(--accent); letter-spacing: .02em; }
.kicker span { color: var(--muted); }
.section h2, .contact h2 {
  margin: 0; max-width: 22ch;
  font-size: clamp(1.9rem, 3.6vw, 2.75rem);
  line-height: 1.1; letter-spacing: -0.035em; font-weight: 620;
  text-wrap: balance;
}

/* card hover glow that follows the cursor */
.glow { position: relative; isolation: isolate; }
.glow::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(110,231,160,.09), transparent 60%);
  opacity: 0; transition: opacity .3s;
}
.glow:hover::before { opacity: 1; }

/* impact */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); overflow: hidden;
}
/* subgrid keeps number, label and detail on shared rows so every column lines up */
.stat {
  display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0;
  align-content: start;
  padding: 30px 26px 32px; border-left: 1px solid var(--line);
}
.stat:first-child { border-left: 0; }
.stat__num {
  margin: 0 0 6px;
  font-size: clamp(2.1rem, 3.4vw, 2.7rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1.1;
  color: var(--text); font-variant-numeric: tabular-nums;
}
.stat__label { text-wrap: balance; margin: 0 0 16px; font-weight: 550; color: var(--text); font-size: .98rem; line-height: 1.4; }
.stat__detail { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.55; }

/* capabilities */
.caps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cap {
  display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; align-content: start;
  padding: 26px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); transition: border-color .25s, transform .25s var(--ease);
}
.cap:hover { border-color: rgba(110,231,160,.35); transform: translateY(-2px); }
.cap__cmd { margin: 0 0 22px; font-size: 12.5px; color: var(--text-2); }
.cap h3 { margin: 0 0 8px; font-size: 1.15rem; letter-spacing: -0.02em; font-weight: 600; }
.cap p:last-child { margin: 0; color: var(--text-2); font-size: .97rem; }

/* experience timeline */
.timeline { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.job {
  display: grid; grid-template-columns: 180px 1fr; gap: 32px;
  align-items: baseline; /* date sits on the same baseline as the job title */
  padding: 36px 0; border-bottom: 1px solid var(--line);
}
.job__when { margin: 0; font-size: 13px; color: var(--muted); white-space: nowrap; }
.job h3 { margin: 0; font-size: 1.25rem; line-height: 1.35; letter-spacing: -0.02em; font-weight: 600; text-wrap: balance; }
.job .at { color: var(--accent); font-weight: 500; white-space: nowrap; }
.job__sub { margin: 4px 0 16px; color: var(--muted); font-size: .93rem; }
.job ul { margin: 0 0 20px; padding: 0; list-style: none; max-width: 68ch; }
.job li { position: relative; padding-left: 22px; margin-bottom: 8px; color: var(--text-2); text-wrap: pretty; }
.job li::before { content: "›"; position: absolute; left: 4px; color: var(--accent); font-family: var(--mono); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.tags span {
  font-size: 12px; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--line-2); color: var(--text-2); background: rgba(255,255,255,.02);
}

/* certifications + education: name on the left, year pinned right on the same line */
.creds { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 40px; }
.creds article { padding: 24px 26px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.creds .kicker { margin-bottom: 6px; }
.rows { margin: 0; }
.row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 20px;
  padding: 12px 0;
}
.row + .row { border-top: 1px dashed var(--line); }
.row dt { font-weight: 550; line-height: 1.4; }
.row dt small + small { margin-top: 0; }
.row dt small { display: block; margin-top: 3px; font-size: .88rem; font-weight: 400; color: var(--muted); }
.row dd { margin: 0; flex: none; font-family: var(--mono); font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* toolbox: floating tiles */
.toolbox {
  margin-top: 16px; padding: 26px 26px 32px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  overflow: hidden;
}
.toolbox__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.toolbox__head .kicker { margin: 0; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; list-style: none; font-size: 12px; color: var(--muted); }
.legend li { display: inline-flex; align-items: center; gap: 7px; }
.legend li::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--c); }
.tools {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px;
  margin: 0; padding: 4px 0 0; list-style: none;
}
.tool {
  --c: var(--accent);
  display: flex; align-items: center; gap: 11px;
  padding: 12px 14px;
  border: 1px solid var(--line-2); border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.01));
  font-family: var(--mono); font-size: 13px; color: var(--text);
  box-shadow: 0 10px 24px -16px rgba(0,0,0,.9);
  animation: float 6s ease-in-out infinite;
  transition: border-color .25s, box-shadow .25s, background .25s;
}
.tool svg { flex: none; width: 20px; height: 20px; color: var(--c); }
.tool:hover {
  border-color: color-mix(in srgb, var(--c) 55%, transparent);
  background: color-mix(in srgb, var(--c) 8%, transparent);
  box-shadow: 0 14px 30px -14px color-mix(in srgb, var(--c) 45%, transparent);
  animation-play-state: paused;
}
/* stagger so tiles drift independently instead of bobbing in unison */
.tool:nth-child(3n+1) { animation-duration: 5.6s; }
.tool:nth-child(3n+2) { animation-duration: 6.8s; animation-delay: -2.1s; }
.tool:nth-child(3n)   { animation-duration: 7.6s; animation-delay: -4.3s; }
.tool:nth-child(4n+1) { animation-delay: -1.2s; }
.tool:nth-child(5n)   { animation-delay: -3.4s; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
[data-cat="db"]    { --c: #6ee7a0; }
[data-cat="cloud"] { --c: #7cc4ff; }
[data-cat="infra"] { --c: #b69cff; }
[data-cat="obs"]   { --c: #f5c46b; }
[data-cat="code"]  { --c: #ff9e88; }

/* contact */
.contact { padding-block: 140px 40px; }
.contact h2 { max-width: 20ch; margin-bottom: 20px; font-size: clamp(2rem, 4.4vw, 3.3rem); }
.contact h2 em { font-style: normal; color: var(--accent); }

/* footer */
.footer {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 100px; padding-block: 28px 44px;
  border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--text-2);
}
.footer a { color: var(--text-2); text-decoration: none; }
.footer a:hover { color: var(--accent); }

/* ---------- floating resume button ---------- */
.fab {
  position: fixed; right: 24px; bottom: 24px; z-index: 25;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 16px 12px 14px;
  border: 1px solid rgba(110,231,160,.4); border-radius: 999px;
  background: rgba(13, 15, 20, .88); color: var(--text);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 12px 32px -12px rgba(0,0,0,.9), 0 0 0 4px var(--accent-glow);
  font-size: 13px; cursor: pointer;
  opacity: 0; transform: translateY(16px) scale(.96); pointer-events: none;
  transition: opacity .35s var(--ease), transform .35s var(--ease), border-color .2s;
}
.fab svg { color: var(--accent); }
.fab.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.fab:hover { border-color: var(--accent); }

/* ---------- resume sheet ---------- */
.sheet {
  position: fixed; inset: 0 0 0 auto; margin: 0;
  width: min(820px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh;
  padding: 0; border: 0; border-left: 1px solid var(--line-2);
  background: var(--bg-2); color: var(--text);
  display: flex; flex-direction: column;
  box-shadow: -40px 0 80px -20px rgba(0,0,0,.7);
  transform: translateX(100%);
  transition: transform .45s var(--ease), overlay .45s allow-discrete, display .45s allow-discrete;
}
.sheet:not([open]) { display: none; }
.sheet[open] { transform: translateX(0); }
@starting-style { .sheet[open] { transform: translateX(100%); } }
.sheet::backdrop {
  background: rgba(3, 4, 6, 0); backdrop-filter: blur(0);
  transition: background .45s, backdrop-filter .45s, overlay .45s allow-discrete, display .45s allow-discrete;
}
.sheet[open]::backdrop { background: rgba(3, 4, 6, .6); backdrop-filter: blur(6px); }
@starting-style { .sheet[open]::backdrop { background: rgba(3, 4, 6, 0); backdrop-filter: blur(0); } }

.sheet__bar {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px 12px 18px; border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.02);
}
.sheet__dots { display: flex; gap: 7px; }
.sheet__bar > p { margin: 0; font-size: 12.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.sheet__close {
  display: grid; place-items: center; width: 34px; height: 34px;
  border: 1px solid var(--line-2); border-radius: 8px;
  background: transparent; color: var(--text-2); cursor: pointer;
}
.sheet__close:hover { color: var(--text); border-color: rgba(255,255,255,.3); }
.sheet__body { flex: 1; overflow-y: auto; padding: 28px; overscroll-behavior: contain; }
.sheet__page {
  width: 100%; height: auto; margin: 0 auto; max-width: 760px;
  border-radius: 6px; background: #fff;
  box-shadow: 0 20px 60px -20px rgba(0,0,0,.8);
  opacity: 0; transform: translateY(14px);
  transition: opacity .5s var(--ease) .15s, transform .5s var(--ease) .15s;
}
.sheet[open] .sheet__page.is-loaded { opacity: 1; transform: none; }

/* ---------- scroll reveal ---------- */

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 0; min-height: 0; padding-block: 48px 72px; }
  /* single column: headline, then terminal, then intro and buttons */
  .hero__copy { display: contents; }
  .hero h1 { order: 1; margin-bottom: 52px; }
  .term-wrap { order: 2; margin-bottom: 36px; }
  .hero .lede { order: 3; margin-bottom: 28px; }
  .hero .cta { order: 4; }
  .term { transform: none; }
  .scroll-cue { display: none; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .caps { grid-template-columns: 1fr; }
  .creds { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav { gap: 14px; }
  .nav__links { display: none; }
  .nav__resume { margin-left: auto; }
  .nav__resume kbd { display: none; }
  .eyebrow__role, .term__body .hint { display: none; }
  .portrait { width: 68px; height: 68px; top: -32px; right: 12px; }
  .portrait__status { width: 13px; height: 13px; right: 2px; bottom: 2px; }
  .cta { flex-direction: column; }
  .cta .btn { justify-content: center; }
  .tools { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .tool { padding: 11px 12px; font-size: 12.5px; }
  .toolbox, .creds article { padding-inline: 20px; }
  .section { padding-block: 80px 0; }
  .stats { grid-template-columns: 1fr; }
  .stat { border-left: 0 !important; }
  .stat + .stat { border-top: 1px solid var(--line); }
  .job { grid-template-columns: 1fr; gap: 8px; padding: 28px 0; }
  .term__body { font-size: 12px; padding: 18px; }
  .contact { padding-top: 100px; }
  .fab { right: 16px; bottom: 16px; }
  .fab span { display: none; }
  .fab { padding: 14px; }
  .sheet { width: 100vw; border-left: 0; }
  .sheet__body { padding: 14px; }
  .sheet__bar > p, .sheet__dots { display: none; }
}

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

/* ======================================================================
   Scroll effects: live shell path + sections that "boot" as they arrive
   ====================================================================== */

/* live shell path in the nav: ~/redden.work/<section> */
.nav__path { color: var(--text-2); font-weight: 400; }
.nav__cursor {
  display: inline-block; width: .55ch; height: 1.05em; margin-left: 2px; vertical-align: -0.18em;
  background: var(--accent); opacity: .85;
  animation: blink 1.05s steps(1) infinite;
}

/* heading: each word rises out of a mask */
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .14em; margin-bottom: -.14em; }
.split .w > span { display: inline-block; }
.js .split .w > span {
  transform: translateY(108%);
  transition: transform .9s var(--ease);
  transition-delay: calc(var(--d0, 0ms) + var(--wi, 0) * 55ms);
}
.js .is-live .split .w > span { transform: none; }

/* content: comes into focus from slightly below, staggered */
.js .reveal {
  opacity: 0; transform: none; translate: 0 26px; filter: blur(8px);
  transition: opacity .9s var(--ease), translate .9s var(--ease), filter .9s var(--ease);
  transition-delay: var(--rd, 0ms);
}
.js .reveal.is-in { opacity: 1; translate: 0 0; filter: none; }

/* toolbox tiles pop in one by one, then start floating */
.js .tool {
  opacity: 0; scale: .86;
  transition: opacity .5s var(--ease), scale .6s cubic-bezier(.3, 1.6, .5, 1), border-color .25s, box-shadow .25s, background .25s;
  transition-delay: calc(var(--rd, 0ms) + 250ms + var(--ti, 0) * 45ms), calc(var(--rd, 0ms) + 250ms + var(--ti, 0) * 45ms), 0s, 0s, 0s;
}
.js .toolbox.is-in .tool { opacity: 1; scale: 1; }

/* leaving: sections dim and drift up as they slide off the top */
.section { opacity: calc(1 - var(--exit, 0) * .85); translate: 0 calc(var(--exit, 0) * -28px); }
.contact { opacity: 1; translate: none; }
/* hero depth: headline and terminal drift apart at different speeds */
.hero h1, .hero .lede, .hero .cta { opacity: calc(1 - var(--exit, 0)); translate: 0 calc(var(--exit, 0) * -36px); }
.term-wrap { opacity: calc(1 - var(--exit, 0) * .9); translate: 0 calc(var(--exit, 0) * -90px); }

@media (max-width: 640px) {
  .nav__brand { font-size: 12.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .nav__cursor { opacity: .85; }
  .js .split .w > span, .js .reveal, .js .tool { transform: none; translate: none; filter: none; opacity: 1; scale: 1; }
  .section, .hero h1, .hero .lede, .hero .cta, .term-wrap { opacity: 1; translate: none; }
}
