:root {
  --bg: #ffffff;
  --fg: #16181d;
  --muted: #5d6470;
  --line: #e6e8ec;
  --soft: #f5f6f8;
  --accent: #16a34a;
  --accent-ink: #ffffff;
  --link: #0f7a37;
  --code-bg: #0f1218;
  --code-fg: #e6e9ef;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0e12;
    --fg: #e8eaee;
    --muted: #a0a7b3;
    --line: #232731;
    --soft: #141821;
    --link: #4ade80;
    --code-bg: #141821;
    --shadow: none;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 18px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
}
a { color: var(--link); text-underline-offset: 3px; }
img { max-width: 100%; height: auto; }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }

.site-header { border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 5; }
.bar { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { font-weight: 800; letter-spacing: -.01em; color: var(--fg); text-decoration: none; }
nav { display: flex; gap: 16px; align-items: center; font-size: 15px; }
nav a { color: var(--muted); text-decoration: none; }
nav a:hover { color: var(--fg); }
nav .pill { background: var(--accent); color: var(--accent-ink); padding: 7px 14px; border-radius: 999px; font-weight: 600; }
nav .pill:hover { color: var(--accent-ink); filter: brightness(1.05); }

.intro { padding: 48px 0 8px; }
.intro h1 { font-size: 40px; line-height: 1.15; margin: 0 0 10px; letter-spacing: -.02em; }
.intro p { color: var(--muted); margin: 0; }
.post-list { list-style: none; padding: 0; margin: 28px 0 56px; display: grid; gap: 18px; }
.post-list a { display: grid; grid-template-columns: 200px 1fr; gap: 18px; text-decoration: none; color: inherit;
  border: 1px solid var(--line); border-radius: 14px; padding: 14px; box-shadow: var(--shadow); }
.post-list a:hover { border-color: var(--accent); }
.post-list img { border-radius: 10px; width: 200px; aspect-ratio: 16 / 9; object-fit: cover; }
.post-list h2 { font-size: 20px; line-height: 1.3; margin: 2px 0 6px; }
.post-list p { margin: 0 0 6px; color: var(--muted); font-size: 16px; }
.post-list time { font-size: 14px; color: var(--muted); }
@media (max-width: 600px) { .post-list a { grid-template-columns: 1fr; } .post-list img { width: 100%; } }

.post-header { padding: 44px 0 18px; }
.kicker { text-transform: uppercase; letter-spacing: .08em; font-size: 13px; font-weight: 700; color: var(--accent); margin: 0 0 10px; }
.post-header h1 { font-size: 40px; line-height: 1.15; letter-spacing: -.02em; margin: 0 0 14px; }
.lede { font-size: 20px; color: var(--muted); margin: 0 0 14px; }
.meta { font-size: 15px; color: var(--muted); margin: 0; }
@media (max-width: 600px) { .post-header h1, .intro h1 { font-size: 30px; } .lede { font-size: 18px; } }

.video { position: relative; display: block; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); margin: 8px 0 28px; }
.video img { display: block; width: 100%; }
.video .play { position: absolute; left: 50%; top: 50%; width: 78px; height: 54px; margin: -27px 0 0 -39px;
  background: #ff0033; border-radius: 14px; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.video .play::after { content: ""; position: absolute; left: 32px; top: 15px; border-style: solid;
  border-width: 12px 0 12px 20px; border-color: transparent transparent transparent #fff; }
.video:hover .play { filter: brightness(1.1); }

.post-body h2 { font-size: 28px; line-height: 1.25; letter-spacing: -.01em; margin: 44px 0 12px; }
.post-body h3 { font-size: 21px; margin: 30px 0 8px; }
.post-body p, .post-body li { margin: 0 0 14px; }
.post-body ul, .post-body ol { padding-left: 22px; margin: 0 0 18px; }
.post-body li { margin-bottom: 8px; }
.post-body figure { margin: 22px 0 28px; }
.post-body figure img { border-radius: 12px; border: 1px solid var(--line); display: block; }
.post-body figcaption { font-size: 15px; color: var(--muted); margin-top: 8px; text-align: center; }
.post-body code { font: 15px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--soft);
  border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.code-wrap { position: relative; margin: 0 0 18px; }
.post-body pre { background: var(--code-bg); color: var(--code-fg); border-radius: 12px; padding: 18px 18px 18px;
  overflow-x: auto; white-space: pre-wrap; word-wrap: break-word; margin: 0; }
.post-body pre code { background: none; border: 0; padding: 0; color: inherit; font-size: 15px; line-height: 1.6; }
.post-body div.highlight, .post-body .highlighter-rouge { background: none; }
.post-body pre.highlight { background: var(--code-bg); color: var(--code-fg); }
.copy { position: absolute; top: 10px; right: 10px; font: 600 13px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #e6e9ef; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); border-radius: 8px;
  padding: 7px 10px; cursor: pointer; }
.copy:hover { background: rgba(255, 255, 255, .18); }
.post-body pre { padding-right: 84px; }

.post-body table { width: 100%; border-collapse: collapse; margin: 8px 0 24px; font-size: 16px; display: block; overflow-x: auto; }
.post-body th, .post-body td { border: 1px solid var(--line); padding: 10px 12px; vertical-align: top; text-align: left; }
.post-body thead th { background: var(--soft); }
.post-body td:first-child { font-weight: 600; white-space: nowrap; }

.tldr { background: var(--soft); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 12px;
  padding: 18px 20px 6px; margin: 0 0 8px; }
.tldr h2 { margin-top: 0 !important; font-size: 22px !important; }

.cta-box { margin: 48px 0 64px; padding: 26px; border-radius: 16px; background: var(--soft); border: 1px solid var(--line); }
.cta-box h2 { margin: 0 0 8px; font-size: 24px; }
.cta-box p { margin: 0 0 16px; color: var(--muted); }
.button { display: inline-block; background: var(--accent); color: var(--accent-ink); text-decoration: none; font-weight: 700;
  padding: 12px 20px; border-radius: 999px; }
.button:hover { filter: brightness(1.05); }

.site-footer { border-top: 1px solid var(--line); padding: 26px 0 40px; color: var(--muted); font-size: 15px; }
.site-footer p { margin: 0 0 6px; }
