/* ─────────────────────────────────────────────
   清纯Power — DM Sans + Vivid Green + Black
   ───────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

:root {
  --site-color: #D49A50;       /* Warm gold-copper */
  --ink:    #1A1A1A;
  --soft:   #444444;
  --muted:  #999999;
  --accent: var(--site-color);
  --accent-light: #F0D4A8;
  --rule:   rgba(0, 0, 0, 0.08);
  --white:  #FFFFFF;
}

/* ── BASE ── */
body {
  background: var(--white);
  color: var(--ink);
  font-family: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 700;
  color: var(--ink);
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: none;
  transition: color .15s;
}
a:hover { color: #B87A2A; }

hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 48px 0;
}

/* ── NAVBAR ── */
.navbar {
  background: var(--white) !important;
  border-bottom: 1px solid var(--rule);
  padding: 14px 40px;
}
.navbar-brand {
  font-family: 'DM Sans', sans-serif;
  font-style: normal;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink) !important;
  border-bottom: none !important;
  letter-spacing: -0.01em;
}
.navbar .nav-link {
  color: var(--soft) !important;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-bottom: none !important;
  transition: color .15s;
}
.navbar .nav-link:hover  { color: var(--ink) !important; }
.navbar .nav-link.active { color: var(--ink) !important; }

/* ── LANGUAGE TOGGLE ── */
.lang-toggle {
  background: none;
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--soft);
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: color .15s, border-color .15s;
  margin-left: 8px;
  vertical-align: middle;
  line-height: 1.4;
}
.lang-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.lang-toggle--home {
  position: absolute;
  top: 16px;
  right: 16px;
}
body.lang-zh .rp-bio, body.lang-zh .gs-intro, body.lang-zh .pub-title,
body.lang-zh .proj-desc, body.lang-zh .pub-journal, body.lang-zh .food-atlas-desc {
  font-family: 'Noto Serif SC', 'Songti SC', 'SimSun', 'DM Sans', serif;
}

/* ── FOOTER ── */
.nav-footer {
  background: var(--white);
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 400;
  padding: 18px 40px;
  letter-spacing: 0.01em;
}
.nav-footer a { color: var(--muted); border-bottom: none; }
.nav-footer a:hover { color: var(--accent); }

/* ── HOME PAGE ── */
.gs-wrap {
  max-width: 580px;
  margin: 0 auto;
  padding: 90px 32px 120px;
  text-align: center;
}

.gs-name {
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.gs-name em { font-style: normal; color: var(--accent); font-weight: 700; }

.gs-hero {
  margin: 34px auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.gs-avatar-wrap {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  padding: 0;
  background: transparent;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.gs-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.gs-intro {
  max-width: 560px;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.75;
  color: var(--soft);
  margin: 0;
}

.gs-role {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 48px;
}

.gs-bio {
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.85;
  color: var(--ink);
  margin-bottom: 40px;
}
.gs-bio p { margin: 0 0 1.2em; }
.gs-bio p:last-child { margin-bottom: 0; }

.gs-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0;
}
.gs-links a {
  color: var(--accent);
  border-bottom: none;
  transition: color .15s;
}
.gs-links a:hover { color: #B87A2A; }
.gs-links .sep {
  color: var(--muted);
  margin: 0 12px;
  font-size: 0.85rem;
}

.gs-nav {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}
.gs-nav a {
  color: var(--ink);
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.gs-nav a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.gs-nav span {
  color: var(--ink);
}
.gs-nav .sep {
  color: var(--muted);
  margin: 0 16px;
  font-size: 0.9rem;
}

@media (max-width: 640px) {
  .gs-wrap {
    padding: 72px 24px 96px;
  }

  .gs-name {
    font-size: 2.35rem;
  }

  .gs-avatar-wrap {
    width: 146px;
    height: 146px;
  }

  .gs-intro {
    font-size: 0.95rem;
    line-height: 1.7;
  }
}

/* ── SUBPAGE CENTERED LAYOUT (Research, Game…) ── */

/* Quarto-rendered page title aligned to the same 520px column */
.page-layout-full .quarto-title-block {
  max-width: 1040px;
  margin: 0 auto;
  padding: 56px 32px 0;
}
.page-layout-full h1.title {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
}

.gs-subpage {
  max-width: 1040px;
  margin: 0 auto;
  padding: 24px 32px 120px;
}

/* ── RESEARCH PAGE ── */

.rp-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--soft);
  letter-spacing: 0.01em;
  margin-bottom: 40px;
}
.rp-meta .sep {
  color: var(--muted);
  margin: 0 12px;
  font-size: 0.85rem;
}

.rp-bio { font-size: 1.05rem; font-weight: 400; line-height: 1.85; margin-bottom: 40px; }
.rp-bio p { margin: 0 0 1.2em; }
.rp-bio strong { color: var(--accent); font-weight: 400; }

/* ══════════════════════════════════════════════
   PROJECT BANNERS — stacked full-width
   ══════════════════════════════════════════════ */
.project-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}
.project-banner {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 32px 36px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: rgba(255,255,255,0.7);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.project-banner:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(0,200,83,0.08);
}
.project-banner-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  flex-shrink: 0;
  padding-top: 4px;
}
.project-banner-logo {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  border-radius: 20px;
}
.project-banner-content {
  flex: 1;
}

