:root {
  --bg: #0f172a;
  --bg-accent: #172554;
  --surface: rgba(15, 23, 42, 0.72);
  --surface-strong: rgba(30, 41, 59, 0.86);
  --surface-soft: rgba(51, 65, 85, 0.28);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.18);
  --brand: #38bdf8;
  --brand-strong: #0ea5e9;
  --accent: #22c55e;
  --danger: #fb7185;
  --shadow: 0 20px 40px rgba(2, 6, 23, 0.28);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --content-width: 1120px;
}

.day-mode {
  --bg: #f8fafc;
  --bg-accent: #dbeafe;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: rgba(255, 255, 255, 0.98);
  --surface-soft: rgba(148, 163, 184, 0.12);
  --text: #0f172a;
  --muted: #475569;
  --line: rgba(15, 23, 42, 0.1);
  --brand: #0284c7;
  --brand-strong: #0369a1;
  --accent: #16a34a;
  --danger: #e11d48;
  --shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.16), transparent 30%),
    radial-gradient(circle at top right, rgba(34, 197, 94, 0.12), transparent 26%),
    linear-gradient(160deg, var(--bg) 0%, var(--bg-accent) 100%);
  min-height: 100vh;
  transition: background 0.3s ease, color 0.3s ease;
}

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

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

.theme-toggle {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 1001;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, background 0.2s ease;
}

.theme-toggle:hover {
  transform: translateY(-1px) scale(1.03);
  background: var(--surface-strong);
}

.page-shell {
  width: min(calc(100% - 32px), var(--content-width));
  margin: 0 auto;
  padding: 88px 0 56px;
}

.site-header {
  position: sticky;
  top: 16px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
}

.brand-mark {
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.14);
  font-size: 0.95rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--text);
  background: var(--surface-soft);
}

.nav-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 1.25rem;
  cursor: pointer;
}

.hero,
.section {
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.hero {
  padding: 34px;
  border-radius: var(--radius-xl);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 24px;
  align-items: end;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.14);
  color: var(--brand);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  margin-top: 18px;
  font-size: clamp(2.3rem, 4vw, 4.3rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero p {
  margin-top: 16px;
  max-width: 720px;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--text);
  font-weight: 600;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
  border-color: rgba(56, 189, 248, 0.45);
}

.button.primary {
  background: linear-gradient(135deg, var(--brand-strong), var(--brand));
  color: white;
  border-color: transparent;
}

.stats-grid,
.cards-grid,
.two-column,
.gallery-grid {
  display: grid;
  gap: 16px;
}

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

.hero-side {
  display: grid;
  gap: 16px;
}

.profile-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 18px;
  align-items: center;
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface-strong), rgba(56, 189, 248, 0.06));
}

.avatar-wrap {
  position: relative;
}

.avatar-wrap::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.24), rgba(34, 197, 94, 0.18));
  z-index: -1;
  filter: blur(14px);
}

.avatar-image {
  width: 112px;
  height: 112px;
  object-fit: cover;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow);
}

.profile-card h3 {
  margin-bottom: 6px;
  font-size: 1.18rem;
}

.profile-role {
  color: var(--brand);
  font-size: 0.92rem;
  font-weight: 700;
}

.profile-note {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.7;
}

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

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

.cards-grid:not(.cards-3):not(.cards-4) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

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

.card,
.stat-card,
.gallery-card,
.timeline-item {
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface-strong);
}

.stat-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--brand);
  font-size: 1.5rem;
}

.stat-card span,
.card p,
.section-intro,
.timeline-item p,
.gallery-card p,
.meta-list span,
.meta-list a {
  color: var(--muted);
  line-height: 1.7;
}

.section {
  margin-top: 22px;
  padding: 26px;
  border-radius: var(--radius-xl);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section h2 {
  font-size: 1.9rem;
  letter-spacing: -0.03em;
}

.section-intro {
  max-width: 760px;
}

.card h3,
.gallery-card h3,
.timeline-item h3 {
  margin-bottom: 10px;
  font-size: 1.08rem;
}

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

.meta-list strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.92rem;
}

.quote-card {
  border-left: 3px solid var(--brand);
}

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

.timeline-item {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 18px;
  align-items: start;
}

.timeline-year {
  color: var(--brand);
  font-weight: 700;
  font-size: 0.95rem;
}

.gallery-card img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
}

.footer {
  margin-top: 28px;
  padding: 20px 0 8px;
  color: var(--muted);
  text-align: center;
  font-size: 0.92rem;
}

.footer-meta {
  margin-top: 8px;
  font-size: 0.88rem;
}

@media (max-width: 980px) {
  .hero-grid,
  .stats-grid,
  .cards-grid.cards-3,
  .cards-grid.cards-4,
  .two-column,
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(calc(100% - 20px), var(--content-width));
    padding-top: 82px;
  }

  .theme-toggle {
    top: 14px;
    right: 14px;
    width: 44px;
    height: 44px;
  }

  .site-header {
    top: 10px;
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-top: 6px;
  }

  .site-header.open .site-nav {
    display: flex;
  }

  .site-nav a {
    border-radius: 12px;
  }

  .hero,
  .section {
    padding: 22px;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .profile-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .avatar-wrap {
    margin: 0 auto;
  }
}
