/* ============================================================
   Fichas de autor (/Autor y /Autor/{slug}).
   Retícula tipo bento: el avatar ocupa una columna alta a la
   izquierda y a la derecha se apilan nombre, stack y estado.
   ============================================================ */

:root {
    --ap-ink: #373849;
    --ap-ink-soft: #8a8fa0;
    --ap-card: #fbfcfe;
    --ap-ink: #373849;
    --ap-chip: #f1f3f7;
    /* El degradado de la marca, el mismo del hero y de los títulos del
       blog. Se reserva para el énfasis — cifras, estados y enlaces — y
       nunca para texto corrido. */
    --ap-grad: linear-gradient(130deg, #3ec1be, #cd366d);
    --ap-accent: #cd366d; /* rosa de marca: texto y enlaces */
    --ap-accent-deep: #a82a58; /* el mismo, para hover */
    --ap-accent-2: #3ec1be; /* turquesa de marca */
    --ap-accent-soft: #fdeff4;
    --ap-accent-line: #f5d5e0;
    --ap-ease: cubic-bezier(0.32, 0.08, 0.24, 1);
    --ap-radius: 24px;
}

.ap-page {
    max-width: 76rem;
    margin: 0 auto;
    padding: 0 1.5rem 5rem 1.5rem;
    font-family: 'satoshiregular';
    color: var(--ap-ink);
}

/* ---------- Retícula ---------- */

.ap-grid {
    display: grid;
    grid-template-columns: 22rem 1fr 1fr;
    grid-template-areas:
        "avatar name   name"
        "avatar stack  status"
        "links  links  links";
    gap: 1.25rem;
    align-items: stretch;
}

.ap-card {
    background-color: var(--ap-card);
    border-radius: var(--ap-radius);
    padding: 2.2rem 2.4rem;
}

/* ---------- Avatar ---------- */

.ap-avatar {
    grid-area: avatar;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 1.5rem;
    background-color: var(--ap-card);
    border-radius: var(--ap-radius);
    overflow: hidden;
}

    .ap-avatar img {
        width: 100%;
        max-width: 15rem;
        height: auto;
        /* La ilustracion apoya en el borde inferior, como en la referencia. */
        display: block;
    }

/* ---------- Nombre ---------- */

.ap-name {
    grid-area: name;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ap-name h1 {
    margin: 0;
    font-family: 'satoshibold';
    font-size: 3rem;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--ap-ink);
}

.ap-name p {
    margin: 0.6rem 0 0 0;
    font-size: 1.25rem;
    color: var(--ap-ink-soft);
}

/* ---------- Etiqueta de seccion ---------- */

.ap-label {
    margin: 0 0 0.9rem 0;
    font-family: 'satoshimedium';
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ap-ink-soft);
}

/* ---------- Stack ---------- */

.ap-stack {
    grid-area: stack;
}

.ap-stack ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ap-stack li {
    font-family: 'satoshibold';
    font-size: 1.35rem;
    line-height: 1.55;
    color: var(--ap-ink);
}

/* ---------- Estado ---------- */

.ap-status {
    grid-area: status;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: var(--ap-ink);
    border-radius: var(--ap-radius);
    padding: 2.2rem 2.4rem;
}

.ap-status-head {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-family: 'satoshibold';
    font-size: 1.35rem;
    color: #fff;
}

.ap-dot {
    flex: none;
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
    background-color: #22c37b;
    /* Latido muy suave: solo un halo que crece y se apaga. */
    box-shadow: 0 0 0 0 rgb(34 195 123 / 55%);
    animation: ap-pulse 2.4s var(--ap-ease) infinite;
}

.ap-dot.is-off {
    background-color: #6b6f7b;
    box-shadow: none;
    animation: none;
}

@keyframes ap-pulse {
    0% { box-shadow: 0 0 0 0 rgb(34 195 123 / 55%); }
    70% { box-shadow: 0 0 0 0.6rem rgb(34 195 123 / 0%); }
    100% { box-shadow: 0 0 0 0 rgb(34 195 123 / 0%); }
}

.ap-status p {
    margin: 0.75rem 0 0 0;
    font-size: 1.05rem;
    color: #a9aebb;
}

/* ---------- Enlaces ---------- */

.ap-links {
    grid-area: links;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    min-height: 8rem;
}

    .ap-links .ap-label {
        margin: 0;
    }

