/* Look inspired by Anthropic's blog (anthropic.com/news, /engineering).
   Ivory paper, serif reading text in a narrow column, bold sans headings,
   small monospace labels, pill-shaped nav, thin warm rules. Colours come from
   theme/anthropic-light.scss and theme/anthropic-dark.scss. */

html, body { overflow-x: clip; }
body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-color: var(--paper) !important;
  color: var(--bs-body-color);
  font-family: var(--bs-body-font-family);
}
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-family: "Hanken Grotesk", system-ui, sans-serif; color: var(--ink); }
code, pre, kbd, samp { font-family: var(--bs-font-monospace); }
.navbar, #quarto-header, .nav-footer, .headroom { background-color: var(--paper) !important; }
.navbar-brand, .navbar-title, .navbar .nav-link, .navbar .bi { color: var(--ink) !important; }
div.sourceCode, pre.sourceCode, .sourceCode pre { background-color: var(--code-block) !important; }
#quarto-sidebar, #quarto-margin-sidebar, .sidebar { background-color: transparent !important; }

/* ---------------------------------------------------------------- nav */
.navbar { box-shadow: none; border-bottom: 1px solid transparent; padding-top: 0.9rem; padding-bottom: 0.9rem; }
.headroom--not-top .navbar,
.navbar.headroom--not-top { border-bottom-color: var(--rule); }
/* Site name: a relaxed serif in plain sentence case, not shouty capitals */
.navbar-brand .navbar-title {
  font-family: "Source Serif 4", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: 1.3rem;
  letter-spacing: -0.005em;
  text-transform: none;
}
.navbar .navbar-nav .nav-link {
  font-size: 0.84rem;
  font-weight: 500;
  padding: 0.3rem 0.85rem !important;
  margin: 0 0.15rem;
  border-radius: 999px;
  background: var(--pill);
  color: var(--ink) !important;
  transition: background 0.15s;
}
.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active { background: var(--pill-hover); }
.navbar .navbar-nav .nav-link.active { font-weight: 600; }
/* icon links on the right stay as plain icons */
.navbar .navbar-nav .nav-link:has(> i.bi) { background: transparent; padding: 0.3rem 0.45rem !important; }
.navbar .quarto-color-scheme-toggle, .navbar .quarto-navigation-tool { color: var(--ink) !important; }

/* ---------------------------------------------------------------- reading column */
main.content { max-width: 680px; }
main.content p,
main.content li,
main.content td,
main.content blockquote {
  font-family: "Source Serif 4", "Tiempos Text", Georgia, serif;
  font-size: 1.12rem;
  line-height: 1.62;
  font-optical-sizing: auto;
}
main.content li { margin-bottom: 0.35rem; }
main.content strong, main.content b { font-weight: 600; }
main.content a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--faint);
}
main.content a:hover { color: var(--accent); text-decoration-color: var(--accent); }

main.content h2, main.content h3, main.content h4 {
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  color: var(--ink);
  letter-spacing: -0.012em;
  border-bottom: none;
}
main.content h2 { font-size: 1.6rem; line-height: 1.25; margin-top: 3rem; margin-bottom: 1rem; }
main.content h3 { font-size: 1.22rem; margin-top: 2.2rem; }
main.content h4 { font-size: 1.02rem; margin-top: 1.8rem; }

blockquote {
  border-left: 2px solid var(--accent);
  padding: 0.1rem 0 0.1rem 1.2rem;
  color: var(--muted);
  font-style: italic;
}
main.content img, .cell-output-display img, figure img { border-radius: 4px; }
figcaption, .figure-caption {
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  font-size: 0.82rem;
  color: var(--muted);
}
hr { border-color: var(--rule); opacity: 1; }

/* ---------------------------------------------------------------- code */
code { font-size: 0.82em; }
p code, li code, td code {
  background: var(--code-inline) !important;
  border-radius: 4px;
  padding: 0.12em 0.35em;
}
div.sourceCode, pre.sourceCode, pre { border-radius: 8px; border: none; }
div.sourceCode { padding: 0.15rem 0.2rem; }
.cell-output pre { font-size: 0.8rem; background: transparent; border-left: 2px solid var(--rule); border-radius: 0; padding-left: 0.9rem; }
.cell-output-display { overflow-x: auto; }
.cell-output-display table, main.content table { font-family: "Hanken Grotesk", system-ui, sans-serif; font-size: 0.86rem; }
.cell-output-display table td, main.content table td { font-family: inherit; font-size: inherit; }
main.content thead th {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  border-bottom: 1px solid var(--rule) !important;
}
main.content table, main.content td, main.content th { border-color: var(--rule) !important; }

