html {
    font-size: 17px;
}

/* Navbar styling */
nav {
    max-width: 35rem;
    margin-right: auto;
    padding-right: 1rem;
    padding-left: 1rem;
    font-size: larger;
}

#nav-cal {
    font-weight: bold;
}

/* General styling */
main {
    max-width: 44rem;
    margin-left: auto;
    margin-right: auto;
    padding-right: 1rem;
    padding-left: 1rem;
}

/* Homepage styling */
.homepage-pretty-date {
    float: right;
    font-style: oblique;
}

/* Article styling */
article h1 {
    text-align: center;
}

.article-pretty-date {
    text-align: center;
    font-style: oblique;
}

/* Resist the temptation to re-enable this.  It just doesn't look good enough
   on most browsers */
/* article > p { */
/*     text-align: justify; */
/* } */

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.3rem;
}

h3 {
    font-size: 1.1rem;
}

h4 {
    font-size: 1.1rem;
}

/* Remove excess margin from figure media */
figure img {
    margin: 0 auto;

}

figure video {
    margin: 0;
}


p#draft-notice {
    font-weight: bold;
    text-align: center;
}

#article-description {
    font-style: oblique;
    font-size: 90%;
    text-align: center;
    max-width: 30rem;
    margin: auto;
    margin-bottom: 1.5rem;
    margin-top: 1.5rem;
}

p, li {
    line-height: 1.5em;
}

pre {
    overflow-x: auto;
}

figure {
    padding: 0;
    margin: 0.5rem;
}

figcaption {
    font-size: smaller;
    text-align: center;
    font-style: oblique;
    margin-top: 0.6em;
}

video {
    max-width: 100%;
}

img {
    display: block;
    margin: auto;
    max-width: 100%;
    width: 100%;
    height: auto;
}

video {
    width: 100%
}

/* Tables */
table, th, td {
    border: 1px solid grey;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
    display: block;
    margin: 0 auto;
    overflow-x: auto;
    width: 100%;
}

tbody {
    white-space: nowrap;
}

td, th {
    padding-top: 0.5em;
    padding-right: 1em;
    padding-bottom: 0.5em;
    padding-left: 1em;
    width: 100%;
}

th {
    background: #cbcbcb;
}

li {
    margin: 0.5em;
}

blockquote {
    margin: 1em;
    border-left: 0.2em solid grey;
    padding-left: 1em;
    font-style: oblique;
}

.get-notified {
    font-style: oblique;
    /* text-align: center; */
    font-size: smaller;
}

.rss-icon-link {
    display: inline-block;
    position: relative;
}

.rss-icon-link > img {
    height: 0.8em;
    width: 0.8em;
}

footer {
    font-size: smaller;
    font-style: oblique;
}


/* If they prefer a dark mode, change the colours a bit */
@media (prefers-color-scheme: dark) {
    /* Some browsers (eg Chrome) don't unset dark mode when printing */
    @media not print {
        html {
            background: #0c0c0c;
            color: #e1e1e1;
        }

        /* Hack to fix lack of color set for codehilite blocks */
        pre {
            color: #0c0c0c;
        }

        th {
            color: #333;
        }

        a {
            color: #8ab1ff;
        }

        a:visited {
            color: #4f8aff;
        }
    }
}
