/* ===================================================================
   AnyPINN Documentation — Custom Styles
   =================================================================== */

/* --- Custom Color Scheme ------------------------------------------ */

[data-md-color-scheme="slate"] {
    --md-primary-fg-color: #22c55e;
    --md-primary-fg-color--light: #4ade80;
    --md-primary-fg-color--dark: #16a34a;
    --md-accent-fg-color: #a3e635;
}

[data-md-color-scheme="default"] {
    --md-primary-fg-color: #16a34a;
    --md-primary-fg-color--light: #22c55e;
    --md-primary-fg-color--dark: #15803d;
    --md-accent-fg-color: #65a30d;
}

/* --- Typography --------------------------------------------------- */

.md-typeset h1 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.md-typeset h2 {
    font-weight: 600;
    letter-spacing: -0.01em;
    border-bottom: 1px solid var(--md-default-fg-color--lightest);
    padding-bottom: 0.4em;
}

.md-typeset h3 {
    font-weight: 600;
}

/* --- Cards -------------------------------------------------------- */

.md-typeset .grid.cards > ul > li {
    border-radius: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.md-typeset .grid.cards > ul > li:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

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

.md-typeset pre > code {
    border-radius: 8px;
}

.md-typeset .highlight {
    border-radius: 8px;
}

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

.md-typeset .admonition,
.md-typeset details {
    border-radius: 8px;
    border-left-width: 4px;
}

/* --- Images ------------------------------------------------------- */

.md-typeset img {
    border-radius: 8px;
}

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

/* Center Markdown Tables (requires md_in_html extension) */
.center-table {
    text-align: center;
}

.md-typeset .center-table :is(td, th):not([align]) {
    text-align: initial;
}

/* --- Masonry Gallery ---------------------------------------------- */

.gallery-masonry {
    columns: 3;
    column-gap: 1rem;
}

.gallery-masonry p {
    break-inside: avoid;
    margin-top: 0;
    margin-bottom: 1rem;
}

.gallery-masonry img {
    display: block;
    width: 100%;
}

@media (max-width: 900px) {
    .gallery-masonry {
        columns: 2;
    }
}

@media (max-width: 500px) {
    .gallery-masonry {
        columns: 1;
    }
}

/* --- Landing Page ------------------------------------------------- */

.md-typeset .hero {
    text-align: center;
    padding: 3rem 1rem 2rem;
}

.md-typeset .hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
    border-bottom: none;
    padding-bottom: 0;
}

.md-typeset .hero p {
    font-size: 1.2rem;
    opacity: 0.8;
    max-width: 600px;
    margin: 0 auto;
}

/* --- Navigation polish -------------------------------------------- */

.md-tabs {
    border-bottom: 1px solid var(--md-default-fg-color--lightest);
}

/* --- Content width ------------------------------------------------ */

.md-grid {
    max-width: 1440px;
}

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

.md-footer {
    margin-top: 3rem;
}