/* ---------------------------------------------------------------- post header: centred, no band */
.quarto-title-banner {
  background: transparent !important;
  color: var(--ink) !important;
  padding: 3.5rem 0 0.5rem;
  margin-bottom: 0;
  border: none;
  text-align: center;
}
.quarto-title-banner .quarto-title { max-width: 820px; margin: 0 auto; }
#title-block-header .quarto-title-banner h1.title,
#title-block-header h1.title {
  color: var(--ink);
  font-size: clamp(2rem, 4.2vw, 3rem);
  font-weight: 700 !important;
  letter-spacing: -0.025em;
  line-height: 1.12;
}
.quarto-title-banner .description,
.quarto-title-banner .subtitle,
#title-block-header .description {
  font-family: "Source Serif 4", Georgia, serif;
  color: var(--muted);
  font-size: 1.2rem;
  margin-top: 0.8rem;
}
.quarto-title .quarto-categories { justify-content: center; margin-top: 1.1rem; }
.quarto-category,
.quarto-listing-default .quarto-post .listing-category {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.66rem !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted) !important;
  background: var(--pill);
  border: none !important;
  border-radius: 999px;
  padding: 0.18rem 0.6rem;
  opacity: 1 !important;
}
#title-block-header .quarto-title-meta {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin: 1.4rem auto 2.75rem !important;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
  max-width: 680px;
  text-align: left;
}
#title-block-header .quarto-title-meta > div { min-width: 0; }
.quarto-title-meta-heading {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--faint);
}
.quarto-title-meta-contents { font-size: 0.9rem; color: var(--ink); }

/* ---------------------------------------------------------------- table of contents, like the numbered section list */
#TOC, nav#TOC { font-family: "Hanken Grotesk", system-ui, sans-serif; }
#toc-title {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--faint);
}
#TOC > ul { counter-reset: toc; }
#TOC > ul > li { counter-increment: toc; }
#TOC > ul > li > a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  color: var(--faint);
  margin-right: 0.6rem;
}
#TOC a.nav-link { font-size: 0.82rem; color: var(--muted); }
#TOC a.nav-link.active, #TOC ul > li > a.active {
  color: var(--ink) !important;
  border-left-color: var(--accent) !important;
}
#TOC ul > li > a { border-left-color: var(--rule) !important; }
.quarto-listing-category-title, #toc-title, h5.quarto-listing-category-title { font-weight: 500 !important; }
a { color: var(--bs-link-color); }
a:hover { color: var(--accent); }

