/* ==========================================================================
   Center for US-Pakistan Affairs: public site stylesheet
   One deep purple for dark surfaces, one brighter purple accent, neutrals
   for everything else. A single typeface (Inter); hierarchy comes from
   weight, size, letter-spacing and case.
   ========================================================================== */

/* Inter (SIL Open Font License, see ../fonts/Inter-LICENSE.txt), the same
   typeface the original site loaded from Google Fonts, self-hosted as one
   variable font covering weights 100-900 and optical sizes. */
@font-face {
  font-family: 'Inter';
  src: url('../fonts/InterVariable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Newsreader (SIL Open Font License, see ../fonts/Newsreader-LICENSE.txt):
   an editorial serif for long-form pages, subset to Latin, variable weight
   200-800 with optical sizes. */
@font-face {
  font-family: 'Newsreader';
  src: url('../fonts/Newsreader.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Newsreader';
  src: url('../fonts/Newsreader-Italic.woff2') format('woff2');
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}

:root {
  --ink: #2A1B45;
  --ink-2: #3D2860;
  --ink-deep: #081426;
  --mist: #F4F2F7;
  --paper: #FFFFFF;
  --accent: #6E42A6;
  --accent-dark: #5A3689;
  --accent-soft: #C9B8DE;
  --pine: #4A2F73;
  --danger: #8B3A3A;
  --text: #1C1C19;
  --muted: #5D5B54;
  --on-ink: #D8D2E0;
  --on-ink-muted: #A79BB5;
  --line: #E4E1EA;
  --line-dark: #4A3359;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Newsreader', Georgia, 'Times New Roman', serif;

  --fs-h1: clamp(2.5rem, 4.6vw, 4.1rem);
  --fs-h2: clamp(1.7rem, 2.6vw, 2.35rem);
  --fs-h3: 1.28rem;
  --fs-lede: 1.2rem;
  --fs-body: 1.06rem;

  --s-1: 0.5rem;
  --s-2: 1rem;
  --s-3: 1.5rem;
  --s-4: 2.5rem;
  --s-5: 4rem;
  --s-6: 6.5rem;

  --radius: 2px;
  --max: 1180px;
  --header-h: 96px;
}

/* ---------------------------------------------------------------- Base */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--text);
  background: var(--mist);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 var(--s-2);
}
h1 { font-size: var(--fs-h1); font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p { margin: 0 0 var(--s-2); }
a { color: var(--ink); text-decoration: none; }
.prose a, .news-item p a { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 2px; }

.lede { font-size: var(--fs-lede); line-height: 1.55; color: var(--muted); max-width: 60ch; }
.text-center { text-align: center; }
.text-center .lede { margin-left: auto; margin-right: auto; }

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

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .container { padding: 0 var(--s-2); }
}

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

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--accent); color: #fff; padding: 0.6em 1em;
}
.skip-link:focus { left: var(--s-2); top: var(--s-2); }

/* -------------------------------------------- Dateline (section eyebrow) */

.dateline {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: var(--s-2);
}
.dateline::before { content: ""; width: 22px; height: 1px; background: currentColor; }
.text-center .dateline { justify-content: center; }

/* ---------------------------------- Route divider (signature great-circle arc) */

.route-divider { display: block; width: 100%; height: 46px; margin: var(--s-5) 0; }
.route-divider .arc { fill: none; stroke: var(--accent); stroke-width: 1.3; stroke-dasharray: 1 6; stroke-linecap: round; }
.route-divider circle { fill: var(--accent-dark); }
.route-divider .grat { stroke: var(--line); stroke-width: 1; }

/* --------------------------------------------------------- Utility bar */

