/* ==========================================================================
   Mohammad Tahmeed Ryan — portfolio
   Single stylesheet. Paper-and-ink palette, no decoration for its own sake.
   ========================================================================== */

:root {
  color-scheme: dark;

  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;

  --radius: 14px;
  --radius-lg: 22px;
  --max: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Two themes: dark for the black → brown → red part of the page,
   light for the white end. Every component reads its colours from these. */
.theme-dark {
  color: var(--ink);
  --ink: #fbf7f2;
  --ink-soft: rgba(251, 247, 242, 0.79);
  --muted: rgba(251, 247, 242, 0.54);
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.26);
  --paper: #0b0806;
  --paper-2: rgba(255, 255, 255, 0.035);
  --card: rgba(255, 255, 255, 0.06);
  --accent: #f3c3ab;
  --accent-soft: rgba(243, 195, 171, 0.13);
  --chip: rgba(255, 255, 255, 0.09);
  --ghost-hover: rgba(255, 255, 255, 0.09);
  --shadow: rgba(0, 0, 0, 0.6);
  --header-bg: rgba(7, 6, 5, 0.42);
  --header-bg-stuck: rgba(7, 6, 5, 0.78);
}

.theme-light {
  color: var(--ink);
  --ink: #171410;
  --ink-soft: #3a352e;
  --muted: #6d665c;
  --line: rgba(23, 20, 16, 0.14);
  --line-strong: rgba(23, 20, 16, 0.28);
  --paper: #f7f6f2;
  --paper-2: rgba(255, 255, 255, 0.55);
  --card: #fffdfa;
  --accent: #8f2a1d;
  --accent-soft: rgba(143, 42, 29, 0.09);
  --chip: rgba(255, 255, 255, 0.72);
  --ghost-hover: rgba(255, 255, 255, 0.65);
  --shadow: rgba(23, 20, 16, 0.42);
  --header-bg: rgba(247, 246, 242, 0.76);
  --header-bg-stuck: rgba(247, 246, 242, 0.92);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
  background-color: #070605;
}

body {
  margin: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

::selection { background: var(--accent); color: var(--paper); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── layout ───────────────────────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 48px);
}

.section {
  padding-block: clamp(72px, 11vw, 132px);
  border-top: 1px solid var(--line);
}

/* ── the colour journey ────────────────────────────────────────────────
   black (hero) → brown (about) → red (qualifications, academic, hobbies)
   → white (contact, footer). Each section carries its own slice of the
   gradient, so the transitions line up with the content at any width. */

.hero { background: #070605; }

#about {
  background-image: linear-gradient(180deg, #070605 0%, #241710 48%, #3a1d10 100%);
}

#qualifications {
  background-image: linear-gradient(180deg, #3a1d10 0%, #5c1c11 52%, #7a1e12 100%);
}

#academic {
  background-image: linear-gradient(180deg, #7a1e12 0%, #932019 100%);
}

#hobbies {
  background-image: linear-gradient(180deg, #932019 0%, #a8281b 100%);
}

/* ── type ─────────────────────────────────────────────────────────────── */

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.9rem, 7.4vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  line-height: 1.06;
  max-width: 18ch;
}

h3 {
  font-size: 1.35rem;
  line-height: 1.25;
}

