/*CSS Content*/

/*1. Basic*/
/*2. Photo*/
/*3. Icons*/
/*4. Text Heading*/
/*5. Text Onepage*/
/*6. CV Button Wide*/
/*7. Modal Page Recent Works*/
/*8. Optimized CSS for tablet portrait orientation*/
/*9. Optimized CSS for tablet landscape orientation*/
/*10. Optimized CSS for mobile portrait orientation*/
/*11. Optimized CSS for mobile landscape orientation*/
/*12. Animation*/

/*=============Basic=============*/

html,
body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
}

body {
    box-sizing: border-box;
    font-family: 'Roboto Slab', serif;
    font-weight: 100;
    background-color: white;
    width: 100%;
    height: 100%;
}

.frame {
    border: 3vmin solid #0a77f5;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    position: fixed;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    justify-content: center;
    align-content: center;
}

.frame-scroll {
    border: 3vmin solid #0a77f5;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    position: fixed;
    z-index: 0;
}

.frame-scroll-top {
    width: 100%;
    height: 3vmin;
    position: fixed;
    background-color: #0a77f5;
    z-index: 2;
}

.frame-scroll-bottom {
    width: 100%;
    height: 3vmin;
    position: fixed;
    bottom:0;
    background-color: #0a77f5;
    z-index: 2;
}

.container-scroll {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    justify-content: center;
    align-content: center;
    width: 100%;
    height: 100%;
}

/*=============Photo=============*/

.photo {
    background: url('../img/photo.jpg') 50% 50% no-repeat;
    background-size: contain;
    width: 45vmin;
    height: 45vmin;
    border: 0 solid white;
    border-radius: 50%;
    margin: 15vmin 10vmin 5vmin auto;

    opacity: 0;
    animation-name: appearance;
    animation-duration: 1s;
    animation-fill-mode: forwards;
}

/*=============Icons=============*/

.icons {
    width: 45vmin;
    height: 3.5vmin;
    margin: 4vmin 10vmin 10vmin auto;
    text-align: center;
}

.icons a {
    width: 3.5vmin;
    height: 3.5vmin;
    margin: 0 1vmin;
    display: inline-block;
    background-size: contain;

    opacity: 0;
    animation-name: appearance-rotate;
    animation-duration: 0.4s;
    animation-fill-mode: forwards;
}

