:root {
    --font-primary: "Roboto", sans-serif;
    --font-comic: "Comic Neue", cursive;

    --color-bg: #001220;
    --color-bg-opacity-50: #00122080;
    
    --color-text: #dbdbdb;

    --color-secondary: #ae2754;

    --color-white-med: #dbdbdb;
    --color-black: #000000;
    --color-green-med: rgb(31, 156, 0);
    --color-green-dark: rgb(17, 87, 0);
    --color-red-med: rgb(156, 0, 0);
    --color-red-dark: rgb(87, 0, 0);
    --color-grey: rgb(54, 54, 54);
    --color-grey-opacity-50: rgba(83, 83, 83, 0.363);
    --color-softGrey-opacity-50: rgba(182, 182, 182, 0.452);
}

html {
    box-sizing: border-box;
    font-size: 62.5%;
    overflow: hidden;
    max-width: 1920px;
    max-height: 1080px;
}

*,
*:before,
*:after {
    box-sizing: inherit;
    margin: 0;
    padding: 0;
}

/* GLOBAL */
body {
    position: relative;
    margin: 0 auto;
    max-width: 192rem;
    overflow: hidden;
    font-family: var(--font-primary);
    font-size: 2rem;
    background-color: var(--color-bg);
    color: var(--color-text);
    height: 100vh;
    height: calc(var(--vh, 1vh) * 100);  
    
}
body.light {
    --color-bg: #d1b9b9;
    --color-bg-opacity-50: #d1b9b980;
    --color-text: #443737;
}
h1 {
    font-size: 4.8rem;
}
h2 {
    font-size: 6rem;
}
h3 {
    font-size: 2.4rem;
}
img {
    width: 100%;
    height: auto;
}
li {
    list-style: none;
}
p {
    line-height: 1.4;
}
a{
    text-decoration: none;
    color: var(--color-text);
}
.icon {
    width: 2.8rem;
    height: 2.8rem;
}

.title {
    font-weight: 900;
    text-align: center;
    padding-top: 1rem;
}
@media (max-width: 768px) {
    .title {
        font-size: 4.4rem;
    }
}

@media (max-width: 480px) {
    .title {
        padding: unset;
        font-size: 4rem;
    }
}

/* ScrollBar */
* {
    scrollbar-color: var(--color-white-med) rgba(0, 0, 0, 0);
    scrollbar-width: thin;
}
*::-webkit-scrollbar {
    -webkit-appearance: none;
}
*::-webkit-scrollbar:vertical {
    width: 1rem;
}

*::-webkit-scrollbar-button:increment,
*::-webkit-scrollbar-button,
*::-webkit-scrollbar:horizontal {
    display: none;
}
*::-webkit-scrollbar-thumb {
    border-radius: 2rem;
    border: 2px solid var(--color-text);
}

/* LOADING PAGE */
.loading {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    background-color: var(--color-bg);
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
}
.loading p {
    font-size: 5rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-secondary);
    text-shadow: -50px -15px 10px var(--color-black);
    animation: shadowMove 4s ease-in-out 0s infinite normal none;
}
@keyframes shadowMove {
    0% {
        text-shadow: -50px -15px 10px var(--color-black);
    }
    50% {
        text-shadow: 50px -15px 10px var(--color-black);
    }
    100% {
        text-shadow: -50px -15px 10px var(--color-black);
    }
}
/* SHORT HEIGHT */
.shortHeight {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    background-color: var(--color-black);
    justify-content: center;
    align-items: center;
    z-index: 5;
}
.shortHeight__image {
    width: 25%;
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 4;
}

@media (max-height: 485px) {
    .shortHeight {
        display: flex;
    }
}

/* NAVIGATION & BUTTONS*/
.navigation {
    position: absolute;
    display: flex;
    align-items: center;
    height: 100%;
    z-index: 2;
    transition: transform 0.5s ease-in-out 0s;
}