p { margin: 0; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow .num {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.eyebrow .num::after {
  content: "";
  display: inline-block;
  width: 26px;
  height: 1px;
  margin-left: 10px;
  vertical-align: middle;
  background: var(--line-strong);
}

.section-head { margin-bottom: clamp(40px, 6vw, 64px); }

.section-sub {
  max-width: 52ch;
  margin-top: 18px;
  color: var(--muted);
  font-weight: 300;
  font-size: 1.02rem;
}

.lead {
  font-size: clamp(1.15rem, 2.1vw, 1.42rem);
  line-height: 1.5;
  letter-spacing: -0.011em;
  color: var(--ink);
}

/* ── header ───────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.5s var(--ease), background 0.5s var(--ease),
              color 0.5s var(--ease);
}

.site-header.is-stuck {
  border-bottom-color: var(--line);
  background: var(--header-bg-stuck);
}

.header-inner {
  max-width: var(--max);
  margin-inline: auto;
  padding: 15px clamp(20px, 5vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: color 0.4s var(--ease);
}

.wordmark-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  transition: transform 0.4s var(--ease);
}

.wordmark:hover .wordmark-dot { transform: scale(1.6); }

.nav {
  display: flex;
  gap: clamp(14px, 2.6vw, 30px);
  font-size: 0.82rem;
  color: var(--muted);
}

.nav a {
  position: relative;
  padding-block: 4px;
  transition: color 0.25s ease;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease);
}

.nav a:hover,
.nav a.is-active { color: var(--ink); }

.nav a:hover::after,
.nav a.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ── hero ─────────────────────────────────────────────────────────────── */

.hero {
  padding-block: clamp(56px, 9vw, 110px) clamp(64px, 10vw, 120px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: end;
}

.hero-lede {
  max-width: 46ch;
  margin-top: 26px;
  color: var(--ink-soft);
  font-weight: 300;
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  line-height: 1.6;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--line-strong);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding-inline: 24px;
  border-radius: 100px;
  border: 1px solid transparent;
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: background 0.3s var(--ease), color 0.3s var(--ease),
              border-color 0.3s var(--ease), transform 0.3s var(--ease),
              box-shadow 0.3s var(--ease);
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--ink);
  color: var(--paper);
}

.btn-primary:hover {
  background: var(--accent);
  box-shadow: 0 14px 34px -16px var(--shadow);
}

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--ink);
  background: var(--ghost-hover);
}

.fact-link {
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 1px;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.fact-link:hover { border-color: var(--accent); color: var(--accent); }

/* portrait */

.hero-portrait { align-self: start; }

.portrait-frame {
  position: relative;
  width: 100%;
  max-width: 330px;
  margin: 0 0 0 auto;
  border-radius: 50%;
  overflow: hidden;
  background: var(--paper-2);
  border: 1px solid var(--line-strong);
  aspect-ratio: 1 / 1;
  box-shadow: 0 40px 90px -55px var(--shadow);
  transition: border-color 0.6s var(--ease), box-shadow 0.6s var(--ease);
}

.portrait-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  pointer-events: none;
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.03);
  transition: transform 1.2s var(--ease);
}

.hero-portrait:hover .portrait-frame { border-color: var(--accent); }
.hero-portrait:hover .portrait-frame img { transform: scale(1.05); }

.portrait-caption {
  margin-top: 12px;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
}

/* ── about ────────────────────────────────────────────────────────────── */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}

.about-body p + p { margin-top: 18px; }

.about-body p:not(.lead) {
  color: var(--ink-soft);
  font-weight: 300;
  max-width: 54ch;
}

.facts {
  margin: 0;
  border-top: 1px solid var(--line);
}

.fact {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 16px;
  padding-block: 14px;
  border-bottom: 1px solid var(--line);
}

.fact dt {
  font-size: 0.72rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 3px;
}

.fact dd {
  margin: 0;
  font-size: 0.94rem;
  color: var(--ink);
}

/* ── certificates ─────────────────────────────────────────────────────── */

.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: clamp(16px, 2.2vw, 26px);
}

.cert {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease),
              border-color 0.5s var(--ease);
}

a.cert:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: 0 22px 40px -30px rgba(22, 21, 15, 0.55);
}

.cert-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.cert-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease);
}

a.cert:hover .cert-thumb img { transform: scale(1.04); }

/* paper mock used when a card has no image yet */
.cert-paper {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  background:
    radial-gradient(120% 90% at 50% 0%, #ffffff 0%, #fbfaf6 60%, #f3f1ea 100%);
}

.cert-paper::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(22, 21, 15, 0.16);
  border-radius: 6px;
}

.cert-paper-mark {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(143, 42, 29, 0.45);
  background: radial-gradient(circle at 50% 40%, rgba(143, 42, 29, 0.2), transparent 70%);
}

