:root {
  --bg: #ffffff;
  --bg-alt: #f7f8fa;
  --text: #1f2328;
  --text-muted: #6b7280;
  --accent: #4f6ef7;
  --accent-dark: #3b55d6;
  --border: #e5e7eb;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.08), 0 4px 16px rgba(16, 24, 40, 0.05);
  --max-w: 960px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-dark);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  z-index: 10;
}

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

.logo {
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  letter-spacing: 0.2px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 28px;
}

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

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

/* Hero */
.hero {
  padding: 96px 0 72px;
  text-align: center;
}

.avatar {
  width: 96px;
  height: 96px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #9b8cff);
  color: #fff;
  font-size: 40px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero h1 {
  font-size: 40px;
  letter-spacing: 0.5px;
}

.accent {
  color: var(--accent);
}

.tagline {
  margin-top: 8px;
  font-size: 18px;
  color: var(--text-muted);
}

.intro {
  max-width: 560px;
  margin: 20px auto 0;
  color: var(--text-muted);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}

.tag {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  color: var(--text);
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 32px;
}

.btn {
  display: inline-block;
  padding: 10px 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s;
}

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

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

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

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

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

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-title {
  font-size: 28px;
  margin-bottom: 8px;
}

.section-sub {
  color: var(--text-muted);
  margin-bottom: 36px;
}

/* Project cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

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

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.1);
}

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

.card p {
  color: var(--text-muted);
  font-size: 14px;
}

.card-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chip {
  background: rgba(79, 110, 247, 0.1);
  color: var(--accent-dark);
  font-size: 12px;
  border-radius: 6px;
  padding: 3px 10px;
}

.card-link {
  font-size: 14px;
  font-weight: 500;
}

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

.contact-inner p {
  color: var(--text-muted);
  margin: 4px 0 28px;
}

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

.contact-item {
  display: inline-block;
  padding: 10px 22px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  transition: all 0.2s;
}

.contact-item:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Footer */
.site-footer {
  padding: 32px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 640px) {
  .hero {
    padding: 64px 0 48px;
  }

  .hero h1 {
    font-size: 30px;
  }

  .nav-links {
    gap: 18px;
  }

  .section {
    padding: 56px 0;
  }
}
