/* ==========================================================================
   2026-11 visual polish
   Loaded after main.css; keep changes here so the theme stays upgradeable.
   ========================================================================== */

:root {
  --ink: #1f2933;
  --muted: #5f6b76;
  --accent: #1f4e79;
  --accent-dark: #123553;
  --accent-soft: #eaf1f8;
  --line: #e4e8ec;
  --line-soft: #eef1f4;
  --content-width: 820px;
  --badge-a: #1f4e79;
  --badge-b: #2f6f6a;
  --badge-c: #6b7280;
  --badge-top: #6b4fa0;
}

html {
  font-size: 16px;
}

body,
h1, h2, h3, h4, h5, h6,
.greedy-nav a,
.masthead__inner-wrap,
.author__name,
.author__bio,
.author__urls,
.page__content,
.site-footer {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

body {
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

::selection {
  color: #fff;
  background: var(--accent);
}

@media (min-width: 80em) {
  #main,
  .masthead__inner-wrap {
    max-width: 1120px;
  }
}

/* --------------------------------------------------------------------------
   Masthead / navigation
   -------------------------------------------------------------------------- */

.masthead {
  border-bottom: 1px solid var(--line);
}

.masthead__inner-wrap {
  padding-top: 0.65em;
  padding-bottom: 0.55em;
}

.greedy-nav {
  min-width: 0;
  background: transparent;
}

.greedy-nav a {
  margin: 0 0.85rem;
  padding: 0.35rem 0;
  color: #4a5560;
  font-size: 0.95rem;
  font-weight: 500;
}

.greedy-nav .visible-links li:first-child {
  font-weight: 500;
}

.greedy-nav .visible-links li:first-child a {
  margin-left: 0;
}

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

.greedy-nav .visible-links a:before {
  height: 2px;
  background: var(--accent);
}

.greedy-nav button {
  display: none;
}

@media (max-width: 56em) {
  .masthead__inner-wrap {
    padding-top: 0.5em;
    padding-bottom: 0.35em;
  }

  .greedy-nav .visible-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    row-gap: 0;
  }

  .greedy-nav .visible-links li {
    display: block;
  }

  .masthead__menu-item {
    white-space: normal;
  }

  .greedy-nav a {
    margin: 0 0.55rem 0 0;
    padding: 0.25rem 0;
    font-size: 0.85rem;
  }
}

@media (max-width: 34em) {
  .greedy-nav a {
    margin-right: 0.5rem;
    font-size: 0.8rem;
  }
}

/* --------------------------------------------------------------------------
   Sidebar / profile
   -------------------------------------------------------------------------- */

.author__name {
  color: var(--ink);
  font-size: 1.1em;
  letter-spacing: -0.01em;
  word-break: keep-all;
}

.author__affiliation {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  margin: 0.15em 0 0.85em;
  text-align: left;
}

.sidebar .author__affiliation-logo {
  flex: 0 0 auto;
  width: 68px;
  height: 68px;
  max-width: 68px;
  object-fit: contain;
}

.author__affiliation-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.author__role {
  color: var(--ink);
  font-size: 0.82em;
  font-weight: 600;
  line-height: 1.35;
}

.author__org {
  color: var(--muted);
  font-size: 0.8em;
  line-height: 1.35;
}

@media (min-width: 57.8125em) {
  .sidebar .author__avatar {
    display: flex;
    justify-content: center;
  }

  .sidebar .author__avatar img {
    margin: 0 auto;
  }

  .sidebar .author__content {
    text-align: center;
  }

  .sidebar .author__name {
    text-align: center;
  }

  .author__affiliation,
  .author__affiliation-text {
    align-items: center;
    text-align: center;
  }

  .author__role,
  .author__org {
    text-align: center;
  }
}

.author__bio {
  color: var(--muted);
}

.author__urls a {
  color: #4a5560;
}

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

/* --------------------------------------------------------------------------
   Page content
   -------------------------------------------------------------------------- */

.page__content > * {
  max-width: var(--content-width);
}

.page__content h1 {
  margin-top: 1.7em;
  margin-bottom: 0.55em;
  padding-bottom: 0.45em;
  border-bottom: 1px solid var(--line-soft);
  letter-spacing: -0.01em;
}

.page__content > p {
  text-align: justify;
  text-align-last: left;
}

.page__content p,
.page__content li {
  line-height: 1.7;
}

.page__content a {
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Honors and awards
   -------------------------------------------------------------------------- */

.award-list {
  margin: 0.8em 0 1.5em;
}

.award-item {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 8px 0 9px;
  border-bottom: 1px solid var(--line-soft);
}

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

.award-year {
  padding-top: 1px;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.award-title {
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.4;
}

.award-cn {
  color: var(--muted);
  font-size: 0.92em;
  font-weight: 400;
}

.award-meta {
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.award-note {
  color: #74808b;
}

.award-note::before {
  content: " · ";
  color: #b9c1ca;
}

@media (max-width: 48em) {
  .award-item {
    grid-template-columns: 1fr;
    gap: 2px;
    padding: 8px 0 9px;
  }

  .award-year {
    padding-top: 0;
    font-size: 0.72rem;
  }
}

/* --------------------------------------------------------------------------
   Education
   -------------------------------------------------------------------------- */

.edu-list {
  margin: 1.1em 0 2em;
}

.edu-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 15px 0 16px;
  border-bottom: 1px solid var(--line-soft);
}

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

.edu-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  padding: 7px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

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

.edu-degree {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.5;
}

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

.edu-school {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.edu-rank {
  display: inline-block;
  margin-left: 6px;
  padding: 0 0.45em;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.7;
  background: var(--accent-soft);
  border: 1px solid #d5e2ef;
  border-radius: 999px;
  vertical-align: 1px;
}

@media (max-width: 48em) {
  .edu-item {
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 13px;
  }

  .edu-logo {
    width: 50px;
    height: 50px;
    padding: 5px;
  }

  .edu-degree {
    font-size: 0.95rem;
  }
}

/* --------------------------------------------------------------------------
   Research interests
   -------------------------------------------------------------------------- */

.interest-list {
  margin: 1.1em 0 2em;
}

.interest-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 13px 0 15px;
  border-bottom: 1px solid var(--line-soft);
}

.interest-row:last-child {
  border-bottom: 0;
}

.interest-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding-top: 3px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.015em;
}

.interest-title::before {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--accent);
}

.interest-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.interest-tag {
  display: inline-block;
  padding: 3px 10px;
  color: #3f4b56;
  font-size: 0.8rem;
  line-height: 1.5;
  background: #fff;
  border: 1px solid #dfe5eb;
  border-radius: 999px;
}

@media (max-width: 48em) {
  .interest-list {
    margin: 1em 0 1.6em;
  }

  .interest-row {
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 13px 0;
  }

  .interest-title {
    padding-top: 0;
  }
}

/* --------------------------------------------------------------------------
   Publications
   -------------------------------------------------------------------------- */

.pub-group-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5em;
  row-gap: 3px;
  margin: 1.6em 0 0.15em;
  padding-bottom: 0.35em;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 700;
  border-bottom: 1px solid var(--line-soft);
}

