:root {
  --bg: #ffffff;
  --surface: #f6f8fa;
  --border: #d8dee4;
  --text: #1f2328;
  --muted: #59636e;
  --accent: #c8103f;
  --accent-soft: #ffe3ea;
  --code-bg: #0d1117;
  --code-text: #c9d1d9;
  --red: #cf222e;
  --green: #1a7f37;
  --yellow: #9a6700;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117;
    --surface: #161b22;
    --border: #30363d;
    --text: #e6edf3;
    --muted: #9198a1;
    --accent: #ff5c7c;
    --accent-soft: #3a1022;
    --code-bg: #010409;
    --red: #ff7b72;
    --green: #3fb950;
    --yellow: #e3b341;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }

.site-header { border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; }
.brand img { height: 28px; width: auto; }
.logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  .logo-light { display: none; }
  .logo-dark { display: block; }
}
.site-header { border-top: 4px solid; border-image: linear-gradient(90deg, #7c0549, #ff2e57) 1; }
.site-header nav a { color: var(--muted); margin-left: 20px; font-size: 15px; }
.site-header nav a:hover { color: var(--text); text-decoration: none; }

.hero { padding: 56px 0 24px; }
.hero h1 { font-size: clamp(30px, 6vw, 44px); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 16px; }
.hero p { color: var(--muted); font-size: 19px; margin: 0; max-width: 620px; }

.section-title { font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 40px 0 16px; }

.card {
  display: block; color: inherit; border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; background: var(--surface); margin-bottom: 20px;
  transition: border-color .15s, transform .15s;
}
.card:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-2px); }
.card img { display: block; width: 100%; border-bottom: 1px solid var(--border); }
.card-body { padding: 20px 24px 24px; }
.card h3 { margin: 4px 0 8px; font-size: 22px; line-height: 1.3; }
.card p { margin: 0 0 12px; color: var(--muted); }
.card .more { color: var(--accent); font-weight: 600; font-size: 15px; }

.meta { color: var(--muted); font-size: 14px; margin: 0; }

.section-note { color: var(--muted); margin: -8px 0 20px; font-size: 15px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.grid .card { margin-bottom: 0; display: flex; flex-direction: column; }
.card--small img { aspect-ratio: 1200 / 630; object-fit: cover; }
.card--small .card-body { padding: 16px 18px 20px; }
.card--small h3 { font-size: 18px; }
.card--small p { font-size: 15px; }
.external { color: var(--accent); font-weight: 600; }

.post-header { padding: 48px 0 8px; }
.post-header h1 { font-size: clamp(28px, 5.5vw, 40px); line-height: 1.2; letter-spacing: -0.02em; margin: 8px 0 12px; }
.lede { font-size: 20px; color: var(--muted); margin: 0 0 16px; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag { background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 600; padding: 2px 10px; border-radius: 999px; }

.post-body h2 { font-size: 26px; margin: 44px 0 12px; letter-spacing: -0.01em; }
.post-body h3 { font-size: 20px; margin: 32px 0 8px; }
.post-body img { border-radius: 10px; margin: 8px 0; }
.post-body blockquote { margin: 24px 0; padding: 4px 20px; border-left: 4px solid var(--accent); background: var(--surface); border-radius: 0 8px 8px 0; color: var(--muted); }
.post-body table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 15px; display: block; overflow-x: auto; }
.post-body th, .post-body td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; vertical-align: top; }
.post-body th { background: var(--surface); }
.post-body code { font: 0.88em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--surface); border: 1px solid var(--border); padding: 1px 5px; border-radius: 5px; }
.post-body pre, .post-body .highlight pre {
  background: var(--code-bg); color: var(--code-text); padding: 16px 18px; border-radius: 10px;
  overflow-x: auto; font-size: 14px; line-height: 1.55;
}
.post-body pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }
.post-body .highlight { background: none; }
.highlight .c, .highlight .c1, .highlight .cm { color: #7d8590; }
.highlight .s, .highlight .s1, .highlight .s2 { color: #a5d6ff; }
.highlight .k, .highlight .nb { color: #ff7b72; }
.highlight .nv, .highlight .na { color: #79c0ff; }

.back { margin: 48px 0 0; }

.site-footer { border-top: 1px solid var(--border); margin-top: 72px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 24px; padding-bottom: 40px; color: var(--muted); font-size: 14px; }
