:root {
  --primary: #0b3d91;
  --primary-dark: #082b66;
  --secondary: #2f80ed;
  --accent: #0f766e;
  --background: #ffffff;
  --surface: #f4f8fc;
  --surface-strong: #eaf2fb;
  --text: #1f2933;
  --muted: #52616b;
  --border: #d9e2ec;
  --shadow: 0 12px 28px rgba(11, 61, 145, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: "Inter", "Segoe UI", Arial, "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: 0;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

[hidden] {
  display: none !important;
}

a {
  color: var(--primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--secondary);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(47, 128, 237, 0.42);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.nav {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  color: var(--primary-dark);
  text-decoration: none;
  line-height: 1.15;
}

.brand strong {
  font-size: 1.05rem;
}

.brand span {
  color: var(--muted);
  font-size: 0.78rem;
}

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

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

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 6px;
  color: var(--text);
  font-size: 0.93rem;
  font-weight: 600;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--surface);
  color: var(--primary);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

.language-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--primary);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
}

.language-toggle:hover {
  border-color: var(--primary);
  background: var(--surface);
}

.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--primary-dark);
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--surface);
  background-image: url("../images/profile.webp");
  background-repeat: no-repeat;
  background-position: right center;
  background-size: auto 100%;
  border-bottom: 1px solid var(--border);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(244, 248, 252, 0.92) 0%,
    rgba(244, 248, 252, 0.72) 46%,
    rgba(244, 248, 252, 0.42) 100%
  );
  -webkit-backdrop-filter: blur(0.8px);
  backdrop-filter: blur(0.8px);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  color: var(--primary-dark);
  line-height: 1.2;
  margin: 0;
}

h1 {
  font-family: Georgia, "Times New Roman", "Microsoft YaHei", serif;
  font-size: 3rem;
}

h2 {
  font-size: 1.75rem;
}

h3 {
  font-size: 1.14rem;
}

.hero-subtitle {
  margin: 12px 0 0;
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 700;
}

.hero-subtitle span {
  display: block;
}

.hero-subtitle span + span {
  margin-top: 2px;
}

.keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.keywords li,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--primary-dark);
  font-size: 0.88rem;
  font-weight: 700;
}

.hero-text {
  max-width: 690px;
  margin: 22px 0 0;
  color: var(--text);
  font-size: 1.08rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--primary);
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.button:hover {
  background: var(--primary-dark);
  color: #fff;
}

.button.secondary {
  background: #fff;
  color: var(--primary);
}

.button.secondary:hover {
  background: var(--surface);
  color: var(--primary-dark);
}

.section {
  padding: 56px 0;
}

.section.compact {
  padding: 36px 0;
}

