/* Scholar theme: one column, one accent, serif text. */
:root {
  --text: #1f2328;
  --muted: #5b6470;
  --faint: #8a929c;
  --accent: #1353d7;
  --accent-soft: #eef3fd;
  --rule: #e6e8eb;
  --bg: #ffffff;
  --panel: #f7f8fa;
  --serif: "Times New Roman", Times, "Songti SC", STSong, serif;
  --wrap: 880px;
}

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

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.1875rem;          /* 19px: Times reads small */
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }

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

/* ---------- header / footer ---------- */
.site-header { border-bottom: 1px solid var(--rule); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 18px;
}
.brand { font-size: 1.35rem; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; color: var(--accent); }
.site-nav { display: flex; gap: 28px; }
.site-nav a { color: var(--muted); font-size: 1.05rem; padding: 4px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--text); text-decoration: none; }
.site-nav a.active { color: var(--text); border-bottom-color: var(--accent); }

main.wrap { padding-top: 48px; padding-bottom: 72px; }

.site-footer { border-top: 1px solid var(--rule); color: var(--faint); font-size: 0.9rem; }
.site-footer .wrap { padding-top: 22px; padding-bottom: 28px; }
.site-footer .sep { margin: 0 8px; }

/* ---------- typography ---------- */
h1, h2, h3, h4 { color: var(--text); line-height: 1.25; margin: 0; }
p { margin: 0 0 1em; }
strong, b { font-weight: 700; }

.page-head { margin-bottom: 36px; }
.page-head h1 { font-size: 2.4rem; letter-spacing: -0.015em; }
.page-head .lead { margin: 14px 0 0; color: var(--muted); font-size: 1.15rem; max-width: 46em; }

/* section label: small caps rule */
h2.section {
  display: flex; align-items: center; gap: 14px;
  font-size: 0.95rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin: 56px 0 22px;
}
h2.section::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
h2.section:first-child { margin-top: 0; }

.muted { color: var(--muted); }

/* ---------- home: hero ---------- */
.hero { display: grid; grid-template-columns: 168px 1fr; gap: 40px; align-items: start; }
.hero-photo { margin-top: 6px; width: 168px; height: 168px; border-radius: 50%; object-fit: cover; border: 1px solid var(--rule); }
.hero h1 { font-size: 2.6rem; letter-spacing: -0.02em; margin-bottom: 6px; }
.hero .role { color: var(--muted); font-size: 1.15rem; margin: 0 0 12px; }
.hero .tagline { margin: 0 0 16px; font-size: 1.1rem; line-height: 1.6; }
.hero-links { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 1rem; }
.hero-links a { color: var(--text); }
.hero-links a:hover { color: var(--accent); }
.hero-links i { color: var(--accent); margin-right: 6px; width: 1em; text-align: center; }

.bio { margin-top: 40px; font-size: 1.15rem; }

/* home: research directions */
.dirs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.dir {
  display: block; border: 1px solid var(--rule); border-radius: 10px; padding: 18px 18px 16px;
  color: var(--text);
}
.dir:hover { border-color: var(--accent); text-decoration: none; }
.dir .num { font-size: 0.85rem; color: var(--accent); font-weight: 700; letter-spacing: 0.08em; }
.dir h3 { font-size: 1.12rem; margin: 6px 0 8px; }
.dir p { color: var(--muted); font-size: 0.98rem; margin: 0; line-height: 1.5; }
.also { margin-top: 14px; color: var(--muted); font-size: 1rem; }

/* home: news, honors, education (date-left lists) */
.dated { list-style: none; margin: 0; padding: 0; }
.dated li { display: grid; grid-template-columns: 6.5rem 1fr; gap: 16px; padding: 7px 0; }
.dated .when { color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dated .note { color: var(--muted); font-size: 0.95em; }
details.more > summary {
  cursor: pointer; color: var(--accent); margin-top: 10px; list-style: none; font-size: 1rem;
}
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "+ "; }
details.more[open] > summary::before { content: "− "; }

