﻿/*------------------------------- generales -------------------------------*/
/*#region*/


:root {
    --dark: #0e0e12;
    --bg-dark: #15161a;
    --blue-dark: #0e1334;
    --blue-light: #181e2f;
    --purple: #3131a7;
    --light-green: #217057;
    --green: #0d5f5a;
    --white: #fff;
    --text: #a1a1a3;
}


*,
*::before,
*::after {
    padding: 0;
    margin: 0;
    text-decoration: none;
    list-style: none;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    line-height: 1.5;
}

html {
    font-size: 62.5%;
}

body {
    font-size: 1.6rem;
    background-color: var(--bg-dark);
    color: var(--text);
    font-family: "Roboto", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
}

    body::-webkit-scrollbar {
        width: 10px;
        /* Tamaño del scroll en vertical */
        height: 10px;
        /* Tamaño del scroll en horizontal */
    }

    /* Ponemos un color de fondo y redondeamos las esquinas del thumb */
    body::-webkit-scrollbar-thumb {
        background: var(--text);
        border-radius: 8px;
    }

        /* Cambiamos el fondo y agregamos una sombra cuando esté en hover */
        body::-webkit-scrollbar-thumb:hover {
            background: var(--text);
            box-shadow: 0 0 2px 1px rgba(0, 0, 0, 0.2);
        }

        /* Cambiamos el fondo cuando esté en active */
        body::-webkit-scrollbar-thumb:active {
            background-color: var(--text);
        }

    /* Ponemos un color de fondo y redondeamos las esquinas del track */
    body::-webkit-scrollbar-track {
        background: var(--blue-light);
        border-radius: 0;
    }

        /* Cambiamos el fondo cuando esté en active o hover */
        body::-webkit-scrollbar-track:hover,
        body::-webkit-scrollbar-track:active {
            background: var(--blue-light);
        }

.container {
    margin: 0 auto;
    max-width: 1200px;
}

@media (max-width: 1280px) {
    .container {
        max-width: 92%;
    }
}

