@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: "Poppins", sans-serif;
}

:root {
    --color-dark: #524858;
    /* Color principal para textos y elementos oscuros */
    --color-peach: #ffd8c8;
    /* Color secundario para fondos suaves */
    --color-light: #fdf0ea;
    /* Color para fondos claros */
    --color-accent: #ff3131;
    /* Color de acento para llamadas a la acción */
}

html {
    font-size: 62.5%;
    overflow-x: hidden;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: var(--color-dark);
    border-radius: 5px;
    transition: .3s;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent);
}


/* body estilos */

body {
    background-color: var(--color-light);
    color: var(--color-dark);
}

/* header estilos */

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 10%;
    background-color: var(--color-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.header.sticky {
    border-bottom: .1rem solid rgba(0, 0, 0, .2);
}

.logo {
    font-size: 2.5rem;
    color: var(--color-light);
    font-weight: 600;
}

.navbar a {
    font-size: 1.8rem;
    color: var(--color-light);
    font-weight: 500;
    margin-left: 35px;
    transition: .3s;
}

.navbar a:hover,
.navbar a.active {
    color: var(--color-accent);
}

#menu-icon {
    font-size: 3.6rem;
    color: var(--color-light);
    cursor: pointer;
    display: none;
}

/* home section estilos */

section {
    min-height: 100vh;
    padding: 10rem 9% 2rem;
}

.home {
    display: flex;
    justify-content: center;
    align-items: center;
}

.home-img img {
    width: 37vw;
    height: auto;
    mix-blend-mode: multiply;
    animation: floatImage 4s ease-in-out infinite;
}

@keyframes floatImage {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-2.4rem);
    }

    100% {
        transform: translateY(0);
    }
}

.home-content h3 {
    font-size: 3.2rem;
    font-weight: 700;
}

.home-content h3:nth-of-type(2) {
    margin-bottom: 2rem;
}

span {
    color: var(--color-accent);
}

.home-content h1 {
    font-size: 5.6rem;
    font-weight: 700;
    line-height: 1.3;
}

.home-content p {
    font-size: 1.6rem;
    margin: 2rem 0 3rem;
}

.btn {
    display: inline-block;
    padding: 1rem 2.8rem;
    background-color: var(--color-accent);
    border-radius: 4rem;
    box-shadow: 0 0 1rem var(--color-accent);
    font-size: 1.7rem;
    color: var(--color-light);
    letter-spacing: .1rem;
    font-weight: 600;
    transition: .5s ease;
}

.btn :hover {
    box-shadow: none;
}

/* about section estilos */

.about {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 1rem;
    background: var(--color-peach);
    padding: 4rem 7% 2rem;
}

.heading {
    font-size: 5rem;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 700;
}

.about-img {
    position: relative;
    width: 25rem;
    height: 25rem;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-img img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: .2rem solid var(--color-accent);
}

.about-img .circle-spin {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(0);
    width: 110%;
    height: 110%;
    border-radius: 50%;
    border-top: .2rem solid transparent;
    border-bottom: .2rem solid transparent;
    border-left: .2rem solid var(--color-dark);
    border-right: .2rem solid var(--color-dark);
    animation: aboutSpinner 6s linear infinite;
}

@keyframes aboutSpinner {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.about-content {
    text-align: center;
    margin: 0 auto;
}

.about-content h3 {
    font-size: 2.6rem;
    font-weight: 700;
}

.about-content p {
    font-size: 1.6rem;
    margin: 1.5rem 0 2rem;
    color: var(--color-dark);
}

.btn-box.btns {
    display: inline-block;
    width: 15rem;
}

.btn-box.btns a::before {
    background-color: var(--color-accent);
}

.texto-inicial {
    transition: opacity 0.3s ease;
}

.texto-expandido {
    transition: all 0.3s ease;
    overflow: hidden;
    margin: 1rem auto;
    opacity: 0;
    max-height: 0;
    visibility: hidden;
    color: var(--color-dark);
    width: 100%;
    text-align: center;
}

.texto-expandido.mostrar {
    opacity: 1;
    max-height: 1000px;
    margin: 1.5rem 0 2rem;
    visibility: visible;
}

/* educacion seccion estilos */

.education {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    min-height: auto;
    padding-bottom: 5rem;
}

.education .education-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5rem;
}

.education-row .education-column {
    flex: 1 1 40rem;
}

.education-column .title {
    font-size: 2.5rem;
    margin: 0 0 1.5rem 2rem;
}

.education-column .education-box {
    border-left: .2rem solid var(--color-accent);
}

