:root {
    --bg: #131313;
    --equis: #4180e0;
    --cuadrado: #d577d2;
    --circulo: #d0544a;
    --triangulo: #6fcebe;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

/* SCROLLBAR */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #111;
}

::-webkit-scrollbar-thumb {
    background: var(--cuadrado);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--circulo);
}

body {
    font-family: "Victor mono", sans-serif;
    color: var(--equis);
    background-color: var(--bg);
}

html,
body {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* HEADER */
header {
    padding: 1em;
    background-color: var(--bg);
    display: flex;
    border-bottom: var(--cuadrado) solid 2px;
}

header img {
    width: 25%;
}

#headerDiv {
    text-align: center;
}

#contactDiv {
    margin-top: 1em;
    padding-right: 10em;
    text-align: end;
}

#contactDiv p {
    padding-right: 3em;
}

header h1 {
    font-size: 3em;
}

header h1::first-letter {
    font-size: 1.5em;
    color: var(--cuadrado);
}

header a img {
    margin: .5em;
    width: 3%;
}


/* NAV */

nav {
    display: flex;
    justify-content: center;
    border-bottom: var(--cuadrado) solid 2px;
}

ul {
    padding: 1em;
    display: flex;
    gap: 1em;
}

ul li {
    list-style: none;
}

ul li a {
    position: relative;
    font-size: 1.5em;
    text-decoration: none;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: transparent;
    -webkit-text-stroke: .3px rgba(255, 255, 255, 0.5);
}

ul li a::before {
    content: attr(data-text);
    position: absolute;
    color: var(--clr);
    width: 0;
    overflow: hidden;
    transition: 1s;
    border-right: 7px solid var(--clr);
    -webkit-text-stroke: 1px var(--clr);
    cursor: pointer;
}

ul li a:hover::before,
ul li a.active::before {
    width: 100%;
    filter: drop-shadow(0 0 25px var(--clr));
}

.ex {
    --clr: var(--equis);
}

.square {
    --clr: var(--cuadrado);
}

.circle {
    --clr: var(--circulo);
}

.triangle {
    --clr: var(--triangulo);
}

/* BOTÓN FLOTANTE */
#float {
    position: fixed;
    bottom: 0;
    right: 0;
    margin: 1em;
    z-index: 1000;
}

#float img {
    width: 60px;
}

/* SECTION NAV*/
.sectionNav {
    padding: 1em;
    border: none;
    gap: 1em;
}

.sectionNav a {
    text-decoration: none;
    background-color: var(--cuadrado);
    color: black;
    padding: .2em 1em;
    border-radius: 4em;
    transition: all 1s ease;
}

.sectionNav a:hover {
    background-color: var(--circulo);
}

/* SECTION */
section {
    padding: 1em 0;
    display: none;
    background-color: var(--bg);
}

/* SECTIONS IN SECTIONS */
.sections {
    display: block;
}

.activo {
    display: block;
    flex-wrap: wrap;
    text-align: center;
}

/* <!-- SECTION ABOUT ME -->*/
.sections:nth-child(2n+1){
    background-color: #181818;
}

section p{
    color: var(--circulo);
    padding-top: 1em;
    width: 50%;
    
}

section strong{
    color: var(--triangulo);
}

section span{
    color: var(--cuadrado);
}

section small{
    color: var(--equis);
    font-size: .6em;
}

#profile, #education, #experience, #skills{
    display: flex;
    align-items: center;
    flex-direction: column;
    text-align: left;
}

/* PROYECTOS */

#proyectos{
    padding: 1em;
}

#divProyectos {
    display: flex;
    flex-direction: column;
    gap: 1em;
    flex-wrap: wrap;
    justify-content: center;
}

article {
    border: 2px dotted var(--cuadrado);
    border-radius: 1em;
    padding: 1em;
}

.articleDiv{
    display: flex;
}

article figure{
    width: 50%;
}
article img {
    width: 100%;
}

article h3 {
    margin-bottom: 1em;
}

article p {
    padding-left: 2em;
    text-align: left;
}

article a {
    color: var(--triangulo);
    font-size: .8em;
    text-decoration: none;
    transition: all 1s ease;

    display: block;
    width: fit-content;
    margin: 0 auto;
}


article a:hover {
    color: var(--equis);
    background-color: none;
}

.articleModel{
    margin: 1em;
    display: flex;
    justify-content: center;
    height: 30em;
}

.modelsViewer{
    width: 85%;
    height: 95%;
}

.modelContainer {
    position: relative;
    width: 100%;
    height: 400px;
}

.modelsViewer {
    width: 100%;
    height: 100%;
}

.loader {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 45px;
    height: 45px;

    border: 5px solid #ccc;
    border-top: 5px solid #333;
    border-radius: 50%;

    transform: translate(-50%, -50%);
    animation: spin 0.8s linear infinite;

    z-index: 10;
}

#art2_img{
    height: 100%;
    width: auto;
}

#concept img{
    height: 100%;
    width: auto;
}

/*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);
}

.footer a{
    text-decoration: none;
    color:#4181e071;
}

.prev{
    z-index: 100;
}



@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;
    }
}

@keyframes spin {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}