/* ===== ESTILOS BASE ===== */
body {
    padding-top: 100px;
    margin: 0;
    background-color: #3D3D3D;
    font-family: 'Courier New', Courier, monospace;
    box-sizing: border-box;
    
}

/* ===== HEADER ===== */
header {
    background-color: #578E7E;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 80px;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 0;
}

/* Menú escritorio */
.desktop-menu ul {
    display: flex;
    gap: 60px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.desktop-menu a {
    color: #FFFAEC;
    text-decoration: none;
    font-size: 18px;
    padding: 10px 15px;
    transition: opacity 0.3s ease;
}

.desktop-menu a:hover {
    opacity: 0.8;
}

/* Menú móvil - Oculto en desktop */
.hamburger {
    display: none;
    position: fixed;
    left: 25px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger span {
    width: 30px;
    height: 3px;
    background: #FFFAEC;
    transition: 0.3s;
}

.mobile-menu {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    height: calc(100vh - 80px);
    background: #578E7E;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 999;
    padding: 20px 0;
}

.mobile-menu ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

.mobile-menu li {
    padding: 15px 30px;
}

.mobile-menu a {
    color: #FFFAEC;
    text-decoration: none;
    font-size: 1.2rem;
    display: block;
    transition: all 0.3s ease;
}

.mobile-menu a:hover {
    background-color: rgba(255,250,236,0.1);
    border-radius: 5px;
}

/* ===== SECCIÓN INTRO ===== */
#intro {
    padding: 100px 20px;
    background-color: #FFFAEC;
    text-align: center;
}

#my-name-is {
    font-size: 1.5rem;
    color: #3D3D3D;
    margin-bottom: 20px;
}

#nombre {
    font-size: 3rem;
    color: #3D3D3D;
    margin: 20px 0;
}

#desarrollador-web {
    font-size: 2rem;
    color: #3D3D3D;
}

#espacio {
    height: 50px;
}

/* ===== LÍNEA DIVISORIA ===== */
#linea {
    height: 4px;
    background-color: #578E7E;
    margin: 0;
}

/* ===== PROYECTOS ===== */
#projects {
    padding: 50px 20px;
    background-color: #FFFAEC;
    text-align: center;
}

#projects h1 {
    font-size: 2.5rem;
    color: #3D3D3D;
    margin-bottom: 40px;
    text-decoration: none;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    text-decoration: none;
}

.project {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
    max-width: 350px;
    margin: 0 auto;
}

.project:hover {
    transform: translateY(-10px);
}

.project img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project h2 {
    color: #3D3D3D;
    margin: 15px 0;
    font-size: 1.5rem;
    text-decoration: none;
}

.technologies {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0 20px;
    margin: 15px 0;
    text-decoration: none;
}

.technologies li {
    background-color: #578E7E;
    color: #FFFAEC;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.9rem;
    text-decoration: none;
}

.project-description {
    padding: 0 20px 20px;
    color: #3D3D3D;
}

/* ===== ANIMACIONES ===== */
#nombre {
    position: relative;
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
}

#nombre span {
    display: inline-block;
    width: 0;
    animation: typing 0.9s steps(15, end) forwards;
}

#nombre::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background-color: #3D3D3D;
    animation: blink-cursor 0.75s infinite step-start;
    animation-delay: 0.9s;
}

@keyframes typing { to { width: 100% } }
@keyframes blink-cursor { 50% { opacity: 0 } }

/* ===== RESPONSIVE CORRECTO ===== */
@media (max-width: 768px) {
    .desktop-menu { display: none; }
    .hamburger { display: flex; }
    header { justify-content: flex-start; padding-left: 70px; }
    
    #intro { padding-top: 30px; }
    #nombre { font-size: 2rem; }
    #desarrollador-web { font-size: 1.5rem; }
}

@media (max-width: 480px) {
    .mobile-menu li { padding: 15px 20px; }
    #nombre { font-size: 1.5rem; }
    #desarrollador-web { font-size: 1.2rem; }
    .project { max-width: 100%; }
}

#menu-toggle {
    display: none;
}


/* Funcionalidad del menú móvil */
#menu-toggle:checked ~ .mobile-menu {
    transform: translateX(0);
}

#menu-toggle:checked ~ .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#menu-toggle:checked ~ .hamburger span:nth-child(2) {
    opacity: 0;
}

#menu-toggle:checked ~ .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -8px);
}
/* ===== HEADER RESPONSIVE DEFINITIVO ===== */
/* Ocultar menú desktop en móvil */
@media (max-width: 768px) {
    .desktop-menu {
        display: none !important; /* Fuerza ocultamiento */
    }
    
    .hamburger {
        display: flex; /* Muestra solo el ícono hamburguesa */
        position: fixed;
        top: 25px;
        left: 25px;
    }
    
    header {
        justify-content: flex-start;
        padding-left: 0;
        height: 80px;
    }
}

/* Asegurar visibilidad en desktop */
@media (min-width: 769px) {
    .mobile-menu {
        display: none !important; /* Oculta menú móvil en desktop */
    }
    
    .hamburger {
        display: none !important; /* Oculta ícono hamburguesa */
    }
}

/* Corrección posición del header en desktop */
.desktop-menu {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* Ajuste final de espacios */
body {
    padding-top: 80px; /* Igual a la altura del header */
}

header {
    height: 80px;
    overflow: visible; /* Permite ver el menú móvil */
}
/* ===== CORRECCIONES ESPECÍFICAS ===== */

/* 1. Ocultar checkbox en todas las resoluciones */
#menu-toggle {
    display: none;
}

