* {
    box-sizing: border-box;
}

@media (prefers-reduced-motion: no-preference) {
    * {
      scroll-behavior: smooth;
    }
}

body {
    font-family: Tahoma, sans-serif;
    font-size: 16px;
    margin: 0;
}

#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100%;
    background-color: #0f0f0f;
    display: flex;
    flex-direction: column;         /* Main Axis = vertical & items arranged verticaly */
    justify-content: space-evenly;  /* items evenly spaced on main(vertical) axis */
}
nav a {
    color: #c2cccc;
    text-decoration: none;
    font-size: 1.8em;
    border-top: solid 2px #252526;
    /*display: flex; */         /*elements inside <a> = flexboxes (text) & main axis = horizontal */
    /*align-items: center;*/    /* centers items (text) on cross axis (here vertical axis) */
    height: 100%;
    margin: 0;
}

nav a:hover{
    color: #fff;
}

nav header{
    margin-top: 20px;
    margin-bottom: 20px;
    height: 100%;
}

main {
    line-height: 1.5rem;
    margin-left: 260px;
    background-color: #252526;
    min-height: 100vh;
}

header {
    font-size: 2rem;
    color: #fff;
}

section{
    color: #c2cccc;
    padding: 10px;
    width: 95%;
    margin: auto;
}
section a{
    color: white;
}

code {
    background-color: #1d1d1d;
    color: #9cdcfe;
}

.bold {
    font-weight: bold;
}

@media(max-width:900px){
    #navbar{
        position: fixed;
        top:0;
        left:0;
        width: 100%;
        height: 20vh;
        display: grid;
        grid-template-columns: repeat(2,1fr);
        justify-content: center;
        overflow: auto;
        column-gap: 0;
        font-size: 0.5em;
        column-count: 2;
    }
    main{
        margin-left: 0;
        padding-top: 20vh;
    }
    #navbar header{
        margin: 0;
        height: auto;
        width: 100%;
        grid-column: span 2;
        border-bottom: solid 2px #252526;
        padding-left: 5px;
    }
    nav a{   
        border-bottom: solid 2px #252526;
        border-right: solid 2px #252526;
        border-top: none;
        padding-left: 5px;
    }
    nav a:last-child{
        border-bottom: none;
    }
    .main-section{
        scroll-margin-top: 20vh;
    }
}