/* ============ Base ============ */
:root {
  --text: #1f2328;
  --muted: #6a737d;
  --link: #1a56b0;
  --link-hover: #0b3d8c;
  --accent: #b58900;
  --rule: #e4e7eb;
  --highlight-bg: #fbf7ec;
  --max-width: 840px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--text);
  background: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
               Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

h1 {
  font-size: 2.1em;
  font-weight: 650;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
}

h2 {
  font-size: 1.35em;
  font-weight: 650;
  margin: 44px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--rule);
}

.muted { color: var(--muted); font-size: 0.94em; }

/* ============ Header ============ */
.header {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.header-text { flex: 1; }

.tagline {
  color: var(--muted);
  font-size: 1.02em;
  margin: 0 0 16px;
}

.header-photo { flex-shrink: 0; }

.avatar {
  width: 172px;
  height: 172px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--rule);
}

.links {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 0;
}

.links li + li::before {
  content: "·";
  margin: 0 10px;
  color: var(--muted);
}

/* ============ News ============ */
.news {
  list-style: none;
  padding: 0;
  margin: 0;
}

.news li { margin-bottom: 6px; }

.news-date {
  display: inline-block;
  min-width: 84px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.94em;
}

/* ============ Publications ============ */
.section-note {
  color: var(--muted);
  font-size: 0.92em;
  margin-top: 0;
}

.pub {
  display: flex;
  gap: 20px;
  padding: 14px 12px;
  margin: 0 -12px;
  border-radius: 10px;
  transition: background 0.15s ease;
}

.pub:hover { background: #f6f8fa; }

.pub.highlight { background: var(--highlight-bg); }
.pub.highlight:hover { background: #f5efdd; }

.pub-year,
.exp-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 1.05em;
  font-weight: 650;
  color: var(--muted);
  margin: 28px 0 4px;
}

.pub-year::after,
.exp-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.pub-thumb {
  flex-shrink: 0;
  width: 200px;
  display: flex;
  align-items: center;
}

.pub-thumb img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid var(--rule);
  background: #ffffff;
}

.pub-info { flex: 1; min-width: 0; }
.pub-info p { margin: 0 0 3px; }

.pub-title { font-weight: 600; line-height: 1.4; }
.pub-title a { color: var(--text); }
.pub-title a:hover { color: var(--link-hover); }

.pub-authors { font-size: 0.92em; }

.pub-venue {
  font-size: 0.92em;
  font-style: italic;
  color: var(--muted);
}

.award {
  font-style: normal;
  font-weight: 650;
  color: var(--accent);
}

.pub-desc {
  font-size: 0.9em;
  color: var(--muted);
}

.pub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px !important;
}

.plink {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 10px;
  border: 1px solid #cdd6e0;
  border-radius: 999px;
  font-size: 0.8em;
  font-weight: 500;
  color: var(--link);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.plink:hover {
  background: var(--link);
  border-color: var(--link);
  color: #ffffff;
  text-decoration: none;
}

.plink::before {
  content: "";
  width: 13px;
  height: 13px;
  background: currentColor;
  -webkit-mask: var(--icon) no-repeat center / contain;
  mask: var(--icon) no-repeat center / contain;
}

.plink-paper { --icon: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="8" y1="13" x2="16" y2="13"/><line x1="8" y1="17" x2="16" y2="17"/></svg>'); }

.plink-code { --icon: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/></svg>'); }

.plink-web { --icon: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><line x1="2" y1="12" x2="22" y2="12"/><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"/></svg>'); }

.plink-poster { --icon: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2"/><circle cx="8.5" cy="8.5" r="1.5"/><path d="M21 15l-5-5L5 21"/></svg>'); }

.plink-data { --icon: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><ellipse cx="12" cy="5" rx="9" ry="3"/><path d="M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"/><path d="M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"/></svg>'); }

/* ============ Timeline (experience & education) ============ */
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}

.timeline li {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
}

.timeline .time {
  flex-shrink: 0;
  width: 150px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.94em;
  padding-top: 1px;
}

/* ============ Miscellaneous ============ */
.misc {
  list-style: none;
  padding: 0;
  margin: 0;
}

.misc li { margin-bottom: 8px; }

code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: #f2f4f7;
  padding: 1px 5px;
  border-radius: 4px;
}

/* ============ Footer ============ */
footer {
  margin-top: 56px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.85em;
}

/* ============ Mobile ============ */
@media (max-width: 640px) {
  main { padding-top: 32px; }

  .header { flex-direction: column-reverse; gap: 20px; }
  .avatar { width: 132px; height: 132px; }

  .pub { flex-direction: column; gap: 10px; }
  .pub-thumb { width: 100%; }

  .timeline li { flex-direction: column; gap: 2px; }
  .timeline .time { width: auto; }
}
