:root {

    --light-red: #f76497;
    --dark-red: #e04a79;
    --dark-bg: #141622;
    --light-bg: #fff;
    --dark-lvl1: #1e202b;
    --dark-lvl2: #272935;
    --light-lvl1: #f2f5fc;
    --light-lvl2: #dddee4;
    --dark-text: #fff;
    --light-text: #000;
    --off-text: #696970;

    --bg: var(--dark-bg);
    --lvl1: var(--dark-lvl1);
    --lvl2: var(--dark-lvl2);
    --text: var(--dark-text);
    --subtext: var(--light-lvl2);
    --red: var(--light-red);

    font-family: sans-serif;

}

  [data-theme="light"] {
    --bg: var(--light-bg);
    --lvl1: var(--light-lvl1);
    --lvl2: var(--light-lvl2);
    --text: var(--light-text);
    --subtext: var(--dark-lvl2);
    --red: var(--dark-red);
  }
  
  [data-theme="dark"],:root:not([data-theme="light"]) {
    --bg: var(--dark-bg);
    --lvl1: var(--dark-lvl1);
    --lvl2: var(--dark-lvl2);
    --text: var(--dark-text);
    --subtext: var(--light-lvl2);
    --red: var(--light-red)
  }


body {
    color: var(--text);
    background-color: var(--bg);
    margin: 0;
}
p {
    text-align: justify;
}

.header{
    color: var(--dark-text);
    background-color: var(--dark-lvl1);
    font-size: 1.1em;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2;
}

#bio-content {
    padding: 0.5em 0;
}

#bio-image {
    float: left;
    width: min(270px,50%);
    margin: 1em 2em 1em 0;
    align-items: center;
}

#bio-text {
    margin: 0;
    padding: 0;
    text-align: top;
}

a {text-decoration: none;
    color: inherit;
}

a.headerbutton {
    display: inline-block;
    text-align: center;
    width: 2em;
}

.lang-active {
    font-weight: bolder;
}

a.link {
    color: var(--red);
}

.copynote {
    font-size: 0.7em;
}

#copytoast {
    display: none;
}
.tag,.button {
    padding: 0.2em 0.4em;
    border-radius: 0.3em;
}

.tag {
    margin: 0.2em 0.4em;
}

.tagclick {
    cursor: pointer;
}

.post-buttons {
    display: flex;
    padding: 0.5em 0;
}

.button {
    background-color: var(--lvl1);
    color: var(--text);
    margin: 0 0.5em 0 0;
    border: 1px solid var(--red);
}

.subtitle,.authors {
    font-size: 0.9em;
    margin-block-start: 0.2em;
    margin-block-end: 0.2em;
}

.subtitle {
    font-style: italic;
    color: var(--subtext);
}

#tagcloud {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    margin: 0 0 1em;
}

#searchbar {
    background-color: var(--bg);
    color: var(--text);
    margin: 0.3em 0.2em 0.3em 0;
    padding: 0.2em;
    width: 20em;
    font-size: 1em;
    border-radius: 0.2em;
    border: 1px solid var(--text);
}

.inactive {
    font-style: italic;
    font-weight: normal;
    color: var(--subtext);
    background-color: var(--lvl2);
}


.active {
    font-style: normal;
    background-color: var(--light-red);
    color: var(--light-text);
}


.toggle-button {
    margin: 0 0.5em;
    align-self: center;
    font-size: 0.4em;
    display: flex;
    flex-direction: column;
}

.post-title {
    display: flex;
    justify-content: space-between;
    align-items: top;
    margin: 0.2em 0em;
}

.date {
    position: absolute;
    float: left;
    /* top: 15.5%; */
    width: 3em;
    margin: -1em 0 0 1em;
}

.date-popup {
    position: static;
    text-align: right;
    width: auto;
    margin: 0.1em 0 0;
}

.title {
    font-size: 1.2em;
    color: var(--red);
}

.tags {
    margin: 1em 0 0;
    font-size: 0.9em;
}

.hidden {
    display: none !important;
}

.header {
    width: auto;
    padding: 0.5em 1em;
    margin: 0 0 1em;
    display: flex;
    justify-content: space-between;
}

.page-block {
    width: 85%;
    margin: 0 auto;
    padding: 0 1em 1em;
}

