:root {
  --ink: #252525;
  --muted: #707070;
  --soft: #969696;
  --link: #2d6f9f;
  --link-dark: #1f587f;
  --rule: #dedede;
  --paper-rule: #ececec;
  --tag-bg: #f7f8f9;
  --tag-border: #dde3e8;
  --max-width: 860px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #ffffff;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  display: block;
  height: 3px;
  background: #315f86;
}

main, footer {
  width: min(calc(100% - 48px), var(--max-width));
  margin-inline: auto;
}

main { padding: 58px 0 18px; }
footer {
  padding: 14px 0 56px;
  color: var(--muted);
  font-size: 13.5px;
  letter-spacing: 0.01em;
}

h1, h2, h3, p { margin-top: 0; }

/* Intro */
header { margin-bottom: 4px; }
.header-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 28px;
  align-items: start;
}
.header-text {
  min-width: 0;
}
.header-photo-wrap {
  display: flex;
  justify-content: flex-end;
}
.profile-photo {
  display: block;
  width: 220px;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
h1 {
  margin: 0 0 4px;
  color: #1f1f1f;
  font-size: clamp(38px, 5vw, 48px);
  line-height: 1.08;
  font-weight: 750;
  letter-spacing: -0.045em;
}

.chinese-name {
  display: inline-block;
  margin-left: 8px;
  color: #8a8a8a;
  font-size: 19px;
  line-height: 1;
  font-weight: 450;
  letter-spacing: 0;
  vertical-align: 5px;
}

.position {
  margin: 17px 0 0;
  font-size: 17px;
  line-height: 1.45;
  font-weight: 650;
  color: #303030;
}
.affiliation {
  margin: 1px 0 24px;
  color: #545454;
}
.intro {
  max-width: 790px;
  margin-bottom: 12px;
}
.interests {
  margin: 18px 0 10px;
}
.interests strong { font-weight: 700; }
.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 2px 0 0;
  font-size: 15.5px;
}
.quick-links a { position: relative; }
.quick-links a:not(:last-child)::after {
  content: "·";
  position: absolute;
  right: -11px;
  color: #b1b1b1;
  pointer-events: none;
}

a {
  color: var(--link);
  text-decoration: none;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:hover {
  color: var(--link-dark);
  text-decoration: underline;
}

/* Structure */
hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 34px 0 31px;
}
section { scroll-margin-top: 20px; }
h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  color: #222;
  font-size: 27px;
  line-height: 1.2;
  font-weight: 720;
  letter-spacing: -0.025em;
}
h2::after {
  content: "";
  flex: 1;
  height: 1px;
  margin-top: 4px;
  background: #ededed;
}

/* Papers */
.paper {
  padding: 0 0 31px;
  margin: 0 0 31px;
  border-bottom: 1px solid var(--paper-rule);
}
.paper:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: 0;
}
.paper-heading {
  margin: 0 0 7px;
  font-size: 17px;
  line-height: 1.55;
}
.paper-number {
  display: inline-block;
  min-width: 30px;
  color: #7d8b96;
  font-variant-numeric: tabular-nums;
}
.paper-title {
  font-weight: 720;
  letter-spacing: -0.01em;
}
.paper-year { color: #686868; }
.paper-takeaway {
  margin: 7px 0 14px 30px;
  color: #3e3e3e;
  font-size: 15.7px;
  line-height: 1.62;
}
.paper-takeaway strong { color: #2c2c2c; }

.paper-summary {
  margin: 11px 0 15px 30px;
  color: #3e3e3e;
  font-size: 15.7px;
  line-height: 1.62;
}
.summary-label {
  color: #2d2d2d;
  font-weight: 700;
}
.status-line {
  margin-top: 8px;
}
.journal-highlight {
  color: #234f70;
  font-weight: 700;
  font-style: italic;
}
.status-tag {
  display: inline-block;
  margin-right: 7px;
  padding: 1px 8px 2px;
  border: 1px solid var(--tag-border);
  border-radius: 999px;
  background: var(--tag-bg);
  color: #46545f;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.02em;
  vertical-align: 1px;
}
.meta {
  margin: 6px 0 6px 30px;
  color: #626262;
  font-size: 14.3px;
  line-height: 1.58;
}
.meta-label {
  color: #4a4a4a;
  font-size: 11.5px;
  font-weight: 750;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}
.abstract-label {
  margin: 17px 0 7px 30px;
  color: #3e3e3e;
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.abstract {
  margin: 0 0 9px 30px;
  color: #343434;
  line-height: 1.72;
}
.paper-links {
  margin: 10px 0 0 30px;
  font-size: 14.5px;
}

/* Teaching + honors */
.teaching-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 24px;
  padding: 0 0 19px;
  margin-bottom: 19px;
  border-bottom: 1px solid var(--paper-rule);
}
.teaching-item:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.teaching-main h3 {
  margin-bottom: 2px;
  font-size: 16px;
  line-height: 1.48;
  font-weight: 700;
  letter-spacing: -0.006em;
}
.teaching-main p {
  margin-bottom: 0;
  color: #505050;
  font-size: 15px;
}
.teaching-year {
  padding-top: 1px;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}
.award-line {
  margin-top: 5px !important;
  color: #3f3f3f !important;
  font-weight: 600;
}

.teaching-eval-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  margin-top: 3px !important;
}
.document-link {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px 3px;
  border: 1px solid #b8cad8;
  border-radius: 4px;
  background: #f7fafc;
  color: #245f87;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}
.document-link:hover {
  border-color: #7fa2bc;
  background: #f0f6fa;
  color: #1f587f;
  text-decoration: none;
}

.honors-list { margin-top: -2px; }
.honor-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}
.honor-row:first-child { padding-top: 0; }
.honor-row:last-child { border-bottom: 0; }
.honor-name { color: #3f3f3f; }
.honor-year {
  color: var(--muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .header-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .header-photo-wrap {
    justify-content: center;
    order: -1;
  }
  .profile-photo {
    width: min(230px, 72vw);
  }
  main, footer { width: min(calc(100% - 30px), var(--max-width)); }
  main { padding-top: 40px; }
  body::before { height: 2px; }
  h1 { font-size: 36px; }
  .chinese-name { font-size: 16px; vertical-align: 4px; }
  h2 { font-size: 24px; }
  hr { margin: 27px 0 25px; }
  .paper { margin-bottom: 26px; padding-bottom: 26px; }
  .paper-takeaway, .paper-summary, .meta, .abstract-label, .abstract, .paper-links { margin-left: 0; }
  .paper-number { min-width: 27px; }
  .teaching-item { grid-template-columns: 1fr; gap: 3px; }
  .teaching-year { grid-row: 1; margin-bottom: 2px; }
  .honor-row { grid-template-columns: 1fr auto; gap: 14px; }
}
