:root {
  --bg: #ffffff;
  --text: #1f2933;
  --muted: #6b7280;
  --accent: #6366f1;
  --card: #f3f4f6;
  --border: #e5e7eb;
}

[data-theme="dark"] {
  --bg: #0f172a;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #818cf8;
  --card: #1e293b;
  --border: #334155;
}

* {
  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.6;
  transition: background 0.3s, color 0.3s;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--accent);
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  cursor: pointer;
  font-size: 1.1rem;
}

main {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hero {
  text-align: center;
  padding: 5rem 0 3rem;
}

.avatar {
  width: 6rem;
  height: 6rem;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 2.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.highlight {
  color: var(--accent);
}

.subtitle {
  color: var(--accent);
  font-size: 1.25rem;
  min-height: 2rem;
}

.intro {
  color: var(--muted);
  max-width: 480px;
  margin: 1rem auto 2rem;
}

.actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  transition: opacity 0.2s;
}

.btn:hover {
  opacity: 0.85;
}

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

.section {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
}

h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.section p {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.skills {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.skills li {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  font-size: 0.9rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}

.card h3 {
  margin-bottom: 0.5rem;
}

.card p {
  margin: 0;
  font-size: 0.9rem;
}

.contact-list {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.contact-list a {
  color: var(--accent);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: background 0.2s;
}

.contact-list a:hover {
  background: var(--card);
}

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