/* Venezia v2 uses Geist for UI, IBM Plex Serif for prose and Geist Mono for metadata. */
@font-face {
  font-family: Geist;
  src: url("assets/fonts/geist.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("assets/fonts/geist-mono.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Serif";
  src: url("assets/fonts/ibm-plex-serif-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Serif";
  src: url("assets/fonts/ibm-plex-serif-medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Serif";
  src: url("assets/fonts/ibm-plex-serif-semibold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Serif";
  src: url("assets/fonts/ibm-plex-serif-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --ui: Geist, system-ui, sans-serif;
  --serif: "IBM Plex Serif", Georgia, serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  --site-width: 72rem;
  --site-gutter: clamp(1rem, 4vw, 2.75rem);
}

body {
  color: var(--ink);
  background: var(--paper);
  font-family: var(--ui);
  font-size: 1.05rem;
  line-height: 1.65;
}

a {
  color: var(--accent-ink);
  text-underline-offset: .2em;
}

a:hover {
  color: var(--accent-ink);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-line);
  outline-offset: 3px;
}

#quarto-header .navbar {
  background: var(--chrome) !important;
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
  min-height: 4.25rem;
  /* Both Bootstrap themes must use the same navbar geometry. */
  --bs-navbar-padding-y: .5rem;
  padding-block: var(--bs-navbar-padding-y);
  --bs-navbar-color: var(--ink-2);
  --bs-navbar-hover-color: var(--accent-ink);
  --bs-navbar-active-color: var(--accent-ink);
  --bs-navbar-brand-color: var(--ink);
  --bs-navbar-brand-hover-color: var(--ink);
}

#quarto-header .navbar-container {
  max-width: calc(var(--site-width) + 2 * var(--site-gutter));
  margin-inline: auto;
  padding-inline: var(--site-gutter);
}

.navbar .navbar-logo {
  width: clamp(10rem, 20vw, 15rem);
  height: auto;
  aspect-ratio: 3156 / 704;
  max-height: none;
  flex: none;
  object-fit: contain;
}

.navbar .navbar-logo.dark-content {
  content: url("assets/venezia-blog-header-midnight.svg");
}

.navbar .nav-link {
  color: var(--ink-2);
  font-family: var(--ui);
  font-size: .94rem;
  font-weight: 500;
}

#quarto-header .nav-link[href$="archive.html"] {
  font-family: var(--serif);
  font-size: 1.05rem;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: var(--accent-ink);
}

#quarto-header .navbar .nav-link[href$="/home"],
.venezia-footer-col a.web-app-link {
  color: var(--accent-ink);
  font-family: var(--ui);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: .075em;
  text-underline-offset: .22em;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  width: fit-content;
  padding: .45rem .95rem;
  border: 1px solid var(--accent-line);
  border-radius: .45rem;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-family: var(--ui);
  font-size: .92rem;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
}

.hero-link:hover {
  background: color-mix(in srgb, var(--accent-soft) 72%, var(--accent-line));
  color: var(--accent-ink);
}

#quarto-header .quarto-navbar-tools {
  margin-inline: .35rem;
}

#quarto-header .quarto-color-scheme-toggle {
  position: relative;
  display: inline-grid;
  place-items: center;
  min-width: 3.5rem;
  min-height: 2.75rem;
  border-radius: .5rem;
  color: var(--ink-2);
}

#quarto-header .quarto-color-scheme-toggle:hover {
  background: var(--paper-3);
}

/* Keep Quarto's switch in the middle, with separate sun and moon icons. */
#quarto-header .quarto-color-scheme-toggle .bi::before {
  content: "";
  width: 1.25rem;
  height: 1.25rem;
  background-size: 1.25rem 1.25rem;
}

#quarto-header .quarto-color-scheme-toggle::before,
#quarto-header .quarto-color-scheme-toggle::after {
  position: absolute;
  font-family: bootstrap-icons;
  font-size: .875rem;
  font-style: normal;
  font-weight: normal;
  line-height: 1;
}

#quarto-header .quarto-color-scheme-toggle::before {
  content: "\f5a2";
  top: .05rem;
  left: .05rem;
  color: var(--accent-ink);
}

#quarto-header .quarto-color-scheme-toggle::after {
  content: "\f497";
  right: .05rem;
  bottom: .05rem;
  color: var(--ink-3);
}

#quarto-header .quarto-color-scheme-toggle[aria-checked="true"]::before {
  color: var(--ink-3);
}

#quarto-header .quarto-color-scheme-toggle[aria-checked="true"]::after {
  color: var(--accent-ink);
}

main {
  font-family: var(--serif);
}

pre, code {
  font-family: var(--mono);
}

.home-wrap {
  max-width: var(--site-width);
  margin-inline: auto;
  padding: clamp(.75rem, 2vw, 1.5rem) clamp(.25rem, 2vw, 1.5rem) 2rem;
}

