/* MakeMyCodes - site theme.
   Light blog theme in Indigo & Violet: Inter for text, JetBrains Mono for code.
   Every page gets its look from here; pages should not add colours, fonts or sizes of their own.
   Animations live at the end of this file (with js/mmc-site.js) and respect "reduce motion". */

:root {
    --mmc-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --mmc-mono: "JetBrains Mono", Consolas, "SFMono-Regular", Menlo, monospace;

    --mmc-text: #1f2937;
    --mmc-heading: #111827;
    --mmc-muted: #6b7280;
    --mmc-accent: #4f46e5;          /* indigo */
    --mmc-accent-hover: #4338ca;
    --mmc-accent-soft: #eef2ff;
    --mmc-violet: #7c3aed;
    --mmc-pink: #ec4899;
    --mmc-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 55%, #ec4899 100%);
    --mmc-gradient-soft: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 50%, #fdf2f8 100%);
    --mmc-border: #e5e7eb;
    --mmc-surface: #f9fafb;
    --mmc-code-bg: #1e1b4b;         /* deep indigo */
    --mmc-code-text: #e0e7ff;
    --mmc-radius: 10px;

    --bs-body-font-family: var(--mmc-font);
    --bs-body-color: var(--mmc-text);
    --bs-link-color-rgb: 79, 70, 229;
    --bs-link-hover-color-rgb: 67, 56, 202;
}

/* ---------- Base ---------- */
html {
    font-size: 16px;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--mmc-font);
    font-size: 1.0625rem; /* 17px */
    line-height: 1.75;
    color: var(--mmc-text);
    background: #fff;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
}

a {
    color: var(--mmc-accent);
    text-decoration: none;
}

    a:hover {
        color: var(--mmc-accent-hover);
        text-decoration: underline;
    }

img {
    max-width: 100%;
    height: auto;
}

::selection {
    background: #c7d2fe;
}

.mmc-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.mmc-skip-link {
    position: absolute;
    left: -9999px;
}

    .mmc-skip-link:focus {
        left: 1rem;
        top: .75rem;
        z-index: 2000;
        background: #fff;
        padding: .5rem 1rem;
        border-radius: 6px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, .15);
    }

/* ---------- Header ---------- */
.mmc-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--mmc-border);
}

    .mmc-header .navbar {
        min-height: 64px;
        padding: .5rem 0;
    }

.mmc-brand {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -.02em;
    color: var(--mmc-heading);
}

    .mmc-brand:hover {
        color: var(--mmc-heading);
        text-decoration: none;
    }

    .mmc-brand .mmc-brand-accent {
        color: var(--mmc-accent);
    }

.mmc-brand-mark {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--mmc-accent);
    color: #fff;
    font-family: var(--mmc-mono);
    font-size: .85rem;
    font-weight: 700;
    letter-spacing: -.04em;
}

.mmc-header .nav-link {
    font-size: .9375rem;
    font-weight: 500;
    color: #374151;
    padding: .5rem .8rem !important;
    border-radius: 6px;
}

    .mmc-header .nav-link:hover {
        color: var(--mmc-accent);
        background: var(--mmc-surface);
        text-decoration: none;
    }

    .mmc-header .nav-link.active {
        color: var(--mmc-accent);
        background: var(--mmc-accent-soft);
    }

.mmc-header .navbar-toggler {
    border-color: var(--mmc-border);
}

    .mmc-header .navbar-toggler:focus {
        box-shadow: 0 0 0 3px rgba(79, 70, 229, .25);
    }

/* ---------- Page frame ---------- */
.mmc-page {
    padding-top: 2rem;
    padding-bottom: 3.5rem;
}

.mmc-breadcrumb {
    font-size: .875rem;
    margin-bottom: 1rem;
}

    .mmc-breadcrumb .breadcrumb {
        margin: 0;
        --bs-breadcrumb-divider-color: var(--mmc-muted);
        --bs-breadcrumb-item-active-color: var(--mmc-muted);
    }

    .mmc-breadcrumb a {
        color: var(--mmc-muted);
    }

        .mmc-breadcrumb a:hover {
            color: var(--mmc-accent);
        }

/* ---------- Article typography ---------- */
.mmc-article {
    min-width: 0;
    max-width: 780px;
    color: var(--mmc-text);
}

    .mmc-article h1,
    .mmc-article h2,
    .mmc-article h3,
    .mmc-article h4,
    .mmc-article h5,
    .mmc-article h6,
    .mainHeading,
    .HeadingStyle {
        font-family: var(--mmc-font);
        color: var(--mmc-heading);
        font-weight: 700;
        letter-spacing: -.015em;
        line-height: 1.3;
    }

    .mmc-article h1 {
        font-size: 2.375rem;
        font-weight: 800;
        letter-spacing: -.025em;
        line-height: 1.2;
        margin: 0 0 1.25rem;
    }

    .mmc-article h2 {
        font-size: 1.625rem;
        margin: 2.75rem 0 1rem;
        padding-top: .25rem;
    }

    .mmc-article h3,
    .mainHeading,
    .HeadingStyle {
        display: block;
        font-size: 1.3rem;
        margin: 2rem 0 .75rem;
    }

    .mmc-article h4 {
        font-size: 1.125rem;
        margin: 1.75rem 0 .6rem;
    }

    .mmc-article h5,
    .mmc-article h6 {
        font-size: 1rem;
        margin: 1.5rem 0 .5rem;
    }

    .mmc-article p {
        margin: 0 0 1.25rem;
    }

    .mmc-article b,
    .mmc-article strong {
        font-weight: 600;
        color: var(--mmc-heading);
    }

    .mmc-article a b,
    .mmc-article a strong {
        color: inherit;
    }

    .mmc-article ul:not(.list-group),
    .mmc-article ol:not(.list-group) {
        padding-left: 1.5rem;
        margin: 0 0 1.25rem;
    }

    .mmc-article li:not(.list-group-item) {
        margin-bottom: .4rem;
    }

    .mmc-article li::marker {
        color: var(--mmc-accent);
    }

    .mmc-article hr {
        margin: 2.5rem 0;
        border-color: var(--mmc-border);
        opacity: 1;
    }

    /* Screenshots and diagrams */
    .mmc-article img {
        display: block;
        margin: 1.5rem 0;
        border: 1px solid var(--mmc-border);
        border-radius: var(--mmc-radius);
        box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
    }

