:root {
    --width: 720px;
    --font-main: "Mozilla Headline", SF Pro Display, sans-serif; /* Heading */
    --font-secondary: "IBM Plex Sans", SF Pro, sans-serif; /* Body */
    --font-mono: "IBM Plex Mono", Menlo, monospace;
    --font-scale: 1.01em;
    --background-color: #fefffe;
    --heading-color: #2c2a4a;
    --text-color: #0b0014;
    --link-color: #d100d1;
    --visited-color: #de6e4b;
    --blockquote-color: #2c2a4a;
    --highlight-color: #ddd;
}

@media (prefers-color-scheme: dark) {
    :root {
        --background-color: #2c2a4a;
        --heading-color: #fefffe;
        --text-color: #ddd;
        --link-color: #ff94ff;
        --visited-color: #e68f75;
        --blockquote-color: #ccc;
        --highlight-color: #0b0014;
    }
    .invert img {
        filter: invert(90%);
    }
}

body {
    font-family: var(--font-secondary);
    font-size: var(--font-scale);
    margin: auto;
    padding: 20px;
    max-width: var(--width);
    text-align: left;
    background-color: var(--background-color);
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.5;
    color: var(--text-color);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-main);
    color: var(--heading-color);
    line-height: 1.2em;
}

h2,
h3 {
    margin-top: 40px;
}

a {
    color: var(--link-color);
    cursor: pointer;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

nav a {
    margin-right: 8px;
}

strong,
b {
    color: var(--heading-color);
}

button {
    margin: 0;
    cursor: pointer;
}

time {
    font-family: var(--font-mono);
    font-style: normal;
    font-size: 15px;
}

main {
    line-height: 1.6;
}

table {
    width: 100%;
}

figure {
    margin-left: 0px;
    margin-right: 0px;
}

figcaption :not(.imgcap-caption) {
    margin-top: 0px;
    font-style: italic;
    text-align: right;
    color: var(--blockquote-color);
}

hr {
    border: 0;
    border-top: 1px dashed;
}

img {
    max-width: 100%;
}

code {
    font-family: var(--font-mono);
    padding: 2px 4px 2px 4px;
    border-radius: 3px;
    background-color: var(--highlight-color);
}

blockquote {
    border-left: 1px solid #999;
    color: var(--blockquote-color);
    padding-left: 20px;
    margin-top: 40px;
    margin-bottom: 40px;
    font-style: italic;
}

footer {
    padding: 25px 0;
    text-align: center;
}

.footnotes {
    margin-top: 40px;
}

.title:hover {
    text-decoration: none;
}

.title h1 {
    font-size: 1.5em;
}

.title h2 {
    font-family: "Mozilla Headline Expanded", var(--font-main);
}

.inline {
    width: auto !important;
}

.highlight,
.code {
    border-radius: 3px;
    margin-block-start: 1em;
    margin-block-end: 1em;
    overflow-x: auto;
}

/* blog post list */
ul.blog-posts {
    list-style-type: none;
    padding: unset;
}

ul.blog-posts li {
    display: flex;
}

ul.blog-posts li span {
    flex: 0 0 130px;
}

ul.blog-posts li a:visited {
    color: var(--visited-color);
}

.spacer {
    margin-bottom: 40px;
    margin-top: 40px;
}
