/* The entire visual identity lives here. No framework, no web fonts. */
:root {
  color-scheme: dark;
  --bg: #242428;
  --panel: #1b1b20;
  --text: #ece9ed;
  --muted: #b6b1bc;
  --purple: #d3a5ff;
  --green: #a6ed82;
  --line: #55505c;
  --max-width: 920px;
}
* { box-sizing: border-box; }
body { background: var(--bg); color: var(--text); max-width: var(--max-width); margin: 0 auto; padding: 24px clamp(18px,4vw,42px) 32px; font: 18px/1.55 Georgia, 'Times New Roman', serif; }
a { color: var(--green); text-underline-offset: 3px; }
a:visited { color: var(--purple); }
a:hover { color: #fff; }
a:focus-visible { outline: 2px solid var(--purple); outline-offset: 4px; }
.site-header { border-top: 3px solid var(--purple); border-bottom: 1px solid var(--line); padding: 10px 0 12px; margin-bottom: 30px; display: flex; flex-wrap: wrap; gap: 10px 25px; align-items: baseline; justify-content: space-between; font: 14px/1.5 system-ui,sans-serif; }
.site-mark, .site-mark:visited { font-weight: 650; color: var(--muted); text-decoration: none; }
nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
nav a, nav a:visited { color: var(--green); }
nav a[aria-current] { color: var(--purple); font-weight: 650; }
h1, h2, h3 { line-height: 1.2; color: var(--purple); font-weight: normal; }
h1 { font-size: clamp(34px,5vw,52px); margin: 0 0 8px; letter-spacing: -0.025em; }
h2 { font-size: 26px; margin: 0 0 5px; }
h3 { font-size: 21px; }
h2 a, h2 a:visited { color: var(--purple); }
p { margin: 0 0 12px; }
.subtitle { color: var(--green); font-size: 19px; margin-bottom: 22px; }
.intro { display: flex; align-items: flex-start; gap: 24px; max-width: 780px; }
.portrait { width: 128px; height: auto; border: 1px solid var(--line); }
.external-links, .all-link, .entry-links, .breadcrumb, footer { font: 14px/1.6 system-ui,sans-serif; }
hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
.home-section { border-bottom: 1px solid var(--line); padding: 0 0 15px; margin: 0 0 18px; }
.home-section p { margin-bottom: 6px; }
.compact-list { margin: 6px 0 8px; padding-left: 23px; }
.compact-list li { padding: 1px 0; }
li::marker { color: var(--purple); }
.muted { color: var(--muted); font-size: .91em; }
.entry-list { list-style: decimal; padding-left: 26px; margin: 0; }
.entry-list li { margin: 0 0 24px; padding-left: 6px; }
.entry-list h2 { font-size: 22px; }
.entry-list p { margin: 4px 0; }
.breadcrumb { color: var(--muted); margin-bottom: 22px; }
footer { margin-top: 30px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; }
.divider-dot { padding: 0 6px; }
/* Content pages: slightly more modern typography, comfortable reading width. */
.article-page { max-width: 940px; }
.article-page article { max-width: 740px; margin: 0 auto; font: 16px/1.75 system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif; overflow-wrap: anywhere; }
.article-header { margin-bottom: 28px; border-bottom: 1px solid var(--line); padding-bottom: 18px; }
.article-header h1 { font: 650 clamp(28px,4.6vw,41px)/1.18 system-ui,sans-serif; letter-spacing: -.025em; margin-bottom: 14px; }
.article-header p { margin-bottom: 6px; }
.dek { color: var(--muted); font-size: 1.07em; }
.tags { color: var(--purple); font-size: .85em; }
.tags span { margin-right: 8px; }
.prose h1, .prose h2, .prose h3, .prose h4 { font-family: inherit; font-weight: 600; margin-top: 1.6em; margin-bottom: .55em; }
.prose h1 { font-size: 1.7em; } .prose h2 { font-size: 1.45em; } .prose h3 { font-size: 1.2em; }
.prose p { margin-bottom: 1em; }
.prose img { max-width: 100%; height: auto; }
.prose iframe { width: 100%; min-height: 500px; border: 1px solid var(--line); background: white; }
.prose pre { margin: 0; padding: 15px 17px; overflow-x: auto; font: 14px/1.6 ui-monospace,Consolas,monospace; }
.prose .highlight { margin: 1.2em 0; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.prose :not(pre) > code { background: var(--panel); color: var(--green); padding: 2px 4px; border-radius: 3px; font-size: .9em; }
.prose blockquote { margin: 1em 0; padding: 2px 0 2px 18px; color: var(--muted); border-left: 3px solid var(--purple); }
.prose table { display: block; width: max-content; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: .94em; }
.prose td, .prose th { border: 1px solid var(--line); padding: 7px 12px; text-align: left; }
.prose th { color: var(--green); }
.prose .math { max-width: 100%; }
.prose div.math { overflow-x: auto; }
.back { margin: 30px auto 0; max-width: 740px; font: 14px/1.5 system-ui,sans-serif; }
@media(max-width: 560px) { body { font-size: 17px; } .site-header { margin-bottom: 22px; } .intro { flex-direction: column; gap: 12px; } .portrait { width: 104px; } }
/* Publication previews and shared topic links. */
.preview-list { list-style: none; padding: 0; }
.preview-list li { border-bottom: 1px solid var(--line); padding: 0 0 20px; margin: 0 0 20px; }
.preview-list .has-preview { display: grid; grid-template-columns: minmax(0, 180px) minmax(0, 1fr); gap: 22px; align-items: start; }
.preview { display: block; }
.preview img { display: block; width: 100%; height: auto; max-height: 180px; object-fit: contain; object-position: center top; background: var(--panel); border: 1px solid var(--line); }
.entry-details { min-width: 0; overflow-wrap: anywhere; }
.tags a { display: inline-block; margin-right: 10px; color: var(--purple); overflow-wrap: anywhere; }
.tag-controls { font: 14px/1.6 system-ui,sans-serif; margin: 12px 0; }
.tag-controls label { display: block; color: var(--muted); margin-bottom: 4px; }
.tag-controls input { width: min(100%, 320px); border: 1px solid var(--line); color: var(--text); background: var(--panel); padding: 8px 10px; font: inherit; border-radius: 3px; }
.tag-controls input:focus-visible { outline: 2px solid var(--purple); }
.tag-status { margin: 4px 0; }
.tag-list { display: flex; flex-wrap: wrap; gap: 5px 16px; padding: 0; margin: 10px 0; list-style: none; font: 15px/1.7 system-ui,sans-serif; }
.tag-list li { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.tag-count { color: var(--muted); font-size: .85em; }
[hidden] { display: none !important; }
@media(max-width: 560px) {
  .preview-list .has-preview { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .preview { max-width: 240px; }
  .tag-controls input { font-size: 16px; }
}