/* ---------- entries (papers / projects) ---------- */
.entry { display: grid; grid-template-columns: 168px 1fr; gap: 22px; padding: 20px 0; border-top: 1px solid var(--rule); }
.entry:first-of-type { border-top: none; }
.entry.no-thumb { grid-template-columns: 1fr; }
.thumb {
  width: 168px; height: 112px; object-fit: contain; background: var(--panel);
  border: 1px solid var(--rule); border-radius: 6px; padding: 4px;
}
.entry .title { font-weight: 700; font-size: 1.06rem; line-height: 1.35; margin-bottom: 4px; }
.entry .title a { color: var(--text); }
.entry .title a:hover { color: var(--accent); }
.entry .authors { color: var(--muted); font-size: 0.98rem; }
.entry .authors strong { color: var(--text); }
.entry .venue { font-size: 0.98rem; }
.entry .venue em, .entry .venue i { color: var(--text); }
.entry .desc { margin: 8px 0 0; font-size: 1rem; line-height: 1.55; }
.badge {
  display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft); border-radius: 4px; padding: 1px 6px; margin-right: 6px;
  vertical-align: 2px; font-family: -apple-system, "Helvetica Neue", Arial, sans-serif;
}

.links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; align-items: center; }
.links a, .links summary {
  display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
  font-size: 0.85rem; line-height: 1; padding: 5px 9px;
  border: 1px solid var(--rule); border-radius: 5px; color: var(--muted);
  font-family: -apple-system, "Helvetica Neue", Arial, sans-serif;
}
.links a:hover, .links summary:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }
.links i { font-size: 0.85em; }
details.abs { display: contents; }
details.abs > summary { list-style: none; }
details.abs > summary::-webkit-details-marker { display: none; }
details.abs[open] > summary { color: var(--accent); border-color: var(--accent); }
details.abs > .abs-body {
  flex-basis: 100%; margin-top: 6px; padding: 12px 14px; background: var(--panel);
  border-radius: 6px; font-size: 0.97rem; line-height: 1.6; color: var(--text);
}

/* featured entry: wide figure */
.featured { padding: 4px 0 24px; }
.featured .desc { font-size: 1rem; line-height: 1.55; }
.featured .fig {
  display: block; width: 100%; border: 1px solid var(--rule); border-radius: 8px;
  background: #fff; padding: 10px; margin: 14px 0 4px;
}

/* ---------- publications ---------- */
.year-group > h3 {
  font-size: 1.05rem; color: var(--faint); font-weight: 700; margin: 30px 0 2px; font-variant-numeric: tabular-nums;
}
.year-group:first-of-type > h3 { margin-top: 10px; }

.plain { list-style: none; margin: 0; padding: 0; }
.plain li { padding: 12px 0; border-top: 1px solid var(--rule); }
.plain li:first-child { border-top: none; }
.plain .t { font-weight: 700; }
.plain .m { color: var(--muted); font-size: 0.98rem; }

/* ---------- research ---------- */
.vision { font-size: 1.15rem; }
.vision p:last-child { margin-bottom: 0; }
.direction { margin-top: 60px; }
.direction-head { display: grid; grid-template-columns: 3.2rem 1fr; gap: 6px 10px; align-items: baseline; margin-bottom: 8px; }
.direction-head .num { font-size: 1.6rem; color: var(--accent); font-weight: 700; }
.direction-head h2 { font-size: 1.65rem; letter-spacing: -0.01em; }
.direction-head p { grid-column: 2; color: var(--muted); margin: 6px 0 0; font-size: 1.08rem; }
.direction .entries { margin-left: calc(3.2rem + 10px); margin-top: 10px; }

/* ---------- teaching ---------- */
.course { display: grid; grid-template-columns: 10.5rem 1fr; gap: 18px; padding: 16px 0; border-top: 1px solid var(--rule); }
.course:first-child { border-top: none; }
.course .when { color: var(--faint); font-variant-numeric: tabular-nums; }
.course .t { font-weight: 700; }
.course .m { color: var(--muted); font-size: 0.98rem; }
.course .role { color: var(--text); }
.course .role.lead { color: var(--accent); font-weight: 700; }

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  body { font-size: 1.125rem; }
  .wrap { padding: 0 16px; }
  main.wrap { padding-top: 32px; }
  .site-nav { gap: 20px; }
  .hero { grid-template-columns: 1fr; gap: 18px; text-align: left; }
  .hero-photo { width: 112px; height: 112px; }
  .hero h1 { font-size: 2.1rem; }
  .dirs { grid-template-columns: 1fr; }
  .dated li { grid-template-columns: 1fr; gap: 0; }
  .entry { grid-template-columns: 1fr; gap: 10px; }
  .thumb { width: 100%; height: 150px; }
  .direction .entries { margin-left: 0; }
  .direction-head { grid-template-columns: 2.4rem 1fr; }
  .course { grid-template-columns: 1fr; gap: 2px; }
  .page-head h1 { font-size: 2rem; }
}
