:root {
  color-scheme: light dark;
  --bg: #f6f8f7;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.78);
  --surface-nav: rgba(255, 255, 255, 0.72);
  --surface-muted: #eef4f1;
  --text: #17211d;
  --muted: #63716b;
  --soft: #8b9892;
  --line: #dce5e1;
  --line-soft: rgba(220, 229, 225, 0.9);
  --primary: #096148;
  --primary-2: #24936e;
  --accent: #f78736;
  --shadow: 0 18px 50px rgba(18, 39, 31, 0.1);
  --soft-shadow: 0 10px 28px rgba(18, 39, 31, 0.08);
  --lift-shadow: 0 24px 54px rgba(18, 39, 31, 0.16), 0 8px 18px rgba(18, 39, 31, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111315;
  --surface: #1b1e22;
  --surface-glass: rgba(30, 34, 38, 0.86);
  --surface-nav: rgba(30, 34, 38, 0.82);
  --surface-muted: #252a2f;
  --text: #f1f3f4;
  --muted: #b7bec4;
  --soft: #8d969e;
  --line: #333941;
  --line-soft: rgba(72, 80, 88, 0.82);
  --primary: #096148;
  --primary-2: #24936e;
  --accent: #f78736;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.42);
  --soft-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
  --lift-shadow: 0 28px 62px rgba(0, 0, 0, 0.58), 0 10px 22px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(36, 147, 110, 0.13), transparent 28rem),
    radial-gradient(circle at 88% 18%, rgba(247, 135, 54, 0.13), transparent 26rem),
    var(--bg);
}

:root[data-theme="dark"] body {
  background:
    radial-gradient(circle at 12% 8%, rgba(126, 217, 192, 0.07), transparent 28rem),
    radial-gradient(circle at 88% 18%, rgba(240, 161, 95, 0.08), transparent 26rem),
    var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.site-header,
main,
.site-footer {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 76px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--surface-nav);
  backdrop-filter: blur(16px);
}

.site-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1;
}

.site-nav a:hover {
  color: var(--primary);
  background: var(--surface-muted);
}

.theme-toggle {
  position: relative;
  width: 44px;
  height: 28px;
  margin-left: 2px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--surface-nav);
  cursor: pointer;
  transition: 0.22s ease;
}

.theme-toggle:hover {
  box-shadow: var(--soft-shadow);
  transform: scale(1.04);
}

.theme-toggle-icon {
  position: absolute;
  top: 50%;
  left: 5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 2px 8px rgba(9, 97, 72, 0.24);
  transform: translateY(-50%);
  transition: 0.22s ease;
}

:root[data-theme="dark"] .theme-toggle-icon {
  left: 19px;
  background: var(--accent);
  box-shadow: 0 2px 10px rgba(240, 161, 95, 0.28);
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-items: center;
  gap: 0;
  min-height: calc(100vh - 140px);
  padding: 44px 0 54px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.profile-card {
  position: relative;
  width: min(560px, 100%);
  margin: 0 auto;
  padding: 34px 40px;
  border: 1px solid var(--line-soft);
  border-radius: 24px;
  background: var(--surface-glass);
  box-shadow: var(--shadow);
  text-align: center;
  transition: 0.24s ease;
}

.publication-item:hover,
.tool-card:hover {
  border-color: color-mix(in srgb, var(--primary) 42%, var(--line-soft));
  box-shadow: var(--lift-shadow);
  transform: scale(1.018);
}

.profile-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 104px;
  content: "";
  border-radius: 24px 24px 0 0;
  background: linear-gradient(135deg, rgba(9, 97, 72, 0.12), rgba(247, 135, 54, 0.14));
}

:root[data-theme="dark"] .profile-card::before {
  background: linear-gradient(135deg, rgba(126, 217, 192, 0.08), rgba(240, 161, 95, 0.08));
}

.avatar {
  position: relative;
  width: 142px;
  height: 142px;
  border: 7px solid var(--surface);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--soft-shadow);
  transition: 0.24s ease;
}

.avatar:hover {
  box-shadow: var(--lift-shadow);
  transform: scale(1.04);
}

.profile-name {
  margin-top: 14px;
  font-size: 1.65rem;
  font-weight: 850;
}

.profile-title {
  margin-top: 6px;
  color: var(--muted);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.tag-list span {
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--primary);
  background: var(--surface-muted);
  font-size: 0.88rem;
  font-weight: 700;
  transition: 0.22s ease;
}

.tag-list span:hover {
  box-shadow: var(--soft-shadow);
  transform: scale(1.05);
}

.profile-intro {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.75;
}

