/* Ostanek Research — shared site chrome
   Fonts: EB Garamond self-hosted (SIL OFL).
   Adobe fonts: set --body-font via page class or Adobe Fonts kit in config. */

@font-face {
  font-family: "EB Garamond";
  src: url("../fonts/EBGaramond-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("../fonts/EBGaramond-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("../fonts/EBGaramond-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("../fonts/EBGaramond-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Old Standard TT";
  src: url("../fonts/OldStandardTT-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Old Standard TT";
  src: url("../fonts/OldStandardTT-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Old Standard TT";
  src: url("../fonts/OldStandardTT-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Default = Orrery landing warm-dark (aligned 2026-08-13).
   Light paper scheme: body.theme-light */
:root {
  --ground: #14120e;       /* Orrery warm near-black */
  --panel: #1c1913;
  --panel-2: #221e16;
  --brass: #c89b3c;        /* Orrery accent */
  --gold: #e8d5a3;         /* Orrery heading */
  --cream: #e3dac4;        /* Orrery body */
  --muted: #94896f;
  --line: #3a3324;
  --cite: #8a7f68;
  --ink: #e3dac4;          /* primary text (alias cream on dark) */
  --btn-ink: #1a1509;
  --body-font: "EB Garamond", Georgia, "Iowan Old Style", "Times New Roman", serif;
  --ui-font: "EB Garamond", Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --link-underline: rgba(200, 155, 60, 0.45);
  --selection-bg: rgba(200, 155, 60, 0.28);
}

/* Light paper scheme — same brass lineage, readable day surface */
body.theme-light {
  --ground: #f6f1e6;       /* warm paper */
  --panel: #fffdf8;
  --panel-2: #efe8d8;
  --brass: #a67c28;        /* brass on paper (slightly deeper) */
  --gold: #3d3426;         /* headings = ink, not pale gold */
  --cream: #2c261c;        /* body ink */
  --ink: #2c261c;
  --muted: #6e6554;
  --line: #ddd2bc;
  --cite: #7a7160;
  --btn-ink: #1a1509;
  --link-underline: rgba(166, 124, 40, 0.4);
  --selection-bg: rgba(200, 155, 60, 0.22);
}

/* Per-post / per-page font choices (beauty = value) */
/* Junicode 2 — Peter Baker's scholarly face for medievalists (SIL OFL).
   Kevin, 2026-08-13: "I like this font in general, maybe for the website
   and some papers." VARIABLE font deliberately: one ~1MB file carries all
   five weights (300-700), where the static route would ship five files.
   The full VF rather than the 310KB subset because this is a research
   site — the whole point of Junicode is the coverage (MUFI 4.0, IPA,
   the works), and a subset quietly reintroduces tofu for exactly the
   characters a scholarly reader would use. */
@font-face {
  font-family: "Junicode";
  src: url("../fonts/JunicodeVF-Roman.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Junicode";
  src: url("../fonts/JunicodeVF-Italic.woff2") format("woff2");
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}

body.font-garamond { --body-font: "EB Garamond", Georgia, serif; }
/* Old Standard TT — Didone scholarly. Mozart: high contrast, paper-clear, no costume. */
body.font-old-standard {
  --body-font: "Old Standard TT", "EB Garamond", Georgia, serif;
  --ui-font: "Old Standard TT", "EB Garamond", Georgia, serif;
  font-size: 20px;
  line-height: 1.74;
  font-feature-settings: "kern" 1, "liga" 1, "onum" 1;
}
body.font-old-standard .masthead h1 {
  font-size: 42px;
  letter-spacing: 0.005em;
}
body.font-old-standard .masthead .thesis {
  font-size: 19px;
  line-height: 1.55;
}
body.font-old-standard .card p,
body.font-old-standard article.note .body p {
  font-size: 18.5px;
  line-height: 1.72;
}
body.font-old-standard .card h3 { font-size: 22px; }
body.font-junicode { --body-font: "Junicode", "EB Garamond", Georgia, serif; }
body.font-georgia { --body-font: Georgia, "Times New Roman", serif; }
body.font-system-serif { --body-font: ui-serif, Georgia, serif; }
/* Landing / research UI sans — Source Sans 3 (OFL); Optima-like calm without product Inter chrome */
body.font-sans,
body.font-source-sans {
  --body-font: "Source Sans 3", "Source Sans Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ui-font: "Source Sans 3", "Source Sans Pro", system-ui, sans-serif;
  font-feature-settings: "kern" 1, "liga" 1;
}
body.font-sans .masthead .thesis,
body.font-source-sans .masthead .thesis {
  font-style: normal; /* italic thesis reads odd in many sans */
  letter-spacing: 0.01em;
}
body.font-sans .card p,
body.font-source-sans .card p {
  font-size: 16.5px;
  line-height: 1.65;
}
/* Adobe: only after you load a licensed kit or local licensed files */
body.font-adobe-jenson { --body-font: "Adobe Jenson Pro", "EB Garamond", Georgia, serif; }
body.font-adobe-minion { --body-font: "Minion Pro", "EB Garamond", Georgia, serif; }
body.font-adobe-caslon { --body-font: "Adobe Caslon Pro", "EB Garamond", Georgia, serif; }
body.font-custom { /* set --body-font inline from frontmatter */ }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--cream);
  font-family: var(--body-font);
  line-height: 1.68;
  font-size: 19px;
  letter-spacing: 0.01em;
  font-feature-settings: "kern" 1, "liga" 1, "onum" 1;
}
::selection { background: var(--selection-bg); color: var(--gold); }
/* Widen with the window — was fixed 680px, felt pinched on large screens */
.wrap {
  width: 100%;
  max-width: min(56rem, 92vw); /* ~896px, tracks viewport */
  margin: 0 auto;
  padding: 0 clamp(20px, 3.5vw, 40px);
}
a { color: var(--gold); text-decoration-color: var(--link-underline); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--brass); }
body.theme-light a { color: var(--brass); }
body.theme-light a:hover { color: #7a5a1a; }
body.theme-light .masthead h1,
body.theme-light .card h3,
body.theme-light article.note h1,
body.theme-light .pub-list .pub-title { color: var(--gold); }
.btn,
button.primary {
  display: inline-block;
  background: var(--brass);
  color: var(--btn-ink);
  border: none;
  border-radius: 6px;
  font-family: var(--body-font);
  font-size: 16px;
  font-weight: 700;
  padding: 11px 18px;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover,
button.primary:hover {
  filter: brightness(1.06);
  text-decoration: none;
}
.btn-quiet {
  background: transparent;
  color: var(--brass);
  border: 1px solid var(--line);
  font-weight: 400;
}
body.theme-light .btn,
body.theme-light button.primary {
  background: var(--brass);
  color: var(--btn-ink);
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
h1, h2, h3 { font-weight: 400; text-wrap: balance; margin: 0; font-family: var(--body-font); }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 11px;
  color: var(--brass);
  margin: 0 0 14px;
  font-family: var(--mono);
}
.nav {
  padding: 20px 0 0;
  font-size: 14px;
  color: var(--muted);
  font-family: var(--mono);
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}
.nav a { margin-right: 1.25em; color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--gold); }

/* Research paper masthead: left-aligned, abstract block */
.masthead {
  padding: 56px 0 40px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}
.masthead h1 {
  font-size: 36px;
  line-height: 1.2;
  color: var(--gold);
  letter-spacing: 0.02em;
}
.masthead .thesis {
  margin: 22px 0 0;
  max-width: min(72ch, 100%);
  color: var(--cream);
  font-size: 18px;
  font-style: italic;
}
.masthead .lineage {
  margin-top: 16px;
  max-width: min(72ch, 100%);
  color: var(--muted);
  font-size: 16px;
  font-style: normal;
}
.keywords {
  margin: 22px 0 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--cite);
  letter-spacing: 0.02em;
  line-height: 1.55;
}
.keywords strong {
  color: var(--brass);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-right: 0.4em;
}
.rule {
  display: none; /* section borders replace ornamental rule */
}

.section { padding: 40px 0 8px; }
.section > h2 {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  color: var(--brass);
  margin-bottom: 18px;
  font-family: var(--mono);
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}
.card {
  background: transparent;
  border: none;
  border-left: 2px solid var(--line);
  border-radius: 0;
  padding: 4px 0 4px 20px;
  margin-bottom: 28px;
}
.card h3 { font-size: 20px; color: var(--gold); margin-bottom: 8px; }
.card p { margin: 0 0 12px; color: var(--cream); font-size: 17px; }
.card .meta {
  color: var(--cite);
  font-size: 12px;
  margin: 0;
  font-family: var(--mono);
  letter-spacing: 0.02em;
}
.card + .card { margin-top: 0; }

/* Publication list — DOI / deposit style */
.pub-list { list-style: none; margin: 0; padding: 0; }
.pub-list li {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.pub-list li:first-child { padding-top: 0; }
.pub-list .pub-title {
  display: block;
  color: var(--gold);
  font-size: 17px;
  margin-bottom: 6px;
  text-decoration: none;
}
.pub-list .pub-title:hover { text-decoration: underline; text-decoration-color: var(--brass); }
.pub-list .pub-meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--cite);
  line-height: 1.5;
}
.pub-list .pub-venue { color: var(--muted); }

/* Article body */
article.note { padding: 48px 0 88px; }
article.note header { margin-bottom: 36px; }
article.note h1 {
  font-size: 34px;
  line-height: 1.22;
  color: var(--gold);
  margin: 0 0 14px;
}
article.note .meta { color: var(--muted); font-size: 15px; margin: 0 0 8px; }
article.note .byline { color: var(--brass); font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase; }
article.note .body { max-width: min(72ch, 100%); }
article.note .body p { margin: 0 0 1.15em; }
article.note .body h2 {
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 2.2em 0 0.85em;
}
article.note .body blockquote {
  margin: 1.4em 0;
  padding-left: 1.1em;
  border-left: 2px solid var(--brass);
  color: var(--gold);
  font-style: italic;
}
article.note .body ul, article.note .body ol { margin: 0 0 1.15em; padding-left: 1.3em; }
article.note .body li { margin: 0.35em 0; }
article.note .body code {
  font-size: 0.88em;
  color: var(--gold);
  font-family: ui-monospace, Menlo, monospace;
}

.pull {
  margin: 1.4em 0;
  padding-left: 1.1em;
  border-left: 2px solid var(--brass);
  color: var(--gold);
  font-style: italic;
  max-width: 42ch;
}
.mark-quiet {
  width: 72px;
  height: 72px;
  display: block;
  margin: 0 0 18px;
}

/* Shop lockup: night Mozart wave. Not the Orrery αψ. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.masthead-night {
  background: #000;
  text-align: center;
  padding: 2.5rem 1.25rem 0;
  border-bottom: none;
  margin-bottom: 0;
}
.masthead-night img {
  display: block;
  width: min(100%, 52rem);
  max-height: 220px;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  object-position: center top;
}
.masthead-copy {
  padding: 28px 0 40px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}
.masthead-copy .thesis { margin-top: 0; }

footer.site {
  border-top: 1px solid var(--line);
  padding: 40px 0 64px;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
}
footer.site p { margin: 6px 0; }

.voice-pill {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
  border: 1px solid var(--line);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

@media (max-width: 540px) {
  .masthead { padding: 72px 0 52px; }
  .masthead h1 { font-size: 32px; }
  .card { padding: 24px 22px; }
  article.note h1 { font-size: 28px; }
  body { font-size: 18px; }
}