.icons a:hover {
    filter: drop-shadow(0 0vmin 0.5vmin #0a77f5);
    transition-duration: 0.2s;
}

.icon-inst {
    background: url('../img/ic_inst.svg') no-repeat 50% 50%;

    animation-delay: 1.5s;
}
.icon-in {
    background: url('../img/ic_in.svg') no-repeat 50% 50%;

    animation-delay: 1.5s;
}

.icon-fb {
    background: url('../img/ic_fb.svg') no-repeat 50% 50%;

    animation-delay: 1.4s;
}

.icon-twit {
    background: url('../img/ic_twit.svg') no-repeat 50% 50%;

    animation-delay: 1.3s;
}

/*=============Text Heading=============*/

.text-heading {
    margin: auto auto 0 10vmin;
    max-width: 55vmin;
}

.text-heading h2 {
    font-size: 5.5vmin;
    line-height: 3vmin;
    font-weight: 100;

    opacity: 0;
    animation-name: appearance;
    animation-duration: 0.4s;
    animation-fill-mode: forwards;
}

.text-heading h2:nth-child(2) {
    animation-delay: 0.2s;
}

.text-heading h2:last-child {
    /*text-transform: uppercase;*/
    font-weight: 400;

    animation-delay: 0.4s;
}

.text-heading h2 span {
    color: #0a77f5;
}

/*=============Text Onepage=============*/

.text-onepage {
    margin: 2vmin auto 2vmin 10vmin;
    max-width: 55vmin;
    max-height: 50vmin;
    z-index: 1;
}

.text-onepage p {
    font-family: "Roboto", sans-serif;
    font-weight: 100;
    font-size: 2.4vmin;
    margin: 1.7vmin 0;
    padding: 0;
    line-height: 3.5vmin;

    opacity: 0;
    animation-name: appearance;
    animation-duration: 0.4s;
    animation-fill-mode: forwards;
}

.text-onepage p:first-of-type{
    animation-delay: 0.6s;
}

.text-onepage p:nth-of-type(2) {
    animation-delay: 0.7s;
}

.text-onepage p:nth-of-type(3) {
    animation-delay: 0.8s;
}

.text-onepage p:nth-of-type(4) {
    animation-delay: 0.9s;
}

.text-onepage p:nth-of-type(5) {
    animation-delay: 1s;
}

.text-onepage-btn {
    display: inline-block;
    cursor: pointer;
    position: relative;
    padding: 0 2vmin;
    background-color: #0a77f5;
    font-weight: 400;
    text-decoration: none;
    color: white;
    border: 1px solid #0a77f5;
    border-radius: 4vmin;
    text-align: center;
    outline: none;
    align-self: center;
    z-index: 1;
    transition-duration: 0.3s;
}

.text-onepage-btn::before {
    content: '';
    position: absolute;
    z-index: -1;
    transition-duration: 0.3s;
    width: 0;
    height: 100%;
    top: 0;
    left: 0;
    background: white;
    border-radius: 4vmin;
}

.text-onepage-btn:hover {
    color: #0a77f5;
}

.text-onepage-btn:hover::before,
.text-onepage-btn:active::before {
    width: 100%;
}

/*==============CV Button Wide===============*/

.container-cv-btn {
    margin: 2vmin auto auto 10vmin;
    width: 55vmin;
    display: flex;
}

.cv-button-wide {
    display: inline-block;
    height: 5.5vmin;
    box-sizing: border-box;
    text-transform: uppercase;
    text-decoration: none;
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    padding: 1.25vmin 9vmin 1.25vmin 11vmin;
    font-size: 2.5vmin;
    background: #0a77f5 url('../pic/ic_arrow.svg') no-repeat 7vmin 50%;
    background-size: 2vmin;
    color: white;
    border: 1px solid #0a77f5; /*same color for background and border is made intentionally to prevent border shifting when hover effect applying to button*/
    border-radius: 4vmin;
    text-align: center;
    outline: none;
    margin: auto;
    z-index: 1;
    transition-duration: 0.3s;

    opacity: 0;
    animation-name: appearance;
    animation-duration: 0.4s;
    animation-delay: 1.2s;
    animation-fill-mode: forwards;
}

.cv-button-wide::before {
    content: '';
    position: absolute;
    z-index: -1;
    transition: all 0.3s;
    width: 0;
    height: 100%;
    top: 0;
    left: 0;
    background: white;
    border-radius: 4vmin;
}

.cv-button-wide:hover {
    color: #0a77f5;
}

.cv-button-wide:hover::before,
.cv-button-wide:active::before {
    width: 100%;
    background: white url('../pic/ic_arrow_blue.svg') no-repeat 7vmin 50%;
    background-size: 2vmin;
}

/*=============Modal Page Recent Works=============*/

.modal {
    display: none;
    position: fixed;
    z-index: 2;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    position: relative;
    background-color: #0a77f5;
    color: white;
    font-weight: 400;
    margin: auto;
    padding: 0;
    width: 80vmin;
}

.close-btn-modal {
    color: white;
    position: absolute;
    top: 3vmin;
    right: 9vmin;
    font-size: 7vmin;
    font-weight: 700;
}

.close-btn-modal:hover,
.close-btn-modal:focus {
    color: #999;
    text-decoration: none;
    cursor: pointer;
}

.modal-img {
    display: none;
    text-align: center;
}

.modal-img img {
    width: 100%;
}

.modal-img-prev,
.modal-img-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 2.5vmin;
    margin-top: -5vmin;
    color: white;
    font-weight: 700;
    font-size: 3.5vmin;
    transition: 0.6s ease;
    border-radius: 0 1vmin 1vmin 0;
    user-select: none;
}

.modal-img-next {
    right: 0;
    border-radius: 1vmin 0 0 1vmin;
}

.modal-img-prev:hover,
.modal-img-next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-img p {
    margin: auto;
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    padding: 1.2vmin;
    font-size: 2vmin;
}

.modal-img p a {
    color: white;
    text-decoration: none;
}

/*=============Optimized CSS for tablet portrait orientation=============*/

@media (orientation: portrait) and (min-width: 651px) and (max-width: 1100px) {

    .photo {
        width: 30vmin;
        height: 30vmin;
        margin: 10vmin auto 3vmin auto;
    }

    .icons {
        margin: 3vmin auto 5vmin auto;
        order: 1;
    }

    .text-heading {
        margin: 1vmin auto 3vmin auto;
        width: 60vmin;
        display: flex;
        flex-direction: column;
    }

    .text-heading h2 {
        margin: 2vmin auto;
    }

    .text-onepage {
        margin: 1vmin auto 3vmin auto;
        width: 60vmin;
    }

    .text-onepage p {
        margin: 1vmin auto 3vmin auto;
    }

    .container-cv-btn {
        margin: 1vmin auto 3vmin auto;
    }
}

/*=============Optimized CSS for tablet landscape orientation=============*/

