:root {
    color-scheme: dark;
    --bg: hsl(270, 30%, 25%);
    --bgdark: #1c1b22; /* firefox dark mode */
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg);
}

body, input, button, textarea {
    font-family: "IBM Plex Mono", Courier New, ui-monospace, monospace;
}

.body {
    padding-top: 2em;
    padding-bottom: .5em;
}

.outer {
    margin: auto;
    max-width: 95ch;
}

.hidden {
    display: none;
}

.brand {
    font-size: 26px;
    color: hsl(180, 60%, 50%);
}

.frontpage .row:nth-child(even) {
    flex-direction: row-reverse;
}

.frontpage .row:nth-child(even) div {
    margin-left: 3em;
    margin-right: 0;
}

.frontpage .row {
    display: flex;
    justify-content: center;
    flex-direction: row;
    align-items: center;
    text-align: center;
    padding-top: 2.5em;
    margin-left: 2em;
    margin-right: 2em;
    padding-bottom: 2.5em;
}

.frontpage .row div {
    margin-left: 0;
    margin-right: 3em;
}

.frontpage .row img {
    border: 3px solid var(--bg);
    border-radius: 1px;
    width: 320px;
}

section {
    margin: 0;
}

header, footer {
    display: flex;
    justify-content: space-between;
    text-align: center;
    background-color: hsl(260, 35%, 15%);
    width: 100%;
    margin: 0;
}

.navbar {
    display: flex;
    justify-content: space-between;
}

.navbar a {
    padding-left: 10px;
}

.main {
    width: 94.5ch;
    margin: 0;
}

.navbar {
    display: flex;
    justify-content: space-between;
}

.navbar a {
    margin-left: 10px;
}

.main {
    background-color: var(--bgdark);
    display: flex;
    flex-direction: column;
    margin: auto;
    width: 100%;
}

h1, h2, h3, p {
    padding-left: 1em;
    padding-right: 1em;
}

h1 {
    text-align: center;
    margin-top: 10px;
    color: #ffff44;
}

h2 {
    font-size: 1em;
    margin-top: 1em;
    color: #ffff44;
}

:link { color: hsl(200, 100%, 75%); }
:visited { color: hsl(140,70%,60%); }

/* text art grid */

.teaser.textart {
    margin: auto;
    margin-top: 1ch;
    margin-bottom: 0;
    min-height: 46ch;
}

.textart {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: medium;
    overflow-x: auto;
    text-align: center;
    position: relative;
    width: 75ch;
    min-height: 67ch;
    margin: auto;
}

.textart pre {
    white-space: pre;
    line-height: 1.25;
    font-size: 80%;
    position: absolute;
}

.textart pre span {
    width: 1ch;
    display: inline-block;
    text-shadow: none;
}

/* Scanline effect: https://css-tricks.com/old-timey-terminal-styling/ */

.retro {
    position: relative;
}

.retro::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
}

@media (max-width: 420px) {
    .frontpage .row {
        display: flex;
        flex-direction: column;
        align-items: start;
        margin: 5px;
    }

    .frontpage .row:nth-child(even) {
        flex-direction: column;
    }

    .frontpage .row:nth-child(even) div {
        margin-left: 0;
        margin-right: 0;
    }

    .frontpage .row img {
        width: 320px;
        margin: auto;
    }

    .textart {
        font-size: 5px;
        width: 340px;
    }

    .teaser.textart {
        min-height: 60ch;
    }
}

/* override subscription form */

#rf-form div {
    margin: auto;
    margin-top: 1em;
    padding: .5em;
    border: 1px solid #ddd;
    max-width: 40ch;
}

.rf-title {
    color: #ffff44 !important;
    padding-left: 0 !important;
    text-align: center !important;
}
