/* docs/source/_static/custom.css */

/* Subtle “concrete” texture using a light speckle effect */
body {
  background-image:
    radial-gradient(rgba(0,0,0,0.035) 1px, transparent 1px),
    radial-gradient(rgba(0,0,0,0.02) 1px, transparent 1px);
  background-size: 22px 22px, 44px 44px;
  background-position: 0 0, 10px 10px;
}

/* Safety stripe accent on the left sidebar */
.sidebar-drawer,
.sidebar-container {
  border-right: 6px solid var(--color-brand-primary);
}

/* “Rebar underline” for headings.
 *
 * NO `position: relative` HERE. It was here to "anchor" the ::after below, but
 * that pseudo-element is `display: block` in normal flow -- it never needed a
 * positioned parent, and removing the rule leaves it pixel-identical (measured:
 * 72x4px, display block, same colour, same margin-top, in both states).
 *
 * What it DID do was raise every heading above furo's statically-positioned
 * `.theme-toggle-container.theme-toggle-content`, which sits in the same top
 * strip. The h1 box overhangs its column by ~9px each side and reaches x=1213
 * while the toggle occupies x=1183-1205, so the heading painted over the button
 * and swallowed the click. The toggle was visible and enabled the whole time --
 * it simply could not receive a pointer event. Playwright named the offender
 * exactly: "<h1> from <article id=furo-main-content> subtree intercepts pointer
 * events".
 *
 * If a heading ever does need positioning, give the toggle container a
 * `position: relative; z-index: 10` at the same time -- do not reintroduce this
 * on its own.
 */
h1::after, h2::after {
  content: "";
  display: block;
  margin-top: 0.35rem;
  width: 72px;
  height: 4px;
  background: var(--color-brand-primary);
  border-radius: 2px;
}

/* Make code blocks feel like a dark tool panel */
.highlight, pre, code {
  border-radius: 10px;
}

/* Admonitions look like site signage */
.admonition {
  border-left: 6px solid var(--color-brand-primary);
}

/* PM visual components used by mock portfolio pages */
.pm-visual-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin: 1rem 0 1.25rem;
}

.pm-visual-card {
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: linear-gradient(
    160deg,
    var(--color-background-primary) 0%,
    var(--color-background-secondary) 100%
  );
  padding: 0.85rem;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.pm-visual-card h4 {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
  line-height: 1.3;
}

.pm-visual-card svg {
  width: 100%;
  height: auto;
  display: block;
}

.pm-visual-caption {
  margin: 0.55rem 0 0;
  font-size: 0.82rem;
  color: var(--color-foreground-secondary);
  line-height: 1.35;
}

.pm-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.8rem;
  margin-top: 0.5rem;
  font-size: 0.78rem;
  color: var(--color-foreground-secondary);
}

.pm-dot {
  width: 10px;
  height: 10px;
  border-radius: 100px;
  display: inline-block;
  margin-right: 0.32rem;
  vertical-align: middle;
}

.pm-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.55rem;
}

.pm-chip {
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  background: var(--color-background-primary);
}
