/* ===== GENERAL ===== */
body {
    font-family: Arial;
    margin: 0;
    background: #0f172a;
    color: white;
}

section {
    padding: 50px;
    text-align: center;
}

/* ===== HEADER ===== */
header {
    background: #020617;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap; 
    align-items: center; 
}

header {
    background: #020617;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    align-items: center;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 15px;
    flex-wrap: wrap; /* 👈 evita que se rompa */
    justify-content: center;
    
}
nav a {
    color: white;
    text-decoration: none;
}
/* ===== TITULO ===== */
.title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px; /* separación mínima */
}

.title h1,
.title h2 {
    margin: 0;
}

/* ===== PROYECTOS ===== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.card {
    background: #1e293b;
    padding: 10px;
    border-radius: 10px;
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
}

/* ===== HABILIDADES ===== */
.skills img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin: 10px;
}

/* ===== CERTIFICADOS (CORREGIDO) ===== */
#certificados .cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

#certificados .cert-grid div {
    background: #1e293b;
    padding: 10px;
    border-radius: 10px;
}

#certificados .cert-grid img {
    width: 100%;
    height: 140px; /* tamaño controlado */
    object-fit: contain; /* no recorta certificados */
    display: block;
}

/* ===== FORMULARIO ===== */
form {
    display: flex;
    flex-direction: column;
    width: 300px;
    margin: auto;
}

input, textarea {
    margin: 10px 0;
    padding: 10px;
}

button {
    background: #38bdf8;
    border: none;
    padding: 10px;
    cursor: pointer;
}

.foto-perfil {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    margin: 20px 0;
    border: 3px solid #38bdf8;
    transition: transform 0.3s;
}

.foto-perfil:hover {
    transform: scale(1.1);
}
.whatsapp-btn {
    position: fixed;
    bottom: 20px;
    left: 20px; /* 👈 lado izquierdo */
    z-index: 1000;
}

.whatsapp-btn img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.3s;
}

.whatsapp-btn img:hover {
    transform: scale(1.1);
}
/* ===== FOOTER ===== */
footer {
    background: #020617;
    padding: 20px;
    text-align: center;
}

.footer-contenido {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.footer-contenido p {
    margin: 0;
    font-size: 14px;
    color: #94a3b8;
}

.redes {
    display: flex;
    gap: 15px;
}

footer .redes img {
    width: clamp(16px, 3vw, 24px);
    height: clamp(16px, 3vw, 24px);
}
.redes img:hover {
    transform: scale(1.2);
}
footer .redes {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {

    section {
        padding: 30px 15px;
    }

    /* HEADER */
    header {
        flex-direction: column;
        text-align: center;
    }

    /* PROYECTOS */
    .grid {
        grid-template-columns: 1fr; /* una columna */
    }

    /* CERTIFICADOS */
    #certificados .cert-grid {
        grid-template-columns: 1fr;
    }

    /* HABILIDADES */
    .skills img {
        width: 60px;
        height: 60px;
    }

    /* FORMULARIO */
    form {
        width: 100%;
    }

    /* FOTO PERFIL */
    .foto-perfil {
        width: 120px;
        height: 120px;
    }

    /* BOTÓN WHATSAPP */
    .whatsapp-btn img {
        width: 50px;
        height: 50px;
    }
    /* ===== OTROS CONOCIMIENTOS ===== */
#otros {
    background: #020617;
}

.otros-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.otros-card {
    background: #1e293b;
    padding: 20px;
    border-radius: 10px;
    transition: transform 0.3s;
}

.otros-card:hover {
    transform: translateY(-5px);
}

.otros-card h3 {
    color: #38bdf8;
    margin-bottom: 10px;
}
/* FOOTER RESPONSIVE */
footer {
    padding: 15px;
}

footer .footer-contenido p {
    font-size: 12px;
}

footer .redes {
    gap: 8px;
}

footer .redes img {
    width: 16px ;
    height: 16px;
}}