:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --border: #e5e7eb;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.navbar {
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  gap: 26px;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--primary);
}

/* Hero */
.hero {
  min-height: 620px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 90px 24px;
  background:
    radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.16), transparent 30%),
    radial-gradient(circle at 80% 30%, rgba(14, 165, 233, 0.16), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f5f7fb 100%);
}

.hero-content {
  max-width: 880px;
  text-align: center;
}

.tagline {
  display: inline-block;
  margin-bottom: 18px;
  padding: 7px 16px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: rgba(37, 99, 235, 0.1);
  font-weight: 700;
  font-size: 14px;
}

.hero h1 {
  margin: 0;
  font-size: 64px;
  line-height: 1.1;
  letter-spacing: -2px;
}

.hero-subtitle {
  max-width: 760px;
  margin: 24px auto 0;
  font-size: 21px;
  color: var(--muted);
}

.hero-buttons {
  margin-top: 36px;
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 13px 24px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.primary-btn {
  color: white;
  background: var(--primary);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.25);
}

.primary-btn:hover {
  background: var(--primary-dark);
}

.secondary-btn {
  color: var(--primary);
  background: white;
  border: 1px solid var(--border);
}

/* Sections */
.section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 82px 24px;
}

.section-title {
  margin-bottom: 28px;
}

.section-title span {
  color: var(--primary);
  font-weight: 800;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.section-title h2 {
  margin: 6px 0 0;
  font-size: 34px;
  letter-spacing: -0.8px;
}

/* Cards */
.about-card,
.timeline-card,
.contact-card,
.project-card,
.skill-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.about-card,
.contact-card {
  padding: 34px;
}

.about-card p,
.contact-card p {
  margin: 0 0 16px;
  font-size: 17px;
}

.about-card p:last-child,
.contact-card p:last-child {
  margin-bottom: 0;
}

/* Education */
.timeline-card {
  position: relative;
  padding: 34px 34px 34px 54px;
}

.timeline-dot {
  position: absolute;
  left: 26px;
  top: 42px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.13);
}

.timeline-card h3 {
  margin: 0 0 4px;
  font-size: 22px;
}

.muted {
  margin-top: 0;
  color: var(--muted);
}

/* Projects */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.project-card {
  padding: 28px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.12);
}

.project-icon {
  width: 46px;
  height: 46px;
  margin-bottom: 18px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: linear-gradient(135deg, var(--primary), #38bdf8);
  font-weight: 800;
}

.project-card h3 {
  margin: 0 0 12px;
  font-size: 21px;
  line-height: 1.35;
}

.project-card p {
  color: var(--muted);
  margin: 0 0 20px;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tech-tags span {
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 13px;
  font-weight: 700;
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.skill-card {
  padding: 26px;
}

.skill-card h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

.skill-card p {
  margin: 0;
  color: var(--muted);
}

/* Contact */
.contact-section {
  padding-bottom: 100px;
}

.contact-links {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.contact-links a {
  padding: 10px 16px;
  border-radius: 10px;
  color: var(--primary);
  background: #eff6ff;
  text-decoration: none;
  font-weight: 700;
}

.contact-links a:hover {
  background: #dbeafe;
}

/* Footer */
footer {
  padding: 28px 24px;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: white;
}

/* Mobile */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    gap: 14px;
  }

  .nav-links {
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero {
    min-height: auto;
    padding: 80px 24px;
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero-subtitle {
    font-size: 18px;
  }

  .section {
    padding: 62px 20px;
  }

  .section-title h2 {
    font-size: 29px;
  }

  .project-grid,
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .about-card,
  .timeline-card,
  .contact-card,
  .project-card,
  .skill-card {
    padding: 24px;
  }

  .timeline-card {
    padding-left: 44px;
  }

  .timeline-dot {
    left: 20px;
  }
}