.flex {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.grid {
    display: grid;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

section {
    min-height: 100vh;
    position: relative;
    z-index: 10;
}

h2 {
    color: var(--white);
    font-size: 3.2rem;
}

    h2:hover {
        color: var(--white);
        transition: all 0.3s ease;
    }

img {
    max-width: 100%;
    height: auto;
    display: block;
}











.btn {
    color: var(--white);
    padding: 0.8rem 3rem;
    border-radius: 2.5rem;
    font-size: 1.4rem;
    font-weight: 700;
    transition: all ease 0.2s;
    cursor: pointer;
    white-space: nowrap;
    vertical-align: middle;
    -ms-touch-action: manipulation;
    touch-action: manipulation;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    background-image: none;
    border: 1px solid transparent;
}

.btn-lg {
    background-color: var(--green);
}

    .btn-lg:hover {
        background-color: var(--light-green);
    }









.form-control {
    display: block;
    width: 100%;
    height: 3.5rem;
    padding: 0.8rem 1.5rem;
    line-height: 1.42857143;
    background-color: #fff;
    background-image: none;
    border: 1px solid #ccc;
    border-radius: 3rem;
    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
    -webkit-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
    -o-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
    -webkit-transition: border-color ease-in-out 0.15s, -webkit-box-shadow ease-in-out 0.15s;
    transition: border-color ease-in-out 0.15s, -webkit-box-shadow ease-in-out 0.15s;
    transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
    transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s, -webkit-box-shadow ease-in-out 0.15s;
}

    .form-control:focus {
        border-color: var(--light-green);
        outline: 0;
        -webkit-box-shadow: inset 0 10px 10px rgba(0, 0, 0, 0.075), 0 0 16px var(--light-green);
        box-shadow: inset 0 10px 10px rgba(0, 0, 0, 0.075), 0 0 16px var(--light-green);
    }

    .form-control::-moz-placeholder {
        color: #999;
        opacity: 1;
    }

    .form-control:-ms-input-placeholder {
        color: #999;
    }

    .form-control::-webkit-input-placeholder {
        color: #999;
    }

    .form-control::-ms-expand {
        background-color: transparent;
        border: 0;
    }

    .form-control[disabled],
    .form-control[readonly],
    fieldset[disabled] .form-control {
        background-color: #eee;
        opacity: 1;
    }

    .form-control[disabled],
    fieldset[disabled] .form-control {
        cursor: not-allowed;
    }

textarea.form-control {
    height: auto;
}

textarea {
    resize: none;
    border-radius: 1rem !important;
    font-family: "Roboto", sans-serif;
}



.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.btn-up {
    position: fixed;
    right: 3rem;
    bottom: 3rem;
    border-radius: 50%;
    padding: 0;
    width: 3.5rem;
    height: 3.5rem;
    background-color: var(--green);
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transition: all ease 0.5s;
}

    .btn-up.visible {
        opacity: 1;
        visibility: visible;
    }

    .btn-up:hover {
        background-color: var(--light-green);
        transform: scale(1.2);
    }

    .btn-up svg {
        fill: var(--white);
        width: 30px;
        height: 30px;
    }

/*#endregion*/





/*------------------------------- header -------------------------------*/
/*#region*/

nav.flex {
    justify-content: space-between;
    position: relative;
    padding: 0.5rem;
}

.menu-icons {
    display: none;
}

.nav-brand {
    color: var(--white);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 2px;
    padding: 1rem;
    transition: all 0.3s ease;
    position: relative;
}

    .nav-brand:hover {
        color: var(--text);
    }

    .nav-brand::after,
    .nav-brand::before {
        content: '';
        display: block;
        position: absolute;
        width: 10%;
        height: 20%;
        border: 2px solid;
        transition: all 0.6s ease;
        border-radius: 2px;
    }

    .nav-brand::after {
        bottom: 0;
        right: 0;
        border-top-color: transparent;
        border-left-color: transparent;
        border-bottom-color: #FFF;
        border-right-color: #FFF;
    }

    .nav-brand::before {
        top: 0;
        left: 0;
        border-bottom-color: transparent;
        border-right-color: transparent;
        border-top-color: #FFF;
        border-left-color: #FFF;
    }

    .nav-brand:hover:after,
    .nav-brand:hover:before {
        width: 100%;
        height: 100%;
    }




.menu {
    gap: 2rem;
    transition: all ease-in-out 0.5s;
}

    .menu li {
        display: flex;
        position: relative;
    }

    .menu a {
        color: var(--text);
        padding: 1rem;
        transition: all 0.3s ease;
        border-radius: 5px;
    }

        .menu a:hover {
            color: var(--white);
            background-color: var(--blue-light);
        }


@media (max-width: 700px) {
    header {
        background-color: var(--bg-dark);
        box-shadow: 0px 2px 12px rgba(100, 100, 100, 0.5);
    }

    .menu-icons {
        display: block;
        border-radius: 5px;
    }

        .menu-icons span {
            cursor: pointer;
            padding: 0.5rem;
            display: flex;
            align-items: center;
            transition: all ease 0.5s;
            border-radius: 5px;
        }

            .menu-icons span.active {
                background-color: var(--text);
                svg {
                    fill: var(--bg-dark);
                }
            }

.menu {
    flex-basis: 100%;
    display: block;
    width: 100%;
    height: 0;
    overflow: hidden;
}

    .menu li {
        display: grid;
        margin-bottom: 1rem;
    }

}

/*#endregion*/






/*---------------------------------------- home ------------------------------------------------*/
/*#region*/

section#home {
    min-height: calc(100vh - 60px);
}

.home-container {
    gap: 5rem;
}

    .home-container img {
        max-width: 20rem;
        border-radius: 50%;
        border: 2px solid var(--white);
    }

.home-col h1 {
    font-size: 3.2rem;
    color: var(--white);
}

.home-col h2 {
    font-size: 2.5rem;
    color: var(--text);
}

.home-col button {
    margin-top: 1rem;
    gap: 0.5rem;
}

@media (max-width: 680px) {
    .home-container {
        display: grid;
    }

    .home-col {
        text-align: center;
    }

        .home-col:first-of-type {
            display: flex;
            justify-content: center;
        }

    .home-col button {
        display: inline-flex;
    }

    .home-container img {
        max-width: 15rem;
    }
}

/*#endregion*/






/*------------------------------- acerca de -------------------------------*/
/*#region*/

.acerca-de-container {
    margin: 5rem 0;
}

.about-container {
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
}

.about-text p span {
    font-weight: 700;
    color: var(--white);
}

.about-text p:last-child {
    margin-top: 1rem;
}

.about-image img {
    max-width: 40rem;
}

@media (max-width: 900px) {
    .about-container {
        margin-top: 3rem;
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 700px) {
    .about-image img {
        max-width: 70%;
    }
}

@media (max-width: 500px) {
    .about-image img {
        max-width: 80%;
    }
}

/*#endregion*/






/*------------------------------- habilidades -------------------------------*/
/*#region*/

#habilidades {
    margin: 2rem 0;
    text-align: center;
}

.habilidades-container p {
    margin-top: 5rem;
    margin-bottom: 5rem;
}

.habilidades-grid {
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: stretch;
}

.habilidades-column {
    background: var(--dark);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
}

    .habilidades-column.animation {
        animation: fadeIn 0.8s ease-in-out;
        opacity: 1;
    }

    .habilidades-column:hover {
        transform: translateY(-10px);
        box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
    }

    .habilidades-column h3 {
        color: var(--white);
    }

.habilidades-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

    .habilidades-list li {
        margin: 10px 0;
        font-size: 1.6rem;
        position: relative;
        padding-left: 2rem;
        animation: slideIn 0.5s ease-in-out;
        display: flex;
        align-items: center;
        color: var(--white);
    }

        .habilidades-list li::before {
            content: "✔";
            position: absolute;
            left: 0;
            color: var(--green);
            font-size: 2rem;
        }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 768px) {
    .habilidades-grid {
        grid-template-columns: 1fr;
    }
}

/*#endregion*/






/*------------------------------- portafolio -------------------------------*/
/*#region*/

