:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #1a1b1f;
  --muted: #666b76;
  --primary: #9a7b18;
  --primary-soft: rgba(154, 123, 24, 0.12);
  --border: rgba(0, 0, 0, 0.08);
  --shadow: 0 10px 28px rgba(19, 24, 36, 0.12);
}

body.dark-theme {
  --bg: #0f0f10;
  --surface: #171719;
  --text: #f5f5f7;
  --muted: #b8b8bf;
  --primary: #d4af37;
  --primary-soft: rgba(212, 175, 55, 0.2);
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  transition: background-color 0.35s ease, color 0.35s ease;
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 12px 6px 8px;
  cursor: pointer;
  transition: background-color 0.35s ease, border-color 0.35s ease, transform 0.25s ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
}

.theme-toggle:active {
  transform: translateY(0);
}

.toggle-track {
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: var(--primary-soft);
  position: relative;
  transition: background-color 0.35s ease;
}

.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s ease, background-color 0.35s ease;
}

body.dark-theme .toggle-thumb {
  transform: translateX(20px);
}

.toggle-label {
  font-size: 0.9rem;
  color: var(--muted);
}

.hero {
  padding: 64px 0 48px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  align-items: center;
  gap: 36px;
}

.avatar-wrap {
  display: flex;
  justify-content: center;
}

.avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  background: radial-gradient(circle at 30% 30%, var(--primary-soft), transparent 68%), var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 4.2rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  box-shadow: var(--shadow);
  transition: border-color 0.35s ease, color 0.35s ease, background-color 0.35s ease;
}

.hero-kicker {
  margin: 0 0 8px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.85rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.2;
}

.hero-text {
  margin-top: 14px;
  max-width: 640px;
  color: var(--muted);
}

.about {
  padding: 20px 0 80px;
}

.about h2 {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.about-desc {
  color: var(--muted);
  margin: 10px 0 24px;
  max-width: 760px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 16px;
  box-shadow: var(--shadow);
  transition: background-color 0.35s ease, border-color 0.35s ease;
}

.skill-card h3 {
  margin: 0 0 8px;
  font-size: 1.02rem;
}

.skill-card p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 24px;
  }

  .hero-text,
  .about-desc {
    margin-left: auto;
    margin-right: auto;
  }

  .skills-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .header-inner {
    min-height: 62px;
  }

  .brand {
    font-size: 1rem;
    letter-spacing: 0.06em;
  }

  .theme-toggle {
    gap: 8px;
    padding: 5px 10px 5px 7px;
  }

  .hero {
    padding-top: 42px;
  }

  .avatar {
    width: 128px;
    height: 128px;
    font-size: 3.6rem;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }
}