@media (orientation: landscape) and (min-width: 901px) and (max-width: 1400px) {

    .photo {
        width: 35vmin;
        height: 35vmin;
        margin: 25vmin 10vmin 5vmin auto;
    }

    .icons {
        width: 35vmin;
        margin: 4vmin 10vmin 20vmin auto;
    }
}

/*=============Optimized CSS for mobile portrait orientation=============*/

@media (orientation: portrait) and (max-width: 650px) {

    .container-scroll {
        height: auto;
        flex-wrap: nowrap;
    }

    .photo {
        width: 45vmin;
        height: 45vmin;
        margin: 25vmin auto 5vmin auto;
    }

    .text-heading {
        display: flex;
        flex-direction: column;
        max-width: none;
        margin: 5vmin auto 3vmin auto;
    }

    .text-heading h2 {
        font-size: 8vmin;
        line-height: 5vmin;
        margin: 4vmin auto;
    }

    .text-onepage {
        margin: 3vmin auto 5vmin auto;
        width: 80vmin;
        max-width: none;
        max-height: none;
        overflow-x: visible;
    }

    .text-onepage p {
        font-size: 5vmin;
        line-height: 10vmin;
        margin: 3.5vmin 0;
    }

    .text-onepage-btn {
        line-height: 8.5vmin;
        padding: 0 4vmin;
    }

    .container-cv-btn {
        margin: 2vmin auto 8vmin auto;
        width: auto;
    }

    .cv-button-wide {
        height: 12vmin;
        width: 60vmin;
        padding: 3vmin 9vmin 1.5vmin 13vmin;
        font-size: 5vmin;
        background: #0a77f5 url('../pic/ic_arrow.svg') no-repeat 7vmin 50%;
        background-size: 4vmin;
        border-radius: 6vmin;
    }

    .cv-button-wide::before {
        border-radius: 6vmin;
    }

    .cv-button-wide:hover::before,
    .cv-button-wide:active::before {
        background-size: 4vmin;
    }

    .icons {
        width: auto;
        height: auto;
        order: 1;
        margin: 1vmin auto 7vmin auto;
    }

    .icons a {
        width: 8vmin;
        height: 8vmin;
        margin: 0 2vmin;
    }

    .modal-content {
        width: 100%;
        margin: auto 0 auto 0;
    }

    .modal-img p {
        font-size: 3.5vmin;
    }
}

/*=============Optimized CSS for mobile landscape orientation=============*/

@media (orientation: landscape) and (max-width: 900px) {

    body {
        align-items: center;
    }

    .container-scroll {
        align-items: flex-start;
        height: auto;
        flex-wrap: nowrap;
    }

    .photo {
        width: 35vmin;
        height: 35vmin;
        position: fixed;
        margin: 0;
        top: 32%;
        left: 14vmin;
    }

    .text-heading {
        margin: 8vmin 10vmin 1vmin 60vmin;
        width: 50%;
        max-width: none;
    }

    .text-heading h2 {
        font-size: 8vmin;
        line-height: 5vmin;
    }

    .text-onepage {
        margin: 1vmin 10vmin 3vmin 60vmin;
        width: 50%;
        max-width: none;
        max-height: none;
        overflow-x: visible;
    }

    .text-onepage p {
        font-size: 5vmin;
        line-height: 10vmin;
        margin: 3.5vmin 0;
    }

    .text-onepage-btn {
        line-height: 8.5vmin;
        padding: 0 4vmin;
    }

    .container-cv-btn {
        margin: 2vmin 10vmin 8vmin 60vmin;
        width: auto;
    }

    .cv-button-wide {
        height: 10vmin;
        width: 70vmin;
        padding: 2vmin 9vmin 1.5vmin 13vmin;
        font-size: 5vmin;
        background: #0a77f5 url('../img/ic_arrow.svg') no-repeat 11vmin 50%;
        background-size: 4vmin;
        border-radius: 6vmin;
    }

    .cv-button-wide::before {
        border-radius: 6vmin;
    }

    .cv-button-wide:hover::before,
    .cv-button-wide:active::before {
        background-size: 4vmin;
    }

    .icons {
        width: 70vmin;
        height: auto;
        order: 1;
        margin: 1vmin 10vmin 10vmin 60vmin;
    }

    .icons a {
        width: 8vmin;
        height: 8vmin;
        margin: 0 2vmin;
    }

    .modal-content {
        width: 90vmin;
    }

    .modal-img p {
        font-size: 3.5vmin;
    }
}

/*=============Animations=============*/

@keyframes appearance {
    0% {
        transform: scale(1.3);

    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes appearance-rotate {
    0% {
        transform: scale(1.3) rotate(-90deg);

    }
    100% {
        transform: scale(1) rotate(0);
        opacity: 1;
    }
}