/* css styles */
/* =========================================================================
   styles.css — custom theme for a Quarto website (layers over `cosmo`)
   Identity: cool slate ink + brass signal · Fraunces / Newsreader / Plex Mono
   -------------------------------------------------------------------------
   HOW TO USE
   1. Replace the contents of your project's styles.css with this file.
   2. In _quarto.yml make sure you have, under format > html:
          theme: cosmo
          css: styles.css
   3. Run `quarto preview` and watch it change.
   Tweak the colors once, in :root below — everything else follows.
   ========================================================================= */

/* Fonts must be imported before any other rule. */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400..600&family=IBM+Plex+Mono:wght@400;500;600&family=Newsreader:ital,opsz,wght@0,6..72,400..600;1,6..72,400..500&display=swap');

:root {
  /* ---- the only block you really need to touch ---- */
  --ink:      #15201e;   /* near-black text + dark accents     */
  --paper:    #f4f5f2;   /* page background (cool, archival)   */
  --surface:  #eceeea;   /* cards, code, raised panels         */
  --accent:   #b5701e;   /* brass signal (rules, ticks, marks) */
  --accent-d: #8a560f;   /* darker brass for link TEXT (AA)    */
  --muted:    #5b655f;   /* secondary / captions               */
  --line:     #d8dcd5;   /* hairlines                          */

  /* Hand these same values to Bootstrap so its own bits follow along. */
  --bs-body-bg:          var(--paper);
  --bs-body-color:       var(--ink);
  --bs-link-color:       var(--accent-d);
  --bs-link-hover-color: var(--ink);
  --bs-border-color:     var(--line);
  --bs-emphasis-color:   var(--ink);
  --bs-body-font-family: "Newsreader", Georgia, serif;
}

/* ---------- base typography ------------------------------------------- */
body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.075rem;
  line-height: 1.7;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5,
.h1, .h2, .h3, .h4 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.12;
  color: var(--ink);
}
h2 { margin-top: 2.2rem; }

a {
  color: var(--accent-d);
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
a:hover { color: var(--ink); }

::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

/* ---------- page title block ------------------------------------------ */
.quarto-title .title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.04;
}
.quarto-title .subtitle {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  color: var(--muted);
  margin-top: 0.4rem;
}

/* ---------- navbar (light, with a brass top accent) ------------------- */
.navbar {
  background-color: var(--surface) !important;
  border-bottom: 1px solid var(--line);
  box-shadow: inset 0 3px 0 var(--accent);   /* the brass signature line */
}
.navbar-brand {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink) !important;
}
.navbar .nav-link {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  text-transform: lowercase;
  color: var(--muted) !important;
}
.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: var(--ink) !important;
}
.navbar .nav-link.active { box-shadow: inset 0 -2px 0 var(--accent); }

/* ---------- code ------------------------------------------------------- */
code { font-family: "IBM Plex Mono", monospace; font-size: 0.86em; }
:not(pre) > code {
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 0.08em 0.35em;
  border-radius: 3px;
}
div.sourceCode, pre {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}

/* ---------- blockquote ------------------------------------------------- */
blockquote, .blockquote {
  border-left: 2px solid var(--accent);
  margin-left: 0;
  padding-left: 1.1rem;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ink);
}

/* ---------- tables ----------------------------------------------------- */
.table { --bs-table-border-color: var(--line); }
.table thead th {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1.5px solid var(--ink);
}

/* ---------- buttons ---------------------------------------------------- */
.btn-primary {
  --bs-btn-bg: var(--ink);
  --bs-btn-border-color: var(--ink);
  --bs-btn-hover-bg: var(--accent-d);
  --bs-btn-hover-border-color: var(--accent-d);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
}

/* ---------- listing cards (for when you add a blog) ------------------- */
.quarto-listing .listing-title { font-family: "Fraunces", Georgia, serif; }
.quarto-post { border-top: 1px solid var(--line); }
.listing-date, .listing-category, .listing-reading-time {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
  letter-spacing: 0.03em;
  color: var(--muted);
}
.listing-category {
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 0.1rem 0.4rem;
}

/* ---------- table of contents / sidebar ------------------------------- */
#TOC .nav-link, .sidebar nav a {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  color: var(--muted);
}
#TOC .nav-link.active, .sidebar nav a.active {
  color: var(--accent-d);
  border-left-color: var(--accent);
}

/* ---------- footer ----------------------------------------------------- */
.nav-footer {
  background: var(--paper);
  border-top: 1px solid var(--line);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  color: var(--muted);
}
.nav-footer a { color: var(--muted); }
.nav-footer a:hover { color: var(--ink); }

/* =========================================================================
   UTILITY: an "eyebrow" label, the mono kicker used above section headings.
   Use it in any .qmd with a fenced div:

       ::: {.eyebrow}
       ε · selected work
       :::
   ========================================================================= */
.eyebrow {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}
.eyebrow::before {
  content: "";
  width: 1.6rem;
  height: 1px;
  background: var(--accent);
  flex: none;
}

/* =========================================================================
   OPTIONAL — dark navbar instead of light.
   Delete the .navbar block above and uncomment this to flip it.
   (Includes the fix that keeps the mobile menu icon visible on dark.)
   -------------------------------------------------------------------------
.navbar {
  background-color: var(--ink) !important;
  box-shadow: inset 0 3px 0 var(--accent);
  border: 0;
}
.navbar-brand { color: var(--paper) !important; }
.navbar .nav-link { color: #aeb6b1 !important; }
.navbar .nav-link:hover, .navbar .nav-link.active { color: var(--paper) !important; }
.navbar-toggler-icon { filter: invert(1) brightness(1.6); }
   ========================================================================= */