* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow-x: hidden;
}

:root {
    --rojo-vino: #7B1E1E;
    --rojo-oscuro: #4A0B0B;
    --rojo-intenso: #C62828;
    --rojo-vibrante: #FF5252;
    --gris-carbon: #212121;
    --blanco-humo: #F5F5F5;
    --dorado: #FFD54F;
    --bg-dark: #0d0d0d;
    --bg-darker: #1a1a1a;
    --red-accent: #8b0000;
    --red-hover: #b22222;
    --light-text: #f5f5f5;
}


body {
    width: 100vw;
    height: 100vh;
    background: linear-gradient(160deg, var(--bg-darker), var(--gris-carbon), var(--rojo-vino));
    color: var(--blanco-humo);
}

header {
    width: 100vw;
    height: 4rem;
    background-color: var(--rojo-vino);
    color: var(--blanco-humo);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    position: sticky;
    top: 0px;
    z-index: 1001;
    gap: 1rem;
    padding-right: 3rem;
}

header h1 {
    color: var(--dorado);
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.918);
}

header img {
    border-radius: 2px;
    cursor: pointer;
    transform: scale(1.1);
    animation: pulseHeader 1000ms infinite ease-in-out;
}

@keyframes pulseHeader {

    100%,
    0% {
        transform: scale(0.90);
        box-shadow: 0 0 10px rgba(252, 36, 36, 0.5);
    }

    50% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(187, 7, 7, 0.8);
    }
}

#menu {
    display: none;
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    top: 65px;
    background-color: var(--rojo-vino);
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1001;
}

#menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#menu li {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#menu a {
    overflow: hidden;
    text-decoration: none;
    background-color: transparent;
    color: var(--blanco-humo);
    margin: 0 15px;
    font-size: 18px;
    padding: 10px 15px;
    transition: transform 0.2s;
    display: block;
    border-radius: 10px;
}

#menu a:hover {
    background-color: var(--rojo-intenso);
    border-radius: 10px;
    transform: scale(1.1);
}

#menu ul li a i {
    margin-right: 8px;
    font-size: 1rem;
    vertical-align: middle;
    color: var(--dorado);
}

#Home {
    scroll-margin-top: 80px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    animation: pulse-bg 6s infinite alternate;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    background: linear-gradient(270deg, #241212, #2b0a0a, #4a0e0e, #2e0c0c);
    background-size: 600% 600%;
    animation: gradientMove 6s ease infinite;
}


@keyframes gradientMove {
    0% {
        background-position: 0% 50%
    }

    50% {
        background-position: 100% 50%
    }

    100% {
        background-position: 0% 50%
    }
}


.home-content {
    color: var(--blanco-humo);
    max-width: 800px;
    padding: 2rem;

}

.home-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--red-accent);
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.918);
}

.home-content h2 {
    font-size: 1.6rem;
    font-weight: 400;
    margin-bottom: 1rem;
    color: var(--blanco-humo);
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);

}

.home-content p {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.highlight {
    color: var(--rojo-vibrante)
}

.btn-home {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 100px;
    background: linear-gradient(90deg, var(--rojo-vino), var(--dorado), var(--rojo-vino));
    background-size: 200% auto;
    color: var(--blanco-humo);
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    animation: pulse 3s infinite ease-in-out;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 10px rgba(123, 30, 30, 0.5);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 20px rgba(255, 213, 79, 0.8);
    }
}


#text {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--blanco-humo);
    padding: 15px;
    text-align: justify;
}

#About {
    background-color: rgba(0, 0, 0, 0.082);
    width: 100vw;
    min-height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 1px;
    scroll-margin-top: 80px;
}

.about-card img {
    position: relative;
    align-self: center;
    width: 130px;
    height: 130px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--rojo-intenso);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.about-card img:hover {
    transform: scale(1.05) rotate(-2deg);
    border-color: var(--rojo-vibrante);
}

.about-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--gris-carbon) 0%, var(--rojo-oscuro) 100%);
    color: var(--blanco-humo);
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-width: 90vw;
    max-width: 600px;
    margin: 1rem;
    line-height: 1.7;
}

.about-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

h3 {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--rojo-intenso);
    margin: 1rem 0 1.5rem 0;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(to right, var(--rojo-intenso), var(--dorado));
    border-image-slice: 1;
    padding-bottom: 2px;
    line-height: normal;
}

#Education {
    background-color: rgba(0, 0, 0, 0.082);
    width: 100vw;
    min-height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 1px;
    scroll-margin-top: 80px;
}

