:root {
  --bg: #fafafa;
  --bg-soft: #ffffff;
  --card-border: rgba(0, 0, 0, 0.08);
  --text: #1a1a1a;
  --text-secondary: #6b7280;
  --accent: #4f46e5;
  --accent-soft: rgba(79, 70, 229, 0.1);
  --hero-shadow: rgba(79, 70, 229, 0.16);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.05);
  --radius: 16px;
}

[data-theme="dark"] {
  --bg: #0f1115;
  --bg-soft: #171a21;
  --card-border: rgba(255, 255, 255, 0.08);
  --text: #f2f4f7;
  --text-secondary: #9aa3af;
  --accent: #818cf8;
  --accent-soft: rgba(129, 140, 248, 0.14);
  --hero-shadow: rgba(129, 140, 248, 0.2);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  border-bottom: 1px solid var(--card-border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  background: var(--bg-soft);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.3s ease;
}

.theme-toggle:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.icon-moon {
  display: none;
}

[data-theme="dark"] .icon-sun {
  display: none;
}

[data-theme="dark"] .icon-moon {
  display: block;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 72px;
  text-align: center;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  pointer-events: none;
}

.hero-orb-one {
  width: 380px;
  height: 380px;
  background: var(--accent);
  top: -120px;
  left: -100px;
}

.hero-orb-two {
  width: 320px;
  height: 320px;
  background: #06b6d4;
  bottom: -120px;
  right: -100px;
}

.hero-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.avatar {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #06b6d4);
  box-shadow: 0 12px 32px var(--hero-shadow);
  margin-bottom: 24px;
  user-select: none;
}

.hero-name {
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

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

.hero-role {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 20px;
  min-height: 1.6em;
}

.hero-role::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-left: 4px;
  vertical-align: text-bottom;
  background: var(--accent);
  animation: blink 0.9s steps(2) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.hero-desc {
  max-width: 560px;
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 11px 26px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px var(--hero-shadow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px var(--hero-shadow);
}

.btn-ghost {
  border: 1px solid var(--card-border);
  color: var(--text);
  background: var(--bg-soft);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ---------- About ---------- */
.about {
  padding: 64px 0 96px;
}

.section-head {
  text-align: center;
  margin-bottom: 48px;
}

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 14px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 700;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.about-card {
  background: var(--bg-soft);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.about-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 16px;
}

.about-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.about-card p {
  font-size: 0.92rem;
  color: var(--text-secondary);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--card-border);
  padding: 36px 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer-links {
  display: flex;
  gap: 18px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.footer-links a:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.copyright {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .hero-role::after {
    animation: none;
  }
}
