/* ==========================================================
   Umar Inagamjanov — portfolio
   One accent, hairlines, monospace details. The hero canvas
   (hero-bg.js) is the only decorative motion on the page.
   Fonts are served from assets/fonts: the page makes no third-party requests.
   ========================================================== */

/* ---------- fonts (Inter + Geist Mono, self-hosted subsets) ---------- */
@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 400 500; font-display: swap; src: url('assets/fonts/geist-mono-cyrillic-ext.woff2') format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 400 500; font-display: swap; src: url('assets/fonts/geist-mono-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 400 500; font-display: swap; src: url('assets/fonts/geist-mono-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 400 500; font-display: swap; src: url('assets/fonts/geist-mono-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 600; font-display: swap; src: url('assets/fonts/inter-cyrillic-ext.woff2') format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 600; font-display: swap; src: url('assets/fonts/inter-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 600; font-display: swap; src: url('assets/fonts/inter-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 600; font-display: swap; src: url('assets/fonts/inter-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- tokens ---------- */
:root {
  --bg: #060606;
  --bg-2: #0c0c0e;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.16);
  --text: #f5f5f7;
  --text-dim: #a1a1aa;
  --text-mute: #85858f;
  --accent: #5aa9e6;

  --sans: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', 'Cascadia Code', Consolas, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pad: 32px;
  --nav-h: 72px;
}
@media (max-width: 768px) { :root { --pad: 20px; --nav-h: 64px; } }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  color-scheme: dark;
  background: var(--bg);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 8px);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: transparent;   /* html paints #060606; the fixed glyph field (.site-bg) shows through */
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
strong { font-weight: 600; color: var(--text); }

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

.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 var(--pad); }

/* real text for assistive tech while a label shows glyphs (script.js decode) */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

.skip {
  position: absolute; left: var(--pad); top: -100px; z-index: 300;
  padding: 10px 14px; background: var(--text); color: var(--bg);
  font: 500 13px/1 var(--mono);
}
.skip:focus { top: 12px; }

/* Monospace label — the site's one recurring detail */
.mono {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--text-mute);
}

/* Inline arrow link: hairline underline, accent on hover */
.link {
  display: inline-flex; align-items: center; gap: 6px;
  border-bottom: 1px solid var(--line-2);
  padding-bottom: 1px;
  transition: color .25s var(--ease), border-color .25s var(--ease);
}
.link svg { width: 11px; height: 11px; flex: none; color: var(--accent); transition: transform .3s var(--ease); }
.link:hover { color: var(--accent); border-color: var(--accent); }
.link:hover svg { transform: translate(2px, -2px); }
/* the up-right arrow means "leaves the page"; links that stay on it point down */
.link--here svg, .btn--here svg { transform: rotate(90deg); }
.link--here:hover svg, .btn--here:hover svg { transform: translate(2px, 2px) rotate(90deg); }

/* The one call to action (nav and hero): square corners and a hairline, like everything else. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  font-size: 15px; font-weight: 500; line-height: 1; letter-spacing: -0.005em; white-space: nowrap;
  transition: color .25s var(--ease), border-color .25s var(--ease);
}
.btn svg { width: 11px; height: 11px; flex: none; color: var(--accent); transition: transform .3s var(--ease); }
.btn:hover { color: var(--accent); border-color: var(--accent); }
.btn--sm { height: 36px; padding: 0 14px; font-size: 13px; border-color: var(--line-2); }

/* Small monospace control (copy address) */
.chip {
  display: inline-flex; align-items: center; min-height: 32px; padding: 0 10px;
  border: 1px solid var(--line-2); color: var(--text-dim);
  transition: color .25s var(--ease), border-color .25s var(--ease);
}
.chip:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.34); }
.chip.is-done { color: var(--accent); border-color: var(--accent); }

