/* Minimal custom styles */

/* Override flatly's teal navbar with a neutral dark gray */
.navbar {
  background-color: #343a40 !important;
}
.navbar .navbar-brand,
.navbar .nav-link,
.navbar .navbar-toggler {
  color: #f8f9fa !important;
}
.navbar .nav-link:hover {
  color: #ffffffcc !important;
}

/* Override flatly's low-contrast teal link color with a darker,
   more readable blue — applies across all pages. */
a {
  color: #2c5282 !important;
}
a:hover {
  color: #1a365d !important;
}
.navbar a,
.navbar a:hover {
  color: #f8f9fa !important;
}
body.quarto-dark a {
  color: #90cdf4 !important;
}
body.quarto-dark a:hover {
  color: #bee3f8 !important;
}
body.quarto-dark .navbar a,
body.quarto-dark .navbar a:hover {
  color: #f8f9fa !important;
}

/* Dark mode: tone down regular body text to reduce eye strain, but keep
   headings, bold/italic/code, and listing titles at brighter values for
   visual hierarchy. */
body.quarto-dark {
  color: #b8bcc2 !important;
}
body.quarto-dark h1,
body.quarto-dark h2,
body.quarto-dark h3,
body.quarto-dark h4,
body.quarto-dark h5,
body.quarto-dark h6,
body.quarto-dark b,
body.quarto-dark strong,
body.quarto-dark em,
body.quarto-dark i,
body.quarto-dark code,
body.quarto-dark .listing-title {
  color: #ebedf0 !important;
}

/* Unified horizontal divider style: prominent in light, softer in dark.
   Applies to <hr> (markdown ---), listing posts, and listing table rows. */
hr,
.quarto-listing-default .quarto-post,
.quarto-listing-table,
.quarto-listing-table tr,
.quarto-listing-table th,
.quarto-listing-table td {
  border-top-color: rgba(0, 0, 0, 0.18) !important;
  border-bottom-color: rgba(0, 0, 0, 0.18) !important;
  opacity: 1 !important;
}
/* Dark mode dividers: softer than light. Targets Quarto's body class,
   which is set by both the in-page toggle and our system-pref init script. */
body.quarto-dark hr,
body.quarto-dark .quarto-listing-default .quarto-post,
body.quarto-dark .quarto-listing-table,
body.quarto-dark .quarto-listing-table tr,
body.quarto-dark .quarto-listing-table th,
body.quarto-dark .quarto-listing-table td {
  border-top-color: rgba(255, 255, 255, 0.16) !important;
  border-bottom-color: rgba(255, 255, 255, 0.16) !important;
}

/* Unified link style: subtle gray underline, soft yellow highlight on hover.
   Applies everywhere except the navbar (which keeps its own light-on-dark
   styling) and disabled listing anchors (description/date/image). */