.navigation__controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 1rem;
}
.navigation-forbidden {
    border: var(--color-grey) solid 3px;
    border-radius: 2rem;
    background: repeating-linear-gradient(45deg, var(--color-grey), var(--color-grey) 5px, #e5e5f700 5px, #e5e5f700 25px);
    cursor: not-allowed;
}
.navigation-forbidden:before {
    color: var(--color-white-med);
    content: "FINISH TOUR";
    font-weight: bold;
    transform: rotate(270deg) translateX(10%);
    background-color: var(--color-grey);
    min-width: 13rem;
    padding: 0rem 0.5rem;
    position: absolute;
    top: 50%;
}

.button-control {
    background-color: var(--color-secondary);
    border-radius: 50% 50%;
    border: none;
    width: 4.5rem;
    height: 4.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 2;
    transition: all 0.2s ease-in-out 0s;
}
@media(hover:hover){
    .button-control:hover {
        transform: translateY(-.5rem) scale(1.05);
        box-shadow: 0 0.3rem 0rem var(--color-text);
    }
}

.button-control--theme {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 4;
}
#dropMenu{
    position: absolute;
    top: 0;
    right: 0;
    z-index: 4;
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 50% 0 50% 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--color-secondary);
    cursor: pointer;
    transform: translate(100%,-100%);
    transition:all 0.3s ease-in-out 0s;
}
@media(hover:hover){
    #dropMenu:hover{
        border-radius: 50%;
        top: 1rem;
        right: 1rem;
    }
}


.language {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 6;
    margin: 1rem;
}
.language__icon {
    width: 3rem;
    cursor: pointer;
    border-radius: 20%;
    transition: all 0.2s ease-in-out 0s;
}
.language__icon:hover {
    transform: scale(1.1);
}
@media (max-width: 768px) {
    #mobileJoystick {
        border: solid 4px var(--color-softGrey-opacity-50);
        background-color: var(--color-grey-opacity-50);
        bottom: 2rem;
        right: 2rem;
        width: 10rem;
        height: 10rem;
        border-radius: 50%;
        z-index: 4;
        position: absolute;
    }
    #mobileJoystickCentre {
        background-color: var(--color-grey-opacity-50);
        border: solid 2px var(--color-softGrey-opacity-50);
        width: 4rem;
        height: 4rem;
        border-radius: 50%;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
}
.btn-download {
    width: fit-content;
    height: fit-content;
    display: flex;
    cursor: pointer;
    position: relative;
}
.btn-download__text {
    border: solid 2px var(--color-text);
    padding: 1rem 1.5rem;
    border-radius: 1rem 0 0 1rem;
    font-weight: bold;
    background-color: var(--color-bg);
    transition: all 0.3s ease-in-out 0s;
}
.btn-download__icon {
    width: 4.8rem;
    height: 4.8rem;
    background-color: var(--color-secondary);
    border: solid 2px var(--color-secondary);
    border-radius: 0 1rem 1rem 0;
    padding: 0.5rem;
}
.btn-download__img {
    width: 20rem;
    background-color: var(--color-white-med);
    border-radius: 1rem;
    border: 1px solid var(--color-black);
    position: absolute;
    z-index: -1;
    transform: translate(0, -40%) rotateX(90deg);
    transition: all 0.3s ease-in-out 0s;
}
.btn-download:hover .btn-download__text {
    color: var(--color-secondary);
    border-color: var(--color-secondary);
}
.btn-download:hover .btn-download__img {
    transform: translate(0, 4.8rem) rotateX(0deg);
}

