:root {
  --ink: #2d2d2d;
  --muted: #68737f;
  --navy: #1c3a5a;
  --blue: #2980b9;
  --blue-dark: #1a5276;
  --blue-line: #3498db;
  --paper: #ffffff;
  --line: #e5edf3;
  --soft-blue: #f4f9fd;
  --accent: #c44737;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  background: linear-gradient(135deg, #f0f4f8 0%, #e8edf2 100%);
}

body {
  margin: 0;
  padding: 40px 22px;
  color: var(--ink);
  font-family: Optima, Candara, Calibri, "Trebuchet MS", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  text-align: left;
}

.site-shell {
  width: min(100%, 1068px);
  margin: 0 auto;
  padding: 34px 54px 30px;
  border-radius: 10px;
  background: var(--paper);
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.10), 0 1px 6px rgba(0, 0, 0, 0.06);
}

a,
a:visited {
  color: var(--blue);
  text-decoration: none;
  transition: color 0.18s ease;
}

a:hover,
a:focus-visible {
  color: var(--blue-dark);
  text-decoration: underline;
}

a:focus-visible,
.news-scroll:focus-visible {
  outline: 2px solid var(--blue-line);
  outline-offset: 3px;
}

p {
  margin: 0 0 12px;
}

strong {
  font-weight: 700;
}

/* Intro: broad text column and portrait, matching the reference layout. */
.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.72fr) minmax(220px, 0.72fr);
  gap: 50px;
  align-items: center;
  padding: 4px 10px 30px;
}

.intro-copy {
  min-width: 0;
}

h1 {
  margin: 0 0 4px;
  color: #111;
  font-size: clamp(28px, 3.3vw, 37px);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  letter-spacing: 0.1px;
}

.role {
  margin: 0 0 20px;
  color: #5b6570;
  font-size: 15px;
  text-align: center;
}

.contact {
  margin-top: 18px;
  color: #3c4650;
  font-size: 14px;
}

.collaboration-note {
  margin: 0;
  color: #52616d;
  font-size: 14px;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 13px;
  margin-top: 20px;
}

.profile-button,
.profile-button:visited {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #dce5ec;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(28, 58, 90, 0.08);
  color: var(--navy);
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.profile-button:hover,
.profile-button:focus-visible {
  transform: translateY(-2px) scale(1.04);
  border-color: #a9c9de;
  box-shadow: 0 5px 13px rgba(28, 58, 90, 0.15);
  color: var(--blue-dark);
  text-decoration: none;
}

.profile-button img {
  display: block;
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.email-button img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
}

.wechat-button img {
  width: 27px;
  height: 27px;
  filter: invert(53%) sepia(94%) saturate(557%) hue-rotate(73deg) brightness(93%) contrast(91%);
}

.portrait {
  width: min(100%, 230px);
  margin: 0 auto;
  text-align: center;
}

.portrait a {
  display: block;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portrait a:hover,
.portrait a:focus-visible {
  transform: scale(1.025);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
}

.portrait img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

/* Sections */
section {
  margin-top: 28px;
  padding: 0 10px;
}

h2 {
  margin: 0 0 14px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--blue-line);
  color: var(--navy);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.3px;
}

.heading-note {
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
}

.section-lead {
  margin: 0 0 8px;
  color: #56616b;
  font-size: 14px;
}

.scholar-badge-link {
  display: inline-flex;
  align-items: center;
  margin-left: 7px;
  vertical-align: -5px;
}

.scholar-badge {
  display: block;
  width: auto;
  height: 20px;
}

/* News */
.news-scroll {
  max-height: 212px;
  overflow-y: auto;
  padding: 11px 17px;
  border: 1px solid #d6e4f0;
  border-radius: 8px;
  background: linear-gradient(to bottom, #f8fbfe, #f0f7ff);
  scrollbar-color: #b0ccdf #f0f4f8;
  scrollbar-width: thin;
}

.news-scroll::-webkit-scrollbar {
  width: 5px;
}

.news-scroll::-webkit-scrollbar-track {
  border-radius: 4px;
  background: #f0f4f8;
}

.news-scroll::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background: #b0ccdf;
}

.news-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.news-list li {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  padding: 7px 0;
}

.news-list li + li {
  border-top: 1px solid rgba(214, 228, 240, 0.72);
}

.news-list time {
  color: var(--blue-dark);
  font-weight: 700;
  white-space: nowrap;
}

/* Publications: deliberately light, text-first rows. */
.publication-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.publication {
  padding: 13px 4px 14px;
  border-bottom: 1px solid var(--line);
}

.publication:last-child {
  border-bottom: 0;
}

.publication-heading {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 2px;
  line-height: 1.5;
}

.publication-heading > a {
  min-width: 0;
  font-size: 15px;
}

.publication p {
  margin: 1px 0;
  color: #333;
  font-size: 14px;
  line-height: 1.55;
}

.venue {
  flex: 0 0 auto;
  padding: 1px 7px;
  border-radius: 4px;
  background: #fff2ee;
  color: #a23d2d;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.venue.journal {
  background: #edf6fb;
  color: #24648a;
}

.award {
  color: var(--accent);
  font-weight: 700;
}

/* Experience */
.experience-list {
  display: grid;
}

.experience-item {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 15px;
  align-items: center;
  padding: 13px 4px;
  border-bottom: 1px solid var(--line);
}

.experience-item:last-child {
  border-bottom: 0;
}

.organization-logo {
  display: flex;
  width: 58px;
  height: 50px;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border: 1px solid #e6edf2;
  border-radius: 6px;
  background: #fff;
}

.organization-logo:hover,
.organization-logo:focus-visible {
  border-color: #bfd4e3;
}

.organization-logo img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.qwen-logo img {
  max-width: 36px;
  max-height: 36px;
}

.row-heading,
.row-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: baseline;
}