/* ── "Why food?" collapsible ── */
.why-food-details {
  margin-bottom: 40px;
}
.why-food-details summary {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s;
}
.why-food-details summary:hover { color: var(--accent); }
.why-food-details summary::-webkit-details-marker { display: none; }
.why-food-details summary::before {
  content: '\25B8';
  font-size: 0.65em;
  transition: transform 0.2s;
  color: var(--accent);
}
.why-food-details[open] summary::before { transform: rotate(90deg); }
.why-food-body {
  margin-top: 14px;
  font-size: 0.92rem;
  color: var(--soft);
  line-height: 1.8;
  max-width: 680px;
}
.why-food-body p { margin: 0 0 0.8em; }

/* ── Responsive ── */
@media (max-width: 700px) {
  .gs-subpage { padding-left: 16px; padding-right: 16px; }
  .project-banner { padding: 20px 16px; gap: 16px; flex-direction: column; }
}
.rp-questions { font-size: 1.05rem; line-height: 1.85; padding-left: 1.4em; margin: 0 0 40px; }
.rp-questions li { margin-bottom: 1.4em; }
.rp-questions li strong { color: var(--ink); }

.rp-ext-links {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0;
  font-size: 0.95rem;
  font-weight: 500;
}
.rp-ext-links a {
  color: var(--accent);
  border-bottom: none;
  transition: color .15s;
}
.rp-ext-links a:hover { color: #B87A2A; }
.rp-ext-links .sep { color: var(--muted); margin: 0 12px; font-size: 0.85rem; }

/* Publications */
.pub-list { margin: 0; }
.pub-item {
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
}
.pub-item:first-child { border-top: 1px solid var(--rule); }

.pub-year {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.pub-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.5;
  margin-bottom: 4px;
  font-style: normal;
}
.pub-authors {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--soft);
  margin-bottom: 3px;
}
.pub-authors strong { color: var(--ink); font-style: normal; font-weight: 600; }
.pub-journal {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--muted);
  margin-bottom: 10px;
}
.pub-desc {
  font-size: 0.92rem;
  font-weight: 400;
  color: var(--soft);
  line-height: 1.7;
  margin-top: 8px;
  margin-bottom: 10px;
}
.pub-links { display: flex; gap: 16px; }
.pub-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  border-bottom: none;
  transition: color .15s;
  letter-spacing: 0.03em;
}
.pub-link:hover { color: #B87A2A; }
.pub-prep .pub-year { color: var(--muted); }
.pub-prep .pub-title { opacity: 0.6; }

/* Projects */
.proj-list { margin: 0; }
.proj-item {
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
}
.proj-item:first-child { border-top: 1px solid var(--rule); }
.proj-place {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.proj-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.45;
  margin-bottom: 6px;
}
.proj-desc {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--soft);
  line-height: 1.7;
}

/* Skills */
.skills-text {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--soft);
  line-height: 2;
  letter-spacing: 0.01em;
}

/* ── SECTION HEADINGS ── */
.gs-subpage h2 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin: 56px 0 0;
  padding-bottom: 0;
  border: none;
}

/* ── HIDE OLD COMPONENTS ── */
.page-bg-texture,
.leaf-divider,
.section-cards,
.hero-links .hero-link,
.lock-badge,
.section-label,
.section-title { display: none; }

.hero { display: none; }

/* ── PUBLICATIONS PAGE ── */
.publications-wrap {
  max-width: 580px;
  margin: 0 auto;
  padding: 90px 32px 120px;
  color: var(--muted);
}
.publications-wrap h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 16px;
}
.publications-wrap p { font-size: 1rem; font-weight: 400; line-height: 1.75; }

