/* ============================================================
   Yoni Ryabinski — "Resilient Systems" design system
   Dark editorial-engineering. Fraunces + Newsreader + IBM Plex Mono.
   Charcoal · parchment · ember.
   ============================================================ */

:root {
  --ink:        #0E0F11;
  --ink-2:      #15171A;
  --ink-3:      #1C2025;
  --paper:      #F4EFE5;
  --text:       #ECE7DC;
  --text-dim:   #9E988B;
  --text-faint: #6A655B;
  --ember:      #E07A45;
  --ember-br:   #F39058;
  --ember-deep: #C2562A;
  --green:      #93B49B;
  --line:       rgba(236, 231, 220, 0.11);
  --line-2:     rgba(236, 231, 220, 0.20);

  --display: "Fraunces", Georgia, serif;
  --body:    "Newsreader", Georgia, serif;
  --mono:    "IBM Plex Mono", ui-monospace, monospace;

  --maxw: 1180px;
  --pad: clamp(20px, 5vw, 64px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--body);
  font-size: clamp(16px, 1.05vw + 13px, 19px);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--ember); color: var(--ink); }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* grain / atmosphere overlay */
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: 0.045; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60vw 50vh at 78% -8%, rgba(224,122,69,0.10), transparent 60%),
    radial-gradient(50vw 40vh at 0% 12%, rgba(147,180,155,0.05), transparent 55%);
}

/* ---------- shared bits ---------- */
.eyebrow, .kicker, .nav, .stat__l, .talk__meta, .cluster__label, .foot__mono, .figcaption, figcaption {
  font-family: var(--mono);
}

.eyebrow {
  font-size: 0.72rem; letter-spacing: 0.16em; color: var(--text-dim);
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.4em 0.6em;
  margin-bottom: 1.6rem; line-height: 1.5;
}
.status {
  width: 7px; height: 7px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 0 rgba(147,180,155,0.5); animation: pulse 2.6s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(147,180,155,0.45); }
  70% { box-shadow: 0 0 0 7px rgba(147,180,155,0); }
  100% { box-shadow: 0 0 0 0 rgba(147,180,155,0); }
}

.kicker {
  font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ember); margin-bottom: 2.2rem;
  display: flex; align-items: center; gap: 0.9em;
}
.kicker::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.h2 {
  font-family: var(--display); font-optical-sizing: auto;
  font-weight: 600; font-size: clamp(1.7rem, 3.4vw, 2.7rem);
  line-height: 1.08; letter-spacing: -0.015em; color: var(--text);
}