.row-heading {
  margin-bottom: 3px;
  font-size: 15px;
}

.row-heading > span,
.row-detail time {
  color: var(--muted);
  white-space: nowrap;
}

.row-detail {
  color: #4c5660;
  font-size: 14px;
}

/* Teaching and service */
.simple-list {
  margin: 4px 0 0;
  padding-left: 21px;
}

.simple-list li {
  padding: 5px 0;
}

.simple-list li span {
  float: right;
  margin-left: 20px;
  color: var(--muted);
  white-space: nowrap;
}

.service-list li {
  padding: 6px 0;
}

footer {
  margin-top: 36px;
  padding-top: 14px;
  border-top: 1px dashed #d0dbe5;
  color: #9aa5ae;
  font-size: 13px;
  text-align: center;
}

footer p {
  margin: 0;
}

@media (max-width: 760px) {
  body {
    padding: 0;
  }

  .site-shell {
    width: 100%;
    padding: 28px 22px 24px;
    border-radius: 0;
    box-shadow: none;
  }

  .intro {
    grid-template-columns: 1fr;
    gap: 27px;
    padding: 2px 4px 25px;
  }

  .intro-copy {
    display: contents;
  }

  .intro-copy h1,
  .intro-copy .role {
    grid-column: 1;
  }

  .portrait {
    grid-row: 3;
    width: min(68vw, 220px);
  }

  .intro-copy > p:not(.role),
  .profile-links {
    grid-column: 1;
  }

  .intro-copy > p:not(.role):first-of-type {
    margin-top: 0;
  }

  section {
    padding: 0 4px;
  }

  h2 {
    font-size: 22px;
  }

  .publication-heading {
    display: block;
  }

  .venue {
    display: table;
    margin-top: 5px;
  }

  .row-heading,
  .row-detail {
    grid-template-columns: 1fr;
    gap: 1px;
  }

  .row-heading > span,
  .row-detail time {
    white-space: normal;
  }
}

@media (max-width: 480px) {
  .site-shell {
    padding-right: 17px;
    padding-left: 17px;
  }

  .news-list li {
    grid-template-columns: 1fr;
    gap: 1px;
  }

  .experience-item {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 11px;
  }

  .organization-logo {
    width: 48px;
    height: 44px;
  }

  .simple-list li span {
    float: none;
    display: block;
    margin-left: 0;
  }
}

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

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