
/* Local fonts, separate content sections, and content-driven publication media. */

:root {
  --bg: #f6f8fa;
  --surface: #ffffff;
  --surface-soft: #f8f9fa;
  --text: #394655;
  --heading: #233347;
  --muted: #617083;
  --muted-2: #6e7d8d;
  --accent: #557eaa;
  --accent-deep: #376993;
  --border: #e5eaf0;
  --radius: 16px;
  --topbar-height: 60px;
  --font-regular: "Homepage Source Sans Regular";
  --font-semibold: "Homepage Source Sans Semibold";
  --font-bold: "Homepage Source Sans Bold";
  --font-chinese: "Homepage Noto Sans SC";
}

* { box-sizing: border-box; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-regular);
  font-size: 20px;
  font-style: normal;
  font-weight: 400;
  font-synthesis: none;
  font-kerning: normal;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

strong, b {
  font-family: var(--font-bold);
  font-weight: 700;
}

/* Resolve every weight directly to its bundled file, including in Safari. */
.nav a,
.hero-section h1,
.social-row a,
.paper-links a,
.main-section h2,
.paper-body h3,
.timeline-date,
.timeline h3 {
  font-family: var(--font-semibold);
}

a:focus-visible,
.paper-cover:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 4px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--topbar-height);
  background: rgba(246, 248, 250, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: 1040px;
  height: 100%;
  margin: 0 auto;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.nav {
  display: flex;
  align-items: center;
  gap: 7px;
}

.nav a {
  color: #5a6268;
  font-size: 19px;
  font-weight: 600;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 999px;
  transition: .2s ease;
}

.nav a:hover,
.nav a.active {
  color: var(--accent-deep);
  background: rgba(107, 154, 196, 0.08);
}

.page-shell {
  width: min(1040px, calc(100% - 34px));
  margin: 32px auto 64px;
}

.avatar {
  display: block;
  width: 220px;
  height: auto;
  max-width: 100%;
  border-radius: 14px;
  object-fit: contain;
  margin: 0;
  border: 4px solid #fff;
  box-shadow: 0 2px 10px rgba(35,51,71,.08);
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  grid-template-areas: "name portrait" "copy portrait";
  column-gap: 36px;
  row-gap: 24px;
}

.hero-copy {
  grid-area: copy;
  min-width: 0;
}

.hero-section h1 {
  grid-area: name;
  margin: 0;
  color: var(--heading);
  font-size: 42px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.025em;
}

.cn-name {
  display: inline;
  margin-left: .28em;
  color: inherit;
  font-size: inherit;
  font-family: var(--font-chinese);
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
}

.social-row {
  padding-top: 14px;
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-links {
  margin-top: 18px;
  margin-bottom: 0;
  padding-top: 0;
}

.hero-about {
  max-width: 720px;
}

.hero-about p {
  margin: 0 0 16px;
  font-size: 22px;
  line-height: 1.7;
}

.hero-about a {
  color: var(--accent-deep);
  text-decoration: none;
}

.hero-about a:hover {
  text-decoration: underline;
}

.hero-avatar {
  grid-area: portrait;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.social-row a,
.paper-links a {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 8px;
  padding: 5px 11px;
  text-decoration: none;
  font-size: 18px;
  font-weight: 600;
  transition: .2s ease;
}

.social-row a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.paper-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.paper-icon {
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
}

.paper-icon-paper {
  color: var(--accent-deep);
}

.contact-icon {
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
}

.social-row a:hover,
.paper-links a:hover {
  color: var(--accent-deep);
  border-color: #b6cadd;
  background: #f3f7fb;
}

/* MAIN CONTENT */
.content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.section-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 36px;
}

.main-section {
  scroll-margin-top: calc(var(--topbar-height) + 24px);
}

.main-section h2 {
  display: inline-block;
  margin: 0 0 22px;
  color: var(--heading);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.018em;
}

.main-section h2::after {
  content: "";
  display: block;
  width: 100%;
  height: 2px;
  margin-top: 7px;
  border-radius: 99px;
  background: #b4cce1;
}

.section-icon {
  display: inline-block;
  width: .8em;
  height: .8em;
  margin-right: 8px;
  color: var(--accent);
  vertical-align: -.04em;
}

.main-section p {
  color: var(--text);
  margin: 0 0 14px;
  font-size: 20px;
}

.news-list,
.award-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.news-list {
  display: grid;
  gap: 12px;
  padding-left: 22px;
  list-style: disc;
}

.news-list li {
  color: #4d5861;
}

.news-list a {
  color: var(--accent-deep);
  text-decoration: none;
}

.news-list a:hover {
  text-decoration: underline;
}

.news-list li::marker {
  color: #4d5861;
}

.section-heading-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.section-note {
  color: var(--muted-2);
  font-size: 17px;
}

.main-section .publication-note {
  margin: -8px 0 22px;
  color: var(--muted);
  font-size: 17px;
}

.paper-card {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  align-items: stretch;
  gap: 26px;
  padding: 24px 0;
}

.paper-card + .paper-card {
  border-top: 1px solid var(--border);
}

.paper-card:first-of-type {
  padding-top: 4px;
}

.paper-card:last-child {
  padding-bottom: 0;
}

.paper-cover {
  position: relative;
  display: block;
  align-self: stretch;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
}

.paper-cover img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(44,62,80,.07);
}

.paper-cover > img {
  position: absolute;
  inset: 0;
}

.paper-cover img.paper-image-contain {
  object-fit: contain;
  background: #fff;
}

.paper-body {
  min-width: 0;
}

.paper-body h3 {
  margin: 0 0 9px;
  color: var(--heading);
  line-height: 1.35;
  font-size: 24px;
  font-weight: 600;
}

.paper-body .authors {
  color: var(--muted);
  font-size: 20px;
  line-height: 1.55;
  margin-bottom: 5px;
}

.paper-body .authors a {
  color: inherit;
  text-decoration: none;
}

.paper-body .authors a:hover {
  color: var(--accent-deep);
  text-decoration: underline;
}

.paper-body .authors sup,
.publication-note sup {
  font-size: .7em;
  line-height: 0;
  vertical-align: super;
}

.paper-cover-swap {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  border: 1px solid rgba(44, 62, 80, .07);
  background: var(--surface-soft);
}

.paper-cover-swap .paper-swap-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  border: 0;
  border-radius: 0;
  transition: opacity .2s ease;
}

