:root {
  --site-canvas: #f6f8f7;
  --site-surface: #fff;
  --site-tint: #eaf2ee;
  --site-sage: #9dbfae;
  --site-accent: #1f6f68;
  --site-accent-ink: #17544f;
  --site-ink: #0f2420;
  --site-muted: #465a55;
  --site-line: #dfe7e3;
  --site-radius: 1.75rem;
  --site-shadow: 0 1px 3px #0f242008, 0 20px 48px -32px #0f242040;
  --site-ease: cubic-bezier(.22, 1, .36, 1);
  --bs-body-font-family: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bs-body-color: var(--site-ink);
  --bs-body-bg: var(--site-canvas);
  --bs-link-color: var(--site-accent-ink);
  --bs-link-hover-color: var(--site-ink);
  --bs-link-color-rgb: 23, 84, 79;
  --bs-link-hover-color-rgb: 15, 36, 32;
  --bs-primary: var(--site-accent);
  --bs-primary-rgb: 31, 111, 104;
  --bs-border-color: var(--site-line);
}

body {
  color: var(--site-ink);
  background: var(--site-canvas);
  font-family: var(--bs-body-font-family);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--site-accent-ink); text-underline-offset: .2em; }
a:hover { color: var(--site-ink); }
:where(a, button, input, select, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--site-accent);
  outline-offset: 4px;
}
h1, h2, h3, h4, h5, h6 {
  color: var(--site-ink);
  font-family: inherit;
  font-weight: 650;
  letter-spacing: -.025em;
  line-height: 1.2;
  text-transform: none;
}
h1 { font-size: clamp(2.25rem, 4.5vw, 3.75rem); text-wrap: balance; }
h2 { margin-top: 2.5rem; padding-bottom: .65rem; border-color: var(--site-line); }
h3 { margin-top: 1.8rem; }
section[id], h2[id], h3[id] { scroll-margin-top: 7rem; }
::selection { color: var(--site-ink); background: #cee4d9; }

/* Keep Quarto's responsive navigation and search, with a floating shell. */
#quarto-header { padding: .75rem 1.25rem 0; background: transparent; }
#quarto-header .navbar {
  max-width: 1120px;
  margin-inline: auto;
  padding: .5rem 1rem;
  border: 1px solid #0f242010;
  border-radius: 2rem;
  background: #fffffff2 !important;
  box-shadow: var(--site-shadow);
}
.navbar-container { gap: .4rem; }
#quarto-header .nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: .5rem 1rem;
  border-radius: 2rem;
  color: var(--site-muted);
  font-size: .95rem;
  font-weight: 550;
  text-transform: none;
  letter-spacing: 0;
  transition: background-color 180ms, color 180ms;
}
#quarto-header .nav-link:hover,
#quarto-header .nav-link.active { color: var(--site-accent-ink); background: var(--site-tint); }
#quarto-header .nav-link .bi { font-size: 1.15rem; }
#quarto-search .aa-DetachedSearchButton,
.navbar-toggler { min-width: 44px; min-height: 44px; border-radius: 50%; }
.navbar-toggler { border: 0; }
#quarto-header .navbar-nav { gap: .25rem; }

