:root {
    --color-body: #f1f1f1;
    --color-bg: #ffffff;
    --color-link: blue;
    --color-link-hover: red;
    --color-link-visited: purple;
    --color-text: #111;
    --color-tagline: #666;
    --color-code-bg: gainsboro;
    --color-code-text: rgb(0 0 0);
    --color-blockquote: #e0e0e0;
    --color-nav: #000000;
}

@media (prefers-color-scheme: dark) {
    :root {
        --color-body: #000;
        --color-bg: #000;
        --color-link: rgb(61 137 210);
        --color-link-hover: rgb(164, 35, 35);
        --color-link-visited: rgb(115, 74, 115);
        --color-text: #cbcbcb;
        --color-tagline: #b98585;
        --color-code-bg: rgb(36, 33, 41);
        --color-code-text: rgb(204 92 60);
        --color-blockquote: #251f2c;
        --color-nav: #000000;
    }
}

body {
    min-height: 90svh;
    background: var(--color-body);
    color: var(--color-text);
    margin: 0;
    padding: 0;
    line-height: 1.45;
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-size: 1rem;
}

@media (prefers-color-scheme: dark) {
    body {
        font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
        line-height: 1.5;
        font-size: 0.92rem;
    }
}

h1 {
    font-family: Georgia, 'Times New Roman', Times, serif;
}

h2 {
    margin-top: 3rem;
    font-size: 1.3rem;
}

h2,
h3 {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

figure,
img {
    max-width: 100%;
    width: 100%;
}

code {
    background-color: var(--color-code-bg);
    padding: 2px;
    border-radius: 2px;
    color: var(--color-code-text);
    font-size: 0.8rem;
}

figure {
    margin-block: 2rem;
    margin-inline: auto;
    overflow: auto;
}

figure img {
    margin-inline: auto;
}

figcaption {
    margin-top: 0.25rem;
    text-align: center;
    color: gray;
    font-size: 0.8rem;
}

blockquote {
    border-left: 6px solid var(--color-blockquote);
    padding: 0.15rem 1rem;
    margin: 0;
    margin-left: 1rem;
    margin-right: 2rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    font-style: italic;
}

hr {
    border-style: dashed;
    width: 14ch;
    margin-block: 2rem;
}

a {
    color: var(--color-link);
}

a:visited {
    color: var(--color-link-visited);
}

a:hover {
    color: var(--color-link-hover);
}

.neon-sign {
    font-family: 'Monoton', cursive;
    font-size: 1.5rem;
    color: #ffbf8b;
}

@media (prefers-color-scheme: light) {
    .neon-sign {
        font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
        color: var(--color-text);
    }
}

.site-header {
    /* position: relative; */
}

.site-masthead {
    display: flex;
    flex-direction: column;
    align-items: baseline;
    margin-bottom: 1rem;
}

.site-title {
    margin: 0;
    top: 25px;
    left: 1rem;
}

.site-footer {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    border-top: 4px solid var(--color-text);
    padding-top: 1rem;
    padding-bottom: 1rem;
    margin-top: 4rem;
}

.site-footer h1 {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 1rem;
}

.site-footer p {
    text-align: end;
}

.site-tagline {
    font-family: Georgia, 'Times New Roman', Times, serif;
    margin: 0;
    font-weight: normal;
    font-style: italic;
    color: var(--color-tagline);
}

.site-header>img {
    object-fit: cover;
    width: 100%;
    /* max-height: 182px; */
    filter: brightness(0.92);
}

.site-nav {
    margin: 0;
    margin-top: -4px;
    font-size: 0.84rem;
    font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
    background-color: var(--color-nav);
    display: flex;
    gap: 0.5rem;
    padding-inline: 1rem;
    border-top: 2px solid var(--color-tagline);
    display: none;
}

.site-nav a {
    text-decoration: none;
    color: gray;
    background-color: black;
    padding-block: 0.75rem;
    text-align: center;
}

.site-nav a:hover {
    color: white;
    background-color: #444;
}

.site-nav a.active {
    color: white;
}

.site-container {
    background-color: var(--color-bg);
    min-height: 80svh;
    max-width: 890px;
    margin-left: auto;
    margin-right: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

.page-sidebar {
    width: auto;
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-self: flex-start;
    margin-top: 6rem;
}

.page-main {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.page-content {
    max-width: 60ch;
    padding-inline: 0.5rem;
}

/* Posts on home */

.post:last-of-type {
    margin-top: 0;
}

.post {
    margin-top: 4rem;
}

.post__title {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 1.75rem;
}

.post__title a {
    text-decoration: none;
    color: inherit;
}

.post__title a:hover {
    color: var(--color-link-hover);
}

.post__date {
    color: gray;
    margin-top: 0.2rem;
    font-size: 0.8rem;
    font-family: sans-serif;
}

.post__content::first-letter {
    font-weight: bold;
    font-size: 1.5rem;
}

@media screen and (min-width: 600px) {
    .site-masthead {
        flex-direction: row;
        justify-content: space-between;
    }

    .site-footer {
        margin-top: 6rem;
    }
}


@media screen and (min-width: 792px) {

    .neon-sign {
        font-size: 2.5rem;
    }

    .site-nav a {
        padding-inline: 0.5rem;
    }

    .page-main {
        flex-direction: row;
        justify-content: space-between;
        flex: 1;
        padding-inline: 0.25rem;
        margin-top: 3rem;
    }

    .site-container {
        margin-top: 2rem;
        padding-inline: 2rem;
        margin-bottom: 2rem;
    }

    .page-sidebar {
        width: 20%;
        position: sticky;
        top: 2rem;
        margin-top: 0rem;
    }
}

@media screen and (min-width: 900px) {
    .site-container {
        padding-inline: 3rem;
    }
}