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

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --fg: #e8e8ea;
    --muted: #9aa0aa;
    --accent: #6ea8fe;
    --card: #191c22;
    --border: #262a31;
  }
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  display: flex;
  min-height: 100vh;
}

.wrap {
  max-width: 640px;
  margin: auto;
  padding: 72px 24px 48px;
  width: 100%;
}

/* Hero */
.hero { text-align: center; margin-bottom: 40px; }

.avatar {
  width: 92px;
  height: 92px;
  margin: 0 auto 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 40px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  user-select: none;
}

.hero h1 {
  font-size: clamp(32px, 7vw, 44px);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.tagline {
  color: var(--muted);
  font-size: clamp(16px, 3.6vw, 19px);
  font-weight: 500;
}

/* About */
.about {
  font-size: 17.5px;
  color: var(--fg);
  text-align: center;
  margin: 0 auto 40px;
  max-width: 52ch;
}

/* Links */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 56px;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--fg);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: border-color .15s ease, color .15s ease, transform .1s ease;
}

.btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

/* Projects (when enabled) */
.projects { margin-bottom: 56px; }
.projects h2 {
  font-size: 22px;
  margin-bottom: 20px;
  text-align: center;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}
.card h3 { font-size: 17px; margin-bottom: 8px; }
.card p { font-size: 14.5px; color: var(--muted); margin-bottom: 12px; }
.card a { color: var(--accent); text-decoration: none; font-weight: 500; }

/* Footer */
.foot {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  border-top: 1px solid var(--border);
  padding-top: 24px;
}
