:root {
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --text: #18181b;
  --muted: #71717a;
  --accent: #2563eb;
  --accent-soft: #eff4ff;
  --border: #e4e4e7;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(24, 24, 27, 0.05);
  --shadow-hover: 0 12px 32px rgba(24, 24, 27, 0.08);
  --container: 1100px;
}

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

html {
  scroll-behavior: smooth;
}

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

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

a {
  color: inherit;
  text-decoration: none;
}

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

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

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

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

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

.nav-links a {
  font-size: 0.95rem;
  color: var(--muted);
  transition: color 0.2s ease;
}

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

/* ---------- Hero ---------- */
.hero {
  padding: 120px 0 96px;
}

.hero-eyebrow {
  color: var(--accent);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.02em;
  margin-bottom: 16px;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.hero-role {
  margin-top: 16px;
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--text);
}

.hero-desc {
  margin-top: 20px;
  max-width: 560px;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 36px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.btn-primary:hover {
  background: var(--accent);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

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

.hero-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 48px;
  list-style: none;
  padding: 0;
}

.hero-skills li {
  font-size: 0.85rem;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  background: var(--bg);
}

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

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

.section-head {
  margin-bottom: 40px;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section-sub {
  margin-top: 8px;
  color: var(--muted);
}

/* ---------- Filter ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.filter-btn {
  padding: 8px 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  border-color: var(--text);
  color: var(--text);
}

.filter-btn.is-active {
  background: var(--text);
  border-color: var(--text);
  color: #fff;
}

/* ---------- Project Grid ---------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.project-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
  opacity: 1;
  transform: translateY(0);
}

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

.project-card.is-hidden {
  display: none;
}

.project-thumb {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.9);
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.project-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.project-desc {
  margin-top: 8px;
  font-size: 0.92rem;
  color: var(--muted);
  flex: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}

.project-tags span {
  font-size: 0.75rem;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 6px;
  padding: 3px 10px;
}

.project-links {
  display: flex;
  gap: 16px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.project-links a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  transition: color 0.2s ease;
}

.project-links a:hover {
  color: var(--accent);
}

/* ---------- About ---------- */
.about-inner {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 48px;
  align-items: start;
}

.about-avatar {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--text), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-monogram {
  color: #fff;
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.about-body p {
  color: var(--muted);
  margin-top: 16px;
  max-width: 640px;
}

.about-stats {
  display: flex;
  gap: 48px;
  margin-top: 32px;
  list-style: none;
  padding: 0;
}

.about-stats strong {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.about-stats span {
  font-size: 0.85rem;
  color: var(--muted);
}

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

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

.contact-link {
  padding: 12px 28px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.contact-link:hover {
  border-color: var(--text);
  transform: translateY(-1px);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.85rem;
}

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

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

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .hero {
    padding: 80px 0 64px;
  }

  .nav-links {
    gap: 20px;
  }

  .about-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .about-avatar {
    width: 120px;
    height: 120px;
  }

  .avatar-monogram {
    font-size: 2.2rem;
  }

  .about-stats {
    gap: 24px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 8px;
  }
}