/* Key-point boxes */
.mmc-article .key-points {
    list-style: none;
    background: var(--mmc-surface);
    border: 1px solid var(--mmc-border);
    border-left: 4px solid var(--mmc-accent);
    border-radius: var(--mmc-radius);
    padding: 1rem 1.25rem 1rem 1.25rem !important;
    margin: 1.5rem 0;
}

    .mmc-article .key-points li {
        position: relative;
        padding-left: 1.4rem;
        margin-bottom: .45rem;
        overflow-wrap: anywhere;
    }

        .mmc-article .key-points li:last-child {
            margin-bottom: 0;
        }

        .mmc-article .key-points li::before {
            content: "";
            position: absolute;
            left: .2rem;
            top: .7em;
            width: 7px;
            height: 7px;
            border-radius: 50%;
            background: var(--mmc-accent);
        }

/* Notes / callouts */
.mmc-article .note {
    background: var(--mmc-accent-soft);
    border: 1px solid #e0e7ff;
    border-left: 4px solid var(--mmc-accent);
    border-radius: var(--mmc-radius);
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    color: var(--mmc-text);
}

/* ---------- Code ---------- */
.mmc-article pre {
    font-family: var(--mmc-mono);
    font-size: .875rem;
    line-height: 1.65;
    background: var(--mmc-code-bg);
    color: var(--mmc-code-text);
    border-radius: var(--mmc-radius);
    padding: 1.1rem 1.25rem;
    margin: 1.5rem 0;
    white-space: pre;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    tab-size: 4;
}

    .mmc-article pre code {
        font-family: inherit;
        font-size: inherit;
        color: inherit;
        background: none;
        padding: 0;
    }

.mmc-article :not(pre) > code {
    font-family: var(--mmc-mono);
    font-size: .875em;
    color: #0f172a;
    background: #f1f5f9;
    border: 1px solid var(--mmc-border);
    padding: .1em .35em;
    border-radius: 5px;
}

/* ---------- Tables ---------- */
.mmc-article table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
    font-size: .95rem;
    line-height: 1.55;
    margin: 1.5rem 0;
    border: 1px solid var(--mmc-border);
    border-radius: var(--mmc-radius);
}

    .mmc-article table > :not(caption) > * > * {
        padding: .7rem .9rem;
        border-bottom: 1px solid var(--mmc-border);
        background: transparent;
        box-shadow: none;
        color: var(--mmc-text);
        text-align: left;
        vertical-align: top;
    }

    .mmc-article table th,
    .mmc-article table thead td {
        background: var(--mmc-surface) !important;
        color: var(--mmc-heading) !important;
        font-weight: 600;
    }

    .mmc-article table tbody tr:nth-child(even) {
        background: #fcfcfd;
    }

    .mmc-article table td + td,
    .mmc-article table th + th {
        border-left: 1px solid var(--mmc-border);
    }

/* ---------- Previous / next tutorial ---------- */
.mmc-pager {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 3rem;
    max-width: 780px;
}

.mmc-pager-link {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--mmc-border);
    border-radius: 12px;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}

    .mmc-pager-link:hover {
        border-color: var(--mmc-accent);
        box-shadow: 0 4px 14px rgba(79, 70, 229, .12);
        text-decoration: none;
    }

.mmc-pager-next {
    text-align: right;
    grid-column: 2;
}

.mmc-pager-label {
    font-size: .8125rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--mmc-muted);
}

.mmc-pager-title {
    font-weight: 600;
    color: var(--mmc-heading);
    line-height: 1.4;
}

.mmc-pager-link:hover .mmc-pager-title {
    color: var(--mmc-accent);
}

@media (max-width: 575.98px) {
    .mmc-pager {
        grid-template-columns: 1fr;
    }

    .mmc-pager-next {
        grid-column: 1;
    }
}

/* ---------- Article footer: author card ---------- */
.mmc-author {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--mmc-surface);
    border: 1px solid var(--mmc-border);
    border-radius: 14px;
}

    .mmc-author img {
        width: 64px;
        height: 64px;
        border-radius: 50%;
        object-fit: cover;
        flex-shrink: 0;
        margin: 0;
        border: 0;
        box-shadow: none;
    }

    .mmc-author .mmc-author-label {
        font-size: .75rem;
        font-weight: 600;
        letter-spacing: .08em;
        text-transform: uppercase;
        color: var(--mmc-muted);
    }

    .mmc-author .mmc-author-name {
        font-weight: 700;
        color: var(--mmc-heading);
        margin: 0 0 .25rem;
    }

    .mmc-author p {
        font-size: .9375rem;
        line-height: 1.6;
        margin: 0;
        color: #475569;
    }

/* ---------- Sidebar ---------- */
.mmc-sidebar {
    font-size: .9375rem;
}

.mmc-side-box {
    border: 1px solid var(--mmc-border);
    border-radius: 14px;
    padding: 1.1rem .75rem .9rem;
    margin-bottom: 1.5rem;
    background: #fff;
}

.mmc-side-title {
    font-size: .75rem !important;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--mmc-muted) !important;
    margin: 0 .6rem .6rem !important;
    padding: 0 !important;
    line-height: 1.4 !important;
}

.mmc-side-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

    .mmc-side-links a {
        display: block;
        padding: .4rem .6rem;
        border-radius: 7px;
        color: #374151;
        line-height: 1.45;
        border-left: 3px solid transparent;
    }

        .mmc-side-links a:hover {
            background: var(--mmc-surface);
            color: var(--mmc-accent);
            text-decoration: none;
        }

        .mmc-side-links a[aria-current="page"] {
            background: var(--mmc-accent-soft);
            color: var(--mmc-accent);
            font-weight: 600;
            border-left-color: var(--mmc-accent);
            border-radius: 0 7px 7px 0;
        }

/* ---------- Buttons ---------- */
.btn-primary {
    --bs-btn-bg: var(--mmc-accent);
    --bs-btn-border-color: var(--mmc-accent);
    --bs-btn-hover-bg: var(--mmc-accent-hover);
    --bs-btn-hover-border-color: var(--mmc-accent-hover);
    --bs-btn-active-bg: var(--mmc-accent-hover);
    font-weight: 600;
}

.btn-outline-primary {
    --bs-btn-color: var(--mmc-accent);
    --bs-btn-border-color: #c7d2fe;
    --bs-btn-hover-bg: var(--mmc-accent-soft);
    --bs-btn-hover-color: var(--mmc-accent-hover);
    --bs-btn-hover-border-color: var(--mmc-accent);
    font-weight: 600;
}

