/* --------------------------------------------------------------------------
   Site foundation
   Brand fonts, global layout, navigation, base elements, and inherited theme
   behavior. Content/category styling lives in general.css and section files.
-------------------------------------------------------------------------- */

@import url('https://fonts.googleapis.com/css2?family=Literata:ital,opsz,wght@0,7..72,200..900;1,7..72,200..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Red+Hat+Mono:ital,wght@0,300..700;1,300..700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;600;700&display=swap');

/* Brand tokens shared by every page and content type. */
:root {
  --content-width: 720px;
  --toc-width: 13rem;
  --toc-gap: 1.5rem;
  --font-serif: "Literata", Georgia, "Times New Roman", serif;
  --font-sans: "Source Sans 3", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Red Hat Mono", "IBM Plex Mono", Consolas, monospace;
}
 
/* Page shell and default reading typography. */
body {
  background-color: var(--bg-color);
}
 
body, main {
  height: 100%;
  font-family: var(--font-serif);
  font-optical-sizing: auto;
  font-style: normal;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.72;
  color: var(--font-color) ;
}

/* Global link and selection behavior. */
::selection {
  background: var(--secondary-transparant);
  color: var(--selection-color);
}

nav a, a {
  text-decoration: none ;
}

nav a:hover, a:hover {
  text-decoration: underline ;
}

a {
  color: var(--primary-variant) ;
  text-decoration: underline ;
  text-underline-offset: 0.375em ;
}

a:hover {
  color: var(--primary) ;
}

/* Shared heading scale for plain pages. */
h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: 0;
}

.site-content > h1 {
  margin-bottom: 1.65rem;
  font-size: clamp(2.45rem, 7vw, 4.7rem);
}

.site-content > h2 {
  margin-top: 2.5rem;
  font-size: 1.45rem;
}

.site-content > h3 {
  margin-top: 2rem;
  font-size: 1.16rem;
}

time.small,
.section-card-summary,
.entry-footer,
.post-follow {
  font-family: var(--font-sans);
}

@media (min-width: 768px) {
  .container {
    max-width: var(--content-width) ;
  }
}

/* Header, brand mark, and main navigation. */
.site-header {
  border-bottom: 1px solid color-mix(in srgb, var(--font-color) 12%, transparent);
}

.site-header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: var(--content-width);
  min-height: 4.25rem;
  margin: 0 auto;
  padding: 0 0.75rem;
}

.site-brand {
  display: inline-flex;
  flex-direction: column;
  gap: 0.12rem;
  color: var(--font-color);
  font-family: var(--font-sans);
  font-weight: 600;
  line-height: 1.05;
  text-decoration: none;
}

.site-brand-title {
  font-size: 1.8rem;
  letter-spacing: 0.1em;
}

.site-brand-tagline {
  color: var(--secondary);
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.03em;
}

.site-brand:hover {
  color: var(--primary);
  text-decoration: none;
}

.site-brand:hover .site-brand-tagline {
  color: var(--primary);
}

.site-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 1.45rem;
  align-items: center;
  padding-left: 0;
  margin: 0;
  list-style: none;
}

.site-menu a {
  display: inline-block;
  color: var(--primary-variant);
  font-family: var(--font-sans);
  font-size: 1.05rem;
  padding: 0.15rem 0;
  border-bottom: 2px solid transparent;
  text-decoration: none;
}

.site-menu a:hover,
.site-menu a.is-active,
.site-menu a.is-ancestor {
  color: var(--primary);
  border-bottom-color: var(--primary);
  text-decoration: none;
}

.site-menu a.is-active,
.site-menu a.is-ancestor {
  font-weight: 700;
}

.site-menu-dropdown {
  display: none;
  position: relative;
  flex: 0 0 auto;
  font-family: var(--font-sans);
}

.site-menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.55rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid color-mix(in srgb, var(--secondary) 28%, transparent);
  border-radius: 6px;
  color: var(--primary-variant);
  background: color-mix(in srgb, var(--bg-color) 92%, white);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.site-menu-toggle::-webkit-details-marker {
  display: none;
}

.site-menu-toggle:hover,
.site-menu-toggle:focus-visible {
  border-color: color-mix(in srgb, var(--primary) 52%, transparent);
  color: var(--primary);
  outline: none;
}

.site-menu-toggle-icon {
  position: relative;
  display: inline-block;
  width: 1rem;
  height: 0.7rem;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

.site-menu-toggle-icon::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(50% - 1px);
  border-top: 2px solid currentColor;
}

