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

:root {
  --ink: #1a1a1a;
  --ink-mid: #555;
  --ink-light: #888;
  --rule: #e4e4e4;
  --bg: #ffffff;
  --bg-alt: #f7f7f7;
  --bg-tint: #f0f3ff;
  --accent: #3b5bdb;
  --accent-light: #dde3fa;
  --accent2: #d4610a;
  --accent2-light: #fdeee3;
  --accent-teal: #0d9488;
  --accent-teal-light: #ccedeb;
  --accent-violet: #7c3aed;
  --accent-violet-light: #e8e0fb;
  --nav-bg: #18181b;
  --nav-height: 54px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Roboto', sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
}

/* ── Right Sidebar Nav ── */
#nav {
  position: fixed;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
}

.nav-name { display: none; }

.nav-outline {
  list-style: none;
  display: flex;
  flex-direction: column;
  position: relative;
  padding: 4px 0;
}

.nav-outline::before {
  content: '';
  position: absolute;
  right: 4px;
  top: 18px;
  bottom: 18px;
  width: 1px;
  background: rgba(0,0,0,0.1);
}

.nav-outline li { position: relative; }

.nav-outline a {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 7px 0;
  text-decoration: none;
}

.nav-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid rgba(0,0,0,0.2);
  background: var(--bg);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.nav-label {
  font-size: 11px;
  font-weight: 400;
  color: var(--ink);
  white-space: nowrap;
  opacity: 0.3;
  transition: opacity 0.2s ease, font-weight 0.2s ease;
}

.nav-outline a:hover .nav-label { opacity: 0.8; }
.nav-outline a:hover .nav-dot   { border-color: var(--ink-mid); }

.nav-outline a.active .nav-label {
  opacity: 1;
  font-weight: 500;
}

.nav-outline a.active .nav-dot {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.4);
}

/* ── Layout ── */
.page-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 32px 80px;
}

/* ── Hero ── */
#hero {
  padding: 52px 0 44px;
  border-bottom: 1.5px solid var(--rule);
}

.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 20px;
}

.hero-name {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.05;
  color: var(--ink);
}

.hero-role {
  font-size: 15px;
  font-weight: 300;
  color: var(--ink-mid);
  margin-top: 8px;
}

.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: flex-end;
  flex-shrink: 0;
}

.contact-list li a,
.contact-list li span {
  font-size: 12.5px;
  color: var(--ink-mid);
  text-decoration: none;
  border: none;
  border-right: 2.5px solid var(--rule);
  padding: 2px 10px;
  display: inline-block;
  transition: border-color 0.15s, color 0.15s;
}

.contact-list li a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-summary {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink-mid);
  max-width: 700px;
  margin-bottom: 28px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 60px;
}

.stat-card {
  border: 1.5px solid var(--rule);
  border-radius: 8px;
  padding: 10px 14px;
  background: var(--bg-alt);
  text-align: center;
}

.stat-card .stat-num {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.stat-card .stat-label {
  font-size: 10.5px;
  color: var(--ink-light);
  margin-top: 3px;
}

/* ── Section base ── */
.cv-section {
  padding: 40px 0;
  border-bottom: 1.5px solid var(--rule);
  scroll-margin-top: 24px;
}

.priority-section {
  scroll-margin-top: 24px;
}

#hero {
  scroll-margin-top: 24px;
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.2px;
}

.section-sub {
  font-size: 11.5px;
  color: var(--ink-light);
  font-family: 'Roboto Mono', monospace;
}

/* Priority accent strip */
.priority-section {
  margin: 0 -32px;
  padding: 40px 32px;
  border-left: 5px solid transparent;
  border-bottom: 1.5px solid var(--rule);
  transition: border-left-color 0.35s ease;
}

.priority-section.active-section {
  border-left-color: var(--accent);
}

.priority-section.teal.active-section {
  border-left-color: var(--accent-teal);
}

.priority-section.orange.active-section {
  border-left-color: var(--accent2);
}

.priority-section.violet.active-section {
  border-left-color: var(--accent-violet);
}

