:root {
  --background: #fafaf8;
  --text: #252525;
  --heading: #171717;
  --muted: #62625e;
  --link: #274c8e;
  --stars: #e4e4da;
  --line: #deded8;
  color-scheme: light;
  background: var(--background);
  color: var(--text);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --background: #171717;
    --text: #e4e4df;
    --heading: #fafaf8;
    --muted: #acaca4;
    --link: #a7c6f8;
    --stars: #343430;
    --line: #3f3f39;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --background: #171717;
  --text: #e4e4df;
  --heading: #fafaf8;
  --muted: #acaca4;
  --link: #a7c6f8;
  --stars: #343430;
  --line: #3f3f39;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body { margin: 0; }
#ascii-bg {
  position: fixed;
  inset: 0;
  margin: 0;
  overflow: hidden;
  color: var(--stars);
  font-size: 14.4px;
  line-height: 1.5;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.theme-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
}
.theme-toggle:hover { border-color: var(--text); color: var(--text); }
.theme-toggle:focus-visible { outline: 2px solid var(--link); outline-offset: 4px; }
.toggle-window { display: block; height: 14px; overflow: hidden; }
.toggle-track {
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.35s ease;
}
.toggle-glyph { display: block; height: 14px; line-height: 14px; }
:root[data-theme="dark"] .toggle-track { transform: translateY(-14px); }
@media (prefers-reduced-motion: reduce) {
  .toggle-track { transition: none; }
}
main { position: relative; z-index: 1; max-width: 690px; margin: 76px auto 56px; padding: 0 24px; }
header { display: flow-root; }
.intro-portrait {
  display: block;
  float: right;
  width: 160px;
  max-width: 100%;
  height: auto;
  margin: 0 0 20px 26px;
  border-radius: 2px;
}
h1, h2 { color: var(--heading); line-height: 1.35; }
h1 { font-size: 25px; font-weight: 600; letter-spacing: -0.7px; margin: 0 0 4px; }
h2 { font-size: 15px; font-weight: 600; margin: 0 0 18px; }
p { margin: 0 0 18px; }
.subtitle { color: var(--muted); margin-bottom: 26px; }
a { color: var(--link); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 1px; }
nav { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 24px; }
section { margin-top: 46px; }
.entries { list-style: none; margin: 0; padding: 0; }
.entries li { margin: 0 0 21px; }
.entries li:last-child { margin-bottom: 0; }
.detail { display: block; color: var(--muted); font-size: 12px; line-height: 1.65; margin-top: 3px; }
.bibliography { margin: 19px 0 0; font-size: 12px; }
.compact li { margin-bottom: 16px; }
.section-note { font-size: 12px; color: var(--muted); margin: -8px 0 20px; }
footer { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 12px; }
@media (min-width: 768px) {
  .theme-toggle { width: 32px; height: 32px; top: 24px; right: 32px; }
}
@media (max-width: 600px) {
  .intro-portrait { float: none; width: 132px; margin: 0 0 26px; }
}
@media (max-width: 480px) {
  main { margin-top: 38px; padding: 0 22px; }
  h1 { font-size: 23px; }
  section { margin-top: 38px; }
}
@media print {
  :root, :root[data-theme], :root:not([data-theme]) {
    --background: white;
    --text: #252525;
    --heading: #171717;
    --muted: #62625e;
    --line: #deded8;
    color-scheme: light;
    font-size: 11px;
  }
  main { margin: 0 auto; }
  section { margin-top: 24px; }
  a { color: inherit; text-decoration: underline; }
  li { break-inside: avoid; }
  #ascii-bg, .theme-toggle { display: none; }
}