.btn {
  font-family: var(--mono); font-size: 0.82rem; letter-spacing: 0.03em;
  padding: 0.82em 1.3em; border-radius: 2px;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  transition: transform .25s ease, background .25s ease, border-color .25s ease, color .25s ease;
  white-space: nowrap; line-height: 1;
}
.btn-ico { width: 14px; height: 14px; fill: currentColor; flex: none; }
.btn--primary { background: var(--ember); color: #19120d; font-weight: 500; }
.btn--primary:hover { background: var(--ember-br); transform: translateY(-2px); }
.btn--ghost { background: transparent; border: 1px solid var(--line-2); color: var(--text); }
.btn--ghost:hover { border-color: var(--ember); color: var(--ember); transform: translateY(-2px); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem var(--pad);
  background: rgba(14,15,17,0.72); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav__brand { display: flex; align-items: center; gap: 0.7rem; }
.nav__mark {
  font-family: var(--display); font-weight: 900; color: var(--ember);
  border: 1px solid var(--line-2); border-radius: 4px; padding: 0.1em 0.42em;
  font-size: 0.95rem; line-height: 1;
}
.nav__name { font-size: 0.78rem; letter-spacing: 0.18em; color: var(--text); }
.nav__links { display: flex; gap: 1.4rem; font-size: 0.74rem; letter-spacing: 0.05em; color: var(--text-dim); }
.nav__links a { transition: color .2s; }
.nav__links a:hover { color: var(--ember); }
.nav__social { font-size: 0.74rem; color: var(--text-dim); display: flex; align-items: center; gap: 0.5rem; }
.nav__social a { display: inline-flex; align-items: center; gap: 0.42em; transition: color .2s; }
.nav__social a:hover { color: var(--ember); }
.nav__social .ico { width: 14px; height: 14px; fill: currentColor; flex: none; }
.nav__social .dot { color: var(--text-faint); }

/* ---------- hero ---------- */
.hero {
  position: relative; z-index: 2;
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(3rem, 9vh, 7rem) var(--pad) clamp(2.5rem, 6vh, 4rem);
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero__title {
  font-family: var(--display); font-optical-sizing: auto;
  font-weight: 600; font-size: clamp(2.5rem, 6.2vw, 5rem); line-height: 1.0;
  letter-spacing: -0.025em; margin-bottom: 1.8rem;
}
.hero__title span { display: block; }
.hero__title-em { color: var(--ember); font-style: italic; font-weight: 500; margin-top: 0.12em; }
.hero__sub { color: var(--text-dim); max-width: 46ch; margin-bottom: 2.2rem; }
.hero__sub strong { color: var(--text); font-weight: 500; }
.hero__cta { display: flex; gap: 0.9rem; flex-wrap: wrap; }

.hero__media {
  position: relative; border-radius: 4px; overflow: hidden;
  border: 1px solid var(--line-2); box-shadow: 0 30px 70px -30px rgba(0,0,0,0.8);
}
.hero__media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; filter: saturate(1.02) contrast(1.02); }
.hero__media figcaption {
  position: absolute; left: 0; bottom: 0; right: 0;
  font-size: 0.66rem; letter-spacing: 0.04em; color: var(--text);
  padding: 1.4rem 1rem 0.8rem; display: flex; align-items: center; gap: 0.5em;
  background: linear-gradient(to top, rgba(8,8,9,0.92), transparent);
}
.tick { width: 6px; height: 6px; background: var(--ember); border-radius: 1px; display: inline-block; flex: none; }

/* ---------- stats ---------- */
.stats {
  position: relative; z-index: 2;
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad);
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.stat { padding: 1.8rem 1.2rem 1.8rem 0; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat__n { display: block; font-family: var(--display); font-weight: 600; font-size: clamp(2rem, 4vw, 3rem); color: var(--text); line-height: 1; letter-spacing: -0.02em; }
.stat__u { font-size: 0.42em; color: var(--ember); font-family: var(--mono); letter-spacing: 0; vertical-align: super; margin-left: 0.1em; }
.stat__l { display: block; font-size: 0.68rem; letter-spacing: 0.04em; color: var(--text-dim); margin-top: 0.7rem; line-height: 1.4; }

/* ---------- sections ---------- */
.section { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; padding: clamp(4rem, 10vh, 8rem) var(--pad); }

.about__grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 5vw, 4.5rem); }
.about__lead .h2 { margin-bottom: 1.8rem; }
.about__portrait { border-radius: 4px; overflow: hidden; border: 1px solid var(--line-2); position: relative; }
.about__portrait img { width: 100%; aspect-ratio: 3/3.6; object-fit: cover; }
.about__portrait figcaption { position: absolute; left: 0; right: 0; bottom: 0; font-size: 0.64rem; color: var(--text); padding: 1.6rem 0.9rem 0.7rem; display: flex; gap: 0.5em; align-items: center; background: linear-gradient(to top, rgba(8,8,9,0.92), transparent); }
.about__body p { margin-bottom: 1.3rem; color: var(--text-dim); }
.about__body strong { color: var(--text); font-weight: 500; }
.about__body em { color: var(--text); font-style: italic; }

.quote { margin-top: 2.4rem; padding-left: 1.4rem; border-left: 2px solid var(--ember); }
.quote blockquote { font-family: var(--display); font-style: italic; font-weight: 400; font-size: 1.18rem; line-height: 1.45; color: var(--text); }
.quote figcaption { font-size: 0.72rem; color: var(--text-dim); margin-top: 0.9rem; letter-spacing: 0.02em; }

/* ---------- speaking ---------- */
.stage__grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.stage__list .h2 { margin-bottom: 2rem; }
.talks { list-style: none; }
.talks li { border-top: 1px solid var(--line); }
.talks li:last-child { border-bottom: 1px solid var(--line); }
.talks a {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "meta go" "title go";
  gap: 0.1rem 1rem; padding: 1.25rem 0.4rem 1.25rem 0;
  transition: padding .3s ease, background .3s ease;
}
.talks a:hover { padding-left: 1rem; background: linear-gradient(90deg, rgba(224,122,69,0.06), transparent); }
.talk__meta { grid-area: meta; font-size: 0.66rem; letter-spacing: 0.08em; color: var(--ember); text-transform: uppercase; }
.talk__title { grid-area: title; font-family: var(--display); font-size: 1.12rem; color: var(--text); line-height: 1.25; }
.talk__go { grid-area: go; align-self: center; color: var(--text-faint); transition: transform .3s, color .3s; }
.talks a:hover .talk__go { color: var(--ember); transform: translate(3px, -3px); }

.stage__media { display: flex; flex-direction: column; gap: 1.4rem; padding-top: 0.5rem; }
.polaroid { background: var(--paper); padding: 0.7rem 0.7rem 0; border-radius: 2px; box-shadow: 0 18px 40px -20px rgba(0,0,0,0.75); transform: rotate(-1.4deg); transition: transform .4s ease; }
.polaroid--offset { transform: rotate(1.8deg); margin-left: auto; margin-right: -0.4rem; }
.polaroid:hover { transform: rotate(0) translateY(-4px); }
.polaroid img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 1px; }
.polaroid figcaption { font-size: 0.62rem; color: #5b5347; padding: 0.7rem 0.2rem; letter-spacing: 0.02em; }

/* ---------- building ---------- */
.building__head { display: flex; justify-content: space-between; align-items: end; gap: 2rem; flex-wrap: wrap; margin-bottom: 3rem; }
.building__aside { display: flex; flex-direction: column; align-items: flex-start; gap: 0.85rem; }
.building__intro { color: var(--text-dim); max-width: 38ch; font-size: 0.96rem; }
.building__store { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-faint); transition: color .25s; }
.building__store:hover { color: var(--ember); }
.building__store .go { font-size: 0.7rem; }
.building__store:hover .go { color: var(--ember); }
.node-legend { display: inline-flex; align-items: center; gap: 0.4em; font-family: var(--mono); font-size: 0.66rem; color: var(--text-faint); margin-left: 0.4em; white-space: nowrap; }
.node-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); display: inline-block; }

