:root {
  --bg: #111110;
  --surface: #1c1c1a;
  --line: #2a2a27;
  --text: #F6F3ED;
  --text-2: #D9D5CC;
  --muted: #B5B1A8;
  --accent: #CAFF00;
  --display: 'Space Grotesk', 'Helvetica Neue', sans-serif;
  --body: 'IBM Plex Sans', 'Helvetica Neue', sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 17px; line-height: 1.6; }
a { color: var(--text); }
a:hover { color: var(--accent); }
img, video { max-width: 100%; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.narrow { max-width: 760px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

/* header & footer, same as the portfolio */
.site-header { border-bottom: 1px solid var(--line); }
.nav, .footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.nav { padding-top: 20px; padding-bottom: 20px; }
.logo { font-family: var(--display); font-weight: 700; font-size: 20px; text-decoration: none; letter-spacing: 0.02em; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 15px; text-transform: uppercase; letter-spacing: 0.08em; }
.nav-links a { text-decoration: none; }
.nav-links a.active, .nav-links a.accent { color: var(--accent); }
.site-footer { margin-top: 144px; border-top: 1px solid var(--line); }
.footer { padding-top: 56px; padding-bottom: 56px; }

/* shared type */
.kicker { margin: 0 0 12px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.18em; color: var(--accent); }
.page-title, .post-title { margin: 0 0 16px; font-family: var(--display); font-weight: 700; line-height: 1.02; letter-spacing: -0.02em; }
.page-title { font-size: clamp(2.5rem, 6vw, 4.5rem); }
.post-title { font-size: clamp(2.25rem, 5.5vw, 4rem); }
.lede { margin: 0; color: var(--text-2); font-size: 20px; max-width: 640px; }

/* blog index */
.intro { padding-top: 96px; }
.post-list { list-style: none; margin: 56px 0 0; padding: 0; border-bottom: 1px solid var(--line); }
.post-list li { border-top: 1px solid var(--line); }
.post-card { display: flex; flex-wrap: wrap; gap: 16px 40px; align-items: center; padding: 28px 0; text-decoration: none; }
.post-card img, .post-card .no-cover { flex: 0 0 240px; width: 240px; aspect-ratio: 4 / 3; object-fit: cover; background: var(--surface); display: block; }
.post-meta { flex: 1 1 360px; display: flex; flex-direction: column; gap: 6px; }
.post-meta time { font-size: 14px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.post-card-title { font-family: var(--display); font-weight: 700; font-size: 28px; line-height: 1.2; }
.post-card-desc { color: var(--muted); }
.post-card:hover .post-card-title { color: var(--accent); }
@media (max-width: 600px) { .post-card img, .post-card .no-cover { flex-basis: 100%; width: 100%; } }

/* post */
.post { padding-top: 64px; }
.back { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 24px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.12em; text-decoration: none; color: var(--muted); }
.cover { margin-top: 48px; }
.cover img { display: block; width: 100%; max-height: 640px; object-fit: cover; }
.prose { margin-top: 56px; }
.prose p, .prose li { color: var(--text-2); }
.prose h2 { margin: 56px 0 16px; font-family: var(--display); font-weight: 700; font-size: 32px; line-height: 1.15; color: var(--text); }
.prose h3 { margin: 40px 0 12px; font-family: var(--display); font-weight: 700; font-size: 24px; color: var(--text); }
.prose strong { color: var(--text); font-weight: 500; }
.prose a { color: var(--accent); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: 6px 0; }
.prose blockquote { margin: 32px 0; padding-left: 20px; border-left: 3px solid var(--accent); }
.prose img, .prose video { display: block; width: 100%; height: auto; margin: 32px 0 8px; background: var(--surface); }
.prose figure { margin: 32px 0; }
.prose figure video, .prose figure img { margin: 0 0 8px; }
.prose figcaption, .prose img + em, .prose p > em:only-child { display: block; font-size: 14px; color: var(--muted); font-style: normal; }
.prose .embed { position: relative; aspect-ratio: 16 / 9; margin: 32px 0; }
.prose .embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pager { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; margin-top: 96px; padding-top: 32px; border-top: 1px solid var(--line); }
.pager a { display: flex; flex-direction: column; gap: 4px; max-width: 48%; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 20px; }
.pager a span { font-family: var(--body); font-weight: 400; font-size: 13px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.pager a.right { text-align: right; margin-left: auto; }
@media (max-width: 600px) { .pager a { max-width: 100%; } .pager a.right { text-align: left; margin-left: 0; } }

/* tables and side-by-side images inside posts */
.prose .table-wrap { overflow-x: auto; margin: 32px 0; }
.prose table { border-collapse: collapse; min-width: 520px; width: 100%; font-size: 15px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: center; }
.prose thead th, .prose tbody th { color: var(--text); font-family: var(--display); font-weight: 500; background: var(--surface); }
.prose td { color: var(--accent); }
.prose .pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; align-items: start; margin: 32px 0; }
.prose .pair p { margin: 0; }
.prose .pair img { margin: 0; }
