:root {
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #666;
  --card: #f6f7f9;
  --border: #e4e6eb;
  --accent: #2563eb;
  --maxw: 760px;
}
body.dark {
  --bg: #0f1115;
  --fg: #e7e9ee;
  --muted: #9aa0ab;
  --card: #181b22;
  --border: #262a33;
  --accent: #6ea8fe;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  transition: background .2s, color .2s;
}

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

/* Theme toggle */
.theme-toggle {
  position: fixed;
  top: 16px; right: 16px;
  width: 40px; height: 40px;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

/* Hero */
.hero {
  display: flex;
  gap: 28px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}
.avatar {
  width: 132px; height: 132px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  flex-shrink: 0;
}
.avatar--placeholder {
  background: linear-gradient(135deg, var(--accent), #9333ea);
}
.hero__text h1 {
  margin: 0 0 6px;
  font-size: 2rem;
}
.tagline {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 1.05rem;
}

/* Links */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--fg);
  text-decoration: none;
  font-size: .9rem;
  transition: border-color .15s, color .15s;
}
.links a:hover { border-color: var(--accent); color: var(--accent); }
.links svg { width: 16px; height: 16px; fill: currentColor; }

/* Sections */
.section { margin-bottom: 44px; }
.section h2 {
  font-size: 1.3rem;
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* Projects */
.projects {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
}
.card h3 { margin: 0 0 8px; font-size: 1.05rem; }
.card h3 a { color: var(--accent); text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.card p { margin: 0 0 12px; color: var(--muted); font-size: .92rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: .72rem;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--muted);
}

.muted { color: var(--muted); }

.footer {
  margin-top: 64px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .85rem;
  text-align: center;
}

@media (max-width: 480px) {
  .hero { flex-direction: column; text-align: center; }
  .links { justify-content: center; }
}
