/* hide header/footer/sidebars, including right-hand ToC */
.md-header,
.md-footer,
.md-sidebar--primary,
.md-sidebar--secondary { display: none !important; }

/* ---------- center the content column ---------- */
.md-main__inner {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
}
.md-content {
  box-sizing: border-box;
  max-width: 760px;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 3rem 1rem 4.5rem;    /* extra bottom space for fixed footer */
}
.md-content__inner {
  max-width: 100% !important;
  margin: 0 !important;
}
/* neutralize any grid widths that might offset */
.md-grid { max-width: none !important; }

/* Self-hosted Commit Mono */
@font-face {
  font-family: "Commit Mono";
  src: url("./fonts/commit-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Commit Mono";
  src: url("./fonts/commit-mono-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Use Commit Mono site-wide for text and code */
:root {
  --md-text-font: "Commit Mono", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --md-code-font: "Commit Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  /* Prevent browser from faking bold/italic if missing */
  font-synthesis-weight: none;
  font-synthesis-style: none;

  /* also point Material's link color var to text color (belt + suspenders) */
  --md-typeset-a-color: var(--md-default-fg-color);
}

/* Optional: improve readability of monospace body text */
.md-typeset {
  line-height: 1.55;
  letter-spacing: 0.01em;
}

/* type rhythm */
:root { --font-size-base: 17px; }
.md-typeset { font-size: var(--font-size-base); line-height: 1.65; }
.md-typeset h1 {
  font-size: clamp(1.25rem, 1.2rem + 1vw, 1.6rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 .25rem 0;
  color: #000 !important;
}
.md-typeset h1 a { color: #000 !important; }

.md-typeset h2 { font-size: 1.1rem; font-weight: 700; margin: 2rem 0 .5rem 0; }

/* h3 (###) — use bold weight 700 */
.md-typeset h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 1.25rem 0 .25rem 0;
  color: #000;
}
.md-typeset h3 a { color: inherit !important; }

.md-typeset p { margin: .25rem 0 .75rem 0; }
.md-typeset hr { border: none; border-top: 1px solid #ebe5e5; margin: 2rem 0; }

/* links: black + underline across all states */
.md-typeset a,
.md-typeset a:visited,
.md-typeset a:hover,
.md-typeset a:focus,
.md-typeset a:active {
  color: inherit !important;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

/* list spacing */
.md-typeset ul { margin: .25rem 0 1rem 1.2rem; }

/* remove skip link gap on small screens */
.md-skip { display: none; }

/* ---------- Tag filter: plain "[tags]" (no box, no icon) ---------- */
.md-typeset details.tag-filter {
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 0 1rem 0 !important;
}

/* kill theme chevrons completely */
.md-typeset details.tag-filter > summary::after,
.md-typeset details.tag-filter > summary::before {
  content: none !important;
  display: none !important;
  background: none !important;
  -webkit-mask-image: none !important;
  mask-image: none !important;
  width: 0 !important; height: 0 !important; margin: 0 !important;
}

/* [tags] label */
.md-typeset details.tag-filter > summary {
  cursor: pointer;
  display: inline-flex;          /* inline, no box */
  align-items: center;           /* vertical alignment */
  gap: .15rem;
  font-size: 1.15rem;            /* slightly larger label */
  font-weight: 700;
  line-height: 1.2;
  color: #000 !important;        /* match headers in light mode */
  text-transform: lowercase;
  padding: 0 !important; margin: 0 !important; border: 0 !important; background: none !important;
}
/* match headers in dark mode */
[data-md-color-scheme="slate"] .md-typeset details.tag-filter > summary {
  color: #fff !important;
}

.md-typeset details.tag-filter > summary .arrow {
  display: inline-block;
  line-height: 1;
  transform: translateY(0.06em);
}

/* revealed content: just the chips (no container box) */
.md-typeset .tag-filter .tag-options {
  display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .6rem;
}
.md-typeset .tag-filter .tag-clear {
  background: none !important; border: 0 !important; padding: 0 !important;
  margin-top: .6rem !important; font: inherit; color: inherit; text-decoration: underline; cursor: pointer;
}

/* --- Tag chips (also used under each project) --- */
.md-typeset .md-tag, .tag {
  display: inline-block;
  font: inherit; line-height: 1;
  padding: .18rem .5rem;
  border: 1px solid rgba(0,0,0,.25);
  border-radius: 999px;
  color: #000 !important;
  text-decoration: none !important;
  white-space: nowrap; vertical-align: middle;
}
.tag-row { margin-top: .5rem; display: inline-flex; flex-wrap: wrap; gap: .35rem; }

/* selected state in filter */
.tag-option.selected .md-tag { border-color: #000; box-shadow: inset 0 0 0 1px #000; }

/* hide the native checkbox; label toggles selection */
.tag-option input { position: absolute; opacity: 0; pointer-events: none; }

/* ---- Dark mode adjustments (Material's "slate" scheme) ---- */
/* Headings you forced to black — make them light in dark mode */
[data-md-color-scheme="slate"] .md-typeset h1,
[data-md-color-scheme="slate"] .md-typeset h3 {
  color: #fff !important;
}

/* Horizontal rule contrast on dark */
[data-md-color-scheme="slate"] .md-typeset hr {
  border-top-color: rgba(255,255,255,.25);
}

/* Tag chip borders on dark (chips stay pastel; text stays black) */
[data-md-color-scheme="slate"] .md-typeset .md-tag,
[data-md-color-scheme="slate"] .tag {
  border-color: rgba(255,255,255,.25);
}

/* ---------- Footer bar: use theme bg/fg in both schemes ---------- */
.site-bottom {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--md-default-bg-color);          /* same as page */
  border-top: 2px solid var(--md-default-fg-color);/* long line, auto-inverts */
  text-align: center;
  padding: .6rem 1rem;
  z-index: 50;
}
.site-bottom a {
  color: var(--md-default-fg-color) !important;    /* auto light/dark */
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* project title color: black (light), white (dark) */
.md-typeset .project > strong { color: #000; }
[data-md-color-scheme="slate"] .md-typeset .project > strong { color: #fff; }

/* if a title is a link inside <strong>, inherit the color */
.md-typeset .project > strong a { color: inherit !important; }

/* top-right language switcher */
.lang-switch {
  position: fixed;
  top: .75rem;
  right: .75rem;
  z-index: 70;
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  background: var(--md-default-bg-color); /* blends with page in light/dark */
  border: 1px solid var(--md-default-fg-color);
  border-radius: .5rem;
  padding: .18rem .4rem;
}
.lang-switch a {
  text-decoration: none;
  color: var(--md-default-fg-color) !important;
  font-size: 1.05rem;
  line-height: 1;
}
.lang-switch a.active { filter: saturate(1.2); transform: translateY(-0.5px); }
.lang-switch .sep { opacity: .5; margin: 0 .1rem; }

/* Optional: hide on very narrow screens */
@media (max-width: 420px) { .lang-switch { display: none; } }