/* ==========================================================
   NAV
   ========================================================== */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 100;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: background-color .35s var(--ease), border-color .35s var(--ease);
}
.nav.is-scrolled {
  background: rgba(6, 6, 6, 0.94);
  border-bottom-color: var(--line);
}
.nav__inner {
  height: 100%; max-width: 1280px; margin: 0 auto; padding: 0 var(--pad);
  display: flex; align-items: center; gap: 32px;
}
.nav__logo { display: inline-flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 500; letter-spacing: -0.01em; }
.nav__logo-mark { width: 22px; height: 26px; flex: none; transition: color .3s var(--ease); }
.nav__logo:hover .nav__logo-mark { color: var(--accent); }

.nav__menu { display: flex; gap: 28px; margin-left: auto; font-size: 14px; color: var(--text-dim); }
.nav__menu a { position: relative; padding: 4px 0; transition: color .25s var(--ease); }
.nav__menu a:hover, .nav__menu a.is-active { color: var(--text); }
.nav__menu a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
.nav__menu a.is-active::after { transform: scaleX(1); }

.nav__lang { display: inline-flex; gap: 2px; font-family: var(--mono); font-size: 12px; }
.nav__cta.is-active { border-color: var(--accent); }
.lang__btn { padding: 6px 7px; color: var(--text-mute); letter-spacing: 0.04em; transition: color .25s var(--ease); }
.lang__btn:hover { color: var(--text); }
.lang__btn.is-active { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 5px; text-decoration-thickness: 1px; }

.nav__burger { display: none; width: 40px; height: 40px; margin-right: -8px; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.nav__burger span { width: 20px; height: 1.5px; background: var(--text); transition: transform .35s var(--ease); }
.nav__burger.is-open span:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav__burger.is-open span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

/* keep in step with the matchMedia query in script.js (min-width: 981px) */
@media (max-width: 980px) {
  .nav__inner { gap: 20px; }
  .nav__menu, .nav__cta { display: none; }
  .nav__lang { margin-left: auto; }
  .nav__burger { display: flex; }
}
/* phones: the name, four language links and the menu button share one row */
@media (max-width: 480px) {
  .nav__inner { gap: 10px; }
  .nav__logo { gap: 10px; }
  .nav__lang { gap: 0; }
  .lang__btn { padding: 6px 5px; letter-spacing: 0.02em; }
}
@media (max-width: 359px) { .nav__logo-text { display: none; } }

.mobile-menu {
  position: fixed; inset: 0; z-index: 99;
  padding: calc(var(--nav-h) + 24px) var(--pad) 32px;
  background: var(--bg);
  display: flex; flex-direction: column; justify-content: space-between;
  overflow-y: auto; overscroll-behavior: contain;
  opacity: 0; visibility: hidden;
  transition: opacity .3s var(--ease), visibility .3s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; }
.mobile-menu ul { border-top: 1px solid var(--line); }
.mobile-menu li { border-bottom: 1px solid var(--line); }
.mobile-menu ul a { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 0; font-size: 28px; font-weight: 600; letter-spacing: -0.02em; }
.mobile-menu__foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; padding-top: 24px; }
.mobile-menu__links { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; font-size: 15px; }

/* ==========================================================
   HERO
   ========================================================== */
.hero {
  position: relative; isolation: isolate;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: calc(var(--nav-h) + 48px) 0 56px;
  overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: var(--bg); }

/* The hero's glyph field, continued behind the rest of the page (hero-bg.js, "ambient").
   A page-tall layer; its two-viewport window scrolls with the page and is moved by
   whole glyph rows from script. Sized in lvh so mobile URL-bar changes don't resize it. */
body { position: relative; }
.site-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.site-bg__win { position: absolute; top: 0; left: 0; width: 100%; height: 200vh; height: 200lvh; will-change: transform; background: var(--bg); }

.hero__content { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 var(--pad); }

.hero__eyebrow {
  display: flex; align-items: center; gap: 10px;
  width: fit-content;
  margin-bottom: 24px;
}
.hero__eyebrow::before { content: ''; width: 6px; height: 6px; background: var(--accent); }

.hero__title {
  font-size: clamp(56px, min(10vw, 17.5vh), 152px);   /* the vh term keeps the call to action on screen on short laptops */
  font-weight: 600;
  line-height: 0.92;
  letter-spacing: -0.04em;
  width: fit-content;
  margin-bottom: 24px;
}
.hero__title .line { display: block; overflow: hidden; padding: 0.06em 0.04em 0.14em; margin: -0.06em -0.04em -0.14em; }
.hero__title .word { display: inline-block; }

