/* Reset y tipografía */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Arial", sans-serif;
    background-color: #f5f6fa;
    color: #333;
    line-height: 1.6;
    padding: 0 20px;
}

/* Header */
header {
    background-color: #1a1a2e;
    color: #f4f4f7;
    padding: 40px 0;
    text-align: center;
}

.perfil-header img.perfil-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ff6f61;
    margin-bottom: 15px;
}

header h1 {
    font-size: 2.2em;
    margin-bottom: 10px;
}

header p {
    font-size: 1.1em;
    color: #f4f4f7cc;
}

/* Secciones */
section {
    margin: 30px 0;
}

section h2 {
    text-align: center;
    font-size: 2em;
    margin-bottom: 20px;
    color: #1a1a2e;
    position: relative;
}

section h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background-color: #ff6f61;
    margin: 10px auto 0;
    border-radius: 2px;
}

/* Listas de habilidades */
ul {
    list-style: disc inside;
    max-width: 700px;
    margin: 0 auto;
    text-align: left;
}

ul li {
    margin-bottom: 10px;
}

/* Grid de proyectos */
.proyectos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.proyecto-card {
    background-color: #fff;
    padding: 20px;
    border-radius: 12px;
    text-decoration: none;
    color: #1a1a2e;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.proyecto-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.proyecto-card h3 {
    margin-bottom: 10px;
    color: #ff6f61;
}

.proyecto-card p {
    color: #555;
}

/* Footer */
footer {
    text-align: center;
    margin: 50px 0 20px;
    padding: 15px 0;
    background-color: #1a1a2e;
    color: #f4f4f7;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

footer a {
    color: #ff6f61;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsivo */
@media (max-width: 768px) {
    body {
        padding: 0 10px;
    }

    .proyectos-grid {
        grid-template-columns: 1fr;
    }
}

/* Imágenes de proyectos IoT */
.proyecto-img {
    display: block;
    max-width: 600px;   /* tamaño máximo coherente */
    width: 100%;        /* se adapta a pantallas pequeñas */
    height: auto;       /* mantiene proporción */
    margin: 20px auto;  /* centrado con espacio */
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.proyecto-img:hover {
    transform: scale(1.03);  /* Pequeño zoom al pasar el mouse */
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}
.experiencia-detalle h3,
.experiencia-detalle h4,
.experiencia-detalle h5 {
    color: #1a1a2e;
}