.paper-cover-swap .paper-swap-before {
  opacity: 1;
}

.paper-cover-swap .paper-swap-after {
  opacity: 0;
}

.paper-cover-swap:hover .paper-swap-before {
  opacity: 0;
}

.paper-cover-swap:hover .paper-swap-after {
  opacity: 1;
}

.paper-cover-swap:focus-within .paper-swap-before {
  opacity: 0;
}

.paper-cover-swap:focus-within .paper-swap-after {
  opacity: 1;
}

.paper-body .venue {
  color: var(--muted);
  font-size: 18px;
  font-weight: 400;
  margin-bottom: 12px;
}

.paper-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.timeline {
  display: grid;
  grid-template-columns: max-content max-content max-content;
  justify-content: space-between;
  align-items: baseline;
  column-gap: 24px;
  row-gap: 22px;
}

.timeline-row {
  display: contents;
}

.timeline-row > * {
  min-width: 0;
}

.timeline-date {
  grid-column: 1;
  color: var(--accent-deep);
  font-size: 19px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.timeline h3 {
  grid-column: 2;
  margin: 0;
  color: var(--heading);
  font-size: 22px;
  font-weight: 600;
}

.timeline .muted {
  grid-column: 3;
  margin: 0;
  color: var(--muted);
  font-size: 19px;
}

.muted {
  color: var(--muted);
  font-size: 19px;
}

.award-list {
  display: grid;
  gap: 9px;
}

.award-list li {
  padding-left: 18px;
  position: relative;
  color: #4d5861;
}

.award-list li::before {
  content: "•";
  position: absolute;
  left: 2px;
  color: var(--accent);
}

.footer {
  margin-top: 4px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted-2);
  font-size: 17px;
  text-align: center;
}

/* Keep shared Education columns while moving the degree below the school. */
@media (max-width: 900px) {
  .page-shell {
    width: calc(100% - 32px);
    margin-top: 20px;
  }

  .hero-section {
    grid-template-columns: minmax(0, 1fr) 160px;
    column-gap: 28px;
  }

  .avatar {
    width: 160px;
  }

  .timeline {
    grid-template-columns: minmax(0, 1fr);
    justify-content: normal;
    row-gap: 22px;
  }

  .timeline-row {
    display: grid;
    grid-template-columns: minmax(0, 10rem) minmax(0, 1fr);
    column-gap: 28px;
    row-gap: 2px;
    align-items: baseline;
  }

  .timeline-date {
    grid-row: 1 / 3;
  }

  .timeline .muted {
    grid-column: 2;
  }

  .section-card { padding: 28px; }
  .topbar-inner { padding: 0 16px; }
}

@media (max-width: 660px) {
  :root { --topbar-height: 56px; }

  .topbar-inner { padding: 0 14px; }
  .nav { gap: 2px; }
  .nav a { padding: 6px 10px; font-size: 18px; }

  .page-shell { width: calc(100% - 24px); margin-top: 16px; }

  .content { gap: 16px; }

  .hero-section {
    grid-template-columns: minmax(0, 1fr) 104px;
    grid-template-areas: "name portrait" "copy copy";
    column-gap: 16px;
    row-gap: 24px;
    align-items: center;
  }

  .hero-section h1 {
    font-size: 34px;
    line-height: 1.25;
  }

  .cn-name {
    display: block;
    margin: 8px 0 0;
  }

  .hero-about p {
    font-size: 20px;
    line-height: 1.65;
  }

  .avatar {
    width: 104px;
    height: auto;
  }

  .section-card {
    border-radius: 14px;
    padding: 24px 20px;
  }

  .main-section h2 { font-size: 28px; }
  .paper-card {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 24px 0;
  }

  .paper-cover {
    display: block;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .paper-cover img {
    height: 100%;
    aspect-ratio: auto;
  }

  .paper-cover-swap {
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .paper-cover-swap .paper-swap-image {
    height: 100%;
    aspect-ratio: auto;
  }

  .timeline-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    row-gap: 3px;
  }

  .timeline-row > * {
    grid-column: 1;
    grid-row: auto;
  }

  .timeline .muted {
    grid-column: 1;
  }

  .timeline h3 {
    grid-column: 1;
  }

  .timeline {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .section-heading-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
  }
}


button, input, textarea, select {
  font: inherit;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
