:root {
  --bg: #0b0d14;
  --bg-soft: #12151f;
  --card: #161a26;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8eaf2;
  --text-dim: #9aa1b5;
  --primary: #6366f1;
  --primary-soft: rgba(99, 102, 241, 0.14);
  --accent: #22d3ee;
  --radius: 16px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', 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.7;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- 导航 ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(11, 13, 20, 0.72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -1px;
}

.nav-links {
  display: flex;
  gap: 32px;
  font-size: 15px;
  color: var(--text-dim);
}

.nav-links a {
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: 0.3s;
}

.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;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 120px 24px 80px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  animation: float 14s ease-in-out infinite;
}

.blob-1 {
  width: 460px;
  height: 460px;
  background: rgba(99, 102, 241, 0.45);
  top: -120px;
  left: -100px;
}

.blob-2 {
  width: 380px;
  height: 380px;
  background: rgba(34, 211, 238, 0.3);
  bottom: -100px;
  right: -80px;
  animation-delay: -5s;
}

.blob-3 {
  width: 300px;
  height: 300px;
  background: rgba(236, 72, 153, 0.22);
  top: 45%;
  left: 55%;
  animation-delay: -9s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -30px) scale(1.08); }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 640px;
}

.avatar {
  width: 128px;
  height: 128px;
  margin: 0 auto 28px;
  border-radius: 50%;
  padding: 6px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 8px 40px rgba(99, 102, 241, 0.35);
}

.avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--bg-soft);
  display: block;
}

.hero-hello {
  color: var(--text-dim);
  font-size: 17px;
  margin-bottom: 8px;
}

.hero h1 {
  font-size: clamp(44px, 8vw, 72px);
  font-weight: 800;
  letter-spacing: -2px;
  background: linear-gradient(135deg, #fff 20%, var(--primary) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-role {
  margin-top: 12px;
  font-size: 20px;
  color: var(--accent);
  font-weight: 600;
}

.hero-desc {
  margin: 20px auto 0;
  max-width: 480px;
  color: var(--text-dim);
  font-size: 16px;
}

.hero-actions {
  margin-top: 36px;
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 13px 30px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(99, 102, 241, 0.5);
}

.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-dim);
  font-size: 22px;
  animation: bounce 2s infinite;
  z-index: 1;
}

@keyframes bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

/* ---------- 通用区块 ---------- */
.section {
  padding: 100px 24px;
}

.section-alt {
  background: var(--bg-soft);
}

.container {
  max-width: 1080px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 56px;
}

.section-title span {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-title {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.section-title.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- 关于 ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
}

.about-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.about-card h3 {
  font-size: 20px;
  margin-bottom: 16px;
}

.about-card p {
  color: var(--text-dim);
  margin-bottom: 12px;
  font-size: 15px;
}

.info-list {
  list-style: none;
}

.info-list li {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}

.info-list li:last-child {
  border-bottom: 0;
}

.info-list span {
  color: var(--text-dim);
}

/* ---------- 技能 ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px 48px;
  max-width: 760px;
  margin: 0 auto;
}

.skill-item .skill-name {
  font-size: 15px;
  font-weight: 600;
}

.skill-bar {
  margin-top: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.skill-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- 项目 ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.project-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.project-head h3 {
  font-size: 19px;
}

.project-tag {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}

.project-card p {
  color: var(--text-dim);
  font-size: 14px;
  flex: 1;
}

.project-meta {
  font-size: 13px;
  color: var(--text-dim);
}

/* ---------- 联系 ---------- */
.contact-wrap {
  text-align: center;
}

.contact-sub {
  color: var(--text-dim);
  margin: -32px 0 40px;
  font-size: 16px;
}

.contact-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.contact-links {
  margin-top: 40px;
  display: flex;
  gap: 28px;
  justify-content: center;
  flex-wrap: wrap;
}

.contact-links a {
  color: var(--text-dim);
  font-size: 15px;
  transition: color 0.2s;
}

.contact-links a:hover {
  color: var(--primary);
}

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

.heart {
  color: #f472b6;
}

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .about-grid,
  .projects-grid,
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    gap: 16px;
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .section {
    padding: 72px 24px;
  }
}