.hero__lede {
  max-width: 36ch;
  margin-bottom: 28px;
  font-size: clamp(17px, 1.45vw, 20px);
  line-height: 1.5;
  color: var(--text-dim);
}

.hero__actions { display: flex; width: fit-content; margin-bottom: clamp(36px, 6vh, 64px); }   /* fit-content: hero-bg.js clears only the area behind the button */

.hero__meta {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  max-width: 600px;
}
.hero__meta-item { padding: 16px 24px 0 0; display: flex; flex-direction: column; gap: 6px; }
.hero__meta-value { font-size: 15px; font-weight: 500; line-height: 1.4; }
@media (max-width: 768px) {
  .hero__actions { margin-bottom: 32px; }
  .hero__meta { grid-template-columns: 1fr; }
  .hero__meta-item { flex-direction: row; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .hero__meta-value { text-align: right; font-size: 14px; }
}

/* ==========================================================
   SECTIONS
   ========================================================== */
.section { padding: clamp(88px, 12vw, 152px) 0; border-top: 1px solid var(--line); }

.section__grid {
  display: grid;
  grid-template-columns: minmax(160px, 3fr) 9fr;
  column-gap: 48px;
}
.section__aside { position: sticky; top: calc(var(--nav-h) + 24px); align-self: start; padding-top: 10px; }
.section__count { margin-top: 6px; font-variant-numeric: tabular-nums; }
.section__count-now { color: var(--text); }
.section__grid--sub { margin-top: 72px; }
.section__next { margin-top: 40px; max-width: 64ch; color: var(--text-dim); }
.section__next .link { margin-left: 6px; color: var(--text); }

@media (max-width: 900px) {
  .section__grid { grid-template-columns: 1fr; }
  .section__grid--sub { margin-top: 56px; }
  .section__aside { position: static; padding: 0; margin-bottom: 20px; }
  .section__count { display: none; }
}

/* ---------- About ---------- */
.about__lead, .contact__lead {
  font-size: clamp(20px, 2.1vw, 27px);
  line-height: 1.42;
  letter-spacing: -0.015em;
  color: var(--text);
  max-width: 34ch;
  margin-bottom: 40px;
}
.about__lead strong { font-weight: 600; }
.about__cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; }
.about__text p { color: var(--text-dim); max-width: 62ch; }
.about__text p + p { margin-top: 18px; }

.facts { border-top: 1px solid var(--line); align-self: start; }
.facts__row { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.facts__row dd { text-align: right; font-weight: 500; }
[data-clock] { font-variant-numeric: tabular-nums; white-space: nowrap; }
.dot { display: inline-block; width: 6px; height: 6px; margin-right: 8px; background: var(--accent); vertical-align: 1px; }

.figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 64px; border-top: 1px solid var(--line); }
.figures__note { margin-top: 20px; }
.figure { padding: 22px 24px 0 0; }
.figure + .figure { padding-left: 24px; }
.figure__num { display: block; font-variant-numeric: tabular-nums; font-size: clamp(32px, 3.4vw, 44px); font-weight: 600; line-height: 1; letter-spacing: -0.04em; margin-bottom: 12px; }
.figure__num sup { font-size: 0.5em; vertical-align: 0.8em; margin-left: 2px; color: var(--text-mute); font-weight: 500; }