/* ---------------------------------------------------------------- home page: a big serif statement */
main.content:has(> .home-band) { max-width: 920px; margin-top: 0; }
.home-band {
  background: transparent;
  border: none;
  text-align: left;
  padding: 3.5rem 0 3rem;
  margin: 0 0 1rem;
}
.home-band figure, .home-band p:has(img) { margin: 0; }
main.content .home-band img {
  width: 56px !important;
  height: 56px;
  max-width: none;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1.6rem;
}
.home-band h1 {
  font-family: "Source Serif 4", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: 1.15rem;
  letter-spacing: 0;
  color: var(--muted);
  margin: 0 0 1rem;
  border: none;
}
main.content .home-band .tagline,
main.content .home-band .tagline p {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(1.45rem, 2.6vw, 1.9rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
  max-width: 44rem;
  margin: 0 0 1rem;
}
/* Longer intro under the tagline: normal reading size, muted */
main.content .home-band .intro p {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.08rem;
  line-height: 1.62;
  color: var(--muted);
  max-width: 38rem;
  margin: 0 0 1rem;
}
main.content .home-band .intro { margin-bottom: 1.6rem; }
main.content .home-band .links,
main.content .home-band .links p { font-family: "Hanken Grotesk", system-ui, sans-serif; font-size: 0.84rem; margin: 0; }
main.content .home-band .links a {
  display: inline-block;
  color: var(--ink);
  text-decoration: none;
  background: var(--pill);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  margin: 0 0.35rem 0.4rem 0;
  font-weight: 500;
}
main.content .home-band .links a:hover { background: var(--pill-hover); color: var(--ink); }
.home-band .links .sep { display: none; }

/* ---------------------------------------------------------------- post list: rows like the newsroom table */
.quarto-listing-default { border-top: 1px solid var(--rule); position: relative; padding-top: 2.4rem; }
.quarto-listing-default::before {
  content: "Title";
  position: absolute; top: 0.8rem; left: calc(8rem + 1.75rem);
}
.quarto-listing-default::after {
  content: "Date";
  position: absolute; top: 0.8rem; right: 0; width: 7rem;
}
.quarto-listing-default::before, .quarto-listing-default::after {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--faint);
}
.quarto-listing-default .quarto-post {
  display: grid;
  grid-template-columns: 8rem 1fr 7rem;
  grid-template-areas: "thumb body meta";
  gap: 1.75rem;
  align-items: start;
  border-bottom: 1px solid var(--rule);
  padding: 1.5rem 0;
  margin: 0;
  position: relative;
}
.quarto-listing-default .quarto-post::before, .quarto-listing-default .quarto-post::after { content: none !important; }
.quarto-listing-default .quarto-post .body { padding: 0; }
.quarto-listing-default .quarto-post h3.listing-title {
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  font-size: 1.3rem;
  font-weight: 700 !important;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin: 0 0 0.4rem;
}
.quarto-listing-default .quarto-post .listing-title a { color: var(--ink); text-decoration: none; font-weight: 700 !important; }
.quarto-listing-default .quarto-post:hover .listing-title a { color: var(--accent); }
.quarto-listing-default .quarto-post .listing-subtitle:has(a:empty) { display: none; }
.quarto-listing-default .quarto-post .listing-description {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.02rem;
  color: var(--muted);
  order: 2;
}
.quarto-listing-default .quarto-post .listing-description a { color: inherit; text-decoration: none; }
.quarto-listing-default .quarto-post .body { display: flex; flex-direction: column; }
.quarto-listing-default .quarto-post .listing-categories { order: 3; margin: 0.75rem 0 0; display: flex; gap: 0.35rem; flex-wrap: wrap; }
.quarto-listing-default .quarto-post .listing-category { margin: 0; cursor: pointer; }
.quarto-listing-default .quarto-post .metadata { padding: 0.35rem 0 0; flex-basis: auto; }
.quarto-listing-default .quarto-post .metadata a { display: block; text-decoration: none; }
.quarto-listing-default .quarto-post .metadata .listing-date,
.quarto-listing-default .quarto-post .metadata .listing-reading-time {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.7;
}
.quarto-listing-default .quarto-post .metadata .listing-reading-time { color: var(--faint); }
/* preview pictures: a small rounded crop on the right of each row */
.quarto-listing-default .quarto-post .body { grid-area: body; }
.quarto-listing-default .quarto-post .metadata { grid-area: meta; }
.quarto-listing-default .quarto-post .thumbnail {
  grid-area: thumb;
  flex-basis: auto;
  margin: 0;
  padding: 0.3rem 0 0;
}
.quarto-listing-default .quarto-post .thumbnail p { margin: 0; }
.quarto-listing-default .quarto-post .thumbnail p:has(> a:empty) { display: none; }
.quarto-listing-default .quarto-post .thumbnail-image,
.quarto-listing-default .quarto-post .thumbnail img {
  width: 8rem;
  height: 5.6rem;
  max-height: none;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  transition: opacity 0.15s;
}
.quarto-listing-default .quarto-post:hover .thumbnail img { opacity: 0.88; }

@media (max-width: 575px) {
  .quarto-listing-default .quarto-post {
    grid-template-columns: 5.5rem 1fr;
    grid-template-areas: "thumb meta" "thumb body";
    gap: 0.4rem 1rem;
  }
  .quarto-listing-default .quarto-post .thumbnail img { width: 5.5rem; height: 4.2rem; }
  .quarto-listing-default .quarto-post .metadata { padding: 0; }
  .quarto-listing-default .quarto-post .metadata a { display: flex; gap: 0.8rem; }
  .quarto-listing-default::before, .quarto-listing-default::after { display: none; }
  .quarto-listing-default { padding-top: 0.5rem; }
}

/* category sidebar */
.quarto-listing-category-title {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--faint);
}
.quarto-listing-category .category { font-size: 0.86rem; color: var(--muted); border-radius: 999px; padding: 0.1rem 0.6rem; }
.quarto-listing-category .category.active { background: var(--pill); color: var(--ink); }

/* ---------------------------------------------------------------- footer */
.nav-footer {
  border-top: 1px solid var(--rule);
  font-size: 0.8rem;
  color: var(--muted);
  padding-top: 1.5rem;
  padding-bottom: 2rem;
}
.nav-footer a { color: var(--ink); }