a {
  text-decoration: underline;
  text-decoration-color: rgba(128, 128, 128, 0.4);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover {
  background-color: rgba(255, 220, 100, 0.18);
  text-decoration-color: currentColor;
  border-radius: 2px;
}
.navbar a,
.navbar a:hover {
  text-decoration: none;
  background-color: transparent;
}

/* Home listing: only the post title is clickable. */
.quarto-listing-default .quarto-post a {
  pointer-events: none;
  color: inherit;
  text-decoration: none !important;
  background-color: transparent !important;
  cursor: default;
}
.quarto-listing-default .quarto-post .listing-title a {
  pointer-events: auto;
  text-decoration: underline !important;
  text-decoration-color: rgba(128, 128, 128, 0.4) !important;
  cursor: pointer;
}
.quarto-listing-default .quarto-post .listing-title a:hover {
  background-color: rgba(255, 220, 100, 0.18) !important;
  text-decoration-color: currentColor !important;
  border-radius: 2px;
}

/* Category badges — unified archive-tag style across home, article, and
   archive pages: bordered pill, subtle opacity, yellow highlight on hover. */
.quarto-listing-default .listing-categories .listing-category,
.quarto-categories .quarto-category {
  display: inline-block;
  font-size: 0.65em !important;
  padding: 0.2em 0.55em;
  margin: 0.12em 0.2em 0.12em 0;
  border: 1px solid rgba(128, 128, 128, 0.4);
  border-radius: 0.25rem;
  text-decoration: none !important;
  color: inherit !important;
  background: transparent;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.7;
  transition: opacity 0.1s, background 0.1s;
}
.quarto-listing-default .listing-categories .listing-category:hover,
.quarto-categories .quarto-category:hover {
  opacity: 1;
  background: rgba(255, 220, 100, 0.3);
}
.quarto-listing-default .listing-categories {
  margin-top: 0.35em;
}

/* Default Quarto puts the date column at flex-basis 20% — way too wide
   for short dates like "Apr 17, 2026". Shrink it so the title column
   gets that space. */
.quarto-listing-default .quarto-post .metadata {
  flex-basis: auto !important;
  flex-grow: 0 !important;
  flex-shrink: 0 !important;
  white-space: nowrap;
}

/* Sidebar category cloud (Archive page right sidebar) — yellow glow on
   hover, matching the highlight style used elsewhere. */
.quarto-listing-category {
  /* Inset padding so the 3px hover glow on the leftmost/topmost tag
     isn't clipped by the sidebar's left edge. */
  padding-left: 4px;
}
.quarto-listing-category .category {
  cursor: pointer;
  border-radius: 3px;
  transition: background 0.1s, box-shadow 0.1s;
}
.quarto-listing-category .category:hover {
  background: rgba(255, 220, 100, 0.3);
  box-shadow: 0 0 0 3px rgba(255, 220, 100, 0.5);
}

/* Instant tag count tooltips */
[data-tip-text] {
  position: relative;
}
[data-tip-text]:hover::after {
  content: attr(data-tip-text);
  position: absolute;
  bottom: calc(100% + 4px);
  left: 0;
  padding: 2px 7px;
  font-size: 0.7rem;
  font-weight: 500;
  white-space: nowrap;
  border-radius: 3px;
  background: rgba(30, 30, 30, 0.88);
  color: #fff;
  pointer-events: none;
  z-index: 1000;
  /* Override the uppercase text-transform inherited from tag pills. */
  text-transform: none;
  letter-spacing: 0;
}
/* Invert tooltip in dark mode so it stands out from the dark page bg. */
body.quarto-dark [data-tip-text]:hover::after {
  background: rgba(240, 240, 240, 0.95);
  color: #1a1a1a;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* Vertical timeline in the home page right sidebar.
   Sidebar sticks in place; timeline scrolls independently. */
.post-timeline {
  padding: 0 0 0 16px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  scrollbar-width: thin;
}
.post-timeline::-webkit-scrollbar {
  width: 4px;
}
.post-timeline::-webkit-scrollbar-thumb {
  background: rgba(128, 128, 128, 0.3);
  border-radius: 2px;
}

#quarto-margin-sidebar {
  z-index: 999 !important;
  position: sticky !important;
  top: 60px;
  align-self: start;
}
/* Only the home page's sidebar (which contains the timeline) extends to
   the right viewport border; other pages keep Quarto's default sidebar
   column so things like the Categories cloud stay normally sized. */
#quarto-margin-sidebar:has(.post-timeline) {
  grid-column: body-content-end / screen-end-inset !important;
}
.post-timeline .timeline-title {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.65;
  margin-bottom: 0.4rem;
  /* Push down so the title baseline aligns with the page h1 "synesis"
     when scrolled to the top of the page. */
  padding-top: 1.5rem;
}
.post-timeline .timeline-strip {
  position: relative;
  padding-left: 0;
  margin-left: 0;
}
.post-timeline .timeline-strip::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(128, 128, 128, 0.35);
  z-index: 0;
}
body.quarto-dark .post-timeline .timeline-strip::before {
  background: rgba(255, 255, 255, 0.22);
}
.post-timeline .timeline-year {
  font-size: 0.72rem;
  font-weight: 600;
  opacity: 0.55;
  margin-top: 0.4rem;
  margin-bottom: 0.15rem;
  margin-left: -0.3em;
  font-variant-numeric: tabular-nums;
  position: relative;
  z-index: 2;
  background: var(--bs-body-bg, #fff);
  padding: 2px 4px 2px 0;
  display: inline-block;
}
body.quarto-dark .post-timeline .timeline-year {
  background: var(--bs-body-bg, #222);
}
.post-timeline .timeline-row {
  /* padding-top set inline encodes the time gap to previous post.
     The anchor inside is just the visible content; hover highlights
     stay tight around it, not the whitespace gap above. */
}
.post-timeline .timeline-post {
  display: flex;
  align-items: center;
  gap: 0.5em;
  position: relative;
  text-decoration: none !important;
  color: inherit !important;
  cursor: pointer;
  pointer-events: auto !important;
  min-height: 8px;
  padding: 1px 8px;
}
.post-timeline .timeline-post .timeline-dot {
  display: block;
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
  margin-left: 0;
  transition: opacity 0.1s, transform 0.1s, box-shadow 0.1s;
}
.post-timeline .timeline-post .timeline-label {
  font-size: 0.7rem;
  opacity: 0.7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
  transition: opacity 0.1s, transform 0.1s;
  transform-origin: left center;
}
/* Scroll-spy: when the matching post card is substantially visible in the
   home-page viewport, the corresponding timeline entry gets .in-view.
   Treatment is intentionally calmer than :hover (no halo, smaller scale,
   different color) so both can co-occur without visual conflict. */
.post-timeline .timeline-post.in-view .timeline-dot {
  opacity: 1;
  background: #2c5282;
  transform: scale(1.3);
}
body.quarto-dark .post-timeline .timeline-post.in-view .timeline-dot {
  background: #90cdf4;
}
.post-timeline .timeline-post.in-view .timeline-label {
  opacity: 0.95;
  font-weight: 500;
}
.post-timeline .timeline-post:hover {
  background-color: transparent !important;
  z-index: 10;
  width: max-content;
  max-width: none;
}
.post-timeline .timeline-post:hover .timeline-dot {
  opacity: 1;
  transform: scale(1.8);
  box-shadow: 0 0 0 6px rgba(255, 220, 100, 0.5);
  background: currentColor;
}
.post-timeline .timeline-post:hover .timeline-label {
  opacity: 1;
  transform: scale(1.18);
  font-weight: 500;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
  width: max-content;
  max-width: none;
  flex: none;
}

.post-timeline .timeline-feed {
  margin-top: 0.6rem;
  padding-top: 0.4rem;
}
.post-timeline .timeline-feed a {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  font-size: 0.72rem;
  opacity: 0.55;
  text-decoration: none !important;
  color: inherit !important;
  transition: opacity 0.15s;
}
.post-timeline .timeline-feed a:hover {
  opacity: 1;
}

/* Remove any vertical divider between main content and the right sidebar.
   (We keep the timeline's own border-left as the timeline line.) */
#quarto-margin-sidebar {
  border-left: none !important;
  border-right: none !important;
}

/* Scroll-margin so clicking a timeline dot lands the post below the
   fixed header rather than behind it */
.quarto-post {
  scroll-margin-top: 80px;
}

/* Archive page: widen the date column so dates don't wrap, and render
   tags as little clickable badges. */
.quarto-listing-table td:first-child,
.quarto-listing-table th:first-child {
  white-space: nowrap;
  width: 1%;
  padding-right: 1.2em;
}
.quarto-listing-table .listing-date {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.quarto-listing-table .listing-categories .archive-tag {
  display: inline-block;
  font-size: 0.65em;
  padding: 0.2em 0.55em;
  margin: 0.12em 0.2em 0.12em 0;
  border: 1px solid rgba(128, 128, 128, 0.4);
  border-radius: 0.25rem;
  text-decoration: none !important;
  color: inherit !important;
  background: transparent;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.7;
  transition: opacity 0.1s, background 0.1s;
}
.quarto-listing-table .listing-categories .archive-tag:hover {
  opacity: 1;
  background: rgba(255, 220, 100, 0.3);
}

/* Per-post navigation strip injected by post-nav.html.
   Three columns: older (left) | up-arrow back (center) | newer (right).
   Each cell is a flex container so its content stays vertically centered
   even when an adjacent cell wraps to multiple lines. */
.post-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(128, 128, 128, 0.25);
  font-size: 0.85rem;
  opacity: 0.85;
}
.post-nav-prev,
.post-nav-up,
.post-nav-next {
  display: flex;
  align-items: flex-start;
}
.post-nav-prev { justify-content: flex-start; }
.post-nav-up   { justify-content: center; }
.post-nav-next { justify-content: flex-end; text-align: right; }
.post-nav a {
  text-decoration: none;
  color: inherit !important;
}
.post-nav a:hover {
  background-color: rgba(255, 220, 100, 0.18);
  border-radius: 2px;
}
.post-nav-up a {
  display: inline-block;
  font-size: 1.2rem;
  line-height: 1;
  padding: 0.15em 0.45em;
  opacity: 0.6;
}
.post-nav-up a:hover { opacity: 1; }

/* Home listing pagination: simple squares with just a page number.
   Strip Bootstrap/flatly's pill shape, colored fills, and rounded corners.
   list.js only generates numbered items (no prev/next chevrons), so styling
   the base `.page-link` is enough. */
.listing-pagination .pagination {
  gap: 0.35rem;
  justify-content: center;
}
/* Our managed strip: replicates the layout bits Bootstrap's .pagination
   would have given us. We can't use class "pagination" on this element
   because list.js's pagination plugin would bind to it as a second
   list container and corrupt the parent list. */
.listing-pagination .managed-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 0;
}
.listing-pagination .page-item {
  margin: 0;
}
.listing-pagination .page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  border: 1px solid rgba(128, 128, 128, 0.4);
  border-radius: 2px !important;
  background: transparent !important;
  color: inherit !important;
  text-decoration: none !important;
  opacity: 0.75;
  transition: opacity 0.1s, background 0.1s;
  box-shadow: none !important;
}
.listing-pagination .page-link:hover {
  opacity: 1;
  background: rgba(255, 220, 100, 0.3) !important;
}
.listing-pagination .active .page-link,
.listing-pagination .page-item.active .page-link {
  opacity: 1;
  border-color: rgba(128, 128, 128, 0.7);
  background: rgba(128, 128, 128, 0.15) !important;
  font-weight: 600;
}
.listing-pagination .page-item.disabled .page-link {
  opacity: 0.25;
  cursor: not-allowed;
  pointer-events: none;
}
.listing-pagination .nav-arrow .page-link {
  font-size: 1.05rem;
  line-height: 1;
}

