/*
 * Author profile pages: /author/{name}/ (taxonomy-blog_author.php + template-parts/author-post-card.php).
 * Loaded only on those pages. Own author_* classes, so blog/newsroom CSS can't affect it and
 * editing this file can't affect them.
 * Layout follows Ellucian's author pages (large "Author" title, a solid brand panel with the
 * photo, name and job title on the left and the bio on the right) in Academia's colours:
 * navy #2a2c5b panel, red #b2242e accents, white text.
 * Font sizes are set here rather than with the theme's fs-* classes, which have no
 * tablet/mobile sizes for some steps (fs-48 shrank to ~7px on phones).
 * The CTA and subscribe sections at the bottom are the site-wide ones and keep their own CSS.
 */

/* ---------- Page title ---------- */
.author_profile_page {
    padding-top: 4.55vw;
}
.author_profile_page .author_page_title {
    margin: 0 0 48px;
    color: #2a2c5b;
    font-size: clamp(44px, 3vw, 84px);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.015em;
}

/* ---------- Brand panel: photo, name and title | divider | bio ---------- */
.author_profile_page .author_profile_panel {
    display: grid;
    grid-template-columns: 312px minmax(0, 1fr);
    background: #2a2c5b;
    color: #ffffff;
    padding: 72px 72px 80px;
    border-radius: 4px;
}
.author_profile_page .author_profile_card {
    padding-right: 72px;
    text-align: center;
}
.author_profile_page .author_profile_photo {
    margin: 0 auto; /* <figure> default margins */
    width: 100%;
    max-width: 312px;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: linear-gradient(135deg, #3a3d78 0%, #b2242e 100%);
}
.author_profile_page .author_profile_photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}
.author_profile_page .author_profile_initials {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 96px;
    font-weight: 500;
    letter-spacing: 0.04em;
}
.author_profile_page .author_profile_name {
    margin: 26px 0 0;
    color: #ffffff;
    font-size: clamp(24px, 2vw, 32px);
    font-weight: 500;
    line-height: 1.2;
}
.author_profile_page .author_profile_title {
    margin: 10px 0 0;
    color: #cfd1ee;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.4;
}
.author_profile_page .author_profile_linkedin {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    opacity: 0.9;
}
.author_profile_page .author_profile_linkedin:hover,
.author_profile_page .author_profile_linkedin:focus,
.author_profile_page .author_profile_linkedin:visited {
    color: #ffffff;
    opacity: 1;
    text-decoration: none;
}
.author_profile_page .author_profile_linkedin:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 4px;
}
.author_profile_page .author_profile_bio {
    border-left: 1px solid rgba(255, 255, 255, 0.28);
    padding-left: 72px;
    color: #ffffff;
    font-size: clamp(19px, 1.55vw, 26px);
    line-height: 1.55;
}
.author_profile_page .author_profile_bio p {
    margin: 0 0 1em;
    color: inherit;
    font-size: inherit;
    line-height: inherit;
}
.author_profile_page .author_profile_bio p:last-child {
    margin-bottom: 0;
}
.author_profile_page .author_profile_bio strong,
.author_profile_page .author_profile_bio b {
    color: #ffffff;
    font-weight: 600;
}
.author_profile_page .author_profile_bio a {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.author_profile_page .screen-reader-text,
.author_posts_section .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Related content ---------- */
.author_posts_section {
    padding: 4.55vw 0 40px;
}
.author_posts_section .author_posts_title {
    margin: 0 0 28px;
    color: #2a2c5b;
    font-size: clamp(26px, 2.4vw, 40px);
    font-weight: 600;
    line-height: 1.2;
}
.author_posts_section .author_posts_grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}
.author_posts_section .author_post_item {
    display: flex;
    margin: 0;
}
.author_posts_section .author_post_card,
.author_posts_section .author_post_card:hover,
.author_posts_section .author_post_card:focus,
.author_posts_section .author_post_card:visited {
    text-decoration: none; /* custom-style.css underlines every a:hover */
}
.author_posts_section .author_post_card {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    background: #fbfbfb;
    border: 1px solid rgba(18, 18, 18, 0.1);
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(18, 18, 18, 0.12);
    padding: 16px;
    color: inherit;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.author_posts_section .author_post_card:hover,
.author_posts_section .author_post_card:focus-visible {
    box-shadow: 0 8px 22px rgba(18, 18, 18, 0.16);
    transform: translateY(-2px);
}
.author_posts_section .author_post_card:focus-visible {
    outline: 3px solid #2a2c5b;
    outline-offset: 3px;
}
.author_posts_section .author_post_card_img {
    aspect-ratio: 1200 / 630;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
}
.author_posts_section .author_post_card_img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.author_posts_section .author_post_card_placeholder {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #2a2c5b 0%, #b2242e 100%);
}
.author_posts_section .author_post_card_body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 14px 8px 8px;
}
.author_posts_section .author_post_card_meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    list-style: none;
    margin: 0;
    padding: 0;
    color: #64607d;
    font-size: 14px;
    line-height: 1.4;
}
.author_posts_section .author_post_card_title {
    margin: 10px 0 14px;
    color: #2a2c5b;
    font-size: clamp(18px, 1.35vw, 22px);
    font-weight: 500;
    line-height: 1.3;
}
.author_posts_section .author_post_card_tag {
    align-self: flex-start;
    margin-top: auto;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(42, 44, 91, 0.08);
    color: #2a2c5b;
    font-size: 13px;
    line-height: 1.4;
}
.author_posts_section .author_load_btn {
    justify-content: center;
    margin-top: 3.365vw;
}
.author_posts_section .author_load_btn .bg_button,
.author_posts_section .author_load_btn .bg_button:hover,
.author_posts_section .author_load_btn .bg_button:focus,
.author_posts_section .author_load_btn .bg_button:visited {
    text-decoration: none;
}
.author_posts_section .author_posts_empty {
    color: #64607d;
    font-size: 18px;
}

