* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background-color: #f23a20;          /* rojo-naranja del diseño */
    color: #111;
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* === NAVBAR (centrado arriba) === */
.navbar {
    position: fixed;
    top: 2rem;
    left: 50vw;                 /* 50vw incluye el scrollbar -> centra igual que el home */
    transform: translateX(-50%);
    z-index: 9000;
    display: flex;
    gap: 2rem;
}

.navbar a {
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #111;
    position: relative;
    transition: opacity 0.25s ease;
}

.navbar a:hover { opacity: 0.55; }

.navbar a.active::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 1.5px;
    background: #111;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

/* Botón hamburguesa (oculto en desktop, visible en mobile) */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 26px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: #111;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* === LAYOUT GENERAL === */
.about {
    min-height: 100vh;
    padding: 2rem 3.5rem 1.8rem;
    display: flex;
    flex-direction: column;
}

/* Bloque superior: título + subtítulo, alineado a la derecha */
.about-intro {
    margin-top: 14vh;
    margin-left: auto;
    width: 58%;
    max-width: 780px;
    text-align: right;
}

.about-title {
    margin: 0;
    font-size: clamp(1.6rem, 2.7vw, 2.7rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.5px;
}

.about-sub {
    margin: 1.8rem 0 0;
    font-size: clamp(1.0rem, 1.6vw, 1.45rem);
    font-weight: 400;
    line-height: 1.3;
}

/* Bloque inferior: contacto (izq) + experiencia (der) */
.about-details {
    margin-top: 16vh;          /* margen considerable respecto al texto del about */
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 3rem;
    padding-bottom: 2.5rem;
}

/* Contacto / datos personales */
.about-links {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-bottom: 1.9rem;
}

.about-links a {
    color: #111;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.15rem;
    transition: opacity 0.25s ease;
}

.about-links a:hover { opacity: 0.6; }

.about-personal {
    margin: 0;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.55;
}

/* Experiencia */
.about-experience {
    width: 44%;
    max-width: 560px;
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.exp-item {
    font-size: 1rem;
    line-height: 1.45;
}

.exp-company {
    font-weight: 700;
}

.exp-light {
    font-weight: 400;
}

.exp-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-weight: 400;
}

/* Footer */
.about-footer {
    margin-top: auto;          /* empuja el footer al fondo */
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(17, 17, 17, 0.5);
}

/* === ANIMACIÓN DE ENTRADA (fade-up escalonado) === */
@keyframes aboutFadeUp {
    from { opacity: 0; transform: translateY(26px); }
    to   { opacity: 1; transform: translateY(0); }
}

.about-title,
.about-sub,
.about-links,
.about-personal,
.about-experience .exp-item,
.about-footer {
    opacity: 0;                /* estado inicial antes de animar */
    animation: aboutFadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.about-title    { animation-delay: 0.15s; }
.about-sub      { animation-delay: 0.30s; }
.about-links    { animation-delay: 0.45s; }
.about-personal { animation-delay: 0.55s; }

.about-experience .exp-item:nth-child(1) { animation-delay: 0.60s; }
.about-experience .exp-item:nth-child(2) { animation-delay: 0.70s; }
.about-experience .exp-item:nth-child(3) { animation-delay: 0.80s; }
.about-experience .exp-item:nth-child(4) { animation-delay: 0.90s; }
.about-experience .exp-item:nth-child(5) { animation-delay: 1.00s; }

.about-footer   { animation-delay: 1.15s; }

@media (prefers-reduced-motion: reduce) {
    .about-title,
    .about-sub,
    .about-links,
    .about-personal,
    .about-experience .exp-item,
    .about-footer {
        opacity: 1;
        animation: none;
    }
}

/* === Responsive === */
@media (max-width: 820px) {
    .navbar {
        top: 1.4rem;
        left: auto;
        right: 1.4rem;
        transform: none;
        flex-direction: column;
        align-items: flex-end;
        gap: 1rem;
    }

    .nav-toggle {
        display: flex;
        width: 46px;
        height: 40px;
        padding: 11px 10px;
        background: rgba(255, 255, 255, 0.92);
        border-radius: 10px;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    }

    .nav-links {
        display: none;
        flex-direction: column;
        align-items: flex-end;
        gap: 1.1rem;
    }

    .navbar.open .nav-links {
        display: flex;
        background: rgba(255, 255, 255, 0.95);
        padding: 1rem 1.2rem;
        border-radius: 10px;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
    }

    .navbar.open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .navbar.open .nav-toggle span:nth-child(2) { opacity: 0; }
    .navbar.open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    .about {
        padding: 5rem 1.5rem 1.5rem;
    }

    .about-intro {
        width: 100%;
        max-width: none;
        text-align: left;
        margin-top: 2rem;
    }

    /* En mobile el texto fluye solo (sin los saltos de línea forzados del desktop) */
    .about-title br,
    .about-sub br {
        display: none;
    }

    .about-title {
        font-size: clamp(1.7rem, 7vw, 2.4rem);
    }

    .about-details {
        margin-top: 8vh;
    }

    .about-details {
        flex-direction: column;
        align-items: stretch;
        gap: 2.5rem;
        padding-bottom: 1.5rem;
    }

    .about-experience {
        width: 100%;
        max-width: none;
    }

    .about-footer {
        font-size: 0.6rem;
        letter-spacing: 1px;
    }
}
