:root {
  --bg: #16161a;
  --bg-soft: #1e1e24;
  --card: #202027;
  --border: #2e2e38;
  --text: #d7d7dd;
  --muted: #9a9aa6;
  --accent: #c9a25a;
  --accent-soft: #e0c488;
  --link: #8fb7e0;
  --code-bg: #14141a;
  --maxw: 780px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #1b1b22, #16161a);
}
.site-header .wrap { padding-top: 34px; padding-bottom: 30px; }
.site-title {
  margin: 0;
  font-size: 30px;
  letter-spacing: 0.3px;
  color: var(--accent-soft);
}
.site-title a { color: inherit; }
.site-title a:hover { text-decoration: none; }
.site-tagline { margin: 8px 0 0; color: var(--muted); font-size: 16px; }
.site-disclaimer {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-style: italic;
  opacity: 0.85;
}

/* Intro blurb on index */
.intro {
  margin: 34px 0 10px;
  color: var(--text);
}
.intro p { margin: 0 0 14px; }

/* Call-to-action button */
.cta {
  display: inline-block;
  margin-top: 4px;
  padding: 9px 18px;
  background: var(--accent);
  color: #1a1712;
  font-size: 15px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid var(--accent);
}
.cta:hover { background: var(--accent-soft); border-color: var(--accent-soft); text-decoration: none; }

/* Post list */
.post-list { list-style: none; margin: 26px 0 60px; padding: 0; }
.post-card {
  display: flex;
  gap: 18px;
  padding: 18px 0;
  border-top: 1px solid var(--border);
  align-items: flex-start;
}
.post-card:last-child { border-bottom: 1px solid var(--border); }
.post-thumb {
  flex: 0 0 auto;
  width: 120px;
  height: 120px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-soft);
}
.post-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-meta { flex: 1 1 auto; min-width: 0; }
.post-num {
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.post-card h2 { margin: 4px 0 6px; font-size: 21px; line-height: 1.25; }
.post-card h2 a { color: var(--text); }
.post-card h2 a:hover { color: var(--accent-soft); text-decoration: none; }
.post-date { color: var(--muted); font-size: 13px; }
.post-extract { margin: 8px 0 0; color: var(--muted); font-size: 15px; }

/* Single post */
.post { margin: 36px 0 60px; }
.post-header h1 { font-size: 30px; line-height: 1.2; margin: 0 0 6px; color: var(--accent-soft); }
.post-header .post-date { display: block; margin-bottom: 26px; }
.post-body h2 { margin-top: 40px; font-size: 23px; color: var(--accent-soft); border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.post-body h3 { margin-top: 30px; font-size: 19px; color: var(--text); }
.post-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: block;
  margin: 20px auto;
}
.post-body video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin: 20px auto;
  background: #000;
}
.post-body figure { margin: 24px 0; }
.post-body figcaption { text-align: center; color: var(--muted); font-size: 14px; margin-top: 8px; }
.post-body blockquote {
  border-left: 3px solid var(--accent);
  margin: 20px 0;
  padding: 2px 16px;
  color: var(--muted);
  background: var(--bg-soft);
}

/* Code */
.post-body pre, .highlight, code {
  font-family: "SFMono-Regular", "Cascadia Code", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 14px;
}
.post-body :not(pre) > code {
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
  font-size: 0.88em;
}
.post-body pre, .post-body .highlight {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  overflow-x: auto;
  line-height: 1.5;
}
.post-body pre code { background: none; border: none; padding: 0; }

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

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
  padding: 24px 0 50px;
}
.back-link { display: inline-block; color: var(--accent); }

/* Post footer navigation */
.post-nav { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--border); }
.next-part {
  display: block;
  padding: 16px 18px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 18px;
}
.next-part:hover { border-color: var(--accent); text-decoration: none; }
.next-label { display: block; color: var(--accent); font-size: 13px; letter-spacing: 1px; text-transform: uppercase; }
.next-title { display: block; color: var(--text); font-size: 18px; margin-top: 4px; }
.next-part:hover .next-title { color: var(--accent-soft); }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .post-thumb { width: 84px; height: 84px; }
  .post-card h2 { font-size: 18px; }
}
