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

:root {
  --bg: #0b0f1a;
  --fg: #e6e9f2;
  --muted: #9aa3b8;
  --primary: #6366f1;
  --accent: #a855f7;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.7;
  overflow-x: hidden;
}

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

.grad {
  background: linear-gradient(120deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.glass {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 18px;
}

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 16px 24px;
  background: rgba(11, 15, 26, 0.7);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

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

.logo {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 1px;
  color: var(--fg);
  text-decoration: none;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 24px;
  font-size: 15px;
  transition: color 0.25s;
}

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

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 96px 24px 48px;
  position: relative;
  z-index: 1;
}

.hero-card {
  max-width: 640px;
  width: 100%;
  text-align: center;
  padding: 56px 40px;
  animation: fadeUp 0.9s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.avatar img {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  margin-bottom: 22px;
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.35);
}

.hero h1 {
  font-size: clamp(28px, 5vw, 40px);
  margin-bottom: 10px;
}

.tagline {
  font-size: 18px;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 8px;
}

.sub {
  color: var(--muted);
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 11px 26px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  background: linear-gradient(120deg, var(--primary), var(--accent));
  color: #fff;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

.btn.ghost {
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--fg);
}

.socials {
  display: flex;
  gap: 18px;
  justify-content: center;
}

.socials a {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  transition: all 0.25s;
}

.socials a:hover {
  color: #fff;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  transform: translateY(-3px);
}

.socials svg {
  width: 20px;
  height: 20px;
}

.section {
  position: relative;
  z-index: 1;
  padding: 80px 24px;
}

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

.sec-title {
  text-align: center;
  font-size: 32px;
  margin-bottom: 44px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 28px;
  padding: 36px;
  align-items: center;
}

.about-text p {
  color: var(--muted);
  margin-bottom: 12px;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.stat {
  text-align: center;
  padding: 20px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
}

.stat b {
  display: block;
  font-size: 26px;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat span {
  font-size: 13px;
  color: var(--muted);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.skill-cat {
  padding: 30px;
  transition: transform 0.25s;
}

.skill-cat:hover {
  transform: translateY(-6px);
}

.skill-cat h3 {
  margin-bottom: 16px;
  font-size: 19px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chips span {
  font-size: 13px;
  padding: 5px 13px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.14);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #c7d2fe;
}

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

.project-card {
  padding: 0 26px 26px;
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.project-thumb {
  height: 120px;
  margin: 0 -26px 20px;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  opacity: 0.85;
}

.project-card h3 {
  margin-bottom: 8px;
  font-size: 19px;
}

.project-card p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 16px;
}

.contact-box {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  padding: 44px 36px;
}

.contact-box p {
  color: var(--muted);
  margin-bottom: 22px;
}

.contact-box .muted {
  font-size: 13px;
  margin-top: 16px;
  margin-bottom: 0;
}

.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 32px 24px 40px;
  color: var(--muted);
  font-size: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

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

  .about-stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .nav nav a {
    margin-left: 14px;
    font-size: 13px;
  }

  .hero-card {
    padding: 40px 24px;
  }
}