.site-menu-panel {
  position: absolute;
  top: calc(100% + 0.65rem);
  right: 0;
  z-index: 20;
  width: min(16rem, calc(100vw - 1.5rem));
  padding: 0.35rem;
  border: 1px solid color-mix(in srgb, var(--secondary) 20%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--bg-color) 96%, white);
  box-shadow: 0 1.1rem 2.4rem color-mix(in srgb, #000 18%, transparent);
}

.site-menu-mobile {
  display: grid;
  gap: 0.15rem;
}

.site-menu-mobile a {
  display: block;
  padding: 0.7rem 0.8rem;
  border-bottom: 0;
  border-radius: 5px;
  font-size: 1rem;
}

.site-menu-mobile a:hover,
.site-menu-mobile a.is-active,
.site-menu-mobile a.is-ancestor {
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  color: var(--primary);
  text-decoration: none;
}

@media (max-width: 680px) {
  .site-header-inner {
    min-height: 4rem;
  }

  .site-header-nav {
    display: none;
  }

  .site-menu-dropdown {
    display: block;
  }

  .site-brand {
    min-width: 0;
  }

  .site-brand-title {
    font-size: 1.45rem;
    letter-spacing: 0.08em;
  }

  .site-brand-tagline {
    font-size: 0.74rem;
  }
}

@media (max-width: 400px) {
  .site-brand-tagline {
    display: none;
  }
}

/* Main content width and vertical placement. */
.site-shell {
  padding-top: 6rem;
}

/* Baseline styling for generated rich-text elements. */
table:not(.gist-data *) {
  border-collapse: collapse;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 1200px) {
  table:not(.gist-data *) {
    width: 100%;
  }
}

th:not(.gist-data *),
td:not(.gist-data *) {
  padding: .5rem;
  text-align: left;
}

th:not(.gist-data *) {
  font-weight: bold;
  background-color: var(--bg-variant);
}

td:not(.gist-data *) {
  border-bottom: 2px solid var(--bg-variant) ;
}

ul > li:has(input[type=checkbox]) {
  list-style-type: none;
}

/* Code, marks, keyboard hints, and syntax-highlight blocks. */
code {
  font-family: var(--font-mono);
}

code:not(.highlight *) {
  color: var(--secondary);
  font-weight: 600;
  user-select: all;
  padding-left: .3em;
  padding-right: .3em;

}

.highlight > div {
  padding: 0 1em;
}

.highlight > pre  {
  padding: 1em;
}

mark {
  background-color: var(--primary-variant) ;
}

kbd {
  background-color: var(--bg-variant) ;
  font-family: var(--font-mono);
  font-weight: bold;
}


.content-body a:has(img)::after {
  content: none ;
}

/* Taxonomies, badges, images, and small utility elements. */
.breadcrumb-item+.breadcrumb-item::before {
  color: #6c757d ;
}

.breadcrumb {
  font-family: var(--font-sans);
}

.tags a {
  text-decoration: none ;
}

.tags a:hover {
  background-color: var(--primary) ;
  color: var(--selection-color) ;
  text-decoration: none ;
}

.underline {
	background-image: linear-gradient(to right, var(--secondary), var(--secondary));
	background-position: bottom left;
	background-repeat: no-repeat;
	background-size: 100% 2px;
	text-decoration: none ; 
}

img {
  max-width: 100%;
}

figure {
  box-sizing: border-box;
  display: inline-block;
  max-width: 100%;
  width: 100%;
  text-align: center;
}

figure img {
  max-height: 500px;
  max-width: 100%;
  margin: 0 auto 0 auto;
}


ul:has(input[type=checkbox]) {
  margin-left: 0 ;
  padding-left: 0.5rem;
}

li > input[type=checkbox] {
  margin-right: 0.2rem;
}

@media (max-width: 767px) {
  .breadcrumb {
    flex-direction: column ;
    --bs-breadcrumb-item-padding-x: 0rem ;
  }

  .breadcrumb-item::before {
    display: none ;
    
  }

}

.badge {
  font-family: var(--font-sans);
  font-weight: 600 ;
}

hr {
  border: 0 ;
  height: 10px;
  color: var(--secondary) ;
  background-image: linear-gradient(-45deg,
    transparent,
    transparent 25%,
    currentColor 25%,
    currentColor 50%,
    transparent 50%,
    transparent 75%,
    currentColor 75%);
  background-size: 4px 4px;
}

.terms-char {
  &::before {
    content: '― ';
  }
}


