:root {
  --bg: #ffffff;
  --fg: #1f2328;
  --muted: #656d76;
  --accent: #76b900;
  --link: #0b63c4;
  --border: #e5e7eb;
  --chip: #f3f4f6;
  --max: 860px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --fg: #e6e8eb;
    --muted: #9aa3ad;
    --link: #6cb6ff;
    --border: #262a31;
    --chip: #1b1f26;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Noto Sans CJK SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
nav .inner {
  max-width: var(--max); margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
nav .brand { font-weight: 600; color: var(--fg); }
nav .links { display: flex; gap: 18px; flex-wrap: wrap; }
nav .links a { color: var(--muted); font-size: 15px; }
nav .links a:hover { color: var(--fg); text-decoration: none; }

main { max-width: var(--max); margin: 0 auto; padding: 8px 20px 64px; }
section { padding-top: 28px; }
h2 {
  font-size: 22px; margin: 0 0 14px; padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.profile { display: flex; gap: 32px; align-items: center; padding-top: 40px; }
.profile img {
  width: 170px; height: 210px; object-fit: cover; border-radius: 12px; flex-shrink: 0;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .12);
}
.profile h1 { margin: 0; font-size: 32px; line-height: 1.2; }
.profile h1 .zh { font-weight: 400; color: var(--muted); font-size: 24px; margin-left: 8px; }
.profile .title { margin: 6px 0 2px; font-size: 17px; }
.profile .email { color: var(--muted); font-size: 15px; }
.socials { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.socials a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border: 1px solid var(--border); border-radius: 999px;
  color: var(--fg); font-size: 14px;
}
.socials a:hover { border-color: var(--accent); text-decoration: none; }
.socials svg { width: 15px; height: 15px; fill: currentColor; }

.interests { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.interests li { background: var(--chip); border-radius: 6px; padding: 2px 10px; font-size: 14px; }

.news { list-style: none; padding: 0; margin: 0; }
.news li { display: flex; gap: 14px; padding: 5px 0; }
.news .date { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 72px; flex-shrink: 0; }

.pub-note { color: var(--muted); font-size: 14px; margin: -6px 0 12px; }
.year { font-size: 15px; color: var(--muted); font-weight: 600; margin: 22px 0 6px; }
.pub { padding: 10px 0 10px 14px; border-left: 3px solid transparent; }
.pub.first { border-left-color: var(--accent); }
.pub .t { font-weight: 600; }
.pub .a { font-size: 15px; }
.pub .a b { text-decoration: underline; text-underline-offset: 3px; }
.pub .v { font-size: 15px; color: var(--muted); font-style: italic; }
.pub .v .tag {
  font-style: normal; font-size: 12px; font-weight: 600; color: #fff; background: var(--accent);
  border-radius: 4px; padding: 0 6px; margin-left: 6px;
}
.pub .l { font-size: 14px; }
.pub .l a { margin-right: 10px; }

details { margin-top: 18px; }
summary { cursor: pointer; color: var(--link); font-size: 15px; }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: flex; gap: 14px; padding: 6px 0; }
.timeline .when { color: var(--muted); min-width: 130px; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.timeline .what b { font-weight: 600; }
.timeline .what span { color: var(--muted); }

ul.plain { margin: 0; padding-left: 20px; }
ul.plain li { padding: 2px 0; }

.visitors { display: flex; justify-content: center; padding-top: 40px; }
.visitors .map { width: min(380px, 100%); }

footer { color: var(--muted); font-size: 13px; text-align: center; padding: 24px 0 40px; }

@media (max-width: 640px) {
  nav .links { gap: 14px; flex-wrap: nowrap; overflow-x: auto; }
  nav .links a { white-space: nowrap; }
  .pub .a, .pub .t { overflow-wrap: anywhere; }
  nav .brand { display: none; }
  .profile { flex-direction: column; text-align: center; gap: 18px; padding-top: 28px; }
  .profile img { width: 140px; height: 172px; }
  .socials, .interests { justify-content: center; }
  .news li, .timeline li { flex-direction: column; gap: 0; }
}
