/* ============================================================
   Practical Distributed Quantum Computing — QCE26 Tutorial
   NetQMPI over CUNQA · CiTIUS (USC) & CESGA
   ============================================================ */

:root {
  --bg: #fafaf8;
  --bg-alt: #ffffff;
  --ink: #191c22;
  --ink-soft: #565d6c;
  --ink-faint: #8890a0;
  --line: #e7e5df;

  --navy: #0b0e16;
  --navy-soft: #12172447;

  --blue: #2952c8;
  --blue-deep: #1c3f9e;
  --violet: #7c5cff;

  --lvl-beginner: #1f9d6b;
  --lvl-intermediate: #2952c8;
  --lvl-advanced: #7c5cff;

  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;

  --shadow-sm: 0 2px 10px rgba(20, 24, 38, 0.06);
  --shadow-md: 0 10px 30px rgba(20, 24, 38, 0.10);
  --shadow-lg: 0 20px 50px rgba(20, 24, 38, 0.16);

  --container: 1180px;
  --font-display: 'Manrope', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

html { scroll-behavior: smooth; }

@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; }
}

body {
  font-family: var(--font-display);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

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

section { scroll-margin-top: 96px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--blue);
}

.eyebrow::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--violet);
  box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.15);
}

h2.section-title {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0.5rem 0 1rem;
  text-wrap: balance;
}

.section-lede {
  font-size: 1.08rem;
  color: var(--ink-soft);
  max-width: 640px;
  line-height: 1.75;
}

.section-head { margin-bottom: 3rem; }
.section-head.centered { text-align: center; margin-left: auto; margin-right: auto; }
.section-head.centered .section-lede { margin-left: auto; margin-right: auto; }

/* ---------------- Header / Nav ---------------- */

.site-header {
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 1.1rem 0;
  transition: box-shadow 0.3s ease;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand .brand-mark {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

.brand small {
  display: block;
  font-weight: 500;
  font-size: 0.68rem;
  color: #9aa3b8;
  letter-spacing: 0.03em;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1100;
  background-color: var(--navy);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
}

.menu-toggle span {
  width: 22px;
  height: 2px;
  background-color: #fff;
  border-radius: 2px;
  transition: all 0.25s ease;
}

.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

.nav-menu {
  display: flex;
  gap: 0.15rem;
  list-style: none;
}

.nav-menu a {
  color: #cbd1e0;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 0.65rem;
  border-radius: 999px;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.nav-menu a:hover { color: #fff; background: rgba(255,255,255,0.08); }

.nav-menu a.nav-cta {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--violet));
  margin-left: 0.5rem;
  flex-shrink: 0;
}

.nav-menu a.nav-cta:hover { filter: brightness(1.1); background: linear-gradient(135deg, var(--blue), var(--violet)); }

/* ---------------- Hero ---------------- */

/* Fill the first screen below the sticky header; --header-h is kept in sync
   with the real header height by script.js. */
.hero {
  background: var(--navy);
  color: #fff;
  padding: 4.5rem 0 4rem;
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - var(--header-h, 80px));
  min-height: calc(100svh - var(--header-h, 80px));
  display: flex;
  align-items: center;
}

.hero .container {
  width: 100%;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a9b6ff;
  background: rgba(124, 92, 255, 0.14);
  border: 1px solid rgba(124, 92, 255, 0.35);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1.4rem;
}

.hero h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.15rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.08;
  text-wrap: balance;
}

.hero h1 .accent { color: #8fa4ff; }

.hero p.subtitle {
  margin-top: 1.1rem;
  font-size: 1.18rem;
  color: #b7bdd0;
  max-width: 46ch;
  line-height: 1.6;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.8rem;
}

.meta-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
  color: #dfe2ee;
}

