/* ==========================================================================
   Khaleel Jageer — portfolio styles
   Tweak the tokens in :root below to re-skin the whole site.
   ========================================================================== */

:root {
  /* ── Brand / colour tokens ─────────────────────────────────────────── */
  --accent:        #b04a2f;
  --accent-soft:   #b04a2f1f;
  --accent-2:      #3f7d6b;
  --on-accent:     #ffffff;

  /* Warm editorial — light theme (default) */
  --bg:            #fbf9f5;
  --bg-alt:        #f4f0e8;
  --surface:       #fffdf9;
  --surface-2:     #f0ebe1;
  --border:        #e0d8ca;
  --text:          #1c1a17;
  --text-dim:      #5c5750;
  --text-faint:    #8b8479;

  /* ── Type ──────────────────────────────────────────────────────────── */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;

  /* ── Layout ────────────────────────────────────────────────────────── */
  --maxw: 1120px;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 6px;
  --radius-sm: 4px;
  --header-h: 68px;

  --shadow:    0 1px 2px rgb(60 45 25 / 0.05), 0 6px 20px rgb(60 45 25 / 0.06);
  --shadow-lg: 0 10px 32px rgb(60 45 25 / 0.1);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --accent:     #e08a5a;
  --accent-soft: #e08a5a26;
  --accent-2:   #6fb5a0;
  --on-accent:  #231c14;
  --bg:         #17150f;
  --bg-alt:     #1e1b14;
  --surface:    #23201a;
  --surface-2:  #2b271f;
  --border:     #38332a;
  --text:       #f0ebe2;
  --text-dim:   #a8a094;
  --text-faint: #786f62;
  --shadow:     0 1px 2px rgb(0 0 0 / 0.24), 0 8px 24px rgb(0 0 0 / 0.2);
  --shadow-lg:  0 12px 40px rgb(0 0 0 / 0.32);
}

/* ── Reset ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { list-style: none; padding: 0; }
button { font: inherit; color: inherit; cursor: pointer; }

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

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 0.75rem 1.25rem;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* ── Header ──────────────────────────────────────────────────────────── */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background-color 0.3s var(--ease), box-shadow 0.3s var(--ease),
              border-color 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 600;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--on-accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.brand-text { font-size: 0.98rem; }

.nav ul {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.nav a {
  display: block;
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav a.active { color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: 0.4rem; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
[data-theme="dark"] .icon-sun,
[data-theme="light"] .icon-moon { display: none; }

/* Mobile nav toggle */
.nav-toggle { display: none; flex-direction: column; gap: 4px; }
.nav-toggle .bar {
  width: 17px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 0.94rem;
  font-weight: 600;
  transition: transform 0.15s var(--ease), background-color 0.2s var(--ease),
              border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 4px 14px var(--accent-soft);
}
.btn-primary:hover { box-shadow: 0 8px 24px var(--accent-soft); }

.btn-ghost {
  border-color: var(--border);
  color: var(--text);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-sm { padding: 0.5rem 1rem; font-size: 0.87rem; }
.btn-lg { padding: 0.9rem 1.9rem; font-size: 1.02rem; font-family: var(--font-mono); }

/* ── Hero ────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100svh;
  padding-top: var(--header-h);
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: clamp(2rem, 6vw, 4.5rem);
  padding-block: 3rem;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 7vw, 4.2rem);
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, var(--text) 30%, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-role {
  display: flex;
  align-items: center;
  min-height: 2.2rem;
  margin-top: 0.5rem;
  font-size: clamp(1.05rem, 2.6vw, 1.5rem);
  font-weight: 600;
  color: var(--text-dim);
}
.caret {
  width: 2px;
  height: 1.2em;
  margin-left: 3px;
  background: var(--accent);
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-blurb {
  max-width: 52ch;
  margin-top: 1.25rem;
  color: var(--text-dim);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.socials {
  display: flex;
  gap: 0.5rem;
  margin-top: 2.25rem;
}
.socials a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-dim);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease),
              transform 0.2s var(--ease);
}
.socials a:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-3px);
}
.socials svg { width: 17px; height: 17px; fill: currentColor; }

/* Hero visual */
.hero-visual { position: relative; display: grid; place-items: center; }
.avatar-wrap {
  position: relative;
  z-index: 2;
  width: min(320px, 70vw);
  aspect-ratio: 1;
  border-radius: 50%;
  padding: 5px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: var(--shadow-lg);
}
.avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface);
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  animation: float 12s ease-in-out infinite;
}
.blob-1 { width: 260px; height: 260px; background: var(--accent);   top: -20px;  right: 0; }
.blob-2 { width: 220px; height: 220px; background: var(--accent-2); bottom: -10px; left: 0; animation-delay: -6s; }
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-16px, 20px) scale(1.08); }
}

