:root {
  --bg: #f6f7fb;
  --bg-alt: #eef1f7;
  --surface: #ffffff;
  --text: #1d2433;
  --muted: #5d677a;
  --line: #dde3ee;
  --primary: #1f4fa3;
  --primary-strong: #173d80;
  --shadow: 0 10px 30px rgba(20, 33, 61, 0.08);
  --radius: 18px;
  --maxw: 1120px;
}

html[data-theme="dark"] {
  --bg: #0f141c;
  --bg-alt: #151c27;
  --surface: #1a2330;
  --text: #edf2ff;
  --muted: #aeb8cc;
  --line: #2c384b;
  --primary: #82aaff;
  --primary-strong: #a5c1ff;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font: 16px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code {
  background: rgba(127, 127, 127, 0.12);
  padding: 0.12em 0.35em;
  border-radius: 6px;
  font-size: 0.95em;
}

.container {
  width: min(calc(100% - 32px), var(--maxw));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--line);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 18px;
}

.brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
}

.nav {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.nav a,
.theme-toggle {
  color: var(--muted);
  font-size: 0.96rem;
}

.nav a.active,
.nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.lang-switch {
  padding: 0.36rem 0.72rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.theme-toggle {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 0.36rem 0.7rem;
  cursor: pointer;
}

.hero {
  padding: 72px 0 42px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 28px;
  align-items: center;
}

.eyebrow {
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0 0 10px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1.05;
}

.subtitle {
  margin: 14px 0 12px;
  font-size: 1.15rem;
  color: var(--muted);
}

.lead {
  font-size: 1.08rem;
  max-width: 720px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.btn {
  display: inline-block;
  padding: 0.82rem 1.08rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.hero-card,
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.profile-card {
  padding: 24px;
}

.avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.35rem;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  margin-bottom: 16px;
}

.info-list,
.clean-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.info-list li {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.info-list li:last-child {
  border-bottom: 0;
}

.info-list strong {
  color: var(--muted);
  font-weight: 600;
}

.info-list.large li {
  padding: 12px 0;
}

.section {
  padding: 26px 0 48px;
}

.section.alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading h2,
.page-header h1 {
  margin: 0;
  font-size: 2rem;
}

.section-heading p,
.page-header p,
.muted,
.pub-meta {
  color: var(--muted);
}

.card {
  padding: 24px;
}

.prose p:last-child {
  margin-bottom: 0;
}

.grid {
  display: grid;
  gap: 20px;
}

.cards-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cards-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-card h3,
.pub-item h3 {
  margin-top: 0;
}

.two-col {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
}

.quick-links {
  display: grid;
  gap: 10px;
}

.quick-links a {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: rgba(127,127,127,0.04);
}

.clean-list li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
}

.clean-list li:last-child {
  border-bottom: 0;
}

.page {
  padding: 42px 0 56px;
}

.page-header {
  margin-bottom: 22px;
}

.pub-group {
  margin: 26px 0;
}

.pub-group h2 {
  margin: 0 0 14px;
}

.pub-item {
  margin-bottom: 14px;
}

.tag-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.tag-list span {
  display: inline-block;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(127,127,127,0.05);
}

.mt-24 {
  margin-top: 24px;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 22px 0;
  margin-top: 20px;
}

.footer-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .hero-grid,
  .two-col,
  .cards-2,
  .cards-3 {
    grid-template-columns: 1fr;
  }

  .nav-wrap {
    align-items: flex-start;
    padding: 12px 0;
  }

  .nav {
    justify-content: flex-start;
  }

  .hero {
    padding-top: 48px;
  }
}