/* ==========================================================================
   Estilos específicos para la página Index
   ========================================================================== */

.main {
    background-color: #0D0E15;
    padding: 0 0 64px;
}

.main h2 {
    margin: 0 0 28px;
    color: #F3F4F6;
    font-family: 'Oswald', sans-serif;
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 1.1;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ---------- Hero: quién soy, qué hago y cómo contactarme ---------- */
.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    align-items: center;
    gap: clamp(32px, 6vw, 80px);
    padding: clamp(48px, 9vh, 96px) max(24px, calc((100% - 1100px) / 2));
    background: linear-gradient(160deg, #1D2D44 0%, #16233A 60%, #0D0E15 100%);
}

.hero-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    min-width: 0;
    container-type: inline-size; /* el nombre se mide contra este ancho */
}

/* Nombre en una sola línea: con esta fuente "ROGELIO CEJA" mide ~9.2em,
   así que 9cqi (≈1/11 del ancho disponible) siempre cabe con margen */
.hero h1 {
    margin: 0;
    color: #F3F4F6;
    font-family: 'MiFuentePersonalizada', 'Oswald', sans-serif;
    font-size: 2rem;
    font-size: min(3.6rem, 9cqi);
    font-weight: bold;
    line-height: 1.05;
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
}

.hero-role {
    margin: 0;
    color: #10B981;
    font-family: 'Oswald', sans-serif;
    font-size: clamp(1.1rem, 1.8vw, 1.35rem);
    font-weight: 500;
    line-height: 1.35;
}

.hero-copy {
    max-width: 520px;
    margin: 0;
    color: #D1D5DB;
    font-size: 1.15rem;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

.hero-photo {
    width: 100%;
    max-width: 420px;
    justify-self: end;
    aspect-ratio: 1;
    border-radius: 24px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}

.hero-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* ---------- Sobre mí ---------- */
.about {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: clamp(24px, 5vw, 72px);
    width: min(100% - 48px, 1100px);
    margin: 80px auto 0;
}

.about-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

.about-body p {
    margin: 0;
    color: #F3F4F6;
    font-size: 1.15rem;
    line-height: 1.65;
}

.about-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

/* ---------- Proyecto destacado ---------- */
.projects {
    margin-top: 88px;
    text-align: center;
}

/* ---------- Móvil ---------- */
@media (max-width: 860px) {
    .hero {
        grid-template-columns: minmax(0, 1fr);
        padding: 40px 20px 48px;
    }

    /* Móvil: todo centrado. Foto → nombre → rol → disponibilidad → texto → botones */
    .hero-photo {
        order: -1;
        justify-self: center;
        max-width: 200px;
        border-radius: 24px;
    }

    .hero-text {
        align-items: center;
        gap: 14px;
        text-align: center;
    }

    .hero-actions,
    .hero .icon-links {
        justify-content: center;
    }

    .hero-actions {
        width: 100%;
    }

    .about {
        grid-template-columns: minmax(0, 1fr);
        width: min(100% - 40px, 640px);
        margin-top: 56px;
        gap: 0;
    }

    .about-body p {
        font-size: 1.05rem;
    }

    .projects {
        margin-top: 64px;
    }
}

@media (max-width: 480px) {
    .hero-actions .btn {
        flex: 1 1 100%;
    }
}
