:root {

    --vh100: 100vh;
    --vh100: calc(var(--vh, 1vh) * 100);
    --color-main: #333;
    --color-bg: white;
    --color-grey: lightgrey;
    --color-link: blue;

    --border-solid: 1px solid var(--color-main);
    --border-solid-grey: 1px solid var(--color-grey);
    --border-dashed-grey: 1px dashed var(--color-grey);
}

html {
    font-size: calc(0.8vw);
}
  
* {
scrollbar-width: none; /* hide scrollbar in firefox */
}

*::-webkit-scrollbar {
width: 0px; /* hide scrollbar in edge and opera */
}

body {
    font-family: 'IBM Plex Mono', monospace;
    background-color: var(--color-bg);
    color: var(--color-main);
    margin: 0;
}
  
h1, h2, h3, h4, h5, h6, p, small {
    margin-top: 0;
    font-weight: normal;
}
  
h1 {
    font-size: 1.5rem;
}
  
h2 {
    font-size: 1.2rem; 
    /* color: var(--color-grey); */
}
  
h3 {
    font-size: 1rem;
}
h4 {
    color: var(--color-grey);
    padding-left: 2rem;
    text-transform: uppercase;
    margin-block-end: 0.5rem;
}
h5, h6 {
    padding-left: 2rem;
    text-transform: uppercase;
    margin-block-end: 0.5rem;
}
  
small {
    font-size: 0.8rem;
    margin-block-end: 0.5em;
}

a {
    text-decoration: none;
    color: inherit;
}
p a {
    color: var(--color-link);
}
  
a.active, 
a:hover {
    color: var(--color-link);
}

figure {
    margin: 0;
}
img {
    width: 100%;
}

hr {
    border-top: 0px;
    border-bottom: var(--border-dashed-grey);
    margin: 1rem 0 1rem 0;
}

/* -------------------- SITE-WIDE -------------------- */

.grey {
    color: var(--color-grey);
    text-transform: uppercase;
}


/* -------------------- HEADER -------------------- */

    header {
        position: fixed;
        height: 4rem;
        width: 100%;
        border-bottom: 1px solid;
        background-color: var(--color-bg);
        z-index: 1;
    }

    .site-logo {
        display: inline-block;
        height: 50%;
        width: auto;
        margin: 0;
        padding: 1em;
        object-fit: contain;
    }

    /* __AUDIO-PLAYER */

        .audio.green-audio-player {
            margin-top: 1rem;
            float: right;
            display: inline-block;
            margin-right: 1rem;
            justify-content: space-between;
            align-items: center;
            user-select: none;
        }

        .play-pause-btn {
            display: none;
            cursor: pointer;
            display: inline-block;
            vertical-align: middle;
        }

        .slider {
            flex-grow: 1;
            background-color: #000000;
            cursor: pointer;
            position: relative;
            display: inline-block;
        }

        .progress {
            background-color: black;
            border-radius: inherit;
            position: absolute;
            pointer-events: none;
        }

        .pin {
            height: 1rem;
            width: 1rem;
            border-radius: 0.5rem;
            background-color: black;
            position: absolute;
            pointer-events: all;
        }

        .controls {
            font-family: 'IBM Plex Mono', monospace;
            font-size: 0.8em;
            line-height: 1rem;
            color: black;
            display: inline-block;
            flex-grow: 1;
            justify-content: space-between;
            align-items: center;
            margin-left: 1rem;
            /* margin-right: 24px; */
        }

        .slider {
            margin-left: 1rem;
            margin-right: 1rem;
            border-radius: 2px;
            height: 4px;
            vertical-align: middle;
        }

        .progress {
            width: 0;
            height: 100%;
        }

        .pin {
            right: -0.5rem;
            /* top: -6px; */
        }

        .volume {
            position: relative;
            display: inline-block;
        }

        .volume-btn {
            cursor: pointer;
        }

        .open path {
                fill: #44BFA3;
        }

        .volume-controls {
            width: 30px;      height: 135px;
            background-color: rgba(0, 0, 0, 0.62);
            border-radius: 7px;
            position: absolute;
            left: -3px;
            bottom: 52px;
            flex-direction: column;
            align-items: center;
            display: flex;
        }

        .hidden {
            display: none;
        }

        .slider {
            margin-top: 1rem;
            margin-bottom: 1rem;
            width: 6px;
            border-radius: 3px;
        }

        .progress {
            bottom: 0;
            height: 100%;
            width: 6px;
        }

        .pin {
            left: -5px;
            top: -8px;
        }
        
        .radio-link {
            display: inline-block;
            float: right;
        }

