:root {
  color-scheme: light;
  --bg: #fcfbf8; --surface: #fff; --text: #24242b; --muted: #696972;
  --line: #e7e4df; --accent: #7652b5; --hover: #f2eef6; --code: #f1f0ed;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #14151b; --surface: #1c1e27; --text: #e7e7ed; --muted: #a5a5b6;
  --line: #30313d; --accent: #bfa0f0; --hover: #272334; --code: #1e202a;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #14151b; --surface: #1c1e27; --text: #e7e7ed; --muted: #a5a5b6;
    --line: #30313d; --accent: #bfa0f0; --hover: #272334; --code: #1e202a;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 2rem; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.8 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; overflow-wrap: break-word; }
a { color: var(--accent); text-underline-offset: .22em; }
a:hover { text-decoration: underline; }
button, input { font: inherit; }
button { cursor: pointer; }
button, input { color: var(--text); }
button { background: transparent; border: 1px solid var(--line); border-radius: 8px; padding: .35rem .7rem; }
button:hover { background: var(--hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.site-shell { width: min(100% - 48px, 820px); min-height: 100vh; margin: 0 auto; display: flex; flex-direction: column; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 28px 0; border-bottom: 1px solid var(--line); }
.brand { font-weight: 750; letter-spacing: -.04em; font-size: 1.2rem; color: var(--text); text-decoration: none; white-space: nowrap; }
.brand-dot { color: var(--accent); }
.site-header nav { display: flex; align-items: center; gap: 14px; font-size: .875rem; }
.site-header nav a { color: var(--muted); text-decoration: none; }
.site-header nav a[aria-current] { color: var(--text); }
main { flex: 1; min-width: 0; }
h1, h2, h3 { line-height: 1.4; letter-spacing: -.025em; }
h1 { font-size: clamp(2rem, 5vw, 2.75rem); margin: 12px 0 20px; }
.intro { padding: 68px 0 48px; }
.eyebrow { font-size: .7rem; letter-spacing: .19em; font-weight: 650; color: var(--accent); margin: 0; }
.intro-description { color: var(--muted); margin: 0; }
.section-heading { display: flex; justify-content: space-between; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.section-heading h2 { margin: 0; font-size: .9rem; }
.section-heading span { font-size: .8rem; color: var(--muted); }
.post-card { padding: 28px 0 30px; border-bottom: 1px solid var(--line); }
.post-card time { font-size: .8rem; font-variant-numeric: tabular-nums; color: var(--muted); }
.post-card h3 { font-size: 1.3rem; margin: 8px 0 10px; }
.post-card h3 a { color: var(--text); text-decoration: none; }
.post-card h3 a:hover { color: var(--accent); }
.post-card p { margin: 0 0 12px; color: var(--muted); font-size: .95rem; }
.read-more { font-size: .85rem; text-decoration: none; }
.site-footer { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; margin-top: 72px; padding: 24px 0 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: .75rem; }
.site-footer a { color: inherit; text-decoration: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 10; top: 8px; left: 8px; padding: 8px 16px; background: var(--surface); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
kbd { font-size: .7rem; font-family: inherit; color: var(--muted); }
dialog { width: min(640px, calc(100% - 32px)); max-height: 80vh; max-height: 80dvh; margin: 10vh auto; padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); box-shadow: 0 24px 100px #0003; }
dialog::backdrop { background: #0007; }
body:has(dialog[open]) { overflow: hidden; }
.search-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.search-header h2 { font-size: 1.1rem; margin: 0; }
#search-input { width: 100%; background: var(--bg); border: 1px solid var(--line); padding: 12px; border-radius: 8px; }
#search-status { color: var(--muted); font-size: .85rem; }
#search-results { list-style: none; padding: 0; margin: 0; }
#search-results li + li { border-top: 1px solid var(--line); }
.search-result { display: block; padding: 16px 8px; text-decoration: none; border-radius: 6px; }
.search-result:hover { background: var(--hover); text-decoration: none; }
.search-result strong { display: block; line-height: 1.6; }
.search-result p { margin: 6px 0 0; font-size: .85rem; color: var(--muted); }
.empty-page { padding: 80px 0; }
@media (max-width: 560px) {
  .site-shell { width: calc(100% - 36px); }
  .site-header { padding: 20px 0; gap: 10px; flex-wrap: wrap; }
  .site-header nav { gap: 10px; }
  .brand { font-size: 1.05rem; }
  .site-header button { padding: .3rem .5rem; }
  .site-header kbd { display: none; }
  .intro { padding: 44px 0 36px; }
  .post-card h3 { font-size: 1.15rem; }
  .site-footer { margin-top: 48px; }
  dialog { padding: 18px; }
}
