* {
    margin: 0px;
    padding: 0px;
}

body {
    background-color: #121212;
}

:root {
    --cube-width: 60px;
    --translateZ: 30px;
}

/* control panels */
#front-listener {
    height: calc(var(--cube-width) * 3);
    width: calc(var(--cube-width) * 3);
    position: absolute;
    transform: translate3d(0,0,calc(var(--cube-width) + (var(--cube-width)/2) + 1px));
}

#front-listener:hover {
    cursor: pointer;
}

#back-listener {
    height: calc(var(--cube-width) * 3);
    width: calc(var(--cube-width) * 3);
    position: absolute;
    transform: translate3d(0,0,calc((var(--cube-width)*(-1)) - (var(--cube-width)/2) - 1px));
}

#back-listener:hover {
    cursor: pointer;
}

#left-listener {
    height: calc(var(--cube-width) * 3);
    width: calc(var(--cube-width) * 3);
    position: absolute;
    transform: rotate3d(0,1,0,90deg) translate3d(0,0, calc((var(--cube-width)*(-1)) - (var(--cube-width)/2) - 1px));
}

#left-listener:hover {
    cursor: pointer;
}

#right-listener {
    height: calc(var(--cube-width) * 3);
    width: calc(var(--cube-width) * 3);
    position: absolute;
    transform: rotate3d(0,1,0,-90deg) translate3d(0,0, calc((var(--cube-width)*(-1)) - (var(--cube-width)/2) - 1px));
}

#right-listener:hover {
    cursor: pointer;
}

#top-listener {
    height: calc(var(--cube-width) * 3);
    width: calc(var(--cube-width) * 3);
    position: absolute;
    transform: rotate3d(1,0,0,-90deg) translate3d(0,0, calc((var(--cube-width)*(-1)) - (var(--cube-width)/2) - 1px));
}

#top-listener:hover {
    cursor: pointer;
}

#bottom-listener {
    height: calc(var(--cube-width) * 3);
    width: calc(var(--cube-width) * 3);
    position: absolute;
    transform: rotate3d(1,0,0,90deg) translate3d(0,0, calc((var(--cube-width)*(-1)) - (var(--cube-width)/2) - 1px));
}

#bottom-listener:hover {
    cursor: pointer;
}

/* hidden top row used for animations */
#hidden-top {
    transform-style: preserve-3d;
    display: none;
}

.hidden-top-row-front {
    transform-style: preserve-3d;
    display: flex;
    transform: translate3d(0px,0px,var(--cube-width));
}

.hidden-top-row-mid {
    transform-style: preserve-3d;
    display: flex;
    transform: translate3d(0px,calc(var(--cube-width) * -1),0px);
} 

.hidden-top-row-back {
    transform-style: preserve-3d;
    display: flex;
    transform: translate3d(0px,calc(var(--cube-width) * -2),calc(var(--cube-width) * -1));
}

/* hidden bottom row used for animations */
#hidden-bottom {
    transform-style: preserve-3d;
    display: none;
}

.hidden-bottom-row-front {
    transform-style: preserve-3d;
    display: flex;
    transform: translate3d(0px,calc(var(--cube-width) * 2),var(--cube-width));
}

.hidden-bottom-row-mid {
    transform-style: preserve-3d;
    display: flex;
    transform: translate3d(0px,var(--cube-width),0px);
} 

.hidden-bottom-row-back {
    transform-style: preserve-3d;
    display: flex;
    transform: translate3d(0px,0px,calc(var(--cube-width) * -1));
}

#main-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: #121212;
    height: 850px;
    width: 100%;
}

#whole-cube-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 350px;
    width: 100%;
    background-color: #121212;
    perspective: 900px;
    perspective-origin: center;
    overflow: hidden;
}

.whole {
    transform-style: preserve-3d;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    animation: spin 10s linear infinite;
}

.side-front {
    transform-style: preserve-3d;
    display: flex;
    position: absolute;
    transform: translate3d(0,0,var(--cube-width));
}

.side-middle {
    transform-style: preserve-3d;
    position: absolute;
    display: flex;
}

.side-back {
    transform-style: preserve-3d;
    display: flex;
    position: absolute;
    transform: translate3d(0,0,calc((-1)*var(--cube-width)));
}

/* columns starting from left to right */
.column-1 {
    transform-style: preserve-3d;
}

.column-2 {
    transform-style: preserve-3d;
}

.column-3 {
    transform-style: preserve-3d;
}

/* cubes */
.cube {
    transform-style: preserve-3d;
    height: var(--cube-width);
    width: var(--cube-width);
}


.cube-face {
    height: var(--cube-width);
    width: var(--cube-width);
    position: absolute;
    /* outline: 1px black solid; */
}

.front {
    background-color: green;
    transform: translate3d(0,0,var(--translateZ));
}

.back {
    background-color: blue;
    transform: rotate3d(0,1,0,180deg) translate3d(0,0,var(--translateZ));
}

.left {
    background-color: red;
    transform: rotate3d(0,1,0,-90deg) translate3d(0,0,var(--translateZ));
}

.right {
    background-color: orange;
    transform: rotate3d(0,1,0,90deg) translate3d(0,0,var(--translateZ));
}

.top {
    background-color: yellow;
    transform: rotate3d(1,0,0,90deg) translate3d(0,0,var(--translateZ));
}

.bottom {
    background-color: white;
    transform: rotate3d(1,0,0,-90deg) translate3d(0,0,var(--translateZ));
} 

.disable-dbl-tap-zoom {
    touch-action: manipulation;
}

#button-container {
    display: flex;
    justify-content: center;
}

button {
    width: 100%;
    height: 45px;
    border: none;
    background-color: #121212;
}

button:hover {
    cursor: pointer;
}

.greenBtn {
    color: green;
}

.blueBtn {
    color: blue;
}

.whiteBtn {
    color: white;
}

.yellowBtn {
    color: yellow;
}

.orangeBtn {
    color: orange;
}

.redBtn {
    color: red;
}

footer {
    text-align: center;
    margin-bottom: 15px; 
}

a {
    text-decoration: none;
}

.fa-linkedin {
    position: relative;
    right: 2%;
    color: white;
    transform: scale(0.75);
}

.fa-envelope {
    color: white;
    transform: scale(0.75);
}

.fa-github{
    position: relative;
    left: 2%;
    color: white;
    transform: scale(0.75);
}

@keyframes spin {
    0% {
        transform: rotate3d(1,1,0,0deg);
    }
    100% {
        transform: rotate3d(1,1,0,360deg);
    }
}

@media (min-width: 1200px) {
    :root {
        --cube-width: 90px;
        --translateZ: 45px;
    }

    #main-container {
        flex-direction: row;
        align-items: center;
    }

    #whole-cube-container {
        height: 550px;
        width: 80%;
    }
    
    footer {
        margin-top: 50px;
    }
}