.profile-contact {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.profile-contact a,
.wechat-item button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  cursor: pointer;
  transition: 0.24s ease;
}

.profile-contact > a {
  grid-column: auto;
}

.profile-contact .qr-contact {
  grid-row: 2;
}

.profile-contact .qr-contact:nth-last-child(2) {
  grid-column: 1;
}

.profile-contact .qr-contact:last-child {
  grid-column: 2;
}

.profile-contact .qr-contact button {
  width: 100%;
}

.profile-contact a:hover,
.wechat-item button:hover {
  color: var(--primary);
  border-color: rgba(9, 97, 72, 0.25);
  box-shadow: var(--soft-shadow);
  transform: scale(1.035);
}

.contact-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #fff;
  background: var(--primary);
  font-size: 0.72rem;
  font-weight: 850;
}

.wechat-item {
  position: relative;
}

.wechat-item img {
  position: absolute;
  left: 50%;
  bottom: -12px;
  z-index: 5;
  width: 132px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 100%) scale(0.96);
  transition: 0.2s ease;
}

.wechat-item:hover img,
.wechat-item:focus-within img {
  opacity: 1;
  transform: translate(-50%, 100%) scale(1);
}

.publications-section,
.tools-section {
  padding: 56px 0 72px;
  border-top: 1px solid var(--line);
}

.publications-section {
  padding-bottom: 48px;
}

.section-heading {
  max-width: 680px;
  margin-bottom: 30px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.08;
}

.section-heading p:last-child {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
}

.inline-link {
  color: var(--primary);
  font-weight: 750;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.publication-list {
  display: grid;
  gap: 12px;
}

.publication-item {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: var(--surface-glass);
  box-shadow: 0 6px 20px rgba(18, 39, 31, 0.05);
  transition: 0.24s ease;
}

.publication-year {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 36px;
  border-radius: 999px;
  color: #fff;
  background: var(--primary);
  font-size: 0.88rem;
  font-weight: 850;
}

.publication-body {
  min-width: 0;
}

.publication-body h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.02rem;
  line-height: 1.5;
}

.publication-body p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.publication-body a {
  display: inline-flex;
  margin-top: 10px;
  color: var(--primary);
  font-size: 0.88rem;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.publication-body a:hover {
  color: var(--primary-2);
}

.tool-group {
  margin-top: 30px;
}

.tools-message {
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  color: var(--muted);
  background: var(--surface-glass);
}

.tool-group h3 {
  margin: 0 0 14px;
  font-size: 1.08rem;
}

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

.tool-card {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 76px;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: var(--surface-glass);
  box-shadow: 0 6px 20px rgba(18, 39, 31, 0.05);
  transition: 0.22s ease;
}

.tool-card:hover {
  color: var(--primary);
}

.tool-icon {
  display: inline-flex;
  flex: 0 0 38px;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  font-size: 0.76rem;
  font-weight: 850;
}

.tool-card span:last-child {
  min-width: 0;
}

.tool-card strong,
.tool-card em {
  display: block;
}

.tool-card strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.94rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-card em {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.8rem;
  font-style: normal;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding: 30px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--soft);
  font-size: 0.9rem;
}

@media (max-width: 880px) {
  .hero {
    min-height: auto;
    padding-top: 28px;
  }

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

@media (max-width: 620px) {
  .site-header,
  main,
  .site-footer {
    width: min(100% - 28px, 1120px);
  }

  .site-header {
    align-items: stretch;
    display: flex;
    flex-direction: column;
    padding: 18px 0;
  }

  .site-nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
  }

  .theme-toggle {
    flex: 0 0 44px;
  }

  .site-nav a {
    flex: 1;
    padding-right: 8px;
    padding-left: 8px;
    text-align: center;
  }

  .hero {
    gap: 28px;
    padding-bottom: 38px;
  }

  .profile-card {
    padding: 24px 18px;
    border-radius: 20px;
  }

  .profile-card::before {
    border-radius: 20px 20px 0 0;
  }

  .profile-contact {
    align-items: stretch;
    grid-template-columns: 1fr;
    border-radius: 0;
  }

  .profile-contact > a,
  .profile-contact .qr-contact,
  .profile-contact .qr-contact:nth-last-child(2),
  .profile-contact .qr-contact:last-child {
    grid-column: auto;
    grid-row: auto;
  }

  .profile-contact a,
  .wechat-item button {
    width: 100%;
  }

  .tool-grid {
    grid-template-columns: 1fr;
  }

  .publication-item {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .publication-year {
    width: fit-content;
    padding: 0 14px;
  }

  .tool-card {
    min-height: 74px;
  }
}
