:root {
  --background: #f8fafc;
  --paper: #fff;
  --ink: #202a3d;
  --muted: #606d80;
  --accent: #2559c7;
  --accent-soft: #eaf0fc;
  --line: #dce3ed;
  --serif: Georgia, "Times New Roman", serif;
  --text-body: 20px;
  --text-small: 18px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; }
body { margin: 0; color: var(--ink); background: var(--background); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; font-size: 20px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; text-underline-offset: 4px; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; border-radius: 2px; }
img { display: block; max-width: 100%; }
p, figure { margin: 0; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); }
.container { width: min(1000px, calc(100% - 80px)); margin-inline: auto; }
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(248, 250, 252, .96); border-bottom: 1px solid var(--line); }
.header-inner { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.wordmark { color: var(--ink); font-size: 28px; font-weight: 750; letter-spacing: -1.7px; }
.wordmark span { color: var(--accent); }
.wordmark:hover { text-decoration: none; }
.site-header nav { display: flex; gap: 30px; }
.site-header nav a { color: var(--muted); font-size: 17px; font-weight: 550; }
.site-header nav a:hover { color: var(--accent); }
.about { display: grid; grid-template-columns: minmax(0, 1fr) 234px; align-items: center; gap: 40px; padding: 34px 0 28px; }
.eyebrow { margin-bottom: 15px; color: var(--accent); font-size: 12px; font-weight: 650; letter-spacing: 1.5px; text-transform: uppercase; }
h1 { font-family: var(--serif); font-size: clamp(38px, 4.2vw, 52px); line-height: 1.2; font-weight: 500; letter-spacing: -1.6px; }
h1 span { display: inline-block; margin-left: 12px; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 24px; font-weight: 400; letter-spacing: 3px; vertical-align: middle; }
.role { color: var(--muted); margin: 12px 0 16px; font-size: 18px; }
.role span { margin: 0 10px; color: #a1adbf; }
.biography { max-width: 68ch; margin: 0 0 14px; font-size: var(--text-body); line-height: 1.65; }
.biography strong { font-weight: 600; }
.profile-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.button { display: inline-flex; gap: 18px; align-items: center; min-height: 44px; padding: 8px 17px; border: 1px solid #cdd8e8; border-radius: 6px; font-size: 16px; font-weight: 600; color: var(--ink); transition: background-color .15s; }
.button:hover { background: var(--accent-soft); text-decoration: none; }
.button.primary { color: white; border-color: var(--accent); background: var(--accent); }
.button.primary:hover { background: #1b439c; }
.portrait { align-self: center; }
.portrait img { width: 234px; height: 254px; object-fit: cover; border-radius: 10px; background: #e5ebf4; box-shadow: 0 0 0 5px #fff, 0 12px 30px rgba(32, 42, 61, .08); }
.portrait figcaption { margin-top: 12px; text-align: center; font-size: 12px; color: var(--muted); }
.latest { display: flex; align-items: baseline; gap: 20px; padding: 12px 16px; border: 1px solid #dbe5f7; border-radius: 8px; background: #f0f5fe; font-size: 17px; line-height: 1.65; }
.latest-label { display: inline-flex; align-items: center; gap: 9px; font-weight: 650; white-space: nowrap; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.latest p { flex: 1; color: var(--muted); }
.latest p a { font-weight: 650; }
.latest time { white-space: nowrap; color: var(--muted); font-size: 12px; }
.publications { padding-top: 28px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
h2 { font-family: var(--serif); font-size: 35px; line-height: 1.25; font-weight: 500; letter-spacing: -.7px; }
.section-heading .eyebrow { margin-bottom: 9px; }
.section-note { font-size: 14px; color: var(--muted); padding-bottom: 3px; }
.year-nav { display: flex; flex-wrap: wrap; gap: 24px; margin: 14px 0 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.year-nav a { display: inline-flex; align-items: baseline; gap: 5px; padding: 5px 0; color: var(--ink); font-size: 17px; font-weight: 600; }
.year-nav span { margin-left: 4px; font-size: 11px; color: var(--muted); vertical-align: super; font-weight: 400; }
.year-heading { display: flex; align-items: center; gap: 12px; color: var(--ink); font-size: 18px; font-weight: 650; letter-spacing: .2px; margin: 22px 0 0; }
.year-heading::after { content: ""; width: 32px; height: 2px; background: var(--accent); opacity: .4; }
.year-nav + .year-group .year-heading { margin-top: 0; }
.publication { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 26px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: center; }
.publication-image { display: flex; align-items: center; justify-content: center; background: var(--paper); border: 1px solid #e0e7f1; border-radius: 8px; min-height: 140px; overflow: hidden; }
.publication-image img { width: 100%; height: 156px; padding: 8px; object-fit: contain; transition: transform .2s; }
.publication-image:hover img { transform: scale(1.025); }
.publication-featured .publication-image img { height: 190px; }
.pub-meta { margin-bottom: 5px; color: var(--muted); font-size: 16px; line-height: 1.5; }
.pub-meta i { font-style: normal; }
.pub-meta b { margin-left: 6px; font-size: 1em; font-weight: 650; color: var(--ink); }
.badge { display: inline-block; margin-left: 5px; padding: 1px 7px; border-radius: 3px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 650; }
.pub-title { font-size: 24px; font-weight: 650; line-height: 1.35; letter-spacing: -.25px; text-wrap: pretty; }
.pub-title a { color: var(--ink); }
.pub-title a:hover { color: var(--accent); }
.pub-authors { font-size: var(--text-small); line-height: 1.55; margin-top: 7px; color: var(--muted); }
.pub-authors b { color: var(--ink); font-weight: 650; }
sup { font-size: .7em; line-height: 0; }
.contribution { font-size: 17px; margin-top: 4px; color: var(--muted); }
.contribution strong { color: var(--ink); font-weight: 600; }
.pub-links { display: flex; flex-wrap: wrap; column-gap: 20px; row-gap: 4px; margin-top: 6px; }
.pub-links a { display: inline-flex; align-items: center; gap: 4px; min-height: 34px; font-size: 17px; font-weight: 600; }
.pub-links a > span[aria-hidden] { margin-left: 2px; font-size: 11px; }
.details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 24px 0; }
.details-grid h2 { font-size: 30px; margin-bottom: 12px; }
.details-grid .eyebrow { margin-bottom: 6px; }
.details-grid p, .contact-link { font-size: 19px; line-height: 1.5; }
.details-grid .eyebrow { font-size: 12px; }
.detail-label { font-weight: 650; margin-bottom: 6px; }
.muted { color: var(--muted); }
.contact-link { overflow-wrap: anywhere; }
.site-footer { display: flex; justify-content: space-between; gap: 20px; padding: 16px 0 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.site-footer a { color: var(--muted); }
.footer-divider { margin: 0 9px; color: #a1adbf; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 12px; top: -100px; padding: 8px 16px; background: white; z-index: 20; }
.skip-link:focus { top: 10px; }
@media (max-width: 850px) {
  .container { width: calc(100% - 48px); }
  .about { gap: 35px; grid-template-columns: minmax(0, 1fr) 180px; padding-top: 32px; }
  .portrait img { width: 180px; height: 210px; }
  h1 span { display: block; margin: 13px 0 0; font-size: 21px; }
  .publication { grid-template-columns: 210px minmax(0, 1fr); gap: 24px; }
  .publication-image img { height: 160px; }
  .publication-featured .publication-image img { height: 175px; }
  .latest { gap: 15px; }
}
@media (max-width: 600px) {
  html { scroll-padding-top: 100px; }
  .container { width: calc(100% - 36px); }
  .header-inner { min-height: 60px; gap: 14px; }
  .wordmark { font-size: 24px; }
  .site-header nav { gap: 15px; }
  .site-header nav a { font-size: 13px; }
  .about { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 24px 0; }
  .portrait { grid-row: 1; }
  .portrait img { width: 104px; height: 114px; }
  .portrait figcaption { display: none; }
  .eyebrow { font-size: 11px; letter-spacing: 1.1px; }
  h1 { font-size: 38px; }
  h1 span { display: inline-block; font-size: 19px; margin: 0 0 0 8px; letter-spacing: 1px; }
  .role { font-size: 17px; margin: 12px 0 16px; line-height: 1.5; }
  .role span { margin: 0 4px; }
  .biography { font-size: 18px; line-height: 1.65; }
  .profile-links { gap: 8px; }
  .button { gap: 10px; font-size: 14px; padding: 8px 12px; }
  .latest { display: grid; grid-template-columns: 1fr auto; gap: 7px 12px; padding: 14px 16px; }
  .latest p { grid-column: 1 / -1; grid-row: 2; }
  .latest time { grid-column: 2; grid-row: 1; }
  .publications { padding-top: 28px; }
  h2 { font-size: 31px; }
  .section-note { font-size: 12px; }
  .year-nav { gap: 24px; margin-bottom: 14px; }
  .publication { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 18px 0; }
  .publication-image { min-height: 0; }
  .publication-image img { height: 165px; padding: 8px; }
  .publication-featured .publication-image img { height: 210px; }
  .pub-title { font-size: 23px; }
  .pub-meta { font-size: 15px; }
  .pub-authors { font-size: 17px; }
  .pub-links { margin-top: 8px; gap: 6px 20px; }
  .pub-links a { min-height: 40px; padding-block: 5px; }
  .details-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 24px 0; }
  .details-grid h2 { margin-bottom: 10px; }
  .site-footer { align-items: flex-start; font-size: 11px; gap: 12px; }
}
@media (max-width: 360px) {
  .site-header nav { gap: 10px; }
  .site-header nav a { font-size: 12px; }
  h1 { font-size: 34px; }
  h1 span { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* Live visitor statistics; the map stays neutral until real data is available. */
.visitor-section { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; align-items: center; border-top: 1px solid var(--line); padding: 20px 0; }
.visitor-section h2 { font-size: 26px; }
.visitor-section .eyebrow { margin-bottom: 10px; }
.visitor-count { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin-top: 6px; }
#busuanzi_value_page_pv { font-family: var(--serif); font-size: 40px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.visitor-count-label { font-size: 15px; color: var(--muted); }
.visitor-status { font-size: 14px; color: var(--muted); margin-top: 3px; }
.visitor-note { font-size: 14px; color: var(--muted); line-height: 1.5; margin-top: 6px; }
.visitor-providers { font-size: 13px; color: var(--muted); margin-top: 8px; }
.visitor-map-panel { min-width: 0; width: 100%; max-width: 240px; justify-self: start; text-align: center; }
.visitor-map-fallback img { width: 100%; height: auto; max-height: 100px; object-fit: contain; }
.visitor-map-status { font-size: 13px; color: var(--muted); margin-top: 12px; }
.visitor-map-live { width: 100%; }
.visitor-map-live img, .visitor-map-live canvas, .visitor-map-live iframe { max-width: 100%; }
.visitor-map-live img { height: auto; margin-inline: auto; }
.visitor-section [hidden] { display: none !important; }
@media (max-width: 600px) {
  .visitor-section { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 20px 0; }
  .visitor-map-panel { max-width: 240px; justify-self: center; }
  .visitor-map-fallback img { max-height: 100px; }
}
