:root {
  --bg: #ffffff;
  --bg-alt: #f7f8fa;
  --text: #1a1d21;
  --text-muted: #5c6670;
  --border: #e6e8ec;
  --accent: #2563eb;
  --accent-soft: #eff4ff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 4px 16px rgba(16, 24, 40, 0.06);
  --font-sans: "Inter", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-serif: "Noto Serif SC", "Songti SC", serif;
}

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

html {
  scroll-behavior: smooth;
}

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

.container {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header & Nav ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}

.site-header.scrolled {
  border-bottom-color: var(--border);
}

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

.brand {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.02em;
}

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

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

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

.nav-links .nav-cta {
  padding: 7px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  transition: all 0.2s ease;
}

.nav-links .nav-cta:hover {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Hero ---------- */

.hero {
  padding: 168px 0 96px;
  text-align: center;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-avatar {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--accent-soft);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-greet {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.hero-name {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.hero-role {
  font-size: 1.1rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 20px;
}

.hero-desc {
  max-width: 620px;
  color: var(--text-muted);
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-bottom: 40px;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.hero-meta .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 24px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

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

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(16, 24, 40, 0.18);
}

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

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

/* ---------- Sections ---------- */

.section {
  padding: 88px 0;
}

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

.section-tag {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 40px;
}

/* ---------- About ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 56px;
  align-items: start;
}

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

.about-list {
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.about-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  font-size: 0.93rem;
}

.about-list li + li {
  border-top: 1px solid var(--border);
}

.about-list span {
  color: var(--text-muted);
}

.about-list strong {
  font-weight: 500;
}

/* ---------- Skills ---------- */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

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

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

.skill-card h3 {
  font-size: 1.02rem;
  font-weight: 600;
  margin-bottom: 8px;
}

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

/* ---------- Projects ---------- */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

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

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

.project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.project-year {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.project-status {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 999px;
}

.project-card h3 {
  font-size: 1.08rem;
  font-weight: 600;
  margin-bottom: 8px;
}

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

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.project-tags span {
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--bg-alt);
  padding: 4px 10px;
  border-radius: 999px;
}

/* ---------- Timeline ---------- */

.timeline {
  max-width: 680px;
}

.timeline-item {
  position: relative;
  padding-left: 28px;
  padding-bottom: 40px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: 0;
  width: 1px;
  background: var(--border);
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-dot {
  position: absolute;
  left: 0;
  top: 8px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 1px var(--accent);
}

.timeline-body h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.timeline-meta {
  font-size: 0.88rem;
  color: var(--accent);
  margin-bottom: 8px;
}

.timeline-body p:last-child {
  color: var(--text-muted);
  font-size: 0.93rem;
}

/* ---------- Contact ---------- */

.contact-box {
  text-align: center;
  max-width: 640px;
}

.contact-box .section-title {
  margin-bottom: 16px;
}

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

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

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

.contact-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
}

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

/* ---------- Reveal animation ---------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

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

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

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 8px 24px 16px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  .nav-links.open {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 12px 0;
  }

  .nav-links .nav-cta {
    border: 0;
    padding: 12px 0;
  }
}

@media (max-width: 520px) {
  .hero {
    padding-top: 140px;
  }

  .hero-name {
    font-size: 2.4rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    max-width: 280px;
  }

  .section {
    padding: 64px 0;
  }
}
