:root {
  --bg: #0f172a;
  --bg-alt: #1e293b;
  --card: #ffffff;
  --text: #f8fafc;
  --text-muted: #cbd5e1;
  --primary: #6366f1;
  --primary-light: #818cf8;
  --border: rgba(255, 255, 255, 0.1);
  --radius: 12px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', 'PingFang SC',
    'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
}

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary-light);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}

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

.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);
  transition: 0.3s;
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 0 80px;
  background: radial-gradient(ellipse at top, rgba(99, 102, 241, 0.25), transparent 60%);
}

.hero-avatar {
  width: 140px;
  height: 140px;
  margin: 0 auto 24px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--primary);
  box-shadow: 0 0 40px rgba(99, 102, 241, 0.4);
}

.hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-name {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 8px;
}

.hero-role {
  font-size: 1.2rem;
  color: var(--primary-light);
  font-weight: 600;
  margin-bottom: 16px;
}

.hero-tagline {
  max-width: 560px;
  margin: 0 auto 32px;
  color: var(--text-muted);
  font-size: 1.05rem;
}

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

.btn-outline {
  border: 1.5px solid var(--primary-light);
  color: var(--primary-light);
}

.btn-outline:hover {
  background: rgba(99, 102, 241, 0.15);
  transform: translateY(-2px);
}

/* ---------- Sections ---------- */
.section {
  padding: 90px 0;
}

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

.section-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
}

.section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 4px;
  border-radius: 2px;
  background: var(--primary);
  margin: 12px auto 0;
}

.section-desc {
  max-width: 640px;
  margin: 0 auto 40px;
  text-align: center;
  color: var(--text-muted);
}

/* ---------- About stats ---------- */
.about-stats {
  display: flex;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.stat {
  text-align: center;
}

.stat strong {
  display: block;
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--primary-light);
}

.stat span {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ---------- Skills ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.skill-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: transform 0.2s, border-color 0.2s;
}

.skill-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
}

.skill-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 12px;
}

.skill-card h3 {
  margin-bottom: 8px;
  font-size: 1.15rem;
}

.skill-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* ---------- Projects ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.project-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.project-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

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

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

.project-tags span {
  background: rgba(99, 102, 241, 0.2);
  color: var(--primary-light);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
}

/* ---------- Contact ---------- */
.contact-inner {
  text-align: center;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.contact-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.2s;
}

.contact-link:hover {
  color: var(--primary-light);
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .hero-name {
    font-size: 2.2rem;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease;
  }

  .nav-links.open {
    max-height: 300px;
  }

  .nav-links li a {
    display: block;
    padding: 14px 5%;
    border-top: 1px solid var(--border);
  }

  .about-stats {
    gap: 36px;
  }
}
