/* ==========================================================================
   ARG theme override for mkdocs-material
   Matches algorithmicresearchgroup.com aesthetic
   ========================================================================== */

/* ---------- Fonts ---------- */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;450;500;600;700&family=JetBrains+Mono:wght@400;500;600&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ---------- CSS Variables ---------- */

:root,
[data-md-color-scheme="default"] {
    --md-primary-fg-color: #0a0a0a;
    --md-primary-fg-color--light: #404040;
    --md-primary-fg-color--dark: #0a0a0a;
    --md-primary-bg-color: #ffffff;
    --md-accent-fg-color: #0a0a0a;
    --md-default-fg-color: #0a0a0a;
    --md-default-fg-color--light: #525252;
    --md-default-fg-color--lighter: #8b8b8b;
    --md-default-fg-color--lightest: #e0e0e0;
    --md-default-bg-color: #ffffff;
    --md-default-bg-color--light: #f6f6f6;
    --md-default-bg-color--lighter: #f6f6f6;
    --md-default-bg-color--lightest: #ffffff;
    --md-code-fg-color: #0a0a0a;
    --md-code-bg-color: #f6f6f6;
    --md-code-hl-color: #e0e0e0;
    --md-typeset-color: #0a0a0a;
    --md-typeset-a-color: #0a0a0a;
    --md-admonition-fg-color: #0a0a0a;
    --md-admonition-bg-color: #f6f6f6;
    --md-footer-fg-color: #8b8b8b;
    --md-footer-fg-color--light: #8b8b8b;
    --md-footer-fg-color--lighter: #8b8b8b;
    --md-footer-bg-color: #ffffff;
    --md-footer-bg-color--dark: #ffffff;

    --md-text-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --md-code-font: 'JetBrains Mono', 'Courier New', monospace;
}

/* ---------- Base typography ---------- */

body {
    -webkit-font-smoothing: antialiased;
}

.md-typeset {
    font-size: 16px;
    line-height: 1.75;
    color: #0a0a0a;
}

/* Headings use Space Grotesk */
.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.md-typeset h4,
.md-typeset h5,
.md-typeset h6 {
    font-family: 'Space Grotesk', 'Inter', -apple-system, sans-serif;
    color: #0a0a0a;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.md-typeset h1 {
    font-size: 36px;
    line-height: 1.15;
    margin-bottom: 16px;
}

.md-typeset h2 {
    font-size: 24px;
    font-weight: 600;
    margin-top: 48px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e0e0e0;
}

.md-typeset h3 {
    font-size: 20px;
    font-weight: 600;
    margin-top: 36px;
}

/* ---------- Links ---------- */

.md-typeset a {
    color: #0a0a0a;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: #e0e0e0;
}

.md-typeset a:hover {
    color: #404040;
    text-decoration-color: #404040;
}

/* ---------- Code ---------- */

.md-typeset code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85em;
    background: #f6f6f6;
    color: #0a0a0a;
    padding: 2px 6px;
    border-radius: 3px;
    border: none;
    box-shadow: none;
}

.md-typeset pre {
    background: #f6f6f6;
    border: 1px solid #ebebeb;
    border-radius: 6px;
}

.md-typeset pre > code {
    font-size: 13px;
    line-height: 1.6;
    background: transparent;
    padding: 0;
}

/* ---------- Header ---------- */

.md-header {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid #ebebeb;
    box-shadow: none;
    color: #0a0a0a;
}

.md-header[data-md-state="shadow"] {
    box-shadow: none;
    border-bottom: 1px solid #ebebeb;
}

.md-header__title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    font-weight: 600;
    color: #0a0a0a;
    letter-spacing: -0.02em;
}

.md-header__button {
    color: #0a0a0a;
}

.md-search__input {
    background-color: #f6f6f6;
    font-family: 'Inter', sans-serif;
}

/* ---------- Navigation sidebar ---------- */

.md-nav {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
}

.md-nav__link {
    color: #525252;
    font-weight: 450;
}

.md-nav__link:hover {
    color: #0a0a0a;
}

.md-nav__link--active,
.md-nav__item--active > .md-nav__link {
    color: #0a0a0a;
    font-weight: 500;
}

.md-nav__item--active > .md-nav__link {
    border-left: 2px solid #0a0a0a;
    padding-left: 10px;
}

/* Section labels */
.md-nav--primary .md-nav__title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #8b8b8b;
}

/* ---------- Sidebar (table of contents) ---------- */

.md-sidebar {
    border-right: none;
}

.md-sidebar--secondary .md-nav__link {
    font-size: 13px;
}

/* ---------- Tables ---------- */

.md-typeset table:not([class]) {
    font-size: 14px;
    border: 1px solid #e0e0e0;
    border-collapse: collapse;
}

.md-typeset table:not([class]) th {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #525252;
    background: #f6f6f6;
    padding: 12px 16px;
    border-bottom: 2px solid #0a0a0a;
}

.md-typeset table:not([class]) td {
    padding: 10px 16px;
    border-bottom: 1px solid #ebebeb;
    color: #0a0a0a;
}

.md-typeset table:not([class]) td code {
    font-size: 12px;
}

.md-typeset table:not([class]) tr:hover td {
    background: #f6f6f6;
}

/* ---------- Admonitions ---------- */

.md-typeset .admonition,
.md-typeset details {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    box-shadow: none;
    background: #f6f6f6;
}

.md-typeset .admonition-title,
.md-typeset summary {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    background: transparent;
    border-bottom: 1px solid #e0e0e0;
}

/* ---------- Footer ---------- */

.md-footer {
    background: #ffffff;
    border-top: 1px solid #e0e0e0;
    color: #8b8b8b;
}

.md-footer__link {
    color: #525252;
}

.md-footer__link:hover {
    color: #0a0a0a;
}

.md-footer-meta {
    background: #ffffff;
}

/* ---------- Content area ---------- */

.md-content {
    max-width: 800px;
}

/* ---------- Tabs ---------- */

.md-typeset .tabbed-labels > label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: #525252;
}

.md-typeset .tabbed-labels > label--active,
.md-typeset .tabbed-labels > .tabbed-labels__active {
    color: #0a0a0a;
    border-color: #0a0a0a;
}

/* ---------- Lists ---------- */

.md-typeset ul,
.md-typeset ol {
    line-height: 1.75;
}

.md-typeset li {
    margin-bottom: 4px;
}

/* ---------- Horizontal rules ---------- */

.md-typeset hr {
    border-top: 1px solid #ebebeb;
}

/* ---------- Copy button ---------- */

.md-clipboard {
    color: #8b8b8b;
}

.md-clipboard:hover {
    color: #0a0a0a;
}

/* ---------- Search ---------- */

.md-search__form {
    background-color: #f6f6f6;
    border-radius: 4px;
}

/* ---------- Hide Material extras ---------- */

.md-source {
    color: #525252;
}

.md-source:hover {
    opacity: 0.7;
}
