:root {
  --bg: #f7f7f8;
  --surface: #ffffff;
  --text: #16181d;
  --muted: #5b6170;
  --border: #e3e5ea;
  --accent: #2f6fed;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --surface: #171a21;
    --text: #e8eaf0;
    --muted: #9aa1b2;
    --border: #262a34;
    --accent: #6a9bff;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
}

main { flex: 1; }

a { color: inherit; }

.wrap {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.logo {
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  letter-spacing: -0.02em;
}
.logo span, h1 span { color: var(--accent); }
nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
}
nav a:hover { color: var(--text); }

/* Hero */
.hero { padding-top: 96px; padding-bottom: 64px; }
.hero h1 {
  margin: 0;
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
}
.lead {
  margin: 16px 0 0;
  font-size: 1.2rem;
  color: var(--muted);
}

/* Projects */
.projects { padding-bottom: 96px; }
.projects h2 {
  font-size: 1.4rem;
  margin: 0 0 20px;
  letter-spacing: -0.02em;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.card {
  display: block;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}
a.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card h3 { margin: 0 0 6px; font-size: 1.05rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.card--empty { border-style: dashed; background: transparent; }

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