/* freemind-modern — the freemind layout on Bootstrap 5.3 + bootswatch yeti.
   Only what Bootstrap does not give us. Yeti supplies the palette, so every
   colour here comes from a --bs-* variable and dark mode follows for free. */

body {
  padding-top: 3.5rem;                       /* clears the fixed navbar */
  font-size: 1.0625rem;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

a { text-underline-offset: .15em; }
a:hover { text-decoration-thickness: .08em; }

/* ---------- masthead: the coloured band freemind put above every page ---------- */

.masthead {
  background: var(--bs-tertiary-bg);
  border-bottom: 1px solid var(--bs-border-color);
  padding: 2.75rem 0 2.25rem;
  margin-bottom: 2.5rem;
}

.masthead-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -.015em;
  margin: 0;
  text-wrap: balance;
}

.masthead-sub {
  color: var(--bs-secondary-color);
  margin: .5rem 0 0;
  font-size: 1rem;
}

.page-body { padding-bottom: 3.5rem; }

/* ---------- post list ---------- */

.entry {
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--bs-border-color);
}

.entry:last-of-type { border-bottom: 0; margin-bottom: 1rem; }

.entry-title {
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  line-height: 1.3;
  margin: 0 0 .35rem;
  text-wrap: pretty;
}

.entry-title a { color: var(--bs-body-color); text-decoration: none; }
.entry-title a:hover { color: var(--bs-primary); }

.entry-meta {
  font-size: .875rem;
  color: var(--bs-secondary-color);
  margin-bottom: .9rem;
}

.entry-meta a { color: var(--bs-secondary-color); }

.entry-excerpt > :last-child { margin-bottom: 0; }
.entry-excerpt p { color: var(--bs-body-color); }

.entry-more {
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

/* ---------- single post ---------- */

.post-content { font-size: 1.075rem; }
.post-content > :first-child { margin-top: 0; }
.post-content h2 { margin-top: 2.5rem; font-size: 1.5rem; }
.post-content h3 { margin-top: 2rem; font-size: 1.2rem; }
.post-content img { max-width: 100%; height: auto; border-radius: .375rem; }
.post-content figure { margin: 2rem 0; }
.post-content figcaption {
  font-size: .875rem;
  color: var(--bs-secondary-color);
  margin-top: .5rem;
  font-style: italic;
}
.post-content blockquote {
  border-left: 3px solid var(--bs-primary);
  padding-left: 1rem;
  color: var(--bs-secondary-color);
  margin: 1.75rem 0;
}
.post-content pre {
  background: var(--bs-tertiary-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: .375rem;
  padding: .9rem 1rem;
  font-size: .9rem;
  overflow-x: auto;
}
.post-content :not(pre) > code {
  background: var(--bs-tertiary-bg);
  padding: .1em .35em;
  border-radius: .25rem;
  font-size: .9em;
}
.post-content hr { margin: 2.5rem 0; opacity: .5; }

.post-footer { margin-top: 2.5rem; border-top: 1px solid var(--bs-border-color); padding-top: 1.25rem; }

.post-neighbours {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  margin-top: 1.25rem;
}

.post-neighbours a {
  display: block;
  border: 1px solid var(--bs-border-color);
  border-radius: .5rem;
  padding: .75rem .9rem;
  color: var(--bs-body-color);
  text-decoration: none;
  font-size: .925rem;
  line-height: 1.35;
}

.post-neighbours a:hover { border-color: var(--bs-primary); }
.post-neighbours .label {
  display: block;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--bs-secondary-color);
  margin-bottom: .25rem;
}

/* ---------- sidebar ---------- */

.sidebar .widget {
  background: var(--bs-tertiary-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: .5rem;
  padding: 1.1rem 1.15rem;
  margin-bottom: 1.25rem;
}

.widget-title {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
  margin: 0 0 .75rem;
}

.widget-list { list-style: none; margin: 0; padding: 0; font-size: .925rem; }
.widget-list li + li { margin-top: .5rem; }

/* ---------- tag chips ---------- */

.tag-chip {
  display: inline-block;
  font-size: .8rem;
  line-height: 1.35;
  padding: .15rem .5rem;
  margin: 0 .3rem .4rem 0;
  border: 1px solid var(--bs-border-color);
  border-radius: 999px;
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
  text-decoration: none;
  white-space: nowrap;
}

.tag-chip:hover { border-color: var(--bs-primary); color: var(--bs-primary); }
.tag-count { color: var(--bs-secondary-color); font-variant-numeric: tabular-nums; }
.post-tags .tag-chip { font-size: .8rem; }

/* ---------- archive ---------- */

.archive-year {
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--bs-secondary-color);
  margin: 2rem 0 .75rem;
  padding-bottom: .35rem;
  border-bottom: 1px solid var(--bs-border-color);
}
.archive-year:first-child { margin-top: 0; }

.archive-list { list-style: none; margin: 0; padding: 0; }
.archive-list li {
  display: flex;
  gap: .9rem;
  align-items: baseline;
  padding: .4rem 0;
  border-bottom: 1px solid var(--bs-border-color-translucent, rgba(0, 0, 0, .06));
}
.archive-list li:last-child { border-bottom: 0; }
.archive-list time {
  flex: 0 0 5.5rem;
  font-size: .8rem;
  color: var(--bs-secondary-color);
  font-variant-numeric: tabular-nums;
}
.archive-list a { color: var(--bs-body-color); text-decoration: none; }
.archive-list a:hover { color: var(--bs-primary); text-decoration: underline; }

/* ---------- pagination ---------- */

.pagination-wrap { margin-top: 2rem; }
.pagination { margin-bottom: 0; }

/* ---------- search ---------- */

.search-results { margin-top: .75rem; font-size: .9rem; }
.search-results ul { list-style: none; margin: 0; padding: 0; }
.search-results li { padding: .45rem 0; border-bottom: 1px solid var(--bs-border-color); }
.search-results li:last-child { border-bottom: 0; }
.search-results a { color: var(--bs-body-color); text-decoration: none; font-weight: 600; }
.search-results a:hover { color: var(--bs-primary); }
.search-results .search-snippet { color: var(--bs-secondary-color); display: block; font-size: .82rem; }
.search-results .search-empty { color: var(--bs-secondary-color); }
.search-results mark { padding: 0 .1em; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--bs-border-color);
  background: var(--bs-tertiary-bg);
  padding: 1.75rem 0;
  font-size: .9rem;
}

/* ---------- back to top ---------- */

#gotop {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1030;
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bs-dark);
  color: var(--bs-light);
  text-decoration: none;
  box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .25);
  font-size: 1.1rem;
}
#gotop[hidden] { display: none; }
#gotop:hover { color: #fff; background: var(--bs-primary); }

/* ---------- accessibility ---------- */

:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

@media (max-width: 991.98px) {
  body { padding-top: 3.25rem; }
  .masthead { padding: 2rem 0 1.6rem; margin-bottom: 1.75rem; }
  .sidebar { margin-top: .5rem; }
}