.cluster { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1.6rem, 3vw, 2.6rem); align-items: start; }
.cluster__stack { display: grid; gap: clamp(1.6rem, 3vw, 2.6rem); align-content: start; }
.cluster__label { font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 1rem; padding-bottom: 0.6rem; border-bottom: 1px solid var(--line); }
.cards { list-style: none; display: flex; flex-direction: column; gap: 0.7rem; }
.card a { display: block; padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: 3px; background: var(--ink-2); transition: border-color .25s, transform .25s, background .25s; }
.card a:hover { border-color: var(--ember); transform: translateX(4px); background: var(--ink-3); }
.card__name { font-family: var(--display); font-weight: 600; font-size: 1.06rem; color: var(--text); display: flex; align-items: center; gap: 0.4em; }
.card__name .go { font-family: var(--mono); font-size: 0.7rem; color: var(--text-faint); transition: color .25s, transform .25s; }
.card a:hover .go { color: var(--ember); transform: translate(2px,-2px); }
.card__desc { display: block; font-size: 0.86rem; color: var(--text-dim); margin-top: 0.3rem; line-height: 1.45; }
/* Native-app cards are a single app-store row inside one frame: launcher icon,
   name/desc, then the official Google Play badge as the trailing CTA. The bordered
   box moves from the inner link up to the <li> so both links share one frame. */
.card--app { display: flex; align-items: center; flex-wrap: wrap; gap: 0.8rem 1rem;
  padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: 3px;
  background: var(--ink-2); transition: border-color .25s, background .25s; }
.card--app:hover { border-color: var(--ember); background: var(--ink-3); }
.card--app .card__main { flex: 1 1 230px; display: flex; align-items: center; gap: 0.9rem;
  min-width: 0; padding: 0; border: 0; border-radius: 0; background: none; }
.card--app .card__main:hover { transform: none; border: 0; background: none; }
.card__icon { flex: 0 0 auto; width: 52px; height: 52px; border-radius: 12px; border: 1px solid var(--line); object-fit: cover; }
.card__body { display: flex; flex-direction: column; min-width: 0; }

/* Official badge, unaltered, as the row's trailing CTA — never recolored or reframed. */
.card--app .card__store { flex: 0 0 auto; margin-left: auto; padding: 0; border: 0; border-radius: 0; background: none; }
.card--app .card__store:hover { transform: none; border: 0; background: none; }
.card__store img { display: block; height: 38px; width: auto; opacity: 0.9; transition: opacity .25s; }
.card--app .card__store:hover img { opacity: 1; }