.education-box .education-content {
    position: relative;
    padding-left: 2rem;
}

.education-box .education-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: -1.1rem;
    width: 2rem;
    height: 2rem;
    background: var(--color-accent);
    border-radius: 50%;
}

.education-content .content {
    position: relative;
    padding: 1.5rem;
    border: .2rem solid var(--color-accent);
    border-radius: .6rem;
    margin-bottom: 2rem;
}

.education-content .content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: #ff313165;
    ;
    z-index: -1;
    transition: .5s;
}

.education-content .content:hover::before {
    width: 100%;
}

.education-content .content .year {
    font-size: 1.5rem;
    color: var(--color-accent);
    padding-bottom: .5rem;
}

.education-content .content .year i {
    padding-right: .5rem;
}

.education-content .content h3 {
    font-size: 2rem;
}

.education-content .content h3 a {
    color: var(--color-dark);
    text-decoration: none;
}

.education-content .content h3 a:hover {
    color: var(--color-accent);
}

.education-content .content p {
    font-size: 1.6rem;
    padding: 1rem 0 1.5rem;
}

/* skills section estilos */

.skills {
    min-height: auto;
    padding-bottom: 7rem;
    background: var(--color-peach);
}

.skills .skills-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5rem;
}

.skills-row .skills-column {
    flex: 1 1 40rem;
}

.skills-column .title {
    font-size: 2.5rem;
    margin-bottom: 0 0 1.5rem;
}

.skills-box .skills-content {
    position: relative;
    border: .2rem solid var(--color-accent);
    border-radius: .6rem;
    padding: .5rem 1.5rem;
    z-index: 1;
    overflow: hidden;
}

.skills-box .skills-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: #ff313165;
    z-index: -1;
    transition: .5s;
}

.skills-box .skills-content:hover::before {
    width: 100%;
}

.skills-content .progress {
    padding: 1rem 0;
}

.skills-content .progress h3 {
    font-size: 1.7rem;
    display: flex;
    justify-content: space-between;
}

.skills-content .progress h4 {
    font-size: 1.1rem;
    display: flex;
    justify-content: space-between;
}

.skills-content .progress h3 span {
    color: var(--color-accent);
}

.skills-content .progress .bar {
    height: 2.5rem;
    border-radius: .6rem;
    border: .2rem solid var(--color-accent);
    padding: .5rem;
    margin: 1rem 0;
}

.skills-content .progress .bar span {
    display: block;
    height: 100%;
    border-radius: .3rem;
    background: var(--color-accent);
}

.skills-column:nth-child(1) .skills-content .progress:nth-child(1) .bar span {
    width: 77%;
}

.skills-column:nth-child(1) .skills-content .progress:nth-child(2) .bar span {
    width: 80%;
}

.skills-column:nth-child(1) .skills-content .progress:nth-child(3) .bar span {
    width: 70%;
}

.skills-column:nth-child(1) .skills-content .progress:nth-child(4) .bar span {
    width: 80%;
}

.skills-column:nth-child(1) .skills-content .progress:nth-child(5) .bar span {
    width: 85%;
}

.skills-column:nth-child(2) .skills-content .progress:nth-child(1) .bar span {
    width: 85%;
}

.skills-column:nth-child(2) .skills-content .progress:nth-child(2) .bar span {
    width: 80%;
}

.skills-column:nth-child(2) .skills-content .progress:nth-child(3) .bar span {
    width: 85%;
}

.skills-column:nth-child(2) .skills-content .progress:nth-child(4) .bar span {
    width: 75%;
}

.skills-column:nth-child(2) .skills-content .progress:nth-child(5) .bar span {
    width: 80%;
}

/* contact section estilos */

.contact {
    min-height: auto;
    padding-bottom: 7rem;
}

.contact form {
    max-width: 70rem;
    margin: 0 auto;
    text-align: center;
    background: var(--color-peach);
    padding: 3rem;
    border-radius: 2rem;
    box-shadow: 0 0 1rem rgba(0, 0, 0, 0.1);
}

