:root {
  --background: #fbf8ef;
  --surface: #f3eee1;
  --text: #252b2d;
  --muted: #657075;
  --line: #ddd8cc;
  --accent: #205d72;
  --accent-light: #e4eff2;
  --highlight: #ad2632;
  --highlight-light: #faeaec;
  --serif: "Literata", Georgia, serif;
  --sans: "IBM Plex Sans", sans-serif;
  --width: 940px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--background);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  color: #173f4d;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
  padding: 0.5rem 0.75rem;
  color: white;
  background: var(--accent);
  transform: translateY(-150%);
}

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

.site-header {
  border-top: 4px solid var(--accent);
  border-bottom: 1px solid var(--line);
  background: rgba(251, 248, 239, 0.96);
}

.header-inner,
.container,
.footer-inner {
  width: min(calc(100% - 2.5rem), var(--width));
  margin-inline: auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 2rem;
}

.site-name {
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
  text-decoration: none;
}

nav {
  display: flex;
  gap: 1.75rem;
}

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

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

.container {
  padding-block: 4.25rem 5rem;
}

.profile {
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr);
  gap: 3.25rem;
  align-items: start;
  padding-bottom: 4rem;
}

.portrait-column img {
  display: block;
  width: 138px;
  height: 138px;
  border: 1px solid var(--line);
  object-fit: cover;
  object-position: center center;
}

.profile-links {
  display: grid;
  gap: 0.25rem;
  margin-top: 1rem;
}

.profile-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: fit-content;
  color: var(--muted);
  font-size: 0.78rem;
  text-decoration: none;
}

.profile-links a:hover {
  color: var(--accent);
}

