:root{
    --font-display: "Josefin Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

body {
    background-color: var(--background-color);
    background-image: url("../svg/mcm-starburst-pattern.svg");
    /*background-image: url("../svg/mcm-atomic-pattern-full.svg");*/
    background-repeat: repeat;
    background-size: 320px 320px;
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.5;
    height: 100%;
    margin: 0;
    color: var(--text);
}

@media (prefers-color-scheme: dark) {
    body {
        background-image: url("../svg/mcm-starburst-pattern-dark.svg");
    }
}

header, main, footer {
    width: 1024px;
    margin: 0 auto;
}

header {
    height: 100%;
    background-image: url("../svg/mcm-title-art-3.svg");
    background-repeat: no-repeat;
    background-size: contain; /* set height you want; scales proportionally */
    background-position: right;
}

main {
    padding-bottom: 8px;
}

footer {
    padding-top: 16px;

    p {
        font-size: 0.8em;
        text-align: center;
    }
}

nav {
    ul > li {
        display: inline-block;
        background-color: var(--orange);
        margin-right: 8px;

        font-family: var(--font-display);
        letter-spacing: 0.1em;
        font-weight: 600;
    }

    a {
        display: block;
        padding: 8px 16px;
        color: var(--text) !important;
    }

    a:hover {
        text-decoration: none;
    }

    ul > li:hover {
        background-color: var(--orange-darkened);
        cursor: pointer;
        user-select: none;
    }
}

a {
    color: var(--brand);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    text-decoration-thickness: 0.11em;
    text-underline-offset: 0.15em;
}

a:visited {
    color: var(--brand-darkened);
}

hr {
    width: 1024px;
    margin-top: 32px;
    border: 0;
    height: 12px;
    background: url("../svg/mcm-hr.svg") center/auto 36px repeat-x;
}

article {
    background-color: var(--background-color);

    h1, h2, h3, h4, h5, h6 {
        font-family: var(--font-display);
        font-weight: 800;
        line-height: 1.15;
        color: var(--sage);
    }

    hr {
        background: url("../svg/dingbat-divider-light.svg") no-repeat center / contain;
        border: 0;
        height: 40px;              /* visual height of the divider */
        margin: 2rem auto;
        max-width: 900px;
    }

    ul > li {
        list-style-type: square;
    }

    ul > li::marker {
        color: var(--walnut);
    }

    .tags-list {
        padding-left: 0;

        .tags-list-li-marker {
            list-style-type: none !important;
        }
    }
}

blockquote {
    position: relative;
    margin: 1.5rem 0;
    padding: 1.1rem 1.25rem 1.1rem 1.75rem;

    color: var(--text);
    background: var(--blockquote-background);
    border: 2px solid var(--blockquote-border);

    p, a, h1, h2, h3, h4, h5, h6, ul > li {
        font-style: italic;
        margin-left: 8px;
    }
}

table{
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;

    color: var(--text);
    background: var(--table-surface);
    border: 2px solid var(--table-border);

    border-radius: 0;
    overflow: visible;
}

caption{
    caption-side: top;
    text-align: left;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    font-weight: 700;
}

thead th{
    text-align: left;
    padding: 0.8rem 1rem;
    color: var(--blockquote-background);
    background: var(--brand-darkened);
    border-bottom: 2px solid var(--table-border);
    letter-spacing: 0.02em;
    white-space: nowrap;
}

tbody td,
tbody th{
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--table-border);
    vertical-align: top;
}

tbody tr:nth-child(even){
    background: var(--table-zebra);
}

tbody tr:hover{
    background: var(--table-hover);
}

tbody tr:last-child td,
tbody tr:last-child th{
    border-bottom: 0;
}

tfoot td,
tfoot th{
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    background: var(--table-surface);
    border-top: 2px solid var(--table-border);
    font-weight: 700;
}

/* Focus ring (square) */
table :is(a, button, input, select, textarea):focus-visible{
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
    border-radius: 0;
}

blockquote::before {
    content: "";
    position: absolute;
    left: 0.75rem;
    top: 0.75rem;
    bottom: 0.75rem;
    width: 10px;
    border-radius: 2px;

    background: linear-gradient(
            to bottom,
            var(--brand) 0 25%,
            var(--orange) 25% 50%,
            var(--mustard) 50% 75%,
            var(--sage) 75% 100%
    );
}

blockquote::after {
    content: "“";
    position: absolute;
    right: 1rem;
    top: -0.35rem;
    font-size: 3.25rem;
    line-height: 1;
    font-weight: 800;
    color: var(--text);
    opacity: 0.1;
}

.article-header {
    background-color: var(--brand);
    padding: 4px 40px;
    box-shadow: 16px 16px 0px 1px var(--brand-darkened);
    -webkit-box-shadow: 16px 16px 0px 1px var(--brand-darkened);
    -moz-box-shadow: 16px 16px 0px 1px var(--brand-darkened);
    margin-top: 40px;
    margin-bottom: 40px;

    h1 {
        color: var(--text);
    }

    p {
        margin-top: -16px;
    }
}

.article-content {
    background-color: var(--article-background);
    padding: 8px 40px;
    margin-top: 16px;
}

.site-header {
    margin-left: 40px;
    font-family: var(--font-display);
    letter-spacing: 0.5em;
    font-size: 2.5em;
}

.tags-prefix {
    color: var(--text-muted);
    display: inline-block;
    min-width: 10ch;
    text-align: left;
}

@media (max-width: 1096px) {
    header, main, footer {
        width: 100%;
    }

    header {
        background-image: none;

        .site-header {
            letter-spacing: 0.3em;
            text-align: center;
            margin-left: 0;
        }
    }

    .article-header {
        box-shadow: 8px 8px 0px 1px #898989;
        -webkit-box-shadow: 8px 8px 0px 1px #898989;
        -moz-box-shadow: 8px 8px 0px 1px #898989;
        margin-left: 8px;
        margin-right: 16px;
    }

    .article-content {
        padding: 4px 16px;
    }

    hr {
        height: 8px;
        width: unset;
        background: url("../svg/mcm-hr-mobile.svg") no-repeat center;
    }
}