.section.surface {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.home-band {
  border-top: 1px solid rgba(217, 226, 236, 0.86);
}

.hero + .home-band {
  border-top: 0;
}

.home-band-education {
  background: #fff;
}

.home-band-research {
  background: #f4f8fc;
  border-bottom: 1px solid var(--border);
}

.home-band-stats {
  background: #eaf2fb;
  border-bottom: 1px solid var(--border);
}

.home-band-publications {
  background: #fbfdff;
}

.section-header {
  max-width: 820px;
  margin-bottom: 26px;
}

.section-header p {
  margin: 10px 0 0;
  color: var(--muted);
}

.education-list {
  display: grid;
  gap: 20px;
}

.education-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.education-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.education-main p {
  margin: 4px 0 0;
}

.education-school {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  color: var(--primary-dark);
  font-size: 1.04rem;
  font-style: normal;
}

.education-school a {
  color: var(--primary);
  font-style: normal;
}

.education-location {
  color: var(--muted);
  font-size: 0.95rem;
  font-style: normal;
}

.education-date {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  min-width: 0;
}

.card-body {
  padding: 20px;
}

.card h3 {
  margin-bottom: 8px;
}

.card h3 a {
  color: var(--primary-dark);
  text-decoration: none;
}

.card h3 a:hover {
  color: var(--secondary);
  text-decoration: underline;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stat {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.stat strong {
  display: block;
  color: var(--primary-dark);
  font-size: 1.4rem;
  line-height: 1.2;
}

.stat span {
  color: var(--muted);
  font-size: 0.9rem;
}

.page-hero {
  padding: 42px 0 36px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.page-hero h1 {
  max-width: 980px;
  font-family: "Inter", "Segoe UI", Arial, "Microsoft YaHei", sans-serif;
  font-size: 2rem;
  font-weight: 750;
  line-height: 1.32;
}

.page-hero .page-intro {
  max-width: 860px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 1.04rem;
}

.timeline {
  display: grid;
  gap: 18px;
}

.research-item {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  padding: 22px 0;
  border-top: 1px solid var(--border);
  scroll-margin-top: 88px;
}

.research-item:first-child {
  border-top: 0;
}

.research-item h2 {
  font-size: 1.32rem;
}

.research-item p {
  margin: 0;
  color: var(--muted);
}

.project-card {
  padding: 22px;
}

.project-meta {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 8px 14px;
  margin-top: 16px;
  font-size: 0.94rem;
}

.project-meta dt {
  color: var(--primary-dark);
  font-weight: 800;
}

.project-meta dd {
  margin: 0;
  color: var(--muted);
}

.award-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.award-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.award-date {
  color: var(--primary);
  font-weight: 900;
}

.award-card h2 {
  font-size: 1.16rem;
}

.award-card p {
  margin: 6px 0 0;
  color: var(--muted);
}

.publication-group {
  margin-top: 28px;
}

.publication-controls {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) repeat(2, minmax(150px, 210px));
  gap: 14px;
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.publication-control {
  display: grid;
  gap: 6px;
  color: var(--primary-dark);
  font-size: 0.86rem;
  font-weight: 800;
}

.publication-control input,
.publication-control select {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 500;
}

.publication-results {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.publication-empty {
  display: none;
  margin: 24px 0 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
}

.publication-empty.visible {
  display: block;
}

.publication-group h2 {
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
  font-size: 1.34rem;
}

.publication-list {
  display: grid;
  gap: 16px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.publication {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  scroll-margin-top: 88px;
}

.publication:not(:has(.pub-thumb)) {
  grid-template-columns: minmax(0, 1fr);
}

.publication:target {
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(47, 128, 237, 0.14);
}

.publication.selected {
  border-color: rgba(47, 128, 237, 0.5);
  background: #fbfdff;
}

.publication h3 {
  color: var(--text);
  font-size: 1.02rem;
}

.publication .authors,
.publication .journal {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.publication .actions {
  margin-top: 8px;
}

.pub-thumb {
  align-self: start;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface);
}

.pub-thumb img {
  width: 100%;
  height: 140px;
  aspect-ratio: auto;
  object-fit: contain;
  background: #fff;
}

details.bibtex {
  margin-top: 10px;
}

details.bibtex summary {
  width: fit-content;
  min-height: 32px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--primary);
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
}

details.bibtex pre {
  overflow-x: auto;
  margin: 10px 0 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.45;
}

.copy-bibtex {
  min-height: 32px;
  margin-top: 8px;
  padding: 4px 10px;
  border: 1px solid var(--primary);
  border-radius: 6px;
  background: #fff;
  color: var(--primary);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
}

.copy-bibtex:hover {
  background: var(--surface);
}

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

.figure-card {
  overflow: hidden;
}

.figure-card img {
  width: 100%;
  height: 210px;
  aspect-ratio: auto;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
}

.figure-card a {
  display: block;
  min-width: 0;
  overflow: hidden;
}

.figure-card h3 a {
  color: var(--primary-dark);
  text-decoration: none;
}

.figure-card h3 a:hover {
  color: var(--secondary);
  text-decoration: underline;
}

.research-figure img,
.paper-page img {
  background: #fff;
  object-fit: contain;
}

.home-band-publications .figure-card img {
  height: 180px;
}

.home-band-publications .card-body {
  padding: 16px 18px 18px;
}

.figure-set {
  display: grid;
  gap: 1px;
  background: var(--border);
  border-bottom: 1px solid var(--border);
  min-width: 0;
}

.figure-set.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.figure-set.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.figure-set img {
  border-bottom: 0;
}

.figure-set a,
.figure-set img {
  min-width: 0;
}

.paper-page img {
  object-position: top center;
}

.contact-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.contact-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.contact-row dt {
  color: var(--primary-dark);
  font-weight: 800;
}

.contact-row dd {
  margin: 0;
  color: var(--muted);
}

.guestbook-panel {
  padding: 22px;
}

.guestbook-panel p {
  max-width: 780px;
}

.comment-box {
  margin-top: 22px;
  min-height: 260px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

.site-footer {
  padding: 28px 0;
  border-top: 1px solid var(--border);
  background: var(--primary-dark);
  color: #fff;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer-main {
  display: grid;
  gap: 6px;
}

.site-footer p {
  margin: 0;
}

.visitor-counter {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.88rem;
}

.visitor-counter strong {
  color: #fff;
  font-weight: 800;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links a {
  color: #fff;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 100;
  padding: 8px 12px;
  background: #fff;
  color: var(--primary);
}

.skip-link:focus {
  left: 8px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1040px) {
  .nav {
    min-height: 60px;
  }

  .nav-right {
    gap: 8px;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 62px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    justify-content: flex-start;
  }
}

@media (max-width: 860px) {
  .hero {
    min-height: 520px;
    background-position: right bottom;
    background-size: auto 80%;
  }

  .hero::before {
    background: linear-gradient(
      90deg,
      rgba(244, 248, 252, 0.94) 0%,
      rgba(244, 248, 252, 0.78) 58%,
      rgba(244, 248, 252, 0.56) 100%
    );
    -webkit-backdrop-filter: blur(1px);
    backdrop-filter: blur(1px);
  }

  h1 {
    font-size: 2.35rem;
  }

  .hero-subtitle {
    font-size: 1.08rem;
  }

  .grid.two,
  .grid.three,
  .grid.four,
  .stats,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .figure-set.two,
  .figure-set.three {
    grid-template-columns: 1fr;
  }

  .research-item,
  .award-card,
  .education-item {
    grid-template-columns: 1fr;
  }

  .education-date {
    white-space: normal;
  }

  .pub-thumb {
    width: 112px;
    max-width: 100%;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .publication-controls {
    grid-template-columns: 1fr 1fr;
  }

  .publication-control.search-control {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 15px;
  }

  .container,
  .nav {
    width: min(100% - 24px, 1120px);
  }

  .hero-content {
    width: min(100% - 24px, 760px);
    padding: 44px 0 250px;
  }

  .hero {
    min-height: 0;
    background-position: center bottom;
    background-size: auto 44%;
  }

  .hero::before {
    background: linear-gradient(
      180deg,
      rgba(244, 248, 252, 0.97) 0%,
      rgba(244, 248, 252, 0.93) 52%,
      rgba(244, 248, 252, 0.72) 72%,
      rgba(244, 248, 252, 0.38) 100%
    );
    -webkit-backdrop-filter: blur(0.8px);
    backdrop-filter: blur(0.8px);
  }

  h1 {
    font-size: 1.86rem;
  }

  .page-hero h1,
  .page-hero .page-intro,
  .card-body h3 {
    overflow-wrap: break-word;
  }

  .page-hero {
    padding: 34px 0 30px;
  }

  .page-hero h1 {
    font-size: 1.55rem;
    line-height: 1.35;
  }

  .actions {
    flex-direction: column;
  }

  .hero .actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero .actions .button:first-child {
    grid-column: 1 / -1;
  }

  .button {
    width: 100%;
  }

  .publication-controls {
    grid-template-columns: 1fr;
  }

  .publication {
    grid-template-columns: minmax(0, 1fr) 88px;
    gap: 10px;
    padding: 12px;
  }

  .publication:not(:has(.pub-thumb)) {
    grid-template-columns: minmax(0, 1fr);
  }

  .pub-thumb {
    width: 88px;
  }

  .pub-thumb img {
    height: 110px;
  }

  .home-band-publications .figure-card img {
    height: 170px;
  }

  .publication-control.search-control {
    grid-column: auto;
  }

  .section {
    padding: 42px 0;
  }

  .contact-row,
  .project-meta {
    grid-template-columns: 1fr;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
