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

:root {
  --bg: #0f172a;
  --card: #1e293b;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --primary: #6366f1;
  --primary-light: #818cf8;
  --accent: #22d3ee;
  --radius: 16px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.bg-gradient {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 50% at 20% 0%, rgba(99, 102, 241, 0.18), transparent),
    radial-gradient(ellipse 50% 40% at 80% 10%, rgba(34, 211, 238, 0.12), transparent),
    radial-gradient(ellipse 40% 40% at 50% 100%, rgba(168, 85, 247, 0.10), transparent),
    var(--bg);
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 48px 24px 32px;
}

/* Hero */
.hero {
  text-align: center;
  padding: 48px 0 64px;
  animation: fadeUp 0.8s ease both;
}

.avatar-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 24px;
}

.avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.4);
}

.status-dot {
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #34d399;
  border: 3px solid var(--bg);
  animation: pulse 2s infinite;
}

.hero h1 {
  font-size: 2.6rem;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

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

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

.intro {
  max-width: 620px;
  margin: 0 auto 32px;
  color: var(--muted);
}

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

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

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

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  color: #fff;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
}

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

.btn-ghost:hover {
  background: rgba(99, 102, 241, 0.1);
}

/* Sections */
section {
  margin-bottom: 72px;
  animation: fadeUp 0.8s ease both;
}

section h2 {
  font-size: 1.8rem;
  text-align: center;
  margin-bottom: 36px;
  position: relative;
}

section h2::after {
  content: "";
  display: block;
  width: 48px;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  margin: 12px auto 0;
}

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

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

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

.skill-icon {
  font-size: 28px;
  margin-bottom: 12px;
}

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

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

.bar {
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

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

.project-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px 24px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  transition: transform 0.3s, border-color 0.3s;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
}

.project-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 0.78rem;
  color: var(--primary-light);
  background: rgba(99, 102, 241, 0.15);
  padding: 4px 10px;
  border-radius: 999px;
}

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

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

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

.tags span {
  font-size: 0.78rem;
  color: var(--accent);
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.25);
  padding: 3px 10px;
  border-radius: 999px;
}

/* Contact */
.contact {
  text-align: center;
  background: var(--card);
  border-radius: var(--radius);
  padding: 48px 32px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

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

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

.contact-link {
  color: var(--text);
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: border-color 0.2s, color 0.2s;
}

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

/* Footer */
footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  padding-top: 16px;
}

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

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(52, 211, 153, 0);
  }
}

@media (max-width: 640px) {
  .hero h1 {
    font-size: 1.9rem;
  }

  .container {
    padding: 32px 16px 24px;
  }
}
