* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body, html {
    min-height: 100%;
}

body {
    position: relative;
    font-family: "Lato", monospace;
    font-size: 16px;
    word-spacing: 4px;
    background-color: #fff; /* fallback */
    isolation: isolate;       /* lets a child at z-index: -1; sit behind content */
}

::-webkit-scrollbar {
    width: 15px;
}

::-webkit-scrollbar-track {
    background: rgb(44, 44, 44);
}

::-webkit-scrollbar-thumb {
    background: rgb(0, 255, 0);
    border: 1px solid rgb(0, 0, 0);
    border-radius: 20px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgb(98, 192, 98);
}

header {
    margin-top: 8%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 100%;
    overflow-x: clip;
}

nav {
    left: 0;
    bottom: 70%;
    position: fixed;
    width: 17rem;
    margin-left: 1rem;
    transform: translateY(50%);
    z-index: 1;
    border: 2px solid transparent;
    border-radius: .5rem;
    background-color: rgb(174, 254, 174);
}

.back-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: rgb(0, 0, 0);
    margin: 0;
}

.back-text {
    font-size: 1.4rem;
    font-weight: 600;
}

.back-arrow a {
    margin: 1rem 1.5rem;
}

.back-arrow a svg {
    padding: .5rem;
    color: rgb(0, 0, 0);
}

.back-arrow:hover {
    border: 2px solid rgb(174, 254, 174);
    border-radius: .5rem;
    background: linear-gradient(120deg, #000000, #2278e9, #000000, #2278e9);
    color: rgb(255, 255, 255);
}

.info-demo,
.main-demo {
    display: flex;
}

.info-demo,
.main-demo {
    justify-content: center;
}

.info-demo {
    width: 100%;
}

.toggle {
    width: 100%;
    display: flex;
    justify-content: flex-end;
}

#theme-toggle {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
}

.info-demo {
    align-items: center;
    height: 100%;
}

.main-demo {
    width: 39%;
}

.main-demo {
    align-items: flex-start;
    flex-direction: column;
    background-color: rgb(174, 254, 174);
    padding: 20px;
    border-radius: 2rem;
}

.main-demo h2 {
    font-size: 2.5rem;
    font-weight: 400;
}

.main-demo h2 {
    margin: 0;
}

.demo h1 {
    margin-bottom: 4rem;
    font-size: 1.6rem;
}

video {
    max-width: 100%;
    height: auto;
}

footer {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 100%;
    margin-top: 4rem;
    margin-bottom: 2rem;
}

footer .equalizer {
    display: flex;
    justify-content: space-between;
    height: fit-content;
    padding: 10px;
    width: 788px;
    background-color: rgb(174, 254, 174);
    border-radius: 2rem;
}

.copyright {
    padding: 10px;
}

@media only screen and (max-width: 1375px) {
    nav {
        width: 11rem;
    }

    nav a svg {
        width: 50px;
        height: 50px;
    }

    .back-arrow {
        flex-direction: column;
    }

    .back-text {
        font-size: 1.1rem;
    }

    .main-demo {
        width: 58%;
    }

    .demo h1 {
        font-size: 1.3rem;
    }
}

@media only screen and (max-width: 1000px) {
    header {
        margin-top: 11%;
    }

    nav {
        top: 0;
        left: 1%;
        bottom: 0;
        position: fixed;
        height: 4rem;
        margin-left: 0;
        margin-bottom: 0;
        transform: translateY(10%);
        z-index: 1;
        width: 9rem;
        background-color: rgb(174, 254, 174);
    }

    nav a svg {
        width: 40px;
        height: 40px;
    }

    .back-text {
        font-size: .9rem;
    }

    .main-demo {
        width: 65%;
        margin-left: 20%;
    }

    footer {
        margin-bottom: 8rem;
    }
}

@media only screen and (max-width: 675px) {
    header {
        margin-top: 0;
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    nav {
        position: static;
        width: 9rem;
        height: auto;
        margin: 1% 0 0 35%;
        transform: none;
        z-index: 1;
        display: flex;
        justify-content: center;
        border-radius: .5rem;
        background-color: rgb(174, 254, 174);
        order: -1;
    }

    nav a svg {
        width: 40px;
        height: 40px;
    }

    .back-text {
        font-size: .9rem;
    }

    .back-arrow:hover {
        border: 0;
        background: none;
        color: rgb(0, 0, 0);
    }

    .back-arrow:active {
        border: 0;
        background: linear-gradient(120deg, #000000, #2278e9, #000000, #2278e9);
        color: rgb(255, 255, 255);
    }

    /* Let the content take full width; remove sidebar gap */
    .info-demo {
        width: 100%;
        display: flex;
        flex-direction: column-reverse;
        align-items: center;
    }

    .main-demo {
        width: 90%;
        margin: 1rem 0 0 0;           /* no left margin */
    }

    footer .equalizer {
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
}