:root {
  --bg: #fafafa;
  --text: #1a1a1a;
  --muted: #6b7280;
  --accent: #2563eb;
  --border: #e5e7eb;
  --card-bg: #ffffff;
}

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

html {
  scroll-behavior: smooth;
}

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

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

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(250, 250, 250, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

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

.nav-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 24px;
}

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

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

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 0 24px;
  max-width: 960px;
  margin: 0 auto;
}

.hero-greet {
  color: var(--accent);
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.hero-name {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.hero-role {
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  color: var(--text);
  margin-bottom: 16px;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 32px;
  max-width: 480px;
}

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

.btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.2s;
}

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

.btn-primary:hover {
  background: #1d4ed8;
}

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

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

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

.section-alt {
  background: #fff;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 32px;
  position: relative;
  padding-bottom: 12px;
}

.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 48px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.section-text {
  color: var(--muted);
  max-width: 640px;
}

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

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

.skill-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

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

.skill-card ul {
  list-style: none;
  color: var(--muted);
  font-size: 0.92rem;
}

.skill-card li {
  margin-bottom: 6px;
}

/* Projects */
.projects-grid {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  transition: box-shadow 0.2s;
}

.project-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.project-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.project-card h3 {
  font-size: 1.25rem;
}

.badge {
  font-size: 0.75rem;
  color: var(--accent);
  background: rgba(37, 99, 235, 0.08);
  border-radius: 999px;
  padding: 2px 12px;
  font-weight: 500;
  white-space: nowrap;
}

.project-sub {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.project-time {
  color: var(--accent);
}

.project-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin: 16px 0 6px;
  letter-spacing: 0.02em;
}

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

.project-card ul {
  color: var(--muted);
  font-size: 0.92rem;
  list-style: disc;
  padding-left: 20px;
  display: grid;
  gap: 8px;
}

/* Contact */
.contact-links {
  display: flex;
  gap: 24px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.contact-links a {
  color: var(--accent);
  text-decoration: none;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 20px;
  transition: all 0.2s;
}

.contact-links a:hover {
  border-color: var(--accent);
  background: rgba(37, 99, 235, 0.05);
}

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

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

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

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