@keyframes expandfront {
    0% {
        transform: rotateX(0deg) translateZ(3em);
    }
    25% {
        transform: rotateX(0deg) translateZ(6em);
    }
    65% {
        transform: rotateX(0deg) translateZ(3em);
    }
    100% {
        transform: rotateX(0deg) translateZ(3em);
    }
}

@keyframes expandtop {
    0% {
        transform: rotateX(90deg) translateZ(3em);
    }
    30% {
        transform: rotateX(90deg) translateZ(6em);
    }
    70% {
        transform: rotateX(90deg) translateZ(3em);
    }
    100% {
        transform: rotateX(90deg) translateZ(3em);
    }
}

@keyframes expandback {
    0% {
        transform: rotateX(180deg) translateZ(3em);
    }
    35% {
        transform: rotateX(180deg) translateZ(6em);
    }
    75% {
        transform: rotateX(180deg) translateZ(3em);
    }
    100% {
        transform: rotateX(180deg) translateZ(3em);
    }
}

@keyframes expandbottom {
    0% {
        transform: rotateX(270deg) translateZ(3em);
    }
    40% {
        transform: rotateX(270deg) translateZ(6em);
    }
    80% {
        transform: rotateX(270deg) translateZ(3em);
    }
    100% {
        transform: rotateX(270deg) translateZ(3em);
    }
}

@keyframes expandleft {
    0% {
        transform: rotateY(270deg) translateZ(3em);
    }
    45% {
        transform: rotateY(270deg) translateZ(6em);
    }
    85% {
        transform: rotateY(270deg) translateZ(3em);
    }
    100% {
        transform: rotateY(270deg) translateZ(3em);
    }
}

@keyframes expandright {
    0% {
        transform: rotateY(90deg) translateZ(3em);
    }
    50% {
        transform: rotateY(90deg) translateZ(6em);
    }
    90% {
        transform: rotateY(90deg) translateZ(3em);
    }
    100% {
        transform: rotateY(90deg) translateZ(3em);
    }
}

@keyframes rotate {
    from {
        transform:rotateY(0deg);
    }
    to {
        transform:rotateY(360deg);
    }
}

@keyframes shadow {
    0% {
        text-shadow: 0px -5px 25px white;
    }
    50% {
        text-shadow: 0px -10px 30px rgb(207, 207, 207);
    }
    100% {
        text-shadow: 0px -5px 25px white;
    }
}

@keyframes rotateFullRing {
    from {
        transform: rotateY(0deg) rotateZ(0deg);
    }
    to {
        transform: rotateY(360deg) rotateZ(360deg);
    }
}

*{
    box-sizing: border-box;
    padding: 0;
}

.wrapper{
    top: 0;
    left: 0;
    position: absolute;
    margin: auto auto;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 700px;
    background: #000;
    padding: 0;
    overflow: hidden;
}

.outCube{
    animation-duration: 10s;
    animation-iteration-count: infinite;
    transition-timing-function: linear;
    transform-style: preserve-3d;
    animation-name: rotate;
}

.cube{
    transform: rotateX(-45deg) rotateY(30deg);
    transform-style: preserve-3d;
    width: 6em;
    will-change: transform;
}

.side{
    filter: sepia(100%);
    width: 6em;
    height: 6em;
    display: flex;
    border-radius: 5px;
    justify-content: center;
    align-items: center;
    position: absolute;
    background: rgba(255, 255, 255, 0.5);
    animation-duration: 2s;
    animation-iteration-count: infinite;
    transition-timing-function: ease-out;
}

.side:hover{
    filter: drop-shadow(0px 0px 40px #fff);
    background: white;
}

.blackSide{
    background: rgba(40,40,100, 0.5);
}

.whiteSide{
    background:rgba(255,255,255, 0.5);
}

.front{
    transform: rotateX(0deg) translateZ(3em);
    animation-name: expandfront;
    background: linear-gradient(225deg,  rgba(40,40,100, 0.5) 50%, rgba(255, 255, 255, .5) 50%);
}

.top{
    transform: rotateX(90deg) translateZ(3em);
    animation-name: expandtop;
}

.back{
    transform: rotateX(180deg) translateZ(3em);
    animation-name: expandback;
    background: linear-gradient(315deg,  rgba(40,40,100, .5) 50%, rgba(255, 255, 255, .5) 50% );
}

.bottom{
    transform: rotateX(270deg) translateZ(3em);
    animation-name: expandbottom;
}

.left{
    transform: rotateY(270deg) translateZ(3em);
    animation-name: expandleft;
}

.right{
    transform: rotateY(90deg) translateZ(3em);
    animation-name: expandright;
}


.textWrapper{
    position: fixed;
    z-index: 5;
    bottom: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-direction: column;
    font-family: Lato, sans-serif;
    width: 100%;
    font-size: 5em;
    font-weight: lighter;
    transform-style: preserve-3d;
    perspective: 50px;
    z-index: 1;
}

.author{
    position: fixed;
    font-size: 16px;
    color: white;
    margin-left: 52px;
    bottom: 0px;
    font-weight: bold;
}

.author::before{
    content: "by ";
    font-size: 12px;
    color: white;
    font-weight: normal;
}

.text{
    font-family: monospace;
    font-weight: lighter;
    transform-style: preserve-3d;
    color: white;
    font-size: .7em;
    margin-bottom: -.8em;
}

.textShadow{
    font-family: monospace;
    font-weight: lighter;
    text-shadow: 0px -5px 20px white;
    transform-style: preserve-3d;
    transform: rotateX(90deg) rotateY(180deg) rotateZ(180deg);
    animation-duration: .7s;
    animation-iteration-count: infinite;
    transition-timing-function: linear;
    animation-name: shadow;
    margin-bottom: 24px;
}

/*------------------TRIANGLES---------------------------*/

.triangleRing{
    transform-style: preserve-3d;
    width: 6em;
    will-change: transform;
    transform: rotateX(80deg);
    z-index: 2;
}

.row{
    transform-style: preserve-3d;
}

.triup{
    border-bottom: 4.33em solid rgb(143, 143, 143);
}

.tridown{
    border-top: 4.33em solid white;
}

.tri{
    position: absolute;
    width: 0; 
    height: 0; 
    border-left: 2.5em solid transparent;
    border-right: 2.5em solid transparent;
    opacity: 1;
    filter: sepia(100%);
}


.filled{
    border-left: 1.25em solid transparent;
    border-right: 1.25em solid transparent;
}

.tridown.filled{
    border-top: .2em solid white;
}

.triup.filled{
    border-bottom: .2em solid white;
}

#fullRing{
    animation-duration: 20s;
    transition-timing-function: linear;
    animation-name: rotateFullRing;
    animation-iteration-count: infinite;
}