/* 2. Header completo sin espacios grises */
header {
    left: 0; /* Asegurar cobertura completa */
    right: 0;
    justify-content: center;
    padding: 0 !important; /* Eliminar padding conflictivo */
}

/* 3. Posicionamiento correcto del hamburguesa */
.hamburger {
    display: none; /* Oculto por defecto */
    position: fixed; /* Cambiado de absolute */
    top: 25px;
    left: 25px;
    transform: none;
}

/* 4. Ajuste de z-index para superposición correcta */
header {
    z-index: 1001; /* Aumentado para prioridad */
}

.mobile-menu {
    z-index: 1000;
}

/* 5. Asegurar contenido header centrado en desktop */
.desktop-menu {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* 6. Eliminar padding-left conflictivo en mobile */
@media (max-width: 768px) {
    header {
        padding-left: 0 !important;
        justify-content: flex-start;
    }
    
    .hamburger {
        display: flex; /* Solo visible en mobile */
    }
}

/* 7. Ajuste final de altura header */
header {
    height: 80px;
    overflow: hidden; /* Previene fugas de contenido */
}

a {
    text-decoration: none !important;
}


#about {
    padding: 50px 20px;
    background-color: #FFFAEC;
    text-align: center;
}

#about h1 {
    font-size: 2.5rem;
    color: #3D3D3D;
    margin-bottom: 40px;
}

.about-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    text-align: left;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #3D3D3D;
}

.skills h2 {
    color: #578E7E;
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 0;
    list-style: none;
}

.skills-list li {
    background-color: #578E7E;
    color: #FFFAEC;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.95rem;
    transition: transform 0.3s ease;
}

.skills-list li:hover {
    transform: translateY(-3px);
}

@media (max-width: 768px) {
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .skills {
        margin-top: 30px;
    }
    
    .skills-list {
        justify-content: center;
    }
    
    #about h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .about-text {
        font-size: 1rem;
    }
    
    .skills h2 {
        font-size: 1.5rem;
    }
    
    #about h1 {
        font-size: 1.8rem;
    }
}

/* ===== CERTIFICADOS ===== */
#certificados {
    padding: 50px 20px;
    background-color: #FFFAEC;
    text-align: center;
}
#certificados h1 {
    font-size: 2.5rem;
    padding: 50px 20px;
    color: #3D3D3D;
    background-color: #FFFAEC;
    text-align: center; /* Asegura consistencia con otros títulos */
}

.certificates {
    padding: 50px 20px;
    background-color: #FFFAEC;
    text-align: center;
    border-radius: 10px; /* Añade un toque de diseño consistente */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Similar a otras secciones */
    text-decoration: none;
}

/* Responsive para la sección CERTIFICADOS */
@media (max-width: 768px) {
    #certificados {
        padding: 30px 15px; /* Reduce el padding para pantallas más pequeñas */
    }

    #certificados h1 {
        font-size: 2rem; /* Ajusta el tamaño del título */
        padding: 30px 15px;
    }

    .certificates {
        padding: 30px 15px; /* Reduce el padding interno */
    }

    .certificates a {
        display: block; /* Asegura que los enlaces ocupen todo el ancho */
        margin: 0 auto; /* Centra los enlaces */
    }

    .certificates img {
        width: 100%; /* Asegura que las imágenes sean responsivas */
        height: auto;
    }

    .certificates h2 {
        font-size: 1.5rem; /* Ajusta el tamaño del subtítulo */
    }

    .certificates p {
        font-size: 1rem; /* Ajusta el tamaño del texto */
    }
}

@media (max-width: 480px) {
    #certificados {
        padding: 20px 10px; /* Reduce aún más el padding */
    }

    #certificados h1 {
        font-size: 1.8rem; /* Ajusta el tamaño del título para pantallas muy pequeñas */
    }

    .certificates {
        padding: 20px 10px; /* Reduce el padding interno */
    }

    .certificates h2 {
        font-size: 1.2rem; /* Ajusta el tamaño del subtítulo */
    }

    .certificates p {
        font-size: 0.9rem; /* Ajusta el tamaño del texto */
    }
}


#contact {
    padding: 50px 20px;
    background-color: #FFFAEC;
    text-align: center;
}

#contact h1 {
    font-size: 2.5rem;
    color: #3D3D3D;
    margin-bottom: 40px;
}

.contact-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid #578E7E;
    color: #3D3D3D;
}

.contact-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.whatsapp:hover {
    background-color: #25D366;
    border-color: #25D366;
    color: #FFFAEC;
}

.instagram:hover {
    background: #f09433;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); 
    border-color: #dc2743;
    color: #FFFAEC;
}

.fab {
    font-size: 1.5rem;
}

@media (max-width: 768px) {
    .contact-container {
        flex-direction: column;
        align-items: center;
    }
    
    #contact h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .contact-link {
        width: 50%;
        justify-content: center;
        text-align: center;
    }
    
    #contact h1 {
        font-size: 1.8rem;
    }
}


.contact-subtitle {
    color: #3D3D3D;
    font-size: 1.3rem;
    margin-bottom: 30px;
    font-style: italic;
    text-align: center;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .contact-subtitle {
        font-size: 1.1rem;
        padding: 0 20px;
    }
}

@media (max-width: 480px) {
    .contact-subtitle {
        font-size: 1rem;
        margin-bottom: 25px;
    }
}
