:root {
  color-scheme: light dark;

  --bg: #ffffff;
  --bg-soft: #f6f8fa;
  --bg-card: #ffffff;
  --text: #24292f;
  --muted: #57606a;
  --border: #d0d7de;
  --accent: #0969da;
  --accent-strong: #0550ae;
  --shadow: 0 16px 48px rgba(140, 149, 159, 0.22);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117;
    --bg-soft: #161b22;
    --bg-card: #161b22;
    --text: #e6edf3;
    --muted: #8b949e;
    --border: #30363d;
    --accent: #58a6ff;
    --accent-strong: #79c0ff;
    --shadow: 0 16px 48px rgba(1, 4, 9, 0.55);
  }
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Helvetica,
    Arial,
    sans-serif,
    "Apple Color Emoji",
    "Segoe UI Emoji";
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

a:hover {
  text-decoration: underline;
}

.container {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
}

.hero {
  padding: 84px 0 64px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 13px;
}

h1 {
  max-width: 920px;
  margin: 0 0 20px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1;
  letter-spacing: -0.05em;
}

h2 {
  margin: 0 0 18px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

.lead {
  max-width: 820px;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 21px;
}

.lead-small {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
}

.cta-row,
.link-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text);
  font-weight: 600;
}

.button:hover {
  text-decoration: none;
  border-color: var(--accent);
}

.button.primary {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

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

.section-heading {
  margin-bottom: 22px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.project-card,
.card {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-card);
}

.project-card.active {
  box-shadow: var(--shadow);
}

.project-meta {
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.project-card p,
.card p {
  margin: 0 0 18px;
  color: var(--muted);
}

.mini-list {
  margin: 0 0 20px;
  padding-left: 22px;
  color: var(--muted);
}

.mini-list li {
  margin: 6px 0;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.muted-pill {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: var(--bg-soft);
  font-size: 14px;
}

.site-footer {
  padding: 36px 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  background: var(--bg-soft);
}

.site-footer p {
  margin: 8px 0;
}

@media (max-width: 900px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .project-grid,
  .grid.three {
    grid-template-columns: 1fr;
  }
}