* {
    font-family: "Montserrat", sans-serif;
    font-optical-sizing: auto;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

h1 {
    text-align: center;
    flex-direction: column;
    align-items: center;
}

header{
    max-height: 100vh;
    weight: auto;
    padding-bottom: 3vh;
}

form input {
    background-color: aliceblue;
}

#circle {
    position: absolute;
    width: 40px;
    height: 40px;
    background: red;
    border-radius: 50%;
    pointer-events: none;
}

/* HERO */
.hero {
    display: flex;
    height: 90vh;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #5B73FF;
    background: linear-gradient(182deg, rgba(91, 115, 255, 1) 0%, rgba(53, 106, 204, 1) 100%);
    justify-content: center;
    padding: 2rem;
}
.hero img {
    width: clamp(80px, 12vw, 140px);
    height: auto;
}

.hero > p {
    text-align: center;
}

.hero-buttons {
    display: grid;
    grid-template-rows: repeat(3, 1fr);
}

.btn {
    display: flex;
    border-radius: 5px;
    margin: 0.5rem;
    padding: 0.75rem 1.5rem;
    height: auto;
    width: auto;
    padding-left: calc(1.5rem + 6px);
    text-align: center;
    flex-direction: column;
    align-items: center;
    border-left: 6px solid white;
    color: white;
    text-decoration: none;
    transition: all 0.5s ease-in-out;
}

.btn:hover {
    color: #356ACC;
    background: linear-gradient(82deg, rgba(255, 255, 255, 1) 73%, rgba(255, 255, 255, 0) 100%);
}

.contact-button {
    display: flex;
    align-items: center;
    height: 1rem;
    padding: 1rem;
    margin-top: 1.5rem;
    border-radius: 5px;
    transition: all 1s ease;
    border: 1px solid #ffffff;
    background: #ffffff;
}

.contact-button:hover {
    background: #356ACC;
    border-color: #ffffff;
}

.contact-button > a {
    text-decoration: none;
    color: #356ACC;
    transition: all 0.2s ease;
}

.contact-button > a:hover {
    color: white;
}

.second-btn {
    display: flex;
    border-radius: 5px;
    margin: 0.5rem;
    padding: 0.75rem 1.5rem;
    height: auto;
    width: auto;
    padding-left: calc(1.5rem + 6px);
    text-align: center;
    flex-direction: column;
    align-items: center;
    border-left: 6px solid white;
    color: white;
    transition: all 0.3s;
}

/* SKILLS */
.skills {
    padding: 3rem;
    background: linear-gradient(184deg, rgba(53, 106, 204, 1) 55%, rgba(255, 255, 255, 0) 90%);
}

.skills > h2 {
    color: aliceblue;
    border-left: 3px solid;
    padding-left: 2rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.skill {
    color: #ffffff !important;
    border: solid 1px #f8f8f8;
    padding: 1.5rem 1.5rem 1.5rem 2rem;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.skill:hover {
    color: #356ACC !important;
    border: solid 1px #f8f8f8;
    background-color: #f8f8f8;
}

/* PORTAFOLIO */
#portafolio {
    align-self: center;
    height: auto;
    width: auto;
    padding: 1.7rem;
}

.portafolio {
    display: block;
    color: #356ACC;
}

.portafolio-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.portfolio-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    min-width: 0;
}

.project-card {
    width: 100%;
    max-width: 19rem;
    height: 20rem;
    border-radius: 30px;
    overflow: hidden;
    margin: 0 auto 1rem auto;
    box-shadow: -8px 6px 5px 0px rgba(0, 0, 0, 0.24);
    -webkit-box-shadow: -8px 6px 5px 0px rgba(0, 0, 0, 0.24);
    -moz-box-shadow: -8px 6px 5px 0px rgba(0, 0, 0, 0.24);
    transition: all 0.5s ease;
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.project-card:hover {
    opacity: 0.88;
    transform: translateY(-4px);
}

.portfolio-item > h4 {
    text-align: center;
    color: #252525;
    margin-bottom: 1rem;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.5s ease;
    padding: 0 1rem;
    color: #252525;
}

.portfolio-item.active .portfolio-content {
    max-height: 1200px;
    max-width: 100%;
    opacity: 1;
    padding: 1rem;
}

.portfolio-content p,
.portfolio-content h5,
.portfolio-content ul,
.portfolio-content .portfolio-img {
    margin-bottom: 1rem;
}

.portfolio-content p,
.portfolio-content h5,
.portfolio-content li,
.portfolio-content a {
    overflow-wrap: break-word;
    word-break: break-word;
}

.portfolio-content ul {
    padding-left: 1.2rem;
}

.portfolio-content li {
    margin-bottom: 0.75rem;
}

.portfolio-img {
    border-radius: 10px;
    width: 100%;
    max-width: 19rem;
    height: 12rem;
    background-position: center;
}

#port-img-1 {
    background-image: url("img/recalfreno.webp");
    background-size: cover;
}

#port-img-2 {
    background-image: url("img/p2.webp");
    background-size: cover;
}

#port-img-3 {
    background-image: url("img/p3.webp");
    background-size: cover;
}

