@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600&display=swap');

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    font-family: 'Poppins', sans-serif;
    scroll-behavior: smooth;
}

body{
    overflow-x: hidden;
    background-color: #101325;
    color: #fff;
}


:root{
    --item1-transform: translateX(-100%) translateY(-5%) scale(1.5);
    --item1-filter: blur(30px);
    --item1-zIndex: 11;
    --item1-opacity: 0;

    --item2-transform: translateX(0);
    --item2-filter: blur(0px);
    --item2-zIndex: 10;
    --item2-opacity: 1;

    --item3-transform: translate(50%,10%) scale(0.8);
    --item3-filter: blur(10px);
    --item3-zIndex: 9;
    --item3-opacity: 1;

    --item4-transform: translate(90%,20%) scale(0.5);
    --item4-filter: blur(30px);
    --item4-zIndex: 8;
    --item4-opacity: 1;
    
    --item5-transform: translate(120%,30%) scale(0.3);
    --item5-filter: blur(40px);
    --item5-zIndex: 7;
    --item5-opacity: 0;
}


/* Inicio */
.inicio {
    position: relative;
    height: 90vh;
}
.inicio__title {
    text-align: center;
    margin: auto;
    padding: 140px 0 35px;
}

.inicio .inicio__title h2 {
    font-size: 2rem;
}
.inicio .inicio__title h4 {
    margin-top: 10px;
    color: #ccc;
    font-size: 1.3rem;
    font-weight: 300;
    animation: escribir 1.2s steps(60) forwards;
}
@keyframes escribir {
    0% { 
        clip-path: polygon(0 0, 0 0, 0 100%, 0 100%); 
    }
    100% { 
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); 
    }
}

.inicio .inicio__button {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.btn {
    padding: 8px 16px;
    border-radius: 15px;
    border: 1.5px solid #317ad1;
    transition: 0.3s ease;
    color: #ccc;
}
.btn1 {
    background-color: #317ad1;
}

.btn:hover {
    transform: scale3d(1.03);
    background-color: #317ad1;
    color: #eee;
    box-shadow: 0 0 5px #317ad1;
}
.btn1:hover {
    background-color: #2560a4;
}

.inicio__icon {
    text-align: center;
}

.inicio__icon i {
    position: absolute;
    bottom: 15px;
    color: #eee;
    font-weight: 600;
    font-size: 1.15rem;
    animation: arribaAbajo 1.5s infinite;
}

@keyframes arribaAbajo {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}


.servicios {
    padding-bottom: 50px;
}

.servicios__title {
    padding: 80px 0 35px;
}

.servicios__title h3 {
    color: #ccc;
    font-size: 1.5rem;
}

.servicios__content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-flow: row wrap;
    margin: auto;
    gap: 30px;
    margin-bottom: 50px;
}