.utility-bar { background: var(--ink-deep); color: var(--on-ink-muted); font-size: 0.72rem; letter-spacing: 0.03em; }
.utility-bar .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--s-3); min-height: 34px; }
.utility-bar a { color: var(--on-ink-muted); }
.utility-bar a:hover { color: #fff; }
.utility-bar-right, .utility-bar-locations { display: flex; align-items: center; gap: var(--s-3); }
.utility-bar-locations span { white-space: nowrap; }
.utility-bar-social { display: flex; align-items: center; gap: 0.7em; padding-left: var(--s-3); border-left: 1px solid rgba(255, 255, 255, 0.14); }
.utility-bar-social a { display: flex; }

@media (max-width: 700px) {
  .utility-bar .container { justify-content: center; padding-top: 6px; padding-bottom: 6px; gap: var(--s-2); }
  .utility-bar-left { text-align: center; }
  .utility-bar-locations { display: none; }
  .utility-bar-social { border-left: 0; padding-left: 0; }
}

/* ------------------------------------------------------ Header and nav */

.site-header { position: sticky; top: 0; z-index: 50; background: var(--ink); color: #fff; border-bottom: 1px solid var(--line-dark); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }

.brand { display: flex; align-items: center; gap: 1rem; color: #fff; }
.brand-mark {
  width: 68px; height: 68px; flex-shrink: 0;
  border-radius: 50%; object-fit: cover; background: var(--paper);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.14);
}
.brand-text { font-size: 1.2rem; line-height: 1.18; letter-spacing: 0.005em; }
.brand-text strong { display: block; font-weight: 600; }
.brand-text span { display: block; margin-top: 2px; font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--on-ink); }

.main-nav { display: flex; align-items: center; gap: var(--s-4); }
.main-nav a { position: relative; padding: 4px 0; font-size: 0.92rem; letter-spacing: 0.01em; color: #E7EAF2; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: #fff; }
.main-nav a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: var(--accent); }

.nav-toggle {
  display: none;
  width: 42px; height: 38px;
  background: none; color: #fff; cursor: pointer;
  border: 1px solid var(--line-dark); border-radius: var(--radius);
}
.nav-toggle svg { margin: 0 auto; }

@media (max-width: 1020px) {
  .main-nav { gap: var(--s-3); }
}

@media (max-width: 860px) {
  :root { --header-h: 80px; }
  .brand-mark { width: 56px; height: 56px; }
  .brand-text { font-size: 1rem; }
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 0 var(--s-3);
    background: var(--ink); border-bottom: 1px solid var(--line-dark);
    max-height: 0; overflow: hidden; visibility: hidden;
    transition: max-height 0.25s ease, visibility 0.25s;
  }
  .main-nav.open { max-height: 640px; visibility: visible; }
  .main-nav a { padding: var(--s-2) 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
  .main-nav a[aria-current="page"]::after { display: none; }
  .main-nav a[aria-current="page"] { color: var(--accent-soft); }
}

@media (max-width: 420px) {
  .brand-text span { display: none; }
}

/* ------------------------------------------------------------- Buttons */

.btn {
  display: inline-flex; align-items: center; gap: 0.5em;
  padding: 0.85em 1.5em;
  font-family: var(--font); font-size: 0.9rem; font-weight: 500; letter-spacing: 0.01em;
  border: 1px solid transparent; border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { border-color: rgba(255, 255, 255, 0.5); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }
.btn-outline { border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }

/* ------------------------------------------------------------ Home hero */

.hero {
  position: relative; overflow: hidden;
  padding: var(--s-6) 0 var(--s-5);
  background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
  color: #fff;
}
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: var(--s-5); align-items: center; }
.hero .dateline, .page-hero .dateline { color: var(--accent-soft); }
.hero h1 { max-width: 15ch; color: #fff; font-size: clamp(2.4rem, 4.6vw, 4rem); font-weight: 500; letter-spacing: -0.02em; }
.hero .lede { max-width: 52ch; margin-bottom: var(--s-4); font-size: 1.18rem; color: var(--on-ink); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }

.hero-stats { display: flex; flex-wrap: wrap; gap: var(--s-4); margin-top: var(--s-4); padding-top: var(--s-3); border-top: 1px solid rgba(255, 255, 255, 0.14); }
.hero-stats .num { display: block; font-size: 1.7rem; line-height: 1; color: #fff; }
.hero-stats .label { font-size: 0.7rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--on-ink); }

/* Statue of Liberty and Faisal Mosque photos in a purple duotone, joined by the animated route. */
.hero-illustration { position: relative; width: 100%; aspect-ratio: 1; }
.landmark-photo {
  position: absolute; top: 0; width: 46%; height: 88%;
  overflow: hidden; border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}
.landmark-photo.left { left: 0; }
.landmark-photo.right { right: 0; }
.landmark-photo img { width: 100%; height: 100%; object-fit: cover; filter: url(#duotone-purple); }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.route-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.route-overlay .route-arc {
  fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round;
  stroke-dasharray: 6 8; stroke-dashoffset: 500;
  animation: draw-route 2.6s ease-out 0.3s forwards;
}
.route-overlay .route-node { fill: #fff; opacity: 0; animation: fade-in 0.6s ease-out forwards; }
.route-overlay .route-node.left { animation-delay: 0.3s; }
.route-overlay .route-node.right { animation-delay: 2.6s; }
.route-overlay .route-pulse { fill: #fff; opacity: 0; animation: pulse-travel 4s ease-in-out 3.2s infinite; }
.route-overlay .city-label {
  font: 600 11px var(--font); letter-spacing: 2px; fill: #fff;
  opacity: 0; animation: fade-in 0.6s ease-out 1.2s forwards;
}
.route-overlay .city-label.right { animation-delay: 2.9s; }

@keyframes draw-route { to { stroke-dashoffset: 0; } }
@keyframes fade-in { to { opacity: 1; } }
@keyframes pulse-travel { 0% { opacity: 0; } 8%, 50% { opacity: 1; } 92%, 100% { opacity: 0; } }

@media (max-width: 960px) {
  .hero { padding-top: var(--s-5); }
  .hero-grid { grid-template-columns: 1fr; gap: var(--s-4); }
  .hero-illustration { order: -1; max-width: 320px; margin: 0 auto; }
}

/* ------------------------------------------------------- Inner page hero */

.page-hero { padding: var(--s-5) 0 var(--s-4); background: var(--ink); color: #fff; }
.page-hero h1 { color: #fff; }
.page-hero .lede { color: var(--on-ink); }

/* ---------------------------------------------------------- Sections */

.section { padding: var(--s-5) 0; }
.section-alt { background: var(--paper); }
.section-ink { background: var(--ink); color: #fff; }
.section-ink h2 { color: #fff; }
.lede-on-ink { color: var(--on-ink); margin: 0 auto var(--s-3); }
.lede-cta { margin-bottom: var(--s-3); }
.section-head { max-width: 68ch; margin-bottom: var(--s-4); }
.section-head-row { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 1rem; max-width: none; }
.section-head-row h2 { margin-bottom: 0; }
.section-actions { margin-top: var(--s-4); text-align: center; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-3); }

@media (max-width: 1020px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* -------------------------------------------------------------- Cards */

.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s-3); }
.pillar-card { border-top: 3px solid var(--accent); }
.pillar-card h3 { margin-bottom: 0.5em; }
.pillar-card p { margin-bottom: 0; font-size: 0.96rem; color: var(--muted); }

/* Duotone topical photography for the research tracks. */
.pillar-photo, .track-photo { position: relative; overflow: hidden; }
.pillar-photo { aspect-ratio: 16 / 10; margin: calc(var(--s-3) * -1) calc(var(--s-3) * -1) var(--s-3); border-radius: var(--radius) var(--radius) 0 0; }
.track-photo { aspect-ratio: 4 / 3; border-radius: var(--radius); }
.pillar-photo img, .track-photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(45%) contrast(1.05); }
.pillar-photo::after, .track-photo::after {
  content: ""; position: absolute; inset: 0; mix-blend-mode: multiply;
  background: linear-gradient(160deg, rgba(42, 27, 69, 0.6) 0%, rgba(110, 66, 166, 0.35) 100%);
}

.track-list { display: grid; gap: var(--s-5); }
.track-row { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: var(--s-4); align-items: center; }
.track-row.reverse { grid-template-columns: 1.15fr 0.85fr; }
.track-row.reverse .track-photo { order: 2; }
.track-row h2 { margin-bottom: 0.5em; }

@media (max-width: 780px) {
  .track-row, .track-row.reverse { grid-template-columns: 1fr; gap: var(--s-3); }
  .track-row.reverse .track-photo { order: 0; }
  .track-photo { aspect-ratio: 16 / 9; }
}

/* ----------------------------------------------- Quote and callout blocks */

.pull-quote {
  position: relative;
  margin: var(--s-4) 0;
  padding: 0.2em 0 0.2em var(--s-4);
  border-left: 3px solid var(--accent);
  font-size: 1.55rem; line-height: 1.42; color: var(--ink);
}
.pull-quote::before {
  content: "\201C";
  position: absolute; left: -0.06em; top: -0.28em;
  font-size: 3.2rem; line-height: 1; color: var(--accent); opacity: 0.55;
}
.pull-quote p { margin: 0; font-size: inherit; color: inherit; }
.pull-quote cite { display: block; margin-top: 0.9em; font-size: 0.75rem; font-style: normal; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

@media (max-width: 640px) { .pull-quote { font-size: 1.25rem; padding-left: var(--s-3); } }

.professional-block { padding: var(--s-3); background: var(--paper); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius); }
.professional-block p:last-child { margin-bottom: 0; }

/* ----------------------------------------------------------- About page */

.bio-card { display: grid; grid-template-columns: 200px 1fr; gap: var(--s-4); align-items: start; }
.bio-portrait {
  display: flex; align-items: center; justify-content: center;
  width: 100%; aspect-ratio: 1; overflow: hidden;
  background: var(--ink); border-radius: var(--radius);
}
.bio-portrait img { width: 100%; height: 100%; object-fit: cover; }
.bio-card h3 { margin-bottom: 0.2em; }
.role-label { margin-bottom: 1em; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-dark); }

@media (max-width: 640px) {
  .bio-card { grid-template-columns: 1fr; gap: var(--s-3); }
  .bio-portrait { max-width: 160px; }
}

.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3); margin-top: var(--s-4); }
.team-card { overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.team-card-photo { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--ink); }
.team-card-photo.monogram { display: flex; align-items: center; justify-content: center; font-size: 1.8rem; font-weight: 600; letter-spacing: 0.02em; color: var(--accent-soft); }
.team-card-body { padding: var(--s-2) var(--s-3) var(--s-3); }
.team-card-body h3 { margin-bottom: 0.15em; font-size: 1.05rem; }
.team-card-role { display: block; margin-bottom: 0.6em; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-dark); }
.team-card-body p { margin-bottom: 0; font-size: 0.92rem; color: var(--muted); }

@media (max-width: 860px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .team-grid { grid-template-columns: 1fr; } }

.process-list { counter-reset: step; list-style: none; margin: 0; padding: 0; }
.process-list li {
  counter-increment: step;
  display: grid; grid-template-columns: 44px 1fr; gap: var(--s-2);
  padding: var(--s-2) 0; border-bottom: 1px solid var(--line);
}
.process-list li::before { content: counter(step, decimal-leading-zero); padding-top: 0.15em; font-size: 0.85rem; color: var(--accent-dark); }
.process-list h3 { margin-bottom: 0.2em; font-size: 1.05rem; }
.process-list p { margin-bottom: 0; font-size: 0.95rem; color: var(--muted); }

/* ------------------------------------------------------- Partnerships */

.partner-category { margin-top: var(--s-5); }
.partner-category:first-of-type { margin-top: 0; }
.partner-category .dateline { margin-bottom: var(--s-3); }
.partner-logo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--s-3); }
.partner-logo-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.7em;
  padding: var(--s-3) var(--s-2);
  text-align: center;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
