/* Original blog layout. Colours follow the personal site; serif typography
   and the theme control build on Erdos Problems LLM Hunter. */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --text: #24292f;
  --muted: #57606a;
  --link: #0969da;
  --line: #d0d7de;
  --surface: #f6f8fa;
  --code: #f6f8fa;
  --serif: "Computer Modern Serif", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1117;
  --text: #e6edf3;
  --muted: #9da7b3;
  --link: #79b8ff;
  --line: #30363d;
  --surface: #161b22;
  --code: #161b22;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #0d1117;
    --text: #e6edf3;
    --muted: #9da7b3;
    --link: #79b8ff;
    --line: #30363d;
    --surface: #161b22;
    --code: #161b22;
  }
}
* { box-sizing: border-box; }
html { scrollbar-gutter: stable; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 18px/1.75 var(--serif);
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: var(--link); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, [tabindex="0"]:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 5px;
}
button { font: inherit; }
.wrapper { width: min(100% - 64px, 840px); margin-inline: auto; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 112px; }
.site-title { color: var(--text); font-size: 30px; line-height: 1.2; letter-spacing: -.8px; text-decoration: none; text-wrap: balance; }
.site-title:hover { text-decoration: none; color: var(--link); }
.site-nav { display: flex; flex-shrink: 0; gap: 26px; align-items: center; font: 14px/1.5 var(--sans); }
.site-nav > a { color: var(--text); text-decoration: none; }
.site-nav > a:hover { color: var(--link); text-decoration: underline; }
.theme-toggle { display: inline-flex; gap: 8px; align-items: center; justify-content: center; min-height: 40px; min-width: 85px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 4px; color: var(--text); background: var(--bg); cursor: pointer; font-size: 13px; }
.theme-toggle:hover { border-color: var(--muted); }
.icon-moon { display: none; }
[data-theme="dark"] .icon-moon { display: inline; }
[data-theme="dark"] .icon-sun { display: none; }
.skip-link { position: absolute; top: -100px; left: 16px; z-index: 10; padding: 8px 16px; background: var(--bg); }
.skip-link:focus { top: 12px; }
main { min-height: 60vh; }
h1, h2, h3 { font-weight: normal; line-height: 1.25; }
p { margin: 0 0 1.25em; }
.writing { padding-top: 42px; }
.eyebrow { color: var(--muted); font: 12px/1.5 var(--sans); letter-spacing: .09em; text-transform: uppercase; margin: 0 0 18px; }
.section-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 20px; border-bottom: 1px solid var(--line); padding-bottom: 13px; }
.section-heading h1 { margin: 0; font: 12px/1.5 var(--sans); letter-spacing: .09em; text-transform: uppercase; }
.section-heading a { color: var(--muted); font: 12px/1.5 var(--sans); text-decoration: none; }
.section-heading a:hover { color: var(--link); text-decoration: underline; }
.subscription-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.section-heading .subscribe-link { color: var(--link); }
.post-subscribe { margin: 20px 0 0; font: 13px/1.6 var(--sans); }
.subscribe-box { margin-top: 40px; padding: 24px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.subscribe-box h2 { margin: 0 0 10px; font-size: 25px; }
.subscribe-box > p { margin-bottom: 18px; }
.subscribe-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 18px; border: 1px solid var(--link); border-radius: 4px; font: 14px/1.5 var(--sans); text-decoration: none; }
.subscribe-button:hover { background: var(--bg); }
.subscribe-box .subscribe-note { margin: 14px 0 0; color: var(--muted); font: 12px/1.6 var(--sans); }
.subscribe-address { overflow-wrap: anywhere; }
.post-list { list-style: none; padding: 0; margin: 0; }
.post-list-item { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 25px; padding-block: 32px; border-bottom: 1px solid var(--line); }
.post-list-item > time { font: 13px/1.7 var(--sans); color: var(--muted); padding-top: 4px; }
.post-list-item h3 { font-size: 24px; letter-spacing: -.3px; margin: 0 0 11px; }
.post-list-item h3 a { color: var(--text); text-decoration: none; }
.post-list-item h3 a:hover { color: var(--link); text-decoration: underline; }
.post-list-item p { color: var(--muted); margin: 0 0 14px; font-size: 17px; line-height: 1.65; }
.post-tags { display: flex; flex-wrap: wrap; gap: 6px 16px; list-style: none; margin: 0; padding: 0; color: var(--muted); font: 12px/1.5 var(--sans); }
.sample-label { display: inline-block; color: var(--muted); font: 11px/1.5 var(--sans); letter-spacing: .03em; }
.post-list-item .sample-label { margin-bottom: 8px; }
.empty-state { color: var(--muted); padding-block: 30px; }
.site-footer { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding-block: 28px 36px; margin-top: 74px; border-top: 1px solid var(--line); color: var(--muted); font: 12px/1.6 var(--sans); }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--link); text-decoration: underline; }
.site-footer span[aria-hidden] { padding-inline: 10px; }
.post { max-width: 740px; margin-inline: auto; padding-top: 35px; }
.back-link { font: 13px/1.6 var(--sans); text-decoration: none; }
.post-header { padding-bottom: 30px; margin-bottom: 32px; border-bottom: 1px solid var(--line); }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; color: var(--muted); font: 12px/1.6 var(--sans); margin-top: 38px; }
.post-header h1 { font-size: clamp(30px, 5vw, 42px); letter-spacing: -.9px; margin: 14px 0 20px; }
.post-description { color: var(--muted); font-size: 20px; line-height: 1.6; margin-bottom: 20px; }
.post-content { overflow-wrap: break-word; }
.post-content h2 { font-size: 28px; margin: 1.8em 0 .7em; letter-spacing: -.3px; }
.post-content h3 { font-size: 23px; margin: 1.6em 0 .6em; }
.post-content h2:first-child { margin-top: 0; }
.post-content ul, .post-content ol { padding-left: 1.4em; margin-block: 0 1.25em; }
.post-content li + li { margin-top: .35em; }
.post-content blockquote { margin: 1.6em 0; padding: .15em 0 .15em 22px; border-left: 2px solid var(--link); color: var(--muted); }
.post-content blockquote p:last-child { margin-bottom: 0; }
.post-content hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }
.post-content img, .post-content video { display: block; max-width: 100%; height: auto; margin-inline: auto; border-radius: 3px; }
.post-content figure { margin: 2em 0; }
.post-content figcaption { font: 13px/1.6 var(--sans); color: var(--muted); text-align: center; margin-top: 12px; }
.video-embed { aspect-ratio: 16 / 9; width: 100%; }
.video-embed iframe { display: block; width: 100%; height: 100%; border: 0; }
.post-content video { width: 100%; background: #000; }
.post-content table { border-collapse: collapse; display: block; overflow-x: auto; width: 100%; margin-block: 1.5em; font-size: 16px; }
.post-content th, .post-content td { border: 1px solid var(--line); padding: 8px 14px; text-align: left; }
.post-content th { background: var(--surface); }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
code { font-size: .82em; background: var(--code); padding: .18em .35em; border-radius: 3px; }
pre { padding: 18px 20px; margin: 1.5em 0; border: 1px solid var(--line); border-radius: 4px; background: var(--code); overflow-x: auto; font-size: 14px; line-height: 1.6; }
pre code { font-size: inherit; padding: 0; background: none; }
.highlight { margin-block: 1.5em; }
.highlight pre { margin: 0; }
.highlight .c, .highlight .c1, .highlight .cm { color: var(--muted); font-style: italic; }
.highlight .k, .highlight .kd, .highlight .kn, .highlight .nb { color: var(--link); }
/* Long equations scroll inside the article, never widen the page. */
/* MathJax gives numbered displays an inline min-width; reset it so their
   scroll container can shrink with the article on a phone. */
.post-content mjx-container[display="true"] { display: block; min-width: 0 !important; max-width: 100%; overflow-x: auto; overflow-y: hidden; padding: 8px 2px; }
mjx-container { color: var(--text); }
.post-navigation { display: flex; justify-content: space-between; gap: 30px; border-top: 1px solid var(--line); margin-top: 48px; padding-top: 24px; font-size: 16px; }
.post-navigation a { max-width: 48%; text-decoration: none; }
.post-navigation a:hover { text-decoration: underline; }
.post-navigation span { display: block; font: 12px/1.6 var(--sans); color: var(--muted); margin-bottom: 5px; }
.post-navigation .next-post { margin-left: auto; text-align: right; }
.post-share { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); font: 13px/1.6 var(--sans); }
.post-share h2 { margin: 0 0 10px; color: var(--muted); font: 12px/1.5 var(--sans); letter-spacing: .06em; text-transform: uppercase; }
.share-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; }
.share-links a, .share-copy { display: inline-flex; align-items: center; min-height: 40px; color: var(--link); text-decoration: none; }
.share-copy { background: none; border: 0; padding: 0; cursor: pointer; }
.share-links a:hover, .share-copy:hover { text-decoration: underline; }
.share-status { color: var(--muted); margin: 8px 0 0; }
.share-status:empty { display: none; }
.share-url { width: 100%; margin-top: 12px; padding: 10px; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 3px; }
.not-found { padding-block: 70px; }
.not-found h1 { font-size: 36px; }
@media (max-width: 600px) {
  .wrapper { width: calc(100% - 40px); }
  .header-inner { min-height: 90px; gap: 14px; flex-wrap: wrap; padding-block: 22px; }
  .site-title { font-size: 25px; }
  .site-nav { gap: 16px; font-size: 13px; }
  .theme-toggle { min-width: 40px; padding: 8px; }
  #theme-label { display: none; }
  .writing { padding-top: 30px; }
  .post-list-item { grid-template-columns: 1fr; gap: 10px; padding-block: 26px; }
  .post-list-item > time { padding: 0; font-size: 12px; }
  .post-list-item h3 { font-size: 23px; }
  .post { padding-top: 26px; }
  .post-meta { margin-top: 30px; }
  .post-description { font-size: 18px; }
  .post-content h2 { font-size: 25px; }
  .post-content { font-size: 17px; }
  .site-footer { margin-top: 48px; }
}
@media print {
  :root, :root[data-theme="dark"] { --bg: white; --text: black; --muted: #444; --line: #ccc; --surface: white; --code: #f6f6f6; --link: black; color-scheme: light; }
  .site-nav, .back-link, .post-share, .post-navigation, .site-footer, .skip-link, .post-subscribe, .subscribe-box, .subscription-links { display: none; }
  .wrapper { width: 100%; }
  .site-header { background: white; }
  .header-inner { min-height: 60px; }
  .post { max-width: none; }
  pre { white-space: pre-wrap; }
  mjx-container[display="true"] { overflow: visible; }
}