.profile-links a span {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.profile-links .email-link {
  font-size: 0.68rem;
  white-space: nowrap;
}

.link-icon {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1 {
  margin: -0.25rem 0 0;
  font-family: var(--serif);
  font-size: clamp(2.5rem, 6vw, 3.65rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.profile-copy h1 {
  margin-bottom: 1.15rem;
}

.chinese-name {
  font-family: var(--sans);
  font-size: 0.42em;
  font-weight: 500;
  letter-spacing: 0;
  white-space: nowrap;
  vertical-align: 0.14em;
}

.profile-copy > p:not(.scholar-stats) {
  max-width: 67ch;
  margin: 0 0 0.9rem;
  text-align: left;
  text-wrap: wrap;
  -webkit-hyphens: auto;
  hyphens: auto;
  hyphenate-character: "-";
  hyphenate-limit-chars: 6 3 3;
  overflow-wrap: normal;
  word-break: normal;
}

.profile-copy .bio-summary {
  text-wrap: balance;
}

.research-interests {
  margin-top: 1.4rem;
  padding: 0.8rem 1rem;
  border-left: 3px solid var(--accent);
  background: var(--accent-light);
}

.research-interests span {
  display: block;
  margin-bottom: 0.15rem;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.research-interests p {
  margin: 0;
  color: #28454e;
  font-size: 0.88rem;
  font-weight: 500;
}

.scholar-stats {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.scholar-stats strong {
  color: var(--text);
  font-weight: 600;
}

.content-section {
  display: grid;
  grid-template-columns: 155px minmax(0, 1fr);
  gap: 2.75rem;
  padding-block: 3.25rem;
  border-top: 1px solid var(--line);
  scroll-margin-top: 1rem;
}

.section-title h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.section-title > p {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.68rem;
}

.news-list {
  margin: -0.35rem 0 0;
  padding: 0;
  list-style: none;
}

.news-list li {
  display: grid;
  grid-template-columns: 5.25rem minmax(0, 1fr);
  gap: 1rem;
  padding: 0.45rem 0;
}

.news-list time {
  color: var(--muted);
  font-family: var(--serif);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.news-list p {
  margin: 0;
}

.publication-list {
  margin-top: -1.1rem;
}

.publication {
  display: grid;
  grid-template-columns: 150px 74px minmax(0, 1fr);
  gap: 1.1rem;
  align-items: start;
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.publication:first-child {
  border-top: 0;
}

.paper-figure {
  width: 150px;
  margin: 0;
  overflow: hidden;
  border-radius: 2px;
}

.paper-figure img {
  display: block;
  width: 100%;
  aspect-ratio: 12 / 7;
  object-fit: cover;
}

.pub-venue {
  padding-top: 0.2rem;
  text-align: left;
}

.pub-venue strong,
.pub-venue span {
  display: block;
}

.pub-venue strong {
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
}

.pub-venue span {
  margin-top: 0.05rem;
  color: var(--muted);
  font-size: 0.65rem;
  line-height: 1.35;
}

.pub-venue .pub-distinction {
  margin-top: 0.18rem;
  color: #7b527e;
  font-weight: 600;
}

.pub-details h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.03rem;
  font-weight: 600;
  line-height: 1.38;
}

.pub-details h3 a {
  color: var(--text);
  text-decoration: none;
}

.pub-details h3 a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.authors {
  margin: 0.35rem 0 0;
  color: #4d575b;
  font-size: 0.76rem;
  line-height: 1.5;
}

.authors b {
  color: var(--text);
  font-weight: 600;
}

.pub-note {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.68rem;
  vertical-align: middle;
}

.highlight-tag {
  padding: 0.08rem 0.38rem;
  border: 1px solid #efc9cd;
  border-radius: 2px;
  color: var(--highlight);
  background: var(--highlight-light);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.contributor-tag {
  padding: 0.08rem 0.38rem;
  border: 1px solid #d5d9d7;
  border-radius: 2px;
  color: #687370;
  background: #eff1ee;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.citation-tag {
  padding: 0.08rem 0.38rem;
  border: 1px solid #e7c988;
  border-radius: 2px;
  color: #8a5a07;
  background: #fff3d4;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.heading-with-icon {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.heading-icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.paper-link {
  display: inline-block;
  margin: 0.4rem 0 0 0.65rem;
  font-size: 0.68rem;
  font-weight: 500;
}

.paper-link::before {
  content: "[";
}

.paper-link::after {
  content: "]";
}

.compact-publication {
  padding-block: 1.25rem;
}

.all-publications {
  margin: 1.4rem 0 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.education-only .timeline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(4, auto);
  column-gap: 2.5rem;
  row-gap: 0;
}

.education-only .timeline li {
  grid-row: span 4;
  grid-template-rows: subgrid;
}

.internship-list {
  max-width: 650px;
}

.internship-list .internship-role {
  margin-top: 0.18rem;
  color: #3f494c;
  font-size: 0.82rem;
  font-weight: 500;
}

.internship-list .internship-location {
  margin-top: 0.1rem;
  color: var(--muted);
  font-size: 0.74rem;
}

.internship-list .internship-program {
  margin-top: 0.12rem;
  color: #5f6e72;
  font-size: 0.74rem;
  font-weight: 500;
}

.internship-list .timeline small {
  margin-top: 0.3rem;
  font-size: 0.7rem;
}

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  position: relative;
  display: grid;
  padding: 0 0 1.5rem 1rem;
  border-left: 1px solid var(--line);
}

.timeline li::before {
  content: "";
  position: absolute;
  top: 0.45rem;
  left: -4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--background);
  border: 1px solid var(--accent);
}

.timeline time,
.timeline strong,
.timeline span,
.timeline small {
  display: block;
}

.timeline time {
  margin-bottom: 0.15rem;
  color: var(--muted);
  font-size: 0.65rem;
  font-variant-numeric: tabular-nums;
}

.timeline strong {
  font-family: var(--serif);
  font-size: 0.94rem;
  font-weight: 600;
}

.timeline span {
  margin-top: 0.1rem;
  font-size: 0.74rem;
}

.timeline small {
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.65rem;
}

.supervisor-link {
  color: inherit;
  text-decoration-color: #aeb9bc;
}

.supervisor-link:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.75rem 2.5rem;
  color: var(--muted);
  font-size: 0.66rem;
}

.footer-inner p {
  margin: 0;
}

@media (max-width: 700px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.55rem;
    padding-block: 0.8rem;
  }

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

  .container {
    padding-top: 2.5rem;
  }

  .profile {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .portrait-column {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
  }

  .portrait-column img {
    width: 90px;
    height: 90px;
  }

  .profile-links {
    margin-top: 0;
    gap: 0.05rem;
  }

  .profile-links a {
    font-size: 0.67rem;
  }

  .profile-copy h1 {
    font-size: 2.45rem;
  }

  .profile-copy > p:not(.scholar-stats),
  .scholar-stats {
    grid-column: auto;
  }

  .content-section {
    grid-template-columns: 1fr;
    gap: 1.35rem;
  }

  .section-title h2 {
    font-size: 1.55rem;
  }

  .section-title > p {
    display: inline-block;
    margin-left: 0.5rem;
  }

  .publication-list {
    margin-top: 0;
  }

  .all-publications {
    margin-left: 0;
  }

}

@media (max-width: 520px) {
  body {
    font-size: 14px;
  }

  .header-inner,
  .container,
  .footer-inner {
    width: min(calc(100% - 1.75rem), var(--width));
  }

  nav a {
    font-size: 0.72rem;
  }

  .profile {
    padding-bottom: 2.75rem;
  }

  .profile-copy h1 {
    font-size: 2rem;
    margin-bottom: 0.85rem;
  }

  .research-interests {
    padding-inline: 0.8rem;
  }

  .news-list li {
    grid-template-columns: 4.3rem minmax(0, 1fr);
    gap: 0.65rem;
  }

  .publication {
    grid-template-columns: 102px minmax(0, 1fr);
    gap: 0.8rem;
  }

  .paper-figure {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 102px;
  }

  .pub-venue {
    grid-column: 2;
    display: block;
    text-align: left;
  }

  .pub-venue strong,
  .pub-venue span {
    display: block;
  }

  .pub-details {
    grid-column: 2;
  }

  .pub-details h3 {
    font-size: 0.96rem;
  }

  .all-publications {
    margin-left: 0;
  }

  .education-only .timeline {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    gap: 0;
  }

  .education-only .timeline li {
    grid-row: auto;
    grid-template-rows: none;
  }

  .footer-inner {
    flex-direction: column;
    gap: 0.1rem;
  }
}

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