.block-title {
    text-align: center;
    justify-content: space-between;
    display: flex;
    font-size: 1.5em;
    font-weight: normal;
    background-color: var(--lvl1);
    border-radius: 0.3em;
    margin: 0.2em 0;
    padding: 0.2em;
}

.title-year {
    text-align: center;
    width: 100%;
    font-size: 1.5em;
    margin: 0.1em;
}

.content-block,.cite-block {
    margin: 0.2em;
    padding: 0.7em;
    background-color: var(--lvl2);
    border-radius: 0.3em;
    box-sizing: border-box;
}

.grid-sizer,
.grid-item { 
    width: calc(50% - 5em);
}

.grid2 {
    display: flex;
    flex-flow: column wrap;
    max-width: 100%;
}

.grid-item2 {
    width: calc(50% - 5em);

}

.grid2:before {
  content: "";
  flex-basis: 100%;
  width: 0;
  order: 1;
}

.grid-item2:nth-child(2n+1) {
    order: 1;
}
.grid-item2:nth-child(2n) {
    order: 2;
}

.grid-sizer {
    display: none;
}

.grid {
    height: auto !important;
    align-items: center;
    margin: 0;
}

.grid-item {
    float: left;
    position: relative;
}

.grid-left {
    margin: 0.5% 5em 0.5% 0;
}

.grid-right {
    margin: 0.5% 0 0.5% 5em;
    float: right;
}

.grid-item::after {
    content: '';
    clear: both;
    display: block;
}

#filtering {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#dynamicContent{
    position: relative;
    background-image: url('../images/dots-vert.svg');
    background-position: center 2em;
    background-repeat: repeat-y;
    background-clip: content-box;
    padding: 1em 0;
    display: flex;
    flex-direction: column;
}

div.year-title{

    border-style: solid none;
    border-color: var(--red);
    border-width: 1px;
    margin: -0.2em;
    padding: 0.1em;
}

div.dots{
    height: 1em;
    width: 4.6em;
    position: absolute;
    background-image: url('../images/dots-horz.svg');
    background-position: center center;
    background-repeat: repeat-x;
}

div.dots-left{
    left: 100%;
    right: calc(100% + 5em);
    text-align: left;
    top: 5em;
}

div.dots-right{
    left: -4.8em;
    right: 0;
    text-align: right;
    top: calc(5em + 5%);
}

.clear-button {
    width: 1.2em;
    height: 1.2em;
    border-radius: 50%;
    margin: 0.2em 0.4em;
    padding: auto;
    text-align: center;
    background-color: var(--lvl2);
    color: var(--subtext);
}


#modal-container{
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0,0,0);
    background-color: rgba(0,0,0,0.6);
}

#modal-content,#modal-cite{
    position: relative;
    margin: 10% auto;
    width: 80%;
}

@media (hover: none) {
    .touch-click {
        background-color: var(--dark-red);
        color: var(--light-text);
    }
}

@media (hover: hover) {

    .button:hover {
        background-color: var(--red);
        color: var(--bg);
    }
    .inactive:hover {
        background-color: var(--dark-red);
        color: var(--light-text);
    }
    .clear-button:hover {
        background-color: var(--dark-red);
        color: var(--light-text);
    }
}

@media (min-width: 1025px) {

.grid-item > .body {
    max-height: 10em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    line-clamp: 6;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
}

}

@media (max-width: 1400px) {

    .page-block {
        width: 95%;
        padding: 0 2.5%;
    }

}

@media (max-width: 1024px) {

    div.year-title {
        border: none;
        margin: 0;
        padding: 0;
    }

    div.header {
        padding: 0.5em;
        margin: 0;
    }

    .grid {
        margin: 0;
    }


    .grid-item > .body {
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        line-clamp: 8;
        -webkit-line-clamp: 8;
        -webkit-box-orient: vertical;
    }

    .grid-sizer,
    .grid-item { 
        
        align-self: center;
        width: 100%; 
        margin: 0.5% 0;
    }

    #dynamicContent{
        background: none;
    }

    div.dots {
        display: none;
    }

    div.date {
        position: static;
        text-align: right;
        margin: 0.1em 0 0;
    }

}

/* * { border: 1px solid red !important; } */