.cert-paper-line {
  height: 1px;
  background: rgba(22, 21, 15, 0.18);
}

.cert-paper-line.w-60 { width: 60%; }
.cert-paper-line.w-38 { width: 38%; }
.cert-paper-line.w-20 { width: 20%; }

.cert-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px 20px;
  flex: 1;
}

.cert-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.68rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}

.cert-pdf {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  background: var(--chip);
}

.cert-title {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.005em;
  color: var(--ink);
}

.cert-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 6px;
}

.tag {
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 9px;
  border-radius: 100px;
}

/* upcoming certifications — a small teaser, not a finished credential */
.teaser {
  margin-top: 42px;
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--chip);
}

.teaser-title {
  font-size: 0.98rem;
  letter-spacing: -0.005em;
  color: var(--ink);
}

.teaser-sub {
  margin-top: 8px;
  max-width: 62ch;
  font-size: 0.85rem;
  font-weight: 300;
  line-height: 1.65;
  color: var(--muted);
}

.teaser-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 20px;
}

.teaser-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 250px);
  align-items: stretch;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: transform 0.45s var(--ease), border-color 0.45s var(--ease);
}

a.teaser-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

a.teaser-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.teaser-banner {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 84px;
  object-fit: contain;
  object-position: left center;
  background: #000;
}

.teaser-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 9px;
  padding: 16px 18px;
  border-left: 1px solid var(--line);
}

.teaser-badge {
  flex: none;
  padding: 4px 9px;
  border-radius: 100px;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  white-space: nowrap;
}

.teaser-desc {
  font-size: 0.8rem;
  font-weight: 300;
  line-height: 1.55;
  color: var(--ink-soft);
}

.teaser-link {
  margin-top: 2px;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.35s var(--ease);
}

a.teaser-card:hover .teaser-link { border-bottom-color: currentColor; }

.cert-note {
  margin-top: 18px;
  font-size: 0.76rem;
  color: var(--muted);
  max-width: 60ch;
}

/* ── academic ─────────────────────────────────────────────────────────── */

.status-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(28px, 5vw, 64px);
  padding: clamp(26px, 4vw, 46px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  align-items: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 10px;
  border: 1px solid var(--line-strong);
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.pulse {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.pulse::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  opacity: 0;
  animation: pulse 2.6s var(--ease) infinite;
}

@keyframes pulse {
  0%   { transform: scale(0.6); opacity: 0.7; }
  70%  { transform: scale(1.5); opacity: 0; }
  100% { transform: scale(1.5); opacity: 0; }
}

.status-head h3 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  margin-top: 16px;
}