.btn {
    border-radius: 8px;
    padding: .6rem 1.1rem;
}

    .btn:hover {
        text-decoration: none;
    }

/* ---------- Home page ---------- */
.mmc-hero {
    padding: 4rem 0 3rem;
    border-bottom: 1px solid var(--mmc-border);
    background: var(--mmc-gradient-soft);
}

    .mmc-hero h1 {
        font-size: clamp(2rem, 4.5vw, 3rem);
        font-weight: 800;
        letter-spacing: -.03em;
        line-height: 1.12;
        color: var(--mmc-heading);
        max-width: 820px;
        margin-bottom: 1rem;
    }

    .mmc-hero p {
        font-size: 1.2rem;
        color: #475569;
        max-width: 700px;
        margin-bottom: 1.75rem;
    }

.mmc-section-title {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--mmc-heading);
    margin: 0 0 .35rem;
}

.mmc-section-sub {
    color: var(--mmc-muted);
    margin-bottom: 1.5rem;
}

.mmc-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.5rem;
    border: 1px solid var(--mmc-border);
    border-radius: 14px;
    background: #fff;
    color: var(--mmc-text);
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

    .mmc-card:hover {
        border-color: #c7d2fe;
        box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
        transform: translateY(-2px);
        text-decoration: none;
        color: var(--mmc-text);
    }

    .mmc-card h3 {
        font-size: 1.2rem;
        font-weight: 700;
        color: var(--mmc-heading);
        margin: 0 0 .5rem;
    }

    .mmc-card p {
        font-size: .975rem;
        line-height: 1.6;
        color: #475569;
        margin: 0 0 1rem;
        flex-grow: 1;
    }

.mmc-card-meta {
    font-size: .875rem;
    font-weight: 600;
    color: var(--mmc-accent);
}

.mmc-card-icon {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--mmc-accent-soft);
    color: var(--mmc-accent);
    font-family: var(--mmc-mono);
    font-weight: 700;
    font-size: .95rem;
    margin-bottom: 1rem;
}

.mmc-post-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .mmc-post-list li {
        border-bottom: 1px solid var(--mmc-border);
    }

    .mmc-post-list a {
        display: flex;
        justify-content: space-between;
        gap: 1rem;
        padding: .85rem .25rem;
        color: var(--mmc-heading);
        font-weight: 500;
    }

        .mmc-post-list a:hover {
            color: var(--mmc-accent);
            text-decoration: none;
        }

    .mmc-post-list .mmc-post-tag {
        font-size: .8125rem;
        font-weight: 500;
        color: var(--mmc-muted);
        white-space: nowrap;
    }

/* ---------- About / Contact ---------- */
.mmc-team-card {
    text-align: center;
    padding: 1.75rem 1.25rem;
    border: 1px solid var(--mmc-border);
    border-radius: 14px;
    height: 100%;
}

    .mmc-team-card img {
        width: 112px;
        height: 112px;
        object-fit: cover;
        border-radius: 50%;
        margin: 0 auto 1rem;
        border: 0;
        box-shadow: none;
    }

    .mmc-team-card h3 {
        font-size: 1.125rem;
        margin: 0 0 .15rem;
    }

    .mmc-team-card .mmc-role {
        font-size: .875rem;
        font-weight: 600;
        color: var(--mmc-accent);
        margin-bottom: .75rem;
    }

    .mmc-team-card p {
        font-size: .95rem;
        line-height: 1.6;
    }

.mmc-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin: 2rem 0 .5rem;
}

    .mmc-stats > div {
        padding: 1rem;
        border: 1px solid var(--mmc-border);
        border-radius: 12px;
        background: var(--mmc-surface);
        text-align: center;
    }

    .mmc-stats strong {
        display: block;
        font-size: 1.25rem;
        font-weight: 800;
        letter-spacing: -.02em;
        color: var(--mmc-accent);
    }

    .mmc-stats span {
        font-size: .875rem;
        color: var(--mmc-muted);
    }

.mmc-program-card {
    height: 100%;
    padding: 1.25rem;
    border: 1px solid var(--mmc-border);
    border-radius: 14px;
}

    .mmc-program-card .mmc-card-icon {
        margin-bottom: .75rem;
    }

    .mmc-article .mmc-program-card h3 {
        font-size: 1.1rem;
        margin: 0 0 .4rem;
    }

    .mmc-article .mmc-program-card p {
        font-size: .95rem;
        line-height: 1.6;
        color: #475569;
        margin: 0;
    }

.mmc-trainer {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    padding: 1.5rem;
    border: 1px solid var(--mmc-border);
    border-radius: 14px;
    background: var(--mmc-surface);
}

    .mmc-article .mmc-trainer img {
        width: 120px;
        height: 120px;
        border-radius: 50%;
        object-fit: cover;
        flex-shrink: 0;
        margin: 0;
        border: 0;
        box-shadow: none;
    }

    .mmc-article .mmc-trainer h3 {
        margin: 0;
    }

    .mmc-trainer .mmc-role {
        font-size: .875rem;
        font-weight: 600;
        color: var(--mmc-accent);
        margin-bottom: .75rem;
    }

    .mmc-article .mmc-trainer p {
        margin-bottom: 1rem;
    }

.mmc-article ul.mmc-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

    .mmc-article .mmc-chips li {
        margin: 0;
        padding: .3rem .75rem;
        font-size: .875rem;
        font-weight: 600;
        color: var(--mmc-heading);
        background: #fff;
        border: 1px solid var(--mmc-border);
        border-radius: 999px;
    }

.mmc-cta {
    margin-top: 3rem;
    padding: 2rem;
    border-radius: 16px;
    background: var(--mmc-gradient);
    color: #fff;
}

    .mmc-article .mmc-cta h2 {
        color: #fff;
        margin: 0 0 .5rem;
        padding: 0;
    }

    .mmc-article .mmc-cta p {
        color: #e0e7ff;
        margin-bottom: 1.25rem;
    }

    .mmc-cta .btn-primary {
        --bs-btn-bg: #fff;
        --bs-btn-color: var(--mmc-accent-hover);
        --bs-btn-border-color: #fff;
        --bs-btn-hover-bg: #eef2ff;
        --bs-btn-hover-color: var(--mmc-accent-hover);
        --bs-btn-hover-border-color: #eef2ff;
    }