.portafolio-container {
    margin: 2rem 0;
}

.portafolio-content {
    justify-content: space-evenly;
    row-gap: 5rem;
    margin-top: 2rem;
}

    .portafolio-content .item {
        flex-basis: calc(33.33% - 3rem);
        width: auto;
        min-width: 350px;
        padding: 8px;
        padding-bottom: 1rem;
        border-radius: 1rem;
        transition: all 0.3s ease;
        box-shadow: 1px 1px 5px 4px rgba(49, 49, 167, 0.2);
        cursor: pointer;
        opacity: 0;
        background-color: var(--bg-dark);
    }

    .portafolio-content .item-animation {
        animation: portafolio-animation 1.5s linear;
        -webkit-animation: portafolio-animation 0.5s linear;
        -moz-animation: portafolio-animation 0.5s linear;
        -o-animation: portafolio-animation 0.5s linear;
        -ms-animation: portafolio-animation 0.5s linear;
        opacity: 1;
    }

@keyframes portafolio-animation {
    0% {
        opacity: 0;
        transform: translateX(-50px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}


@media (max-width: 1100px) {
    .portafolio-content .item {
        flex-basis: calc(50% - 3rem);
    }
}

@media (max-width: 780px) {
    .portafolio-content {
        justify-content: center;
    }

        .portafolio-content .item {
            flex-basis: calc(100%);
            min-width: auto;
        }
}

.portafolio-content .item div {
    overflow: hidden;
}

.portafolio-content .item:hover {
    box-shadow: 3px 4px 16px 10px rgba(50, 50, 100, 0.4);
}

.portafolio-content img {
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.portafolio-content .item-animation:hover img {
    transform: scale(1.15);
}

.portafolio-content span {
    margin-top: 1rem;
    margin-left: 2rem;
    display: inline-block;
    color: var(--text);
}

/*#endregion*/






/*------------------------------- contacto -------------------------------*/
/*#region*/

section#contacto {
    min-height: calc(100vh - 54px);
}

.contact-container {
    flex: 1;
    grid-template-columns: 1fr 1fr;
    margin: 7rem 0;
}

.contact-col {
    gap: 2rem;
}

    .contact-col h2 {
        flex-basis: 100%;
    }

    .contact-col img {
        max-width: 18rem;
        opacity: 0;
        visibility: hidden;
    }

    .contact-col.animation img {
        animation: contacto-animation 1.5s linear;
        -webkit-animation: contacto-animation 0.8s linear;
        -moz-animation: contacto-animation 0.8s linear;
        -o-animation: contacto-animation 0.8s linear;
        -ms-animation: contacto-animation 0.8s linear;
        opacity: 1;
        visibility: visible;
    }

@keyframes contacto-animation {
    0% {
        opacity: 0;
        visibility: hidden;
        transform: translateY(50px);
    }

    100% {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}


.contact-container h2 {
    text-align: center;
}

#contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
}

.form-column {
    flex: 1;
    min-width: 200px;
}

.contact-container label {
    display: block;
    margin-bottom: 0.5rem;
}

.contact-container button {
    margin-top: 0.5rem;
}

@media (max-width: 950px) {

    section#contacto,
    section#portafolio {
        margin: 5rem 0;
    }

    .contact-container {
        grid-template-columns: 1fr;
        margin: 0 auto;
    }
}

@media (max-width: 600px) {
    .contact-col h2 {
        font-size: 2.5rem;
    }

    .contact-col img {
        max-width: 15rem;
    }

    .contact-container button {
        width: 100%;
    }
}

/*#endregion*/






/*------------------------------- footer -------------------------------*/
/*#region*/

footer {
    text-align: center;
}

    footer p {
        padding: 1.5rem 0;
    }


/*#endregion*/






/*---------------------------------------- Sweet alert ------------------------------------------------*/
/*#region*/

.swal2-popup.swal2-toast .swal2-title {
    font-size: 1.8rem !important;
    margin: 0.2rem 1rem !important;
}

.swal2-popup.swal2-toast .swal2-html-container {
    font-size: 1.3rem !important;
}

/*#endregion*/





/*---------------------------------------- Loading ------------------------------------------------*/
/*#region*/

.loader-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    z-index: 10000;
    background-color: rgba(0, 0, 0, 0.6);
}

.loader-container-active {
    display: block;
}

.loader {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: inline-block;
    position: relative;
    border: 3px solid;
    border-color: #FFFFFF #FFFFFF transparent transparent;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

    .loader::after,
    .loader::before {
        content: '';
        box-sizing: border-box;
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        bottom: 0;
        margin: auto;
        border: 3px solid;
        border-color: transparent transparent var(--green) var(--green);
        width: 50px;
        height: 50px;
        border-radius: 50%;
        box-sizing: border-box;
        animation: rotationBack 0.5s linear infinite;
        transform-origin: center center;
    }

    .loader::before {
        width: 40px;
        height: 40px;
        border-color: var(--blue-light) var(--blue-light) transparent transparent;
        animation: rotation 1.5s linear infinite;
    }

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes rotationBack {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(-360deg);
    }
}


/*#endregion*/