.pub-group-title::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--accent);
}

.pub-count {
  margin-left: auto;
  padding: 1px 9px;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.7;
  letter-spacing: 0.01em;
  white-space: nowrap;
  background: var(--accent);
  border-radius: 999px;
}

.pub-collapsible {
  margin: 0;
}

.pub-collapsible > summary {
  display: block;
  margin: 0;
  list-style: none;
  cursor: pointer;
}

.pub-collapsible > summary::-webkit-details-marker {
  display: none;
}

.pub-collapsible > summary:hover .pub-group-title {
  color: var(--accent);
}

.pub-collapsible > summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

.pub-toggle-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 6px;
  padding: 1px 9px;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
  background: #fff;
  border: 1px solid #cfdeeb;
  border-radius: 999px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.pub-toggle-text::after {
  content: "Show";
}

.pub-collapsible[open] .pub-toggle-text::after {
  content: "Hide";
}

.pub-toggle {
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.pub-collapsible[open] .pub-toggle {
  transform: rotate(-135deg);
}

.pub-collapsible > summary:hover .pub-toggle-wrap {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.pub-group-other::before {
  background: #9aa5b1;
}

.pub-note {
  color: var(--muted);
  font-size: 0.78em;
  font-weight: 400;
}

.pub-list {
  margin: 0 0 1.8em;
  padding: 0;
  list-style: none;
}

.pub-list li {
  margin: 0;
}

.pub-item {
  margin: 0;
  padding: 1.05em 0 1.15em;
  border-bottom: 1px solid var(--line-soft);
}

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

.pub-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4em;
  margin-bottom: 0.15em;
}

.pub-venue-tag {
  display: inline-block;
  padding: 0.08em 0.6em;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: 0.01em;
  border-radius: 4px;
  background: var(--accent);
}

.pub-ccf {
  display: inline-block;
  padding: 0.02em 0.5em;
  color: var(--badge-c);
  font-size: 0.63rem;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.02em;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: #fff;
}

.pub-ccf-a {
  color: var(--badge-a);
}

.pub-ccf-b {
  color: var(--badge-b);
}

.pub-ccf-c {
  color: var(--badge-c);
}

.pub-ccf-top {
  color: var(--badge-top);
}

.pub-if {
  display: inline-block;
  padding: 0.02em 0.5em;
  color: #7a5500;
  font-size: 0.63rem;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.01em;
  border: 1px solid #e2bd62;
  border-radius: 999px;
  background: #fff7e6;
}

.pub-title {
  margin: 0 0 0.2em;
  color: var(--ink);
  font-size: 1.01rem;
  font-weight: 650;
  line-height: 1.45;
}

.pub-authors {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.pub-authors strong {
  color: var(--ink);
  font-weight: 650;
}

.pub-meta {
  margin-top: 0.15em;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

.pub-meta em {
  color: #46525e;
  font-weight: 500;
}

.pub-meta a {
  display: inline-block;
  margin: 0 0.25em 0.15em 0.2em;
  padding: 0.02em 0.55em;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.7;
  text-decoration: none;
  border: 1px solid #cfd8e3;
  border-radius: 999px;
  background: #fff;
}

.pub-meta a:hover {
  color: var(--accent-dark);
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* --------------------------------------------------------------------------
   Footer and small fixes
   -------------------------------------------------------------------------- */

.site-footer {
  margin-top: 3.5em;
  padding: 1.2em 0 2em;
  color: var(--muted);
  font-size: 0.78rem;
  border-top: 1px solid var(--line);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.4em 1.5em;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1em;
}

#MathJax_Message {
  display: none !important;
}

@media (max-width: 56em) {
  .page__content > p {
    text-align: left !important;
  }

  .pub-title {
    font-size: 0.98rem;
  }
}
