/* https://codepen.io/wwwebneko/pen/XjOZZK */
.open_book {
    position: absolute;
    top: calc(50% - 12.5rem);
    right: calc(50% - 18.5rem);

    width: 37rem;
    height: 25rem;
    perspective: 70rem;

    z-index: 10000;

    display: none;
}
#book--personal__trigger--input:checked ~ .open_book {
    display: unset !important;
}
#book--twitter__trigger--input:checked ~ .open_book {
    display: unset !important;
}
#book--instagram__trigger--input:checked ~ .open_book {
    display: unset !important;
}
#book--github__trigger--input:checked ~ .open_book {
    display: unset !important;
}

.cover {
    position: absolute;

    width: 50%;
    height: 100%;

    background-color: #36354e;
    transform: rotateY(0deg);
}
#book--personal__trigger--input:checked ~ .open_book > .cover {
    background-color: #9d374f;
}
#book--twitter__trigger--input:checked ~ .open_book > .cover {
    background-color: rgb(29, 155, 240);
}
#book--instagram__trigger--input:checked ~ .open_book > .cover {
    background-color: rgb(255, 143, 201);
}
#book--github__trigger--input:checked ~ .open_book > .cover {
    background-color: #363638;
}

.page {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;

    width: calc(50% - 0.5rem);
    height: calc(100% - 1rem);

    background-color: #e9e6c4;
    transform: rotateY(0deg);
    text-align: right;
    font-size: 8px;
    color: #777;
    font-family: monospace;
}

.cover, .page {
    display: inline;
    padding: 1rem;
    transform-origin: 100% 0;
    border-radius: 5px 0 0 5px;
    box-shadow:
            inset 3px 0 20px rgba(0, 0, 0, 0.2),
            0 0 15px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;

    z-index: 10000;
}

.cover.turn {
    animation: bookCover 3s forwards;
}

.page.turn {
    animation: bookOpen 3s forwards;
}

.page:nth-of-type(1) {
    animation-delay: 0.05s;
}
.page:nth-of-type(2) {
    animation-delay: 0.33s;
}
.page:nth-of-type(3) {
    animation-delay: 0.65s;
}
.page:nth-of-type(4) {
    animation-delay: 0.66s;
}
.page:nth-of-type(5) {
    animation: bookOpen20deg 3s forwards;
    animation-delay: 0.99s;
}
.page:nth-of-type(6) {
    animation: bookOpen30deg 3s forwards;
    animation-delay: 1.2s;
}

@keyframes bookOpen {
    30% {
        z-index: 10999
    }
    100% {
        transform: rotateY(180deg);
        z-index: 10999;
    }
}
@keyframes bookCover {
    30% {
        z-index: 10999
    }
    100% {
        transform: rotateY(180deg);
        z-index: 10001;
    }
}
@keyframes bookOpen150deg {
    30% {
        z-index: 10999
    }
    100% {
        transform: rotateY(150deg);
        z-index: 10999;
    }
}
@keyframes bookOpen30deg {
    30% {
        z-index: 10999
    }
    100% {
        transform: rotateY(30deg);
        z-index: 10999;
    }
}
@keyframes bookOpen20deg {
    50% {
        z-index: 10999
    }
    100% {
        transform: rotateY(20deg);
        z-index: 10999;
    }
}

.page_content {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;

    width: 100%;
    height: 100%;

    transform: rotateY(-180deg);
}
.user-image {
    width: 200px;
    height: 200px;

    background-color: rgba(0,0,0,.7);
    border-radius: 50%;

    margin-bottom: 15px;
}
.profile-link {
    font-size: large;
}
.contact-link {

}
.pencil {
    width: 100px;
    height: 100px;
    fill: rgba(0,0,0,.7);
}
#book--personal__trigger--input:checked ~ .open_book > .page > .page_content--personal,
#book--twitter__trigger--input:checked ~ .open_book > .page > .page_content--twitter,
#book--instagram__trigger--input:checked ~ .open_book > .page > .page_content--instagram,
#book--github__trigger--input:checked ~ .open_book > .page > .page_content--github {
    display: flex;
}
