/* ==== Reset de estilos ==== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: Arial, sans-serif;
    background-color: #f1f1f1;
    color: #1e1e1e;
}

/* ==== Contenedor principal ==== */
.main-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ==== Header ==== */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 1em 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1em;
}

.logo {
    height: 60px;
}

.menu-icon {
    font-size: 2em;
    color: #333333;
    display: none;
    cursor: pointer;
}

/* ==== Navbar ==== */
.navbar ul {
    display: flex;
    list-style: none;
}

.navbar li a {
    text-decoration: none;
    color: #333333;
    font-weight: bold;
    padding: 0.5em 1em;
    border-radius: 0.5rem;
    transition: color 0.3s ease, background-color 0.3s ease;
}

.navbar li a:hover {
    color: #000000;
    background-color: #f1f1f1;
}

/* ==== Main Content ==== */
.main {
    padding-top: 120px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.intro {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 120px - 70px);
    text-align: center;
    color: #000000;
    overflow: hidden;
    z-index: 0;
}

.background-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    mask-image: 
        linear-gradient(to top, transparent, #000 10%),
        linear-gradient(to bottom, transparent, #000 10%),
        linear-gradient(to left, transparent, #000 10%),
        linear-gradient(to right, transparent, #000 10%);
    mask-composite: intersect;
    -webkit-mask-composite: destination-in;
    opacity: 0.5;
}

.intro-content {
    position: relative;
    z-index: 1;
    padding: 2em;
}

/* ==== Cita de introducción ==== */
.intro-quote {
    font-size: 2.5em;
    margin-bottom: 0.5em;
    padding: 1em;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

@media (max-width: 768px) {
    .intro {
        display: flex;
        flex-direction: column;
        justify-content: center; /* Centra el contenido verticalmente */
        align-items: center;
        padding: 4em 1em; /* Aumenta el espacio para centrar mejor el contenido */
    }

    .intro-quote {
        font-size: 1.5em; /* Ajuste de tamaño en móvil */
        margin: 0; /* Remueve márgenes adicionales */
    }

    .intro-name h2, .intro-name p {
        font-size: 1.5em;
    }
}

/* Configuración de animación de palabras en intro-quote */
.intro-quote span {
    opacity: 0;
    margin-right: 0.5em;
    animation: fade-in 0.3s ease forwards;
    animation-delay: calc(var(--i) * 0.1s);
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==== Sección Nombre y Título ==== */
.intro-name h2 {
    font-size: 2em;
    margin-bottom: 0.3em;
}

.intro-name p {
    font-size: 1em;
    color: #000000;
}

/* ==== Secciones Generales ==== */
.aboutme, .projects, .contact {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3em 1em;
    background-color: #f1f1f1;
}

.aboutme-content, .projects-content, .contact-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 800px;
    text-align: center;
}

/* ==== Sección "Sobre mí" ==== */
.aboutme-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 10%;
    margin-bottom: 1.5em;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
}

.aboutme-description h2, .projects-content h2 {
    font-size: 2em;
    margin-bottom: 0.5em;
}

.aboutme-description p, .projects-content p {
    font-size: 1.1em;
    line-height: 1.6;
    margin-top: 1em;
    margin-bottom: 1em;
}

.aboutme-tecnologies {
    margin-top: 1em;
    margin-bottom: 2em;
}

.aboutme-tecnologies h2 {
    font-size: 2em;
    margin-bottom: 1em;
}

/* ==== Logos de Tecnologías ==== */
.tecnologies-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    margin-top: 1em;
    gap: 3em;
}

.tecnology-logo {
    max-height: 100px;
    max-width: 100px;
}

/* ==== Formulario de Contacto ==== */
form {
    display: flex;
    flex-direction: column;
    gap: 1em;
    width: 100%;
}

label {
    margin-bottom: 0.3em;
    font-weight: bold;
}

input, textarea {
    width: 100%;
    padding: 0.8em;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    box-sizing: border-box;
}

button {
    width: 100%;
    padding: 0.8em;
    border: none;
    background-color: #333333;
    color: #ffffff;
    font-size: 1em;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #1e1e1e;
}

.contact-content h2 {
    font-size: 2em;
    margin-bottom: 1em;
}

.contact-content p {
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 1.5em;
}

/* ==== Iconos de Contacto ==== */
.contact-icons {
    display: flex;
    gap: 1em;
    margin: 2em 0;
    justify-content: center;
}

.contact-icon {
    width: 40px;
    height: 40px;
    transition: transform 0.3s ease;
}

/* ==== Footer ==== */
.footer {
    width: 100%;
    background-color: #333333;
    color: #f1f1f1;
    text-align: center;
    padding: 1em 0;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.4);
    z-index: 1000;
}

/* ==== Responsive Styles ==== */
@media (max-width: 768px) {
    .navbar ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: #ffffff;
        width: 100%;
        padding: 0;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
        z-index: 999;
        opacity: 0;
        transform: translateY(-10px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .navbar ul.show {
        display: flex;
        opacity: 1;
        transform: translateY(0);
    }

    .navbar li {
        width: 100%;
    }

    .navbar li a {
        display: block;
        width: 100%;
        padding: 1em;
        color: #333333;
        text-align: center;
    }

    .navbar li a:hover {
        background-color: #f1f1f1;
        color: #000000;
        box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.1);
    }

    .menu-icon {
        display: block;
    }
    .footer {
        position: static; /* Permite que el footer fluya después del contenido */
    }
    
    .intro {
        padding: 2em 1em;
    }

    .intro-quote {
        font-size: 1.5em; /* Ajuste de tamaño en móvil */
    }
    
    .intro-name h2, .intro-name p {
        font-size: 1.5em;
    }
}