/* -------------------- SIDEBARS -------------------- */


#right-sidebar {
    left: auto;
    right: 0;
    position: fixed;
    border-left: 1px solid;
    border-right: 0px;
}

.sidebar {
    width: 4rem;
    height: calc(var(--vh100) - 8rem - 1px);
    border-right: 1px solid;
    position: fixed;
    left: 0;
    top: calc(4rem + 1px);
    background-color: white;
    z-index: 2;
    overflow-x: hidden;
    transition: 0.5s;
}

#closeLeft, #openLeft, #closeRight, #openRight {
    font-size: 0.8em;
    text-align:center;
    padding: 1rem;
    padding-bottom: 0;
    cursor: pointer;
    width: 2rem;
    display: block;
}
  
#closeLeft, #closeRight {
    display: none;
}

#closeRight {
    position: absolute;
    top: 0;
    right: 0;
}

    /* __MENU */

    #menu {
        margin: 0;
        padding-left: 3rem;
        margin-top: calc(-2rem - 3px);
        padding-bottom: 3rem;
    }

    .menu__items {
        margin: 0;
        border-top: 1px solid black;
        margin-left: -1em;
        padding-left: 2em;
    }

    .menu__item {
        list-style: none;
        padding-left: 1em;
        border: 1px solid black;
        border-width: 0 0 1px 1px;
    }
    .menu__item--hasItems {
        border-bottom: none;
    }
    .menu__item:last-child ul {
        border-left: 1px solid white;
        margin-left: calc(-1em - 1px);
    }

    .menu__item a {
        text-decoration: none;
        color: inherit;
    }
    .menu__item a:hover {
        color: var(--color-link);
    }
    .menu__item .active {
        color: var(--color-link);
    }

    .menu__item p { 
        margin: 0;
        background: white;
        position: relative;
        padding-left: 0.5em;
        padding-top: 1em;
        top: 0.6em;
        font-size: 1em;
    }


    /* __GLOSSARY */

    #glossary {
        display: none;
    }
    
    .glossary__header {
        position: sticky;
        top: 0rem;
        padding: 1rem;
        background-color: white;
    }

    .glossary__items {
        padding: 1rem;
    }
    .glossary__term {
        font-size: 1.2rem;
        cursor: pointer;
        width: 100%;
        border: none;
        text-align: left;
        outline: none;
        background-color: inherit;
    }
    .glossary__term:hover {
        color: var(--color-link);
    }
    .glossary__description {
        display: none;
        overflow: hidden;
        margin: 1rem 0 1rem 0;
    }

/* -------------------- FOOTER -------------------- */
      
    footer {
        position: fixed;
        bottom: 0;
        height: 4rem;
        width: 100%;
        border-top: 1px solid;
        background-color: var(--color-bg);
        z-index: 2;
        font-size: 0.8rem;
    }

    #currently-in-topolo {
        display: inline-block;
        width: calc(100vw - 4em);
        height: 100%;
        position: absolute;
        padding-top: 1rem;
        left: 0;
    }
    
    #contact {
        width: 2rem;
        height: 100%;
        display: inline-block;
        position: absolute;
        right: 0;
        padding: 1rem;
        padding-top: 1.5rem;
        background-color: inherit;
        z-index: 1;
        text-align: center;
        border-left: var(--border-solid);
    
    }
    

/* -------------------- MAIN CONTAINERS / SECTIONS -------------------- */

.main {
    height: calc(var(--vh100) - 8rem - 2px);
    width: calc(100vw - 8rem);
    margin-left: 4rem;
    position: absolute;
    z-index: -1;
    top: calc(4em + 1px);
    padding-bottom: 4rem;

    display: grid;
    grid-template-columns: 1fr 1fr;
}

.main--home {
    display: block;
}
.main--journal {
    grid-template-columns: 3fr 1fr;
    background-color: whitesmoke;
}
.main--journal-entry {
    grid-template-columns: 1fr 2fr 1fr;
    background-color: whitesmoke;
}
.main--full {
    grid-template-columns: 1fr;
}

.main__container {
    height: calc(100% - 2rem);
    width: calc(100% - 2rem);
    overflow: scroll;
    padding: 1rem;
    border-right: var(--border-dashed-grey);
}
.main__container:last-child {
    border-right: none;
}

