div.main {
    width: var(--max-width);
    margin: auto;
}

div.main .page-title.center {
    font-size: 2.5em;
    display: flex;
    padding-top: 100px;
    height: 150px;
    align-items: center;
    justify-content: center;
    text-align: center;
}

div.main .sub-title.center {
    font-size: 1.5em;
    text-decoration: underline;
    display: flex;
    padding: 16px;
    align-items: center;
    justify-content: center;
}

div.main .introduction {
    display: flex;
    flex-direction: row;
    gap: 10px;
    padding: 10px;
    min-height: 300px;
}

div.main .introduction .image {
    flex: 1 1 0px;
    background-image: url('/images/intro-image.webp');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

div.main .introduction .text {
    flex: 1 1 0px;
    font-size: 1.15em;

}

div.recent {
    padding: 16px;
    padding-top: 0;
    padding-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

div.recent .post .link {
    text-decoration: underline;
    color: var(--highlight-text-colour);
}

div.recent .post .date {
    margin-bottom: 2px;
}

/* Article CSS */

#table-of-contents {
    position: fixed;
    display: none;
    flex-direction: column;

    width: 250px;
    left:16px;
    top:250px;

    overflow: auto;
    max-height: calc(100% - 280px);
}

#table-of-contents .elements {
    display: flex;
    flex-direction: column;
    padding: 20px;
    padding-top: 0;
    margin: 0;
    margin-top: 10px;
    gap:2px;
    font-weight: bold;
}

#table-of-contents .elements a {
    text-decoration: underline;
}

#table-of-contents .elements li ul {
    padding-left: 15px;
}

article.post {
    position: relative;
    padding: 16px;
    background-color: var(--standard-highlight-colour);
    margin-bottom: 16px;
}

article.post .title {
    font-size: 1.4em;
    text-decoration: underline;
}

article.post .text {
    padding-top: 6px;
    padding-bottom: 6px;
}

article.post .info {
    position: absolute;
    top: 16px;
    right: 16px;
}

article.post p {
    margin: 0;
}

article.post img {
    display: none;
}

.show-post {
    width: 100%;
    text-align: right;
}


article.entry {
    overflow-wrap: break-word;
    position: relative;
    padding: 16px;
    background-color: var(--standard-highlight-colour);
}

article.entry a {
    color: var(--post-link-colour);
    text-decoration: underline;
}

article.entry img {
    width: 100%;
}

article.entry pre {
    background-color: var(--code-block-background);
    overflow-x: auto;
    padding: 8px;
}

article.entry h6, article.entry h5, article.entry h4, article.entry h3, article.entry h2, article.entry h1 {
    color: var(--sub-title-colour);
    font-weight: bold;
}



article.entry img {
    position: relative;
    cursor: pointer;
}

/* END of Article CSS */

/* Previewers CSS */

div.preview {
    display: flex;
    flex-direction: column;
    background-color: var(--background-colour);
    position: fixed;
    top:0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow:scroll;
    z-index: -999;
    opacity: 0;
    transition: opacity 0.2s ease;
    padding: 15px;
    padding-left: 25px;
    padding-right: 25px;
    box-sizing: border-box;
}

div.preview.shown {
    opacity: 1;
    z-index: 11;
}

div.preview #preview-close {
    position: absolute;
    width: 25px;
    height: 25px;
    background-image: url("/images/icons/Close-Icon.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    right:25px;
    top:15px;
    cursor: pointer;

    transition: all 0.5s ease;
}

div.preview #preview-close:hover {
    transform: rotate(90deg);
}

div.preview div.split-information {
    display: flex;
    flex-direction: row;
    margin-bottom: 15px;
    font-size: 1.1em;
    width: 100%;
}

div.preview #library-nav {
    display: none;
}

div.preview #library-nav.shown {
    display: flex;
    z-index: initial;
}

div.preview #preview-image-count {
    flex-grow: 1;
    text-align: right;
}

div.preview #preview-image {
    margin: auto;
    width: calc(100% - 60px);
    height: calc(100% - 30px);
    background: no-repeat;
    background-position: center;
    background-size: contain;
   
}

div.preview #preview-title {
    font-size: 2em;
}

div.preview div.split-information.arrow {
    flex-direction: row-reverse;
    gap:25px;
}

div.preview .left, div.preview .right {
    width: 50px;
    height: 50px;
    background-image: url("/images/icons/Arrow-Icon.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    color:white;
    cursor: pointer;
}

div.preview .left {
    left: 0;
    top:0;
    bottom: 0;
    transform: rotate(180deg);
}


div.preview .right {
    right: 0;
    top:0;
    bottom: 0;
}

div.library {
    cursor: pointer;
    position: relative;
    width: 100%;
    height: 300px;
    display: flex;
    gap: 5px;
    box-sizing: border-box;
}

div.library .title {
    box-sizing: border-box;
    position: absolute;
    z-index: 2;
    width: 100%;
    height: 100%;
    left: 0;
    right: 0;
    bottom: 0;
}


div.library .title span {
    position: absolute;
    bottom: 15px;
    left: 25px;
}

div.library .title::before {
    display: block;
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgb(0,0,0);
    background: linear-gradient(0deg, rgba(0,0,0,1) 6%, rgba(0,0,0,0.8813726174063375) 16%, rgba(0,0,0,0) 19%, rgba(0,0,0,0) 91%); 
}

div.library .image img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

div.library .image span.description {
    display: none;
}





/* END of previewers CSS */

@media(max-width:1360px) {

    div.main {
        width: var(--tablet-width);
        margin: auto;
    }

    article.post {
        position: relative;
        padding: 16px;
        background-color: var(--standard-highlight-colour);
        margin-bottom: 16px;
    }

    article.post .title {
        font-size: 1.4em;
        text-align: center;
        text-decoration: underline;
    }

    article.post .text {
        padding-top: 6px;
        padding-bottom: 6px;
    }

    article.post .info {
        text-align: center;
        margin-top: 5px;
        margin-bottom: 5px;
        font-size: 0.8em;

        position:  initial;
        top: initial;
        right: initial;
    }
}

@media(max-width:1200px) {

    #table-of-contents {
        position: relative;
        top:0;
        left:0;
        right:0;
        bottom:0;
        width: 100%;
        overflow: initial;
        max-height: initial;
    }

    #table-of-contents .elements {
        margin: initial;
        margin-top: 10px;
        
    }
}

@media(max-width:600px) {

    div.main {
        width: 90%;
        margin: auto;
    }

    div.main .introduction {
        flex-direction: column-reverse;
    }

    div.main .introduction .image {
        flex: initial;
        height: 80vw;
    }
}