/* ============================================================
   Adam Haroon personal academic website
   Design language: "Assured Autonomy Across the Stack" talk
   Deep navy · slate · teal (perception) · amber (control)
   ============================================================ */

:root {
  --bg: #0e1430;
  --bg-elev: #131a3d;
  --card: #1a2350;
  --card-2: #212b60;
  --border: #2b3670;
  --text: #eef1fb;
  --muted: #a4afd4;
  --faint: #7c88b4;
  --teal: #2fd6b5;
  --teal-soft: rgba(47, 214, 181, 0.14);
  --amber: #f2a93b;
  --amber-soft: rgba(242, 169, 59, 0.14);
  --blue: #6b96ff;
  --shadow: 0 10px 30px rgba(4, 8, 24, 0.45);
  --radius: 14px;
  --maxw: 1080px;
  --nav-h: 64px;
}

[data-theme="light"] {
  --bg: #f6f8fd;
  --bg-elev: #ffffff;
  --card: #ffffff;
  --card-2: #f0f3fb;
  --border: #dfe4f2;
  --text: #141b3d;
  --muted: #4d5878;
  --faint: #6b769c;
  --teal: #0d9d82;
  --teal-soft: rgba(13, 157, 130, 0.1);
  --amber: #b26e0a;
  --amber-soft: rgba(178, 110, 10, 0.1);
  --blue: #2b5cd9;
  --shadow: 0 10px 30px rgba(20, 27, 61, 0.08);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s ease, color 0.25s ease;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

img, svg { max-width: 100%; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--amber); color: #131a3d; padding: 10px 16px;
  border-radius: 0 0 8px 0; z-index: 200; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------- Navigation ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-nav .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--nav-h);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1.02rem; color: var(--text);
  letter-spacing: 0.01em;
}
.brand:hover { text-decoration: none; }
.brand .mono {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  color: #0e1430; font-weight: 800; font-size: 0.85rem;
}
.brand img {
  width: 34px; height: 34px; border-radius: 50%;
  object-fit: cover; border: 1px solid var(--border);
}
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 8px 12px; border-radius: 8px;
  color: var(--muted); font-size: 0.93rem; font-weight: 500;
}
.nav-links a:hover { color: var(--text); background: var(--card-2); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--text); font-weight: 600; }
.nav-links a[aria-current="page"]::after {
  content: ""; display: block; height: 2px; margin-top: 2px;
  border-radius: 2px; background: linear-gradient(90deg, var(--teal), var(--amber));
}
.nav-actions { display: flex; align-items: center; gap: 8px; }

.theme-toggle, .nav-burger {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 9px;
  background: var(--card); border: 1px solid var(--border);
  color: var(--muted); cursor: pointer; padding: 0;
}
.theme-toggle:hover, .nav-burger:hover { color: var(--text); border-color: var(--faint); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }
.nav-burger { display: none; }
.nav-burger span, .nav-burger span::before, .nav-burger span::after {
  content: ""; display: block; width: 16px; height: 2px;
  background: currentColor; border-radius: 2px; position: relative;
}
.nav-burger span::before { position: absolute; top: -5px; }
.nav-burger span::after { position: absolute; top: 5px; }

@media (max-width: 880px) {
  .nav-burger { display: grid; }
  .nav-links {
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--bg-elev); border-bottom: 1px solid var(--border);
    padding: 10px 16px 16px; display: none; box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
}

/* ---------- Type & sections ---------- */
.eyebrow {
  display: inline-block;
  font-size: 0.74rem; font-weight: 700;
  letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--amber); margin-bottom: 10px;
}
.eyebrow.teal { color: var(--teal); }

h1 { font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.12; margin: 0 0 14px; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.45rem, 3vw, 1.9rem); line-height: 1.2; margin: 0 0 12px; letter-spacing: -0.015em; }
h3 { font-size: 1.12rem; margin: 0 0 8px; }
.lede { font-size: 1.12rem; color: var(--muted); }
.hl-teal { color: var(--teal); font-weight: 600; }
.hl-amber { color: var(--amber); font-weight: 600; }

