:root {
  --bg: #05060f;
  --surface: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.12);
  --text: #e8eaf6;
  --text-muted: #9aa0b5;
  --accent: #6d8bff;
  --accent-2: #b06dff;
  --glow: rgba(109, 139, 255, 0.5);
  --radius: 16px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* 3D 背景 */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
}
.overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse at center, rgba(5,6,15,0) 0%, rgba(5,6,15,0.6) 100%);
  pointer-events: none;
}

/* 导航栏 */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(5, 6, 15, 0.5);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.5px;
}
.logo .dot { color: var(--accent); }
.nav-links { display: flex; gap: 22px; }
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 15px;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
}
.hero-content { max-width: 720px; }
.hero-greet { color: var(--text-muted); font-size: 20px; margin-bottom: 8px; }
.hero-name {
  font-size: 64px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 16px;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-type {
  font-size: 24px;
  color: var(--text-muted);
  margin-bottom: 20px;
  min-height: 34px;
}
.type-label { color: var(--text-muted); }
#typewriter { color: var(--accent); font-weight: 600; }
.cursor { color: var(--accent); animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero-desc {
  color: var(--text-muted);
  font-size: 16px;
  max-width: 520px;
  margin: 0 auto 32px;
}
.hero-actions { display: flex; gap: 16px; justify-content: center; margin-bottom: 28px; }
.btn {
  display: inline-block;
  padding: 13px 30px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.25s;
}
.btn-primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 0 24px var(--glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 36px var(--glow); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.hero-social { display: flex; gap: 16px; justify-content: center; }
.hero-social a {
  font-size: 24px;
  text-decoration: none;
  transition: transform 0.2s;
}
.hero-social a:hover { transform: translateY(-4px); }

/* 通用 section */
.section { padding: 80px 24px; }
.section-alt { background: rgba(255, 255, 255, 0.02); }
.section-title {
  text-align: center;
  font-size: 32px;
  margin-bottom: 44px;
  color: var(--text);
  letter-spacing: 1px;
}

/* 玻璃卡片 */
.glass-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  backdrop-filter: blur(10px);
  transition: transform 0.25s, border-color 0.25s;
}
.glass-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.glass-card h3 { margin-bottom: 12px; font-size: 18px; }
.glass-card p { color: var(--text-muted); }

/* 关于 */
.about-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.skill-list { list-style: none; }
.skill-list li {
  padding: 8px 0;
  color: var(--text-muted);
  border-bottom: 1px dashed var(--border);
}
.skill-list li:last-child { border-bottom: none; }

/* 技能条 */
.skills-grid {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.skill-bar-card { }
.skill-name { display: block; margin-bottom: 8px; font-size: 15px; color: var(--text); }
.skill-bar {
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}
.skill-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px var(--glow);
}

/* 项目 */
.projects-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.project-card h3 { font-size: 20px; }
.project-card p { margin-bottom: 16px; font-size: 14px; }
.project-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.project-tags span {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(109, 139, 255, 0.12);
  color: var(--accent);
  border: 1px solid rgba(109, 139, 255, 0.3);
}

/* 联系 */
.contact-inner { max-width: 640px; margin: 0 auto; text-align: center; }
.contact-inner p { color: var(--text-muted); margin-bottom: 28px; }
.contact-links { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.contact-item {
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.25s;
}
.contact-item:hover { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 20px var(--glow); }

/* 页脚 */
.footer {
  text-align: center;
  padding: 32px 24px;
  color: var(--text-muted);
  font-size: 14px;
  border-top: 1px solid var(--border);
}

/* 响应式 */
@media (max-width: 768px) {
  .hero-name { font-size: 40px; }
  .about-grid, .projects-grid { grid-template-columns: 1fr; }
  .nav-links { gap: 14px; font-size: 14px; }
}