.ap-links-row {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.ap-link {
    /* Los svg de redes del proyecto ya traen su propio recuadro oscuro,
       asi que el enlace no pinta fondo: solo lo levanta al pasar. */
    display: inline-flex;
    border-radius: 14px;
    transition: transform 0.25s var(--ap-ease),
                box-shadow 0.25s var(--ap-ease);
}

    .ap-link:hover {
        transform: translateY(-3px);
        box-shadow: 0 12px 24px -12px rgb(31 35 51 / 55%);
    }

    .ap-link img {
        display: block;
        width: 3.1rem;
        height: 3.1rem;
        border-radius: 14px;
    }

/* ---------- Listado de autores ---------- */

.ap-heading {
    margin: 0 0 0.4rem 0;
    font-family: 'satoshibold';
    font-size: 2.4rem;
    letter-spacing: -0.03em;
    color: var(--ap-ink);
}

.ap-sub {
    margin: 0 0 2rem 0;
    font-size: 1.05rem;
    color: var(--ap-ink-soft);
}

.ap-people {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.ap-person {
    display: flex;
    align-items: center;
    gap: 1.6rem;
    padding: 1.6rem;
    background-color: var(--ap-card);
    border-radius: var(--ap-radius);
    text-decoration: none;
    transition: transform 0.28s var(--ap-ease),
                box-shadow 0.28s var(--ap-ease);
}

    .ap-person:hover {
        transform: translateY(-4px);
        box-shadow: 0 22px 40px -22px rgb(31 35 51 / 45%);
    }

.ap-person-avatar {
    flex: none;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    width: 9rem;
    height: 9rem;
    background-color: #eef1f6;
    border-radius: 20px;
    overflow: hidden;
}

    .ap-person-avatar img {
        width: 82%;
        height: auto;
    }

.ap-person-name {
    margin: 0;
    font-family: 'satoshibold';
    font-size: 1.6rem;
    letter-spacing: -0.02em;
    color: var(--ap-ink);
}

.ap-person-role {
    margin: 0.3rem 0 0 0;
    color: var(--ap-ink-soft);
}

.ap-person-more {
    display: inline-block;
    margin-top: 0.9rem;
    font-family: 'satoshimedium';
    color: var(--ap-accent);
}

/* ---------- Adaptaciones ---------- */

@media screen and (max-width: 1023px) {
    .ap-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "avatar name"
            "stack  status"
            "links  links";
    }

    .ap-name h1 {
        font-size: 2.3rem;
    }

    .ap-people {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 767px) {
    .ap-page {
        padding: 0 1rem 3rem 1rem;
    }

    .ap-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "avatar"
            "name"
            "stack"
            "status"
            "links";
    }

    .ap-card,
    .ap-status {
        padding: 1.6rem 1.5rem;
    }

    .ap-name h1 {
        font-size: 2rem;
    }

    .ap-links {
        min-height: 0;
        align-items: flex-start;
        flex-direction: column;
        gap: 1.1rem;
    }

    .ap-person {
        flex-direction: column;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ap-dot {
        animation: none;
    }

    .ap-person,
    .ap-link {
        transition-duration: 0.01ms;
    }
}

/* ============================================================
   Bloques de contenido bajo la retícula principal.
   Siguen el orden de la hoja de vida: perfil, experiencia,
   proyectos y habilidades a la izquierda; formación, idiomas
   y contacto en la columna estrecha.
   ============================================================ */

/* ---------- Modalidad ---------- */

.ap-modality {
    align-self: flex-start;
    margin-bottom: 0.9rem;
    padding: 0.3rem 0.85rem;
    font-family: 'satoshimedium';
    font-size: 0.8rem;
    color: var(--ap-accent-deep);
    background-color: var(--ap-accent-soft);
    border-radius: 999px;
}

/* ---------- Cifras ---------- */

.ap-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 1.25rem;
}

.ap-stat {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

/* La cifra lleva el degradado recortado sobre el texto, igual que los
   títulos del blog; la etiqueta se queda en gris para que el número sea
   lo primero que se lee. El color plano va antes como respaldo, por si
   background-clip no se aplica. */
.ap-stat-value {
    font-family: 'satoshibold';
    font-size: 2.4rem;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--ap-accent);
    background-image: var(--ap-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    /* Sin esto el degradado se calcula sobre la caja de línea y los
       números de una fila salen con tonos distintos. */
    width: fit-content;
}

.ap-stat-label {
    font-size: 0.9rem;
    color: var(--ap-ink-soft);
}

/* Una línea vertical separa las cifras, como en el panel de referencia. */
.ap-stat + .ap-stat {
    padding-left: 1.5rem;
    border-left: 1px solid #e8ebf2;
}

/* ---------- Perfil ---------- */

.ap-about {
    margin-top: 1.25rem;
}

.ap-para {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    line-height: 1.7;
    color: #4a4d5c;
}

    .ap-para:last-of-type {
        margin-bottom: 0;
    }

.ap-label-inline {
    margin-top: 1.8rem;
}

.ap-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ap-topic {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    color: var(--ap-ink);
    background-color: #eef1f6;
    border-radius: 999px;
}

/* Las tecnologías de un proyecto van en monoespaciada, como en la hoja
   de vida: se leen como nombres de herramienta, no como texto. */
.ap-topic-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    border-radius: 8px;
}

/* ---------- Dos columnas ---------- */

.ap-columns {
    display: grid;
    grid-template-columns: 1.55fr 1fr;
    gap: 1.25rem;
    margin-top: 1.25rem;
    align-items: start;
}

/* Cada columna apila sus tarjetas con la misma separación que la retícula. */
.ap-col {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.ap-sub-title {
    margin: 1.5rem 0 0.8rem 0;
    font-family: 'satoshibold';
    font-size: 1.05rem;
    color: var(--ap-ink);
}

    .ap-sub-title:first-of-type {
        margin-top: 0;
    }

/* ---------- Etiquetas ---------- */

.ap-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.ap-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    font-size: 0.88rem;
    color: var(--ap-ink);
    background-color: #fff;
    border: 1px solid #e6eaf2;
    border-radius: 10px;
    transition: border-color 0.2s var(--ap-ease),
                box-shadow 0.2s var(--ap-ease);
}

    .ap-chip:hover {
        border-color: #cfd8e6;
        box-shadow: 0 6px 14px -10px rgb(31 35 51 / 45%);
    }

/* ---------- Experiencia ---------- */

.ap-timeline ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ap-timeline > ol > li {
    position: relative;
    padding: 0 0 2rem 1.7rem;
    /* La línea de la cronología, con el punto encima. */
    border-left: 2px solid #e8ebf2;
}

    .ap-timeline > ol > li:last-child {
        padding-bottom: 0;
        border-left-color: transparent;
    }

    .ap-timeline > ol > li::before {
        content: "";
        position: absolute;
        top: 0.2rem;
        left: -0.42rem;
        width: 0.7rem;
        height: 0.7rem;
        background-color: #c9d2e0;
        border: 2px solid var(--ap-card);
        border-radius: 50%;
    }

    .ap-timeline > ol > li:first-child::before {
        background-image: var(--ap-grad);
    }

.ap-job-period {
    margin: 0 0 0.25rem 0;
    font-size: 0.85rem;
    color: var(--ap-ink-soft);
}

.ap-job-head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

    .ap-job-head h3 {
        margin: 0;
        font-family: 'satoshibold';
        font-size: 1.15rem;
        color: var(--ap-ink);
    }

.ap-badge {
    padding: 0.15rem 0.55rem;
    font-family: 'satoshimedium';
    font-size: 0.72rem;
    color: #1f6b45;
    background-color: #ddf3e6;
    border-radius: 999px;
}

.ap-badge-soft {
    color: var(--ap-accent-deep);
    background-color: var(--ap-accent-soft);
}

.ap-job-meta {
    margin: 0.3rem 0 0 0;
    font-family: 'satoshimedium';
    font-size: 0.9rem;
    color: var(--ap-ink-soft);
}

.ap-job-detail {
    margin: 0.55rem 0 0.9rem 0;
    font-size: 0.93rem;
    line-height: 1.6;
    color: #4a4d5c;
}

/* Los logros de cada puesto: viñetas discretas, texto algo más pequeño
   que el cuerpo para que la lista no compita con el titular. */
.ap-job-list {
    margin: 0.9rem 0 0 0;
    padding: 0;
    list-style: none;
}

    .ap-job-list li {
        position: relative;
        padding-left: 1rem;
        font-size: 0.92rem;
        line-height: 1.65;
        color: #4a4d5c;
    }

        .ap-job-list li + li {
            margin-top: 0.7rem;
        }

        .ap-job-list li::before {
            content: "";
            position: absolute;
            top: 0.62rem;
            left: 0;
            width: 5px;
            height: 5px;
            background-color: #c9d2e0;
            border-radius: 50%;
        }

/* ---------- Proyectos ---------- */

.ap-project + .ap-project {
    margin-top: 1.8rem;
    padding-top: 1.8rem;
    border-top: 1px solid #eceff5;
}

.ap-project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.9rem;
    font-family: 'satoshimedium';
    font-size: 0.88rem;
    color: var(--ap-accent);
    text-decoration: none;
    border-bottom: 1px solid var(--ap-accent-line);
    transition: border-color 0.2s var(--ap-ease);
}

    .ap-project-link:hover {
        color: var(--ap-accent-deep);
        border-bottom-color: var(--ap-accent);
    }

    .ap-project-link svg {
        width: 0.85rem;
        height: 0.85rem;
    }

