:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #18212f;
  --muted: #637083;
  --border: #dce2ea;
  --accent: #1769e0;
  --accent-dark: #0d4fae;
  --code-bg: #111827;
  --code-text: #e5e7eb;
  --notice-bg: #edf5ff;
  --max-width: 920px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

a { color: var(--accent-dark); }
a:hover { color: var(--accent); }
.container { width: min(calc(100% - 2rem), var(--max-width)); margin-inline: auto; }
.skip-link { position: absolute; left: -9999px; top: 0; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 10; padding: .5rem .75rem; background: var(--surface); }
.site-header { background: rgba(255, 255, 255, .92); border-bottom: 1px solid var(--border); }

.header-inner,
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.header-inner { min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--text); font-size: 1.1rem; font-weight: 800; text-decoration: none; }
.brand-mark { display: grid; width: 2.15rem; height: 2.15rem; place-items: center; border-radius: .6rem; color: #fff; background: var(--accent); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .9rem; }
nav { display: flex; gap: 1.25rem; }
nav a { color: var(--muted); font-size: .95rem; font-weight: 650; text-decoration: none; }
nav a:hover { color: var(--accent); }
.page-content { min-height: calc(100vh - 160px); padding-block: 4.5rem; }

.hero {
  margin-bottom: 4.5rem;
  padding: 3.5rem;
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  background: linear-gradient(135deg, #fff 0%, #edf5ff 100%);
  box-shadow: 0 18px 50px rgba(20, 34, 55, .08);
}

.eyebrow { margin: 0 0 .5rem; color: var(--accent-dark); font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
h1, h2, h3 { margin-top: 0; line-height: 1.2; letter-spacing: -.025em; }
h1 { max-width: 760px; margin-bottom: 1rem; font-size: clamp(2.25rem, 6vw, 4rem); }
h2 { margin-top: 2.75rem; font-size: clamp(1.55rem, 3vw, 2rem); }
h3 { font-size: 1.3rem; }
.lead { max-width: 760px; margin-bottom: 0; color: var(--muted); font-size: 1.18rem; }
.section-heading { margin-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.section-heading h2 { margin-bottom: 1rem; }
.post-list { display: grid; gap: 1rem; }

.post-card {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.6rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--surface);
}

.post-card h3 { margin-bottom: .4rem; }
.post-card h3 a { color: var(--text); text-decoration: none; }
.post-card p { margin: 0; color: var(--muted); }
.post-card-meta { margin-bottom: .55rem !important; font-size: .82rem; }
.read-more { flex: 0 0 auto; font-weight: 700; text-decoration: none; }
.post { max-width: 780px; margin-inline: auto; }
.post-header { margin-bottom: 2rem; }
.post-header h1 { font-size: clamp(2.2rem, 6vw, 3.7rem); }
.post-meta { display: flex; gap: .6rem; margin-top: 1rem; color: var(--muted); font-size: .9rem; }
.post-body h2 { margin-top: 3rem; padding-top: .25rem; }
.post-body li + li { margin-top: .35rem; }

.notice {
  margin: 2rem 0 3rem;
  padding: 1rem 1.15rem;
  border-left: 4px solid var(--accent);
  border-radius: 0 .65rem .65rem 0;
  background: var(--notice-bg);
}

code { padding: .12rem .35rem; border-radius: .3rem; color: #9a3412; background: #ffedd5; font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; font-size: .9em; }
pre { overflow-x: auto; margin: 1.25rem 0 1.75rem; padding: 1.2rem; border: 1px solid #273449; border-radius: .75rem; color: var(--code-text); background: var(--code-bg); box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
pre code { padding: 0; color: inherit; background: transparent; font-size: .88rem; }
.highlight { border-radius: .75rem; background: var(--code-bg); }
.highlight .c, .highlight .c1 { color: #94a3b8; }
.highlight .k, .highlight .kd { color: #c084fc; }
.highlight .s, .highlight .s1, .highlight .s2 { color: #86efac; }
.highlight .nv, .highlight .na { color: #7dd3fc; }
.highlight .nb, .highlight .nf { color: #fbbf24; }
.post-footer { margin-top: 4rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.site-footer { padding-block: 1.5rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .85rem; }

@media (max-width: 680px) {
  body { font-size: 16px; }
  .header-inner { align-items: flex-start; flex-direction: column; padding-block: 1rem; }
  nav { width: 100%; justify-content: space-between; gap: .75rem; }
  .page-content { padding-block: 2.5rem; }
  .hero { margin-bottom: 3rem; padding: 2rem 1.4rem; }
  .post-card { align-items: flex-start; flex-direction: column; gap: 1rem; }
  .footer-inner { align-items: flex-start; flex-direction: column; gap: .25rem; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --surface: #111a2a;
    --text: #e8edf5;
    --muted: #a3afc2;
    --border: #263348;
    --accent: #60a5fa;
    --accent-dark: #93c5fd;
    --notice-bg: #102542;
  }
  .site-header { background: rgba(11, 18, 32, .92); }
  .hero { background: linear-gradient(135deg, #111a2a 0%, #102542 100%); box-shadow: none; }
  code { color: #fdba74; background: #431407; }
}