.educacion-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(135deg, var(--gris-carbon) 0%, var(--rojo-oscuro) 100%);
    color: var(--blanco-humo);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-width: 90vw;
    max-width: 600px;
    margin: 1rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.7;
}

.educacion-card h3 {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--rojo-intenso);
    margin: 1rem 0 1.5rem 0;
    text-align: center;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.3);
}

.education-card2 {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(135deg, var(--rojo-vino) 0%, var(--rojo-oscuro) 100%);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-width: 80vw;
    max-width: 600px;
    margin: 1rem;
    color: var(--blanco-humo);
    border: 2px solid var(--rojo-intenso);
    text-align: center;
}

.education-card2:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(178, 34, 34, 0.5);
    border-color: var(--rojo-vibrante);
}

.education-card2 h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dorado);
}

.education-card2 p {
    margin: 0.2rem 0;
}

.education-card2 a {
    margin-top: 0.5rem;
    color: var(--dorado);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
}

.education-card2 a:hover {
    color: var(--rojo-intenso);
    text-decoration: underline;
}

#Skills {
    background-color: rgba(0, 0, 0, 0.082);
    width: 100vw;
    min-height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 1px;
    scroll-margin-top: 80px;
}

.skills-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(135deg, var(--gris-carbon) 0%, var(--rojo-oscuro) 100%);
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-width: 90vw;
    max-width: 600px;
    margin: 1rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.7;
    color: var(--light-text);
}

.skills-grid {
    display: grid;
    padding: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 1rem;
    width: 100%;
}

.skill-card {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem;
    background: var(--gris-carbon);
    border-left: 6px solid var(--rojo-intenso);
    border-radius: 0.8rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    font-size: 1rem;
    color: var(--light-text);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    animation: pulse-card 2s infinite;
    animation-delay: calc(var(--i) * 0.3s);
}

.skill-card i {
    font-size: 1.3rem;
    color: var(--dorado);
    min-width: 24px;
    text-align: center;
}

.skill-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    border-color: var(--dorado);
}



@keyframes pulse-card {

    0%,
    100% {
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    }

    50% {
        box-shadow: 0 5px 15px rgba(198, 40, 40, 0.4);
    }
}


footer {
    width: 100vw;
    min-height: 4rem;
    display: flex;
    flex-direction: column;
    color: var(--blanco-humo);
    flex-wrap: wrap;
    padding: 2rem;
    gap: 1rem;
    color: var(--rojo-intenso);
    flex-wrap: wrap;
    scroll-margin-top: 80px;
}

footer p {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--blanco-humo);
    padding: 15px;
}

footer ul {
    overflow: hidden;
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    justify-content: center;
    align-items: center;
    height: 5rem;
    gap: 2rem;
}


footer ul a img {
    transition: transform 0.3s ease;
}

footer li {
    padding: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

footer ul li:hover {
    transform: scale(1.2) translateY(-2px);
}

.footer-credits {
    background-color: var(--rojo-oscuro);
    text-align: center;
    font-size: 0.9rem;
    color: var(--blanco-humo);
}


@media (min-width: 801px) and (max-width: 1200px) {
    #menu a span {
        display: none;
    }
}

@media (min-width: 801px) {
    header {
        height: 5rem;
    }

    #menuBtn {
        display: none;
    }

    #menu {
        position: static;
        transform: none;
        display: block !important;
        border-radius: 8px;
        padding: 1px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        z-index: 1002;
    }

    #menu ul {
        background-color: var(--rojo-vino);
        border-radius: 8px;
        box-shadow: 0 9px 9px rgba(7, 7, 0, 1);
        display: flex;
        height: 3.4rem;
    }

    #menu a {
        border-radius: 8px;
    }

    #menu a:hover {
        background: var(--rojo-intenso);
        border-radius: 8px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
        transform: translateY(-7px) scale(1.01);
    }

    .skills-grid {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-around;
    }

    #About {
        display: flex;
        flex-direction: row;
        align-items: stretch;
        justify-content: center;
        gap: 4rem;
    }

    .about-card {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
    }

    .container-class {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
    }

    .education-card2 {
        min-width: auto;
        max-width: auto;
        width: 40vw;
        min-height: 180px;
    }

    footer {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr 1fr 1fr;
        grid-template-areas:
            "contacto info"
            "contacto redes"
            "contacto redes";
    }

    footer .contactame {
        grid-area: contacto;
    }

    footer h2 {
        grid-area: info;
        text-align: center;
        justify-self: center;
        align-self: start;
    }

    footer .footer-icons {
        grid-area: redes;
    }
}