section { padding: 64px 0; }
.section-head { margin-bottom: 32px; }
.section-head p { color: var(--muted); margin-top: 6px; }

/* geometric accent under section headings */
.accent-rule {
  width: 56px; height: 4px; border-radius: 2px; margin-top: 14px;
  background: linear-gradient(90deg, var(--teal) 0 50%, var(--amber) 50% 100%);
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 88px 0 72px;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
}
.hero .wrap { position: relative; z-index: 1; }
/* star specks, like the talk title slide */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 22%, var(--teal) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 28% 68%, var(--faint) 50%, transparent 51%),
    radial-gradient(2px 2px at 44% 18%, var(--amber) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 60% 80%, var(--faint) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 72% 30%, var(--teal) 50%, transparent 51%),
    radial-gradient(2px 2px at 86% 62%, var(--faint) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 93% 14%, var(--amber) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 8% 84%, var(--faint) 50%, transparent 51%);
  opacity: 0.5;
}
.hero-grid {
  display: grid; grid-template-columns: 1fr auto;
  gap: 56px; align-items: center;
}
.hero-atom {
  width: 250px; height: 250px; border-radius: 50%; object-fit: cover;
  border: 3px solid transparent;
  background: linear-gradient(#0a0a0a, #0a0a0a) padding-box,
              linear-gradient(135deg, var(--teal), var(--blue), var(--amber)) border-box;
  box-shadow: var(--shadow);
}
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-atom { display: none; }
}
.hero .meta-line {
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--amber); margin-bottom: 18px;
}
.hero .meta-line .sep { color: var(--faint); margin: 0 10px; }
.hero .meta-line .aff { color: var(--teal); }
.hero .tagline { font-size: clamp(1.1rem, 2.5vw, 1.4rem); color: var(--muted); margin: 0 0 22px; }
.hero .bio { color: var(--muted); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 10px; font-weight: 600; font-size: 0.95rem;
  border: 1px solid var(--border); color: var(--text); background: var(--card);
  cursor: pointer; transition: transform 0.15s ease, border-color 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); border-color: var(--faint); }
