/* default styles for pages, to avoid browser own css (margin, padding) */
html, body {
    margin: 0;
    padding: 0;
    font-family: "Lato", "sans-serif";
    scroll-behavior: smooth;
    overflow-x: hidden;
    transition: .5s;
}
body {
    overflow: unset;
}

/* different styles every mode */
body.dark-mode {
    background: #121212;
    color: rgb(200, 200, 200);
}
body.dark-mode a:link, body.dark-mode a:visited {
    color: rgb(25, 160, 75);
}
body.light-mode {
    background: #e4e4e4;
    color: rgb(50, 50, 50);
}
body.light-mode a:link, body.light-mode a:visited {
    color: rgb(16, 100, 47);
}
body.light-mode a:hover {
    color: rgb(25, 160, 75);
}

/* TOP BAR STYLES */
nav {
    position: fixed;
    width: 100%;
    z-index: 99;
}
nav.dark-mode {
    background: #333;
}
nav.light-mode {
    background: #999;
}
@media screen and (min-width: 400px) {
    nav div {
        display: inline-block;
        margin: .5rem;
    }
    nav div#home {
        position: absolute;
        display: block;
        margin: 0;
        margin-right: 40%;
        top: .5rem;
        left: 35%;
        font-size: 1.5rem;
    }
    nav div#home a {
        text-decoration: none;
        vertical-align: middle;
        font-size: 1.5rem;
        line-height: 1.5;
    }
    #signin-link {
        float: left;
        height: 2rem;
        font-size: 1.5rem;
        padding: 0 .5rem;
        text-decoration: none;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-top: .25rem;
    }
    #signin-link .fa-sign-in {
        padding-left: .5rem;
        font-size: 2rem;
    }
    body.dark-mode #signin-link {
        color: rgb(200, 200, 200);
    }
    body.light-mode #signin-link {
        color: rgb(20, 20, 20);
    }
    body.light-mode nav div#home a { color:rgb(50, 50, 50) }
    body.dark-mode nav div#home a { color: rgb(200, 200, 200) }
    nav div#menu-button {
        font-size: 1.5rem;
        cursor: pointer;
        line-height: 1.5;
        width: 70%;
        user-select: none;
    }
    nav div#toggle-dark-mode {
        float: right;
        margin-bottom: 0;
    }
    nav div#toggle-dark-mode img {
        cursor: pointer;
    }
    nav div#toggle-dark-mode img:hover:active {
        background: #555555;
    }
    nav div#menu-button {
        width: 7.5rem;
        text-align: center;
        vertical-align: middle;
    }
    nav div#menu-button:hover:active {
        background: #555555;
    }
}
@media screen and (max-width: 399px) {
    nav div {
        display: block;
        margin: .5rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    nav div#home {
        font-size: 1.5rem;
    }
    nav div#home a {
        text-decoration: none;
        vertical-align: middle;
        font-size: 1.5rem;
        line-height: 1.5;
    }
    #signin-link {
        height: 2rem;
        font-size: 1.5rem;
        padding: 0 .5rem;
        text-decoration: none;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-top: .25rem;
    }
    #signin-link .fa-sign-in {
        padding-left: .5rem;
        font-size: 2rem;
    }
    body.dark-mode #signin-link {
        color: rgb(200, 200, 200);
    }
    body.light-mode #signin-link {
        color: rgb(20, 20, 20);
    }
    body.light-mode nav div#home a { color:rgb(50, 50, 50) }
    body.dark-mode nav div#home a { color: rgb(200, 200, 200) }
    nav div#menu-button {
        font-size: 1.5rem;
        cursor: pointer;
        line-height: 1.5;
        user-select: none;
        text-align: center;
        vertical-align: middle;
    }
    nav div#toggle-dark-mode {
        margin-bottom: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    nav div#toggle-dark-mode img {
        cursor: pointer;
    }
    nav div#toggle-dark-mode img:hover:active {
        background: #555555;
    }
    nav div#menu-button:hover:active {
        background: #555555;
    }
    
    /* BUG FIXES */
    article {
        padding-top: 5rem;
    }
    aside#menu div.sticky {
        top: 8rem;
    }
}

/* ARTICLE STYLES */
div.row {
    display: flex;
    padding: 1rem;
    padding-top: 2.8rem;
}
aside#menu {
    display: none;
    flex: 1 1 150px;
    margin: 0;
    font-size: 1rem;
    height: 100%;
    z-index: 1;
    position: fixed;
}
article {
    flex: 1;
    padding-left: 5%;
}
aside#menu div.sticky {
    position: fixed;
    padding: 1rem;
    left: 0;
}
body.dark-mode aside#menu div.sticky {
    background: #333;
}
body.light-mode aside#menu div.sticky {
    background: #999;
}
aside#menu h2 {
    margin: .5rem;
    margin-top: 1rem;
}
aside#menu a {
    display: block;
    margin: .5rem;
}
ol, ul {
    padding-left: 15px;
}

/* FOOTER STYLES */
footer {
    padding: 5%;
    background: rgb(10, 10, 10);
    display: flex;
    flex-direction: column;
    
}
body.dark-mode footer {
    background: linear-gradient(360deg, #333 0%, rgba(12,12,12,1) 50%, rgba(20,20,20,1) 100%);
}
body.light-mode footer {
    background: linear-gradient(360deg, #333 0%, rgb(200, 200, 200) 50%, rgb(230, 230, 230) 100%);
}
footer div {
    padding: 5%;
    padding-top: 2%;
}
footer div.author {
    flex: 40%;
    position: relative;
}
footer div.author img {
    border-radius: 4px;
    display: block;
    width: 75%;
    height: auto;
}
footer div.author .text {
    color: #fff;
    line-height: 1.5em;
    text-shadow: 3px 5px 5px #000;
    text-align: center;
    position: absolute;
    top: 60%;
    left: 39%;
    transform: translate(-50%, -50%);
    width: 100%;
}
@media screen and (min-width: 500px) {
    footer div.author .text {
        font-size: 1.3rem;
    }
}
@media screen and (min-width: 400px) {
    footer div.author .text {
        font-size: 1rem;
    }
}
@media screen and (max-width: 399px) {
    footer div.author .text {
        font-size: .7rem;
    }
}
footer div.links {
    flex: 40%;
}