/* ── FOOD ATLAS CARD ── */
.food-atlas-card {
  display: flex;
  align-items: stretch;
  margin-top: 16px;
  padding: 32px 36px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.food-atlas-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(0, 200, 83, 0.08);
}
.food-atlas-info {
  flex: 1;
}
.food-atlas-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 10px;
}
.food-atlas-desc {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--soft);
  line-height: 1.75;
  margin-bottom: 20px;
}
.food-atlas-btn {
  display: inline-block;
  padding: 10px 24px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #FFFFFF !important;
  background: var(--accent) !important;
  border: none !important;
  border-radius: 6px;
  text-decoration: none !important;
  transition: background 0.2s, transform 0.15s;
  letter-spacing: 0.02em;
}
.food-atlas-btn:hover {
  background: #B87A2A !important;
  color: #FFFFFF !important;
  transform: translateY(-1px);
}
.food-atlas-btn.btn-outline {
  background: #fff !important;
  color: #D4943A !important;
  border: 1px solid #D4943A !important;
  border-radius: 6px;
  padding: 10px 24px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}
.food-atlas-btn.btn-outline:hover {
  background: #FDF6EE !important;
  color: #B87A2A !important;
  border-color: #B87A2A !important;
}

/* ══════════════════════════════════════════════
   ABOUT ME — redesigned
   ══════════════════════════════════════════════ */

/* Intro block */
.am-intro {
  margin: 12px 0 56px;
}
.am-tagline {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}
.am-sub {
  font-size: 1.02rem;
  color: var(--soft);
  line-height: 1.75;
  margin: 0;
  max-width: 560px;
}

/* Timeline — year left, card right */
.am-timeline {
  position: relative;
  margin-bottom: 56px;
}
.am-row {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 0 32px;
  align-items: start;
  margin-bottom: 20px;
}
.am-year {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding-top: 22px;
  text-align: right;
}

/* Project card */
.am-card {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 20px 24px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
  cursor: pointer;
}
a.am-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(212,154,80,0.10);
  background: #FFFAF4;
}
.am-card-logo {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  flex-shrink: 0;
  background: #F5F0EA;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.am-card-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 13px;
}
.am-card-body { flex: 1; min-width: 0; }
.am-card-title {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
  margin-bottom: 7px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.am-card-desc {
  font-size: 0.92rem;
  color: var(--soft);
  line-height: 1.7;
  margin: 0 0 12px;
}
.am-card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.am-tag {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: rgba(212,154,80,0.08);
  border: 1px solid rgba(212,154,80,0.22);
  border-radius: 4px;
  padding: 2px 8px;
}
.am-card-arrow {
  font-size: 1rem;
  color: var(--muted);
  flex-shrink: 0;
  padding-top: 18px;
  transition: color 0.15s, transform 0.15s;
}
a.am-card:hover .am-card-arrow {
  color: var(--accent);
  transform: translateX(3px);
}

/* WIP card */
.am-card--wip {
  opacity: 0.72;
  cursor: default;
}
.am-badge {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 2px 7px;
  vertical-align: middle;
}

/* Legacy timeline classes kept for compatibility */
.proj-timeline { margin-bottom: 48px; }
.proj-year-block { margin-bottom: 36px; }
.proj-year-label {
  font-size: 0.78rem; font-weight: 600; color: var(--accent);
  letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 10px;
}
.proj-entry { padding: 20px 0; border-bottom: 1px solid var(--rule); }
.proj-entry:first-child { border-top: 1px solid var(--rule); }
.proj-entry-name {
  font-size: 1.08rem; font-weight: 600; color: var(--ink);
  text-decoration: none; border-bottom: none; line-height: 1.4;
  display: inline-block; margin-bottom: 6px; transition: color 0.15s;
}
.proj-entry-name:hover { color: var(--accent); }
.proj-entry-desc {
  font-size: 0.95rem; color: var(--soft); line-height: 1.75;
  max-width: 640px; margin: 0;
}
.proj-status {
  display: inline-block; font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
  border: 1px solid var(--rule); border-radius: 4px; padding: 2px 8px; margin-top: 4px;
}

@media (max-width: 600px) {
  .am-row { grid-template-columns: 48px 1fr; gap: 0 16px; }
  .am-year { font-size: 0.68rem; padding-top: 20px; }
  .am-card { padding: 16px; gap: 14px; }
  .am-card-logo { width: 42px; height: 42px; }
  .am-tagline { font-size: 1.2rem; }
  .am-card-arrow { display: none; }
}

/* ── PAGE HEADING ── */
.page-heading {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
  line-height: 1.2;
}

/* ── ABOUT PAGE FOOTER ── */
.footer-copy {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* ══════════════════════════════════════════════
   TWO-COLUMN ACADEMIC HOME (maxkw-style)
   ══════════════════════════════════════════════ */

/* Header: name left, nav right — no wrapper div */
.mw-header {
  background: var(--white);
  border-bottom: 1px solid var(--rule);
  padding: 14px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.mw-header-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.mw-topnav {
  display: flex;
  gap: 24px;
  align-items: center;
}

.mw-topnav a {
  color: var(--soft);
  font-size: 0.88rem;
  font-weight: 400;
  border-bottom: none;
  transition: color 0.15s;
}

.mw-topnav a:hover { color: var(--ink); }

.mw-topnav-icon {
  display: inline-flex;
  align-items: center;
  color: var(--soft);
  border-bottom: none;
  transition: color 0.15s;
}

.mw-topnav-icon:hover { color: var(--ink); }

/* ── Two-column body ── */
/* !important needed to override Quarto's page-columns grid */
.mw-container {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: flex-start;
  min-height: calc(100vh - 50px);
}

/* ── Sidebar ── */
.mw-sidebar {
  width: 38% !important;
  flex-shrink: 0;
  min-width: 0;
  overflow: hidden;
  text-align: left;
  padding: 72px 48px 80px 130px;
  position: sticky;
  top: 50px;
  max-height: calc(100vh - 50px);
  grid-column: unset !important;
}

.mw-avatar-wrap {
  width: 200px;
  height: 200px;
  max-width: 100%;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 0 24px;
}

.mw-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mw-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.mw-org {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--muted);
  margin: 0 0 2px;
  line-height: 1.5;
}

/* Social list — vertical with icon + label */
.mw-social {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  margin-top: 22px;
}

.mw-social-item,
.mw-social-location {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.88rem;
  line-height: 1;
  color: var(--soft);
  border-bottom: none;
  text-decoration: none;
  transition: color 0.15s;
}

.mw-social-item svg,
.mw-social-location svg { flex-shrink: 0; }

.mw-social-item:hover { color: var(--accent); }
.mw-social-item:hover svg { color: var(--accent); }

.mw-social-location {
  color: var(--muted);
  cursor: default;
}

/* ── Main content ── */
.mw-main {
  flex: 1 !important;
  min-width: 0;
  padding: 60px 60px 120px 0;
  font-size: 1rem;
  line-height: 1.85;
  color: var(--ink);
  grid-column: unset !important;
}

.mw-main p {
  margin: 0 0 1.15em;
}

.mw-main p:last-of-type {
  margin-bottom: 0;
}

.mw-main a {
  color: var(--accent);
  border-bottom: none;
}

.mw-main a:hover { color: #B87A2A; }

/* Research numbered list */
.mw-research-list {
  margin: 0 0 1.15em;
  padding-left: 1.6em;
  list-style: decimal;
}

.mw-research-list li {
  margin-bottom: 0.9em;
  line-height: 1.75;
  padding-left: 0.3em;
}

.mw-research-list li:last-child { margin-bottom: 0; }

/* Publications section heading */
#publications {
  margin-top: 48px;
  scroll-margin-top: 65px;
}

#bio { scroll-margin-top: 65px; }

#about {
  margin-top: 96px;
  scroll-margin-top: 65px;
}

.mw-section-h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 4px;
  letter-spacing: -0.01em;
  border: none;
  padding: 0;
}

