
/* Variables and global setup. */

:root {
    --color-accent: #e73;

    --color-bg: #fff;
    --color-fg: #000;
    --color-fg-faded: #777;

    --color-code-inline-bg: #f1f1f1;
    --color-code-inline-fg: #000;

    --color-code-block-bg: #f1f1f1;
    --color-code-block-text: #000;
}

* {
    margin: 0;

    padding: 0;

    line-height: 1.4em;

    font-size: 100%;
}

/* Body. */

body {
    max-width: 60rem;

    margin: 0 auto;

    padding-left: 5%;
    padding-right: 5%;

    font-family: -apple-system, BlinkMacSystemFont, avenir next,
                 avenir, helvetica neue, helvetica, Ubuntu,
                 roboto, noto, segoe ui, arial, sans-serif;
    font-size: 100%;

    background-color: #ffffff;
}

/* Paragraph styling. */

p {
    margin-top: 1em;
    margin-bottom: 1em;
}

.faded {
    color: var(--color-fg-faded);
}

/* Horizontal rule. */

hr {
    margin-top: 0.5em;
    margin-bottom: 0.5em;

    border: 0;
    border-bottom: 0.1rem solid var(--color-fg-faded);
}

/* Links. */

.link {
    margin: -0.2em;

    padding: 0.2em;

    border-radius: 4px;

    text-decoration: underline;

    font-weight: bold;

    background-color: transparent;
    color: inherit;

    transition: background-color 0.08s ease,
                color 0.08s ease;
}

.link:hover {
    background-color: var(--color-fg);
    color: var(--color-bg);
}

/* Heading styling. */

.heading {
    margin-top: 0.4em;
    margin-bottom: 0.4em;

    padding-bottom: 0.1em;

    border-bottom: 0.1rem solid var(--color-fg-faded);

    font-size: 150%;
    font-weight: bold;
}

.heading > a {
    text-decoration: none;

    color: inherit;
}

.heading > a:hover {
    text-decoration: underline;
}

/* List styling. */

ul {
    margin-left: 1.5em;
}

li {
    padding-left: 0.6em;
}

li::marker {
    content: "•";
}

/* Code styling. */

.code-inline {
    padding: 0.2rem;

    vertical-align: middle;

    border-radius: 4px;

    font-family: Menlo, Consolas, Monaco, Liberation Mono,
                 Lucida Console, monospace;
    font-size: smaller;

    background-color: var(--color-code-inline-bg);
    color: var(--color-code-inline-fg);
}

.code-block {
    overflow: auto;

    margin-top: 1.5em;
    margin-bottom: 1.5em;

    padding: 0.4rem;

    border-radius: 0 4px 4px 0;
    border-left: 0.3rem solid var(--color-fg);

    font-family: Menlo, Consolas, Monaco, Liberation Mono,
                 Lucida Console, monospace;
    font-size: smaller;

    background-color: var(--color-code-block-bg);
    color: var(--color-code-block-fg);
}

/* Embed styling. */

.embed {
    display: block;

    object-fit: contain;
    width: 100%;
    max-height: 40rem;

    margin-top: 2.0em;
    margin-bottom: 0.8em;

    border-radius: 6px;
}

.embed-small {
    float: right;

    object-fit: contain;
    width: 30%;

    margin-bottom: 1.5em;
    margin-left: 1.5em;

    border-radius: 6px;
}

.embed-caption {
    display: block;
    text-align: center;
}

/* Miscellaneous stuff. */

.image-pixel {
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

/* Header. */

header {
    display: flex;
    justify-content: space-around;
    align-items: center;

    margin-top: 1.5rem;
    margin-bottom: 2.5rem;
}

.header-logo {
    display: flex;

    height: 5rem;

    margin: 0 3rem;
}

.header-left {
    display: flex;
    justify-content: right;
    flex: 1;
}

.header-right {
    display: flex;
    justify-content: left;
    flex: 1;
}

.header-link {
    text-align: center;

    text-decoration: none;
}

/* Footer. */

footer {
    margin-top: 3rem;
    margin-bottom: 3rem;

    text-align: center;

    color: var(--color-fg-faded);
}

/* Listings. */

.listing-item {
    margin-bottom: 2em;
}

.listing-item-metadata {
    font-style: italic;
    font-size: smaller;

    color: var(--color-fg-faded);
}