a.partner-logo-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(42, 27, 69, 0.08); }
.partner-logo-card img {
  width: auto; max-width: 100%; max-height: 56px; object-fit: contain;
  filter: grayscale(100%); opacity: 0.82;
  transition: filter 0.15s ease, opacity 0.15s ease;
}
a.partner-logo-card:hover img { filter: none; opacity: 1; }
.partner-logo-fallback { display: flex; align-items: center; height: 56px; font-size: 0.95rem; color: var(--ink); }
.partner-name { font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.partner-empty { margin-top: var(--s-5); padding: var(--s-4); text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }
.partner-empty p { max-width: 56ch; margin: 0 auto; }

/* ---------------------------------------------------------------- News */

.news-item { display: grid; grid-template-columns: 140px 1fr; gap: var(--s-3); padding: var(--s-3) 0; border-bottom: 1px solid var(--line); }
.news-item:first-of-type { border-top: 1px solid var(--line); }
.news-item time { padding-top: 0.2em; font-size: 0.8rem; letter-spacing: 0.03em; color: var(--muted); }
.news-item h3 { margin-bottom: 0.3em; font-size: 1.15rem; }
.news-item h3 a:hover { color: var(--accent-dark); }
.news-item p { margin-bottom: 0; color: var(--muted); }
.read-more { display: inline-block; margin-top: 0.6em; font-size: 0.85rem; font-weight: 500; color: var(--accent-dark); }

.tag {
  display: inline-block; margin-bottom: 0.6em; padding: 0.2em 0.55em;
  font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--pine); border: 1px solid var(--pine); border-radius: var(--radius);
}

