/* User Provided Stylesheet */

/*
  Styling to match sidd3888.github.io (colors, header, footer).
  Fonts are left to the MyST theme.

  The theme reads its colors from --myst-color-* variables, so most of the
  matching is done by pointing those at the site's palette.
*/

:root,
.light {
  /* Site palette (same values as style.css on the main site) */
  --site-bg: #fbfaf7;
  --site-surface: #ffffff;
  --site-ink: #1d1e22;
  --site-muted: #61646e;
  --site-line: #e7e3dc;
  --site-line-strong: #d6d0c6;
  --site-accent: #800000;
  --site-accent-hover: #5c0000;
  --site-accent-soft: #f7eeee;

  --myst-color-bg: var(--site-bg);
  --myst-color-bg-secondary: #f7f5f1;
  --myst-color-surface: #f1efea;
  --myst-color-surface-hover: var(--site-line);
  --myst-color-border: var(--site-line);
  --myst-color-border-strong: var(--site-line-strong);

  --myst-color-text: var(--site-ink);
  --myst-color-text-secondary: var(--site-muted);
  --myst-color-text-tertiary: var(--site-muted);
  --myst-color-prose-body: var(--site-ink);

  --myst-color-link: var(--site-accent);
  --myst-color-link-hover: var(--site-accent-hover);
  --myst-color-link-underline: rgba(128, 0, 0, 0.3);

  --myst-color-primary: var(--site-accent);
  --myst-color-primary-hover: var(--site-accent-hover);
  --myst-color-active: var(--site-accent);
  --myst-color-active-bg: var(--site-accent-soft);
  --myst-color-active-surface: var(--site-accent-soft);
  --myst-color-focus-ring: var(--site-accent);
  --myst-color-focus-outline: var(--site-accent-soft);

  --myst-color-accent-surface: var(--site-accent-soft);
  --myst-color-accent-surface-border: #e8cfcf;
  --myst-color-accent-surface-text: var(--site-accent-hover);
  --myst-color-accent-text: var(--site-accent-hover);
  --myst-color-inverse-bg: var(--site-accent);

  /* Theorem and proof boxes */
  --myst-color-theorem: var(--site-accent);
  --myst-color-theorem-bg: var(--site-surface);
  --myst-color-theorem-text: var(--site-accent);
  --myst-color-proof: var(--site-line-strong);
  --myst-color-proof-bg: var(--site-surface);
  --myst-color-proof-text: var(--site-muted);

  --myst-color-code: var(--site-accent-hover);
}

body {
  background: var(--site-bg);
}

/* ---------- Header: like .heading on the main site ---------- */

.myst-top-nav {
  background: rgba(251, 250, 247, 0.85);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  backdrop-filter: saturate(180%) blur(10px);
  box-shadow: none;
  border-bottom: 1px solid var(--site-line);
}

.myst-home-link span {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--site-ink);
}

.myst-top-nav-item a {
  position: relative;
  font-size: 15px;
  font-weight: 500;
  color: var(--site-muted);
}
.myst-top-nav-item a:hover {
  color: var(--site-ink);
}

/* "Materials" is the only nav link inside this site, so mark it as the current page */
.myst-top-nav-item a:not([href^="http"]) {
  color: var(--site-ink);
}
.myst-top-nav-item a:not([href^="http"])::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--site-accent);
}

/* The main site has no dark mode */
.myst-theme-button {
  display: none;
}

/* ---------- Article ---------- */

/* Links: no underline until hovered, like the main site */
article a {
  text-decoration: none !important;
}
article a:hover {
  text-decoration: underline !important;
  text-underline-offset: 3px;
}

/* Theorem and proof boxes: thin border and soft corners, like the paper cards */
.myst-proof {
  box-shadow: none;
  border-top: 1px solid var(--site-line);
  border-right: 1px solid var(--site-line);
  border-bottom: 1px solid var(--site-line);
  border-radius: 0 8px 8px 0;
}
.myst-proof-header {
  background: var(--site-accent-soft);
}

/* ---------- Footer: like the main site's footer ---------- */

footer.footer {
  background: transparent;
  box-shadow: none;
  border-top: 1px solid var(--site-line);
  color: var(--site-muted);
  font-size: 14px;
}