.research-hero {
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  align-items: center;
  gap: clamp(1.5rem, 3.5vw, 3rem);
  padding-block: clamp(1.5rem, 5vw, 4rem);
}

.hero-copy h1,
#title-block-header .title {
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -.045em;
}

.hero-copy h1 {
  margin: 0 0 1.15rem;
  font-size: clamp(3rem, 6.2vw, 5.25rem);
  line-height: 1.04;
}

.hero-copy h1 em {
  color: var(--accent-ink);
  font-weight: 400;
}

.hero-copy > p {
  max-width: 30rem;
  color: var(--ink-2);
  font-size: 1.12rem;
}

.hero-link {
  margin-top: .5rem;
}

.hero-art {
  min-width: 0;
}

.hero-art img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
}

.home-posts {
  margin-top: clamp(.75rem, 3vw, 2.5rem);
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--rule);
}

.section-heading h2 {
  margin: 0;
  padding-bottom: .65rem;
  border-bottom: 0;
  font-family: var(--serif);
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  font-weight: 500;
  letter-spacing: -.035em;
}

.section-heading .archive-link,
.quarto-listing .listing-title,
.quarto-title-meta,
.quarto-title .quarto-categories,
.listing-actions-group {
  font-family: var(--ui);
}

.section-heading .archive-link {
  font-size: .9rem;
  font-weight: 600;
}

.home-posts .quarto-post {
  padding-block: .85rem;
}

.home-posts .quarto-post .metadata {
  flex: 0 0 8rem;
}

.quarto-listing .listing-title a {
  color: var(--ink);
  font-weight: 600;
}

.quarto-listing .listing-date {
  font-family: var(--mono);
  font-size: .82rem;
}

.quarto-listing .listing-date,
.quarto-listing .listing-description,
.description {
  color: var(--ink-2);
}

#title-block-header .title {
  margin-bottom: .65rem;
  font-size: clamp(2.55rem, 5vw, 4.2rem);
  line-height: 1.1;
}

/* The custom home page has its own visible heading. */
body:has(.research-hero) #title-block-header,
body:has(.research-hero) #quarto-margin-sidebar {
  display: none;
}

#quarto-content > .venezia-footer {
  grid-column: screen-start / screen-end;
}

.venezia-footer {
  margin-block-start: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--rule);
  background: var(--paper-2);
  color: var(--ink-3);
  font-family: var(--ui);
  font-size: .925rem;
}

.venezia-footer-inner,
.venezia-footer-base {
  width: min(var(--site-width), calc(100% - 2 * var(--site-gutter)));
  margin-inline: auto;
}

.venezia-footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr));
  gap: clamp(1.25rem, 4vw, 3rem);
  padding-block: 2.35rem 2rem;
}

.venezia-wordmark {
  display: block;
  width: min(100%, 15.5rem);
  margin-bottom: .65rem;
}

.venezia-wordmark img,
.venezia-footer-tagline img {
  width: 100%;
  height: auto;
}

.wordmark-paper { display: var(--light-logo); }
.wordmark-midnight { display: var(--dark-logo); }

.venezia-footer-tagline {
  width: min(100%, 12rem);
}

.venezia-footer-tagline .venezia-footer-pen {
  display: block;
  width: 96%;
  margin-top: -.3rem;
}

.quarto-dark .venezia-footer-tagline,
[data-bs-theme="dark"] .venezia-footer-tagline {
  filter: invert(1) hue-rotate(180deg);
}

.venezia-footer-col h2 {
  margin: 0 0 .6rem;
  padding: 0;
  border: 0;
  color: var(--accent-ink);
  font-family: var(--ui);
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.venezia-footer-col ul {
  display: grid;
  gap: .55rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.venezia-footer-col a:not(.web-app-link) {
  color: var(--ink-2);
  text-decoration: none;
}

.venezia-footer-col a:hover {
  color: var(--accent-ink);
  text-decoration: underline;
}

.venezia-footer-base {
  border-top: 1px solid var(--rule);
  padding-block: .95rem 1.25rem;
  font-size: .85rem;
}

.venezia-footer-base p {
  margin: 0;
}

@media (max-width: 760px) {
  .navbar .navbar-logo {
    width: clamp(7rem, 34vw, 9rem);
  }

  #quarto-header .quarto-color-scheme-toggle {
    min-width: 3rem;
  }

  #quarto-header .quarto-color-scheme-toggle .bi::before {
    width: 1rem;
    height: 1rem;
    background-size: 1rem 1rem;
  }

  .home-posts .quarto-post .metadata {
    flex: auto;
  }

  .research-hero {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .hero-copy h1 {
    font-size: clamp(2.6rem, 10vw, 4rem);
  }

  .hero-break {
    display: none;
  }

  .venezia-footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .venezia-footer-brand {
    grid-column: 1 / -1;
  }
}