/* ---------- Tablet ---------- */
@media screen and (max-width: 1199px) {
    .author_profile_page .author_profile_panel {
        grid-template-columns: 260px minmax(0, 1fr);
        padding: 56px 48px 60px;
    }
    .author_profile_page .author_profile_card {
        padding-right: 48px;
    }
    .author_profile_page .author_profile_bio {
        padding-left: 48px;
    }
}
@media screen and (max-width: 991px) {
    .author_profile_page .author_page_title {
        margin-bottom: 32px;
    }
    .author_profile_page .author_profile_panel {
        grid-template-columns: 220px minmax(0, 1fr);
        padding: 44px 36px 48px;
    }
    .author_profile_page .author_profile_card {
        padding-right: 36px;
    }
    .author_profile_page .author_profile_bio {
        padding-left: 36px;
        font-size: 18px;
    }
    .author_profile_page .author_profile_initials {
        font-size: 64px;
    }
    .author_posts_section .author_posts_grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }
    .author_posts_section .author_load_btn {
        margin-top: 5.365vw;
    }
}

/* ---------- Mobile: photo, name and title on top, divider becomes a line, bio below ---------- */
@media screen and (max-width: 767px) {
    .author_profile_page {
        padding-top: 30px;
    }
    .author_profile_page .author_page_title {
        margin-bottom: 22px;
    }
    .author_profile_page .author_profile_panel {
        grid-template-columns: minmax(0, 1fr);
        padding: 32px 22px 36px;
    }
    .author_profile_page .author_profile_card {
        padding-right: 0;
        padding-bottom: 26px;
    }
    .author_profile_page .author_profile_photo {
        max-width: 220px;
    }
    .author_profile_page .author_profile_initials {
        font-size: 60px;
    }
    .author_profile_page .author_profile_name {
        margin-top: 18px;
    }
    .author_profile_page .author_profile_title {
        font-size: 16px;
    }
    .author_profile_page .author_profile_bio {
        border-left: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.28);
        padding-left: 0;
        padding-top: 24px;
        font-size: 17px;
        line-height: 1.6;
    }
    .author_posts_section {
        padding: 36px 0 20px;
    }
    .author_posts_section .author_posts_title {
        margin-bottom: 18px;
    }
    .author_posts_section .author_posts_grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }
    .author_posts_section .author_load_btn {
        margin-top: 8.365vw;
    }
}
