/* ============ 基础变量与重置 ============ */
:root {
  --bg: #0b0f1a;
  --bg-soft: #111725;
  --card: rgba(255, 255, 255, 0.04);
  --card-border: rgba(255, 255, 255, 0.08);
  --text: #f2f4f8;
  --text-muted: #9aa3b5;
  --primary: #6366f1;
  --accent: #ec4899;
  --accent-2: #f59e0b;
  --gradient: linear-gradient(120deg, #6366f1 0%, #a855f7 45%, #ec4899 100%);
  --radius: 20px;
  --max-width: 1080px;
  --font: "Inter", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ============ 背景装饰 ============ */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
  z-index: -3;
  pointer-events: none;
}
.bg-glow--1 {
  width: 480px;
  height: 480px;
  background: #6366f1;
  top: -140px;
  right: -120px;
}
.bg-glow--2 {
  width: 420px;
  height: 420px;
  background: #ec4899;
  bottom: -160px;
  left: -140px;
  opacity: 0.25;
}
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}

/* ============ 导航栏 ============ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 56px);
  transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}
.nav.scrolled {
  background: rgba(11, 15, 26, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
  padding-top: 12px;
  padding-bottom: 12px;
}
.nav__logo {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.5px;
}
.nav__logo span {
  color: var(--accent);
}
.nav__links {
  display: flex;
  gap: 32px;
}
.nav__links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
}
.nav__links a:hover {
  color: var(--text);
}
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav__toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav__toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav__toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav__toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============ Hero ============ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 20px 60px;
}
.hero__badge {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 28px;
}
.hero__title {
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  font-weight: 900;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 22px;
}
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 36px;
}
.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ============ 按钮 ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  cursor: pointer;
}
.btn--primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 8px 28px rgba(99, 102, 241, 0.4);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(236, 72, 153, 0.45);
}
.btn--ghost {
  background: var(--card);
  border: 1px solid var(--card-border);
  color: var(--text);
}
.btn--ghost:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.08);
}

/* ============ 滚动提示 ============ */
.hero__scroll {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 1px;
}
.hero__mouse {
  width: 24px;
  height: 38px;
  border: 2px solid var(--text-muted);
  border-radius: 12px;
  position: relative;
}
.hero__mouse::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: var(--text-muted);
  border-radius: 2px;
  animation: scrollDot 1.6s ease-in-out infinite;
}
@keyframes scrollDot {
  0%, 100% { transform: translate(-50%, 0); opacity: 1; }
  50% { transform: translate(-50%, 12px); opacity: 0.2; }
}

/* ============ 通用 Section ============ */
.section {
  padding: 100px 20px;
}
.section--dark {
  background: rgba(255, 255, 255, 0.015);
}
.container {
  max-width: var(--max-width);
  margin: 0 auto;
}
.section__label {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.section__title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 40px;
}
.section__desc {
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 32px;
}

/* ============ 关于我 ============ */
.about {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  align-items: stretch;
}
.about__card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 40px;
}
.about__avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 20px;
}
.about__card h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 4px;
}
.about__role {
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 16px;
}
.about__text {
  color: var(--text-muted);
}
.about__stats {
  display: grid;
  gap: 16px;
}
.stat {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.stat__num {
  font-size: 2.4rem;
  font-weight: 900;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  line-height: 1.1;
}
.stat__label {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

/* ============ 领域卡片 ============ */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 36px 28px;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(99, 102, 241, 0.5);
  background: rgba(255, 255, 255, 0.06);
}
.card__icon {
  font-size: 2.4rem;
  margin-bottom: 18px;
}
.card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ============ 页脚 ============ */
.footer {
  text-align: center;
  padding: 32px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ============ 滚动出现动画 ============ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============ 响应式 ============ */
@media (max-width: 860px) {
  .nav__links {
    position: fixed;
    top: 64px;
    left: 20px;
    right: 20px;
    flex-direction: column;
    gap: 4px;
    background: rgba(11, 15, 26, 0.96);
    backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 16px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }
  .nav__links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav__links a {
    padding: 12px 16px;
    border-radius: 10px;
  }
  .nav__links a:hover {
    background: rgba(255, 255, 255, 0.05);
  }
  .nav__toggle {
    display: flex;
  }
  .about {
    grid-template-columns: 1fr;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .hero__scroll {
    display: none;
  }
}

/* ============ 无障碍：减少动效 ============ */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