.priority-badge {
  font-size: 10px;
  font-family: 'Roboto Mono', monospace;
  background: var(--accent);
  color: #fff;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 0.3px;
}

.priority-badge.orange {
  background: var(--accent2);
}

/* ── Research entries ── */
.entry-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.entry-card {
  border: 1.5px solid var(--rule);
  border-radius: 6px;
  padding: 16px 20px;
  background: var(--bg);
  transition: border-color 0.15s;
}

.entry-card:hover { border-color: #bbb; }

.entry-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 10px;
}

.entry-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
}

.entry-date {
  font-family: 'Roboto Mono', monospace;
  font-size: 10.5px;
  color: var(--ink-light);
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px;
}

.entry-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-left: 16px;
}

.entry-bullets li {
  font-size: 12.5px;
  color: var(--ink-light);
  line-height: 1.65;
}

.entry-bullets li b {
  color: var(--ink-mid);
  font-weight: 500;
}

/* ── Teaching grid ── */
.teaching-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.teaching-card {
  border: 1.5px solid var(--rule);
  border-radius: 6px;
  padding: 14px 16px;
  background: var(--bg);
}

.teaching-card-title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 6px;
}

.course-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.course-list li {
  font-size: 12.5px;
  color: var(--ink-mid);
  padding-left: 12px;
  position: relative;
}

.course-list li.current {
  color: var(--ink);
}

.course-list li.current::before {
  content: 'current';
  font-size: 9.5px;
  font-family: 'Roboto Mono', monospace;
  background: var(--accent-teal-light);
  color: var(--accent-teal);
  border-radius: 3px;
  padding: 1px 5px;
  margin-right: 7px;
  font-weight: 400;
  vertical-align: middle;
}


/* ── Funding cards ── */
.funding-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 0;
}

.funding-card {
  border: 1.5px solid var(--rule);
  border-radius: 8px;
  padding: 18px 18px 14px;
  background: var(--bg);
}

.funding-amt {
  font-size: 26px;
  font-weight: 700;
  color: var(--accent2);
  line-height: 1;
  margin-bottom: 6px;
}

.funding-label {
  font-size: 12.5px;
  color: var(--ink-mid);
  line-height: 1.4;
  margin-bottom: 14px;
}

.funding-date {
  font-family: 'Roboto Mono', monospace;
  font-size: 10px;
  color: var(--ink-light);
  margin-bottom: 10px;
}

.progress-bar {
  height: 4px;
  background: var(--rule);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent2);
  border-radius: 2px;
}

/* ── Publications ── */
.pub-group-title {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-light);
  font-family: 'Roboto Mono', monospace;
  margin-bottom: 14px;
  margin-top: 28px;
}

.pub-group-title:first-child { margin-top: 0; }

.pub-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pub-item {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink-mid);
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}

.pub-item:last-child { border-bottom: none; }

.pub-item strong {
  color: var(--ink);
  font-weight: 500;
}

.hm-badge {
  display: inline-block;
  font-size: 10px;
  font-family: 'Roboto Mono', monospace;
  background: #fff8e6;
  border: 1px solid #f5c542;
  color: #8a6800;
  border-radius: 3px;
  padding: 1px 6px;
  margin-right: 6px;
  vertical-align: middle;
}

/* ── Education ── */
.edu-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.edu-item {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
}

.edu-item:last-child { border-bottom: none; }

.edu-year {
  font-family: 'Roboto Mono', monospace;
  font-size: 11px;
  color: var(--accent);
  font-weight: 500;
  padding-top: 2px;
}

.edu-degree { font-size: 14px; font-weight: 500; color: var(--ink); }
.edu-detail { font-size: 13px; color: var(--ink-mid); margin-top: 3px; }

/* ── Roles ── */
.roles-group { margin-bottom: 20px; }
.roles-group-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 8px;
}
.roles-list {
  list-style: none;
  display: flex;
  flex-direction: column;
}
.roles-list li {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 13px;
  color: var(--ink-mid);
}
.roles-list li:last-child { border-bottom: none; }
.role-date {
  font-family: 'Roboto Mono', monospace;
  font-size: 11px;
  color: var(--accent);
  font-weight: 500;
  padding-top: 2px;
}