.servicios__item {
    background-color: #161a32;
    padding: 10px;
    width: 275px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.fade-in {
    animation: fadeIn 1s ease-out forwards;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(50px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}
.hidden {
    opacity: 0;
    visibility: hidden;
}


.servicios__item img {
    width: 64px;
    background-color: #2a3263;
    border-radius: 50%;
    margin: 6px 12px;
    padding: 6px;
    transition: background-color 0.3s;
}
.servicios__item h4 {
    color: #ccc;
    margin: 8px 12px;
    font-size: 1.15rem;
    transition: color 0.3s;
}
.servicios__item p {
    text-align: start;
    margin: 6px 12px;
    font-size: 0.9rem;
    color: #aaa;
    transition: color 0.3s;
}

.servicios__item:hover {
    background-color: #191f36;
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}
.servicios__item:hover img {
    background-color: #2c3769;
}
.servicios__item:hover h4 {
    color: #ddd;
}
.servicios__item:hover p {
    color: #bbb;
}

/* Minecraft */

.minecraft__content {
    padding-bottom: 50px;
}

.minecraft__item {
    width: 300px;
}
.minecraft__item i {
    background-color: #2a3263;
    scale: 1.1;
    border-radius: 50%;
    margin: 6px 12px;
    padding: 10px;
    transition: background-color 0.3s;
}

.minecraft__item h4 {
    font-size: 1.10rem;
}

.minecraft__item p {
    font-size: 0.8rem;
}




/* Skills */

.habilidades {
    padding-bottom: 50px;
}


.slider__content {
    margin-top: 20px;
    width: 50%;
    max-width: 1000px;
    margin-inline: auto;
    position: relative;
    height: 100px;
    overflow: hidden;
    mask-image: linear-gradient(
    to right,
    rgba(0, 0, 0, 0),
    rgba(0, 0, 0, 1) 20%,
    rgba(0, 0, 0, 1) 80%,
    rgba(0, 0, 0, 0)
    );
}

.slider__item {
    display: flex;
    width: 128px;
    height: 100px;
    border-radius: 6px;
    position: absolute;
    left: max(calc(200px * 8), 100%);
    animation-name: scrollLeft;
    animation-duration: 20s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    align-items: center;
    justify-content: center;
}

@keyframes scrollLeft {
    to {
    left: -200px;
    }
}

.slider__item img {
    width: 64px;
}

.item--1 {
    animation-delay: calc(20s / 7.2 * (7 - 1) * -1);
}

.item--2 {
    animation-delay: calc(20s / 7.2 * (7 - 1.6) * -1);
}

.item--3 {
    animation-delay: calc(20s / 7.2 * (7 - 2.2) * -1);
}

.item--4 {
    animation-delay: calc(20s / 7.2 * (7 - 2.8) * -1);
}

.item--5 {
    animation-delay: calc(20s / 7.2 * (7 - 3.4) * -1);
}

.item--6 {
    animation-delay: calc(20s / 7.2 * (7 - 4) * -1);
}

.item--7 {
    animation-delay: calc(20s / 7.2 * (7 - 4.6) * -1);
}

.item--8 {
    animation-delay: calc(20s / 7.2 * (7 - 5.2) * -1);
}

.item--9 {
    animation-delay: calc(20s / 7.2 * (7 - 5.8) * -1);
}

.item--10 {
    animation-delay: calc(20s / 7.2 * (7 - 6.4) * -1);
}

.item--11 {
    animation-delay: calc(20s / 7.2 * (7 - 7) * -1);
}

.item--12 {
    animation-delay: calc(20s / 7.2 * (7 - 7.6) * -1);
}



/* Proyectos */

.carousel{
    position: relative;
    height: 475px;
    overflow: hidden;
    margin-top: -50px;
}
.carousel .list{
    position: absolute;
    width: 1140px;
    max-width: 90%;
    height: 80%;
    left: 50%;
    transform: translateX(-50%);
}
.carousel .list .item{
    position: absolute;
    left: 0%;
    width: 70%;
    height: 100%;
    font-size: 15px;
    transition: left 0.5s, opacity 0.5s, width 0.5s;
}
.carousel .list .item:nth-child(n + 6){
    opacity: 0;
}
.carousel .list .item:nth-child(2){
    z-index: 10;
    transform: translateX(0);
}
.carousel .list .item img{
    width: 50%;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: right 1.5s;
}

.carousel .list .item .introduce{
    opacity: 0;
    pointer-events: none;
}
.carousel .list .item:nth-child(2) .introduce{
    opacity: 1;
    pointer-events: auto;
    width: 400px;
    position: absolute;
    top: 50%;
    transform:  translateY(-50%);
    transition: opacity 0.5s;
}

.carousel .list .item .introduce .topic{
    font-size: 2em;
    font-weight: 500;
    color: #ccc;
}

.carousel .list .item .introduce .des{
    width: 300px;
    font-size: small;
    color: #aaa;
}
.carousel .list .item .introduce .des p {
    padding-bottom: 20px;
}
.carousel .list .item .introduce .des .des__link {
    padding: 8px 16px;
    border-radius: 15px;
    border: 1.5px solid #317ad1;
    transition: 0.3s ease;
    color: #ccc;
}
.carousel .list .item .introduce .des .des__link:hover {
    transform: scale3d(1.03);
    background-color: #2560a4;
    color: #eee;
    box-shadow: 0 0 5px #317ad1;
}

.carousel .list .item:nth-child(1){
    transform: var(--item1-transform);
    filter: var(--item1-filter);
    z-index: var(--item1-zIndex);
    opacity: var(--item1-opacity);
    pointer-events: none;
}
.carousel .list .item:nth-child(3){
    transform: var(--item3-transform);
    filter: var(--item3-filter);
    z-index: var(--item3-zIndex);
}
.carousel .list .item:nth-child(4){
    transform: var(--item4-transform);
    filter: var(--item4-filter);
    z-index: var(--item4-zIndex);
}
.carousel .list .item:nth-child(5){
    transform: var(--item5-transform);
    filter: var(--item5-filter);
    opacity: var(--item5-opacity);
    pointer-events: none;
}


.carousel .list .item:nth-child(2) .introduce .topic,
.carousel .list .item:nth-child(2) .introduce .des{
    opacity: 0;
    animation: showContent 0.5s 1s ease-in-out 1 forwards;
}
@keyframes showContent{
    from{
        transform: translateY(-30px);
        filter: blur(10px);
    }to{
        transform: translateY(0);
        opacity: 1;
        filter: blur(0px);
    }
}
.carousel .list .item:nth-child(2) .introduce .topic{
    animation-delay: 1.2s;
}
.carousel .list .item:nth-child(2) .introduce .des{
    animation-delay: 1.4s;
}
.carousel .list .item:nth-child(2) .introduce .seeMore{
    animation-delay: 1.6s;
}

.carousel.next .item:nth-child(1){
    animation: transformFromPosition2 0.5s ease-in-out 1 forwards;
}
@keyframes transformFromPosition2{
    from{
        transform: var(--item2-transform);
        filter: var(--item2-filter);
        opacity: var(--item2-opacity);
    }
}
.carousel.next .item:nth-child(2){
    animation: transformFromPosition3 0.7s ease-in-out 1 forwards;
}
@keyframes transformFromPosition3{
    from{
        transform: var(--item3-transform);
        filter: var(--item3-filter);
        opacity: var(--item3-opacity);
    }
}
.carousel.next .item:nth-child(3){
    animation: transformFromPosition4 0.9s ease-in-out 1 forwards;
}
@keyframes transformFromPosition4{
    from{
        transform: var(--item4-transform);
        filter: var(--item4-filter);
        opacity: var(--item4-opacity);
    }
}
.carousel.next .item:nth-child(4){
    animation: transformFromPosition5 1.1s ease-in-out 1 forwards;
}
@keyframes transformFromPosition5{
    from{
        transform: var(--item5-transform);
        filter: var(--item5-filter);
        opacity: var(--item5-opacity);
    }
}



.carousel.prev .list .item:nth-child(5){
    animation: transformFromPosition4 0.5s ease-in-out 1 forwards;
}
.carousel.prev .list .item:nth-child(4){
    animation: transformFromPosition3 0.7s ease-in-out 1 forwards;
}
.carousel.prev .list .item:nth-child(3){
    animation: transformFromPosition2 0.9s ease-in-out 1 forwards;
}
.carousel.prev .list .item:nth-child(2){
    animation: transformFromPosition1 1.1s ease-in-out 1 forwards;
}
@keyframes transformFromPosition1{
    from{
        transform: var(--item1-transform);
        filter: var(--item1-filter);
        opacity: var(--item1-opacity);        
    }
}

.arrows{
    position: absolute;
    bottom: 60px;
    width: 100px;
    max-width: 90%;
    display: flex;
    justify-content: space-between;
    left: 50%;
    transform: translateX(-50%);
}
#prev,
#next{
    width: 40px;
    height: 35px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    margin: 0 5px;
    border: 1px solid #2560a4;
    color: #999;
    transition: 0.3s;
    background-color: #101325;
}
#prev:hover,
#next:hover{
    border: 1px solid #317ad1;
    color: #ddd;
}



