body {
    background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.6)),
    url("../img/learning.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center;
    background-attachment: fixed;
}

#page-menu .menu li a.timeline.active {
    border-bottom: 5px solid #1e283c;
    font-size: 2.2rem;
    animation-name: active-menu;
    animation-duration: 3s;
}

@keyframes active-menu {
    from {
        border-bottom: 0 solid #1e283c;
        font-size: 1.3rem;
    }
    to {
        border-bottom: 5px solid #1e283c;
        font-size: 2.2rem;
    }
}

section {
    padding-bottom: 0;
}

.flex-container {
    justify-content: center;
}

article h3 {
    color: orange;
    text-shadow: #0d111e 0 0 2px, #0d111e 0 0 2px, #000 0 0 2px,
    #000 0 0 2px, #0d111e 0 0 2px, #0d111e 0 0 2px;
    font-style: italic;
    text-align: center;
    margin-bottom: 20px;
}

.flex-container img {
    width: auto;
}

.flex-container img:first-of-type {
    animation: 2s ease 0s normal forwards 1 fade-in;
}

@keyframes fade-in {
    0% {
        opacity: 0;
    }
    80% {
        opacity: 1;
    }
    100% {
        opacity: 1;
    }
}

.scene-wrapper {
    display: flex;
    width: 60%;
    position: relative;
    overflow: visible;
    text-align: center;
    animation: 1s forwards showing-wrapper;
}

@keyframes showing-wrapper {
    0% {
        opacity: 0;
        min-height: 0;
    }
    66% {
        opacity: 0;
        min-height: 0;
    }
    100% {
        opacity: 1;
        min-height: 500px;
    }
}

article#schools .flex-container {
    padding-top: 40px;
}

.scene {
    width: 95%;
    height: 80%;
    perspective: 400px;
    position: absolute;
    padding-top: 30px;
}

.scene > .custom-card {
    background-color: black;
    width: 100%;
    height: 100%;
    margin: 10px;
    padding: 10px;
    border: 5px solid orange;
    border-radius: 20px;
    backface-visibility: hidden;
    color: #FFFFFF;
    box-shadow: 12px 12px 2px 1px rgba(0, 0, 255, .2);

    transition: transform 1s;
    cursor: pointer;
    position: relative;
    transform: rotateY(40deg);

}

.scene > .custom-card img {
    width: 15%;
}

.scene > .custom-card h4 {
    font-size: 1.3rem;
    text-shadow: -0.5px -0.5px 0 orange,
    0.5px -0.5px 0 orange,
    -0.5px 0.5px 0 orange,
    0.5px 0.5px 0 orange;
}

.scene > .custom-card p.year {
    margin-bottom: 60px;
}

.scene > .custom-card p:last-of-type {
    font-size: 1rem;
    font-style: italic;
}

.scene > .custom-card.remove-flipped {
    transition-delay: 2s;
    transform: rotateY(0deg);
}

.scene.face-movement {
    transform: perspective(400px) translate3d(-50px, -30px, 80px);
    transition-duration: 4s;
    animation: zIndex 5s forwards;
}

@keyframes zIndex {
    20% {
        z-index: 0;
    }
    90% {
        z-index: 10;
    }
    100% {
        z-index: 10;
    }
}

div.workplace-wrapper {
    text-align: center !important;
    width: 350px;
    height: 340px;
    position: relative;
}

div.workplace-wrapper h4 {
    transform: translateY(110px);
    animation: workplace-title-animation 3s ease-in-out infinite;
    color: #1e283c;
    text-shadow: -0.5px -0.5px 0 orange,
    0.5px -0.5px 0 orange,
    -0.5px 0.5px 0 orange,
    0.5px 0.5px 0 orange;
    border: 1px solid #1e283c;
    padding: 5px;
    border-radius: 10px;
    background-color: #d3d3d3;

    z-index: 500;
    position: absolute;
    left: 10%;
    right: 10%;
    text-align: center;
}

div.workplace-wrapper .details {
    border-radius: 10px;
    color: orange;
    border: 3px solid orange;
    background-color: #111111;
    padding: 2px;
    transform: translateY(0);
    animation: workplace-details-animation 3s ease-in-out infinite;
    overflow: visible;
    width: 100%;
    position: absolute;
    top: 0;
    text-align: center;
}

div.workplace-wrapper p.task {
    font-size: 19px;
    text-decoration: underline;
    color: #FFFFFF;
    font-style: italic;
}

div.workplace-wrapper p.year {
    font-size: 17px;
}

div.circle-wrapper {
    height: 80%;
    position: relative;
    transform-style: preserve-3d;
    transform: perspective(500px) rotateX(60deg);
}

div.circle-wrapper span {
    position: absolute;
    display: block;
    border: 5px solid orange;
    box-sizing: border-box;
    border-radius: 50%;
    transform: translateY(-20px);
    animation: circle-wrapper-animation 3s ease-in-out infinite;
}

div.circle-wrapper span {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

div.circle-wrapper span:nth-child(1) {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    animation-delay: 0s;
}

div.circle-wrapper span:nth-child(2) {
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    animation-delay: 0.1s;
}

div.circle-wrapper span:nth-child(3) {
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    animation-delay: 0.2s;
}

div.circle-wrapper span:nth-child(4) {
    top: 30px;
    left: 30px;
    right: 30px;
    bottom: 30px;
    animation-delay: 0.3s;
    background-color: #1e283c;
}

/*div.circle-wrapper span:nth-child(5) {
    top: 40px;
    left: 40px;
    right: 40px;
    bottom: 40px;
    animation-delay: 0.4s;
}*/

@keyframes workplace-title-animation {
    0%, 100% {
        transform: translateY(110px);
    }
    50% {
        transform: translateY(70px);
    }
}

@keyframes workplace-details-animation {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-50px);
    }
}

@keyframes circle-wrapper-animation {
    0%, 100% {
        transform: translateZ(-20px);
    }
    50% {
        transform: translateZ(20px);
    }
}

@media screen and (min-width: 576px) {
    article#schools .flex-container {
        padding-top: 58px;
    }

    .scene {
        width: 60%;
    }
}

@media screen and (min-width: 992px) {
    .scene {
        width: 40%;
    }

    .scene > .custom-card h4 {
        font-size: 1.6rem;
    }

    .scene > .custom-card p:last-of-type {
        font-size: 1.3rem;
    }
}