@import url('https://fonts.googleapis.com/css2?family=Source+Sans+Pro&display=swap');
:root {
    --black: rgb(57, 62, 70);
    --dark-black: rgb(34, 40, 49);
    --red: rgb(148, 36, 73);
    --bright-red: rgb(241, 0, 80);
    --blue:  rgb(0, 195, 255);
    --cyan: rgb(0, 173, 181);
    --dark-blue: rgb(0, 109, 233);
    --green: rgb(168, 255, 168);
    --orange:  rgb(255, 203, 106);
    --purple:  rgb(51, 3, 49);
    --white: rgb(231, 230, 230);
    --indigo: rgb(203, 197, 255);
  }



/* Body */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 20px;
    font-family: 'Source Sans Pro', sans-serif;
    letter-spacing: 1px;
    line-height: 1.6;
}

body {
    background-color: var(--black);
    height: 100%;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    color: var(--white);
}

::-webkit-scrollbar {
    top: 0;
    left: 50%;
    width: 6px;
    transform: translate(-50%, -50%);
}


::-webkit-scrollbar-track {
    background: var(--dark-black);
    border-radius: 5px;
}


::-webkit-scrollbar-thumb {
    background: var(--red);
    border-radius: 5px;
}


::-webkit-scrollbar-thumb:hover {
    background: var(--bright-red);
}

/* Sections */

.container {
    margin: 3% 5% 3% 5%;
}

#main-doc {
    position: absolute;
    margin: 0 0 0 300px;
}

section header,
section h1 {
    display: inline-block;
    font-size: 1.5rem;
}
section h3 li{
    display: flex;
}
section h1{
    display: flex;
}

section header {
    margin: 0.5rem;
    padding: 0.2rem 0.2rem 0.2rem 1rem;
    background-color:var(--red);
    display: inline-block;
}

section header::before {
    content: "> ";
    animation: blink-anim 1s linear infinite;
}
section li,
h2,
p,
pre {
    margin: 0.5rem;
    padding: 0.3rem;
    line-height: 1.4rem;

}

li {
    list-style-type: none;
}
header .icon{
    animation: spin 4s linear infinite alternate-reverse;
}
.icon{
    height: 30px;
    width: auto;
    margin: 0 0.2rem 0 0;
}

/* Navbar */
header {
    font-size: 1.3rem;
}

#logo {
    max-width: 100px;
    height: auto;
}

#nav-menu {

    height: 100px;
}

nav {
    width: 300px;
    height: 100%;
    padding: 1.2rem;
    background-color: var(--red);
    position: fixed;
    top: 0%;
    left: 0%;
    text-align: center;
    z-index: 1;
}

nav header::after {
    content: "|";
    animation: blink-anim 1s linear infinite;
}

nav ul {
    background-color: var(--dark-black);
    margin: 4% 0 0 0;
    padding: 1% 2% 0 2%;
    text-align: center;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-block: hidden;
    height: 100%;
}

nav ul::-webkit-scrollbar {
    width: 0px;
}

nav ul li {
    display: inline-block;

}

nav ul li a {
    color: white;
    text-decoration: none;
}

nav ul li:hover {
    background-color: var(--cyan);
}

/* Code styling */
span {
    white-space: pre-wrap; 
}
.clipboard{
    position: absolute; 
}
.code-container {
    word-wrap: break-word;
}

code {
    background-color:var(--dark-black);
    color: var(--cyan);
}

.code-container code {
    color: white;
}

pre {
    background-color: var(--dark-black);
}

.comment {
    color: var(--indigo);
}

.color-purple {
    color: var(--purple);
}

.color-green {
    color: var(--green);
}

.color-red {
    color: var(--red);
}

.color-orange {
    color: var(--orange);
}

.color-blue {
    color: var(--blue);
}

.color-dark-blue {
    color: var(--dark-blue);
}

.color-white {
    color: var(--white);
}

.hidden {
    display: none;
}

.typewriter {
    visibility: 1;
    opacity: 1;
}
.preBlink:after,
.typewriter:after {
    content: "|";
    color: var(--white);
    animation: blink-anim 0.7s linear infinite normal ;
}

/* Animations */
@keyframes blink-anim {
    50% {
        opacity: 0;
    }
}
@keyframes spin {
    
    0% {
        transform: scale3d(1.3, 1.3, 1.3);
        transform:rotate(360deg);
    }
    100% {
        transform: scale3d(1, 1, 1);
        transform:rotate(0deg);
    }
}
/*  Responsive Media Queries  */
@media only screen and (max-width: 768px) {
    pre{
        white-space: pre-wrap;
    }
    nav {
        height: 40%;
        width: 100%;
        top: 75%;
        bottom: 0%;
        left: 50%;
        transform: translate(-50%, 0%);
        text-align: center;
    }

    nav ul {
        height: 80%;
    }

    nav ul li {
        margin: 5% 0 5% 0;
    }
    nav ul li a{
        font-size: 1.2rem;
    }
    #main-doc {
        margin-left: 0;
    }
    section #Creating_an_array_using_the_result_of_a_match {
    margin-bottom: 12rem;
    }
    section header, section h1 {
        font-size:1.3rem;
    }
    section p {
        font-size:1rem;
    }
    #logo {
        margin: 0 95% 0 5%;
        max-width: 45px;
        height: auto;
        position: fixed;
        top: 5%;
        left: 0;
        display: inline-block;
    }
}