@media (max-width: 767.98px) {
    .mmc-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .mmc-trainer {
        flex-direction: column;
    }

    .mmc-cta {
        padding: 1.5rem;
    }
}

.mmc-contact-card {
    padding: 1.5rem;
    border: 1px solid var(--mmc-border);
    border-radius: 14px;
    height: 100%;
}

    .mmc-contact-card h2 {
        font-size: 1.125rem !important;
        margin: 0 0 .5rem !important;
        padding: 0 !important;
    }

    .mmc-contact-card p {
        margin: 0;
        overflow-wrap: anywhere;
    }

/* ---------- Footer ---------- */
.mmc-footer {
    background: var(--mmc-surface);
    border-top: 1px solid var(--mmc-border);
    font-size: .9375rem;
    color: #475569;
    padding: 3rem 0 1.5rem;
    margin-top: 2rem;
}

    .mmc-footer h2 {
        font-size: .8125rem;
        font-weight: 700;
        letter-spacing: .08em;
        text-transform: uppercase;
        color: var(--mmc-heading);
        margin-bottom: .9rem;
    }

    .mmc-footer ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .mmc-footer li {
        margin-bottom: .45rem;
    }

    .mmc-footer a {
        color: #475569;
    }

        .mmc-footer a:hover {
            color: var(--mmc-accent);
        }

    .mmc-footer p {
        line-height: 1.65;
    }

.mmc-footer-bottom {
    border-top: 1px solid var(--mmc-border);
    margin-top: 2rem;
    padding-top: 1.25rem;
    font-size: .875rem;
    color: var(--mmc-muted);
}

/* ---------- Small screens ---------- */
@media (max-width: 991.98px) {
    .mmc-header .navbar-collapse {
        padding: .5rem 0 1rem;
    }

    .mmc-article {
        max-width: none;
    }
}

@media (max-width: 575.98px) {
    body {
        font-size: 1rem;
    }

    .mmc-article h1 {
        font-size: 1.875rem;
    }

    .mmc-article h2 {
        font-size: 1.375rem;
        margin-top: 2.25rem;
    }

    .mmc-article h3,
    .mainHeading,
    .HeadingStyle {
        font-size: 1.15rem;
    }

    .mmc-article pre {
        font-size: .8125rem;
        border-radius: 8px;
        margin-left: -.25rem;
        margin-right: -.25rem;
    }

    .mmc-hero {
        padding: 2.5rem 0 2rem;
    }

        .mmc-hero p {
            font-size: 1.05rem;
        }
}

/* =====================================================================
   Indigo & Violet accents
   ===================================================================== */

/* Thin gradient strip along the top of the header */
.mmc-header::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 3px;
    background: var(--mmc-gradient);
}

.mmc-brand-mark {
    background: var(--mmc-gradient);
    box-shadow: 0 4px 12px rgba(124, 58, 237, .3);
}

