/* 1. Typography */
body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    line-height: 1.5;
    font-size: 14px;
    color: #1b1f23;
}

.md-typeset {
    font-size: 0.75rem !important;
}

.md-typeset h1 {
    font-size: 2.5em !important;
    font-weight: 800 !important;
    margin: 1em 0 0.5em;
}


.md-typeset h2 {
    font-size: 2em !important;
    font-weight: 700 !important;
    margin: 1em 0 0.5em;
}

.md-typeset h3 {
    font-size: 1.75em !important;
    font-weight: 700 !important;
}

.md-typeset h4 {
    font-size: 1.3em !important;
    font-weight: 700 !important;
}

.md-typeset h5 {
    font-size: 1em !important;
    font-weight: 700 !important;
}

.md-typeset h6 {
    font-size: 1.1em !important;
    font-weight: 700 !important;
}

/* Navigation size adjustment */
.md-nav {
    font-size: 0.7rem !important;
}

.md-typeset .admonition,
.md-typeset details {
    font-size: 0.6rem !important;
}

/* Ensure tables use smaller text */
.md-typeset table:not([class]) {
    font-size: 0.7rem !important;
}

/* Code blocks */
.md-typeset code {
    font-size: 0.65rem !important;
}



/* 2. Color Scheme */
:root {
    --primary-color: #5e35b1;
    /* Deep Purple 600 */
    --accent-color: #ff5722;
    /* Deep Orange 500 */
    --background-color: #ffffff;
    --text-color: #75c6ee;
}

/* 3. Layout and Structure */
.md-grid {
    max-width: 1440px;
    /* Uncomment if you want to limit the max width */
}

/* 4. Component-specific styles */
/* Sidebar */
.md-nav__link--active {
    color: var(--primary-color);
    font-weight: bold;
}

.md-nav__link:hover {
    color: var(--accent-color);
}

/* Admonitions */
.md-typeset .admonition,
.md-typeset details {
    border-left: 4px solid var(--primary-color);
    border-radius: 4px;
}

.md-typeset .admonition-title,
.md-typeset summary {
    background-color: rgba(94, 53, 177, 0.1);
}

.md-nav__list .md-nav__list {
    margin-left: .3rem;
    /* Base indentation for nested items */
}

/* Adjust spacing for deeper nesting levels */
.md-nav__list .md-nav__list .md-nav__list {
    margin-left: .3rem;
    /* Slightly larger indent for third level */
}


/* Tables */
.md-typeset table:not([class]) {
    border-collapse: collapse;
    width: 100%;
}

.md-typeset table:not([class]) th {
    background-color: var(--primary-color);
    color: white;
}

.md-typeset table:not([class]) td,
.md-typeset table:not([class]) th {
    padding: 12px;
    border: 1px solid #e0e0e0;
}

/* Cards */
.md-typeset .card {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: box-shadow 0.3s ease-in-out;
}

.md-typeset .card:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* 5. Dark Mode */
[data-md-color-scheme="slate"] {
    --md-default-bg-color: #2e3032;
    --md-default-fg-color: #e6edf3;
    --md-default-fg-color--light: #c9d1d9;
    --md-default-fg-color--lighter: #8b949e;
    --md-default-fg-color--lightest: #6e7681;

    --primary-color: #58a6ff;
    --accent-color: #79ffe6;
    --background-color: #1e2124;
    --text-color: #75c6ee;
    --header-color: #4cb5e9;

    /* Adjust other custom variables as needed */
}

[data-md-color-scheme="slate"] .md-typeset h1,
[data-md-color-scheme="slate"] .md-typeset h2,
[data-md-color-scheme="slate"] .md-typeset h3,
[data-md-color-scheme="slate"] .md-typeset h4,
[data-md-color-scheme="slate"] .md-typeset h5,
[data-md-color-scheme="slate"] .md-typeset h6 {
    color: var(--header-color);
}

/* General text and background colors */
[data-md-color-scheme="slate"] body,
[data-md-color-scheme="slate"] .md-typeset {
    /* Added .md-typeset for broader coverage */
    color: var(--text-color);
}

/* Links */
[data-md-color-scheme="slate"] .md-typeset a {
    color: var(--accent-color);
}

[data-md-color-scheme="slate"] .md-typeset a:hover {
    color: #b16fe1;
}

/* Code Blocks */
[data-md-color-scheme="slate"] .md-typeset code {
    background-color: #2f3439;
    color: #e6edf3;
}

/* Adjust card text colors for dark mode */
[data-md-color-scheme="slate"] .card h3,
[data-md-color-scheme="slate"] .card p {
    color: var(--text-color);
}

/* Style for nested navigation items */
[data-md-color-scheme="slate"] .md-nav__item .md-nav__item {
    color: var(--md-default-fg-color--light);
}

/* Navigation text color */
[data-md-color-scheme="slate"] .md-nav__item .md-nav__link {
    color: var(--text-color);
}

/* Active navigation item */
[data-md-color-scheme="slate"] .md-nav__item .md-nav__link--active {
    color: var(--md-typeset-a-color);
    font-weight: bold;
}

/* Hover state for navigation items */
[data-md-color-scheme="slate"] .md-nav__item .md-nav__link:hover {
    color: var(--md-typeset-a-color);
}

/* Navigation section title */
[data-md-color-scheme="slate"] .md-nav__title {
    color: var(--md-default-fg-color--light);
}

/* 6. High Contrast Mode */
[data-md-color-scheme="highcontrast"] {
    --primary-color: #ffffff;
    --accent-color: #ffffff;
    --background-color: #000000;
    --text-color: #ffffff;
}

/* 7. Card Grid Set up */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    /* Reduced from 250px */
    gap: 0.5rem;
    /* Reduced from 1.5rem */
    margin: 0.5rem 0;
    /* Reduced from 1.5rem */
}

.card {
    background-color: #fff;
    border: 1px solid #e1e4e8;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease-in-out;
    overflow: hidden;
}

.card-content {
    display: flex;
    padding: 0.2rem;
    /* Minimal padding */
    flex-direction: column;
    height: 100%;
}

.card:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.card h3 {
    font-size: 0.2rem;
    /* Reduced from original */
    margin: 0 0 0.2rem 0;
    /* Tighter margin */
    font-weight: 100;
    color: #000000;
}

.card p {
    font-size: 0.7rem;
    /* Smaller than original */
    color: #3e4951;
    margin: 0;
    line-height: 1.2;
    /* Tighter line height */
}

/* Dark mode adjustments */
[data-md-color-scheme="slate"] .card {
    background-color: var(--md-primary-fg-color--darkest);
}

[data-md-color-scheme="slate"] .card:hover {
    background-color: var(--md-primary-fg-color--darker);
}