/* Shared across all pages: variables, resets, nav, footer, and the
   handful of primitives (.wrap, .label) every page builds on. Each
   page's <style> block only holds what's unique to that page. */

:root {
  --bg: #0D0D10;
  --bg-raised: #131316;
  --text: #F2F2F0;
  --text-muted: #8A8A90;
  --text-faint: #55555C;
  --accent: #9B8FFF;
  --accent-dim: #4A4470;
  --border: #212126;
  --border-soft: #1A1A1F;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  --max-w: 840px;
}

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

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

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

.label {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.label::before { content: '# '; color: var(--text-faint); }

/* Nav */
nav {
  position: sticky;
  top: 0;
  background: rgba(13,13,16,0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-soft);
  z-index: 10;
}
nav .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 56px;
}
nav .brand {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text);
}
nav .brand .dot { color: var(--accent); }
nav .links {
  display: flex;
  gap: 24px;
  font-family: var(--mono);
  font-size: 13px;
}
nav .links a { color: var(--text-muted); }
nav .links a:hover { color: var(--text); text-decoration: none; }

nav .nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 32px;
  height: 32px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
}
nav .nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 1px;
  transition: background 0.15s ease;
}
nav .nav-toggle:hover span { background: var(--text); }

@media (max-width: 640px) {
  nav .nav-toggle { display: flex; }
  nav .links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border-soft);
    padding: 8px 0;
  }
  nav .links.open { display: flex; }
  nav .links a { padding: 12px 24px; }
}

/* Tags — same look wherever they appear (blog list, post detail, news) */
.tag {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  padding: 2px 8px;
  border-radius: 3px;
}
.tags { display: flex; gap: 8px; flex-wrap: wrap; }

/* Footer */
footer {
  padding: 40px 0;
  text-align: center;
}
footer p {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-faint);
}
footer p.tagline { margin-bottom: 6px; color: var(--text-muted); }