/* SCENE SETTINGS */
.scenes {
    display: flex;
    width: 100%;
    height: 100vh;
    height: calc(var(--vh, 1vh) * 100);
}
section[class^="scene__"] {
    min-width: 100%;
}
/* HOME */
.scene__home {
    padding: 5% 0 0 15%;
}
.home__title {
    font-size: 6rem;
}
.home__title--big {
    font-size: 10rem;
}
@media (max-width: 768px) {
    .home__title {
        width: 80%;
    }
}
@media (max-width: 480px) {
    .scene__home {
        padding: 10% 0 0 8rem;
    }
    .home__title {
        font-size: 4.8rem;
    }
    .home__title--big {
        font-size: 6rem;
    }
}
/* ABOUT */
.about__content {
    height: 60%;
    display: flex;
    align-items: center;
    justify-content: center;
    align-items: center;
    overflow-x: scroll;
}
.about__image {
    width: unset;
    height: unset;
}
.about__text {
    width: 50%;
    background-color: var(--color-bg-opacity-50);
    backdrop-filter: blur(3px);
    border-radius: 1rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (max-width: 768px) {
    .about__image {
        width: 95%;
    }
    .about__text {
        width: 95%;
        text-align: left;
    }
    .about__content {
        width: 95%;
        margin: 0 auto;
        flex-direction: column;
        justify-content: unset;
        text-align: center;
    }
}
@media (max-width: 480px) {
    .about__content {
        height: 85%;
    }
    .about__image {
        width: 75%;
    }
    .about__text p:last-child {
        margin-bottom: 12rem;
    }
}
/* PROJECTS */
.scene__projects {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.projects__content {
    width: 70%;
    height: 70%;
    padding: 2rem;
    border-radius: 1rem;
    overflow-x: scroll;
    position: relative;
    background-color: var(--color-bg-opacity-50);
}
.filter-list {
    max-width: 100%;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem;
}

.filter-list__item {
    cursor: pointer;
    padding: 0.2rem 1rem;
    border: var(--color-text) solid 2.5px;
    border-radius: 0.7rem;
    font-size: 1.6rem;
    font-weight: bold;
    background-color: var(--color-bg-opacity-50);
    transition: all 0.3s ease-in-out 0s;
}
.filter-list__item:hover {
    border-color: var(--color-secondary);
    color: var(--color-secondary);
}
.filterActive {
    border-color: var(--color-secondary);
    color: var(--color-secondary);
}
.projects-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.project__item {
    min-height: 20rem;
    transition: all 0.5s ease-in-out 0s;
    position: relative;
    overflow: hidden;
}
.project__itemOverlay{
    position: absolute;
    top: -50%;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 1rem;
    border: solid 3px var(--color-grey);
    background-color: var(--color-white-med);
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transform: rotateX(-90deg);
    transition: all 0.5s ease-in-out 0s;
}

.project__item:hover .project__itemOverlay{
    transform: rotateX(0deg);
    top: 0;
}
.project__itemLink{
    color: var(--color-grey);
    padding: .5rem 1rem;
    border-radius: 1rem;
    border: solid 2px var(--color-grey);
    font-size: 2rem;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease-in-out 0s;
}
.project__itemGit{
    transition: all 0.3s ease-in-out 0s;
}


@media(hover:hover){
    .project__itemLink:hover, .project__itemGit:hover {
        transform: scale(1.1);
    }
}

.project__item img {
    height: 100%;
    border-radius: 1rem;
}

@media (max-width: 768px) {
    .projects-list {
        grid-template-columns: repeat(2, 1fr);
    }
    .projects__content,
    #projectShadow-top,
    #projectShadow-bottom {
        width: 90%;
    }
}
@media (max-width: 500px) {
    .projects-list {
        grid-template-columns: 1fr;
    }
    .project__item:last-child {
        margin-bottom: 12rem;
    }
}
/* CONTACT */
.contact__content {
    display: flex;
    justify-content: center;
    width: 80%;
    margin: 0 auto;
    gap: 2rem;
    overflow-x: scroll;
}
.contact__content h3 {
    margin: 2rem 0;
}
.contact__information {
    width: 50%;
    padding: 2rem;
    background-color: var(--color-bg-opacity-50);
    backdrop-filter: blur(3px);
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.contact__list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 1rem;
}
.contact__item {
    display: flex;
    padding: 1rem;
    align-items: center;
    justify-content: space-between;
    border: solid 2px var(--color-text);
    border-radius: 1rem;
}
.contact__icon {
    display: flex;
    gap: 1rem;
    font-weight: bold;
}

.contact__medias {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    padding: 1rem;
}
.contact__media {
    width: 5rem;
    height: 5rem;
    background-color: var(--color-white-med);
    border: solid 2px var(--color-text);
    border-radius: 50%;
    padding: 1rem;
    transition: all 0.3s ease-in-out 0s;
}
.contact__media:hover {
    background-color: var(--color-secondary);
    border-color: var(--color-secondary);
    transform: scale(1.1);
}

.contact__location {
    width: 50%;
    padding: 2rem;
    background-color: var(--color-bg-opacity-50);
    backdrop-filter: blur(3px);
    border-radius: 1rem;
}
.contact__location h3 {
    margin: 2rem 0;
}
.contact__map {
    width: 100%;
    border-radius: 1rem;
}
@media (max-width: 768px) {
    .contact__content {
        flex-direction: column;
        width: 95%;
        height: 80%;
        justify-content: unset;
    }
    .contact__information {
        width: 100%;
        padding: 1rem;
    }
    .contact__item {
        flex-direction: column;
        text-align: right;
        align-items: unset;
        gap: 1rem;
    }
    .contact__location {
        width: 100%;
    }
}
@media (max-width: 500px) {
    .contact__map {
        margin-bottom: 12rem;
    }
}

/* CANVAS */
#canvasPlayer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
#canvasCollision {
    position: absolute;
    opacity: 0;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}
