/*
 * Personal homepage — single-page academic layout.
 * Template adapted from Siwei Zhang's (https://sanweiliti.github.io/) academic homepage.
 */
:root {
  --text: #1a1a1a;
  --muted: #666b70;
  --link: #b31b1b;
  --border: #e4e6e9;
  --bg: #ffffff;
  --width: 820px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: min(calc(100% - 40px), var(--width)); margin: 0 auto; }

/* ---------- Header / bio ---------- */
.intro { display: flex; gap: 36px; align-items: center; padding: 56px 0 20px; }
.intro-photo { flex: 0 0 210px; }
.intro-photo img { width: 210px; height: 210px; object-fit: cover; border-radius: 6px; }
.intro-body { flex: 1 1 auto; min-width: 0; }
.intro-body h1 { margin: 0 0 4px; font-size: 30px; font-weight: 700; letter-spacing: -0.01em; }
.intro-body .role { margin: 0 0 14px; color: var(--muted); font-size: 15px; }
.intro-body p { margin: 0 0 14px; }
.links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 6px; font-size: 15px; }
.links a { color: var(--link); }

/* ---------- Sections ---------- */
section { padding: 26px 0; }
h2 {
  margin: 0 0 18px;
  padding-bottom: 8px;
  font-size: 21px;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}

/* ---------- News ---------- */
.news { max-height: 190px; overflow-y: auto; padding-right: 8px; }
.news dl { margin: 0; display: grid; grid-template-columns: 66px 1fr; row-gap: 8px; column-gap: 12px; }
.news dt { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 15px; }
.news dd { margin: 0; }

/* ---------- Publications ---------- */
.pub { display: flex; gap: 22px; padding: 20px 0; border-top: 1px solid var(--border); }
.pub:first-of-type { border-top: 0; }
.pub-thumb { flex: 0 0 240px; }
.pub-thumb img { width: 240px; border: 1px solid var(--border); border-radius: 4px; }
.pub-info { flex: 1 1 auto; min-width: 0; }
.pub-title { margin: 0 0 3px; font-size: 17px; font-weight: 700; line-height: 1.35; }
.pub-authors { margin: 0 0 2px; font-size: 15px; }
.pub-authors .me { font-weight: 700; }
.pub-venue { margin: 0 0 6px; color: var(--muted); font-size: 14px; }
.pub-venue .award { color: var(--link); font-weight: 600; }
.pub-links { font-size: 14px; }
.pub-links a { margin-right: 4px; }
.pub-links .sep { color: var(--border); margin: 0 4px; }
.pub-desc { margin: 6px 0 0; color: var(--muted); font-size: 14px; }

#services p { margin: 0 0 12px; }
#services p:last-child { margin-bottom: 0; }

footer { padding: 30px 0 44px; color: var(--muted); font-size: 13px; text-align: center; }
footer a { color: var(--muted); text-decoration: underline; }

@media (max-width: 640px) {
  .intro { flex-direction: column; text-align: center; gap: 20px; padding-top: 40px; }
  .links { justify-content: center; }
  .pub { flex-direction: column; gap: 14px; }
  .pub-thumb, .pub-thumb img { flex-basis: auto; width: 100%; max-width: 340px; }
  .news { max-height: none; }
}