.scroll-hint {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  translate: -50% 0;
  width: 24px;
  height: 38px;
  border: 2px solid var(--border);
  border-radius: 12px;
}
.scroll-hint span {
  position: absolute;
  top: 7px;
  left: 50%;
  translate: -50% 0;
  width: 4px;
  height: 7px;
  border-radius: 2px;
  background: var(--accent);
  animation: wheel 1.6s ease-in-out infinite;
}
@keyframes wheel { 0% { opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(14px); opacity: 0; } }

/* ── Sections ────────────────────────────────────────────────────────── */
.section { padding-block: clamp(4rem, 10vw, 7rem); }
.section-alt { background: var(--bg-alt); }

.section-head { margin-bottom: 3rem; }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4.5vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.015em;
}
.section-title::after {
  content: "";
  display: block;
  width: 52px;
  height: 3px;
  margin-top: 0.85rem;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.section-sub { margin-top: 1rem; color: var(--text-dim); max-width: 60ch; }

/* ── Card primitive ──────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease),
              box-shadow 0.25s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 50%, var(--border));
  box-shadow: var(--shadow);
}

/* ── About ───────────────────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.about-text p { color: var(--text-dim); }
.about-text p + p { margin-top: 1rem; }
.about-text .btn { margin-top: 1.75rem; }

.facts { display: grid; gap: 1rem; }
.facts li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 1.15rem 1.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
}
.fact-num {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1;
  color: var(--text);
}
.fact-label { font-size: 0.87rem; color: var(--text-faint); }

/* ── Skills ──────────────────────────────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}
.skill-group { padding: 1.6rem; }
.skill-group h3 { font-size: 1.05rem; margin-bottom: 1rem; }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chips li {
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
}
.chips-sm li { font-size: 0.72rem; padding: 0.25rem 0.6rem; }

/* ── Projects ────────────────────────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}
.project { display: flex; flex-direction: column; overflow: hidden; }
.project-thumb {
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}
.project:hover .project-thumb img { transform: scale(1.05); }

.project-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.4rem;
  flex: 1;
}
.project-title { font-size: 1.15rem; }
.project-desc { font-size: 0.93rem; color: var(--text-dim); flex: 1; }
.project-links {
  display: flex;
  gap: 1.1rem;
  padding-top: 0.35rem;
  font-size: 0.87rem;
  font-weight: 600;
}

/* ── Timeline ────────────────────────────────────────────────────────── */
.timeline {
  position: relative;
  max-width: 760px;
  padding-left: 2rem;
  border-left: 2px solid var(--border);
}
.timeline-item { position: relative; padding-bottom: 2.75rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: calc(-2rem - 7px);
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--bg-alt);
}
.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 0.25rem;
}
.timeline-role { font-size: 1.1rem; }
.timeline-org { font-size: 0.9rem; color: var(--text-faint); margin-bottom: 0.7rem; }
.timeline-points { display: grid; gap: 0.4rem; }
.timeline-points li {
  position: relative;
  padding-left: 1.1rem;
  font-size: 0.93rem;
  color: var(--text-dim);
}
.timeline-points li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ── Contact ─────────────────────────────────────────────────────────── */
.contact-inner { text-align: center; }
.contact-inner .section-title::after { margin-inline: auto; }
.contact-blurb {
  max-width: 52ch;
  margin: 1.5rem auto 2rem;
  color: var(--text-dim);
}
.contact-alt { margin-top: 1.5rem; font-size: 0.9rem; color: var(--text-faint); }

/* ══ Sub-page components ═══════════════════════════════════════════════ */

/* ── Page hero (every page except home) ──────────────────────────────── */
.page-hero {
  padding-top: calc(var(--header-h) + clamp(3rem, 8vw, 5rem));
  padding-bottom: clamp(2rem, 5vw, 3.5rem);
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(60% 120% at 15% 0%, var(--accent-soft), transparent 70%),
    var(--bg-alt);
}
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5.5vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.015em;
}
.page-hero .lede {
  max-width: 62ch;
  margin-top: 1rem;
  font-size: clamp(1rem, 2vw, 1.12rem);
  color: var(--text-dim);
}

/* ── Long-form prose ─────────────────────────────────────────────────── */
.prose { max-width: 68ch; }
.prose p { color: var(--text-dim); }
.prose p + p { margin-top: 1.1rem; }
.prose h3 {
  margin-top: 2.25rem;
  margin-bottom: 0.6rem;
  font-size: 1.15rem;
  color: var(--text);
}
.prose strong { color: var(--text); font-weight: 600; }

/* ── Pull quote ──────────────────────────────────────────────────────── */
.quote {
  max-width: 60ch;
  margin-block: 2rem;
  padding: 1.4rem 1.6rem;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--surface);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--text-dim);
}
.quote-center { margin-inline: auto; text-align: center; border-left: 0; border-top: 3px solid var(--accent); border-radius: var(--radius-sm); }

