/* ===== RESET ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* ===== BODY ===== */
body {
    font-family: "Inter", Arial, sans-serif;
    line-height: 1.7;
    background-color: #f3f5fa;
    color: #1c2a48;
}

/* ===== HEADER ===== */
header {
    background: linear-gradient(135deg, #1c2a48, #3a4f7a);
    text-align: center;
    padding: 3rem 1rem;
    color: white;
}
header h1 { font-size: 2.8rem; margin-bottom: 0.5rem; }
header .perfil { width: 120px; height: 120px; border-radius: 50%; margin-bottom: 1rem; }

/* ===== NAV ===== */
nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    background: #ffffff;
    padding: 1rem;
    border-bottom: 2px solid #dce2f0;
}
nav a {
    text-decoration: none;
    color: #1c2a48;
    padding: 0.6rem 1.5rem;
    margin: 0.4rem;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.3s, transform 0.3s;
}
nav a:hover {
    background: #5f7ddb;
    color: white;
    transform: translateY(-3px);
}

/* ===== SECCIONES ===== */
section {
    max-width: 1000px;
    margin: 2.5rem auto;
    padding: 2rem 2.2rem;
    background: white;
    border-radius: 14px;
    border: 1px solid #dce2f0;
    box-shadow: 0 4px 12px rgba(28,42,72,0.08);
}
h2 {
    font-size: 1.9rem;
    color: #3a4f7a;
    border-left: 5px solid #5f7ddb;
    padding-left: 0.8rem;
    margin-bottom: 1rem;
}

/* ===== PROYECTOS ===== */
.proyecto {
    background: #f3f5fa;
    padding: 1.5rem;
    margin: 1rem 0;
    border-left: 4px solid #5f7ddb;
    border-radius: 10px;
    transition: transform 0.3s, box-shadow 0.3s;
}
.proyecto:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(95,125,219,0.4);
}
.proyecto img { width: 100%; margin-top: 1rem; border-radius: 8px; }

/* ===== HABILIDADES ===== */
#habilidades ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px,1fr));
    gap: 1rem;
    margin-top: 0.8rem;
}
#habilidades li {
    background: #1c2a48;
    color: white;
    padding: 1rem;
    text-align: center;
    border-radius: 10px;
    font-weight: 500;
    transition: transform 0.3s, background 0.3s;
}
#habilidades li:hover { background: #5f7ddb; transform: translateY(-5px); }

/* ===== FORMULARIO ===== */
form { display: flex; flex-direction: column; gap: 0.8rem; margin-top: 1rem; }
input, textarea { padding: 0.8rem; border-radius: 6px; border: 1px solid #ccc; font-family: inherit; }
button { background: #3a4f7a; color: white; padding: 0.8rem; border: none; border-radius: 6px; cursor: pointer; transition: background 0.3s; }
button:hover { background: #5f7ddb; }

/* ===== FOOTER ===== */
footer {
    background: #1c2a48;
    color: #e6e9f3;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    header h1 { font-size: 2.2rem; }
    section { margin: 1.5rem; padding: 1.5rem; }
    nav { flex-direction: column; }
}