.meta-pill svg { width: 15px; height: 15px; color: #8fa4ff; flex-shrink: 0; }

.hero-ctas {
  display: flex;
  gap: 0.8rem;
  margin-top: 2.2rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary { background: linear-gradient(135deg, var(--blue), var(--violet)); color: #fff; box-shadow: 0 8px 24px rgba(60, 90, 220, 0.35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(60, 90, 220, 0.45); }

.btn-ghost { background: rgba(255,255,255,0.05); color: #fff; border-color: rgba(255,255,255,0.18); }
.btn-ghost:hover { background: rgba(255,255,255,0.11); transform: translateY(-2px); }

.btn-outline { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }

.hero-visual { position: relative; }
.hero-visual canvas { width: 100%; height: auto; aspect-ratio: 1/1; display: block; }

/* ---------------- Level badges ---------------- */

.level-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }

.level-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: #dfe2ee;
}

.level-dot { width: 8px; height: 8px; border-radius: 50%; }
.level-dot.beginner { background: var(--lvl-beginner); }
.level-dot.intermediate { background: var(--lvl-intermediate); }
.level-dot.advanced { background: var(--lvl-advanced); }

/* ---------------- Alternating sections ---------------- */

.section { padding: 5.5rem 0; }
.section.bg-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}

.split.reverse .split-media { order: -1; }

.split-text ul.check-list {
  list-style: none;
  margin-top: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.check-list li {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.55;
}

.check-list svg { width: 20px; height: 20px; color: var(--blue); flex-shrink: 0; margin-top: 2px; }

.split-media {
  background: var(--navy);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.split-media svg, .split-media canvas { width: 100%; height: auto; }

/* ---------------- Definition cards (NetQMPI / CUNQA) ---------------- */

.def-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.6rem;
  margin-top: 3rem;
}

.def-card {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.def-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.def-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
}

.def-icon svg { width: 26px; height: 26px; }

.def-card.netqmpi .def-icon { background: rgba(41, 82, 200, 0.1); color: var(--blue); }
.def-card.cunqa .def-icon { background: rgba(124, 92, 255, 0.12); color: var(--violet); }

.def-card h3 { font-size: 1.3rem; font-weight: 800; margin-bottom: 0.2rem; }
.def-card .def-tag { font-size: 0.82rem; color: var(--ink-faint); font-weight: 600; margin-bottom: 0.9rem; display: block; }
.def-card p { color: var(--ink-soft); font-size: 0.98rem; line-height: 1.7; margin-bottom: 1rem; }

.def-card .code-teaser {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  background: var(--navy);
  color: #cdd6f4;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  margin-top: auto;
  margin-bottom: 1rem;
  overflow-x: auto;
  white-space: pre;
}

.def-card a.repo-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--line);
  padding-bottom: 2px;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.def-card a.repo-link:hover { border-color: var(--blue); color: var(--blue); }
.def-card a.repo-link svg { width: 16px; height: 16px; }

/* ---------------- Prerequisites ---------------- */

.prereq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.prereq-list { list-style: none; display: flex; flex-direction: column; gap: 1rem; }

.prereq-list li {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1rem 1.2rem;
}

.prereq-list li svg { width: 20px; height: 20px; color: var(--blue); flex-shrink: 0; margin-top: 2px; }
.prereq-list li strong { display: block; font-size: 0.95rem; }
.prereq-list li span { font-size: 0.88rem; color: var(--ink-soft); }

.setup-ready-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2.4rem 2rem;
  text-align: center;
  background: var(--bg-alt);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.setup-ready-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--blue), var(--violet));
}

.setup-ready-card .cc-icon {
  width: 62px;
  height: 62px;
  margin: 0.4rem auto 1.2rem;
  color: var(--blue);
}

.setup-ready-card h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.6rem;
}

.setup-ready-card p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  max-width: 42ch;
  margin: 0 auto;
}

.ready-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.2rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #12805a;
  background: #e6f6ef;
  border: 1px solid #b9e3d1;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
}

.setup-jump {
  display: flex;
  width: fit-content;
  margin: 1.4rem auto 0;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--blue);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
  transition: border-color 0.2s ease, gap 0.2s ease;
}

.setup-jump:hover { border-color: var(--blue); gap: 0.6rem; }
.setup-jump svg { width: 16px; height: 16px; }

/* ---------------- Environment setup ---------------- */

