* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

h1 {
    font-size: 3.5em;
    margin-bottom: 0.5em;
}

h2 {
    font-size: 2.8em;
    margin-bottom: 0.4em;
}

h3 {
    font-size: 2.5em;
    margin-bottom: 0.3em;
}

p {
    font-size: 1.25em;
    line-height: 1.6em;
}

/* Botones */
button {
    font-size: 1.2em;
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    color: #fff;
    background-color: #2f22be;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    cursor: pointer;
}

button:hover {
    background-color: #1a1280;
    transform: scale(1.05);
}

/* Header */
header {
    background: #2f22be;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

header .logo {
    padding: 20px 30px;
    font-weight: bold;
    color: #fff;
    font-size: 1.6em;
}

header .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

header nav {
    display: flex;
    flex-direction: column;
    text-align: center;
    padding-bottom: 15px;
}

header a {
    padding: 10px 15px;
    text-decoration: none;
    font-weight: bold;
    color: #fff;
    transition: color 0.3s ease;
}

header a:hover {
    color: #ffea00;
}

/* Sección principal */
#mio {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-direction: column;
    height: 100vh;
    padding: 20px;
    background-image: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0.3)), url("img/fondo1.jpg");
    background-size: cover;
    background-position: center;
    color: #fff;
}

/* Secciones */
#quien-soy .container,
#mis-hobbies .container,
#mis-habilidades .container {
    text-align: center;
    padding: 150px 20px;
}

/* Foto */
#foto {
    width: 200px;
    height: auto;
    border-radius: 50%;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* Cartas de habilidades */
#mis-habilidades .habi {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 30px;
}

#mis-habilidades .carta {
    background-size: cover;
    background-position: center;
    padding: 60px 40px;
    border-radius: 15px;
    color: #fff;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.7);
}

/* Imágenes de fondo en cartas */
.carta:first-child {
    background-image: linear-gradient(to top, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.3)), url("img/ccna.jpg");
}

.carta:nth-child(2) {
    background-image: linear-gradient(to top, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.3)), url("img/itess.jpg");
}

.carta:nth-child(3) {
    background-image: linear-gradient(to top, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.3)), url("img/python.png");
}

/* Footer */
footer {
    background: #2f22be;
    padding: 20px;
    text-align: center;
    color: #fff;
    font-weight: bold;
    margin-top: 40px;
}

/* Responsive */
@media (min-width: 720px) {
    header .container {
        flex-direction: row;
        justify-content: space-between;
        padding: 0 40px;
    }

    header nav {
        flex-direction: row;
        gap: 20px;
        padding-bottom: 0;
    }

    #mis-habilidades .habi {
        flex-direction: row;
        justify-content: center;
    }

    #foto {
        width: 15%;
    }
}