#canvasBackground {
    position: absolute;
    z-index: -1;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
#playerImage,
#layer1 {
    display: none;
}

/* DIALOGUE */

.dialogue__box {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--color-white-med);
    border-radius: 50%;
    display: grid;
    place-items: center;
    padding: 4rem;
    padding-bottom: 1rem;
    animation: pop 2s ease-in-out;
    cursor: auto;
}
@keyframes pop {
    0% {
        transform: scale(0) translate(-50%, -50%);
    }
    10% {
        transform: scale(1) translate(-50%, -50%);
    }
    20% {
        transform: scale(0.97) translate(-50%, -50%);
    }
    30% {
        transform: scale(1) translate(-50%, -50%);
    }
   /*  40% {
        transform: scale(0.97) translate(-50%, -50%);
    }
    50% {
        transform: scale(1) translate(-50%, -50%);
    } */
}
.dialogue__text {
    font-family: var(--font-comic);
    font-weight: 900;
    text-align: center;
    min-width: 20rem;
    color: var(--color-black);
}
.dialogue__button {
    margin: 1rem 0 1rem 0;
    padding: 0.3rem 0.7rem;
    font-family: var(--font-primary);
    font-weight: 900;
    font-size: 1.6rem;
    text-transform: uppercase;
    border: solid 2px var(--color-green-dark);
    border-radius: 0.7rem;
    background-color: var(--color-green-med);
    color: var(--color-white-med);
    cursor: pointer;
}
.dialogue__button--red {
    background-color: var(--color-red-med);
    border-color: var(--color-red-dark);
}
.dialogue__button:hover {
    transform: scale(1.1);
}
.dialogue__triangle {
    position: absolute;
    top: 90%;
    right: 50%;
    z-index: -1;
    transform: rotate(-50deg);
    border-top: 2rem solid transparent;
    border-bottom: 2rem solid transparent;
    border-right: 7rem solid var(--color-white-med);
    width: 0;
    height: 0;
}
.dialogue__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    cursor: not-allowed;
    background: radial-gradient(circle at 40% 100%, rgba(255, 0, 0, 0) 30%, var(--color-bg));
}
.dialogue__box--width90 {
    width: 90%;
}
.control__img {
    max-width: 30rem;
    margin: 1rem 2rem 0rem 2rem;
}

/* UTILITIES */
.text-color-secondary {
    color: var(--color-secondary);
}

.font-size-16 {
    font-size: 1.6rem;
}
.font-weight-700 {
    font-weight: 700;
}
.display-none {
    display: none;
}

.zIndexNegative {
    z-index: -1;
}
.translate-right-up{
    transform: translate(110%, -110%);
}

.outView {
    filter: grayscale(100%) blur(2px) brightness(0.5);
    transform: scale(0.95);
}