@media (max-width: 640px) { .news-item { grid-template-columns: 1fr; gap: 0.4rem; } }

.article { max-width: 70ch; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin-bottom: var(--s-3); color: var(--muted); font-size: 0.9rem; }
.article-meta .tag { margin-bottom: 0; }
.back-link { display: inline-block; margin-top: var(--s-4); font-size: 0.9rem; color: var(--accent-dark); }

/* ------------------------------------- News: covers and article formatting
   Cover thumbnails in news lists, the cover photo on an article page, and
   the formatted article body (Markdown subset rendered by markdown() in
   src/lib/html.js: headings, lists, quotes, bold/italic, links). */

.news-item.has-thumb { grid-template-columns: 140px 1fr 168px; }
.news-thumb {
  display: block; align-self: start;
  aspect-ratio: 4 / 3; overflow: hidden;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
}
.news-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.25s ease; }
a.news-thumb:hover img { transform: scale(1.03); }

@media (max-width: 640px) {
  .news-item.has-thumb { grid-template-columns: 1fr 88px; column-gap: var(--s-2); }
  .news-item.has-thumb > time { grid-column: 1; grid-row: 1; }
  .news-item.has-thumb > div { grid-column: 1; grid-row: 2; }
  .news-item.has-thumb > .news-thumb { grid-column: 2; grid-row: 1 / span 2; }
}