#quarto-content { max-width: 1200px; margin-inline: auto; }
#quarto-document-content { min-width: 0; padding-top: 2rem; padding-bottom: 4rem; }
#title-block-header { margin-bottom: 2.5rem; }
#title-block-header .description { max-width: 52rem; margin-top: 1rem; color: var(--site-muted); font-size: 1.1rem; }
.quarto-title-meta { color: var(--site-muted); }
.quarto-title-meta-heading { letter-spacing: .06em; }
main img { max-width: 100%; height: auto; border-radius: 1rem; }
main iframe { max-width: 100%; }
main a { overflow-wrap: anywhere; }
main :not(pre) > code { color: var(--site-accent-ink); background: var(--site-tint); border-radius: .3rem; }
div.sourceCode, pre, blockquote, .callout { border-radius: 1rem; }
div.sourceCode { border: 1px solid var(--site-line); background: #edf3ef; }
pre.sourceCode { padding: 1rem; }
blockquote { padding: 1rem 1.5rem; border-left-color: var(--site-sage); background: var(--site-tint); color: var(--site-muted); }
blockquote > :last-child { margin-bottom: 0; }
.table { --bs-table-bg: transparent; --bs-table-color: var(--site-ink); --bs-table-border-color: var(--site-line); }
.table > thead { background: var(--site-tint); }
#TOC { font-size: .85rem; }
#TOC .nav-link { color: var(--site-muted); }
/* Quarto marks its active TOC color important in the compiled theme. */
#TOC .nav-link.active { color: var(--site-accent-ink) !important; border-left-color: var(--site-accent); }

/* The search panel is mounted outside the content container. */
.aa-DetachedContainer { border-radius: 1.5rem; border: 1px solid var(--site-line); overflow: hidden; }
.aa-DetachedContainer .aa-Form { border-radius: 1rem; }
.aa-DetachedContainer .aa-Form:focus-within { border-color: var(--site-accent); box-shadow: 0 0 0 2px #1f6f6833; }
:is(.aa-DetachedOverlay, #quarto-search-results) li.aa-Item[aria-selected="true"] :is(
  .search-item, .search-item.search-result-more, .search-item .search-result-section,
  .search-item .search-result-text, .search-item .search-result-title-container,
  .search-item .search-result-text-container
) { background: var(--site-accent); color: white; }
.aa-DetachedContainer .search-match { background: var(--site-tint); color: var(--site-accent-ink); }
:is(.aa-DetachedOverlay, #quarto-search-results) li.aa-Item[aria-selected="true"] .search-item mark.search-match { background: #ffffff33; color: white; }
.aa-DetachedContainer .aa-DetachedCancelButton { min-height: 44px; color: var(--site-accent-ink); }

/* A personal introduction, not a product or booking page. */
.site-home #quarto-document-content {
  display: block;
  grid-column: screen-start / screen-end;
  width: calc(100% - 3rem);
  max-width: 1120px;
  margin-inline: auto;
  padding-top: 1rem;
}
.site-home #title-block-header { display: none; }
.site-home #quarto-document-content > .site-intro {
  display: block;
  max-width: 42rem;
  padding: 3rem 0 3.5rem;
}
.site-intro h1 { margin: 0 0 1.25rem; font-size: clamp(1.8rem, 4vw, 2.5rem); line-height: 1.2; letter-spacing: -.025em; }
.site-intro p { margin: 1rem 0; color: var(--site-muted); font-size: 1.05rem; line-height: 1.75; }
.intro-links { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: 1.25rem; }
.intro-links a { display: inline-flex; align-items: center; min-height: 44px; }
.site-home #latest-posts > h2 { margin: .5rem 0; border: 0; font-size: 2.25rem; }

/* Generated listings share these cards with the homepage and tag archives. */
.post-card { display: flex; align-items: center; gap: 1.5rem; padding: 1.25rem; margin-block: 1rem; border: 1px solid #0f24200d; border-radius: var(--site-radius); background: var(--site-surface); box-shadow: var(--site-shadow); transition: transform 240ms var(--site-ease), box-shadow 240ms var(--site-ease); }
.post-card:hover { transform: translateY(-3px); box-shadow: 0 24px 44px -30px #0f242045; }
.post-card > a { flex: none; width: 30%; max-width: 14rem; }
.post-card img { width: 100%; height: 10rem; object-fit: cover; border-radius: 1.1rem; }
.post-card-content { min-width: 0; flex: 1; }
.post-card h3 { font-size: 1.3rem; line-height: 1.3; margin: 0 0 .5rem; }
.post-card h3 a { color: var(--site-ink); text-decoration: none; }
.post-card h3 a:hover { color: var(--site-accent-ink); text-decoration: underline; }
.post-card time { color: var(--site-muted); font-size: .85rem; }
.post-card p { margin: .65rem 0 .85rem; color: var(--site-muted); font-size: .95rem; }
.post-tags, .article-tags { display: flex; gap: .4rem; flex-wrap: wrap; }
.post-tags a, .article-tags a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: .35rem .85rem; border: 1px solid var(--site-line); border-radius: 2rem; background: var(--site-tint); color: var(--site-accent-ink); font-size: .8rem; text-decoration: none; }
.post-tags a:hover, .article-tags a:hover { border-color: var(--site-sage); background: #dcebe4; }
.article-tags { margin-block: 1.5rem; }
.article-tags p { display: contents; }
.archive-link { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; margin-bottom: .5rem; font-weight: 600; }
.archive-link::after { content: "↗"; }
.page-navigation { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 2rem; color: var(--site-muted); font-size: .9rem; }
.page-navigation a { display: inline-flex; align-items: center; min-height: 44px; padding: .5rem 1rem; border: 1px solid var(--site-line); border-radius: 2rem; background: white; text-decoration: none; }

/* Resume, article figures, and the client-side widget keep their content. */
#home { padding: 2rem; margin-block-end: clamp(2rem, 4vw, 3rem); border: 1px solid var(--site-line); border-radius: var(--site-radius); background: white; box-shadow: var(--site-shadow); }
#home > p:first-child { margin-bottom: 1.5rem; }
#home img { border: 6px solid var(--site-tint); }
#home h2 { margin-top: 0; border: 0; }
#professional-experience > h3, #mentoring-experience > h3, #education > h3, #research-experience > h3 { padding-left: 1rem; border-left: 3px solid var(--site-sage); }
#skills ul { columns: 2; }
#skills li { margin-bottom: .4rem; }
.comparison-figures { display: flex; gap: 1rem; }
.comparison-figures img { width: calc(50% - .5rem); object-fit: contain; }
.slide-deck { width: 100%; aspect-ratio: 16 / 9; }
.slide-deck iframe { width: 100%; height: 100%; border-radius: 1rem; }
#reactive-chart { padding: 1.25rem; border: 1px solid var(--site-line); border-radius: var(--site-radius); background: white; box-shadow: var(--site-shadow); }
#amplitude-curve { stroke: var(--site-accent); }
input[type="range"] { accent-color: var(--site-accent); }
.nav-footer { margin-top: 2rem; border-top: 1px solid var(--site-line); background: var(--site-tint); color: var(--site-muted); }
.nav-footer-center { padding: 1.5rem 1rem; }

@media (max-width: 991px) {
  #quarto-header { padding: .5rem .75rem 0; }
  #quarto-header .navbar { padding: .4rem .75rem; border-radius: 1.75rem; }
  #quarto-header .navbar-collapse { padding: .75rem 0 .25rem; }
  #quarto-header .navbar-nav-scroll { max-height: none; }
  #quarto-header .navbar-nav.ms-auto { flex-direction: row; padding-top: .5rem; border-top: 1px solid var(--site-line); margin-top: .5rem; }
}
@media (max-width: 767px) {
  #quarto-document-content { padding-top: 1.25rem; }
  .site-home #quarto-document-content > .site-intro { padding: 2rem 0 2.5rem; }
  .post-card { gap: 1rem; padding: 1rem; border-radius: 1.5rem; }
  .post-card img { height: 9rem; }
  #home { padding: 1.5rem; }
}
@media (max-width: 575px) {
  .post-card { flex-direction: column; align-items: stretch; }
  .post-card > a { width: 100%; max-width: none; }
  .post-card img { height: auto; max-height: 16rem; aspect-ratio: 16 / 9; }
  #skills ul { columns: 1; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  .post-card { transition: none; }
  .post-card:hover { transform: none; }
}
@media (prefers-contrast: more) {
  .post-card, #home, #reactive-chart, #quarto-header .navbar { border-color: var(--site-muted); background: white !important; }
  .post-tags a, .article-tags a { border-color: var(--site-accent); }
}
@media print {
  body { background: white; }
  #quarto-header { display: none; }
  .post-card, #home { box-shadow: none; break-inside: avoid; }
}
