:root {
  --bg: #ffffff;
  --surface: #f4f5f8;
  --fg: #171a21;
  --muted: #5c6472;
  --accent: #3d5afe;
  --border: #e2e5ec;
  --radius: 12px;
  --max: 68rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1117;
    --surface: #171a23;
    --fg: #e7e9ef;
    --muted: #9aa3b5;
    --accent: #8ba4ff;
    --border: #262a36;
  }
}

body {
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* --- nagłówek --- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  max-width: var(--max);
  margin-inline: auto;
  width: 100%;
}
.brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 650;
  text-decoration: none;
  letter-spacing: -.01em;
}
.topbar nav { display: flex; gap: 1.25rem; }
.topbar nav a {
  text-decoration: none;
  color: var(--muted);
  padding-block: .25rem;
}
.topbar nav a:hover { color: var(--fg); }
.topbar nav a.is-active {
  color: var(--fg);
  box-shadow: inset 0 -2px 0 var(--accent);
}

/* --- treść --- */
main {
  flex: 1;
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding: 3rem 1.5rem;
}

.hero { max-width: 34rem; }
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -.02em;
  margin-bottom: 1rem;
}
.hero p { color: var(--muted); font-size: 1.125rem; }

.btn {
  display: inline-block;
  margin-top: 1.75rem;
  padding: .7rem 1.4rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 550;
}
.btn:hover { filter: brightness(1.08); }

.cards {
  margin-top: 4rem;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.card img { width: 40px; height: 40px; margin-bottom: 1rem; }
.card h2 { font-size: 1.05rem; margin-bottom: .35rem; }
.card p { color: var(--muted); font-size: .95rem; }

code {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: .1em .35em;
  font-size: .9em;
}

.prose { max-width: 42rem; }
.prose h1 { font-size: 2.25rem; letter-spacing: -.02em; margin-bottom: 1rem; }
.prose h2 { font-size: 1.25rem; margin: 2rem 0 .5rem; }
.prose p, .prose li { color: var(--muted); }
.prose ul li { padding-left: 1.1rem; position: relative; }
.prose ul li::before {
  content: "";
  position: absolute;
  left: 0; top: .7em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.prose a { color: var(--accent); }

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