.btn.primary { background: var(--amber); border-color: var(--amber); color: #131a3d; }
[data-theme="light"] .btn.primary { color: #fff; }
.btn.ghost-teal { border-color: var(--teal); color: var(--teal); background: transparent; }

/* ---------- The thread motif ---------- */
.thread { margin-top: 30px; }
.thread-cards {
  position: relative;
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
}
/* the connecting thread */
.thread-cards::before {
  content: ""; position: absolute; top: 50%; left: 12%; right: 12%;
  height: 2px; z-index: 0;
  background: linear-gradient(90deg, var(--teal), var(--blue), var(--amber));
  opacity: 0.55;
}
.thread-card {
  position: relative; z-index: 1;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow);
}
.thread-card .q { font-weight: 700; font-size: 0.92rem; margin: 10px 0 6px; }
.thread-card .kw { color: var(--muted); font-size: 0.9rem; }
.thread-foundation {
  margin-top: 22px; padding: 13px 20px; border-radius: 10px;
  background: var(--card-2); border: 1px solid var(--border);
  text-align: center; font-size: 0.92rem; color: var(--muted);
}
.thread-foundation strong { color: var(--text); }
@media (max-width: 720px) {
  .thread-cards { grid-template-columns: 1fr; gap: 20px; }
  .thread-cards::before { left: 50%; right: auto; top: 10%; bottom: 10%; height: auto; width: 2px; background: linear-gradient(180deg, var(--teal), var(--amber)); }
}

/* icon chips (talk-style filled circles) */
.chip {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  color: #0e1430;
}
.chip svg { width: 22px; height: 22px; }
.chip.teal { background: var(--teal); }
.chip.amber { background: var(--amber); }
[data-theme="light"] .chip { color: #fff; }
.chip-row { display: flex; align-items: center; gap: 14px; }
.chip-row h3 { margin: 0; }
.chip-row .teal-t { color: var(--teal); }
.chip-row .amber-t { color: var(--amber); }

/* ---------- Cards & grids ---------- */
.grid { display: grid; gap: 20px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 880px) {
  .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
}

.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
  transition: transform 0.18s ease, border-color 0.18s ease;
}
a.card { color: var(--text); display: block; }
a.card:hover { text-decoration: none; transform: translateY(-3px); border-color: var(--faint); }
.card p { color: var(--muted); font-size: 0.94rem; margin: 8px 0 0; }
.card .chip { margin-bottom: 14px; }

.badge {
  display: inline-block; padding: 4px 14px; border-radius: 999px;
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.02em;
  border: 1.5px solid var(--amber); color: var(--amber); background: transparent;
}
.badge.teal { border-color: var(--teal); color: var(--teal); }
.badge.slate { border-color: var(--faint); color: var(--faint); }
.badge.fill { background: var(--amber-soft); }

/* ---------- Stats ("By the numbers") ---------- */
.stat {
  text-align: center; padding: 28px 16px;
}
.stat .num {
  font-size: 2.6rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1;
}
.stat:nth-child(odd) .num { color: var(--teal); }
.stat:nth-child(even) .num { color: var(--amber); }
.stat .label { color: var(--muted); font-size: 0.9rem; margin-top: 8px; }

/* ---------- Flagship results ---------- */
.flagship { border-left: 4px solid var(--amber); }
.flagship.teal-edge { border-left-color: var(--teal); }
.flagship .big {
  font-size: 2.4rem; font-weight: 800; color: var(--amber); line-height: 1;
}
.flagship.teal-edge .big { color: var(--teal); }
.flagship .sub { font-weight: 600; margin-top: 6px; }
.flagship .badge { margin-top: 14px; }

/* ---------- Pipeline diagram (the hinge) ---------- */
.pipeline {
  display: flex; align-items: stretch; gap: 0; flex-wrap: wrap;
  margin: 26px 0 10px;
}
.pipeline .stage {
  flex: 1 1 140px; min-width: 130px;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  padding: 16px 12px; text-align: center; font-weight: 700; font-size: 0.95rem;
}
.pipeline .stage.teal { color: var(--teal); }
.pipeline .stage.amber { color: var(--amber); }
.pipeline .arrow {
  align-self: center; padding: 0 10px; color: var(--faint);
  font-size: 1.2rem; font-weight: 700;
}
.pipeline-note { color: var(--faint); font-style: italic; font-size: 0.92rem; }
@media (max-width: 680px) {
  .pipeline { flex-direction: column; }
  .pipeline .arrow { transform: rotate(90deg); padding: 4px 0; }
}

/* ---------- Principles strip (icon row, no card boxes) ---------- */
.principles {
  position: relative;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px;
  margin: 8px 0 40px; padding-top: 6px;
}
.principles::before {
  content: ""; position: absolute; top: 28px; left: 14%; right: 14%;
  height: 2px; background: linear-gradient(90deg, var(--amber), var(--blue), var(--amber));
  opacity: 0.35;
}
.principle { position: relative; text-align: center; padding: 0 10px; }
.principle .chip { margin-bottom: 12px; box-shadow: 0 0 0 8px var(--bg); }
section[style] .principle .chip { box-shadow: 0 0 0 8px var(--bg-elev); }
.principle h3 { margin-bottom: 6px; }
.principle p { color: var(--muted); font-size: 0.93rem; margin: 0; }
@media (max-width: 720px) {
  .principles { grid-template-columns: 1fr; gap: 26px; }
  .principles::before { display: none; }
}

/* ---------- Diagram placeholder ---------- */
.diagram-ph {
  display: grid; place-items: center; text-align: center;
  min-height: 180px; border-radius: var(--radius);
  border: 2px dashed var(--border); background: var(--card-2);
  color: var(--faint); font-size: 0.9rem; padding: 20px;
}
.figure { margin: 26px 0; }
.figure figcaption { color: var(--faint); font-size: 0.86rem; font-style: italic; margin-top: 10px; text-align: center; }
.figure img {
  display: block; width: 100%; border-radius: var(--radius);
  border: 1px solid var(--border); background: #fff; padding: 14px;
}
.figure video {
  display: block; width: 100%; border-radius: var(--radius);
  border: 1px solid var(--border); background: #0e1430;
}

/* ---------- Publications ---------- */
.pub-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 26px; }
.pub-filters button {
  padding: 7px 16px; border-radius: 999px; font-size: 0.86rem; font-weight: 600;
  background: var(--card); color: var(--muted);
  border: 1px solid var(--border); cursor: pointer;
}
.pub-filters button:hover { color: var(--text); }
.pub-filters button.active { background: var(--amber-soft); border-color: var(--amber); color: var(--amber); }

