@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300..800&family=Baskervville&display=swap");

:root {
  --bg: #f8fafc;
  --fg: #1e293b;
  --muted: #94a3b8;
  --rule: #e2e8f0;
  --link: #65a30d;
  --link-hover: #365314;
  --code-bg: #e2e8f0;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #334155;
    --fg: #e2e8f0;
    --muted: #94a3b8;
    --rule: #475569;
    --link: #84cc16;
    --link-hover: #a3e635;
    --code-bg: #1e293b;
  }
}

* { box-sizing: border-box; }

html { font-size: 16px; }
@media (min-width: 768px) { html { font-size: 18px; } }

body {
  font-family: "Baskervville", Georgia, serif;
  background: var(--bg);
  color: var(--fg);
  max-width: 75ch;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 0;
  line-height: 1.65;
  font-weight: 400;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  line-height: 1.25;
}

h1 { font-size: 1.875rem; letter-spacing: -0.01em; }

a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.15s;
}
a:hover { color: var(--link-hover); }

article:not(#archive_container) a {
  border-bottom: 1px dotted var(--link);
}
article:not(#archive_container) a:hover {
  border-bottom-color: var(--link-hover);
}

article:not(#archive_container) h3 a,
article:not(#archive_container) h4 a,
article:not(#archive_container) h5 a,
article:not(#archive_container) h6 a {
  color: var(--fg);
  border: none;
}

article { display: block; }
article > * + * { margin-top: 1.25rem; }

header {
  margin-top: 0.25rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
}

header p { font-family: "Fraunces", Georgia, serif; }

#logo, #logo a { color: var(--muted); font-family: "Fraunces", Georgia, serif; }

#home-page-logo a {
  display: block;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 1.875rem;
  letter-spacing: -0.01em;
}

section h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.date {
  color: var(--muted);
  font-family: "Fraunces", Georgia, serif;
  font-size: 0.75rem;
}

article#archive_container section + section { margin-top: 1.5rem; }
article#archive_container ul { list-style: none; padding: 0; }
article#archive_container li + li { margin-top: 0.375rem; }

article:not(#archive_container) ul { list-style: disc; padding-left: 1.25rem; }
article:not(#archive_container) ol { list-style: decimal; padding-left: 1.25rem; }
article:not(#archive_container) li + li { margin-top: 0.25rem; }

section ul { list-style: none; padding: 0; }

blockquote {
  border-left: 4px solid var(--rule);
  padding-left: 1rem;
  color: var(--muted);
  font-size: 1rem;
}

hr { border: 0; border-top: 1px solid var(--rule); }

code, li code {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.85em;
  background: var(--code-bg);
  padding: 0.1em 0.3em;
  border-radius: 3px;
}

pre {
  background: var(--code-bg);
  padding: 0.75rem;
  border-radius: 4px;
  overflow-x: auto;
  font-size: 0.85em;
  line-height: 1.5;
}
pre code { background: transparent; padding: 0; }

img, video, iframe {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1rem auto;
  border-radius: 4px;
}

figure {
  margin: 1rem 0;
}
figure img { margin: 0 auto; }
figure figcaption {
  text-align: center;
  font-size: 0.8em;
  color: var(--muted);
  margin-top: 0.5rem;
}

/* Prism syntax highlighting — minimal light/dark theme */
.token.comment, .token.prolog, .token.doctype, .token.cdata { color: #94a3b8; font-style: italic; }
.token.punctuation { color: #64748b; }
.token.property, .token.tag, .token.constant, .token.symbol, .token.deleted { color: #db2777; }
.token.boolean, .token.number { color: #ea580c; }
.token.selector, .token.attr-name, .token.string, .token.char, .token.builtin, .token.inserted { color: #16a34a; }
.token.operator, .token.entity, .token.url, .language-css .token.string, .style .token.string { color: #7c3aed; }
.token.atrule, .token.attr-value, .token.keyword { color: #2563eb; }
.token.function, .token.class-name { color: #ca8a04; }
.token.regex, .token.important, .token.variable { color: #db2777; }
.token.important, .token.bold { font-weight: 600; }
.token.italic { font-style: italic; }

@media (prefers-color-scheme: dark) {
  .token.comment, .token.prolog, .token.doctype, .token.cdata { color: #64748b; }
  .token.punctuation { color: #94a3b8; }
  .token.property, .token.tag, .token.constant, .token.symbol, .token.deleted { color: #f472b6; }
  .token.boolean, .token.number { color: #fb923c; }
  .token.selector, .token.attr-name, .token.string, .token.char, .token.builtin, .token.inserted { color: #4ade80; }
  .token.operator, .token.entity, .token.url { color: #a78bfa; }
  .token.atrule, .token.attr-value, .token.keyword { color: #60a5fa; }
  .token.function, .token.class-name { color: #facc15; }
  .token.regex, .token.important, .token.variable { color: #f472b6; }
}

footer {
  font-size: 0.875rem;
  padding-top: 1rem;
  margin-top: 2rem;
  margin-bottom: 2.5rem;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
footer .footer-links { display: flex; gap: 0.75rem; }
footer .footer-credit {
  font-size: 0.75rem;
  color: var(--muted);
  font-style: italic;
}
footer .footer-credit a { color: var(--muted); border: none; }
footer .footer-credit a:hover { color: var(--link); }

.collection-corner {
  font-size: 0.75rem;
  font-style: italic;
  margin-top: 0.25rem;
}

#collection div + div { margin-top: 0.375rem; }
#collection a { border: none; }
