:root {
  --fg: #1f2328;
  --muted: #59636e;
  --accent: #0b5cad;
  --bg: #ffffff;
  --card: #f6f8fa;
  --line: #d8dee4;
  --award: #b35900;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fg: #e6edf3;
    --muted: #9198a1;
    --accent: #58a6ff;
    --bg: #0d1117;
    --card: #161b22;
    --line: #30363d;
    --award: #f0883e;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

main {
  max-width: 880px;
  margin: 0 auto;
  padding: 48px 24px 32px;
}

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

/* Header */
.profile {
  display: flex;
  gap: 32px;
  align-items: center;
  margin-bottom: 8px;
}
.profile img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--line);
}
.profile h1 { margin: 0; font-size: 2rem; line-height: 1.2; }
.profile h1 .cn { font-weight: 400; color: var(--muted); font-size: 1.4rem; }
.profile .role { margin: 6px 0 12px; color: var(--muted); }
.links { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 0.95rem; }

/* Sections */
section { margin-top: 40px; }
h2 {
  font-size: 1.3rem;
  margin: 0 0 16px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
p { margin: 0 0 12px; }
ul.plain { margin: 0; padding-left: 20px; }
ul.plain li { margin-bottom: 6px; }

/* Timeline entries (experience, education) */
.entry {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.entry .what b { display: block; }
.entry .what span { color: var(--muted); }
.entry .when { color: var(--muted); white-space: nowrap; }
.entry ul { margin: 6px 0 0; padding-left: 20px; }

/* Publications */
.pub {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}
.venue {
  flex: 0 0 104px;
  height: fit-content;
  padding: 2px 0;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border-radius: 4px;
}
.venue.preprint { background: var(--muted); }
.pub .title { font-weight: 600; }
.pub .authors, .pub .where { font-size: 0.93rem; }
.pub .where { color: var(--muted); font-style: italic; }
.pub .me { font-weight: 700; text-decoration: underline; }
.award { color: var(--award); font-weight: 600; font-size: 0.93rem; }
.tags { font-size: 0.88rem; margin-top: 2px; }
.tags a { margin-right: 10px; }
.note { color: var(--muted); font-size: 0.9rem; }

footer {
  margin-top: 56px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

@media (max-width: 640px) {
  .profile { flex-direction: column; text-align: center; }
  .links { justify-content: center; }
  .entry { flex-direction: column; gap: 0; }
  .pub { flex-direction: column; gap: 6px; }
  .venue { flex-basis: auto; width: 104px; }
}
