:root {
    --bg: #131313;
    --equis: #4180e0;
    --cuadrado: #d577d2;
    --circulo: #d0544a;
    --triangulo: #6fcebe;
}

/* @media (prefers-color-scheme: dark) {
    :root {
        --bg: #131313;
        --equis: #4180e0;
        --cuadrado: #d577d2;
        --circulo: #d0544a;
        --triangulo: #6fcebe;
    }
} */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
    background-color: var(--bg);
}

body {
    /* font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif; */
    font-family: "Victor mono", sans-serif;
    color: var(--equis);
}


html,
body {
    height: 100%;
    display: flex;
    flex-direction: column;
}

h2 {
    color: var(--triangulo);
    font-size: 2.5em;
}


/* HEADER */

header {
    padding: 1%;
    background-color: var(--bg);
    display: flex;
}

header img {
    width: 25%;
}

header div {
    text-align: center;
}

header h1 {
    font-size: 3em;
}

header h1::first-letter {
    font-size: 1.5em;
    color: var(--cuadrado);
}

header a img {
    margin: .5em;
    width: 3%;
}


/* BOTON MENÚ */

#menu {
    display: none;
}


/* NAV */

nav {
    display: flex;
    gap: 1.5em;
    justify-content: center;
    background-color: var(--bg);
    border: var(--equis) 2px solid;
}

a {
    text-decoration: none;
    padding: .5em;
    border-radius: .5em;
    margin: .5em 0 .5em 0;
    color: black;
    transition: all 1s ease;
}

nav>a:first-child {
    background-color: var(--equis);
}

nav>a:nth-child(2) {
    background-color: var(--cuadrado);
}

nav>a:nth-child(3) {
    background-color: var(--triangulo);
}

nav>a:nth-child(4) {
    background-color: var(--circulo);
}

nav a:hover {
    background-color: var(--circulo);
}


/* CONTÁCTAME FLOTANTE */

.float {
    position: fixed;
    top: 1em;
    right: 1em;
    background-color: var(--circulo);
    font-size: 16px;
}

.float:nth-last-of-type(2) {
    background-color: var(--triangulo);
    top: 4em;
}

.float:last-of-type {
    background-color: var(--equis);
    top: 7em;
}

.float:hover {
    background-color: var(--cuadrado);
}


/* SECTION */

section {
    display: none;
    background-color: var(--bg);
}

.activo {
    display: block;
    flex-wrap: wrap;
    text-align: center;
}


/* SOBRE MI */

#sobreMi p {
    margin-bottom: .5em;
    line-height: 1.5em;
}

#sobreMi p:nth-child(2) {
    color: var(--cuadrado);
}

#sobreMi p:nth-child(3) {
    padding: 0 3em 0em 3em;
}

#sobreMi p:nth-child(4) {
    padding-bottom: 1em;
    color: var(--circulo);
    margin: 0;
}

#sobreMi strong {
    color: var(--triangulo);
}


/* PROYECTOS */

#proyectos strong {
    color: var(--cuadrado);
}

#divProyectos {
    display: flex;
    gap: 1em;
    margin: 2em;
    flex-wrap: wrap;
    justify-content: center;
}

article {
    flex: 1;
    border: 2px dotted var(--triangulo);
    border-radius: 1em;
    min-width: 400px;
    max-width: 400px;
    padding: 1em;
}

article img {
    width: 100%;
}

article h3 {
    color: var(--triangulo);
    margin-bottom: .2em;
}

article p {
    margin-bottom: .5em;
}

article a {
    color: var(--circulo);
    background-color: none;
    transition: all 1s ease;
}

article a:hover {
    color: var(--cuadrado);
    background-color: none;
}

/*Carousel*/
.carousel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel button {
    position: absolute;
    background-color: transparent;
    border: none;
    color: var(--triangulo);
    font-size: 2em;

    cursor: pointer;
    top: 50%;
    transform: translateY(-50%);
    transition: all 1s ease;
}

.carousel .prev {
    left: 0.2em;
}

.carousel .next {
    right: 0.2em;
}

.carousel button:hover {
    color: var(--equis);
}


/* CERTIFICADOS */

#certificados img {
    width: auto;
    border: var(--equis) 3px dotted;
}

#certificados a {
    display: none;
}

#certificados embed {
    border: var(--circulo) 3px dotted;
}

#certificados embed:nth-of-type(2) {
    border: var(--triangulo) 3px dotted;
}

#certificados embed:nth-of-type(3) {
    border: var(--cuadrado) 3px dotted;
}

.footer {
    margin-top: auto;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--bg);
    text-align: center;
    padding: 1em 0;
    font-size: .7em;
    color: rgb(107, 107, 107);
}

#wpp strong{
    color: var(--circulo);
}

@media only screen and (max-width: 768px) {

    /* HEADER */
    header {
        justify-content: center;
    }

    header figure {
        display: flex;
        justify-content: center;
    }

    header img {
        width: 90%;
    }

    header div h1 {
        font-size: 2em;
    }

    header div p {
        font-size: 1em;
    }

    header a img {
        width: 5%;
    }

    /* BOTON MENÚ */
    #menu {
        display: block;
        border: none;
        border-top: var(--circulo) 5px solid;
        border-bottom: var(--circulo) 10px double;
        width: 2em;
        height: 1.5em;
    }

    /* NAV */
    nav {
        display: none;
        position: absolute;
        background-color: transparent;
        border: none;
        width: 75%;
        left: 2em;
        z-index: 999;
    }

    nav a {
        display: block;
        position: relative;
    }

    .float:nth-last-of-type(2) {
        top: 0em
    }

    .float:last-of-type {
        top: 0em
    }

    /* CERTIFICADOS */
    #certificados a {
        display: block;
        background-color: var(--circulo);
    }

    #certificados embed {
        display: none;
    }

    #certificados a:nth-of-type(2) {
        background-color: var(--cuadrado);
    }

    #certificados a:nth-of-type(3) {
        background-color: var(--equis);
    }

    /* NAV ANIMACIÓN */
    nav a {
        animation: switch 3s;
    }

    nav a:nth-of-type(2) {
        animation: switch 3.5s;
    }

    nav a:nth-of-type(3) {
        animation: switch 4s;
    }

    nav a:nth-of-type(4) {
        animation: switch 4.5s;
    }
}

@keyframes switch {
    0% {
        left: -125%;
    }

    100% {
        left: 0em;
    }
}