/* Hide Quarto's auto anchor links on section headings */
.mw-section-h2 .anchorjs-link { display: none; }

/* ── Responsive ── */
@media (max-width: 860px) {
  .mw-container { flex-direction: column; }

  .mw-sidebar {
    width: 100%;
    padding: 40px 32px 24px;
    position: static;
    max-height: none;
  }

  .mw-avatar-wrap { width: 160px; height: 160px; }

  .mw-main { padding: 0 32px 80px; }

  .mw-header { padding: 12px 24px; }

  #about { margin-top: 56px; }
}

@media (max-width: 600px) {
  .mw-header { padding: 10px 16px; }
  .mw-header-name { display: none; }
  .mw-topnav { gap: 18px; }
  .mw-topnav a { font-size: 0.88rem; white-space: nowrap; }

  .mw-sidebar { padding: 32px 20px 20px; }
  .mw-avatar-wrap { width: 130px; height: 130px; }
  .mw-name { font-size: 1.25rem; }
  .mw-org { font-size: 0.88rem; }

  .mw-main { padding: 0 20px 60px; }
  .mw-main p { font-size: 0.95rem; }
  .mw-section-h2 { font-size: 1.25rem; }
  .mw-research-list { font-size: 0.95rem; }

  .pub-title { font-size: 0.97rem; }
  .pub-authors { font-size: 0.88rem; }
  .pub-journal { font-size: 0.85rem; }

  .am-tagline { font-size: 1.05rem; }
  .am-row { grid-template-columns: 44px 1fr; gap: 0 12px; }
  .am-year { font-size: 0.65rem; padding-top: 20px; }
  .am-card { padding: 14px 16px; gap: 12px; }
  .am-card-logo { width: 40px; height: 40px; }
  .am-card-title { font-size: 0.95rem; }
  .am-card-desc { font-size: 0.87rem; }
  .am-card-arrow { display: none; }
}