.pub-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.pub-item {
  display: grid; grid-template-columns: 44px 1fr; gap: 14px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 22px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.pub-item.linked { cursor: pointer; }
.pub-item.linked:hover { border-color: var(--faint); transform: translateY(-2px); }
.pub-title a { color: var(--text); }
.pub-title a:hover { color: var(--teal); text-decoration: none; }
.pub-num {
  font-weight: 800; color: var(--faint); font-size: 0.95rem; padding-top: 3px;
}
.pub-title { font-weight: 700; font-size: 1.02rem; line-height: 1.4; }
.pub-authors { color: var(--muted); font-size: 0.9rem; margin-top: 4px; }
.pub-authors .me { color: var(--text); font-weight: 700; }
.pub-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.pub-venue-icon {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.02em; white-space: nowrap;
  background: var(--card-2); border: 1px solid var(--border); color: var(--muted);
}
.pub-venue-icon.ieee { color: var(--blue); border-color: var(--blue); }
.pub-venue-icon.spie { color: var(--amber); border-color: var(--amber); }
.pub-venue-icon.ml { color: var(--teal); border-color: var(--teal); }
.pub-venue { font-size: 0.86rem; color: var(--muted); font-weight: 600; flex: 1 1 16ch; min-width: 0; }
.pub-actions { margin-left: auto; display: flex; gap: 8px; }
.bib-btn {
  padding: 5px 13px; border-radius: 8px; font-size: 0.78rem; font-weight: 700;
  background: transparent; border: 1.5px solid var(--border);
  color: var(--muted); cursor: pointer;
}
.bib-btn:hover { border-color: var(--teal); color: var(--teal); text-decoration: none; }
.bib-pre {
  display: none; grid-column: 1 / -1; margin: 12px 0 0; padding: 14px 16px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  font-size: 0.78rem; line-height: 1.55; overflow-x: auto;
  font-family: "SF Mono", "Cascadia Code", Consolas, monospace;
  white-space: pre; color: var(--muted);
}
.bib-pre.open { display: block; }
.equal-note { color: var(--faint); font-size: 0.85rem; margin-top: 18px; }
@media (max-width: 560px) {
  .pub-item { grid-template-columns: 1fr; }
  .pub-num { display: none; }
  .pub-actions { margin-left: 0; }
}

/* ---------- Talks ---------- */
.talk-item {
  display: grid; grid-template-columns: 200px 1fr; gap: 22px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; align-items: center;
}
.talk-thumb {
  aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden;
  background: #0e1430; border: 1px solid #2b3670;
  display: flex; flex-direction: column; justify-content: center;
  padding: 14px; position: relative;
}
.talk-thumb::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 80% 20%, #2fd6b5 50%, transparent 51%),
    radial-gradient(1px 1px at 20% 80%, #f2a93b 50%, transparent 51%),
    radial-gradient(1px 1px at 65% 70%, #7c88b4 50%, transparent 51%);
  opacity: 0.6;
}
.talk-thumb .t-eyebrow {
  font-size: 0.42rem; font-weight: 700; letter-spacing: 0.26em;
  text-transform: uppercase; color: #f2a93b; margin-bottom: 5px;
}
.talk-thumb .t-eyebrow.teal { color: #2fd6b5; }
.talk-thumb .t-title {
  font-size: 0.68rem; font-weight: 700; color: #eef1fb; line-height: 1.35;
}
.talk-thumb .t-foot { font-size: 0.42rem; color: #7c88b4; margin-top: auto; }
.talk-body h3 { font-size: 1.02rem; margin-bottom: 4px; }
.talk-body .venue { color: var(--muted); font-size: 0.9rem; }
.talk-body .badge { margin-top: 10px; }
@media (max-width: 640px) {
  .talk-item { grid-template-columns: 1fr; }
  .talk-thumb { max-width: 280px; }
}

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 260px 1fr; gap: 40px; align-items: start; }
@media (max-width: 780px) { .about-grid { grid-template-columns: 1fr; } }
.portrait {
  width: 100%; aspect-ratio: 4 / 5; border-radius: var(--radius);
  border: 1px solid var(--border); overflow: hidden; background: var(--card-2);
  position: sticky; top: calc(var(--nav-h) + 24px);
}
.prose h2 { margin-top: 44px; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--muted); }
.prose strong { color: var(--text); }
.prose ul { color: var(--muted); padding-left: 22px; }
.prose li { margin: 6px 0; }

.collab-grid .card { text-align: center; padding: 20px 14px; }
.collab-grid .card h3 { font-size: 0.95rem; }
.collab-grid .card p { font-size: 0.82rem; }

/* ---------- CV page ---------- */
.cv-content h1 { font-size: 1.9rem; border-bottom: 2px solid var(--border); padding-bottom: 12px; }
.cv-content h2 {
  font-size: 1.05rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--amber); margin-top: 40px; margin-bottom: 14px;
}
.cv-content h3 {
  display: flex; justify-content: space-between; align-items: baseline; gap: 20px;
  font-size: 1rem; margin-top: 24px; margin-bottom: 2px;
}
.cv-content h3 .dates { font-weight: 500; color: var(--faint); font-size: 0.88rem; white-space: nowrap; flex-shrink: 0; }
.cv-content h4 {
  font-size: 0.92rem; font-weight: 600; color: var(--teal);
  margin: 2px 0 4px;
}
.cv-content p, .cv-content li { color: var(--muted); font-size: 0.95rem; }
.cv-content ul { padding-left: 22px; margin-top: 6px; }
.cv-content li { margin: 4px 0; }
.cv-content strong { color: var(--text); }
.cv-content em { color: var(--faint); }
.cv-content hr { border: none; border-top: 1px solid var(--border); margin: 30px 0; }

/* ---------- Contact ---------- */
.contact-grid .card { display: flex; align-items: center; gap: 16px; }
.contact-grid .card .chip { margin: 0; flex-shrink: 0; }
.contact-grid .card h3 { margin: 0 0 2px; font-size: 0.98rem; }
.contact-grid .card p { margin: 0; font-size: 0.88rem; word-break: break-word; }

/* ---------- Project pages ---------- */
.project-hero { padding: 56px 0 40px; background: var(--bg-elev); border-bottom: 1px solid var(--border); }
.project-hero .badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.meta-table { display: grid; grid-template-columns: 140px 1fr; gap: 8px 20px; font-size: 0.94rem; margin-top: 20px; }
.meta-table dt { color: var(--faint); font-weight: 600; }
.meta-table dd { margin: 0; color: var(--muted); }
.back-link { font-size: 0.9rem; color: var(--faint); display: inline-block; margin-bottom: 18px; }
.back-link:hover { color: var(--teal); }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--border); background: var(--bg-elev);
  padding: 40px 0; margin-top: 40px;
}
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; align-items: center; }
footer p { margin: 0; color: var(--faint); font-size: 0.88rem; }
footer .foot-links { display: flex; gap: 18px; }
footer .foot-links a { color: var(--muted); font-size: 0.88rem; }
footer .foot-links a:hover { color: var(--teal); }

/* ---------- Reveal animation ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.55s ease, transform 0.55s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; }
}