.article-cover { margin: 0 0 var(--s-3); }
.article-cover img {
  width: 100%; max-height: 30rem; object-fit: cover;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
}

.prose { overflow-wrap: break-word; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose h2 { margin: var(--s-4) 0 var(--s-2); font-size: clamp(1.4rem, 2vw, 1.65rem); }
.prose h3 { margin: var(--s-3) 0 var(--s-1); font-size: 1.18rem; }
.prose strong { font-weight: 650; color: var(--ink); }
.prose a:hover { color: var(--accent); }
.prose ul, .prose ol { margin: 0 0 var(--s-2); padding-left: 1.4em; }
.prose li { margin-bottom: 0.35em; padding-left: 0.2em; }
.prose li::marker { color: var(--accent); }
.prose ol li::marker { font-weight: 600; font-size: 0.92em; }
.prose blockquote {
  margin: var(--s-3) 0; padding: 0.15em 0 0.15em var(--s-3);
  border-left: 3px solid var(--accent);
  font-size: 1.14rem; line-height: 1.55; color: var(--ink);
}
.prose blockquote p:last-child, .prose blockquote ul:last-child, .prose blockquote ol:last-child { margin-bottom: 0; }
.prose blockquote blockquote { margin: var(--s-2) 0; font-size: 1em; border-left-color: var(--accent-soft); }

@media (max-width: 640px) {
  .prose h2 { margin-top: var(--s-3); }
  .prose blockquote { font-size: 1.05rem; padding-left: var(--s-2); }
}

/* ------------------------------------------------------------- Contact */

.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: var(--s-5); align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; gap: var(--s-4); } }

