body {
    background-color: #0f0f0f;
    
    font-family: "Fragment Mono", monospace; 
    font-optical-sizing: auto;

    padding: 4rem 4rem 1rem;
}


header {
    /* container */
    background-color: #f5f5f5c4;
    backdrop-filter: blur(10px);

    border-radius: 5rem;
    padding: 1rem;

    display: flex;
    gap: 2rem;

    position: fixed;
    top: 2%;
    left: 50%;
    transform: translateX(-50%);


    /* text */
    text-align: center;

    /* fade */
    transition: opacity 0.3s ease;

    z-index: 10;
}


header a {
    text-decoration: none;
    color: #0f0f0f;
    
}

header a:hover{
    font-weight: bold;   
    color: rgb(39, 39, 39);

}

footer {
    display: flex;
    justify-content: center;
}

.icon_text {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.icon_text  a{
    display: flex;
    align-items: center;
    gap: .4rem;
    text-decoration: none;
    color: #0f0f0f; 
    
    background-color: #f5f5f5c4;
    border-radius: 5rem;

    padding: 1rem;
}

.icon_text a img {
    height: 20px;
}


.icon_text a:hover {
    font-weight: bold;
    color: #272727;
}

h1 {
    font-size: 4.5rem;
    padding-right: 4rem;
    font-weight: 200;
    text-align: right;
    color: #f5f5f5c4;
}

h2 {
    font-size: 2rem;
    font-weight: 100;
    
    text-align: right;
    color: #ffb657;

}

p {
    color: #f5f5f5;
}


/* special classes */
/* introduction */
.index {
    padding-top: 3rem;
}


.introduction {
    display: flex;
    gap: 2rem;
}

.introduction_content {
    flex: 1;
}

.introduction p {
    padding-bottom: 2rem;
}

.introduction h1,
.introduction h2 {
    text-align: left;
}

.introduction h2 a {
    font-style: italic;
}

.introduction .icon_text {
    justify-content: left;
    padding-bottom: 2rem;
}


.introduction .swiper {
    flex: 3;
}



/* portfolio */
.category {
    padding-bottom: 2.5rem;
}

.category-swiper{
    padding-top: 2rem;
}

.item {
    padding-bottom: 2rem;
}

.item_grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
    width: 100%;
}

.asset_description {
    font-style: italic;
    text-align: right;
}

.asset {
    display: flex;
    justify-content: center;
    align-items: center; /* centra verticalmente */
}

.asset model-viewer {
    width: 100%;
    height: 80vh;
} 

.buttons {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px; 
}

.buttons button {
    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: none;
    border-radius: 50%;
    padding: 0;
    overflow: hidden;

    background-color: #f5f5f5c4;
}

.buttons button:hover {
    background-color: #f5f5f5;
}

.buttons button img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    display: block;
}

.logos {
    display: flex;
    justify-content: right;
    gap: 10px; /* space in between them */
}

.logos img {
    height: 36px;
    object-fit: contain ;
}

/* games */
/* game */
.game_content {
    display: flex;
    align-items: flex-start;
    
    text-align: right;

    gap: 2rem;

    padding: 2rem 0 4rem;

}

.game_description {
    flex: 1;
}

.game_description a {
    font-style: italic;
    text-decoration: none;
    color: inherit;
}

.game_description a:hover {
    font-weight: bold;
}

/* button */
.game_content .icon_text {
    padding-top: 2rem;
    justify-content: end;
}

.game_content .icon_text a {
    font-style: normal;
}


/* video */
.game_video {   
    flex: 3;
    width: 100%;
    aspect-ratio: 16 / 9;

    border: none;
    border-radius: 2rem;
}


/* swiper */
.swiper {
    width: 100%;
    border-radius: 2rem;

    --swiper-theme-color: #f5f5f5c4;
 
}

.game_content .swiper {
    flex: 3;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* mobile */
@media (max-width: 768px) {

    body {
        padding: 5rem 1.5rem 1rem;
        font-size: .9rem;
    }

    /* menu */
    header {
        top: 3%;
    }

    header a {
        font-size: 0;
        width: 24px;
        height: 24px;

        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
    }

    header a:active {
        width: 28px;
        height: 28px;
    }

    header a:nth-child(1) {background-image: url("images/Logo_mail.webp");}

    header a:nth-child(2) {background-image: url("images/Icon_wireframe.webp");}

    header a:nth-child(3) {background-image: url("images/Icon_games.webp");}

    h1 {
        font-size: 1.95rem;
    }

    h2 {
        font-size: 1.2rem;
        text-align: center;
    }

    footer .icon_text{
        flex-direction: column;
    }

    /* special classes */
    /* introduction */
    .index {
        padding-top: 0rem;
    }


    .introduction {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }

    .introduction p {
        padding: 1rem 0 0;        
    }

    .introduction h1,
    .introduction h2 {
        text-align: center;
        padding: 0;
    }

    .introduction h2 a {
        font-style: italic;
    }

    .introduction .icon_text {
        justify-content: center;
        padding: 2rem 0 0;
    }

    .introduction .swiper {
        padding: 0;
    }

    /* contact and hyperlink buttons */
    .icon_text {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 1rem;
    }

    .icon_text a img {
        height: 18px;
    }

    .icon_text a:active {
        font-weight: bold;
        color: #272727;
    }


    /* portfolio */
    .category {
        padding-bottom: 1.8rem;
    }

    /* model viewer */
    .item {
        padding-bottom: 0;
    }

    .item_grid {
        display: flex;
        flex-direction: column;
    }


    .asset {
        flex-direction: column;
    }

    .asset model-viewer {
        height: 30vh;
    } 

    .item_grid .asset model-viewer {
        height: 45vh;
    } 

    .item_grid .asset .aitor {
        height: 75vh;
    } 

    .asset_description {
        text-align: center;
    }

    .buttons {
        flex-direction: row;
        gap: 18px; 
        padding-top: .5rem;
    }

    .buttons button:active {
        background-color: #f5f5f5;
    }

    /* logos */
    .logos {
        justify-content: center;
    }

    .logos img {
        width: 28px;
        height: 28px;
    }

    /* games */
    /* game */
    .game_content {
        flex-direction: column-reverse;
        text-align: center;

        padding: 0 0 4rem;
    }

    .game_description a:active {
        font-weight: bold;
    }

    /* button */
    .game_content .icon_text {
        padding-top: 2rem;
        justify-content: center;
    }

    .game_content .icon_text a {
        font-style: normal;
    }


    /* video */
    .game_video {   
        flex: 3;
        width: 100%;
        aspect-ratio: 16 / 9;

        border: none;
        border-radius: 2rem;
    }


    /* swiper */
    .swiper {
        --swiper-navigation-size: 25px;
    }

}