.status-institution {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.status-note {
  margin-top: 18px;
  max-width: 34ch;
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.6;
  color: var(--ink-soft);
}

.status-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.status-list li {
  display: grid;
  grid-template-columns: 3.1rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding-block: 18px;
  border-bottom: 1px solid var(--line);
}

.status-list li:last-child { border-bottom: 0; }

.status-year {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 2px;
}

.status-body h4 {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.005em;
}

.status-body p {
  margin: 4px 0 0;
  font-size: 0.79rem;
  font-weight: 300;
  color: var(--muted);
}

.status-flag {
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: 100px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.status-flag.is-live {
  color: var(--accent);
  border-color: transparent;
  background: var(--accent-soft);
}

/* ── hobbies ──────────────────────────────────────────────────────────── */

.hobby-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.hobby {
  background: var(--paper-2);
  padding: clamp(24px, 3vw, 34px);
  transition: background 0.45s var(--ease);
}

.hobby:hover { background: var(--card); }

.hobby-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  color: var(--accent);
  margin-bottom: 18px;
  transition: transform 0.5s var(--ease), border-color 0.5s var(--ease);
}

.hobby-icon svg { width: 19px; height: 19px; }

.hobby:hover .hobby-icon {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.hobby h3 { font-family: var(--sans); font-size: 1rem; font-weight: 500; }

.hobby p {
  margin-top: 8px;
  font-size: 0.88rem;
  font-weight: 300;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* ── contact ──────────────────────────────────────────────────────────── */

/* the page has been black → brown → red by now; the last section
   carries the fade into white */
.contact {
  border-top: 0;
  padding-block-start: clamp(150px, 17vw, 220px);
  background: linear-gradient(
    180deg,
    #a8281b 0px,
    #a8281b 30px,
    #c06a51 120px,
    #e7d6cc 200px,
    #f7f6f2 280px,
    #f7f6f2 100%
  );
}

.contact-inner { max-width: 40rem; }

.contact-mail {
  margin-top: 22px;
  font-size: 0.86rem;
  color: var(--muted);
}

.contact-mail a {
  padding-bottom: 2px;
  border-bottom: 1px solid var(--line-strong);
  transition: color 0.25s ease, border-color 0.25s ease;
}

.contact-mail a:hover {
  color: var(--ink);
  border-color: var(--ink);
}

/* ── footer ───────────────────────────────────────────────────────────── */

.site-footer {
  background: #f7f6f2;
  border-top: 1px solid var(--line);
  padding-block: 26px;
  font-size: 0.76rem;
  color: var(--muted);
}

.site-footer a {
  border-bottom: 1px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.site-footer a:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
}

/* ── reveal on scroll ─────────────────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  will-change: opacity, transform;
}

.reveal.is-in {
  opacity: 1;
  transform: none;
  will-change: auto;
}

/* stagger inside grids */
.cert-grid .cert:nth-child(2) { transition-delay: 0.06s; }
.cert-grid .cert:nth-child(3) { transition-delay: 0.12s; }
.cert-grid .cert:nth-child(4) { transition-delay: 0.18s; }
.cert-grid .cert:nth-child(5) { transition-delay: 0.24s; }
.cert-grid .cert:nth-child(6) { transition-delay: 0.30s; }

.hero-copy .reveal:nth-child(1) { transition-delay: 0.02s; }
.hero-copy .reveal:nth-child(2) { transition-delay: 0.08s; }
.hero-copy .reveal:nth-child(3) { transition-delay: 0.16s; }
.hero-copy .reveal:nth-child(4) { transition-delay: 0.24s; }
.hero-copy .reveal:nth-child(5) { transition-delay: 0.30s; }
.hero-portrait.reveal { transition-delay: 0.2s; transition-duration: 1.2s; }

/* ── responsive ───────────────────────────────────────────────────────── */

@media (max-width: 880px) {
  .hero-grid,
  .about-grid,
  .status-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-portrait {
    order: -1;
    max-width: 220px;
  }

  .portrait-frame { margin-inline: auto; }

  .portrait-caption { text-align: center; }

  .status-head { margin-bottom: 8px; }

  .status-list li { grid-template-columns: 2.6rem minmax(0, 1fr) auto; }
}

/* six nav items get tight well before the nav hides entirely */
@media (max-width: 820px) {
  .nav {
    gap: 13px;
    font-size: 0.76rem;
  }
}

@media (max-width: 620px) {
  .nav { display: none; }

  .hero-meta {
    gap: 6px 18px;
  }

  /* dots look wrong once the row wraps, the spacing carries it instead */
  .hero-meta .dot { display: none; }

  .fact {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .cert-grid { grid-template-columns: 1fr; }

  .teaser-card { grid-template-columns: 1fr; }

  .teaser-banner {
    height: auto;
    border-bottom: 1px solid var(--line);
  }

  .teaser-body {
    border-left: 0;
    padding: 14px 16px 16px;
  }

  .status-list li {
    grid-template-columns: 2.6rem minmax(0, 1fr);
    row-gap: 8px;
  }

  .status-flag { grid-column: 2; justify-self: start; }

  .hero-actions .btn { flex: 1 1 auto; }

  .footer-inner { flex-direction: column; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal { opacity: 1; transform: none; }
}

/* printed page, for the record */
@media print {
  .site-header, .hero-actions, .site-footer { display: none; }
  .reveal { opacity: 1 !important; transform: none !important; }
  html, body { background: #fff !important; }
  body { color: #171410; }
}
