/* document setup */

html,
body {
    background-color: white;
    margin: 0px;
    padding: 0px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* banner on top, navigation and content side by side below it */
body {
    height: 100vh;
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
}

footer {
    display: none;
}
/* General element styling */

nav,
figcaption {
    font-family: 'Roboto Mono', monospace;
}

h1,
h2,
h3,
h4,
p {
    font-family: 'Cormorant Garamond', serif;
    margin-top: 10px;
}

h1 {
    font-size: 4em;
    font-weight: 100;
    color: rgb(55, 55, 55);
}

h2 {
    font-size: 2em;
    font-weight: 600;
    color: rgb(77, 77, 77);
    margin-top: 100px;
    margin-bottom: 20px;
}

h3,
h4 {
    font-weight: 600;
    color: rgb(55, 55, 55);
    margin-top: 10px;
}

h4 {
    font-style: italic;
}

p {
    font-size: 1.2em;
    font-weight: 100;
    color: rgb(55, 55, 55);
}

article a {
    color: rgb(105, 147, 223);
    font-style: italic;
}

article a:hover {
    color: rgb(157, 182, 229);
    cursor: pointer;
}

/* Layout */

#siteBanner {
    grid-column: 1 / -1;
    font-family: 'Roboto Mono', monospace;
    background-color: rgb(55, 55, 55);
    border-bottom: 1px solid rgb(30, 30, 30);
}

#siteBanner a {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px 16px;
    padding: 14px 24px;
    color: white;
    text-decoration: none;
}

#siteBanner .bannerName {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.6em;
    letter-spacing: 0.02em;
}

#siteBanner .bannerTag {
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgb(190, 190, 190);
}

#siteBanner a:hover .bannerName {
    text-decoration: underline;
    text-underline-offset: 4px;
}

nav {
    min-height: 0;
    background-color: rgb(245, 245, 245);
    text-align: left;
    overflow-y: auto;
}

main {
    min-height: 0;
    overflow-y: auto;
    display: flex;
    justify-content: center;
    background-image: linear-gradient(0.25turn, #ffffff, #f0f1f4);
}

main article {
    width: 100%;
    max-width: 880px;
    padding: 40px 40px 100px;
    text-align: left;
}

main article h1,
main article h2,
main article h3,
main article h4,
main article h5,
main article h6 {
    width: 100%;
}

main article h3,
main article h4,
main article h5 {
    margin-bottom: 15px;
    margin-top: 100px;
}
main article p {
    margin-top: 0px;
}

figure {
    width: 100%;
    margin: 20px 0px;
    text-align: left;
    background-color: #e9e9e9;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-flow: row wrap;
    justify-content: space-between;
    padding: 3px;
}

figure.white {
    background-color: white;
}

figure>img,
figure>iframe {
    object-fit: contain;
    background-color: white;
    width: 250px;
    flex: 1 1 0;
    border-radius: 7px;
    margin: 5px;
    min-height: 200px;
    max-height: 500px;
}



figure>img:hover {
    filter: brightness(80%);
}

figure>img:active {
    filter: brightness(50%);
}

figure>figcaption {
    width: 100%;
    text-align: center;
    color: rgb(74, 74, 74);
    font-size: 0.7em;
    font-style: italic;
    padding-bottom: 6px;
}

#contentsList {
    text-align: right;
}

#contentsList {
    margin: 0;
    padding: 30px 0px 40px;
}

#contentsList>li {
    list-style-type: none;
    margin: 9px 20px 9px 9px;
    transition: transform 0.17s ease-in-out;
}

#contentsList li:hover {
    transform: translateX(-8px);
}

#contentsList a {
    color: grey;
    text-decoration: none;
}

#contentsList>li.page a {
    font-weight: bold;
}

#contentsList>li.page.current a {
    color: rgb(55, 55, 55);
}

#contentsList>li.H1 {
    padding-bottom: 5px;
    border-bottom: 1.5px solid gray;
}

#contentsList>li.H1,
#contentsList>li.H2 {
    font-weight: bold;
    color: rgb(103, 103, 103);
    margin-top: 40px;
}

#menu {
    display: none;
}

#menu>p {
    padding: 10px 0px 0px 15px;
    flex-grow: 1;
}

#hamburgermenu {
    position: relative;
    width: 40px;
    height: 40px;
    right: 10px;
    top: 20px;
}

.checkbox {
    position: absolute;
    height: 32px;
    width: 32px;
    top: 0px;
    left: 0px;
    z-index: 5;
    opacity: 0;
    cursor: pointer;
}

.hamburger-lines {
    height: 26px;
    width: 32px;
    position: absolute;
    top: 5px;
    left: 4px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#hamburgermenu .hamburger-lines .line {
    display: block;
    height: 2px;
    width: 100%;
    border-radius: 10px;
    background: #0e2431;
}

#hamburgermenu .hamburger-lines .line1 {
    transform-origin: 0% 0%;
    transition: transform 0.4s ease-in-out;
}

#hamburgermenu .hamburger-lines .line2 {
    transition: transform 0.2s ease-in-out;
}

#hamburgermenu .hamburger-lines .line3 {
    transform-origin: 0% 100%;
    transition: transform 0.4s ease-in-out;
}

#hamburgermenu input[type="checkbox"]:checked~.menu-items {
    transform: translateX(0);
}

#hamburgermenu input[type="checkbox"]:checked~.hamburger-lines .line1 {
    transform: rotate(45deg) scaleX(1.07);
}

#hamburgermenu input[type="checkbox"]:checked~.hamburger-lines .line2 {
    transform: scaleY(0);
}

#hamburgermenu input[type="checkbox"]:checked~.hamburger-lines .line3 {
    transform: rotate(-45deg) scaleX(1.07);
}


/* responsive design elements */

@media only screen and (max-width: 900px) {
    main article {
        padding: 30px 20px 80px;
    }
}

/* small screens: one scrolling column, the page menu becomes a row under the banner */
@media only screen and (max-width: 800px) {
    body {
        height: auto;
        display: block;
    }

    nav,
    main {
        overflow-y: visible;
    }

    #contentsList {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px 18px;
        padding: 12px;
        text-align: center;
    }

    #contentsList>li.page {
        margin: 0;
    }

    #contentsList>li:not(.page) {
        display: none;
    }

    h1 {
        font-size: 2.8em;
    }
}