/* ---------- open source ---------- */
.repos { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
.repo a { display: block; padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: 3px; background: var(--ink-2); transition: border-color .25s, transform .25s, background .25s; }
.repo a:hover { border-color: var(--ember); transform: translateY(-3px); background: var(--ink-3); }
.repo__top { display: flex; align-items: center; gap: 0.55em; margin-bottom: 0.45rem; }
.repo__ico { width: 16px; height: 16px; fill: var(--text-dim); flex: none; transition: fill .25s; }
.repo a:hover .repo__ico { fill: var(--ember); }
.repo__name { font-family: var(--mono); font-size: 0.94rem; font-weight: 500; color: var(--text); }
.repo__lang { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.04em; color: var(--ember); border: 1px solid var(--line-2); border-radius: 2px; padding: 0.12em 0.5em; margin-left: auto; }
.repo__desc { display: block; font-size: 0.85rem; color: var(--text-dim); line-height: 1.45; }

.travel-strip { margin-top: 3rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; position: relative; }
.travel-strip img { width: 100%; height: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 3px; border: 1px solid var(--line); filter: grayscale(0.15); transition: filter .4s; }
.travel-strip img:hover { filter: grayscale(0); }
.travel-strip figcaption { grid-column: 1 / -1; font-size: 0.66rem; color: var(--text-dim); letter-spacing: 0.02em; margin-top: 0.4rem; }
.travel-strip .tlink { color: var(--ember); white-space: nowrap; }
.travel-strip .tlink:hover { text-decoration: underline; }

/* ---------- contact ---------- */
.contact__inner { display: flex; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; flex-wrap: wrap; }
.contact__avatar { width: 132px; height: 132px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line-2); filter: saturate(1.03); flex: none; }
.contact__lead { color: var(--text-dim); margin: 0.8rem 0 1.6rem; max-width: 44ch; }
.contact__links { display: flex; gap: 0.8rem; flex-wrap: wrap; }

/* ---------- booking modal ---------- */
.book [hidden] { display: none !important; }
.book { border: none; padding: 0; margin: auto; background: transparent; color: var(--text); max-width: 560px; width: calc(100% - 2 * var(--pad)); max-height: calc(100vh - 8vh); overflow: visible; }
.book::backdrop { background: rgba(8, 9, 10, 0.74); backdrop-filter: blur(3px); }
.book[open] { animation: book-in .28s cubic-bezier(.2,.7,.2,1); }
@keyframes book-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.book__card {
  background: var(--ink-2); border: 1px solid var(--line-2); border-radius: 6px;
  padding: clamp(1.4rem, 4vw, 2.2rem); box-shadow: 0 24px 60px -20px rgba(0,0,0,0.7);
  max-height: calc(100vh - 8vh); overflow-y: auto;
}
.book__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; }
.book__kicker { margin-bottom: 0.7rem; }
.book__title { font-size: clamp(1.4rem, 3vw, 1.9rem); }
.book__close {
  flex: none; width: 36px; height: 36px; border: 1px solid var(--line-2); border-radius: 3px;
  background: transparent; color: var(--text-dim); cursor: pointer; display: inline-flex;
  align-items: center; justify-content: center; transition: border-color .2s, color .2s;
}
.book__close svg { width: 18px; height: 18px; }
.book__close:hover { border-color: var(--ember); color: var(--ember); }
.book__muted { color: var(--text-dim); font-size: 0.92rem; line-height: 1.5; }
.book__tz { margin-bottom: 1.2rem; }
.book__tz span[data-tz] { color: var(--text); }

.book__days { display: flex; flex-direction: column; gap: 1.3rem; max-height: 48vh; overflow-y: auto; padding-right: 0.3rem; }
.book__day-label { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ember); margin-bottom: 0.6rem; }
.book__slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 0.5rem; }
.book__slot {
  font-family: var(--mono); font-size: 0.8rem; color: var(--text); cursor: pointer;
  padding: 0.7em 0.4em; border: 1px solid var(--line-2); border-radius: 3px; background: var(--ink);
  transition: border-color .2s, color .2s, background .2s, transform .2s;
}
.book__slot:hover { border-color: var(--ember); color: var(--ember); transform: translateY(-1px); }

