/* ---------- Font (self-hosted, no third-party requests) ---------- */
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #fbfaf7;
  --bg-alt: #f1efe9;
  --surface: #ffffff;
  --ink: #14201d;
  --ink-soft: #4a5753;
  --line: #e2ded5;
  --accent: #1f6f5c;
  --accent-ink: #ffffff;
  --accent-soft: #e3f0eb;
  --dark: #0f1f1b;
  --dark-ink: #e9efec;
  --dark-soft: #a9bab4;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(20 32 29 / 6%), 0 8px 24px rgb(20 32 29 / 8%);
  --container: 1120px;
  --header-h: 64px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1513;
    --bg-alt: #121d1a;
    --surface: #16231f;
    --ink: #e8eeeb;
    --ink-soft: #a7b6b1;
    --line: #26352f;
    --accent: #5cc3a6;
    --accent-ink: #08130f;
    --accent-soft: #173029;
    --dark: #08100e;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 35%);
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.5rem, 6vw, 4.25rem); font-weight: 750; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.85rem, 3.6vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 650; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }

.eyebrow {
  font-size: 0.8rem; font-weight: 650; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 0.75rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  padding: 0.75em 1.25em; border-radius: 999px; font-weight: 600; font-size: 0.975rem;
  text-decoration: none; border: 1.5px solid transparent; transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, black); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-lg { font-size: 1.15rem; padding: 0.85em 1.6em; }
.btn-row, .hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.5rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--header-h); }
.brand { font-weight: 750; font-size: 1.1rem; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; white-space: nowrap; }
.nav-links { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 6px 12px; border-radius: 999px; color: var(--ink-soft);
  text-decoration: none; font-size: 0.93rem; font-weight: 550; white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); background: var(--bg-alt); }
.nav-links .nav-cta { background: var(--ink); color: var(--bg); }
.nav-links .nav-cta:hover, .nav-links .nav-cta.active { background: var(--accent); color: var(--accent-ink); }

/* Phone menu: a "Menu" button that drops the links down as a panel */
.menu-btn {
  display: none; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 0.95rem; font-weight: 600; color: var(--ink); background: var(--bg-alt); border: 1px solid var(--line);
}
.menu-btn svg { width: 18px; height: 18px; }
.menu-btn path { transition: transform .2s ease, opacity .2s ease; transform-origin: 12px 12px; }
.menu-btn[aria-expanded="true"] .mb-top { transform: translateY(5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .mb-mid { opacity: 0; }
.menu-btn[aria-expanded="true"] .mb-bot { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 860px) {
  html:not(.no-js) .menu-btn { display: inline-flex; }
  html:not(.no-js) .site-header nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 16px 30px rgb(0 0 0 / 18%);
    padding: 8px 20px 16px; max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
  }
  html:not(.no-js) .site-header.menu-open nav { display: block; }
  html:not(.no-js) .nav-links { flex-direction: column; gap: 2px; }
  html:not(.no-js) .nav-links a { padding: 12px 14px; border-radius: 10px; font-size: 1.05rem; }
  html:not(.no-js) .nav-links .nav-cta { margin-top: 6px; text-align: center; }

  /* Without JavaScript, keep the horizontally scrolling row of links */
  .no-js .header-inner { flex-direction: column; align-items: stretch; gap: 0; padding-top: 10px; }
  .no-js .brand { padding-bottom: 4px; }
  .no-js .site-header nav { overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 0 20px 8px; }
  .no-js .site-header nav::-webkit-scrollbar { display: none; }
  .no-js { --header-h: 100px; }
}

/* ---------- Hero ---------- */
.hero { padding-top: clamp(40px, 7vw, 88px); background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%); }
.hero-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: center; padding-bottom: clamp(40px, 6vw, 72px); }
.cfa { color: var(--ink-soft); font-weight: 500; }
.lede { font-size: clamp(1.15rem, 2vw, 1.35rem); color: var(--ink-soft); max-width: 34em; }
.lede strong { color: var(--ink); }
.stats { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stats li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat-num { display: block; font-size: 1.7rem; font-weight: 750; letter-spacing: -0.03em; color: var(--accent); line-height: 1.1; }
.stat-label { display: block; font-size: 0.85rem; color: var(--ink-soft); line-height: 1.35; margin-top: 4px; }
.hero-portrait { justify-self: center; width: 100%; max-width: 400px; }
.hero-portrait img {
  width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%;
  box-shadow: 0 0 0 6px var(--bg), 0 0 0 8px color-mix(in srgb, var(--accent) 55%, transparent), var(--shadow);
}
.panorama { height: clamp(90px, 13vw, 200px); overflow: hidden; }
.panorama img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-portrait { order: -1; max-width: 220px; }
}
@media (max-width: 520px) {
  .stats { grid-template-columns: 1fr; }
  .stats li { display: flex; align-items: baseline; gap: 12px; }
  .stat-num { min-width: 2.6em; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 760px; margin-bottom: 40px; }
.section-intro { font-size: 1.125rem; color: var(--ink-soft); }
.link-line { color: var(--ink-soft); }

.split { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.split-reverse { grid-template-columns: 1.1fr 0.9fr; }
@media (max-width: 860px) {
  .split, .split-reverse { grid-template-columns: 1fr; }
}

/* Career: logo cards on a timeline; select one for details */
.role-tag { font-size: 0.8rem; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 0.5rem; }
.career-track { list-style: none; margin: 0; padding: 26px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; position: relative; }
.career-track::before { content: ""; position: absolute; left: 12.5%; right: 12.5%; top: 6px; height: 2px; background: linear-gradient(90deg, var(--line), var(--accent)); }
.career-item { position: relative; }
.career-item::before {
  content: ""; position: absolute; left: 50%; top: -26px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--ink-soft);
}
.career-now::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }

.career-card {
  width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
  font: inherit; color: var(--ink); cursor: pointer; padding: 0 0 18px; overflow: hidden;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform .15s ease, border-color .15s ease;
}
@media (hover: hover) { .career-card:hover { transform: translateY(-3px); border-color: var(--accent); } }
.career-card[aria-expanded="true"] { border-color: var(--accent); }
.career-logo {
  width: 100%; height: 132px; margin-bottom: 14px; display: grid; place-items: center; padding: 20px 24px;
  background: #fff; border-bottom: 1px solid var(--line);
}
.career-logo img { max-width: 100%; max-height: 64px; width: auto; height: auto; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: #001123; font-weight: 650; letter-spacing: -0.02em; line-height: 1; }
.wordmark-veilstream { font-size: 1.7rem; }
.wordmark-veilstream img { width: 44px; height: 44px; max-height: none; }
.wordmark-sepio { font-size: 1.9rem; }
.wordmark-sepio img { width: 52px; height: 52px; max-height: none; }
.career-years { font-weight: 700; font-size: 1.05rem; color: var(--accent); font-variant-numeric: tabular-nums; }
.career-role { font-weight: 600; padding: 0 12px; }
.career-exit { font-size: 0.9rem; color: var(--ink-soft); padding: 0 12px; }
.career-exit::after { content: " +"; color: var(--accent); font-weight: 700; }
.career-card[aria-expanded="true"] .career-exit::after { content: " −"; }

.career-panels { margin-top: 16px; }
.career-panel {
  border: 1.5px solid var(--accent); border-radius: var(--radius); background: var(--accent-soft);
  padding: 18px 22px; margin-top: 12px; animation: panel-in .2s ease;
}
.career-panel p { margin: 0 0 0.5em; }
.career-panel a { font-weight: 600; }
.career-panel[hidden] { display: none; }
@keyframes panel-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .career-panel { animation: none; } .career-card { transition: none; } }

@media (max-width: 860px) {
  .career-track { grid-template-columns: repeat(2, 1fr); padding-top: 0; }
  .career-track::before, .career-item::before { display: none; }
}
@media (max-width: 520px) {
  .career-logo { height: 108px; }
  .career-logo { padding: 16px 12px; }
  .wordmark-veilstream { font-size: 1.05rem; gap: 6px; }
  .wordmark-veilstream img { width: 26px; height: 26px; }
  .wordmark-sepio { font-size: 1.15rem; gap: 6px; }
  .wordmark-sepio img { width: 30px; height: 30px; }
  .career-role, .career-exit { font-size: 0.88rem; }
}

.callout {
  margin-top: 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  border: 1px dashed var(--line); border-radius: var(--radius); padding: 20px 24px;
}
.callout p { margin: 0; }
.callout-label { font-size: 0.8rem; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }

