@font-face {
    font-family: "DejaVuSans";
    src: url(/DejaVuSans.woff2) format("woff2");
}

:root {
    --outer: hsl(240, 30%, 50%);
    --background: hsl(240, 30%, 80%);
    --navbar: hsl(240, 60%, 30%);
    /* --navbar-hover: hsl(240, 30%, 30%); */
    --navbar-hover: hsl(240, 60%, 60%);

    /* Some color form Catpucchin latte theme */
    --mauve: #8839ef;
    --blue: #1e66f5;
    --red: #d20f39;
}

html {
    height: 100%;
    background-color: white;
    font-family: "DejaVuSans";
}


body {
    display: flex;
    flex-direction: column;

    max-width: 30cm;
    min-height: 100%;

    margin: auto;

    border: 1px solid lightgrey;
    border-top: none;
    border-bottom: none;
    box-sizing: border-box;
}

#site-header {
    margin: 1em;
}

#site-header span {
    display:  inline-block;
    font-size: 1.5rem;
    line-height: 3rem;
    vertical-align: middle;
    margin: 0 .5em;
}

#site-header img {
    display:  inline-block;
    max-height: 3rem;
    vertical-align: middle;
}

#site-menu {
    flex-grow: 0;
    color: white;
    background-color: var(--navbar);
}

#site-menu ul {
    display: flex;
    padding: 0;
    margin: 0 auto;
}

#site-menu li {
    display: block;
    list-style: none;
}

#site-menu li:hover {
    background-color: var(--navbar-hover);
}

#site-menu li:last-child {
    margin-left: auto;
}

#site-menu a {
    color: white;
    text-decoration: none;
    display: block;
    line-height: 2em;
    height: 2em;
    padding: 0 1em;
}

main {
    margin-left: auto;
    margin-right: auto;
    max-width: 18cm;
    padding: 1em 2em;
}

#content {
    flex-grow: 1;
}

p {
    text-align: justify;
}

#sidebar {
    float: left;
}

article header {
    margin-bottom: 4em;
}

section {
    margin: 4em auto;
}

footer {
    margin-left: auto;
    margin-right: auto;
    max-width: 18cm;
    padding: 1em 2em;
}

/* Other elements */

h1, h2, h3, h4, h5, h6 {
    text-align: center;
}

h1 {
    font-size: 2rem;
}

hr {
    margin: 0;
}

figure {
    text-align: center;
}

figure img {
    max-width: 100%;
    object-fit: contain;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

figcaption {
    margin-top: 1em;
}

pre, figure, .equation-container {
    margin: 1rem;
    padding: 1rem;
    box-sizing: border-box;
    overflow: scroll;
}

code {
    background-color: lightgray;
}

.link-like, a {
    color: var(--blue);
    text-decoration: underline;
}

.article-date {
    margin-left: auto;
}

.link-like, a {
    text-decoration: underline;
}

.subtitle {
    text-align: center;
}

/* Mobile */
@media (width < 50em) {
    #site-menu ul {
	flex-direction: column;
    }

    #site-menu li:last-child {
	margin-left: 0;
    }
}