#port-img-5 {
    background-image: url("img/p5.webp");
    background-size: cover;
}

#port-img-6 {
    background-image: url("img/p6.webp");
    background-size: cover;
}

#port-img-7 {
    background-image: url("img/mkt-1.webp");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

#port-img-8 {
    background-image: url("img/mkt-2.webp");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.pc {
    display: flex;
    align-items: center;
    justify-items: center;
    width: 25rem;
}

/* SOBRE MI */
.sobre-mi {
    display: grid;
    grid-template-columns: 1fr;
}

.sobre-mi img {
    height: 16rem;
    align-self: center;
    justify-self: center;
    padding-bottom: 1rem;
    max-width: 100%;
}

.mi {
    margin: 2rem;
    align-items: center;
}

.mi p,
.mi h4 {
    overflow-wrap: break-word;
    word-break: break-word;
}

/* CONTACTO */
.contacto {
    background-color: #252525;
    color: #ffffff;
    padding: 5rem;
}

footer {
    padding: 2rem;
    background: #5B73FF;
    background: linear-gradient(182deg, rgba(91, 115, 255, 1) 0%, rgba(53, 106, 204, 1) 100%);
}


#second-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-self: center;
    justify-items: center;
    margin: 4rem auto;
    width: 18rem;
    padding: 2rem;
    background: linear-gradient(182deg, rgba(91, 115, 255, 1) 0%, rgba(53, 106, 204, 1) 100%);
    border-radius: 30px;
    box-shadow: -4px 13px 74px 5px rgba(0, 0, 0, 0.60);
    -webkit-box-shadow: -4px 13px 74px 5px rgba(0, 0, 0, 0.42);
    -moz-box-shadow: -4px 13px 74px 5px rgba(0, 0, 0, 0.42);
    overflow: hidden;
    height: auto;
}

#second-section > * {
    min-width: 0;
}

#second-section h2,
#second-section h3,
#second-section h4,
#second-section h5,
#second-section h6,
#second-section p,
#second-section label {
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
}

#second-section form {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    display: grid;
    gap: 0.75rem;
}

#second-section input,
#second-section button {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

#second-section > div {
    margin-right: 0;
    min-width: 0;
}

#second-section > div > h3 {
    text-align: center;
}

#mkt {
    width: 100%;
    height: auto;
    min-width: 0;
    display: flex;
    justify-content: center;
}

#mkt img {
    width: 100%;
    max-width: 220px;
    height: auto;
    display: block;
    object-fit: contain;
}

#checkbox-group {
    display: grid;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

#checkbox-group h3 {
    margin-bottom: 0.25rem;
}

.checkbox-item {
    display: grid;
    grid-template-columns: 18px 1fr;
    column-gap: 10px;
    align-items: start;
    cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 2px 0 0 0;
}

.checkbox-text {
    color: aliceblue;
    line-height: 1.3;
    margin: 0;
    display: block;
}

/* TABLET */
@media (min-width: 768px) {
    .hero img {
        width: 90px;
    }
    .skills {
        margin: 0;
        background-color: rgb(37, 37, 37);
    }

    .skills-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    #portafolio {
        padding: 3rem;
    }

    .portafolio-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
        align-items: start;
    }

    .portfolio-item {
        height: 100%;
    }

    .project-card {
        max-width: 18rem;
        height: 20rem;
    }

    .sobre-mi {
        display: flex;
        align-items: center;
        gap: 2rem;
        padding: 4rem;
    }

    .sobre-mi img {
        height: 12rem;
    }

    .cursor-circle {
        display: block;
    }

    .hero-buttons {
        display: flex;
        width: auto;
        height: auto;
        gap: 1rem;
    }

   #second-section {
        grid-template-columns: 1fr;
        width: min(90%, 32rem);
        padding: 2.5rem;
        margin-bottom: 5rem;
    }

    #mkt {
        height: auto;
    }

    #mkt img {
        max-width: 260px;
    }
}

/* DESKTOP */
@media (min-width: 1024px) {
    .hero {
        height: 85vh;
    }

    #second-section {
        grid-template-columns: 1fr 1.2fr 1fr;
        align-items: start;
        gap: 2rem;
        width: min(92%, 70rem);
        padding: 3rem;
        transition: all 0.6s ease;
    }

    #second-section:hover {
        background: rgb(45, 117, 252);
    }

    #mkt {
        width: 100%;
        height: auto;
    }

    #mkt img {
        width: 100%;
        max-width: 26rem;
        margin: 0 auto;
    }

    .sobre-mi img {
        height: 14rem;
    }

    .portafolio {
        display: grid;
        grid-template-rows: auto 1fr;
        margin-bottom: 5rem;
        color: #356ACC;
    }

    .cursor-circle {
        position: fixed;
        top: 0;
        left: 0;
        width: 60px;
        height: 60px;
        border-radius: 50%;
        pointer-events: none;
        transform: translate(-50%, -50%);
        background: rgba(0, 81, 255, 0.795);
        backdrop-filter: blur(4px) brightness(1.4);
        mix-blend-mode: color-dodge;
        transition: transform 0.1s ease-out;
        z-index: 9999;
    }
}