/* Book */
.book-cover { max-width: 340px; justify-self: center; }
.book-cover img { border-radius: 6px; box-shadow: 0 2px 4px rgb(0 0 0 / 15%), 0 24px 48px rgb(0 0 0 / 22%); transform: rotate(-1.5deg); }
@media (max-width: 860px) { .book-cover { max-width: 240px; } }

/* Advocacy (always dark) */
.section-dark { background: var(--dark); color: var(--dark-ink); }
.section-dark .eyebrow, .section-dark a { color: #7fd6bc; }
.section-dark .link-line { color: var(--dark-soft); }
.checklist { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.checklist li { position: relative; padding: 10px 0 10px 32px; border-bottom: 1px solid rgb(255 255 255 / 10%); }
.checklist li::before {
  content: ""; position: absolute; left: 4px; top: 18px; width: 12px; height: 12px;
  border-radius: 3px; background: #7fd6bc; transform: rotate(45deg);
}
.checklist strong { color: #fff; font-weight: 600; }

/* ---------- Photo carousel (CSS scroll-snap; JS adds arrows, thumbnails, counter) ---------- */
.car-stage { position: relative; }
.car-track {
  list-style: none; margin: 0; padding: 0;
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  overscroll-behavior-x: contain; scrollbar-width: none;
  border-radius: var(--radius); background: #070d0b;
  aspect-ratio: 16 / 10; max-height: 70vh; width: 100%;
}
.car-track::-webkit-scrollbar { display: none; }
@media (prefers-reduced-motion: reduce) { .car-track { scroll-behavior: auto; } }
.car-slide { flex: 0 0 100%; scroll-snap-align: center; scroll-snap-stop: always; position: relative; }
.car-slide a { position: absolute; inset: 0; display: block; cursor: zoom-in; }
.car-slide img { width: 100%; height: 100%; object-fit: contain; }

.car-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgb(255 255 255 / 85%); color: #0f1f1b; font-size: 1.8rem; line-height: 1;
  display: grid; place-items: center; box-shadow: 0 2px 10px rgb(0 0 0 / 25%);
  transition: background .15s ease, opacity .15s ease;
}
.car-btn:hover { background: #fff; }
.car-btn:disabled { opacity: 0; pointer-events: none; }
.car-prev { left: 14px; }
.car-next { right: 14px; }
.no-js .car-btn, .no-js .car-thumbs { display: none; }

.car-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-top: 12px; }
.car-meta p { margin: 0; }
.car-caption { color: var(--ink-soft); font-size: 0.98rem; }
.car-count { color: var(--ink-soft); font-size: 0.9rem; font-variant-numeric: tabular-nums; white-space: nowrap; }

.car-thumbs {
  display: flex; gap: 8px; overflow-x: auto; margin-top: 14px; padding: 5px 5px 8px;
  scroll-snap-type: x proximity; scrollbar-width: thin;
}
.car-thumb {
  flex: 0 0 auto; width: 96px; height: 64px; padding: 0; border: 0; border-radius: 6px; overflow: hidden;
  cursor: pointer; background: var(--bg-alt); opacity: 0.55; scroll-snap-align: center;
  outline: 2px solid transparent; outline-offset: 2px; transition: opacity .15s ease, outline-color .15s ease;
}
.car-thumb img { width: 100%; height: 100%; object-fit: cover; }
.car-thumb:hover { opacity: 0.85; }
.car-thumb[aria-current="true"] { opacity: 1; outline-color: var(--accent); }

@media (max-width: 600px) {
  .car-track { aspect-ratio: 3 / 2; border-radius: 10px; }
  .car-btn { width: 40px; height: 40px; font-size: 1.5rem; }
  .car-prev { left: 8px; } .car-next { right: 8px; }
  .car-thumb { width: 72px; height: 48px; }
}

/* ---------- Lightbox ---------- */
.lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0;
  border: 0; background: rgb(5 10 9 / 94%); color: #fff;
}
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: rgb(0 0 0 / 70%); }
.lightbox figure { max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lb-img { max-width: 100%; max-height: calc(100dvh - 90px); width: auto; height: auto; border-radius: 4px; object-fit: contain; }
.lb-caption { font-size: 0.9rem; color: #c9d4d0; text-align: center; padding: 0 56px; }
.lb-btn {
  position: absolute; background: rgb(255 255 255 / 12%); color: #fff; border: 0; cursor: pointer;
  width: 48px; height: 48px; border-radius: 50%; font-size: 1.6rem; line-height: 1; display: grid; place-items: center;
}
.lb-btn:hover { background: rgb(255 255 255 / 24%); }
.lb-close { top: 16px; right: 16px; font-size: 1.2rem; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) { .lb-prev, .lb-next { top: auto; bottom: 16px; transform: none; } }

/* ---------- Contact ---------- */
.contact { position: relative; isolation: isolate; color: #fff; text-align: center; padding: clamp(96px, 14vw, 160px) 0; overflow: hidden; }
.contact-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.contact::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgb(8 20 17 / 55%), rgb(8 20 17 / 75%)); }
.contact-inner { max-width: 680px; }
.contact h2 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.contact p { font-size: 1.15rem; color: #e3ece8; }
.contact .btn-primary { background: #fff; color: #0f1f1b; margin: 0.5rem 0 1.5rem; }
.contact .btn-primary:hover { background: #e3f0eb; }
.contact-links { font-size: 1rem !important; }
.contact-links a { color: #fff; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: var(--dark-soft); font-size: 0.875rem; padding: 24px 0; text-align: center; }
.site-footer p { margin: 0; }

/* Open-source projects (inside the Author section) */
.projects-head { margin: clamp(56px, 8vw, 88px) 0 24px; }
.subhead { font-size: clamp(1.5rem, 2.6vw, 1.9rem); font-weight: 700; margin-bottom: 0.35em; }
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 760px) { .projects { grid-template-columns: 1fr; } }
.project { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.project h4 { font-size: 1.3rem; font-weight: 650; letter-spacing: -0.02em; margin: 0 0 0.5em; }
.project h4 a { color: var(--ink); text-decoration: none; }
.project h4 a:hover { color: var(--accent); }
.project p:last-child { margin: 0; color: var(--ink-soft); font-size: 0.98rem; }
.github-btn { margin-top: 24px; }
.talk-note { margin: 24px 0 0; color: var(--ink-soft); max-width: 760px; }

/* University shenanigans */
.fun-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 960px) { .fun-grid { grid-template-columns: 1fr; max-width: 560px; } }
.fun-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.fun-media { display: block; position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #08141a; }
.fun-media img, .fun-media svg { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.fun-media:hover img, .fun-media:hover svg { transform: scale(1.04); }
.fun-video::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; transform: translate(-50%, -50%);
  border-radius: 50%; background: rgb(0 0 0 / 60%) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5v14l11-7z' fill='white'/%3E%3C/svg%3E") center / 30px no-repeat;
  transition: background-color .15s ease;
}
.fun-video:hover::after { background-color: rgb(0 0 0 / 80%); }
.fun-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.fun-body h3 { font-size: 1.25rem; }
.fun-body p:not(.role-tag) { color: var(--ink-soft); font-size: 0.98rem; }
.fun-link { margin-top: auto; font-weight: 600; font-size: 0.95rem; }

/* Brand icons inside links and buttons */
.icon { width: 1.1em; height: 1.1em; flex: none; }
/* Align on the text, not the icon, so icon links line up with plain links */
.icon-link { display: inline-flex; align-items: baseline; gap: 0.35em; }
.icon-link .icon { align-self: center; }

/* Book: buy + free downloads */
.free-copy { margin-top: 1.25rem; }
.free-label { margin: 0 0 0.5rem; font-size: 0.9rem; font-weight: 600; color: var(--ink-soft); }
.btn-row-tight { margin-top: 0; gap: 8px; }
.btn-sm { padding: 0.5em 1em; font-size: 0.9rem; }
.btn-meta { font-weight: 500; color: var(--ink-soft); }

/* Book summary slides reuse the carousel; slides are 16:9 */
.slides-carousel { max-width: max(300px, calc((100vh - 230px) * 16 / 9)); margin-inline: auto; }
.slides-carousel .car-track { aspect-ratio: 16 / 9; max-height: none; }
.slides-download { margin: 12px 0 0; font-size: 0.95rem; }
.advocacy-intro { font-size: 1.125rem; color: var(--dark-ink); margin-bottom: 1.25rem; max-width: 34em; }

/* Advocacy photo */
.advocacy-photo { justify-self: center; max-width: 400px; width: 100%; }
.advocacy-photo img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 20px; box-shadow: 0 20px 50px rgb(0 0 0 / 40%); }
@media (max-width: 860px) { .advocacy-photo { max-width: 320px; } }

/* Advocacy: "In the news" as a row of newspaper pages (scroll-snap; JS adds arrows, dots, counter) */
.news { margin-top: clamp(48px, 7vw, 80px); min-width: 0; }
.news-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 18px; }
.news-head h3 { margin: 0; font-size: clamp(1.5rem, 2.6vw, 1.9rem); color: #fff; }
.news-count { margin: 4px 0 0; font-size: 0.9rem; color: var(--dark-soft); font-variant-numeric: tabular-nums; }
.news-nav { display: flex; gap: 10px; }
.news-btn {
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  border: 1px solid rgb(255 255 255 / 25%); background: transparent; color: #fff; font-size: 1.6rem; line-height: 1;
  display: grid; place-items: center; transition: background .15s ease, opacity .15s ease;
}
.news-btn:hover { background: rgb(255 255 255 / 12%); }
.news-btn:disabled { opacity: 0.3; cursor: default; background: transparent; }
.no-js .news-nav, .no-js .news-dots { display: none; }

.news-track {
  --gap: 20px; --per: 3;
  list-style: none; margin: 0; padding: 6px 2px 22px; display: flex; gap: var(--gap); overflow-x: auto;
  scroll-snap-type: x mandatory; scroll-behavior: smooth; overscroll-behavior-x: contain; scrollbar-width: none;
}
.news-track::-webkit-scrollbar { display: none; }
@media (prefers-reduced-motion: reduce) { .news-track { scroll-behavior: auto; } }
@media (max-width: 1000px) { .news-track { --per: 2; } }
@media (max-width: 640px) { .news-track { --per: 1.12; --gap: 14px; } }
.paper { flex: 0 0 calc((100% - (var(--per) - 1) * var(--gap)) / var(--per)); scroll-snap-align: start; display: flex; }

/* The newspaper page itself */
.paper article {
  --ink: #1d1c1a; --ink-soft: #5b564c; --rule: #2a2824;
  flex: 1; display: flex; flex-direction: column; padding: 20px 22px 18px;
  color: var(--ink); font-family: Georgia, "Times New Roman", Times, serif;
  background:
    radial-gradient(120% 90% at 50% 0%, rgb(255 255 255 / 55%), transparent 70%),
    linear-gradient(180deg, #f6f1e4, #ece4d1);
  border-radius: 3px;
  box-shadow: 0 1px 0 rgb(0 0 0 / 20%), 0 14px 30px rgb(0 0 0 / 45%);
  transition: transform .2s ease;
}
@media (hover: hover) { .paper article:hover { transform: translateY(-4px) rotate(-0.4deg); } }
.paper-masthead {
  margin: 0; padding-bottom: 8px; text-align: center; font-weight: 700; font-size: 1.55rem; line-height: 1.1;
  letter-spacing: 0.01em; border-bottom: 4px double var(--rule);
}
.paper-dateline {
  display: flex; justify-content: space-between; gap: 8px; margin: 0 0 14px; padding: 5px 0;
  font-family: "Inter", system-ui, sans-serif; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-soft); border-bottom: 1px solid var(--rule);
}
.paper-headline { margin: 0 0 14px; font-size: 1.32rem; line-height: 1.2; font-weight: 700; letter-spacing: -0.005em; }
.paper-headline a { color: var(--ink); text-decoration: none; }
.paper-headline a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.paper-quote { margin: 0 0 14px; padding: 12px 0 10px; border-top: 1px solid #b8ae98; border-bottom: 1px solid #b8ae98; }
.paper-quote p { margin: 0; font-style: italic; font-size: 1.06rem; line-height: 1.45; }
.paper-quote footer { margin-top: 6px; font-family: "Inter", system-ui, sans-serif; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em; color: var(--ink-soft); }
.paper-brief { margin: 0 0 14px; font-size: 1.02rem; line-height: 1.45; }
.paper-brief span { font-family: "Inter", system-ui, sans-serif; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin-right: 4px; }
/* faint two-column "newsprint" under the story */
.paper-quote::after, .paper-brief::after {
  content: ""; display: block; height: 34px; margin-top: 14px; opacity: 0.55;
  background:
    repeating-linear-gradient(to bottom, #b8ae98 0 2px, transparent 2px 7px) left top / 47% 100% no-repeat,
    repeating-linear-gradient(to bottom, #b8ae98 0 2px, transparent 2px 7px) right top / 47% 100% no-repeat;
}
.paper-link { margin-top: auto; padding-top: 6px; font-family: "Inter", system-ui, sans-serif; font-weight: 650; font-size: 0.92rem; color: #1f6f5c; }

.news-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 4px; }
.news-dots span { width: 7px; height: 7px; border-radius: 50%; background: rgb(255 255 255 / 22%); transition: background .15s ease; }
.news-dots span.on { background: #7fd6bc; }
/* On the cream pages, use dark ink colours (the dark section's light link colour is unreadable here) */
.section-dark .paper-link { color: #1f6f5c; }
.section-dark .paper-headline a { color: var(--ink); }
@media (max-width: 640px) { .paper-dateline span { display: none; } }

/* Great listens (ListenLynx) */
.listens-head { max-width: 780px; margin: 0 auto; text-align: center; }
.listens-intro {
  font-family: Georgia, "Times New Roman", serif; font-style: italic;
  font-size: clamp(1.15rem, 2vw, 1.35rem); line-height: 1.6; color: var(--ink-soft);
}
.listens-shot { display: block; margin: clamp(8px, 2vw, 20px) auto 0; max-width: 1080px; }
.listens-shot img { width: 100%; height: auto; transition: transform .4s ease; }
@media (hover: hover) { .listens-shot:hover img { transform: translateY(-4px); } }
.listens-foot { text-align: center; margin-top: 4px; }
.listens-stats { list-style: none; margin: 0 0 0.6rem; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 26px; color: var(--ink-soft); }
.listens-stats strong { color: var(--ink); font-size: 1.15rem; }
.listens-note { font-size: 0.95rem; color: var(--ink-soft); margin-bottom: 1.3rem; }

/* Slide viewer: chapter menu + scrubber for jumping around */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.slide-tools { display: flex; align-items: center; gap: 16px; margin-top: 12px; }
.slide-jump { flex: 0 1 340px; min-width: 0; }
.car-jump {
  width: 100%; font: inherit; font-size: 0.92rem; color: var(--ink); cursor: pointer;
  padding: 9px 36px 9px 12px; border: 1px solid var(--line); border-radius: 10px; background-color: var(--surface);
  appearance: none; -webkit-appearance: none; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 14px;
}
.car-jump:hover { border-color: var(--accent); }
.slide-scrub { flex: 1; display: flex; }
.car-range { width: 100%; accent-color: var(--accent); cursor: pointer; height: 28px; }
.no-js .slide-tools { display: none; }
@media (max-width: 600px) {
  .slide-tools { flex-direction: column; align-items: stretch; gap: 10px; }
  .slide-jump { flex: none; }
}

/* Advising: text + prominent blog card, with a browser-framed blog screenshot */
.advising { grid-template-columns: 1fr 1.1fr; }
.blog-card {
  margin-top: 1.75rem; padding: 22px 24px; border-radius: var(--radius);
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
.blog-label { margin: 0 0 4px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.blog-title { margin: 0 0 6px; font-size: 1.3rem; font-weight: 700; letter-spacing: -0.015em; color: var(--ink); }
.blog-desc { margin: 0 0 1rem; color: var(--ink-soft); }
.blog-shot { display: block; margin-right: -24px; }
.blog-shot img { width: 100%; height: auto; transition: transform .4s ease; }
@media (hover: hover) { .blog-shot:hover img { transform: translateY(-4px); } }
@media (max-width: 860px) { .advising { grid-template-columns: 1fr; } .blog-shot { margin: 0 -8px; } }
#shenanigans .section-head { max-width: none; } /* intro spans the full width of the cards below */
.advocacy-offer {
  margin: 1.5rem 0 0; padding: 16px 20px; border-radius: 12px; color: var(--dark-ink);
  background: rgb(127 214 188 / 8%); border: 1px solid rgb(127 214 188 / 30%); border-left: 4px solid #7fd6bc;
}
/* Photography: link out to the full Photo Ferret gallery below the carousel */
.ferret { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(24px, 4vw, 48px); align-items: center; margin-top: clamp(40px, 6vw, 64px); }
.ferret-card { margin-top: 0; }
.ferret-shot { display: block; }
.ferret-shot img {
  width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line);
  box-shadow: var(--shadow); transition: transform .4s ease;
}
@media (hover: hover) { .ferret-shot:hover img { transform: translateY(-4px); } }
@media (max-width: 860px) { .ferret { grid-template-columns: 1fr; } }
#photography .section-head { max-width: none; } /* intro spans the full width of the carousel */
