:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --ink: #111827;
  --ink-soft: #4b5563;
  --ink-faint: #9ca3af;
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.08);
  --line: #e5e7eb;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.06);
  --font-sans: "Inter", "Noto Sans SC", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- 导航 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 250, 250, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

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

/* ---------- 按钮 ---------- */
.btn-primary {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.btn-ghost {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}

.btn-ghost:hover {
  border-color: var(--ink);
  background: var(--surface);
}

.nav .btn-ghost {
  padding: 8px 20px;
  font-size: 14px;
}

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

.hero-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 64px;
  align-items: center;
}

.avatar-ring {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  padding: 6px;
  background: conic-gradient(from 180deg, var(--accent), #7c3aed, #06b6d4, var(--accent));
  animation: spin-slow 8s linear infinite;
}

.avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.avatar-letter {
  font-size: 88px;
  font-weight: 700;
  color: var(--ink);
  animation: spin-slow-reverse 8s linear infinite;
}

@keyframes spin-slow {
  to { transform: rotate(360deg); }
}

@keyframes spin-slow-reverse {
  to { transform: rotate(-360deg); }
}

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

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

.lead {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 520px;
  margin-bottom: 32px;
}

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

.social {
  display: flex;
  gap: 14px;
}

.social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  transition: color 0.2s, border-color 0.2s, transform 0.2s;
}

.social a:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* ---------- 通用板块 ---------- */
section {
  scroll-margin-top: 72px;
}

.section-title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-sub {
  color: var(--ink-soft);
  margin-bottom: 48px;
}

/* ---------- 技能 ---------- */
.skills {
  padding: 88px 0;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 56px;
}

.skill-card {
  padding: 32px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

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

.skill-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.skill-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  font-size: 20px;
  font-weight: 700;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 10%, transparent);
}

.skill-card h3 {
  font-size: 18px;
  font-weight: 600;
}

.skill-card p {
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 20px;
}

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

.skill-tags span {
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 500;
}

/* ---------- 熟练度 ---------- */
.proficiency {
  max-width: 720px;
  margin: 0 auto;
}

.proficiency h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 24px;
}

.bar-item {
  margin-bottom: 20px;
}

.bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
}

.bar-label span:last-child {
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

.bar {
  height: 8px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #06b6d4);
  transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- 联系 ---------- */
.contact {
  padding: 96px 0;
  border-top: 1px solid var(--line);
}

.contact-card {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
  padding: 64px 40px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.contact-card h2 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.contact-text {
  color: var(--ink-soft);
  margin-bottom: 32px;
}

/* ---------- 页脚 ---------- */
.footer {
  padding: 28px 0;
  border-top: 1px solid var(--line);
  text-align: center;
}

.footer p {
  font-size: 13px;
  color: var(--ink-faint);
}

/* ---------- 滚动显现 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .hero-actions,
  .social {
    justify-content: center;
  }

  .lead {
    margin-left: auto;
    margin-right: auto;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .nav-links {
    gap: 16px;
  }

  .nav-links a:not(.btn-ghost) {
    display: none;
  }

  .avatar-ring {
    width: 160px;
    height: 160px;
    margin: 0 auto;
  }

  .avatar-letter {
    font-size: 68px;
  }

  .hero {
    padding: 64px 0;
  }

  .contact-card {
    padding: 48px 24px;
  }
}
