@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@300;400;600&family=IBM+Plex+Sans:ital,wght@0,300;0,400;0,600;1,300;1,400&display=swap');

:root {
  --bark: #c4b99a;
  --amber: #d4a843;
  --moss: #6d8256;       /* was #5a6b4a — bumped for border visibility */
  --shadow: #0b0b08;
  --lichen: #a09888;     /* was #8a8270 — bumped to 7:1 AAA */
  --deep: #141410;
  --text: #cdc3ad;       /* was #b8ad96 — bumped for comfortable reading */
  --text-dim: #9e9580;   /* was rgba opacity trick — now solid 6.2:1 AA */
  --border: rgba(160,152,136,0.2);
  --code-bg: rgba(20,20,16,0.8);
}

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

html { font-size: 17px; }

body {
  background: var(--shadow);
  color: var(--text);
  font-family: 'IBM Plex Sans', -apple-system, sans-serif;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* Subtle noise texture */
body::before {
  content: '';
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.02'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 100;
}

/* ── Layout ── */
.site-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border);
}
.site-header a {
  color: var(--lichen);
  text-decoration: none;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.88rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}
.site-header a:hover { color: var(--amber); }
.site-header .sep { color: var(--border); margin: 0 0.5rem; }

.content {
  max-width: 680px;
  margin: 0 auto;
  padding: 3rem 2rem 6rem;
}

/* ── Blog Index ── */
.blog-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--amber);
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}
.blog-subtitle {
  font-size: 0.92rem;
  color: var(--lichen);
  margin-bottom: 3rem;
}
.post-list { list-style: none; }
.post-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}
.post-item:first-child { border-top: 1px solid var(--border); }
.post-item a {
  text-decoration: none;
  display: block;
}
.post-item-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--bark);
  margin-bottom: 0.3rem;
  transition: color 0.2s;
}
.post-item a:hover .post-item-title { color: var(--amber); }
.post-item-meta {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-family: 'IBM Plex Mono', monospace;
}
.post-item-excerpt {
  font-size: 0.92rem;
  color: var(--text);
  margin-top: 0.5rem;
  line-height: 1.6;
}

/* ── Article ── */
article h1 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--amber);
  line-height: 1.3;
  margin-bottom: 0.5rem;
}
.article-meta {
  font-size: 0.88rem;
  color: var(--lichen);
  font-family: 'IBM Plex Mono', monospace;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.article-lede {
  font-size: 1.05rem;
  color: var(--bark);
  line-height: 1.8;
  margin-bottom: 2rem;
}

article h2 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--bark);
  margin: 2.5rem 0 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
article h3 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1rem;
  font-weight: 600;
  color: var(--bark);
  margin: 2rem 0 0.8rem;
}

article p {
  margin-bottom: 1.2rem;
}

article a {
  color: var(--amber);
  text-decoration: none;
  border-bottom: 1px solid rgba(212,168,67,0.3);
  transition: border-color 0.2s;
}
article a:hover { border-color: var(--amber); }

article strong { color: var(--bark); font-weight: 600; }
article em { color: var(--bark); }

article blockquote {
  border-left: 3px solid var(--moss);
  padding: 0.8rem 1.2rem;
  margin: 1.5rem 0;
  background: rgba(90,107,74,0.06);
  border-radius: 0 4px 4px 0;
}
article blockquote p {
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}
article blockquote p:last-child { margin-bottom: 0; }

article ul, article ol {
  margin: 1rem 0 1.5rem 1.5rem;
}
article li {
  margin-bottom: 0.4rem;
}

article code {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.85em;
  background: var(--code-bg);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  color: var(--bark);
}
article pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1rem 1.2rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}
article pre code {
  background: none;
  padding: 0;
  font-size: 0.85rem;
  line-height: 1.6;
}

article hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 2.5rem 0;
}

article table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}
article th {
  text-align: left;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
  color: var(--bark);
  padding: 0.6rem 1rem;
  border-bottom: 2px solid var(--border);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
}
article td {
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

/* ── Footer ── */
.article-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--lichen);
  font-family: 'IBM Plex Mono', monospace;
}
.article-footer a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}
.article-footer a:hover { color: var(--amber); border-color: var(--amber); }

/* ── Responsive ── */
@media (max-width: 600px) {
  html { font-size: 16px; }
  .content { padding: 2rem 1.2rem 4rem; }
  article h1 { font-size: 1.35rem; }
  article h2 { font-size: 1.1rem; }
  .site-header { padding: 1.2rem 1.2rem; }
}
