:root {
  color-scheme: light;
  --bg: #F7F2E8; --text: #302D29; --accent: #A34E2D; --muted: #857C70;
  --surface: #E9DFCF; --border: #DCD2C1; --secondary: #665e54;
  --syntax-comment: #665e54; --syntax-string: #526336; --syntax-number: #84502f;
  --mono: ui-monospace, 'Cascadia Code', 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #181A1B; --text: #E8E6E3; --accent: #D48465; --muted: #ADA69C;
  --surface: #242627; --border: #54462F; --secondary: #ADA69C;
  --syntax-comment: #ADA69C; --syntax-string: #c6d5a0; --syntax-number: #e7ba8e;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #181A1B; --text: #E8E6E3; --accent: #D48465; --muted: #ADA69C;
    --surface: #242627; --border: #54462F; --secondary: #ADA69C;
    --syntax-comment: #ADA69C; --syntax-string: #c6d5a0; --syntax-number: #e7ba8e;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); color: var(--text); scroll-padding-top: 1rem; }
body { margin: 0; font: 18px/1.75 Georgia, 'Times New Roman', serif; overflow-wrap: break-word; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { text-decoration-style: dashed; }
button, input, summary { font: inherit; }
button, summary, label { -webkit-tap-highlight-color: transparent; }
button { color: var(--text); cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }
::selection { background: var(--accent); color: var(--bg); }
.site-shell { max-width: 880px; margin: auto; padding: 0 32px; }
.site-header { border-bottom: 1px solid var(--border); padding: 26px 0 18px; }
.site-header nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.wordmark { font: 600 1rem/1.5 var(--mono); color: var(--text); white-space: nowrap; text-decoration: none; }
.nav-links { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; font: .78rem/1.6 var(--mono); }
.nav-links a { color: var(--secondary); text-decoration: none; }
.nav-links a:hover, .nav-links [aria-current] { color: var(--accent); text-decoration: underline; }
.theme-toggle { border: 1px solid var(--border); background: transparent; border-radius: 50%; width: 32px; height: 32px; padding: 0; font: 21px/1 var(--mono); }
.theme-toggle:hover { background: var(--surface); }
.listening-indicator { min-height: 46px; display: flex; justify-content: flex-end; align-items: center; text-align: right; font: .7rem/1.6 var(--mono); padding-top: 8px; }
.listening-indicator a { color: var(--secondary); text-decoration: none; }
.listening-indicator a:hover { color: var(--accent); }
.listening-indicator .metadata { font-size: .68rem; }
.home-intro { padding: 34px 0 45px; text-align: center; }
.figlet { color: var(--accent); font: clamp(4px, 1.3vw, 12px)/1.05 var(--mono); background: transparent; border: 0; white-space: pre; overflow: visible; margin: 0 auto 32px; padding: 0; width: max-content; max-width: 100%; text-align: left; letter-spacing: 0; }
.introduction { max-width: 565px; margin: auto; font-size: 1rem; line-height: 1.8; }
.introduction p { margin: 18px 0; }
.introduction .byline { color: var(--secondary); font-size: .9rem; }
.writing { border-top: 1px solid var(--border); padding-top: 25px; }
h1, h2, h3, h4 { line-height: 1.3; font-weight: normal; }
h1 { font-size: clamp(2rem, 5vw, 2.8rem); letter-spacing: -.035em; }
h2 { font-size: 1.65rem; margin: 1.5em 0 .7em; }
h3 { font-size: 1.24rem; margin: 0 0 .4em; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-heading h2 { margin: 0 0 20px; }
.section-heading > a { font: .72rem/1.6 var(--mono); }
.metadata, .eyebrow { font: .73rem/1.8 var(--mono); color: var(--secondary); }
.eyebrow { text-decoration: none; }
.entry-list { list-style: none; padding: 0; margin: 12px 0; }
.writing-entry { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 13px; padding: 25px 0; border-bottom: 1px solid var(--border); }
.entry-number { font: .8rem/1.9 var(--mono); color: var(--muted); }
.writing-entry h3 a { color: var(--text); text-decoration: none; }
.writing-entry h3 a:hover { color: var(--accent); text-decoration: underline; }
.writing-entry .metadata { margin: 6px 0; }
.entry-excerpt { margin: 10px 0 0; font-size: 1rem; }
.tag-filter { font: .75rem/1.7 var(--mono); margin: 12px 0 20px; max-width: 100%; }
.tag-filter summary { cursor: pointer; width: fit-content; padding: 6px 12px; border: 1px solid var(--border); border-radius: 3px; }
.tag-filter[open] summary { color: var(--accent); background: var(--surface); }
.tag-filter fieldset { border: 1px solid var(--border); padding: 16px; margin: 12px 0 0; }
.tag-filter legend { padding: 0 6px; color: var(--secondary); }
.tag-options { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-option { position: relative; cursor: pointer; }
.tag-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tag-option span { display: block; padding: 6px 12px; border: 1px solid var(--border); border-radius: 3px; }
.tag-option input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.tag-option input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.clear-filter { margin-top: 16px; padding: 3px 0; background: none; border: none; color: var(--accent); text-decoration: underline; }
.page-content { padding: 48px 0 10px; }
.page-heading { margin-bottom: 40px; }
.page-heading h1 { margin: 12px 0 16px; }
.lede { color: var(--secondary); font-size: 1.05rem; max-width: 620px; }
.prose { min-width: 0; }
.prose p, .prose ul, .prose ol { margin-top: 0; margin-bottom: 1.3em; }
.prose h2, .prose h3, .prose h4 { margin-top: 1.8em; }
.prose img { display: block; max-width: 100%; height: auto; margin: 24px auto; }
.prose blockquote { margin: 24px 0; padding: 5px 22px; border-left: 3px solid var(--accent); color: var(--secondary); }
.prose blockquote p:last-child { margin-bottom: 0; }
pre, code { font-family: var(--mono); font-size: .82em; }
code { background: var(--surface); padding: .15em .3em; border-radius: 3px; overflow-wrap: anywhere; }
pre { padding: 20px; background: var(--surface); border: 1px solid var(--border); overflow-x: auto; line-height: 1.65; tab-size: 4; }
pre code { font-size: inherit; background: none; padding: 0; overflow-wrap: normal; }
.highlight { max-width: 100%; }
.highlight .c, .highlight .c1, .highlight .cm, .highlight .cp { color: var(--syntax-comment); font-style: italic; }
.highlight .k, .highlight .kd, .highlight .kn, .highlight .kt, .highlight .o, .highlight .ow, .highlight .nf { color: var(--accent); }
.highlight .s, .highlight .s1, .highlight .s2, .highlight .sr { color: var(--syntax-string); }
.highlight .m, .highlight .mi, .highlight .mf, .highlight .mh { color: var(--syntax-number); }
.table-scroll { overflow-x: auto; margin-bottom: 24px; }
table { border-collapse: collapse; width: 100%; font-size: .9em; }
th, td { border: 1px solid var(--border); padding: 10px 14px; text-align: left; }
th { background: var(--surface); }
hr { border: 0; border-top: 1px solid var(--border); margin: 32px 0; }
.article-toc { background: var(--surface); padding: 12px 20px; margin: 0 0 30px; font-size: .9rem; }
.article-toc summary { cursor: pointer; }
.post-pagination { display: flex; justify-content: space-between; gap: 24px; border-top: 1px solid var(--border); margin-top: 40px; padding-top: 20px; font-size: .9rem; }
.journal-group > h2 { font: .85rem/1.8 var(--mono); color: var(--secondary); border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.journal-entry { margin: 26px 0 32px; }
.journal-entry .metadata { margin: 5px 0 14px; }
.journal-entry h3 a { text-decoration: none; }
.music-section + .music-section { border-top: 1px solid var(--border); margin-top: 36px; padding-top: 4px; }
.record-list, .track-list, .contact-links { list-style: none; margin: 0; padding: 0; }
.record-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 32px 24px; }
.record-list > li { min-width: 0; max-width: 280px; margin: 0; }
.record-list img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 4px; margin: 0 0 14px; }
.record-list h3 { margin: 0 0 4px; font-size: 1.1rem; line-height: 1.4; }
.record-list h3 a { text-decoration: none; }
.record-list h3 a:hover { text-decoration: underline; }
.track-list > li { display: flex; align-items: flex-start; gap: 18px; margin: 18px 0; }
.track-list img { object-fit: cover; flex-shrink: 0; border-radius: 2px; }
.track-list { font-size: .95rem; }
.track-list .track-artist { display: block; color: var(--secondary); font-size: .85em; }
.track-list a { color: var(--text); }
.contact-links li { border-bottom: 1px solid var(--border); padding: 12px 0; max-width: 420px; }
.contact-links a { display: flex; justify-content: space-between; text-decoration: none; }
.empty-note { color: var(--secondary); font-style: italic; font-size: 1rem; }
.site-footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 24px 0 32px; margin-top: 65px; border-top: 1px solid var(--border); color: var(--secondary); font: .7rem/1.8 var(--mono); }
.site-footer div { display: flex; gap: 18px; }
.site-footer a { color: var(--secondary); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.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: absolute; left: 12px; top: -100px; background: var(--bg); padding: 12px; z-index: 10; }
.skip-link:focus { top: 12px; }
@media (max-width: 600px) {
  .site-shell { padding: 0 20px; }
  .site-header { padding-top: 20px; }
  .site-header nav { align-items: flex-start; flex-direction: column; gap: 12px; }
  .nav-links { gap: 12px; width: 100%; font-size: .7rem; }
  .theme-toggle { margin-left: auto; }
  .home-intro { padding: 24px 0 28px; }
  .figlet { font-size: clamp(4px, 1.3vw, 9px); margin-bottom: 26px; }
  .introduction { font-size: .95rem; }
  .writing-entry { grid-template-columns: 27px minmax(0, 1fr); gap: 8px; }
  .metadata { font-size: .68rem; }
  .page-content { padding-top: 30px; }
  .page-heading { margin-bottom: 28px; }
  body { font-size: 17px; }
  pre { padding: 14px; }
  .site-footer { margin-top: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
