/* Material sets html { font-size: 137.5% } at desktop, so 1rem = 22px.
   The default grid (61rem ≈ 1342px) plus default sidebars (12.1rem ≈
   266px each) leaves only ~810px for the article inside the grid, and
   wraps the whole thing in big side margins on wide screens.
   Widen the grid, shrink the sidebars, let the article breathe. */

/* Grid: take most of the viewport on wide screens, capped so very wide
   monitors don't stretch lines past readable width. */
.md-grid {
  max-width: min(1800px, 96vw);
}

/* On blog post pages the primary nav is replaced by the post-metadata
   drawer; if both render together they eat ~24rem. Hide the redundant
   primary nav. (Material already hides this when navigation.tabs is
   on, but keep the rule as a safety net.) */
body:has(.md-sidebar--post) .md-sidebar--primary {
  display: none;
}

/* Sidebar widths — explicit rems. At Material's 137.5% root font size,
   8rem ≈ 176px (post-meta blade) and 10rem ≈ 220px (TOC). */
.md-sidebar.md-sidebar--post {
  width: 8rem;
  flex: 0 0 8rem;
}
.md-sidebar.md-sidebar--secondary {
  width: 10rem;
  flex: 0 0 10rem;
}

/* Let the article column claim all remaining space inside the grid. */
.md-content {
  max-width: none;
  min-width: 0;
}
.md-content--post > .md-content__inner {
  flex-grow: 1;
  min-width: 0;
}

/* Circular site logo */
.md-header__button.md-logo img,
.md-header__button.md-logo svg {
  border-radius: 50%;
  object-fit: cover;
  width: 1.6rem;
  height: 1.6rem;
}

/* Skills section — pill / chip layout */
.skills h3 {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--md-default-fg-color--light);
  margin: 0.9rem 0 0.3rem;
  padding: 0;
  border: none;
}

.skills h3:first-child {
  margin-top: 0.25rem;
}

.md-typeset .skills ul {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0;
}

.md-typeset .skills ul li {
  display: inline-block;
  background: var(--md-default-fg-color--lightest);
  border: 1px solid var(--md-typeset-table-color, rgba(0, 0, 0, 0.07));
  border-radius: 999px;
  padding: 0.05rem 0.35rem;
  font-size: 0.68rem;
  color: var(--md-default-fg-color);
  margin: 0 -1px 0 0;
  line-height: 1.3;
}

.md-typeset .skills ul li::before {
  content: none !important;
}

[data-md-color-scheme="slate"] .skills li {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.10);
}
