:root {
  --bg: #ffffff;
  --bg-alt: #f7f7fb;
  --text: #18181b;
  --text-muted: #6b6b76;
  --primary: #6366f1;
  --primary-soft: #eef2ff;
  --border: #e8e8ee;
  --radius: 16px;
  --shadow-sm: 0 2px 10px rgba(24, 24, 27, 0.06);
  --shadow-md: 0 12px 32px rgba(24, 24, 27, 0.1);
  --max-w: 1080px;
}

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

html {
  scroll-behavior: smooth;
}

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

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

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

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

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

.brand {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand .dot {
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.nav-links a:not(.btn) {
  transition: color 0.2s;
}

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
}

.btn-sm {
  padding: 7px 16px;
  font-size: 0.85rem;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.32);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(99, 102, 241, 0.4);
}

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

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

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 120px 0 96px;
  text-align: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(600px 300px at 20% 0%, var(--primary-soft), transparent 70%),
    radial-gradient(500px 280px at 85% 10%, #fdf2f8, transparent 70%);
}

.hero-greet {
  font-size: 1.05rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.hero-name {
  margin-top: 12px;
  font-size: clamp(3rem, 8vw, 4.8rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  background: linear-gradient(120deg, #18181b 20%, var(--primary) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-role {
  margin-top: 18px;
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--primary);
}

.hero-desc {
  max-width: 560px;
  margin: 18px auto 0;
  color: var(--text-muted);
  font-size: 1.05rem;
}

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

.hero-socials {
  margin-top: 44px;
  display: flex;
  justify-content: center;
  gap: 24px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.hero-socials a {
  transition: color 0.2s;
}

.hero-socials a:hover {
  color: var(--primary);
}

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

.section-alt {
  background: var(--bg-alt);
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
  margin-bottom: 56px;
  position: relative;
}

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

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 56px;
  align-items: center;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 16px;
}

.about-list {
  list-style: none;
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.about-list li {
  position: relative;
  padding-left: 26px;
  color: var(--text);
}

.about-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

.about-card {
  text-align: center;
}

.avatar {
  width: 220px;
  height: 220px;
  margin: 0 auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  box-shadow: var(--shadow-md);
}

.avatar-caption {
  margin-top: 18px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

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

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

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

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

.skill-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

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

.project-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s, box-shadow 0.25s;
}

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

.project-thumb {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--tint), color-mix(in srgb, var(--tint) 60%, #fff));
}

.project-card h3 {
  padding: 22px 24px 6px;
  font-size: 1.15rem;
}

.project-card p {
  padding: 0 24px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.project-tags {
  padding: 16px 24px 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-tags span {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 999px;
  padding: 4px 12px;
}

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

.contact-sub {
  max-width: 480px;
  margin: -32px auto 36px;
  color: var(--text-muted);
}

.contact-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer .heart {
  color: #ef4444;
}

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

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

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

  .section {
    padding: 72px 0;
  }

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

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