:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --text: #17161a;
  --text-muted: #6b6a72;
  --border: #e7e5e2;
  --accent: #2f6f5e;
  --accent-soft: #eef4f1;
  --radius: 14px;
  --max-width: 1040px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

ul {
  list-style: none;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(250, 250, 249, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--text);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nav-menu {
  display: flex;
  gap: 32px;
  font-size: 14.5px;
  color: var(--text-muted);
}

.nav-menu a {
  position: relative;
  transition: color 0.2s ease;
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 16px;
  height: 1.5px;
  margin: 0 auto;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.hero {
  padding: 112px 24px 96px;
  max-width: var(--max-width);
}

.eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

.hero-title {
  font-size: clamp(44px, 8vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 700;
}

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

.hero-role {
  margin-top: 20px;
  font-size: clamp(18px, 2.4vw, 22px);
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
}

.hero-desc {
  max-width: 560px;
  margin-top: 18px;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 500;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

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

.btn-primary:hover {
  background: #2c2a31;
}

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

.btn-ghost:hover {
  border-color: #d3cfc9;
}

.hero-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
  font-size: 13.5px;
  color: var(--text-muted);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3fa877;
  box-shadow: 0 0 0 3px rgba(63, 168, 119, 0.16);
}

.section {
  padding: 76px 24px;
  border-top: 1px solid var(--border);
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 40px;
}

.section-index {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  color: var(--accent);
}

.section-head h2 {
  font-size: clamp(24px, 3.4vw, 30px);
  letter-spacing: -0.02em;
  font-weight: 600;
}

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

.about-text p + p {
  margin-top: 16px;
}

.about-text {
  color: var(--text-muted);
  max-width: 560px;
}

.facts {
  display: grid;
  gap: 18px;
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.fact {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 14.5px;
}

.fact dt {
  color: var(--text-muted);
}

.fact dd {
  font-weight: 500;
  text-align: right;
}

.skill-groups {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.skill-group {
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.skill-group h3 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 16px;
}

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

.tags li {
  font-size: 13px;
  color: var(--text-muted);
  background: var(--accent-soft);
  border-radius: 7px;
  padding: 4px 10px;
}

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

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

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(23, 22, 26, 0.07);
}

.project-top {
  display: flex;
  justify-content: space-between;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.project-card h3 {
  font-size: 19px;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

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

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--text-muted);
}

.contact-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  padding: 48px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.contact-card h2 {
  font-size: clamp(24px, 3.4vw, 30px);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.contact-card p {
  color: var(--text-muted);
  max-width: 420px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 32px 24px 48px;
  border-top: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 22px;
}

.footer-links a {
  transition: color 0.2s ease;
}

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

.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.reveal:nth-child(2) { animation-delay: 0.06s; }
.reveal:nth-child(3) { animation-delay: 0.12s; }
.reveal:nth-child(4) { animation-delay: 0.18s; }
.reveal:nth-child(5) { animation-delay: 0.24s; }
.reveal:nth-child(6) { animation-delay: 0.3s; }

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

@media (max-width: 860px) {
  .about-grid,
  .skill-groups,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .about-grid {
    gap: 32px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 18px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    display: none;
  }

  .nav-menu.open {
    display: flex;
  }

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

  .hero {
    padding: 72px 24px 64px;
  }

  .section {
    padding: 56px 24px;
  }

  .contact-card {
    padding: 32px;
  }
}
