html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

a {
    text-decoration: none;
    color: #333;
    scroll-behavior: smooth;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 10rem 1rem 10rem;
    background-color: #333;
}

.logo {
    font-family: Arial, sans-serif;
    font-size: 30px;
    font-weight: bold;
    text-transform: uppercase;
    color: #ffffff;
    text-shadow: 3px 3px #333333, 5px 5px #666666;
    max-width: 5rem;
}

.nav-list {
    list-style-type: none;
    display: flex;
    gap: 1rem;
}

.nav-list li a {
    text-decoration: none;
    color: #fff;
}

nav ul li a:hover {
    background-color: #333;
    color: #f3d422;
}

.abrir-menu,
.cerrar-menu {
    display: none;
}

p.descripcion {
    font-size: 1.2em;
    line-height: 1.5;
    color: #333;
    text-align: left;
    margin-bottom: 1em;
    padding-right: 1rem;
}

figcaption {
    font-size: 0.8em;
}


/* Secciones */

section {
    padding: 1rem 10rem 1rem 10rem;
}

#inicio {
    background-color: #fff;
}

#sobre-mi {
    background-color: #fff;
}

#proyectos {
    background-color: #eee;
}

#proyectos .proyecto {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 50px;
}

#proyectos img {
    width: 100%;
    max-width: 400px;
    height: auto;
    margin-bottom: 20px;
    border-radius: 2px;
}

#proyectos h3 {
    margin-bottom: 10px;
}

#proyectos p {
    text-align: center;
}

#habilidades {
    background-color: #fff;
}

#habilidades ul {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

#habilidades li {
    margin-right: 20px;
    margin-bottom: 20px;
    padding: 10px 20px;
    border: 2px solid #333;
    border-radius: 5px;
    font-weight: bold;
}

#contacto {
    background-color: #eee;
    padding: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

#contacto h2 {
    font-size: 32px;
    margin-bottom: 30px;
}

#contacto form {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 600px;
    margin-bottom: 30px;
}

#contacto label {
    font-size: 18px;
    margin-bottom: 10px;
    text-align: left;
}

#contacto input,
#contacto textarea {
    padding: 10px;
    border-radius: 5px;
    border: none;
    margin-bottom: 20px;
    font-size: 16px;
}

#contacto input[type="submit"] {
    background-color: #333;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#contacto input[type="submit"]:hover {
    background-color: #555;
}

#contacto .redes-sociales {
    display: flex;
    justify-content: left
}

#contacto .redes-sociales a {
    display: block;
    margin: 0 10px;
    font-size: 24px;
    color: #0e0d0d;
    transition: color 0.3s ease;
}

#contacto .redes-sociales a:hover {
    color: #333;
}

footer {
    padding: 1rem 10rem 1rem 10rem;
}


/* Botones ver proyecto y regresar arriba*/

.boton {
    display: inline-block;
    background-color: #333;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    margin-top: 20px;
    font-weight: bold;
    cursor: pointer;
}

.boton:hover {
    background-color: #444;
}


/* Animación de aparición */

.aparicion {
    opacity: 0;
    transform: translateY(20px);
    animation-name: aparecer;
    animation-duration: 1s;
    animation-fill-mode: forwards;
}

@keyframes aparecer {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Animación de desplazamiento */

.desplazar {
    opacity: 0;
    transform: translateY(50px);
    animation-name: desplazamiento;
    animation-duration: 1s;
    animation-fill-mode: forwards;
}

@keyframes desplazamiento {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Animación de zoom */

.zoom {
    opacity: 0;
    transform: scale(0.5);
    animation-name: zoom;
    animation-duration: 1s;
    animation-fill-mode: forwards;
}

@keyframes zoom {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media screen and (max-width: 777px) {
    .abrir-menu,
    .cerrar-menu {
        display: block;
        border: 0;
        font-size: 1.25rem;
        cursor: pointer;
        background-color: fff;
    }
    .cerrar-menu {
        margin-bottom: 7px;
        margin-right: 1rem;
    }
    .nav {
        opacity: 0;
        visibility: hidden;
        display: flex;
        flex-direction: column;
        align-items: end;
        gap: 1rem;
        position: absolute;
        top: 0px;
        right: 0;
        bottom: 0;
        background-color: #333333;
        padding: 1rem;
        box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.5);
        z-index: 9999999999;
    }
    .nav.visible {
        opacity: 1;
        visibility: visible;
        z-index: 999999;
    }
    .nav-list {
        flex-direction: column;
        align-items: end;
        margin-right: 1rem;
    }
    .nav-list a {
        color: fff;
    }
    nav ul li a,
    .nav-list li a {
        display: inline-block;
        /* cambiar la propiedad display a inline-block */
        text-decoration: none;
        color: #fff;
    }
    nav ul li a:hover,
    .nav-list li a:hover {
        background-color: #333;
        color: #f3d422;
    }
}