:root {
  --bg: #0b1220;
  --panel: rgba(255, 255, 255, 0.055);
  --panel-strong: rgba(255, 255, 255, 0.09);
  --text: rgba(255, 255, 255, 0.9);
  --muted: rgba(255, 255, 255, 0.72);
  --faint: rgba(255, 255, 255, 0.58);
  --border: rgba(255, 255, 255, 0.12);
  --brand: #2563eb;
  --brand-2: #0ea5e9;
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.28);

  --radius: 18px;
  --radius-sm: 12px;
  --max: 1080px;
  --header-height: 74px;

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Microsoft YaHei",
    "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji";

  --font-serif: ui-serif, Georgia, Cambria, "Times New Roman",
    "Noto Serif CJK SC", "Songti SC", STSong, serif;
}

html[data-theme="light"] {
  --bg: #f6f7fb;
  --panel: rgba(10, 18, 32, 0.03);
  --panel-strong: rgba(10, 18, 32, 0.055);
  --text: rgba(10, 18, 32, 0.9);
  --muted: rgba(10, 18, 32, 0.7);
  --faint: rgba(10, 18, 32, 0.55);
  --border: rgba(10, 18, 32, 0.12);
  --shadow: 0 10px 28px rgba(10, 18, 32, 0.06);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding-top: var(--header-height);
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

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

a:hover {
  text-decoration: underline;
}

.container {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.skip {
  position: absolute;
  left: -999px;
  top: 12px;
  padding: 10px 12px;
  background: var(--panel-strong);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.skip:focus {
  left: 12px;
}

.top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  background: rgba(5, 10, 18, 0.55);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid var(--border);
}

html[data-theme="light"] .top {
  background: rgba(246, 247, 251, 0.85);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
}

.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.brand:hover {
  text-decoration: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
}

.nav a {
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  transition:
    color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.nav a:hover {
  background: var(--panel);
  color: var(--text);
}

.nav a.is-active {
  color: var(--text);
  background: var(--panel-strong);
  box-shadow: inset 0 0 0 1px var(--border);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  cursor: pointer;
}

.icon-btn:hover {
  background: var(--panel-strong);
}

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

.lang {
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.2px;
  color: var(--muted);
}

.hero {
  padding: 44px 0 10px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 22px;
  align-items: start;
}

.kicker {
  margin: 0 0 6px;
  color: var(--muted);
  font-weight: 600;
}

.title {
  margin: 0 0 10px;
  font-size: clamp(38px, 4vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.8px;
  font-family: var(--font-serif);
}

.subtitle {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 16px;
  max-width: 60ch;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  gap: 8px;
}

.btn:hover {
  background: var(--panel-strong);
  text-decoration: none;
}

.btn.primary {
  border-color: rgba(124, 58, 237, 0.35);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.25), rgba(56, 189, 248, 0.18));
}

.btn.ghost {
  background: transparent;
}

.meta {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  color: var(--faint);
  font-size: 14px;
}

.meta li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.meta-strong {
  color: var(--text);
  font-size: 17px;
  line-height: 1.5;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 10px 20px rgba(34, 197, 94, 0.2);
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-card-body {
  padding-top: 0;
}

.hero-card-title {
  margin: 0;
  font-weight: 800;
}

.hero-card-text {
  margin: 8px 0 12px;
  color: var(--muted);
}

.highlights {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.highlight {
  display: flex;
  gap: 10px;
  align-items: baseline;
  color: var(--muted);
  font-size: 14px;
}

.highlight::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  margin-top: 7px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  flex: none;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
  color: var(--muted);
}

.scholar-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.scholar-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease;
}

.scholar-link:hover {
  text-decoration: none;
  background: var(--panel-strong);
  border-color: color-mix(in srgb, var(--brand) 40%, var(--border));
  transform: translateY(-1px);
}

.profile-logo {
  width: 22px;
  height: 22px;
  display: block;
  flex: none;
}

.section {
  padding: 44px 0 8px;
  scroll-margin-top: calc(var(--header-height) + 18px);
}

.section-compact {
  padding-top: 24px;
}

.section-head {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.section-head h2,
.section-head h1 {
  margin: 0;
  font-size: 22px;
  font-family: var(--font-serif);
  letter-spacing: -0.2px;
}

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

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.stat-card {
  padding: 18px 20px;
}

.stat-label {
  margin: 0 0 10px;
  color: var(--faint);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stat-value {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
  font-family: var(--font-serif);
  color: var(--text);
}

.stat-fallback {
  font-size: 16px;
  color: var(--muted);
  font-family: var(--font);
}

.stat-note {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.stats-help-card {
  margin-top: 16px;
  padding: 18px 20px;
}

.service-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 14px;
}

.service-card {
  padding: 18px 20px;
}

.service-card-title {
  margin: 0 0 14px;
  font-size: 18px;
  font-family: var(--font-serif);
}

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

.service-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  line-height: 1.7;
}

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

.project-entries {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
}

.project-entry {
  padding: 0 0 18px;
  border-bottom: 1px solid var(--border);
}

.project-entry:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.project-entry-head {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 14px;
  align-items: start;
}

.project-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--faint);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
}

.project-entry-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.45;
  font-family: var(--font-serif);
  color: var(--text);
}

.project-entry-meta {
  margin: 8px 0 0 60px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.links {
  display: flex;
  gap: 12px;
  font-size: 14px;
}

.links a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.25);
}

html[data-theme="light"] .links a {
  border-bottom-color: rgba(10, 18, 32, 0.25);
}

.links a:hover {
  border-bottom-style: solid;
}

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

.pub-year {
  margin: 26px 0 12px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.04em;
  font-family: var(--font-serif);
  font-size: 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

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

.pub-item {
  padding: 14px 0;
  border-bottom: 1px dashed var(--border);
}

.pub-idx {
  color: var(--faint);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  margin-right: 8px;
}

.pub-citation {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

.pub-badge {
  display: inline-flex;
  align-items: center;
  margin-right: 8px;
  color: var(--brand);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.pub-author-strong {
  color: var(--text);
  font-weight: 800;
}

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

.timeline-item {
  padding: 16px 18px;
}

.timeline-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.timeline-item h3 {
  margin: 0;
  font-size: 16px;
}

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

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

.fine {
  margin: 12px 0 0;
  font-size: 13px;
}

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

.contact li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
}

.footer {
  padding: 40px 0 48px;
  color: var(--faint);
  text-align: center;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
}

@media (max-width: 920px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .service-grid {
    grid-template-columns: 1fr;
  }
  .nav a {
    display: none;
  }
  .project-entry-head {
    grid-template-columns: 38px 1fr;
    gap: 12px;
  }
  .project-entry-meta {
    margin-left: 50px;
  }
}