@media (max-width: 1100px) { .about__cols { grid-template-columns: 1fr; gap: 40px; } }
@media (max-width: 900px) { .figures { margin-top: 48px; } }
@media (max-width: 560px) {
  .figures__note { margin-top: 14px; }
  .figures { grid-template-columns: 1fr; }
  .figure, .figure + .figure { padding: 18px 0; border-left: 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
  .figure__num { margin: 0; font-size: 32px; }
}

/* ---------- Rows: experience & education ---------- */
.row {
  display: grid;
  grid-template-columns: minmax(150px, 2.2fr) 6.8fr;
  column-gap: 32px;
  padding: 28px 0 30px;
  border-bottom: 1px solid var(--line);
}
.row__when { padding-top: 4px; }
.row--now .row__when::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 8px; background: var(--accent); vertical-align: 1px; }
.row__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 10px; }
.row__title { font-size: 19px; font-weight: 600; line-height: 1.3; letter-spacing: -0.015em; }
.row__org { font-size: 15px; color: var(--text-dim); }
/* a company name that links out reads as a link: full-strength text, a visible rule, an accent arrow */
.row__org.link { color: var(--text); font-weight: 500; }
.row__org.link:not(:hover) { border-bottom-color: rgba(255, 255, 255, 0.32); }
.row__desc { color: var(--text-dim); max-width: 68ch; }
.row__stack { margin-top: 14px; }
.row__stack span + span::before { content: ' · '; color: var(--line-2); }

@media (max-width: 700px) {
  .row { grid-template-columns: 1fr; row-gap: 8px; padding: 24px 0; }
  .row__when { padding: 0; }
}