/* Replace Quarto's default toggle-off / toggle-on switch icons with a
   sun (light mode) / moon (dark mode) icon. Uses mask-image so the icon
   picks up currentColor (the navbar's light text), keeping it consistent
   with the rest of the navbar styling. */
.quarto-color-scheme-toggle .bi::before {
  background-image: none !important;
  background-color: currentColor;
  height: 1.05rem !important;
  width: 1.05rem !important;
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M8 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8M8 0a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 0m0 13a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 13m8-5a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2a.5.5 0 0 1 .5.5M3 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 3 8m10.657-5.657a.5.5 0 0 1 0 .707l-1.414 1.415a.5.5 0 1 1-.707-.708l1.414-1.414a.5.5 0 0 1 .707 0m-9.193 9.193a.5.5 0 0 1 0 .707L3.05 13.657a.5.5 0 0 1-.707-.707l1.414-1.414a.5.5 0 0 1 .707 0m9.193 2.121a.5.5 0 0 1-.707 0l-1.414-1.414a.5.5 0 0 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .707M4.464 4.465a.5.5 0 0 1-.707 0L2.343 3.05a.5.5 0 1 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .708'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M8 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8M8 0a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 0m0 13a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 13m8-5a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2a.5.5 0 0 1 .5.5M3 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 3 8m10.657-5.657a.5.5 0 0 1 0 .707l-1.414 1.415a.5.5 0 1 1-.707-.708l1.414-1.414a.5.5 0 0 1 .707 0m-9.193 9.193a.5.5 0 0 1 0 .707L3.05 13.657a.5.5 0 0 1-.707-.707l1.414-1.414a.5.5 0 0 1 .707 0m9.193 2.121a.5.5 0 0 1-.707 0l-1.414-1.414a.5.5 0 0 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .707M4.464 4.465a.5.5 0 0 1-.707 0L2.343 3.05a.5.5 0 1 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .708'/></svg>");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  opacity: 0.85;
  transition: opacity 0.15s;
}
.quarto-color-scheme-toggle.alternate .bi::before {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M6 .278a.77.77 0 0 1 .08.858 7.2 7.2 0 0 0-.878 3.46c0 4.021 3.278 7.277 7.318 7.277q.792-.001 1.533-.16a.79.79 0 0 1 .81.316.73.73 0 0 1-.031.893A8.35 8.35 0 0 1 8.344 16C3.734 16 0 12.286 0 7.71 0 4.266 2.114 1.312 5.124.06A.75.75 0 0 1 6 .278'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M6 .278a.77.77 0 0 1 .08.858 7.2 7.2 0 0 0-.878 3.46c0 4.021 3.278 7.277 7.318 7.277q.792-.001 1.533-.16a.79.79 0 0 1 .81.316.73.73 0 0 1-.031.893A8.35 8.35 0 0 1 8.344 16C3.734 16 0 12.286 0 7.71 0 4.266 2.114 1.312 5.124.06A.75.75 0 0 1 6 .278'/></svg>");
}
.quarto-color-scheme-toggle:hover .bi::before {
  opacity: 1;
}
.quarto-color-scheme-toggle:hover {
  background-color: rgba(255, 220, 100, 0.2) !important;
  border-radius: 3px;
}