/* ── Skills ── */
.skills-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skill-item { display: grid; grid-template-columns: 220px 1fr; gap: 8px; align-items: flex-start; }

.skill-name {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
}

.skill-desc {
  font-size: 13.5px;
  color: var(--ink-mid);
  line-height: 1.55;
}

/* ── Talks ── */
.talks-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.talk-item {
  font-size: 13.5px;
  color: var(--ink-mid);
  line-height: 1.6;
  padding: 11px 0;
  border-bottom: 1px solid var(--rule);
}

.talk-item:last-child { border-bottom: none; }

.talk-item a {
  color: var(--accent);
  text-decoration: none;
  font-size: 12px;
  font-family: 'Roboto Mono', monospace;
  margin-left: 6px;
}

.talk-item a:hover { text-decoration: underline; }

/* ── Bottom grid ── */
.bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* ── Mentoring ── */
.mentor-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mentor-list li {
  font-size: 13.5px;
  color: var(--ink-mid);
  line-height: 1.55;
  padding-left: 16px;
  position: relative;
}

/* ── Site header (paper pages, publications index) ── */
.site-header { border-bottom: 1.5px solid var(--rule); }

.site-header-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 32px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}

.site-links { list-style: none; display: flex; gap: 22px; }

.site-links a {
  font-size: 12.5px;
  color: var(--ink-mid);
  text-decoration: none;
  transition: color 0.15s;
}

.site-links a:hover { color: var(--accent-violet); }
.site-links a.active { color: var(--accent-violet); font-weight: 500; }

/* ── CV: link to the publications index ── */
.section-link {
  margin-left: auto;
  font-family: 'Roboto Mono', monospace;
  font-size: 11.5px;
  color: var(--accent-violet);
  text-decoration: none;
}

.section-link:hover { text-decoration: underline; }

/* ── Publication titles as links ── */
.pub-item a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--accent-violet-light);
  transition: color 0.15s, border-color 0.15s;
}

.pub-item a.pub-title { color: var(--ink); }
.pub-item a:hover { color: var(--accent-violet); border-color: var(--accent-violet); }

/* ── Resource buttons ── */
.link-buttons {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 6px;
}

.link-button {
  display: inline-block;
  font-size: 12.5px;
  color: var(--ink-mid);
  text-decoration: none;
  border: 1.5px solid var(--rule);
  border-radius: 20px;
  padding: 4px 14px;
  transition: border-color 0.15s, color 0.15s;
}

.link-button:hover { border-color: var(--accent-violet); color: var(--accent-violet); }

.pub-item .link-buttons.small { margin: 8px 0 0; gap: 6px; }

.pub-item .link-buttons.small .link-button {
  font-size: 11px;
  padding: 1px 10px;
  border: 1.5px solid var(--rule);
}

/* ── Paper page ── */
.paper { padding: 40px 0 0; }

.back-link {
  font-family: 'Roboto Mono', monospace;
  font-size: 11.5px;
  color: var(--ink-light);
  text-decoration: none;
}

.back-link:hover { color: var(--accent-violet); }

.paper-title {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.3px;
  margin: 18px 0 14px;
}

.paper-authors { font-size: 14.5px; color: var(--ink-mid); line-height: 1.6; }
.paper-authors strong { color: var(--ink); font-weight: 500; }

.paper-meta {
  font-family: 'Roboto Mono', monospace;
  font-size: 11.5px;
  color: var(--ink-light);
  margin-top: 8px;
}

.paper-section { padding: 32px 0; border-bottom: 1.5px solid var(--rule); }
.paper-section:last-child { border-bottom: none; }
.paper-section .section-title { margin-bottom: 16px; }

.abstract p {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--ink-mid);
  max-width: 720px;
}

.abstract p + p { margin-top: 12px; }

.cite-block + .cite-block { margin-top: 20px; }

.cite-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.cite-label {
  font-family: 'Roboto Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-light);
}

