:root {
  --text: #172033;
  --muted: #5b6474;
  --line: #d9dee7;
  --soft: #f5f7fa;
  --accent: #174ea6;
  --accent-dark: #113b7d;
  --white: #ffffff;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--white);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent-dark);
}

a:focus-visible {
  outline: 3px solid #79a7eb;
  outline-offset: 3px;
}

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

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.6rem 0.85rem;
  color: var(--white);
  background: var(--text);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
main,
footer {
  width: min(1040px, calc(100% - 3rem));
  margin-inline: auto;
}

.site-header {
  min-height: 4.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 720;
  text-decoration: none;
}

nav {
  display: flex;
  gap: clamp(1.25rem, 3vw, 2.2rem);
}

nav a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

nav a:hover {
  color: var(--accent);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 17rem;
  align-items: center;
  gap: clamp(3rem, 7vw, 6rem);
  padding: 4.75rem 0 5rem;
  border-bottom: 1px solid var(--line);
}

.roleline {
  margin-bottom: 0.65rem;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 650;
}

h1 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3em;
  margin-bottom: 1rem;
  font-size: clamp(3.25rem, 7vw, 5.25rem);
  font-weight: 750;
  letter-spacing: -0.055em;
  line-height: 1;
}

.chinese-name {
  color: var(--muted);
  font-size: 0.48em;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.hero-bio {
  max-width: 45rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.04rem;
}

.hero-bio strong {
  color: var(--text);
  font-weight: 650;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin: 1.25rem 0 0;
}

.profile-links a {
  font-size: 0.94rem;
  font-weight: 680;
  text-decoration: none;
}

.portrait-wrap {
  width: 100%;
  margin: 0;
}

.portrait-frame {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  background: var(--soft);
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 50% 31%;
}

.section {
  padding: 5.75rem 0 2rem;
}

.section-compact {
  padding-bottom: 5.75rem;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--text);
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.65rem);
  font-weight: 740;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.section-heading p {
  max-width: 28rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  text-align: right;
}

.research-intro {
  max-width: 48rem;
  margin-bottom: 2.75rem;
  color: var(--muted);
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  font-weight: 480;
  letter-spacing: -0.012em;
  line-height: 1.55;
}

.research-intro span {
  color: var(--text);
  font-weight: 650;
}

.publication-groups {
  display: grid;
  gap: 3.25rem;
}

.publication-group > h3 {
  margin-bottom: 0.4rem;
  color: var(--text);
  font-size: 1.35rem;
  font-weight: 720;
}

.publication-entry {
  padding: 1.55rem 0 1.7rem;
  border-bottom: 1px solid var(--line);
}

.publication-entry:first-of-type {
  border-top: 1px solid var(--line);
}

.publication-entry h4 {
  max-width: 58rem;
  margin: 0 0 0.45rem;
  color: var(--text);
  font-size: clamp(1.3rem, 2.3vw, 1.62rem);
  font-weight: 680;
  letter-spacing: -0.018em;
  line-height: 1.35;
}

.publication-authors,
.publication-venue {
  margin-bottom: 0.2rem;
  font-size: 1rem;
}

.publication-authors {
  color: var(--text);
}

.publication-authors strong {
  font-weight: 750;
}

.publication-venue {
  color: var(--muted);
  font-style: italic;
}

.publication-venue a {
  margin-left: 0.65rem;
  font-size: 0.9rem;
  font-style: normal;
  font-weight: 680;
  white-space: nowrap;
}

.timeline {
  border-top: 0;
}

.timeline-item {
  display: grid;
  grid-template-columns: 10.5rem 1fr;
  gap: 2rem;
  padding: 1.65rem 0;
  border-bottom: 1px solid var(--line);
}

.timeline-date {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.timeline-item h3 {
  margin-bottom: 0.25rem;
  font-size: 1.3rem;
  font-weight: 680;
  line-height: 1.3;
}

.timeline-item div p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

footer {
  min-height: 6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.875rem;
}

footer p {
  margin: 0;
}

footer a {
  font-weight: 620;
}

.status-toast {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 30;
  max-width: min(24rem, calc(100% - 2.5rem));
  padding: 0.85rem 1rem;
  color: var(--white);
  background: var(--text);
  border-radius: 0.35rem;
  box-shadow: 0 0.7rem 2rem rgba(23, 32, 51, 0.2);
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.5rem);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.status-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 760px) {
  .site-header,
  main,
  footer {
    width: min(100% - 2rem, 42rem);
  }

  .site-header {
    min-height: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.85rem 0;
  }

  nav {
    width: 100%;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 3.5rem 0 4rem;
  }

  .portrait-wrap {
    width: min(16rem, 72%);
  }

  .section {
    padding-top: 4.5rem;
  }

  .section-heading {
    display: block;
  }

  .section-heading p {
    margin-top: 0.6rem;
    text-align: left;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }
}

@media (max-width: 460px) {
  h1 {
    font-size: 3.35rem;
  }

}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
