html {
    color-scheme: light dark;
    --background: light-dark(white, #21201b);
    --text: light-dark(black, white);
}

* {
    background-color: var(--background);
    color: var(--text);
    font-family: Helvetica, sans-serif;
}

/* General text and geometry styling */
.title {
    width: 70%;
    margin: auto;
    text-align: center;
    font-size: 50px;
}

.title_link {
    text-decoration: none;
}

.square {
    width: 95%;
    max-width: 850px;
    margin: auto;
    clear: both;
}

.square_small {
    width: 50%;
    height: 50px;
    float: left;
    text-align: center;
    font-size: 20px;
    text-decoration: none;
    align-content: center;
}

.square_edit_posts_title {
    width: 79%;
    float: left;
    margin-bottom: 10px;
    font-size: 20px;
    text-decoration: none;
}

.square_edit_posts_button {
    width: 20%;
    float: left;
    margin-bottom: 10px;
    font-size: 20px;
    text-decoration: none;
}

.square_small:hover {
    background-color: var(--text);
    color: var(--background);
}

.preview_link_wrapper {
    text-decoration: none;
}

.preview>h3 {
    margin-bottom: 0;
    display: inline;
}

.preview:hover>h3 {
    background-color: var(--text);
    color: var(--background)
}

.preview>.date {
    margin-top: 5px;
    margin-bottom: 12px;
    font-size: 19px;
}

.preview>p {
    margin-top: 0;
    margin-bottom: 40px;
}

.blog_content {
    color: var(--text);
    clear: both;
    width: 80%;
    max-width: 850px;
    margin: auto;
    font-size: 21px;
}

.blog_content>p {
    line-height: 150%;
}

.blog_content>h1 {
    text-align: center;
}

#post_date {
    text-align: center;
}

p a:hover {
    background-color: var(--text);
    color: var(--background);
}

/* Image styling */
img {
    max-width: 80%;
    max-height: 500px;
    display: block;
    margin: auto;
}

/* Administrator side styling */
.add_post_form {
    text-align: center;
}

.add_post_form input {
    width: 80%;
    max-width: 850px;
    border: 2px solid var(--text);
    padding: 7px;
    color: var(--text);
    font-size: 21px;
}

.add_post_form input[type=submit]:hover {
    background-color: var(--text);
    color: var(--background);
}

.add_post_form textarea {
    width: 80%;
    max-width: 850px;
    border: 2px solid var(--text);
    padding: 7px;
    color: var(--text);
    font-size: 21px;
}

.add_post_form #content {
    height: 200px;
}

.add_post_form #preview {
    height: 40px;
}

/* Quote styling */
blockquote {
    border-left: 5px solid #aaa;
    background-color: light-dark(#f8f8f8, #2a2924);
    color: var(--text);
    margin: 24px 0;
    padding: 16px 24px;
    font-style: italic;
    font-size: 1.1em;
}

/* required since there are <p> and mathjax inside blockquotes */
blockquote * {
    background-color: light-dark(#f8f8f8, #2a2924);
}

/* List styling */
ol, ul {
    margin-left: 15px;
    list-style-position: inside;
    
}
::marker{
    font-style: italic;
}

li {
    margin-top: 5px;
}

/* Table styling */
table {
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 40px;
    border-collapse: collapse;
}

th,
td {
    padding: 10px;
}

td {
    border-bottom: 1px solid;
}

th {

    border-bottom: 2px solid;
}

/* Mathjax styling */
mjx-container {
    max-width: 100%;
    overflow-y:hidden;
    overflow-x: auto;
}

/* Responsiveness */
@media only screen and (max-width: 500px) {

    .title {
        font-size: 35px;
    }

    .blog_content>h1 {
        text-align: left;
    }

    #post_date {
        text-align: left;
        margin-top: 0px;
        margin-bottom: 50px;
    }

    .add_post_form input {
        width: 95%;
    }

    .add_post_form textarea {
        width: 95%;
    }

    .blog_content {
        width: 97%;
        font-size: 19.5px;
    }

    .blog_content>p {
        line-height: 130%;
    }
    ol, ul {
        margin-left: 0px;
        padding-left: 7px;
}

}
