/* ============================================================
 * Tresl Author Archive (/author/<slug>/)
 *
 * - Header banner dark teal + media-luna amarilla.
 * - Bloque de bio con avatar grande + info + socials.
 * - Listado de posts del autor con cards.
 * ============================================================ */

/* Aliases from the global brand tokens (:root in style.css). Recolor
   the dark/accent everywhere by editing style.css → "TRESL BRAND TOKENS". */
.tresl-author-archive {
    --tresl-blue:   var(--tresl-color-primary, #1A6DB6);
    --tresl-dark:   var(--tresl-color-dark, #003844);
    --tresl-accent: var(--tresl-color-accent, #FAB041);
    --tresl-text:   #000000;

    color: var(--tresl-text);
}

/* ============================
 * HEADER BANNER
 * ============================ */
.tresl-author-archive__header {
    --header-h: 260px;
    --container-max: 1440px;
    --container-overflow: max(0px, calc((100vw - var(--container-max)) / 2));
    --accent-size: clamp(420px, 48vw, 720px);
    --accent-cx: calc(100% - var(--container-overflow));

    position: relative;
    width: 100%;
    height: var(--header-h);
    min-height: var(--header-h);
    background: var(--tresl-dark);
    color: #fff;
    overflow: hidden;
    isolation: isolate;
}

.tresl-author-archive__header::before {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    left: var(--accent-cx);
    right: 0;
    background: var(--tresl-accent);
    z-index: 1;
}

.tresl-author-archive__header-accent {
    position: absolute;
    top: 50%;
    left: var(--accent-cx);
    width: var(--accent-size);
    height: var(--accent-size);
    transform: translate(-50%, -50%);
    background: var(--tresl-accent);
    border-radius: 50%;
    z-index: 1;
}

.tresl-author-archive__header-content {
    position: relative;
    z-index: 3;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 32px;
    gap: 10px;
}

.tresl-author-archive__header-eyebrow {
    margin: 0;
    font-family: 'Montserrat', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #fff;
    opacity: .9;
}

.tresl-author-archive__header-title {
    margin: 0;
    font-family: 'Montserrat', system-ui, sans-serif;
    font-size: 48px;
    font-weight: 700;
    line-height: 1.1;
    color: #fff;
}

/* ============================
 * BIO BLOCK
 * ============================ */
.tresl-author-archive__bio {
    padding: 64px 24px 32px;
}

.tresl-author-archive__bio-inner {
    max-width: 980px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 40px;
    align-items: start;
}

.tresl-author-archive__avatar-wrap {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    background: #E6EEF6;
}

.tresl-author-archive__avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tresl-author-archive__name {
    margin: 0;
    font-family: 'Montserrat', system-ui, sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--tresl-dark);
}

.tresl-author-archive__role {
    margin: 4px 0 0;
    font-family: 'Lato', system-ui, sans-serif;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
    color: var(--tresl-blue);
}

.tresl-author-archive__bio-text {
    margin: 18px 0 0;
    font-family: 'Lato', system-ui, sans-serif;
    font-size: 17px;
    font-weight: 500;
    line-height: 1.55;
    color: var(--tresl-text);
}

.tresl-author-archive__bio-text p { margin: 0 0 1em; }
.tresl-author-archive__bio-text p:last-child { margin-bottom: 0; }
.tresl-author-archive__bio-text a {
    color: var(--tresl-blue);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.tresl-author-archive__bio-text a:hover { text-decoration: none; }

/* ===== Social ===== */
.tresl-author-archive__social {
    list-style: none;
    margin: 22px 0 0;
    padding: 0;
    display: flex;
    gap: 12px;
}

.tresl-author-archive__social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--tresl-blue);
    border: 1.5px solid currentColor;
    text-decoration: none;
    font-size: 15px;
    transition: background-color .2s ease, color .2s ease, transform .2s ease;
}

.tresl-author-archive__social a:hover {
    background: var(--tresl-blue);
    color: #fff;
    transform: translateY(-1px);
}

/* ============================
 * POSTS LIST
 * ============================ */
.tresl-author-archive__posts {
    padding: 32px 24px 72px;
}

.tresl-author-archive__posts-inner {
    max-width: 980px;
    margin: 0 auto;
}

.tresl-author-archive__posts-title {
    margin: 0 0 28px;
    font-family: 'Montserrat', system-ui, sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--tresl-dark);
}

.tresl-author-archive__posts-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

.tresl-author-archive__card {}

.tresl-author-archive__card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 1px solid #E6EEF6;
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow .2s ease, transform .2s ease;
}

.tresl-author-archive__card-link:hover {
    box-shadow: 0 8px 20px rgba(13, 44, 62, .12);
    transform: translateY(-2px);
}

.tresl-author-archive__card-image {
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
    background-color: #E6EEF6;
}

.tresl-author-archive__card-image--placeholder {
    background-color: var(--tresl-blue);
}

.tresl-author-archive__card-body {
    padding: 18px 20px 22px;
}

.tresl-author-archive__card-date {
    margin: 0 0 6px;
    font-family: 'Lato', system-ui, sans-serif;
    font-size: 13px;
    color: #555;
}

.tresl-author-archive__card-title {
    margin: 0;
    font-family: 'Montserrat', system-ui, sans-serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--tresl-dark);
}

.tresl-author-archive__card-excerpt {
    margin: 10px 0 0;
    font-family: 'Lato', system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: #000;
}

/* ============================
 * PAGINATION
 * ============================ */
.tresl-author-archive__pagination {
    margin: 36px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.tresl-author-archive__pagination a,
.tresl-author-archive__pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: 18px;
    font-family: 'Lato', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    color: var(--tresl-dark);
    border: 1px solid #d6dde3;
    background: #fff;
}

.tresl-author-archive__pagination .current {
    background: var(--tresl-blue);
    color: #fff;
    border-color: var(--tresl-blue);
}

.tresl-author-archive__pagination a:hover {
    background: #f0f5f9;
}

/* ============================
 * RESPONSIVE
 * ============================ */
@media (max-width: 880px) {
    .tresl-author-archive__header { --header-h: 200px; }
    .tresl-author-archive__header-title { font-size: 34px; }

    .tresl-author-archive__bio { padding: 48px 20px 24px; }

    .tresl-author-archive__bio-inner {
        grid-template-columns: 120px 1fr;
        gap: 24px;
    }

    .tresl-author-archive__avatar-wrap {
        width: 120px;
        height: 120px;
    }

    .tresl-author-archive__name { font-size: 24px; }

    .tresl-author-archive__posts-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .tresl-author-archive__header { --header-h: 170px; }
    .tresl-author-archive__header-title { font-size: 26px; }

    .tresl-author-archive__bio-inner {
        grid-template-columns: 1fr;
    }
}