/* ---------- Certificaciones y cursos ---------- */

.ap-creds {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
}

.ap-cred {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.ap-cred-name {
    font-family: 'satoshibold';
    font-size: 1.02rem;
    line-height: 1.3;
    color: var(--ap-ink);
}

.ap-cred-year {
    font-size: 0.85rem;
    color: var(--ap-ink-soft);
}

/* ---------- Idiomas ---------- */

.ap-langs {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.ap-lang {
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
}

    .ap-lang strong {
        font-family: 'satoshibold';
        font-size: 1.05rem;
        color: var(--ap-ink);
    }

    .ap-lang span {
        font-size: 0.85rem;
        color: var(--ap-ink-soft);
    }

/* ---------- Educación ---------- */

.ap-study + .ap-study {
    margin-top: 1.4rem;
}

.ap-study h3 {
    margin: 0;
    font-family: 'satoshibold';
    font-size: 1.08rem;
    line-height: 1.3;
    color: var(--ap-ink);
}

.ap-study-year {
    margin: 0.2rem 0 0 0;
    font-size: 0.85rem;
    color: var(--ap-ink-soft);
}

/* ---------- Contacto ---------- */

.ap-contact-row {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.7rem;
    margin: 0 -0.7rem;
    border-radius: 14px;
    text-decoration: none;
    transition: background-color 0.2s var(--ap-ease);
}

    .ap-contact-row:hover {
        background-color: #f2f4f8;
    }

.ap-contact-ico {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    color: var(--ap-ink);
    background-color: #eef1f6;
    border-radius: 12px;
}

    .ap-contact-ico svg {
        width: 1.15rem;
        height: 1.15rem;
    }

.ap-contact-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.ap-contact-label {
    font-size: 0.78rem;
    color: var(--ap-ink-soft);
}

.ap-contact-value {
    font-family: 'satoshimedium';
    font-size: 0.95rem;
    color: var(--ap-ink);
    overflow-wrap: anywhere;
}

/* ---------- Llamada final ---------- */

.ap-cta {
    margin-top: 1.25rem;
    padding: 3.2rem 2.4rem;
    text-align: center;
    background-color: var(--ap-ink);
    border-radius: var(--ap-radius);
}

.ap-cta h2 {
    margin: 0;
    font-family: 'satoshibold';
    font-size: 2rem;
    letter-spacing: -0.03em;
    color: #fff;
}

.ap-cta p {
    margin: 0.8rem auto 0 auto;
    max-width: 34rem;
    font-size: 1rem;
    line-height: 1.6;
    color: #a9aebb;
}

.ap-cta-actions {
    display: flex;
    justify-content: center;
    gap: 0.7rem;
    flex-wrap: wrap;
    margin-top: 1.8rem;
}

.ap-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    font-family: 'satoshimedium';
    font-size: 0.95rem;
    border-radius: 12px;
    text-decoration: none;
    transition: transform 0.2s var(--ap-ease),
                background-color 0.2s var(--ap-ease),
                box-shadow 0.2s var(--ap-ease);
}

    .ap-btn:active {
        transform: translateY(1px);
    }

.ap-btn-primary {
    color: var(--ap-ink);
    background-color: #fff;
}

    .ap-btn-primary:hover {
        color: var(--ap-ink);
        box-shadow: 0 10px 24px -10px rgb(255 255 255 / 45%);
    }

.ap-btn-ghost {
    color: #fff;
    background-color: rgb(255 255 255 / 10%);
}

    .ap-btn-ghost:hover {
        color: #fff;
        background-color: rgb(255 255 255 / 18%);
    }

/* ---------- Ciudad bajo el nombre ---------- */

.ap-place {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0.9rem 0 0 0 !important;
    font-size: 0.95rem !important;
    color: var(--ap-ink-soft);
}

    .ap-place svg {
        width: 1rem;
        height: 1rem;
    }

/* ---------- Adaptaciones ---------- */

@media screen and (max-width: 1023px) {
    .ap-stats {
        grid-template-columns: 1fr 1fr;
        gap: 1.6rem;
    }

    /* Con dos columnas, la línea sobra al principio de cada fila. */
    .ap-stat:nth-child(odd) {
        padding-left: 0;
        border-left: 0;
    }

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

@media screen and (max-width: 767px) {
    .ap-stats {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .ap-stat + .ap-stat {
        padding-left: 0;
        padding-top: 1.2rem;
        border-left: 0;
        border-top: 1px solid #e8ebf2;
    }

    .ap-stat-value {
        font-size: 2rem;
    }

    .ap-creds {
        grid-template-columns: 1fr;
    }

    .ap-cta {
        padding: 2.2rem 1.5rem;
    }

    .ap-cta h2 {
        font-size: 1.5rem;
    }

    .ap-btn {
        width: 100%;
    }
}
