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

:root {
  --bg: #0d1117;
  --surface: #161b22;
  --border: #30363d;
  --text: #e6edf3;
  --muted: #8b949e;
  --accent: #58a6ff;
  --tag-bg: #1f3a5f;
  --tag-text: #79c0ff;
  --radius: 8px;
  --max-width: 860px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  padding: 2rem 1rem;
}

/* Header */
header {
  max-width: var(--max-width);
  margin: 0 auto 3rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

header h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

header .tagline {
  color: var(--muted);
  font-size: 1rem;
}

header .github-link {
  display: inline-block;
  margin-top: 0.5rem;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
}

header .github-link:hover {
  text-decoration: underline;
}

/* Project grid */
.projects {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: border-color 0.15s;
}

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

.card h2 {
  font-size: 1rem;
  font-weight: 600;
}

.card h2 a {
  color: var(--accent);
  text-decoration: none;
}

.card h2 a:hover {
  text-decoration: underline;
}

.card p {
  color: var(--muted);
  font-size: 0.875rem;
  flex: 1;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 0.75rem;
  padding: 0.15rem 0.6rem;
  border-radius: 20px;
}

.docs-link {
  align-self: flex-start;
  color: var(--accent);
  font-size: 0.85rem;
  text-decoration: none;
}

.docs-link:hover {
  text-decoration: underline;
}

/* Footer */
footer {
  max-width: var(--max-width);
  margin: 3rem auto 0;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}

footer a {
  color: var(--accent);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

@media (max-width: 480px) {
  header h1 { font-size: 1.5rem; }
  .projects { grid-template-columns: 1fr; }
}
