:root {
  --bg: #fafaf7;
  --surface: #ffffff;
  --text: #1c241e;
  --muted: #5a665d;
  --border: #e3e7e0;
  --accent: #2f6f4e;
  --accent-soft: #eaf3ee;
  --max-w: 820px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111512;
    --surface: #181d19;
    --text: #e7ece8;
    --muted: #98a49b;
    --border: #262e28;
    --accent: #5bb384;
    --accent-soft: #1a2c22;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  gap: 22px;
  font-size: 0.94rem;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--accent);
}

main {
  padding: 48px 0 64px;
}

.hero {
  margin-bottom: 44px;
}

.badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 14px;
}

h1 {
  font-size: clamp(1.85rem, 3.2vw, 2.4rem);
  line-height: 1.22;
  letter-spacing: -0.025em;
  margin: 0 0 14px;
}

.lead {
  font-size: 1.08rem;
  color: var(--muted);
  margin: 0;
  max-width: 640px;
}

h2 {
  font-size: 1.25rem;
  letter-spacing: -0.015em;
  margin: 40px 0 16px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  transition: border-color 0.15s ease;
}

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

.card h3 {
  margin: 0 0 8px;
  font-size: 1.04rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--border);
}

.post-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.post-list a {
  color: var(--text);
  text-decoration: none;
  font-weight: 550;
}

.post-list a:hover {
  color: var(--accent);
}

.meta {
  color: var(--muted);
  font-size: 0.86rem;
  white-space: nowrap;
}

article p {
  margin: 0 0 18px;
}

pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  overflow-x: auto;
  font-size: 0.88rem;
}

footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
