:root {
    --color-red: #ff0000;
    --color-orange: #ff7f00;
    --color-yellow: #ffff00;
    --color-green: #00ff00;
    --color-blue: #0000ff;
    --color-indigo: #4b0082;
    --color-violet: #9400d3;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Fira Code", monospace;
}

html {
    scroll-behavior: smooth;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    background: #181818;
    color: white;
}

main {
    flex: 1;
}

::selection {
  background: #ff006e;
  color: #ffffff;
}


/* ----------------------------------------------------------------------------------------------- */
/* ----------------------------------------------------------------------------------------------- */
/* ----------------------------------------------------------------------------------------------- */
/* ------------------------------------------ HEADER --------------------------------------------- */
/* ----------------------------------------------------------------------------------------------- */
/* ----------------------------------------------------------------------------------------------- */
/* ----------------------------------------------------------------------------------------------- */

header {
    min-height: 80px;
    width: 100%;
    background: #1f1f1f;
    padding: 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

nav {
    width: 100%;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 40px;
    align-items: center;
    justify-content: center;
}

nav ul li a {
    color: #aaa;
    text-decoration: none;
    font-size: 1.2em;
    padding: 5px 10px 15px;
    position: relative;
    transition: color 0.3s ease-in-out, font-weight 0.3s ease-in-out;
    align-items: center;
    justify-content: center;
}

nav ul li:not(:first-child) a:hover {
    color: #fff;
    font-weight: bold;
}

nav ul li:not(:first-child) a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 100%;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(
        to right,
        var(--color-red),
        var(--color-orange),
        var(--color-yellow),
        var(--color-green),
        var(--color-blue),
        var(--color-indigo),
        var(--color-violet),
        var(--color-red)
    );
    background-size: 200% 100%;
    animation: rainbowBorder2 2s linear infinite;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    pointer-events: none;
}

nav ul li:not(:first-child) a:hover::after {
    opacity: 1;
}

@keyframes rainbowBorder2 {
    0% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 200% 0%;
    }
}

/* ----------------------------------------------------------------------------------------------- */
/* ----------------------------------------------------------------------------------------------- */
/* ----------------------------------------------------------------------------------------------- */
/* ------------------------------------------ FOOTER --------------------------------------------- */
/* ----------------------------------------------------------------------------------------------- */
/* ----------------------------------------------------------------------------------------------- */
/* ----------------------------------------------------------------------------------------------- */

footer {
    width: 100%;
    background: #1f1f1f;
    color: white;
    text-align: center;
    padding: 10px 0;
}

footer p {
    margin-top: 30px;
}

footer h3 {
    margin-bottom: 20px;
}

.nav-footer ul li a:hover {
    color: #fff;
    font-weight: bold;
}

.nav-footer ul li a:hover::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 100%;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(
        to right,
        var(--color-red),
        var(--color-orange),
        var(--color-yellow),
        var(--color-green),
        var(--color-blue),
        var(--color-indigo),
        var(--color-violet),
        var(--color-red)
    );
    background-size: 200% 100%;
    animation: rainbowBorder2 2s linear infinite;
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}

.nav-footer ul li a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 100%;
    height: 3px;
    border-radius: 2px;
    background: transparent;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

/* ----------------------------------------------------------------------------------------------- */
/* ----------------------------------------------------------------------------------------------- */
/* ----------------------------------------------------------------------------------------------- */
/* ------------------------------------------ DISEÑO --------------------------------------------- */
/* ----------------------------------------------------------------------------------------------- */
/* ----------------------------------------------------------------------------------------------- */
/* ----------------------------------------------------------------------------------------------- */

section.cta {
    width: 100%;
    height: 450px;
    background-color: #111111;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    color: white;
    padding: 20px;
    overflow: hidden;
}

section.cta img {
    width: 100%;
    max-width: 1000px;
    height: 310px;
    max-height: 310px;
    min-height: 310px;
    object-fit: cover;
    z-index: 0;
}

