:root {
  --bg: #050505;
  --surface: rgba(20, 20, 20, 0.92);
  --surface-hover: rgba(26, 26, 26, 0.95);
  --border: rgba(74, 224, 164, 0.11);
  --border-hover: rgba(74, 224, 164, 0.28);
  --text: #f0fdf6;
  --muted: #8aaa97;
  --emerald: #4ae0a4;
  --emerald-bright: #6ef5bc;
  --blue: #5b9aff;
  --code-bg: rgba(255, 255, 255, 0.05);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 65% 0%, rgba(74, 224, 164, 0.10), transparent),
    radial-gradient(ellipse 45% 35% at 90% 70%, rgba(91, 154, 255, 0.06), transparent);
  pointer-events: none;
  z-index: 0;
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Nav ── */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
}

.logo {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  text-decoration: none;
}
.logo span { color: var(--emerald); }
.nav-links { display: flex; gap: 20px; align-items: center; }

nav a.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
nav a.nav-link:hover { color: var(--text); }

.nav-cta {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--emerald);
  color: var(--emerald);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.nav-cta:hover { background: var(--emerald); color: #050505; }

/* ── Page head ── */
.page-head { padding: 56px 0 40px; }

.section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--emerald);
  margin-bottom: 10px;
}

.page-head h1 {
  font-size: clamp(34px, 6vw, 52px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.lede { color: var(--muted); font-size: 17px; max-width: 580px; }

.loading { color: var(--muted); padding: 24px 0; }
.loading a { color: var(--emerald); }

/* ── Post list ── */
.post-list { display: flex; flex-direction: column; gap: 14px; padding-bottom: 64px; }

.post-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 26px;
  transition: border-color 0.2s, transform 0.2s;
}
.post-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }

.post-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12.5px;
  color: var(--muted);
  opacity: 0.85;
  margin-bottom: 8px;
}
.post-meta .dot-sep { opacity: 0.5; }

.post-card h2 {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.post-card p { color: var(--muted); font-size: 14.5px; margin-bottom: 14px; }
.post-card .read { color: var(--emerald); font-size: 14px; font-weight: 600; }

/* ── Single post ── */
.back {
  display: inline-block;
  margin: 32px 0 8px;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s;
}
.back:hover { color: var(--emerald); }

.prose { padding: 16px 0 80px; }

.prose h1 {
  font-size: clamp(30px, 5vw, 44px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 6px 0 24px;
}
.prose .post-meta { margin-bottom: 4px; }

.prose h2 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 40px 0 14px;
}
.prose h3 { font-size: 20px; font-weight: 700; margin: 32px 0 12px; }
.prose p { margin: 0 0 18px; color: #dceee4; }
.prose a { color: var(--emerald); text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { color: var(--emerald-bright); }
.prose strong { color: var(--text); }

.prose ul, .prose ol { margin: 0 0 18px; padding-left: 24px; color: #dceee4; }
.prose li { margin-bottom: 6px; }

.prose blockquote {
  border-left: 3px solid var(--emerald);
  padding: 4px 0 4px 20px;
  margin: 0 0 20px;
  color: var(--muted);
  font-style: italic;
}

.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 6px;
}

.prose pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  overflow-x: auto;
  margin: 0 0 20px;
}
.prose pre code { background: none; border: none; padding: 0; font-size: 13.5px; }

.prose img { max-width: 100%; border-radius: 12px; }

.prose hr { border: none; border-top: 1px solid var(--border); margin: 32px 0; }

.prose table { width: 100%; border-collapse: collapse; margin: 0 0 20px; font-size: 14px; }
.prose th, .prose td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.prose th { color: var(--emerald); font-weight: 600; }

/* ── Footer ── */
footer {
  padding: 32px 0;
  border-top: 1px solid rgba(74, 224, 164, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
footer .copy { font-size: 13px; color: var(--muted); opacity: 0.5; }
footer .links { display: flex; gap: 20px; }
footer a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s;
}
footer a:hover { color: var(--emerald); }

@media (max-width: 768px) {
  footer { flex-direction: column; gap: 16px; text-align: center; }
  .nav-links { gap: 14px; }
}
