:root {
  --bg: #08080f;
  --bg-soft: #0e0e1a;
  --fg: #eef0ff;
  --muted: #9aa0c0;
  --line: rgba(255, 255, 255, 0.08);
  --c1: #7c5cff;
  --c2: #ff5c8a;
  --c3: #2ee6c8;
  --glass: rgba(255, 255, 255, 0.04);
  --maxw: 1080px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Noto Sans SC", "Space Grotesk", system-ui, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- 背景光晕 ---------- */
.aurora { position: fixed; inset: 0; z-index: -2; overflow: hidden; }
.blob {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.55;
  animation: float 18s ease-in-out infinite;
}
.blob-1 { width: 520px; height: 520px; background: var(--c1); top: -120px; left: -80px; }
.blob-2 { width: 460px; height: 460px; background: var(--c2); top: 30%; right: -120px; animation-delay: -6s; }
.blob-3 { width: 420px; height: 420px; background: var(--c3); bottom: -140px; left: 30%; animation-delay: -12s; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -30px) scale(1.1); }
  66% { transform: translate(-30px, 20px) scale(0.95); }
}

#stars { position: fixed; inset: 0; z-index: -1; pointer-events: none; }

/* ---------- 导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--maxw); margin: 0 auto; padding: 18px 24px;
  backdrop-filter: blur(8px);
}
.logo { font-weight: 700; font-size: 1.15rem; letter-spacing: 0.5px; display: flex; align-items: center; gap: 8px; }
.logo-mark { filter: drop-shadow(0 0 8px var(--c1)); }
.nav-links { display: flex; gap: 26px; font-size: 0.95rem; }
.nav-links a { color: var(--muted); transition: color 0.25s; position: relative; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -4px; width: 0; height: 2px;
  background: linear-gradient(90deg, var(--c1), var(--c2)); transition: width 0.3s;
}
.nav-links a:hover { color: var(--fg); }
.nav-links a:hover::after { width: 100%; }

/* ---------- 容器 ---------- */
main { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 100px 0 30px; }
.section-title { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 700; margin-bottom: 40px; display: flex; align-items: baseline; gap: 14px; }
.section-title .num { font-size: 0.95rem; color: var(--c3); font-family: "Space Grotesk", monospace; }

/* ---------- 首屏 ---------- */
.hero { padding: 90px 0 60px; }
.hero-eyebrow { color: var(--c3); font-family: "Space Grotesk", monospace; letter-spacing: 1px; margin-bottom: 18px; }
.hero-title { font-size: clamp(2.2rem, 7vw, 4.4rem); font-weight: 700; line-height: 1.15; letter-spacing: -1px; }
.gradient-text {
  background: linear-gradient(110deg, var(--c1), var(--c2) 45%, var(--c3));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  background-size: 200% auto; animation: shine 6s linear infinite;
}
@keyframes shine { to { background-position: 200% center; } }
.typed { color: var(--c2); }
.caret { animation: blink 1s step-end infinite; color: var(--c2); font-weight: 300; }
@keyframes blink { 50% { opacity: 0; } }
.hero-sub { color: var(--muted); max-width: 560px; margin: 26px 0 36px; font-size: 1.08rem; }

.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.btn { padding: 13px 26px; border-radius: 999px; font-weight: 500; transition: transform 0.2s, box-shadow 0.3s; display: inline-block; }
.btn-primary { background: linear-gradient(110deg, var(--c1), var(--c2)); color: #fff; box-shadow: 0 8px 30px rgba(124, 92, 255, 0.45); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 14px 40px rgba(255, 92, 138, 0.5); }
.btn-ghost { border: 1px solid var(--line); color: var(--fg); }
.btn-ghost:hover { border-color: var(--c3); transform: translateY(-3px); }

.hero-stats { display: flex; gap: 48px; margin-top: 56px; flex-wrap: wrap; }
.stat b { display: block; font-size: 2.1rem; font-weight: 700; font-family: "Space Grotesk", sans-serif;
  background: linear-gradient(110deg, var(--c1), var(--c3)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat span { color: var(--muted); font-size: 0.9rem; }

/* ---------- 玻璃卡片 ---------- */
.glass {
  background: var(--glass); border: 1px solid var(--line); border-radius: 18px;
  backdrop-filter: blur(12px); transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.glass:hover { border-color: rgba(124, 92, 255, 0.45); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35); }

/* ---------- 关于 ---------- */
.about-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 22px; }
.about-grid .card { padding: 30px; }
.about-grid .card p + p { margin-top: 16px; }
.about-facts { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.about-facts li { padding: 16px 18px; border-left: 2px solid var(--c1); background: var(--glass); border-radius: 0 12px 12px 0; }
.about-facts b { display: block; color: var(--c3); font-size: 0.8rem; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 2px; }

/* ---------- 技能 ---------- */
.skills-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.skill { padding: 26px 22px; }
.skill-ico { font-size: 2rem; display: block; margin-bottom: 14px; }
.skill h3 { font-size: 1.15rem; margin-bottom: 6px; }
.skill p { color: var(--muted); font-size: 0.9rem; }

/* ---------- 作品 ---------- */
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.project { padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.project-top { display: flex; justify-content: space-between; align-items: center; }
.tag { font-size: 0.72rem; padding: 4px 10px; border-radius: 999px; background: rgba(124, 92, 255, 0.18); color: #c9bcff; letter-spacing: 0.5px; }
.arrow { color: var(--muted); transition: transform 0.25s; }
.project:hover .arrow { transform: translate(4px, -4px); color: var(--c3); }
.project h3 { font-size: 1.2rem; }
.project p { color: var(--muted); font-size: 0.92rem; flex: 1; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips span { font-size: 0.72rem; color: var(--muted); border: 1px solid var(--line); padding: 3px 9px; border-radius: 999px; }

/* ---------- 联系 ---------- */
.contact { padding-bottom: 60px; }
.contact-lead { color: var(--muted); margin-bottom: 30px; }
.contact-links { display: flex; gap: 16px; flex-wrap: wrap; }
.contact-link { padding: 18px 24px; display: flex; align-items: center; gap: 10px; font-weight: 500; }
.contact-link small { color: var(--muted); font-weight: 400; font-size: 0.72rem; }
.contact-link span { font-size: 1.3rem; }

/* ---------- 页脚 ---------- */
.footer {
  max-width: var(--maxw); margin: 40px auto 0; padding: 30px 24px;
  border-top: 1px solid var(--line); display: flex; justify-content: space-between;
  color: var(--muted); font-size: 0.85rem; flex-wrap: wrap; gap: 10px;
}

/* ---------- 进入动画 ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 820px) {
  .nav-links { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 28px; }
}
@media (max-width: 480px) {
  .skills-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .blob, .gradient-text, .caret { animation: none; }
  .reveal { transition: none; opacity: 1; transform: none; }
}