.menu-hidden {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-visible {
    display: flex;
    flex-direction: column;
    position: fixed; 
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 85%;
    max-width: 1100px;
    height: 80vh;
    background-color: #161a32; 
    border-radius: 15px;
    padding: 40px 20px 20px 20px;
    z-index: 9999;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 
                0 0 0 100vmax rgba(16, 19, 37, 0.85); 
    border: 1px solid #2a3263;
    animation: fadeInModal 0.4s ease forwards;
}

@keyframes fadeInModal {
    from { opacity: 0; transform: translate(-50%, -45%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

.menu-visible button {
    position: absolute;
    top: 15px;
    right: 20px;
    background-color: #2a3263;
    color: #fff;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.menu-visible button:hover {
    background-color: #e74c3c;
    transform: rotate(90deg); 
}

.menus {
    height: 100%; 
    overflow-y: auto;
    padding-right: 10px;
}

.menu-visible .menu__container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    padding-bottom: 20px;
}

.menu-visible .menu__container .container__item {
    background-color: #101325;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border 0.3s ease;
    border: 1px solid transparent;
}

.menu-visible .menu__container .container__item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
    border-color: #317ad1;
}

.menu-visible .menu__container .container__item img {
    width: 100%;
    max-width: 180px;
    height: 100px; 
    object-fit: contain;
    margin-bottom: 15px;
}

.menu-visible .menu__container .container__item h4 {
    color: #eee;
    font-size: 1.1rem;
    margin-bottom: 2px;
}

.item-date {
    font-size: 0.8rem;
    color: #888;
    font-weight: 300;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.menu-visible .menu__container .container__item a {
    padding: 6px 16px;
    border-radius: 8px;
    border: 1.5px solid #317ad1;
    transition: 0.3s ease;
    color: #ccc;
    font-size: 0.9rem;
    margin-top: auto;
}

.menu-visible .menu__container .container__item a:hover {
    background-color: #2560a4;
    color: #eee;
}


.menus::-webkit-scrollbar { width: 8px; }
.menus::-webkit-scrollbar-track { background: #161a32; border-radius: 4px; }
.menus::-webkit-scrollbar-thumb { background: #317ad1; border-radius: 4px; }
.menus::-webkit-scrollbar-thumb:hover { background: #2560a4; }


/* Contacto */

.contacto__content {
    display: flex;
    justify-content: space-evenly;
    flex-flow: row wrap;
    margin: auto;
}
.contacto__item {
    width: 400px;
}

.contacto__item h3 {
    font-size: 1.15rem;
    margin-bottom: 10px;
    color: #eee;
}

.contacto__item p {
    font-size: 0.95rem;
    color: #ccc;
}

.icons__item a{
    display: flex;
    align-items: center;
    margin-top: 20px;
}
.icons__item i {
    margin-right: 10px;
    font-size: 1.20rem;
    background-color: #2c3769;
    padding: 10px;
    color: #eee;
    border-radius: 50%;
    transition: background-color 0.5s;
}
.icons__item .icons__text p{
    color: #ccc;
}
.icons__item .icons__text span{
    color: #ddd;
    transition: color 0.3s;
}
.icons__item:hover .icons__text span {
    color: #317ad1;
}



form {
    background: #191f36;
    padding: 10px 0;
    width: 450px;
    border-radius: 8px;
    position: relative;
    scale: 0.95;
    box-shadow: 0 0 2px #ccc;
}

.form h3 {
    text-align: center;
    margin-bottom: 10px;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 1.35rem;
    padding: 10px;
}
.form-input {
    padding: 6px 20px;
}
input, textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 6px 8px;
    border: 2px solid #6666;
    border-radius: 6px;
    box-shadow: 0 0 15px #0003;
    background-color: transparent;
    color: #ddd;
}
input:focus, textarea:focus {
    border: 2px solid #ddd;
}
textarea {
    min-width: 100%;
    resize: none;
    min-height: 102px;
}

label {
    font-size: 0.88em;
    line-height: 2;
}
.btn {
    cursor: pointer;
}




@media screen and (max-width: 991px) {
    /* Proyectos */
    .carousel .list .item{
        width: 90%;
    }
    .carousel .list .item .introduce .des {
        width: 210px;
    }

    /* Contacto */
    .contacto__item {
        margin-bottom: 30px;
    }
}

@media screen and (max-width: 767px) {
    /* Servicios */
    .servicios__content {
        gap: 10px
    }
    .servicios__item {
        scale: 0.9;
        padding: 8px;
    }
    /* Skills */
    .slider__content {
        width: 80%;
    }

    /* Proyectos */
    .carousel{
        height: 450px;
    }
    .carousel .list .item{
        width: 100%;
        font-size: 10px;
    }
    
    .carousel .list{
        height: 100%;
    }
    .carousel .list .item:nth-child(2) .introduce{
        width: 50%;
    }
    
    .carousel .list .item img{
        width: 40%;
    }
    .carousel .list .item:nth-child(2) .introduce .des{
        height: 100px;
    }
    .arrows{
        bottom: 30px;
    }

    .menu-visible .menu__container .container__item:nth-child(2) img {
        scale: 1;
    }

    .menu-visible {
        height: 65vh;
    }
    .menu-visible .menu__container .container__item {
        width: 275px;
    }

    /* Contacto */
    .contacto__item:first-child {
        margin-left: 10px;
    }
    form {
        width: 350px;
    }
}

@media screen and (max-width: 449px) {
    .menu-visible .menu__container .container__item {
        scale: 0.8;
    }
    .menu-visible .menu__container {
        padding-bottom: 100px;
    }
}