/* ── Impact metrics (home) ───────────────────────────────────────────── */
.impact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
}
.impact-tile {
  padding: 1.4rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.impact-tile:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 50%, var(--border));
}
.impact-value {
  display: block;
  font-family: var(--font-mono);
  /* Tiles hold both short numbers ("99.8%") and short phrases
     ("Mobile · TV · Fire TV") — scale down rather than overflow. */
  font-size: clamp(1.1rem, 1.9vw, 1.6rem);
  font-weight: 500;
  line-height: 1.2;
  text-wrap: balance;
  overflow-wrap: break-word;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.impact-label {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: var(--text-faint);
}

/* ── Tick list (summary / achievements) ──────────────────────────────── */
.tick-list { display: grid; gap: 0.7rem; }
.tick-list.two-col { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 0.7rem 2rem; }
.tick-list li {
  position: relative;
  padding-left: 1.9rem;
  color: var(--text-dim);
}
.tick-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 11px;
  height: 6px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  rotate: -45deg;
}

/* ── Generic content card grid ───────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}
.card-grid.wide { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); }
.content-card { padding: 1.6rem; }
.content-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.content-card > p { font-size: 0.93rem; color: var(--text-dim); }
.content-card .chips { margin-top: 1rem; }
.content-card .card-meta {
  display: block;
  margin-bottom: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}
.content-card .card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Featured variant — spans two columns on wide screens */
.content-card.featured { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
@media (min-width: 900px) {
  .card-grid > .content-card.featured { grid-column: span 2; }
}

/* ── Definition-style stack (uses / expertise) ───────────────────────── */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}
.stack-group { padding: 1.5rem; }
.stack-group h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  margin-bottom: 0.9rem;
}
.stack-group h3::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.stack-list { display: grid; gap: 0.4rem; }
.stack-list li { font-size: 0.9rem; color: var(--text-dim); }

/* Prose variant — a short description instead of a term list */
.stack-note { font-size: 0.9rem; color: var(--text-dim); }

/* Citation line under a publication card */
.pub-cite {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text-faint);
}

/* ── Spec list (key/value metadata — book, publications) ─────────────── */
.spec-list {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.65rem 1.5rem;
  padding: 1.5rem;
  font-size: 0.9rem;
}
.spec-list dt {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  padding-top: 0.15rem;
}
.spec-list dd { color: var(--text-dim); }
.spec-list dd strong { color: var(--text); font-weight: 600; }

@media (max-width: 480px) {
  .spec-list { grid-template-columns: 1fr; gap: 0.2rem 0; }
  .spec-list dd + dt { margin-top: 0.9rem; }
}

/* ── CTA band ────────────────────────────────────────────────────────── */
.cta-band {
  margin-top: clamp(3rem, 8vw, 5rem);
  padding: clamp(2rem, 6vw, 3.25rem);
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    radial-gradient(70% 140% at 50% 0%, var(--accent-soft), transparent 70%),
    var(--surface);
}
.cta-band h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.4rem, 3.5vw, 1.9rem); }
.cta-band p { max-width: 52ch; margin: 0.85rem auto 1.75rem; color: var(--text-dim); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }

/* ── Footer ──────────────────────────────────────────────────────────── */
.site-footer {
  padding-block: 2.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.87rem;
  color: var(--text-faint);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  align-items: center;
  justify-content: space-between;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
}
.footer-nav a { color: var(--text-faint); }
.footer-nav a:hover { color: var(--accent); }

/* ── Back to top ─────────────────────────────────────────────────────── */
.to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 90;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s var(--ease);
}
.to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

/* ── Scroll reveal ───────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; padding-block: 2rem; }
  .hero-visual { grid-row: 1; }
  .hero-blurb { margin-inline: auto; }
  .hero-cta, .socials { justify-content: center; }
  .section-title::after { margin-inline: auto; }
  .hero-copy .section-title::after { margin-inline: auto; }
  .about-grid { grid-template-columns: 1fr; }
  .facts { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}

@media (max-width: 760px) {
  .brand-text { display: none; }
  .nav-toggle { display: flex; }
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    clip-path: inset(0 0 100% 0);
    transition: clip-path 0.3s var(--ease);
  }
  .nav.open { clip-path: inset(0 0 0 0); }
  .nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 0.5rem var(--pad) 1.25rem; }
  .nav a { padding: 0.8rem 0.5rem; font-size: 1rem; border-bottom: 1px solid var(--border); border-radius: 0; }
  .hero { min-height: auto; padding-block: 5rem 3rem; }
  .scroll-hint { display: none; }
}

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

/* ── Print ───────────────────────────────────────────────────────────── */
@media print {
  .site-header, .to-top, .scroll-hint, .hero-visual, .hero-cta { display: none; }
  body { background: #fff; color: #000; }
  .reveal { opacity: 1; transform: none; }
}