.info-block { margin-bottom: var(--s-3); }
.info-block .dateline { margin-bottom: 0.4em; }
.info-block p { margin: 0; }
.info-block a { color: var(--accent-dark); }

.contact-form .field { margin-bottom: var(--s-3); }
.contact-form label { display: block; margin-bottom: 0.4em; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.contact-form input, .contact-form select, .contact-form textarea {
  width: 100%; padding: 0.75em 0.85em;
  font: 1rem var(--font); color: var(--text);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
}
.contact-form textarea { min-height: 160px; resize: vertical; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { border-color: var(--accent); }
.contact-form [aria-invalid="true"] { border-color: var(--danger); }
.field-error { margin: 0.4em 0 0; font-size: 0.85rem; color: var(--danger); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alert { margin-bottom: var(--s-3); padding: var(--s-2) var(--s-3); font-size: 0.95rem; border-radius: var(--radius); }
.alert-success { background: #EFEAF5; border: 1px solid var(--pine); color: var(--pine); }
.alert-error { background: #F7E9E9; border: 1px solid var(--danger); color: var(--danger); }

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

.site-footer { padding: var(--s-4) 0 var(--s-3); background: var(--ink); color: var(--on-ink); border-top: 1px solid var(--line-dark); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: var(--s-4); margin-bottom: var(--s-4); }
.footer-logo { width: 130px; height: 130px; margin-bottom: var(--s-3); border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1); }
.footer-tagline { max-width: 38ch; font-size: 0.92rem; color: var(--on-ink); }
.site-footer h4 { margin-bottom: var(--s-2); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: #fff; }
.site-footer a { color: var(--on-ink); }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.5em; font-size: 0.92rem; }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--s-2);
  padding-top: var(--s-3); border-top: 1px solid var(--line-dark);
  font-size: 0.8rem; color: var(--on-ink-muted);
}

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
}
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; gap: var(--s-3); } }

/* ------------------------------------------------------ Scroll reveal */

.js .reveal { opacity: 0; transform: translateY(10px); transition: opacity 0.5s ease, transform 0.5s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ------------------------------------------------------ Reduced motion */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  html { scroll-behavior: auto; }
  .route-overlay .route-arc { animation: none; stroke-dashoffset: 0; }
  .route-overlay .route-node, .route-overlay .city-label { animation: none; opacity: 1; }
  .route-overlay .route-pulse { display: none; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------- Publications */

/* Publications reuse the news-list layout; the year sits in the date column. */
.publication-list .news-item:first-of-type { border-top: 1px solid var(--line); }
.publication-item time { font-weight: 600; color: var(--accent-dark); letter-spacing: 0.06em; }
.publication-item h3 a:hover { color: var(--accent-dark); }
.publication-venue { margin: 0 0 0.5em; font-size: 0.85rem; font-style: italic; color: var(--muted); }
.publication-item .publication-venue + p { margin-top: 0; }

/* "Selected publications" under the founder's bio on About */
.bio-publications { margin-top: var(--s-3); padding-top: var(--s-3); border-top: 1px solid var(--line); }
.bio-publications h4 { margin-bottom: var(--s-2); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-dark); }
.bio-publications ul { list-style: none; margin: 0 0 var(--s-2); padding: 0; }
.bio-publications li { padding: 0.6em 0 0.6em 1em; border-left: 2px solid var(--accent); margin-bottom: 0.6em; background: var(--mist); }
.bio-publications li a, .bio-pub-title { display: block; font-weight: 600; color: var(--ink); line-height: 1.35; }
.bio-publications li a:hover { color: var(--accent-dark); }
.bio-pub-meta { display: block; margin-top: 0.2em; font-size: 0.85rem; font-style: italic; color: var(--muted); }
