@font-face {
    font-family: 'Oswald';
    src: url('../fonts/Oswald-VariableFont_wght.ttf') format('truetype');
}

*, *:before, *:after {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

html, body {
    padding: 0;
    margin: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Oswald', sans-serif;
    font-size: 1vw;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #171e24;
    /* color: #9ba5ae; */
    color: #fff;
}

@media (min-width: 1025px) {

    ::-webkit-scrollbar {
        width: 10px;
    }

    ::-webkit-scrollbar-track {
        background: #171e24;
    }

    ::-webkit-scrollbar-thumb {
        background: #7eadc8;    
    }

    ::-webkit-scrollbar-thumb:hover {
        background: #fff;
    }

}

a {
    color: #7eadc8;
    text-decoration: none;
}

a:hover {
    color: #fff;
}

#wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 90vw;
    height: 90vw;
    max-width: 90vw;
    max-height: 90vw;
}

/* horizontal */

@media (min-aspect-ratio: 1/1) {
    body {
        font-size: 1vh;
    }
    #wrapper {
        width: 90vh;
        height: 90vh;
        max-width: 90vh;
        max-height: 90vh;
    }
}

#logo {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    font-size: 1.3rem;
    line-height: 1em;
    color: #2E8050;
    justify-content: center;
    align-items: center;
}

#logo img {
    max-width: 100%;
}

#logo p {
    margin: 0.5em 0 0 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#logo img {
    width: 100%;
    height: auto;
}

#logo p span {
    font-size: 0.85em;
    display: block;
    color: #24B34D;
}

#container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    perspective: 10000vw;
    gap: 2em;
    opacity: 1;
    transition: 300ms ease-in-out;
}

#container.zoom {
    opacity: 0;
    transform: rotateX(90deg) rotateY(180deg) rotateZ(180deg);
}

.cube {
    position: relative;
    transform-style: preserve-3d;
    transition: 300ms ease-in-out;
    margin: 1px;
}

.cube.init {
    animation: spinningScale 600ms ease-out;
}

@keyframes spinningScale {
    0% {
        opacity: 0;
        transform: scale(20) rotateZ(0deg);
    }
    80% {
        opacity: 0.8;
        transform: scale(0.5) rotateZ(380deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotateZ(360deg);
    }
}

.cube:hover, .cube.zoom {
    transform: rotateX(90deg) rotateY(180deg);
    z-index: 10;
}

.cube:first-child .face:nth-child(6) {
    cursor: default;
}

.cube .face {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cube .face:nth-child(6) {
    transition: 300ms ease-in-out;
    cursor: pointer;
}

.cube .face:nth-child(1) img {
    width: 40%;
    height: auto;
}

.cube .face span {
    display: block;
    padding: 1em;
    margin-top: -0.3em;
    color: #7eadc8;
    font-size: 6.5em;
    line-height: 1em;
    font-weight: 600;
    opacity: 0;
    transition: 300ms ease-in-out;
}

.cube .face:hover span, .cube .face:active span, .cube.zoom .face span, .cube:hover .face span {
    opacity: 1;
}

.cube.zoom .face:nth-child(6) {
    width: 205% !important;
    height: 205% !important;
    opacity: 1;
}

.badge {
    display: inline-block;
    padding: .35em .4em;
    font-size: 75%;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 10rem;
    background-color: #7eadc8;
    color: #171e24;
    text-transform: uppercase;
}

#zoom-panel {
    width: 0;
    height: 0;
    background-color: #182d39;
    position: fixed;
    z-index: -1;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border: 6em solid #171e24;
    opacity: 0;
    transition: 400ms ease-in-out;
    overflow: hidden;
}

#zoom-panel.active #zoom-panel__container {
    overflow-x: hidden;
    overflow-y: auto;
    width: 100%;
    height: 100%;
}

#zoom-panel.active {
    z-index: 9;
    opacity: 1;
    width: 100%;
    height: 100%;
}

#zoom-panel__content {
    margin: 0 auto;
    width: 60%;
    padding: 2em;
    font-size: 4em;
    line-height: 1.5em;
    opacity: 0;
}

.portfolio #zoom-panel__content { 
    width: 100%;
    padding: 2em 3em;
}

@media (max-width: 1200px) {
    #zoom-panel__content {
        width: 100%;
    }
}

@media (max-width: 1023px) {
    #zoom-panel__content {
        padding: 1em;
        font-size: 6em;
    }
    .portfolio #zoom-panel__content { 
        width: 100%;
        padding: 1em;
    }    
}

#zoom-panel.active #zoom-panel__content {
    animation-delay: 600ms;
    animation: fadein 800ms forwards;
}

@keyframes fadein {
    0% {
        opacity: 0;
        transform: translateY(10vh);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

#zoom-panel__content h1 {
    color: #24B34D;
    margin-top: 1em;
    margin-bottom: 1.5em;
    animation-delay: 1000ms;
    animation: fadein 1000ms forwards;
}

#zoom-panel__content .description > :first-child, #zoom-panel__content #portfolio-grid {
    animation-delay: 1500ms;
    animation: fadein 1500ms forwards;
}

#zoom-panel__content .description > :nth-child(2) {
    animation-delay: 2000ms;
    animation: fadein 2000ms forwards;
}

#zoom-panel__close {
    position: absolute;
    z-index: 10;
    top: 0;
    right: 5em;
}

#zoom-panel__close a {    
    font-size: 15em;
    line-height: 1em;
    text-decoration: none;
    outline: none;
}

#portfolio-grid {
    font-size: 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    margin: -2em;    
}

.portfolio-grid__item {
    flex-basis: 50%;
    padding: 2em;
    background-color: #182d39;
}

@media (max-width: 767px) {
    .portfolio-grid__item {
        flex-basis: 100%;
        padding: 2em;
    }
}

.portfolio-grid__item img {
    width: 100%;
    height: auto;    
    mix-blend-mode: overlay;
    opacity: 0.8;
    transition: 300ms ease-in-out;
}

.portfolio-grid__item img:hover {
    mix-blend-mode: normal;
}

.portfolio-grid__item .caption {
    font-size: 1.2em;
    line-height: 1.5em;
}

.portfolio-grid__item .caption .link {
    color: #fff;
}

.portfolio-grid__item .caption .stack {
    font-size: 0.85em;
    text-transform: uppercase;
}

#bkg {
    position: absolute;
    z-index: 0;
}