/* ---------- Work index ---------- */
.work__item {
  display: grid;
  grid-template-columns: minmax(150px, 2.2fr) 6.8fr;
  column-gap: 32px;
  padding: 28px 0 30px;
  border-bottom: 1px solid var(--line);
}
.work__side { display: flex; flex-direction: column; align-items: flex-start; padding-top: 8px; }
.work__idx { transition: color .25s var(--ease); }
.work__role { margin-top: 12px; color: var(--text-dim); }
.work__item:hover .work__idx { color: var(--accent); }
.work__name { font-size: clamp(22px, 2.2vw, 28px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.15; margin-bottom: 8px; }
.work__desc { color: var(--text-dim); max-width: 64ch; }
.work__stack { margin-top: 12px; }
.work__stack span + span::before { content: ' · '; color: var(--line-2); }
.work__link { grid-column: 2; justify-self: start; margin-top: 14px; font-family: var(--mono); font-size: 12.5px; color: var(--text); white-space: nowrap; }
.work__link:not(:hover) { border-bottom-color: rgba(255, 255, 255, 0.32); }

@media (max-width: 700px) {
  .work__item { grid-template-columns: 1fr; row-gap: 8px; padding: 24px 0; }
  .work__side { flex-direction: row; flex-wrap: wrap; column-gap: 12px; padding-top: 0; }
  .work__role { margin-top: 0; }
  .work__link { grid-column: 1; }
}

/* ---------- Skills ---------- */
.skills__row {
  display: grid;
  grid-template-columns: minmax(180px, 2.2fr) 6.8fr;
  column-gap: 32px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.skills__row dt { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.skills__row dd { color: var(--text-dim); }
.skills__row dd span + span::before { content: ' · '; color: var(--line-2); }
@media (max-width: 700px) {
  .skills__row { grid-template-columns: 1fr; row-gap: 6px; }
}

.row:first-child, .work__item:first-child, .skills__row:first-child { padding-top: 6px; }
.row:last-child, .work__item:last-child, .skills__row:last-child { border-bottom: 0; padding-bottom: 0; }

/* ---------- Contact ---------- */
.contact__lead { max-width: 30ch; margin-bottom: 20px; }
.contact__desc { color: var(--text-dim); max-width: 56ch; margin: 0 0 40px; }
.contact__tools { margin-top: 18px; }
.contact__email {
  display: inline-flex; align-items: center; gap: 16px;
  font-size: clamp(28px, 4.6vw, 64px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.1;
  border-bottom: 1px solid var(--line-2);
  padding-bottom: 6px;
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.contact__email svg { width: 0.5em; height: 0.5em; flex: none; transition: transform .35s var(--ease); }
.contact__email:hover { color: var(--accent); border-color: var(--accent); }
.contact__email:hover svg { transform: translate(4px, -4px); }

/* every link carries its own rule, so the grid can be 3, 2 or 1 columns without positional selectors */
.channels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 24px; margin-top: 64px; }
.channels a { display: flex; flex-direction: column; gap: 6px; padding: 16px 0 18px; border-top: 1px solid var(--line); transition: color .25s var(--ease); }
.channels a:hover .channels__value { color: var(--accent); }
.channels__value { font-size: 15px; font-weight: 500; white-space: nowrap; transition: color .25s var(--ease); }
@media (max-width: 1080px) { .channels { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .channels { grid-template-columns: 1fr; margin-top: 48px; } }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 28px 0 32px; }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.footer a:hover { color: var(--text); }

/* Privacy note: a disclosure in the footer, in the page's own type */
.privacy { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.privacy summary { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; transition: color .25s var(--ease); }
.privacy summary::-webkit-details-marker { display: none; }
.privacy summary::before { content: '+'; display: inline-block; width: 1ch; color: var(--accent); }
.privacy[open] summary::before { content: '\2212'; }
.privacy summary:hover { color: var(--text); }
.privacy__body { max-width: 72ch; padding: 16px 0 4px; font-size: 14px; line-height: 1.6; color: var(--text-dim); }
.privacy__body p + p { margin-top: 10px; }

/* ==========================================================
   MOTION — the hero headline rises once on load
   ========================================================== */
.rise { display: inline-block; transform: translateY(105%); animation: rise 1s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 90ms + 150ms); }
@keyframes rise { to { transform: none; } }

.fade { opacity: 0; animation: fade .9s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 70ms + 450ms); }
@keyframes fade { to { opacity: 1; } }

/* Below the hero the page speaks the hero's language: glyphs resolve into text
   (script.js), hairlines are plotted left to right, headlines rise out of a line mask.
   Each item plays once as it enters (.is-in on the item itself, staggered with --d). */
html.js .section,
html.js .row, html.js .work__item, html.js .skills__row, html.js .facts__row { position: relative; }

/* hairlines: each separator is plotted as the top rule of the row it introduces,
   so the line is drawn where the eye is, not one row further down */
html.js .section { border-top-color: transparent; }
html.js .row, html.js .work__item, html.js .skills__row, html.js .facts__row { border-bottom-color: transparent; }
html.js .section::before,
html.js .row + .row::before, html.js .work__item + .work__item::before, html.js .skills__row + .skills__row::before,
html.js .facts__row::after {
  content: ''; position: absolute; left: 0; right: 0; height: 1px;
  background: var(--line);
  transform: scaleX(0); transform-origin: left;
  transition: transform 1.2s var(--ease) var(--d, 0ms);
}
html.js .section::before { top: -1px; transition-duration: 1.6s; }
html.js .row + .row::before, html.js .work__item + .work__item::before, html.js .skills__row + .skills__row::before { top: -1px; }
html.js .facts__row::after { bottom: -1px; }
html.js .section.is-in::before,
html.js .row + .row.is-in::before, html.js .work__item + .work__item.is-in::before, html.js .skills__row + .skills__row.is-in::before,
html.js .facts__row.is-in::after { transform: scaleX(1); }

/* labels that resolve from glyphs appear only when their decode starts — never as plain text first */
html.js .section__label, html.js .section__count, html.js .row__when, html.js .work__idx, html.js .facts__row dt, html.js .channels .mono {
  opacity: 0;
  transition: opacity .15s linear calc(var(--d, 0ms) + 40ms), color .25s var(--ease);
}
html.js .section__aside.is-in .section__label, html.js .section__aside.is-in .section__count,
html.js .row.is-in .row__when, html.js .work__item.is-in .work__idx,
html.js .facts__row.is-in dt, html.js .channels a.is-in .mono { opacity: 1; }

/* headlines slide up out of a mask at their own bottom edge, like the hero words */
html.js .about__lead, html.js .contact__lead, html.js .row__head, html.js .work__name, html.js .contact__mail, html.js .figure__num {
  clip-path: inset(-20% -4% 100% -4%);
  transform: translateY(100%);
  transition: clip-path 1s var(--ease) calc(var(--d, 0ms) + 60ms), transform 1s var(--ease) calc(var(--d, 0ms) + 60ms);
}
html.js .about__lead, html.js .contact__lead { transform: translateY(14px); transition-duration: 1.3s; }   /* several lines: a short travel */
html.js .is-in.about__lead, html.js .is-in.contact__lead, html.js .row.is-in .row__head, html.js .work__item.is-in .work__name,
html.js .is-in.contact__mail, html.js .figure.is-in .figure__num {
  clip-path: inset(-20% -4% -40% -4%);
  transform: none;
}

/* supporting text settles in after its headline */
html.js .about__text, html.js .row__desc, html.js .work__desc, html.js .work__role, html.js .work__when, html.js .work__link, html.js .contact__desc,
html.js .figures__note, html.js .section__next, html.js .facts__row dd, html.js .skills__row dt, html.js .channels__value, html.js .figure .mono {
  opacity: 0;
  transition: opacity .8s var(--ease) calc(var(--d, 0ms) + 220ms);
}
html.js .work__link, html.js .section__next .link { transition: opacity .8s var(--ease) calc(var(--d, 0ms) + 220ms), color .25s var(--ease), border-color .25s var(--ease); }
html.js .channels__value { transition: opacity .8s var(--ease) calc(var(--d, 0ms) + 220ms), color .25s var(--ease); }
html.js .is-in.about__text, html.js .row.is-in .row__desc, html.js .work__item.is-in .work__desc, html.js .work__item.is-in .work__role,
html.js .work__item.is-in .work__when, html.js .work__item.is-in .work__link, html.js .is-in.figures__note, html.js .is-in.section__next,
html.js .is-in.contact__desc, html.js .facts__row.is-in dd, html.js .skills__row.is-in dt,
html.js .channels a.is-in .channels__value, html.js .figure.is-in .mono { opacity: 1; }

/* lists of tools/tags appear one item after another */
html.js .row__stack span, html.js .work__stack span, html.js .skills__row dd span {
  opacity: 0;
  transition: opacity .5s var(--ease) calc(var(--d, 0ms) + 320ms + var(--k, 0) * 45ms);
}
html.js .row.is-in .row__stack span, html.js .work__item.is-in .work__stack span, html.js .skills__row.is-in dd span { opacity: 1; }

/* keyboard focus never lands on something still masked */
html.js .row:focus-within .row__head, html.js .contact__mail:focus-within { clip-path: none; transform: none; transition: none; }
html.js .work__item:focus-within .work__link, html.js .channels a:focus-within .channels__value,
html.js .channels a:focus-within .mono, html.js .section__next:focus-within { opacity: 1; transition: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise, .fade { animation: none; transform: none; opacity: 1; }
  *, *::before, *::after { transition-duration: 0.01ms !important; transition-delay: 0s !important; }
}

@media (forced-colors: active) {
  .nav__burger span { background: ButtonText; }
  .dot, .hero__eyebrow::before, .row--now .row__when::before { forced-color-adjust: none; background: Highlight; }
}

@media print {
  :root { --bg: #fff; --bg-2: #fff; --text: #111; --text-dim: #333; --text-mute: #555; --accent: #1d6fb8; --line: rgba(0, 0, 0, 0.18); --line-2: rgba(0, 0, 0, 0.32); }
  html { color-scheme: light; background: #fff; }
  html.js * { opacity: 1 !important; clip-path: none !important; transform: none !important; visibility: visible !important; }
  html.js .section, html.js .row, html.js .work__item, html.js .skills__row, html.js .facts__row { border-color: var(--line) !important; }
  .hero__bg, .site-bg, .skip, .nav, .mobile-menu, .hero__actions, .contact__tools, .sr-only { display: none; }
  .hero__title .sr-only { display: block; position: static; width: auto; height: auto; overflow: visible; clip: auto; clip-path: none; white-space: normal; font-size: 0.24em; line-height: 1.4; letter-spacing: 0; }
  .hero { min-height: 0; padding: 0 0 40px; }
  .section { padding: 40px 0; }
  .section__aside { position: static; }
  .privacy summary::before { content: none; }
  .row, .work__item, .skills__row, .figure { break-inside: avoid; }
}