section.cta .text-block {
    margin-top: 30px;
}

section.cta h1 {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 15px;
    margin-top: 70px;
}

section.cta p {
    font-size: 1rem;
    font-weight: 400;
    margin-top: 10px;
    text-align: center;
    max-width: 80%;
    color: #ffffffcc;
}

section.cta button {
    padding: 15px 30px;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    background-color: #292929;
    border: 2px solid #292929;
    border-radius: 5px;
    cursor: pointer;
    position: relative;
    top: -70px;
    transition: all 0.2s ease;
}

section.cta button:hover {
    background-color: #1f1f1f;
    box-shadow: 10px 10px 0 #1f1f1f;
    color: #ffffff;
    border: 2px solid #292929;
    transform: translate(-2px, -2px);
}

@media (max-width: 768px) {
    section.cta h1 {
        font-size: 1.5rem;
    }
    section.cta button {
        padding: 12px 25px;
        font-size: 0.9rem;
    }
}

.body-proyect {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 380px));
    gap: 30px;
    justify-content: center;
    justify-items: center;
    width: 90%;
    max-width: 1300px;
    margin: 0 auto;
    padding-bottom: 40px;
}

.body-proyect article {
    width: 100%;
    max-width: 380px;
    height: 320px;
    background-color: #282828;
    border-top: 10px solid rgba(17, 17, 17, 0.45);
    border-right: 10px solid rgba(80, 80, 80, 0.38);
    border-top-left-radius: 40px;
    border-bottom-right-radius: 40px;
    box-shadow: 10px 10px 25px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
    position: relative;
    transition: background-color 0.3s ease;
}

.body-proyect article:hover {
    background-color: #111111;
    border-top: 10px solid rgba(47, 47, 47, 0.3);
    border-right: 10px solid rgba(80, 80, 80, 0.27);
}

.body-proyect article::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -15px;
    bottom: -5px;
    z-index: -1;
    background: conic-gradient(
            from 225deg,
            #ff006e, #8338ec, #3a86ff, #06ffa5, #ffbe0b, #fb5607, #ff006e
    );
    border-radius: inherit;
    filter: blur(10px);
    opacity: 0;
    transition: opacity 0.6s ease;
}

.body-proyect article:hover::before {
    opacity: 0.7;
}

.body-proyect article a button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
            90deg,
            #ff00c3,
            #ff0045,
            #ff2f00,
            #ff8b06,
            #ffba0b
    );
    opacity: 0;
    transition: opacity 0.6s ease;
    border-radius: inherit;
    z-index: -1;
}

.body-proyect article:hover a button::before {
    opacity: 1;
}

.body-proyect article a button:hover::before {
    opacity: 0;
}

.body-proyect article h2 {
    font-size: 2.3rem;
    font-weight: bold;
    margin-bottom: 10px;
    transition: text-shadow 0.4s ease;
}

.body-proyect article:hover h2 {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.89);
}

.body-proyect article .img-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.body-proyect article a {
    text-decoration: none;
    position: relative;
    display: inline-block;
    margin-top: auto;
    align-self: flex-start;
}

.body-proyect article a button {
    padding: 10px 25px;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    background-color: #1f1f1f;
    border: 2px solid #1f1f1f;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.body-proyect article a button:hover {
    background-color: #292929;
    box-shadow: 10px 10px 0 #1f1f1f;
    transform: translate(-2px, -2px);
}

.separador {
    margin: 40px;
}

.code-text {
    display: inline-block;
    background-color: #181818;
    color: #c5c5c5;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.95rem;
    padding: 16px 16px;
    border-radius: 6px;
    line-height: 1.4;
    letter-spacing: 0.3px;
    white-space: pre-wrap;
    margin-top: 10px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: inset 0 10px 25px rgba(0, 0, 0, 0.5);
}

.body-proyect article:hover .code-text {
    background-color: transparent;
    box-shadow: inset 0 10px 25px rgba(0, 0, 0, 0);
}