body {
    display: grid;
    grid-template-areas:
    "h h"
    "s m"
    "f f";
    grid-template-columns: 260px 1fr;
    grid-template-rows: 1fr auto;
    background-color: var(--backgroundColor);
}

header {
    grid-area: h;
}

main {
    grid-area: m;
}

footer {
    grid-area: f;
}

sidebar {
    grid-area: s;
    min-height: 100vh;
    padding: var(--textSize);
    font-size: 90%;
    border-right: var(--border);
    animation: slideInLeft var(--animate-duration) ease-out;
    z-index: 10;
    background: var(--backgroundColor);
    border-bottom: var(--border);
    max-width: 100vw;
}


sidebar ul {
    list-style-type: none;
    display: flex;
    flex-direction: column;
    padding: 0;
}

sidebar li {
    transition: var(--transition);
    width: 100%;
}

sidebar li a, 
sidebar li a:visited, 
sidebar li a:hover, 
sidebar li a:visited:hover {
    display: block;
    padding: calc(var(--textSize) / 4) var(--textSize);
    color: var(--textColor);
    white-space: nowrap;
    overflow-y: clip;
    text-overflow: ellipsis;
    overflow: hidden;
}

sidebar li a:hover, 
sidebar li a:visited:hover {
    background: var(--backgroundColorHighlight);
}

@media screen and (max-width: 700px) {
    body {
        grid-template-areas:
            "h"
            "m"
            "s"
            "f";
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr auto;
    }
    sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 1rem;
        border-right: none;
        border-bottom: 1px solid var(--oneColor);
    }

    sidebar-header,
    sidebar-footer {
        text-align: center;
    }

    note-sidebar {
        max-height: 200px;
        overflow-y: auto;
    }
}

/* --------- ANIMATIONS --------- */
@keyframes slideInLeft {
    0% {
        transform: translate3d(-100%, 0, 0);
        visibility: visible;
        opacity: 0.3
    }
    to {
        transform: translateZ(0);
        opacity: 1;
    }
}