.contact form .input-box {
    position: relative;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.contact form .input-box .input-field {
    position: relative;
    width: 49%;
    margin: .8rem 0;
}

.contact form .textarea-field {
    position: relative;
    margin: .8rem 0 2.7rem;
}

.contact form .input-field input,
.contact form .textarea-field textarea {
    width: 100%;
    height: 100%;
    padding: 1.5rem 1rem .5rem;
    font-size: 1.6rem;
    color: var(--color-dark);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-bottom: .2rem solid var(--color-accent);
    border-radius: 0.5rem 0.5rem 0 0;
}

.contact form .input-field label {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    font-size: 1.6rem;
    color: var(--color-dark);
    pointer-events: none;
    transition: .3s;
}

.contact form .input-field input:focus~label,
.contact form .input-field input:valid~label {
    top: 0;
    font-size: 1.2rem;
}

.contact form .textarea-field textarea {
    resize: none;
}

.contact form .textarea-field textarea:focus,
.contact form .textarea-field textarea:valid {
    background: white;
    box-shadow: 0 0 0.5rem rgba(0, 0, 0, 0.05);
}

.contact form .barra {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: .2rem;
}

.contact form .barra::before {
    content: '';
    position: absolute;
    width: 0;
    height: 100%;
    background: var(--main-color);
    transition: .3s;
}

.contact form .input-field input:focus~.barra::before,
.contact form .input-field input:valid~.barra::before {
    width: 100%;
}

.contact form .textarea-field textarea:focus~label,
.contact form .textarea-field textarea:valid~label {
    top: 0;
    font-size: 1.2rem;
    color: var(--color-accent);
}

.contact form .input-field input:focus,
.contact form .input-field input:valid,
.contact form .textarea-field textarea:focus,
.contact form .textarea-field textarea:valid {
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 0.5rem rgba(0, 0, 0, 0.05);
}

button.btn {
    cursor: pointer;
}

/* footer section estilos */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: var(--color-dark);
    color: var(--color-light);
    position: relative;
}

.footer-social {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
}

.footer-social a {
    color: #fff;
    font-size: 24px;
    transition: color 0.3s;
}

.footer-social a:hover {
    color: var(--color-accent);
}

.footer-text p {
    font-size: 1.6rem;
}

.footer-iconTop a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: .8rem;
    background: var(--color-accent);
    border-radius: .8rem;
    transition: .5s ease;
}

.footer-iconTop a:hover {
    box-shadow: 0 0 2rem var(--color-accent);
}

.footer-iconTop a i {
    font-size: 2.4rem;
    color: var(--color-light);
}

/* breakpoints responsive */

@media (max-width: 1200px) {
    html {
        font-size: 55%;
    }
}

@media (max-width: 991px) {


    .header {
        padding: 2rem 3%;
        width: 100%;
        box-sizing: border-box;
    }

    section {
        padding: 10rem 3% 2rem;
        width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .home-content,
    .about-content,
    .education-row,
    .skills-row {
        width: 100%;
        max-width: 100%;
    }

    .footer {
        padding: 2rem 3%;
        width: 100%;
        box-sizing: border-box;
    }

    .contact {
        min-height: auto;
        width: 100%;
    }
}

@media (max-width: 768px) {
    #menu-icon {
        display: block;
    }

    .navbar {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 1rem 3%;
        background: var(--color-dark);
        border-top: .1rem solid rgba(0, 0, 0, .2);
        box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .1);
        display: none;
    }

    .navbar.active {
        display: block;
    }

    .navbar a {
        display: block;
        font-size: 2rem;
        margin: 3rem 0;
    }

    .home {
        flex-direction: column;
    }

    .home-content h3 {
        font-size: 2.6rem;
    }

    .home-content h1 {
        font-size: 5rem;
    }

    .home-img img {
        width: 70vw;
        margin-top: 4rem;
    }

    .footer {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
        padding: 3rem 3%;
    }

    .footer-social {
        position: static;
        transform: none;
        justify-content: center;
        margin: 2rem 0;
    }

    .footer-text p {
        font-size: 1.4rem;
    }

    .footer-iconTop {
        margin-top: 1rem;
    }
}

@media (max-width: 450px) {
    html {
        font-size: 50%;
    }

    .contact form {
        padding: 2rem;
        margin: 0 1rem;
    }

    .contact form .input-box {
        flex-direction: column;
    }

    .contact form .input-box .input-field {
        width: 100%;
        margin: 1rem 0;
    }

    .contact form .textarea-field textarea {
        height: 15rem;
    }

    .btn {
        padding: 0.8rem 2.2rem;
        font-size: 1.5rem;
    }
}

@media (max-width: 365px) {
    .home-img img {
        width: 90vw;
    }

    .footer {
        flex-direction: column-reverse;
    }

    .contact form {
        padding: 1.5rem;
    }

    .contact form .input-field input,
    .contact form .textarea-field textarea {
        padding: 1.2rem 0.8rem 0.4rem;
        font-size: 1.4rem;
    }

    .contact form .input-field label {
        font-size: 1.4rem;
    }
}