:root {
  --color-bg: #ffffff;
  --color-text: #1a1a1a;
  --color-muted: #6b7280;
  --color-accent: #111111;
  --color-line: #e5e7eb;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --max-width: 960px;
}

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

html {
  scroll-behavior: smooth;
}

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

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

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

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

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

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

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

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

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

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

.nav-link:hover,
.nav-link.active {
  color: var(--color-text);
}

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

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  transition: transform 0.3s ease, opacity 0.3s 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 {
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.35em;
  color: var(--color-muted);
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--color-muted);
  max-width: 480px;
  margin-bottom: 40px;
}

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

.btn {
  display: inline-block;
  padding: 12px 28px;
  font-size: 0.95rem;
  border: 1px solid var(--color-text);
  border-radius: 2px;
  transition: background 0.25s ease, color 0.25s ease;
}

.btn-outline {
  color: var(--color-text);
}

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

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

.section {
  padding: 120px 0;
}

.section-alt {
  background: #fafafa;
  border-top: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 64px;
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -14px;
  width: 40px;
  height: 2px;
  background: var(--color-accent);
}

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

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

.about-avatar {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: var(--color-text);
  color: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.about-text p {
  color: var(--color-muted);
  margin-bottom: 20px;
  font-size: 1.05rem;
}

.about-meta {
  list-style: none;
  margin-top: 32px;
}

.about-meta li {
  padding: 10px 0;
  border-bottom: 1px solid var(--color-line);
  font-size: 0.95rem;
}

.about-meta span {
  display: inline-block;
  width: 80px;
  color: var(--color-muted);
}

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

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

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

.skill-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
}

.skill-card h3 {
  font-size: 1.1rem;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-line);
}

.skill-card ul {
  list-style: none;
}

.skill-card li {
  font-size: 0.95rem;
  color: var(--color-muted);
  padding: 6px 0;
}

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

.project-list {
  display: grid;
  gap: 24px;
}

.project-item {
  border: 1px solid var(--color-line);
  padding: 36px 32px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.project-item:hover {
  transform: translateX(6px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.project-body h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.project-body p {
  color: var(--color-muted);
  font-size: 0.98rem;
  margin-bottom: 16px;
  max-width: 640px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.project-tags span {
  font-size: 0.78rem;
  padding: 4px 12px;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  color: var(--color-muted);
}

.project-link {
  font-size: 0.95rem;
  font-weight: 500;
  border-bottom: 1px solid var(--color-text);
  padding-bottom: 2px;
  transition: color 0.2s ease;
}

.project-link:hover {
  color: var(--color-muted);
}

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

.site-footer {
  border-top: 1px solid var(--color-line);
  padding: 40px 0;
  text-align: center;
}

.site-footer p {
  color: var(--color-muted);
  font-size: 0.85rem;
}

.footer-links {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 28px;
}

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

/* ---------- Scroll reveal ---------- */

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

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

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

@media (max-width: 768px) {
  .section {
    padding: 80px 0;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-list {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-line);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }

  .nav-list.open {
    max-height: 300px;
  }

  .nav-link {
    display: block;
    padding: 16px 24px;
  }

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

  .about-avatar {
    width: 140px;
    height: 140px;
    font-size: 2.5rem;
  }

  .skill-cards {
    grid-template-columns: 1fr;
  }
}