.section {
    margin-bottom: 2rem;
    /* border-bottom: var(--border-dashed-grey); */
}
.section__title {
    font-size: 1rem;
    color: var(--color-grey);
}

.redirect {
    background-color: white;
    z-index: 1;
    opacity: 0.9;
    display: flex;
}

.redirect-text {
    margin: auto auto;
    width: 50%;
    text-align: center;
}

.redirect-button {
    border-radius: 1rem;
    padding: 0.5em;
    background-color:lightgrey;
    display: inline-block;
    margin-top:1rem;
}


/* -------------------- HOME -------------------- */

.temporary {
    font-size: 1rem;
    padding: 3rem;
    text-align: center;
}

.home-section {
    overflow-x: scroll;
    overflow-y: hidden;
    white-space: nowrap;
    height: 40%;
    border-bottom: 1px solid;
}

.home-section--journal {
height: calc(20% - 2px - 2rem);
border-bottom: none;
padding: 1rem;
background-color: whitesmoke;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.home-section::-webkit-scrollbar {
    display: none;
}

.home-block {
    display: inline-block;
    aspect-ratio: 1 / 1;
    height: calc(100% - 2em);
    border-right: 1px solid #333;
    margin-right: -0.5em; /* because otherwise there is too much space between the blocks for some reason */
    position: relative;
    padding: 1em;
    color: inherit;
    white-space: normal;
    vertical-align: top;
}
.home-block__flex {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 1rem;
}
.home-block .article-title {
    font-size: 1.2rem;
}
.home-block__scroll {
    flex: 1;
    display: flex;
    flex-basis: 0;
    flex-direction: column;
    overflow: scroll;
}
.home-block__scroll p {
    margin: 0;
}
.home-block__flex .article-cover {
    flex: 1;
    overflow: hidden;
    width: 100%;
}
.home-block__flex .article-cover__img {
    height: 100%;
    width: 100%;
    max-width: 100%;
    object-fit: cover;
    border-radius: 1em;
}

.home-section--journal .home-block {
    margin-right: 0.5em;
    aspect-ratio: 3 / 2;
}
.home-section--journal .article-title {
    font-size: 1rem;
}

/* __CALENDAR TIMELINE --------------- */


.jqtl-event-node {
    overflow: visible;
    border-radius: 2em;
    min-width: 2em;
    max-height: 3em;
    color: var(--color-bg);
    border: var(--border-solid-grey);
    margin-left: -15px; /* events start at rounded edge so need to be moved forward slightly */
    margin-top: 10px;
}
.jqtl-ruler-line-item span {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
}

.jqtl-event-label {
    overflow: visible;
    font-size: 0.8em;
    z-index: 10;
}

.jqtl-event-label a {
    text-decoration: none;
    color: black;
}


/* -------------------- PAGE -------------------- */

/* __ARTICLE-CONTENT ----- */

.article-parent {
    padding-bottom: 1em;
}
.article-parent a {
    color: var(--color-grey);
    text-decoration: none;
    font-size: 0.8rem;
}

.article-cover {
    margin: 0;
    background-color: whitesmoke;
    aspect-ratio: 3 / 2;
}

.article-title {
    margin-bottom: 0.5em;
    color: var(--color-main);
    font-size: 1.5rem;
    text-transform: none;
}

.article-info {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    color: var(--color-grey);
}
.article-info__a {
    flex: 1;
}
.article-info__b {
    flex: 1;
    text-align: right;
}

.article-text {
    margin: 3rem 0 3rem 0;
}
.article-text p {
    font-family: serif;
    margin-block-end: 1em;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
    font-family: serif;
    font-size: 1.2rem;
    line-height: 1.2;
}
.article-text ul {
    padding: 0;
}
.article-text li {
    list-style: disc;
    margin-left: 1.5rem;
}
.article-text figure {
    margin-bottom: 1rem;
}
.article-text__gallery {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.article-text__gallery li {
    list-style: none;
    margin-left: 0;
}
.article-text a {
    color: var(--color-link);
}

.article-colophon {
    margin: 2rem 0 2rem 0;
}
.article-colophon__term {
    color: var(--color-grey);
}
.article-colophon__description {
    margin: 0;
    margin-bottom: 1rem;
}

/* __SUBPAGES ----- */

.subpages {
    margin-top: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-column-gap: 1em;
    grid-row-gap: 2em;
}
.main--full .subpages {
    grid-template-columns: repeat(4, 1fr);
}
.main--journal .subpages {
    grid-template-columns: repeat(3, 1fr);
}
.subpages__item {
    list-style: none;
}
.subpages__item .article-title {
    font-size: 1.2rem;
    margin-bottom: 0.2em;
}

.pagination {
    padding: 1rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-column-gap: 1rem;
}

.pagination__next {
    display: inline-block;
    grid-column-start: 2;
    grid-column-end: 3;
    text-align: left;
}

.pagination__prev {
    display: inline-block;
    grid-column-start: 1;
    grid-column-end: 2;
    text-align: right;
}

/* __SCHEDULE ----- */

.schedule {
    padding: 0;
    margin: 0;
}
.schedule__item {
    list-style: none; 
    border: var(--border-solid-grey);
    border-radius: 3rem;
    padding: 1.5rem;
    margin: 1rem 0; 
}
.schedule__item--link:hover {
    border: var(--border-dashed-grey);
}
.schedule__item p:last-child {
    margin-bottom: 0;
}

/* __GALLERY ----- */

.gallery-image {
    margin-bottom: 1rem;
}
.gallery-image__caption {
    font-family: serif;
}
.gallery-image__caption a {
    color: var(--color-link);
}


/* -------------------- PEOPLE --------------------  */

.main--full .subpages--people {
    grid-template-columns: repeat(8, 1fr);
}

.profile {
    display: inline-block;
    background-color: var(--color-grey);
    color: var(--color-main);
    border-radius: 1rem;
    padding: 0.5em;
    padding-left: 0.75em;
    padding-right: 0.75em;
    text-decoration: none;
    font-size: 0.8rem;
}
.article-text .profile {
    color: var(--color-main);
}
.profile--smallcircle {
    height: 1rem;
    aspect-ratio:1/1;
    padding:0;
    border-radius: 50%; 
    vertical-align:middle;
}

.profile-circle {
    background-color: var(--color-grey);
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    padding: 0;
    margin-bottom: 0.5em;
}
.profile-name {
    font-size: 1rem;
    text-align: center;
}

/* -------------------- JOURNAL -------------------- */

.journal-entry {
    border: var(--border-solid-grey);
    border-radius: 1rem;
    padding: 1rem;
    background-color: var(--color-bg);
}

.journal-entry--page {
    padding: 3rem;
}

.tags {
    padding: 0;
    list-style: none;
}

.related-pages {
    padding: 0;
}
.related-pages__item {
    list-style: none;
}


/* -------------------- SCREENSIZE -------------------- */



@media only screen and (max-width: 1375px) {
    html {
      font-size: 11px;
    }
}
  
  
@media only screen and (max-width: 720px) {

    .main {
        height: auto;
        width: calc(100vw);
        margin-left: 0;
        top: calc(7em + 1px);
        display: block;
    }
    .main__container {
        height: auto;
        border-right: none;
    }


    .home-section {
        display: grid;
        grid-template-columns: 1fr;
        height: auto;
        width: 100%;
    }
    #calendar {
        height: 30rem;
        min-height: auto;
    }
    .home-section--journal {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-gap: 1rem;
        height: auto;
        width: calc(100% - 2rem);
    }
    .home-block {
        border: none;
        border-bottom: 1px solid #333;
        width: calc(100% - 2rem);
    }

    .home-section--journal .home-block {
        border: var(--border-solid-grey);
        margin-right: 0;
        padding: 1rem;
        height: auto;
        aspect-ratio: 1/1;
        width: calc(100% - 2rem);
    }

    .redirect {
        height: 100%;
        position: fixed;
    }

    .redirect-text {
        padding-top: 100px;
    };

    .main--full .subpages {
        grid-template-columns: repeat(2, 1fr);
    }

    .main--journal .subpages {
        grid-template-columns: repeat(1, 1fr);
    }

    #left-sidebar {
        width: 100vw;
    }
    .sidebar {
        height: 3rem;
        border-bottom: var(--border-solid);
    }
    #menu {
        visibility: hidden;
        opacity: 0;
        transition: opacity 0.3s, visibility 0.3s;
    }

    #journal-pagination {
        position: static;
    }

    .journal-entry--page {
        padding: 1rem;
    }

}

@media only screen and (max-width: 400px) {
    .home-section--journal {
        font-size: 0.5em;
    }
}

@media screen and (min-width:1875px) {
    html {
        font-size: 15px;
    }
}