.setup-section {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: #fff;
  border-top: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.setup-section::before {
  content: '';
  position: absolute;
  top: -160px;
  left: 50%;
  transform: translateX(-50%);
  width: 1000px;
  height: 520px;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.20), transparent 65%);
  pointer-events: none;
}

.setup-section .container { position: relative; z-index: 1; }
.setup-section .section-title { color: #fff; }
.setup-section .section-lede { color: #b7bdd0; }
.setup-section .section-lede strong { color: #dfe4f5; }
.setup-section .eyebrow { color: #a9b6ff; }
.setup-section .eyebrow::before { box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.28); }

.setup-section code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.07);
  padding: 0.08rem 0.34rem;
  border-radius: 5px;
  color: #dfe4f5;
}

.setup-section a:not(.btn) { color: #8fa4ff; text-decoration: none; border-bottom: 1px solid rgba(143,164,255,0.35); }
.setup-section a:not(.btn):hover { color: #b9c5ff; border-color: #b9c5ff; }

/* stack strip */

.stack-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 3.4rem;
}

.stack-item {
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.25rem;
  transition: background 0.2s ease, transform 0.2s ease;
}

.stack-item:hover { background: rgba(255,255,255,0.07); transform: translateY(-3px); }
.stack-item svg { width: 22px; height: 22px; color: #8fa4ff; margin-bottom: 0.7rem; }
.stack-item strong { display: block; font-size: 0.97rem; color: #fff; }
.stack-item span { display: block; font-size: 0.84rem; color: #99a2ba; line-height: 1.55; margin-top: 0.3rem; }

/* numbered steps */

.setup-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2.2rem;
}

.setup-step {
  position: relative;
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 1.5rem;
}

.setup-step::after {
  content: '';
  position: absolute;
  left: 22px;
  top: 58px;
  bottom: -2.2rem;
  width: 2px;
  background: linear-gradient(to bottom, rgba(143,164,255,0.35), rgba(143,164,255,0.02));
}

.setup-step:last-child::after { display: none; }

.step-num {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.05rem;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--violet));
  box-shadow: 0 8px 22px rgba(60, 90, 220, 0.4);
}

.step-body { min-width: 0; padding-bottom: 0.4rem; }
.step-body h3 { font-size: 1.2rem; font-weight: 800; color: #fff; margin-bottom: 0.4rem; letter-spacing: -0.01em; }
.step-body > p { color: #b7bdd0; font-size: 0.96rem; line-height: 1.7; max-width: 74ch; margin-bottom: 1.2rem; }
.step-body .term-caption { margin: 1.2rem 0 0.7rem; font-size: 0.9rem; color: #99a2ba; }

/* OS tabs inside the dark section */

.setup-section .code-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.14);
  color: #c3c9dc;
}

.setup-section .code-tab svg { width: 15px; height: 15px; }
.setup-section .code-tab:hover { background: rgba(255,255,255,0.11); color: #fff; }
.setup-section .code-tab.active { background: #fff; color: var(--navy); border-color: #fff; }

.os-steps {
  list-style: none;
  counter-reset: osstep;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-bottom: 1.3rem;
}

.os-steps li {
  counter-increment: osstep;
  position: relative;
  padding-left: 2.15rem;
  font-size: 0.93rem;
  line-height: 1.65;
  color: #c3c9dc;
}

/* Absolutely positioned, not a flex item: a flex parent would turn every
   inline <code>/<em> inside the step into a column of its own. */
.os-steps li::before {
  content: counter(osstep);
  position: absolute;
  left: 0;
  top: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(143,164,255,0.14);
  border: 1px solid rgba(143,164,255,0.32);
  color: #a9b6ff;
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.os-steps strong { color: #fff; }
.os-steps code, .term-caption code { white-space: nowrap; }

/* terminal blocks */

.term {
  background: #0d1019;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
}

.term-head {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.6rem 0.9rem 0.6rem 1.1rem;
  background: #151a27;
  border-bottom: 1px solid #242a3b;
}

.term-head .code-filename { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.copy-btn {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9aa3b8;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.copy-btn:hover { color: #fff; background: rgba(255,255,255,0.13); }
.copy-btn.copied { color: #7ee0b0; border-color: rgba(126,224,176,0.45); background: rgba(126,224,176,0.12); }

.term pre {
  margin: 0;
  padding: 1.15rem 1.3rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  line-height: 1.8;
  color: #d3d8ea;
  white-space: pre;
}

.tok-flag { color: #82aaff; }
.tok-prompt { color: #5c6684; user-select: none; }

.tok-hl {
  color: #ffd479;
  font-weight: 700;
  background: rgba(255, 212, 121, 0.13);
  border-radius: 5px;
  padding: 0.1rem 0.3rem;
  box-shadow: inset 0 0 0 1px rgba(255, 212, 121, 0.28);
}

/* notes on dark */

.dark-note {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-top: 1.1rem;
  padding: 0.9rem 1.1rem;
  font-size: 0.91rem;
  line-height: 1.65;
  color: #b7bdd0;
  background: rgba(143,164,255,0.07);
  border: 1px solid rgba(143,164,255,0.17);
  border-radius: var(--radius-md);
}

.dark-note svg { width: 18px; height: 18px; color: #8fa4ff; flex-shrink: 0; margin-top: 3px; }
.dark-note strong { color: #fff; }
.dark-note.warn { background: rgba(255, 193, 94, 0.08); border-color: rgba(255, 193, 94, 0.26); color: #ded3bd; }
.dark-note.warn svg { color: #ffc15e; }
.dark-note.warn code { background: rgba(255, 193, 94, 0.14); color: #ffd8a0; border-color: rgba(255,193,94,0.2); }

/* Docker Hub call to action */

.hub-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.3rem;
}

.btn-docker {
  background: #1d63ed;
  color: #fff;
  box-shadow: 0 8px 24px rgba(29, 99, 237, 0.38);
}

.btn-docker:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(29, 99, 237, 0.5); background: #2a70f5; }
.btn-docker svg { width: 20px; height: 20px; }

.hub-hint {
  font-family: var(--font-mono);
  font-size: 0.83rem;
  color: #8890a8;
}

/* browser + jupyter mock */

.browser-mock {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.09);
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
  background: #fff;
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.6rem 0.9rem 0.6rem 1.1rem;
  background: #eceef4;
  border-bottom: 1px solid #d9dde7;
}

.browser-bar .window-dots span { opacity: 0.85; }

.browser-url {
  flex: 1;
  background: #fff;
  border: 1px solid #d8dce6;
  border-radius: 999px;
  padding: 0.35rem 0.95rem;
  font-family: var(--font-mono);
  font-size: 0.79rem;
  color: #46506b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jup-list { padding: 0.5rem 0.6rem; background: #fff; }

.jup-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.62rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--ink);
}

.jup-row + .jup-row { border-top: 1px solid #f0f0ee; border-radius: 0; }
.jup-row svg { width: 17px; height: 17px; color: #f37726; flex-shrink: 0; }
.jup-row .jup-name { font-family: var(--font-mono); font-size: 0.83rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.jup-row .jup-tag {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--blue);
  background: rgba(41, 82, 200, 0.09);
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
}


/* ---------------- Plan B: Railway fallback ----------------
   Lives inside .setup-section, so it inherits the dark palette: .term,
   .dark-note and .browser-mock work here unchanged. The mock panels below
   are drawn in CSS rather than screenshotted, so they survive a redesign of
   the Railway dashboard without going stale. */

.fallback-block {
  margin-top: 4.5rem;
  padding: 2.4rem 2.2rem 2.6rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(197, 138, 255, 0.26);
  background:
    radial-gradient(900px 300px at 12% -10%, rgba(197, 138, 255, 0.14), transparent 70%),
    rgba(255, 255, 255, 0.035);
}

.fallback-head { max-width: 78ch; margin-bottom: 2.6rem; }
.fallback-head h3 { font-size: 1.55rem; font-weight: 800; color: #fff; letter-spacing: -0.02em; margin: 0.7rem 0 0.9rem; }
.fallback-head p { color: #b7bdd0; font-size: 0.97rem; line-height: 1.75; }
.fallback-head p + p { margin-top: 0.8rem; }
.fallback-head p strong { color: #e8ddff; }
.fallback-head .hub-row { margin: 1.5rem 0 0; }

.fallback-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #d7b4ff;
  background: rgba(197, 138, 255, 0.12);
  border: 1px solid rgba(197, 138, 255, 0.28);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
}

.fallback-eyebrow svg { width: 15px; height: 15px; }

.btn-railway {
  background: #150c22;
  color: #fff;
  border-color: rgba(197, 138, 255, 0.4);
  box-shadow: 0 8px 24px rgba(124, 92, 255, 0.3);
}

.btn-railway:hover { transform: translateY(-2px); background: #1e1030; box-shadow: 0 12px 30px rgba(124, 92, 255, 0.42); }
.btn-railway svg { width: 20px; height: 20px; }

/* lettered steps, so they never read as a continuation of steps 1–4 */

.rw-steps .step-num {
  background: linear-gradient(135deg, #7c5cff, #c58aff);
  box-shadow: 0 8px 22px rgba(150, 92, 255, 0.38);
}

.rw-steps .setup-step::after { background: linear-gradient(to bottom, rgba(197,138,255,0.32), rgba(197,138,255,0.02)); }

.rw-steps kbd {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #dfe4f5;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 0.05rem 0.35rem;
}

/* dashboard mock */

.rw-shot {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.09);
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
  background: #12111c;
}

.rw-bar {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.6rem 0.9rem 0.6rem 1.1rem;
  background: #1b1926;
  border-bottom: 1px solid #2b2839;
}

.rw-crumb {
  flex: 1;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #9b93b5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rw-body { padding: 1.1rem 1.2rem; display: flex; flex-direction: column; gap: 1rem; }
.rw-body-center { align-items: center; padding: 1.8rem 1.2rem; }

/* A — login card */

.rw-login {
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.3rem;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
}

.rw-login-title { font-size: 0.95rem; font-weight: 800; color: #fff; text-align: center; margin-bottom: 0.45rem; }

.rw-auth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #c3c9dc;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.8rem;
}

.rw-auth svg { width: 16px; height: 16px; }
.rw-auth-primary { color: #150c22; background: #fff; border-color: #fff; }

/* B — deploy menu */

.rw-menu { display: flex; flex-direction: column; gap: 0.3rem; }

.rw-menu-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7d759a;
  padding: 0 0.2rem 0.3rem;
}

.rw-menu-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.88rem;
  color: #b7b0cd;
  background: rgba(255,255,255,0.03);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
}

.rw-menu-item svg { width: 17px; height: 17px; color: #8f86ad; flex-shrink: 0; }

.rw-menu-item.active {
  color: #fff;
  background: rgba(197, 138, 255, 0.13);
  border-color: rgba(197, 138, 255, 0.42);
  font-weight: 700;
}

.rw-menu-item.active svg { color: #d7b4ff; }

.rw-pick {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #d7b4ff;
  border: 1px solid rgba(197, 138, 255, 0.42);
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
}

/* B / C — fields and buttons */

.rw-field, .rw-port-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.rw-field-label {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7d759a;
  flex-shrink: 0;
}

.rw-input {
  flex: 1;
  min-width: 180px;
  display: flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #e4dcff;
  background: #0d0c15;
  border: 1px solid rgba(197, 138, 255, 0.32);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  overflow: hidden;
  white-space: nowrap;
}

/* The caret is a sibling, so the flex box itself cannot be ellipsized:
   the text needs its own item to shrink inside. */
.rw-input-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.rw-input-sm { flex: 0 0 auto; min-width: 0; width: 5.5rem; }

.rw-caret {
  width: 1.5px;
  height: 1em;
  margin-left: 2px;
  background: #d7b4ff;
  animation: rw-blink 1.1s steps(1) infinite;
}

@keyframes rw-blink { 50% { opacity: 0; } }

.rw-btn {
  flex-shrink: 0;
  font-size: 0.82rem;
  font-weight: 800;
  color: #150c22;
  background: linear-gradient(135deg, #c58aff, #9d7bff);
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
}

/* C — networking panel */

.rw-panel {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.09);
}

.rw-panel-title { font-size: 0.92rem; font-weight: 800; color: #fff; }

.rw-domain {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  background: rgba(126, 224, 176, 0.08);
  border: 1px solid rgba(126, 224, 176, 0.26);
}

.rw-domain svg { width: 16px; height: 16px; color: #7ee0b0; flex-shrink: 0; }

.rw-domain-url {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #c8f0dd;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rw-badge {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: #7ee0b0;
  border: 1px solid rgba(126, 224, 176, 0.35);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
}

/* D — the small print */

.rw-caveats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
  margin-top: 1.4rem;
}

.rw-caveat {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
}

.rw-caveat svg { width: 19px; height: 19px; color: #d7b4ff; flex-shrink: 0; margin-top: 2px; }
.rw-caveat > div > strong { display: block; font-size: 0.9rem; color: #fff; margin-bottom: 0.25rem; }
.rw-caveat > div > span { display: block; font-size: 0.85rem; line-height: 1.6; color: #a8aec2; }
.rw-caveat > div > span strong { color: #dfe4f5; }
.rw-caveat em { color: #c3c9dc; font-style: normal; font-weight: 700; }

/* ---------------- Agenda ---------------- */

.agenda-sessions {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.agenda-break {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--ink-faint);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0;
}

.agenda-break::before, .agenda-break::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.session-card {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.session-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  padding: 1.4rem 1.8rem;
  background: var(--navy);
  color: #fff;
}

.session-head .session-name { font-size: 1.05rem; font-weight: 800; }
.session-head .session-time {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  color: #cdd6f4;
}

.agenda-blocks { padding: 0.5rem 1.8rem 1.6rem; }

.agenda-block {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 1.4rem;
  padding: 1.4rem 0;
  border-top: 1px solid var(--line);
}

.agenda-block:first-child { border-top: none; }

.agenda-time {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--ink-faint);
  font-weight: 600;
  padding-top: 0.2rem;
}

.agenda-block h4 { font-size: 1.05rem; font-weight: 800; margin-bottom: 0.5rem; }

.agenda-block ul { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }

.agenda-block ul li {
  font-size: 0.92rem;
  color: var(--ink-soft);
  padding-left: 1.1rem;
  position: relative;
}

.agenda-block ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink-faint);
}

.ex-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--blue-deep);
  background: rgba(41, 82, 200, 0.09);
  border: 1px solid rgba(41, 82, 200, 0.18);
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-sm);
  margin-right: 0.4rem;
}

/* ---------------- Code examples ---------------- */

.code-tabs { display: flex; gap: 0.6rem; margin-bottom: 1.4rem; flex-wrap: wrap; }

.code-tab {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-alt);
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.2s ease;
}

.code-tab.active { background: var(--navy); color: #fff; border-color: var(--navy); }

.code-panel { display: none; }
.code-panel.active { display: block; }

.code-window {
  background: #10131d;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.code-window-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.2rem;
  background: #171b28;
  border-bottom: 1px solid #262c3d;
}

.window-dots { display: flex; gap: 6px; }
.window-dots span { width: 10px; height: 10px; border-radius: 50%; }
.window-dots span:nth-child(1) { background: #ff5f57; }
.window-dots span:nth-child(2) { background: #febc2e; }
.window-dots span:nth-child(3) { background: #28c840; }

.code-filename { font-family: var(--font-mono); font-size: 0.8rem; color: #8892b0; }

.code-window pre {
  margin: 0;
  padding: 1.4rem 1.6rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.65;
  color: #d3d8ea;
}

.tok-kw { color: #c792ea; }
.tok-str { color: #e6b673; }
.tok-com { color: #6b7290; font-style: italic; }
.tok-fn { color: #82aaff; }
.tok-num { color: #f78c6c; }

.code-note {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  margin-top: 1.2rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
  background: rgba(41,82,200,0.06);
  border: 1px solid rgba(41,82,200,0.14);
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-md);
}

.code-note svg { width: 18px; height: 18px; color: var(--blue); flex-shrink: 0; margin-top: 2px; }

.code-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 1.2rem; flex-wrap: wrap; gap: 1rem; }

/* ---------------- Who we are ---------------- */

.org-plates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.6rem;
  margin-bottom: 3.5rem;
}

.org-plate {
  background: var(--navy);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  color: #dfe2ee;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
}

.org-logos {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  margin-bottom: 1.3rem;
  flex-wrap: wrap;
}

.org-logos img { height: 40px; width: auto; }
.org-logos img.usc-logo { height: 46px; background: #fff; padding: 6px 8px; border-radius: 6px; }

.org-plate p { font-size: 0.93rem; line-height: 1.7; color: #b7bdd0; margin-bottom: 1.6rem; }
.org-plate p strong { color: #fff; }

.org-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  align-self: flex-start;
  margin-top: auto;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  padding: 0.55rem 1rem;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.org-link svg { width: 15px; height: 15px; flex-shrink: 0; }
.org-link:hover { background: rgba(255,255,255,0.16); transform: translateY(-2px); }

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.6rem;
}

.team-card {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.8rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}

.team-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }

.team-photo {
  width: 172px;
  height: 172px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 1.3rem;
  box-shadow: var(--shadow-sm);
  border: 3px solid var(--bg);
}

.team-photo img { width: 100%; height: 100%; object-fit: cover; }

.team-card h3 { font-size: 1.05rem; font-weight: 800; }

.team-role {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0.35rem 0 0.9rem;
}

.team-lead-tag {
  display: inline-block;
  align-self: center;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--violet));
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  margin-bottom: 0.6rem;
}

.team-lead-tag.placeholder {
  visibility: hidden;
}

.team-card p.bio {
  font-size: 0.86rem;
  color: var(--ink-soft);
  line-height: 1.6;
  margin-bottom: 1.1rem;
  text-align: left;
}

.team-links { display: flex; justify-content: center; gap: 0.6rem; margin-top: auto; padding-top: 0.2rem; }

.team-links a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  transition: all 0.2s ease;
}

.team-links a:hover { background: var(--blue); color: #fff; border-color: var(--blue); }
.team-links svg { width: 16px; height: 16px; }

/* ---------------- Acknowledgements ---------------- */

.ack-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.6rem;
  margin-bottom: 1.6rem;
}

.ack-card {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.ack-banner {
  height: 56px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
  margin-bottom: 1.4rem;
}

.ack-card h3 { font-size: 1.15rem; font-weight: 800; margin-bottom: 0.6rem; }
.ack-card p { color: var(--ink-soft); font-size: 0.95rem; line-height: 1.7; }

.ack-card .funding-code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--blue-deep);
  background: rgba(41, 82, 200, 0.08);
  border: 1px solid rgba(41, 82, 200, 0.16);
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-sm);
  margin-top: 0.9rem;
  width: fit-content;
}

.ack-card .repo-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--line);
  padding-bottom: 2px;
  width: fit-content;
  margin-top: auto;
  padding-top: 1.4rem;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.ack-card .repo-link svg { width: 15px; height: 15px; }
.ack-card .repo-link:hover { border-color: var(--blue); color: var(--blue); }

.ack-card.dark {
  background: var(--navy);
  border-color: transparent;
}

.ack-card.dark h3 { color: #fff; }
.ack-card.dark p { color: #b7bdd0; }
.ack-card.dark .repo-link { color: #fff; border-bottom-color: rgba(255,255,255,0.25); }
.ack-card.dark .repo-link:hover { color: #8fa4ff; border-bottom-color: #8fa4ff; }

.qs-logo-rows {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-bottom: 1.6rem;
}

.qs-logo-row {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  flex-wrap: wrap;
}

.qs-logo-row img { height: 26px; width: auto; }
.qs-logo-row:first-child { justify-content: center; }
.qs-logo-row:first-child img { height: 30px; }

.ack-general {
  background: var(--navy);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  box-shadow: var(--shadow-md);
}

.ack-general-logos {
  display: flex;
  align-items: center;
  gap: 2.2rem;
  flex-wrap: wrap;
  margin-bottom: 1.6rem;
  padding-bottom: 1.6rem;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.ack-general-logos img { height: 30px; width: auto; }

.ack-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.ack-list li {
  font-size: 0.82rem;
  line-height: 1.7;
  color: #9aa3b8;
  padding-left: 1.1rem;
  position: relative;
}

.ack-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #4a5680;
}

/* ---------------- Bibliography ---------------- */

.biblio-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.biblio-item {
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.7rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.biblio-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.biblio-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(41, 82, 200, 0.1);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.biblio-icon svg { width: 20px; height: 20px; }

.biblio-body h3 {
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.45;
  margin-bottom: 0.5rem;
}

.biblio-authors {
  font-size: 0.86rem;
  color: var(--ink-soft);
  margin-bottom: 0.8rem;
  line-height: 1.6;
}

.biblio-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.biblio-venue {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-faint);
}

.biblio-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--line);
  padding-bottom: 1px;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.biblio-link svg { width: 13px; height: 13px; }
.biblio-link:hover { border-color: var(--blue); color: var(--blue); }

/* ---------------- Footer ---------------- */

.site-footer {
  background: var(--navy);
  color: #b7bdd0;
  padding: 3rem 0 1.6rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.2rem;
}

.footer-top h4 { color: #fff; font-size: 0.95rem; margin-bottom: 0.9rem; }
.footer-top p, .footer-top a { font-size: 0.88rem; line-height: 1.8; }
.footer-top a { text-decoration: none; color: #b7bdd0; transition: color 0.2s ease; }
.footer-top a:hover { color: #fff; }
.footer-top ul { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }

.footer-brand-row { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.8rem; }
.footer-brand-row svg { width: 26px; height: 26px; }
.footer-brand-row span { font-weight: 800; color: #fff; font-size: 1rem; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.4rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.8rem;
  color: #7b83a0;
}

/* ---------------- Fade in on scroll ---------------- */

.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ---------------- Responsive ---------------- */

/* The header nav is wide: shrink it first, then swap to the mobile menu well
   before it can overflow the container. */
@media (max-width: 1280px) and (min-width: 1141px) {
  .nav-menu a { font-size: 0.8rem; padding: 0.45rem 0.5rem; }
}

@media (max-width: 1140px) {
  .nav-menu {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: rgba(11,14,22,0.98);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    z-index: 1050;
  }
  .nav-menu.active { max-height: 100vh; height: 100vh; padding: 90px 0 2rem; }
  .nav-menu li { text-align: center; }
  .nav-menu a { display: block; padding: 1rem; border-radius: 0; font-size: 1.1rem; }
  .menu-toggle { display: flex; }
  .site-header .container { justify-content: center; }
}

@media (max-width: 980px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-visual { max-width: 360px; margin: 0 auto; }
  .split { grid-template-columns: 1fr; }
  .split.reverse .split-media { order: 0; }
  .def-grid { grid-template-columns: 1fr; }
  .prereq-grid { grid-template-columns: 1fr; }
  .stack-strip { grid-template-columns: repeat(2, 1fr); }
  .org-plates { grid-template-columns: 1fr; }
  .ack-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .rw-caveats { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .section { padding: 3.5rem 0; }
  .stack-strip { grid-template-columns: 1fr; }
  .setup-step { grid-template-columns: 36px 1fr; gap: 1rem; }
  .setup-step::after { left: 17px; top: 46px; }
  .step-num { width: 36px; height: 36px; font-size: 0.95rem; }
  .setup-ready-card { padding: 1.8rem 1.4rem; }
  .term pre { font-size: 0.78rem; padding: 1rem 1.1rem; }
  .hub-row .btn { width: 100%; justify-content: center; }
  .fallback-block { padding: 1.6rem 1.2rem 1.9rem; }
  .fallback-head h3 { font-size: 1.28rem; }
  .rw-btn { flex: 1; text-align: center; }
  .rw-body { padding: 0.9rem; }
  .agenda-block { grid-template-columns: 1fr; gap: 0.4rem; }
  .team-grid { grid-template-columns: 1fr; }
  .def-card, .session-head, .ack-card, .ack-general { padding: 1.4rem; }
  .biblio-item { padding: 1.2rem; gap: 0.9rem; }
}
