/* Archive typography over the original Thuses theme. */

@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-4-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 900; font-style: normal; font-display: optional;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-4-latin-wght-italic.woff2") format("woff2");
  font-weight: 200 900; font-style: italic; font-display: optional;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/fonts/source-sans-3-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 900; font-style: normal; font-display: optional;
}

/* Georgia and Arial resized to Source Serif 4 and Source Sans 3 metrics,
   so text keeps its layout whichever font paints it. */
@font-face {
  font-family: "Source Serif Fallback";
  src: local("Georgia");
  size-adjust: 108.02%; ascent-override: 95.9%; descent-override: 31.01%; line-gap-override: 0%;
}
@font-face {
  font-family: "Source Sans Fallback";
  src: local("Arial");
  size-adjust: 88.76%; ascent-override: 115.37%; descent-override: 45.07%; line-gap-override: 0%;
}

:root {
  --serif: "Source Serif 4", "Source Serif Fallback", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Source Sans Fallback", "Helvetica Neue", Arial, sans-serif;
  --ink: #1c1917;
  --muted: #6b6560;
  --rule: #e7e5e4;
  --link: #1a4f8f;
  --accent: #c58a1f; /* the original Thuses gold */
  --global--font-primary: var(--serif);
  --global--font-secondary: var(--serif);
  --heading--font-family: var(--serif);
  --entry-content--font-family: var(--serif);
}

html { font-size: 18px; }
body {
  font-family: var(--serif);
  color: var(--ink);
  background: #fff;
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* One reading column. */
main.container, .site-main, .site-header {
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}
.entry-content, .entry-summary, .entry-content p, .entry-content li {
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.6;
}
.entry-content p { margin: 0 0 1rem; }

/* Links: plain dark blue, thin underline. */
a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; text-decoration-color: rgba(26, 79, 143, 0.4); }
a:hover { text-decoration-color: currentColor; }

/* Headings. */
.entry-title, .entry-content h1, .entry-content h2, .entry-content h3, .entry-content h4, h2.list-title {
  font-family: var(--serif) !important;
  color: var(--ink);
  font-weight: 600 !important;
  letter-spacing: -0.005em;
  line-height: 1.25;
}
.entry-title { font-size: 1.9rem !important; margin: 0 0 1.25rem; }
.entry-title a { color: inherit; text-decoration: none; border: 0; }
.entry-content h2 { font-size: 1.4rem; margin: 2rem 0 0.6rem; }
.entry-content h3 { font-size: 1.2rem; margin: 1.75rem 0 0.5rem; }
.entry-content h4 { font-size: 1.05rem; margin: 1.5rem 0 0.4rem; }

/* Post footer and comment metadata in small sans. */
.entry-footer, .entry-meta, .posted-on, .byline, .cat-links, .tags-links, .wpd-comment-header, .wpd-comment-date, .colophon {
  font-family: var(--sans) !important;
  font-size: 0.9rem;
  color: var(--muted);
}
.entry-footer { border-top: 1px solid var(--rule); padding-top: 0.75rem; margin-top: 2rem; }
.entry-footer a { color: var(--muted); }

/* Comments read like the post. */
.wpd-comment-text, .wpd-comment-text p { font-family: var(--serif) !important; font-size: 1rem !important; line-height: 1.6 !important; color: var(--ink) !important; }
.wpd-comment-author, .wpd-comment-author a { font-family: var(--sans) !important; font-weight: 600; color: var(--ink) !important; }

/* Homepage: the list of posts. */
h2.list-title { font-size: 1.1rem !important; font-family: var(--sans) !important; text-transform: none; color: var(--muted); font-weight: 600 !important; margin: 0 0 1rem; }
ol.post-list { list-style: none; margin: 0; padding: 0; }
ol.post-list li { padding: 0.7rem 0; border-top: 1px solid var(--rule); }
ol.post-list li:last-child { border-bottom: 1px solid var(--rule); }
ol.post-list a { display: block; font-size: 1.1rem; line-height: 1.35; color: var(--ink); text-decoration: none; }
ol.post-list a:hover { color: var(--link); }
ol.post-list .post-meta { display: block; margin-top: 0.2rem; font-family: var(--sans); font-size: 0.85rem; color: var(--muted); }

/* Math. */
.katex { font-size: 1.08em; }
.katex-display { overflow-x: auto; overflow-y: hidden; padding: 0.25rem 0; margin: 1rem 0; }
p.ql-center-displayed-equation { overflow-x: auto; }

.colophon { margin-top: 2rem; padding-top: 0.75rem; border-top: 1px solid var(--rule); }

/* The theme underlines links with a border; use the text underline only. */
a, .entry-content a, ol.post-list a, .entry-title a { border-bottom: 0 !important; box-shadow: none !important; background-image: none !important; }
/* Avoid double padding inside the column. */
main.container .site-main { max-width: none; padding-left: 0; padding-right: 0; }

/* Header: one row in the reading column, archive note beneath. */
.site-header { padding-top: 1.75rem; padding-bottom: 0; margin-bottom: 2.25rem; text-align: left; }
.site-bar { display: flex; align-items: baseline; gap: 0.75rem; padding-bottom: 0.7rem; border-bottom: 1px solid var(--rule); }
.wordmark { font-family: var(--serif); font-size: 1.6rem; font-weight: 650; letter-spacing: -0.01em; line-height: 1; color: var(--ink) !important; text-decoration: none !important; }
.wordmark::after { content: ""; display: block; height: 2px; margin-top: 0.3rem; background: var(--accent); }
.tagline { font-family: var(--sans); font-size: 0.95rem; color: var(--muted); }
.site-nav { margin-left: auto; }
.site-nav a { font-family: var(--sans); font-size: 0.95rem; color: var(--ink); text-decoration: none; }
.site-nav a:hover { color: var(--link); text-decoration: underline; }
.archive-notice { margin: 0.55rem 0 0; font-family: var(--sans); font-size: 0.85rem; color: var(--muted); }
@media (max-width: 30rem) { .tagline { display: none; } }
