:root {
  --bg:          #0a0e17;
  --bg-card:     #111827;
  --bg-code:     #0f172a;
  --teal:        #14b8a6;
  --teal-light:  #5eead4;
  --teal-dim:    #0d9488;
  --text:        #e2e8f0;
  --text-muted:  #64748b;
  --text-soft:   #94a3b8;
  --border:      #1e293b;
  --accent:      #f59e0b;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 17px; scroll-behavior: smooth; }

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

/* ── Header ─────────────────────────────────────── */
.site-header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(10,14,23,0.92);
  backdrop-filter: blur(8px);
  z-index: 100;
}
.header-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -.01em;
  display: flex;
  align-items: center;
  gap: .45rem;
}
.logo-mark {
  width: 22px;
  height: 22px;
  background: var(--teal);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.logo-mark::after {
  content: '';
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bg);
}
nav { display: flex; gap: 1.5rem; }
nav a {
  color: var(--text-soft);
  text-decoration: none;
  font-size: .9rem;
  transition: color .15s;
}
nav a:hover, nav a.active { color: var(--teal-light); }

/* ── Main ────────────────────────────────────────── */
main {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 1.25rem 5rem;
  flex: 1;
}

/* ── Hero ────────────────────────────────────────── */
.hero {
  padding: 4rem 0 3.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}
.hero-tag {
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1rem;
  font-weight: 600;
}
.hero h1 {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.03em;
  margin-bottom: 1.1rem;
  color: #f8fafc;
}
.hero p {
  font-size: 1.05rem;
  color: var(--text-soft);
  max-width: 560px;
  line-height: 1.7;
}

/* ── Post list ───────────────────────────────────── */
.section-title {
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 1.5rem;
}
.post-list { display: flex; flex-direction: column; gap: .25rem; }
.post-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 1rem;
  padding: .85rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}
.post-item:hover .post-item-title { color: var(--teal-light); }
.post-item-title {
  color: var(--text);
  font-weight: 600;
  font-size: .97rem;
  transition: color .15s;
}
.post-item-meta {
  color: var(--text-muted);
  font-size: .8rem;
  white-space: nowrap;
}
.post-item-tag {
  display: inline-block;
  font-size: .7rem;
  padding: .15rem .55rem;
  border-radius: 999px;
  background: rgba(20,184,166,.12);
  color: var(--teal);
  margin-top: .2rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* ── Post page ───────────────────────────────────── */
.post-header {
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}
.tag {
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 700;
  margin-bottom: .75rem;
}
.post-header h1 {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.025em;
  color: #f8fafc;
  margin-bottom: .75rem;
}
.post-meta {
  font-size: .82rem;
  color: var(--text-muted);
}
.post-hero {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 2.5rem;
  display: block;
  border: 1px solid var(--border);
}

/* ── Body text ───────────────────────────────────── */
main p { margin-bottom: 1.35rem; color: var(--text-soft); }
main p:last-child { margin-bottom: 0; }
main h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 2.25rem 0 .85rem;
  letter-spacing: -.02em;
}
main h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 1.75rem 0 .6rem;
}
main a { color: var(--teal-light); text-decoration: none; border-bottom: 1px solid rgba(94,234,212,.25); transition: border-color .15s; }
main a:hover { border-color: var(--teal-light); }
main strong { color: var(--text); font-weight: 600; }
main em { font-style: italic; }
main ul, main ol { margin: 0 0 1.35rem 1.5rem; color: var(--text-soft); }
main li { margin-bottom: .35rem; }
main hr { border: none; border-top: 1px solid var(--border); margin: 2.5rem 0; }

pre {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 0 0 1.5rem;
  font-size: .84rem;
  line-height: 1.65;
}
code {
  font-family: "Menlo", "SF Mono", "Fira Code", monospace;
  font-size: .88em;
}
pre code { font-size: inherit; color: #a8c4d4; }
:not(pre) > code {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: .12em .45em;
  color: var(--teal-light);
}

/* ── About / static pages ────────────────────────── */
.page-header {
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}
.page-header h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -.025em;
  color: #f8fafc;
  margin-bottom: .5rem;
}
.page-header p { font-size: .9rem; color: var(--text-muted); margin: 0; }

/* ── Footer ──────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 1.25rem;
  text-align: center;
  font-size: .8rem;
  color: var(--text-muted);
}
.site-footer a { color: var(--text-muted); text-decoration: none; border: none; }
.site-footer a:hover { color: var(--teal-light); }

/* ── 404 ─────────────────────────────────────────── */
.not-found {
  text-align: center;
  padding: 6rem 0;
}
.not-found h1 { font-size: 5rem; font-weight: 900; color: var(--teal); margin-bottom: 1rem; }
.not-found p { color: var(--text-soft); margin-bottom: 2rem; }
.btn {
  display: inline-block;
  padding: .6rem 1.4rem;
  background: var(--teal);
  color: var(--bg);
  border-radius: 6px;
  font-weight: 700;
  font-size: .9rem;
  text-decoration: none;
  border: none;
  transition: background .15s;
}
.btn:hover { background: var(--teal-light); }

@media (max-width: 600px) {
  .hero h1 { font-size: 1.75rem; }
  .post-header h1 { font-size: 1.5rem; }
  .post-item { grid-template-columns: 1fr; gap: .25rem; }
  .post-item-meta { display: none; }
}