.mmc-brand .mmc-brand-accent,
.mmc-gradient-text {
    background: var(--mmc-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
}

/* Menu links: animated underline on hover */
.mmc-header .nav-link {
    position: relative;
}

    .mmc-header .nav-link::after {
        content: "";
        position: absolute;
        left: .8rem;
        right: .8rem;
        bottom: .3rem;
        height: 2px;
        border-radius: 2px;
        background: var(--mmc-gradient);
        transform: scaleX(0);
        transform-origin: left;
        transition: transform .25s ease;
    }

    .mmc-header .nav-link:hover {
        background: transparent;
    }

        .mmc-header .nav-link:hover::after,
        .mmc-header .nav-link.active::after {
            transform: scaleX(1);
        }

/* Buttons */
.btn-primary {
    background-image: var(--mmc-gradient);
    border: 0;
    box-shadow: 0 6px 18px rgba(79, 70, 229, .28);
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

    .btn-primary:hover,
    .btn-primary:focus {
        transform: translateY(-1px);
        box-shadow: 0 10px 24px rgba(124, 58, 237, .35);
        filter: brightness(1.05);
    }

.mmc-cta .btn-primary {
    background-image: none;
    box-shadow: 0 6px 18px rgba(17, 24, 39, .2);
}

/* Home hero: soft animated gradient with blurred colour shapes */
.mmc-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(120deg, #eef2ff, #f5f3ff, #fdf2f8, #eef2ff);
    background-size: 300% 300%;
    animation: mmc-gradient-shift 18s ease infinite;
    border-bottom: 0;
}

    .mmc-hero::before,
    .mmc-hero::after {
        content: "";
        position: absolute;
        border-radius: 50%;
        filter: blur(60px);
        opacity: .45;
        pointer-events: none;
        animation: mmc-float 14s ease-in-out infinite;
    }

    .mmc-hero::before {
        width: 340px;
        height: 340px;
        right: -60px;
        top: -80px;
        background: #a5b4fc;
    }

    .mmc-hero::after {
        width: 280px;
        height: 280px;
        right: 22%;
        bottom: -140px;
        background: #f9a8d4;
        animation-delay: -7s;
    }

    .mmc-hero .mmc-container {
        position: relative;
        z-index: 1;
    }

.mmc-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .35rem .85rem;
    margin-bottom: 1.25rem;
    font-size: .875rem;
    font-weight: 600;
    color: var(--mmc-accent-hover);
    background: rgba(255, 255, 255, .75);
    border: 1px solid #c7d2fe;
    border-radius: 999px;
}

    .mmc-hero-badge::before {
        content: "";
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #10b981;
        box-shadow: 0 0 0 4px rgba(16, 185, 129, .2);
    }

/* Home cards: each section gets its own icon colour */
.mmc-card {
    position: relative;
    overflow: hidden;
}

    .mmc-card::before {
        content: "";
        position: absolute;
        inset: 0 0 auto 0;
        height: 3px;
        background: var(--mmc-gradient);
        transform: scaleX(0);
        transform-origin: left;
        transition: transform .3s ease;
    }

    .mmc-card:hover::before {
        transform: scaleX(1);
    }

    .mmc-card:hover {
        box-shadow: 0 14px 34px rgba(79, 70, 229, .14);
        border-color: #c7d2fe;
        transform: translateY(-4px);
    }

.row > :nth-child(5n+1) .mmc-card-icon { background: #eef2ff; color: #4f46e5; }
.row > :nth-child(5n+2) .mmc-card-icon { background: #f5f3ff; color: #7c3aed; }
.row > :nth-child(5n+3) .mmc-card-icon { background: #fdf2f8; color: #db2777; }
.row > :nth-child(5n+4) .mmc-card-icon { background: #ecfeff; color: #0891b2; }
.row > :nth-child(5n+5) .mmc-card-icon { background: #fffbeb; color: #d97706; }

/* Article headings: short gradient accent under each section heading */
.mmc-article h2:not(.mmc-section-title):not(.mmc-side-title)::after {
    content: "";
    display: block;
    width: 48px;
    height: 3px;
    margin-top: .6rem;
    border-radius: 3px;
    background: var(--mmc-gradient);
}

.mmc-article .mmc-cta h2::after,
.mmc-article .mmc-contact-card h2::after {
    display: none !important;
}

.mmc-article h1 {
    background: linear-gradient(90deg, #111827 0%, #312e81 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Code blocks: editor-style top bar */
.mmc-article pre {
    position: relative;
    padding-top: 2.6rem;
    border: 1px solid #312e81;
    box-shadow: 0 10px 30px rgba(30, 27, 75, .18);
}

    .mmc-article pre::before {
        content: "";
        position: absolute;
        top: .9rem;
        left: 1.1rem;
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: #f87171;
        box-shadow: 16px 0 0 #fbbf24, 32px 0 0 #34d399;
    }

/* Callouts */
.mmc-article .key-points {
    background: linear-gradient(135deg, #f8faff 0%, #faf5ff 100%);
    border-color: #e0e7ff;
    border-left-color: var(--mmc-accent);
}

.mmc-article .note {
    background: #f5f3ff;
    border-color: #ede9fe;
    border-left-color: var(--mmc-violet);
}

.mmc-article .key-points li::before {
    background: var(--mmc-gradient);
}

/* Tables */
.mmc-article table th,
.mmc-article table thead td {
    background: #eef2ff !important;
    color: #312e81 !important;
}

/* Sidebar */
.mmc-side-box {
    transition: box-shadow .25s ease, border-color .25s ease;
}

    .mmc-side-box:hover {
        border-color: #e0e7ff;
        box-shadow: 0 8px 24px rgba(79, 70, 229, .08);
    }

.mmc-side-links a {
    transition: background .15s ease, color .15s ease, padding-left .2s ease;
}

    .mmc-side-links a:hover {
        padding-left: .9rem;
    }

/* Previous / next */
.mmc-pager-link {
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

    .mmc-pager-link:hover {
        transform: translateY(-3px);
        box-shadow: 0 12px 28px rgba(79, 70, 229, .16);
    }

/* Author card, stats and program cards */
.mmc-author {
    background: var(--mmc-gradient-soft);
    border-color: #e0e7ff;
}

.mmc-stats > div {
    background: #fff;
    border-color: #e0e7ff;
}

.mmc-stats strong {
    background: var(--mmc-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.mmc-program-card,
.mmc-team-card,
.mmc-contact-card {
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

    .mmc-program-card:hover,
    .mmc-team-card:hover,
    .mmc-contact-card:hover {
        transform: translateY(-3px);
        border-color: #c7d2fe;
        box-shadow: 0 12px 28px rgba(79, 70, 229, .12);
    }

.mmc-cta {
    position: relative;
    overflow: hidden;
    background: var(--mmc-gradient);
    background-size: 200% 200%;
    animation: mmc-gradient-shift 14s ease infinite;
}

/* Footer */
.mmc-footer {
    background: linear-gradient(180deg, #f9fafb 0%, #f5f3ff 100%);
}

/* =====================================================================
   Motion: reading progress, back to top, scroll reveal
   ===================================================================== */
html {
    scroll-behavior: smooth;
}

.mmc-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    z-index: 1100;
    background: var(--mmc-gradient);
    box-shadow: 0 0 10px rgba(124, 58, 237, .5);
    transition: width .1s linear;
}

.mmc-to-top {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 1050;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    font-size: 1.25rem;
    line-height: 1;
    background: var(--mmc-gradient);
    box-shadow: 0 10px 24px rgba(79, 70, 229, .35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity .25s ease, transform .25s ease, visibility .25s;
}

    .mmc-to-top.is-visible {
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .mmc-to-top:hover {
        transform: translateY(-3px);
    }

.mmc-reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .6s ease, transform .6s ease;
    transition-delay: var(--mmc-delay, 0s);
}

    .mmc-reveal.is-visible {
        opacity: 1;
        transform: none;
    }

.mmc-hero h1,
.mmc-hero p,
.mmc-hero .d-flex,
.mmc-hero-badge {
    animation: mmc-fade-up .7s ease both;
}

.mmc-hero p { animation-delay: .1s; }
.mmc-hero .d-flex { animation-delay: .2s; }

@keyframes mmc-fade-up {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: none; }
}

@keyframes mmc-gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes mmc-float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-30px, 20px); }
}

/* Visitors who turn animations off get a still page. */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

    .mmc-reveal {
        opacity: 1;
        transform: none;
    }
}

/* =====================================================================
   Semi-dark theme (default). <html data-theme="dark">; the header button switches to light.
   ===================================================================== */
[data-theme="dark"] {
    color-scheme: dark;
    --mmc-bg: #1a1f2e;
    --mmc-surface: #232a3d;
    --mmc-surface-2: #2c3449;
    --mmc-text: #d1d8e6;
    --mmc-heading: #f3f4f6;
    --mmc-muted: #9aa5b8;
    --mmc-accent: #818cf8;
    --mmc-accent-hover: #a5b4fc;
    --mmc-accent-soft: rgba(129, 140, 248, .14);
    --mmc-border: #353e57;
    --mmc-code-bg: #141824;
    --mmc-code-text: #e0e7ff;
    --mmc-gradient-soft: linear-gradient(135deg, #252c45 0%, #2a2850 50%, #33264a 100%);
    --bs-body-bg: #1a1f2e;
    --bs-body-color: #d1d8e6;
    --bs-link-color-rgb: 129, 140, 248;
    --bs-link-hover-color-rgb: 165, 180, 252;
    --bs-border-color: #353e57;
}

[data-theme="dark"] body {
    background: var(--mmc-bg);
}

[data-theme="dark"] ::selection {
    background: #4338ca;
    color: #fff;
}

/* Header */
[data-theme="dark"] .mmc-header {
    background: rgba(26, 31, 46, .88);
    border-bottom-color: var(--mmc-border);
}

    [data-theme="dark"] .mmc-header .nav-link {
        color: #cbd5e1;
    }

        [data-theme="dark"] .mmc-header .nav-link:hover,
        [data-theme="dark"] .mmc-header .nav-link.active {
            color: #fff;
        }

        [data-theme="dark"] .mmc-header .nav-link.active {
            background: rgba(129, 140, 248, .14);
        }

    [data-theme="dark"] .mmc-header .navbar-toggler-icon {
        filter: invert(1);
    }

/* Home hero */
[data-theme="dark"] .mmc-hero {
    background: linear-gradient(120deg, #1a1f2e, #272a52, #33244f, #1a1f2e);
    background-size: 300% 300%;
}

    [data-theme="dark"] .mmc-hero::before {
        background: #4f46e5;
        opacity: .35;
    }

    [data-theme="dark"] .mmc-hero::after {
        background: #db2777;
        opacity: .25;
    }

    [data-theme="dark"] .mmc-hero h1 {
        color: #fff;
    }

    [data-theme="dark"] .mmc-hero p {
        color: #cbd5e1;
    }

[data-theme="dark"] .mmc-hero-badge {
    background: rgba(255, 255, 255, .06);
    border-color: rgba(165, 180, 252, .35);
    color: #c7d2fe;
}

[data-theme="dark"] .mmc-gradient-text,
[data-theme="dark"] .mmc-brand .mmc-brand-accent,
[data-theme="dark"] .mmc-stats strong {
    background: linear-gradient(135deg, #818cf8 0%, #c084fc 55%, #f472b6 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

/* Cards and boxes */
[data-theme="dark"] .mmc-card,
[data-theme="dark"] .mmc-side-box,
[data-theme="dark"] .mmc-pager-link,
[data-theme="dark"] .mmc-program-card,
[data-theme="dark"] .mmc-team-card,
[data-theme="dark"] .mmc-contact-card,
[data-theme="dark"] .mmc-stats > div {
    background: var(--mmc-surface);
    border-color: var(--mmc-border);
}

    [data-theme="dark"] .mmc-card:hover,
    [data-theme="dark"] .mmc-side-box:hover,
    [data-theme="dark"] .mmc-pager-link:hover,
    [data-theme="dark"] .mmc-program-card:hover,
    [data-theme="dark"] .mmc-team-card:hover,
    [data-theme="dark"] .mmc-contact-card:hover {
        border-color: #4f46e5;
        box-shadow: 0 14px 34px rgba(0, 0, 0, .3), 0 0 0 1px rgba(129, 140, 248, .18);
    }

[data-theme="dark"] .mmc-card p,
[data-theme="dark"] .mmc-hero p,
[data-theme="dark"] .mmc-author p,
[data-theme="dark"] .mmc-article .mmc-program-card p {
    color: #aab4c8;
}

[data-theme="dark"] .row > :nth-child(5n+1) .mmc-card-icon { background: rgba(99, 102, 241, .16); color: #a5b4fc; }
[data-theme="dark"] .row > :nth-child(5n+2) .mmc-card-icon { background: rgba(139, 92, 246, .16); color: #c4b5fd; }
[data-theme="dark"] .row > :nth-child(5n+3) .mmc-card-icon { background: rgba(236, 72, 153, .16); color: #f9a8d4; }
[data-theme="dark"] .row > :nth-child(5n+4) .mmc-card-icon { background: rgba(6, 182, 212, .16); color: #67e8f9; }
[data-theme="dark"] .row > :nth-child(5n+5) .mmc-card-icon { background: rgba(245, 158, 11, .16); color: #fcd34d; }

[data-theme="dark"] .mmc-author {
    background: var(--mmc-gradient-soft);
    border-color: var(--mmc-border);
}

[data-theme="dark"] .mmc-trainer {
    background: var(--mmc-surface);
    border-color: var(--mmc-border);
}

[data-theme="dark"] .mmc-article .mmc-chips li {
    background: var(--mmc-surface-2);
    border-color: var(--mmc-border);
    color: #e2e8f0;
}

[data-theme="dark"] .mmc-side-links a {
    color: #cbd5e1;
}

    [data-theme="dark"] .mmc-side-links a:hover {
        background: var(--mmc-surface-2);
        color: #fff;
    }

    [data-theme="dark"] .mmc-side-links a[aria-current="page"] {
        background: rgba(129, 140, 248, .16);
        color: #c7d2fe;
    }

[data-theme="dark"] .mmc-post-list a {
    color: #e2e8f0;
}

    [data-theme="dark"] .mmc-post-list a:hover {
        color: var(--mmc-accent-hover);
    }

/* Article */
[data-theme="dark"] .mmc-article h1 {
    background: linear-gradient(90deg, #f8fafc 0%, #c7d2fe 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

[data-theme="dark"] .mmc-article .key-points {
    background: linear-gradient(135deg, #252c45 0%, #2a2850 100%);
    border-color: var(--mmc-border);
    border-left-color: #818cf8;
}

[data-theme="dark"] .mmc-article .note {
    background: #2b2850;
    border-color: #3d3670;
    border-left-color: #a78bfa;
}

[data-theme="dark"] .mmc-article pre {
    border-color: #353e57;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
}

[data-theme="dark"] .mmc-article :not(pre) > code {
    color: #e0e7ff;
    background: var(--mmc-surface-2);
    border-color: var(--mmc-border);
}

[data-theme="dark"] .mmc-article table {
    border-color: var(--mmc-border);
}

    [data-theme="dark"] .mmc-article table > :not(caption) > * > * {
        color: var(--mmc-text);
        border-color: var(--mmc-border);
    }

    [data-theme="dark"] .mmc-article table th,
    [data-theme="dark"] .mmc-article table thead td {
        background: var(--mmc-surface-2) !important;
        color: #e0e7ff !important;
    }

    [data-theme="dark"] .mmc-article table tbody tr:nth-child(even) {
        background: rgba(255, 255, 255, .02);
    }

[data-theme="dark"] .mmc-article img {
    border-color: var(--mmc-border);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .35);
}

[data-theme="dark"] .mmc-article hr {
    border-color: var(--mmc-border);
}

/* Buttons */
[data-theme="dark"] .btn-outline-primary {
    --bs-btn-color: #c7d2fe;
    --bs-btn-border-color: rgba(165, 180, 252, .4);
    --bs-btn-hover-bg: rgba(129, 140, 248, .15);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-border-color: #818cf8;
}

[data-theme="dark"] .mmc-cta .btn-primary {
    --bs-btn-bg: #fff;
    --bs-btn-color: #4338ca;
    --bs-btn-hover-bg: #eef2ff;
    --bs-btn-hover-color: #4338ca;
}

/* Footer */
[data-theme="dark"] .mmc-footer {
    background: linear-gradient(180deg, #171b28 0%, #1d1a33 100%);
    border-top-color: var(--mmc-border);
    color: #94a3b8;
}

    [data-theme="dark"] .mmc-footer a {
        color: #aab4c8;
    }

        [data-theme="dark"] .mmc-footer a:hover {
            color: #fff;
        }

[data-theme="dark"] .mmc-footer-bottom {
    border-top-color: var(--mmc-border);
}

/* Theme switch button in the header */
.mmc-theme-toggle {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    margin-left: .5rem;
    border-radius: 50%;
    border: 1px solid var(--mmc-border);
    background: transparent;
    color: var(--mmc-heading);
    font-size: 1.05rem;
    line-height: 1;
    transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

    .mmc-theme-toggle:hover {
        transform: rotate(-15deg);
        background: var(--mmc-accent-soft);
        border-color: var(--mmc-accent);
    }

    .mmc-theme-toggle .mmc-icon-sun {
        display: none;
    }

[data-theme="dark"] .mmc-theme-toggle .mmc-icon-sun {
    display: inline;
}

[data-theme="dark"] .mmc-theme-toggle .mmc-icon-moon {
    display: none;
}

/* =====================================================================
   Sidebar: divider line, box headers, numbered lessons
   ===================================================================== */
@media (min-width: 992px) {
    .mmc-sidebar {
        position: relative;
        padding-left: 2.25rem !important;
    }

        /* Gradient divider between article and sidebar */
        .mmc-sidebar::before {
            content: "";
            position: absolute;
            top: 0;
            bottom: 0;
            left: .5rem;
            width: 2px;
            border-radius: 2px;
            background: linear-gradient(180deg, #6366f1 0%, #a855f7 35%, rgba(236, 72, 153, .5) 70%, transparent 100%);
            opacity: .55;
        }
}

@media (max-width: 991.98px) {
    /* On phones the sidebar comes after the article: separate it with a line */
    .mmc-sidebar {
        border-top: 2px solid transparent;
        border-image: var(--mmc-gradient) 1;
        padding-top: 2rem;
        margin-top: 1rem;
    }
}

.mmc-side-box {
    padding: 0 0 .75rem;
    overflow: hidden;
    border-radius: 14px;
}

.mmc-side-head {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .85rem 1rem;
    margin-bottom: .6rem;
    border-bottom: 1px solid var(--mmc-border);
    background: linear-gradient(90deg, rgba(99, 102, 241, .10) 0%, rgba(168, 85, 247, .06) 60%, transparent 100%);
}

    .mmc-side-head .mmc-side-title {
        margin: 0 !important;
        flex: 1;
        color: var(--mmc-heading) !important;
        font-size: .78rem !important;
    }

.mmc-side-icon {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 7px;
    background: var(--mmc-gradient);
    color: #fff;
    font-size: .8rem;
    box-shadow: 0 4px 10px rgba(124, 58, 237, .3);
}

.mmc-side-count {
    font-size: .72rem;
    font-weight: 600;
    padding: .15rem .5rem;
    border-radius: 999px;
    color: var(--mmc-accent);
    background: var(--mmc-accent-soft);
    white-space: nowrap;
}

.mmc-side-links {
    padding: 0 .6rem !important;
}

    .mmc-side-links li {
        margin: 0;
    }

/* Numbered lessons: 01, 02, ... */
.mmc-side-numbered {
    counter-reset: lesson;
}

    .mmc-side-numbered a {
        display: flex;
        align-items: baseline;
        gap: .6rem;
    }

        .mmc-side-numbered a::before {
            counter-increment: lesson;
            content: counter(lesson, decimal-leading-zero);
            flex-shrink: 0;
            min-width: 1.6rem;
            font-family: var(--mmc-mono);
            font-size: .75rem;
            font-weight: 600;
            color: var(--mmc-muted);
            opacity: .8;
        }

        .mmc-side-numbered a:hover::before,
        .mmc-side-numbered a[aria-current="page"]::before {
            color: var(--mmc-accent);
            opacity: 1;
        }

/* Popular links: arrow markers */
.mmc-side-arrows a {
    position: relative;
    padding-left: 1.6rem !important;
}

    .mmc-side-arrows a::before {
        content: "\203A";
        position: absolute;
        left: .65rem;
        top: .3rem;
        font-weight: 700;
        color: var(--mmc-accent);
        transition: transform .2s ease;
    }

    .mmc-side-arrows a:hover::before {
        transform: translateX(3px);
    }

    .mmc-side-arrows a:hover {
        padding-left: 1.8rem !important;
    }

/* Current lesson: gradient left edge */
.mmc-side-links a[aria-current="page"] {
    border-left: 3px solid transparent;
    border-image: linear-gradient(180deg, #6366f1, #a855f7) 1;
    border-radius: 0;
}

[data-theme="dark"] .mmc-side-head {
    background: linear-gradient(90deg, rgba(129, 140, 248, .16) 0%, rgba(192, 132, 252, .08) 60%, transparent 100%);
}

[data-theme="dark"] .mmc-side-count {
    color: #c7d2fe;
    background: rgba(129, 140, 248, .18);
}

[data-theme="dark"] .mmc-sidebar::before {
    opacity: .7;
}

/* =====================================================================
   Collapsible sidebar groups (<details>)
   ===================================================================== */
details.mmc-side-box > summary {
    list-style: none;
    cursor: pointer;
}

    details.mmc-side-box > summary::-webkit-details-marker {
        display: none;
    }

    details.mmc-side-box > summary::after {
        content: "\25BE";
        margin-left: .25rem;
        color: var(--mmc-muted);
        transition: transform .2s ease;
    }

details.mmc-side-box:not([open]) > summary {
    margin-bottom: 0;
    border-bottom: 0;
}

    details.mmc-side-box:not([open]) > summary::after {
        transform: rotate(-90deg);
    }

details.mmc-side-box:not([open]) {
    padding-bottom: 0;
}

/* Header menu collapses below 1200px (8 menu items) */
@media (max-width: 1199.98px) {
    .mmc-header .navbar-collapse {
        padding: .5rem 0 1rem;
    }
}

/* =====================================================================
   SQL lessons: query output (result grid, messages, errors)
   ===================================================================== */
.mmc-article .sql-output,
.mmc-article .sql-messages,
.mmc-article .sql-error {
    position: relative;
    margin: -.75rem 0 1.5rem;
    padding: 1.6rem .75rem .75rem;
    border: 1px solid var(--mmc-border);
    border-top: 0;
    border-radius: 0 0 var(--mmc-radius) var(--mmc-radius);
    background: var(--mmc-surface);
}

    .mmc-article .sql-output + .sql-output,
    .mmc-article .sql-output + .sql-messages,
    .mmc-article .sql-messages + .sql-output,
    .mmc-article .sql-error + .sql-output,
    .mmc-article .sql-output + .sql-error,
    .mmc-article .sql-messages + .sql-error,
    .mmc-article .sql-error + .sql-messages {
        margin-top: -1.5rem;
        border-top: 1px dashed var(--mmc-border);
        border-radius: 0 0 var(--mmc-radius) var(--mmc-radius);
    }

.mmc-article .sql-output-label {
    position: absolute;
    top: .45rem;
    left: .8rem;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--mmc-accent);
}

.mmc-article .sql-output table {
    margin: 0;
    font-family: var(--mmc-mono);
    font-size: .8rem;
    background: #fff;
}

    .mmc-article .sql-output table > :not(caption) > * > * {
        padding: .35rem .6rem;
        white-space: nowrap;
    }

    .mmc-article .sql-output table th {
        font-family: var(--mmc-font);
        font-size: .78rem;
    }

.mmc-article .sql-null {
    color: var(--mmc-muted) !important;
    font-style: italic;
}

.mmc-article .sql-more {
    margin-top: .4rem;
    font-size: .8rem;
    color: var(--mmc-muted);
}

.mmc-article .sql-messages pre {
    margin: 0;
    padding: .25rem .25rem 0;
    border: 0;
    box-shadow: none;
    background: transparent;
    color: var(--mmc-text);
    font-size: .8rem;
}

    .mmc-article .sql-messages pre::before {
        display: none;
    }

.mmc-article .sql-error {
    font-family: var(--mmc-mono);
    font-size: .82rem;
    color: #b91c1c;
    background: #fef2f2;
    border-color: #fecaca;
}

    .mmc-article .sql-error .sql-output-label {
        color: #b91c1c;
    }

/* The code block directly above an output joins it visually */
.mmc-article pre:has(+ .sql-output),
.mmc-article pre:has(+ .sql-messages),
.mmc-article pre:has(+ .sql-error) {
    margin-bottom: .75rem;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

[data-theme="dark"] .mmc-article .sql-output,
[data-theme="dark"] .mmc-article .sql-messages {
    background: #1f2638;
}

[data-theme="dark"] .mmc-article .sql-output table {
    background: var(--mmc-surface);
}

[data-theme="dark"] .mmc-article .sql-error {
    background: #3a1f28;
    border-color: #5c2a36;
    color: #fca5a5;
}

    [data-theme="dark"] .mmc-article .sql-error .sql-output-label {
        color: #fca5a5;
    }

/* =====================================================================
   Trainer card ("Written by" / "Your trainer") and About expertise grid
   ===================================================================== */
.mmc-trainer-card {
    position: relative;
    overflow: hidden;
}

    .mmc-trainer-card::before {
        content: "";
        position: absolute;
        inset: 0 0 auto 0;
        height: 3px;
        background: var(--mmc-gradient);
    }

    .mmc-trainer-card img {
        width: 72px !important;
        height: 72px !important;
        box-shadow: 0 0 0 3px var(--mmc-bg, #fff), 0 0 0 5px #8b5cf6 !important;
    }

.mmc-author-role {
    font-size: .8125rem;
    font-weight: 600;
    margin-bottom: .6rem;
    background: var(--mmc-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

[data-theme="dark"] .mmc-author-role {
    background: linear-gradient(135deg, #818cf8 0%, #c084fc 55%, #f472b6 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.mmc-author .mmc-skill-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    list-style: none;
    padding: 0 !important;
    margin: .85rem 0 0 !important;
}

    .mmc-author .mmc-skill-chips li {
        margin: 0 !important;
        padding: .2rem .65rem;
        font-size: .78rem;
        font-weight: 600;
        border-radius: 999px;
        color: var(--mmc-accent);
        background: var(--mmc-accent-soft);
        border: 1px solid rgba(99, 102, 241, .25);
    }

        .mmc-author .mmc-skill-chips li::before,
        .mmc-author .mmc-skill-chips li::marker {
            content: none;
        }

.mmc-author-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 1rem;
}

    .mmc-author-actions .btn {
        padding: .45rem .9rem;
        font-size: .85rem;
    }

/* Home page: the card sits in a narrow column, so stack the photo above the text */
.col-lg-4 > .mmc-trainer-card {
    flex-direction: column;
    margin-top: 0;
}

/* About page: areas of expertise */
.mmc-expertise {
    display: flex;
    gap: .9rem;
    height: 100%;
    padding: 1.1rem;
    border: 1px solid var(--mmc-border);
    border-radius: 14px;
    background: var(--mmc-surface);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

    .mmc-expertise:hover {
        transform: translateY(-3px);
        border-color: #c7d2fe;
        box-shadow: 0 12px 28px rgba(79, 70, 229, .12);
    }

    .mmc-expertise .mmc-card-icon {
        flex-shrink: 0;
        margin: 0;
    }

    .mmc-article .mmc-expertise h4 {
        font-size: 1rem;
        margin: 0 0 .3rem;
    }

    .mmc-article .mmc-expertise p {
        font-size: .9rem;
        line-height: 1.55;
        margin: 0;
        color: var(--mmc-muted);
    }

[data-theme="dark"] .mmc-expertise {
    background: var(--mmc-surface);
    border-color: var(--mmc-border);
}

    [data-theme="dark"] .mmc-expertise:hover {
        border-color: #4f46e5;
    }

    [data-theme="dark"] .mmc-expertise p {
        color: #aab4c8;
    }