.book__back { background: none; border: none; color: var(--text-dim); font-family: var(--mono); font-size: 0.74rem; cursor: pointer; padding: 0; margin-bottom: 0.9rem; }
.book__back:hover { color: var(--ember); }
.book__chosen { font-family: var(--display); font-size: 1.1rem; color: var(--text); margin-bottom: 1.3rem; }
.book__form { display: flex; flex-direction: column; gap: 1rem; }
.book__field { display: flex; flex-direction: column; gap: 0.4rem; }
.book__label { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim); }
.book__input {
  font-family: var(--body); font-size: 0.95rem; color: var(--text); background: var(--ink);
  border: 1px solid var(--line-2); border-radius: 3px; padding: 0.7em 0.8em; width: 100%;
  transition: border-color .2s;
}
.book__input:focus { outline: none; border-color: var(--ember); }
.book__textarea { resize: vertical; min-height: 70px; }
.book__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.book__error { color: var(--ember-br); font-size: 0.85rem; margin: 0; }
.book__slots-note { margin-bottom: 1rem; }
.book__submit { margin-top: 0.3rem; align-self: flex-start; }
.book__submit:disabled { opacity: 0.6; cursor: default; transform: none; }

.book__check, .book__state[data-state="success"], .book__state[data-state="error"] { text-align: center; }
.book__state[data-state="success"], .book__state[data-state="error"] { display: flex; flex-direction: column; align-items: center; gap: 0.9rem; padding: 1rem 0; }
.book__check { width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--green); color: var(--green); display: inline-flex; align-items: center; justify-content: center; }
.book__check svg { width: 30px; height: 30px; }
.book__success-title { font-family: var(--display); font-size: 1.5rem; color: var(--text); margin: 0; }

.book__powered {
  margin: 1.6rem 0 0; padding-top: 1.1rem; border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.04em;
  color: var(--text-faint); display: flex; align-items: center; gap: 0.45rem;
}
.book__powered-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  color: var(--text-dim); text-decoration: none; transition: color 0.15s ease;
}
.book__powered-link:hover { color: var(--ember); }
.book__powered-logo { width: 18px; height: 18px; border-radius: 4px; display: block; }

@media (prefers-reduced-motion: reduce) {
  .book[open] { animation: none; }
}

/* ---------- footer ---------- */
.foot {
  position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto;
  padding: 2.4rem var(--pad); border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-size: 0.72rem; color: var(--text-faint); letter-spacing: 0.02em;
}
.foot__mono { font-family: var(--mono); }

/* ---------- 404 ---------- */
.nf { position: relative; z-index: 2; max-width: 640px; margin: 0 auto; padding: 22vh var(--pad) 12vh; }
.nf .h2 { margin: 0.4rem 0; }
.nf__sub { color: var(--text-dim); margin: 1.1rem 0 2rem; max-width: 44ch; }

/* ---------- reveal motion ---------- */
.reveal { opacity: 0; transform: translateY(18px); animation: rise .8s cubic-bezier(.2,.7,.2,1) forwards; animation-delay: var(--d, 0ms); }
.d-0 { --d: 0ms; } .d-1 { --d: 90ms; } .d-2 { --d: 180ms; } .d-3 { --d: 300ms; } .d-4 { --d: 360ms; } .d-5 { --d: 440ms; } .d-6 { --d: 560ms; }
@keyframes rise { to { opacity: 1; transform: none; } }
.js .section, .js .stats, .js .travel-strip { opacity: 0; transform: translateY(26px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
.section.in-view, .stats.in-view, .travel-strip.in-view { opacity: 1; transform: none; }

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

/* ---------- responsive ---------- */
@media (max-width: 920px) {
  .nav__links { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero__media { order: -1; max-width: 520px; }
  .about__grid, .stage__grid { grid-template-columns: 1fr; }
  .about__portrait { max-width: 380px; }
  .stage__media { flex-direction: row; }
  .polaroid { flex: 1; }
  .cluster, .repos { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .nav__name { display: none; }
  .stage__media, .travel-strip { flex-direction: column; }
  .travel-strip { grid-template-columns: 1fr; }
  .foot { flex-direction: column; gap: 0.5rem; }
  /* On narrow screens the app row would crowd the badge; give the icon+text the
     full width so the Google Play badge drops to its own line, left-aligned. */
  .card--app .card__main { flex-basis: 100%; }
  .card--app .card__store { margin-left: 0; }
}