.copy-button {
  font-family: 'Roboto Mono', monospace;
  font-size: 11px;
  color: var(--ink-mid);
  background: none;
  border: 1.5px solid var(--rule);
  border-radius: 4px;
  padding: 2px 10px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.copy-button:hover { border-color: var(--accent-violet); color: var(--accent-violet); }

.cite-text {
  background: var(--bg-alt);
  border: 1.5px solid var(--rule);
  border-radius: 6px;
  padding: 14px 16px;
  color: var(--ink-mid);
}

.cite-apa { font-size: 13.5px; line-height: 1.65; }
.cite-apa strong { color: var(--ink); font-weight: 500; }
.cite-apa a { color: var(--accent-violet); text-decoration: none; word-break: break-all; }

.cite-bibtex {
  font-family: 'Roboto Mono', monospace;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ── Publications index ── */
.pub-index { padding: 40px 0; }

/* ── Mid-width: labels would overlap the text column, so show dots only ── */
@media (min-width: 681px) and (max-width: 1180px) {
  #nav ~ .page-wrap { padding-right: 64px; }

  #nav { right: 20px; }

  .nav-label {
    position: absolute;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg);
    border: 1px solid var(--rule);
    border-radius: 4px;
    padding: 2px 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    pointer-events: none;
    opacity: 0;
  }

  .nav-outline a.active .nav-label { opacity: 0; }
  .nav-outline a:hover .nav-label,
  .nav-outline a.active:hover .nav-label,
  .nav-outline a:focus-visible .nav-label { opacity: 1; }
}

/* ── Mobile responsive ── */
@media (max-width: 680px) {
  .page-wrap {
    padding: 0 16px 80px;
  }

  #nav {
    position: fixed;
    right: auto;
    left: 0;
    top: auto;
    bottom: 0;
    transform: none;
    width: 100%;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--rule);
  }

  .nav-outline {
    flex-direction: row;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 8px;
    gap: 0;
  }

  .nav-outline::-webkit-scrollbar { display: none; }
  .nav-outline::before { display: none; }
  .nav-outline li { flex-shrink: 0; }

  .nav-outline a {
    justify-content: center;
    padding: 12px 14px;
    gap: 0;
  }

  .nav-dot { display: none; }

  .nav-label {
    font-size: 13px;
    opacity: 0.4;
    transition: font-size 0.2s ease, opacity 0.2s ease, font-weight 0.2s ease;
  }

  .nav-outline a.active .nav-label {
    font-size: 15px;
    font-weight: 600;
    opacity: 1;
    color: #fff;
  }

  .nav-outline a.active                              { background: #888; }
  .nav-outline a[data-section="research"].active     { background: var(--accent); }
  .nav-outline a[data-section="teaching"].active     { background: var(--accent-teal); }
  .nav-outline a[data-section="funding"].active      { background: var(--accent2); }
  .nav-outline a[data-section="publications"].active { background: var(--accent-violet); }

  /* Hero */
  #hero {
    padding: 32px 0 28px;
  }

  .hero-top {
    flex-direction: column;
    gap: 14px;
  }

  .hero-name { font-size: 28px; }
  .hero-role { font-size: 13px; display: flex; flex-direction: column; gap: 2px; }
  .hero-role .role-sep { display: none; }

  .contact-list {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .hero-summary {
    font-size: 13px;
    margin-bottom: 20px;
  }

  /* Stats — 1 column */
  .stats-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    padding: 10px 14px;
  }

  .stat-card .stat-num { font-size: 18px; min-width: 80px; }
  .stat-card .stat-label { margin-top: 0; font-size: 12px; }

  /* Priority sections — remove bleed */
  .priority-section {
    margin: 0;
    padding: 28px 0;
    border-left: none;
    border-top: 4px solid transparent;
    transition: border-top-color 0.35s ease;
  }

  #research.active-section  { border-top-color: #3b5bdb !important; }
  #teaching.active-section  { border-top-color: #0d9488 !important; }
  #funding.active-section   { border-top-color: #d4610a !important; }
  #publications.active-section { border-top-color: #7c3aed !important; }

  .cv-section { padding: 28px 0; }

  .section-title { font-size: 17px; }

  /* Entry cards */
  .entry-top {
    flex-direction: column;
    gap: 4px;
  }

  .entry-date { margin-top: 0; }

  /* Teaching */
  .teaching-grid {
    grid-template-columns: 1fr;
  }

  /* Funding */
  .funding-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  /* Skills */
  .skill-item {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  /* Education */
  .edu-item {
    grid-template-columns: 50px 1fr;
    gap: 10px;
  }

  /* Header, paper pages */
  .site-header-inner { padding: 0 16px; }
  .paper { padding-top: 28px; }
  .paper-title { font-size: 23px; }
  .paper-section { padding: 24px 0; }
  .abstract p { font-size: 13.5px; }
  .pub-index { padding: 28px 0; }
  .section-link { margin-left: 0; }
}
@media print {
  @page {
    margin: 16mm 18mm;
    size: A4;
  }

  html { scroll-behavior: auto; }

  body {
    font-size: 11pt;
    color: #1a1a1a;
    background: #fff;
  }

  /* Hide nav */
  #nav { display: none; }

  /* Remove page padding compensation */
  .page-wrap {
    max-width: 100%;
    padding: 0;
  }

  /* Hero */
  #hero {
    padding: 0 0 20pt;
    scroll-margin-top: 0;
  }

  .hero-name { font-size: 26pt; }
  .hero-role { font-size: 11pt; margin-top: 4pt; }
  .hero-summary { font-size: 10pt; margin-bottom: 16pt; }

  /* Stat cards — lay flat in a row, no background */
  .stats-row {
    gap: 8pt;
  }

  .stat-card {
    background: #fff;
    border-color: #ccc;
    padding: 8pt 12pt;
  }

  .stat-card .stat-num { font-size: 16pt; }
  .stat-card .stat-label { font-size: 9pt; }

  /* Contact pills — smaller */
  .contact-list li a,
  .contact-list li span {
    font-size: 9pt;
    padding: 2pt 8pt;
  }

  /* Priority sections — keep accent border, remove bleed margins */
  .priority-section {
    margin: 0;
    padding: 16pt 0;
    border-left: 4pt solid transparent;
    scroll-margin-top: 0;
  }

  /* Hide accent borders for print */
  .priority-section {
    border-left: none !important;
  }

  /* Standard sections */
  .cv-section {
    padding: 16pt 0;
    scroll-margin-top: 0;
  }

  /* Section titles */
  .section-title { font-size: 14pt; margin-bottom: 0; }
  .section-header { margin-bottom: 12pt; }

  /* Entry cards — no shadow, minimal border */
  .entry-card {
    padding: 10pt 12pt;
    border-color: #ddd;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .entry-list { gap: 8pt; }
  .entry-title { font-size: 10.5pt; }
  .entry-date { font-size: 8.5pt; }
  .entry-bullets li { font-size: 9.5pt; }

  /* Teaching */
  .teaching-grid { gap: 8pt; }
  .teaching-card {
    padding: 10pt 12pt;
    border-color: #ddd;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  /* Funding */
  .funding-grid { gap: 10pt; }
  .funding-card {
    padding: 12pt 14pt;
    border-color: #ddd;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .funding-amt { font-size: 18pt; }

  /* Publications */
  .pub-item { font-size: 9.5pt; padding: 8pt 0; }
  .pub-group-title { font-size: 8.5pt; margin-top: 16pt; }

  /* Education */
  .edu-item { padding: 10pt 0; }
  .edu-degree { font-size: 11pt; }
  .edu-detail { font-size: 10pt; }

  /* Roles / Skills / Talks */
  .roles-list li,
  .mentor-list li,
  .skill-desc,
  .talk-item { font-size: 10pt; }

  /* Avoid section headings orphaned at bottom of page */
  .section-header,
  .roles-group-title { page-break-after: avoid; break-after: avoid; }

  /* Links — show URL for talks */
  .talk-item a::after {
    content: " (" attr(href) ")";
    font-size: 8pt;
    color: #555;
  }

  /* Paper pages */
  .site-header, .link-buttons, .copy-button, .back-link, .section-link { display: none; }
  .paper-title { font-size: 18pt; }
  .cite-text { background: #fff; }
}
