/* ==========================================================================
   Post Author taxonomy - author detail page
   ========================================================================== */

.wac-author {
    --wac-author-indigo: #1E1470;
    --wac-author-ink: #12123A;
    --wac-author-grey: #6B6B80;
    --wac-author-tint: #F5F6FA;
    --wac-author-max: 1200px;
    --wac-author-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

    font-family: var(--wac-author-font);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.wac-author-hero {
    position: relative;
    background-color: var(--wac-author-indigo);
    color: #ffffff;
    padding: 72px 24px;
    /* The ring overflows the portrait by design - keep it inside the hero so
       it cannot bleed into the header or force a horizontal scrollbar. */
    overflow: hidden;
}

.wac-author-hero__inner {
    display: flex;
    align-items: center;
    gap: 56px;
    max-width: var(--wac-author-max);
    margin: 0 auto;
    min-height: 420px;
}

.wac-author-hero__content {
    flex: 1 1 58%;
    min-width: 0;
}

.wac-author-hero__name {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 44px;
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.wac-author-hero__role {
    margin: 0 0 22px;
    color: #ffffff;
    font-size: 16px;
    line-height: 1.4;
    font-weight: 600;
}

.wac-author-hero__bio {
    max-width: 560px;
    color: rgba(255, 255, 255, .82);
    font-size: 15px;
    line-height: 1.7;
}

.wac-author-hero__bio p {
    margin: 0 0 12px;
}

.wac-author-hero__bio p:last-child {
    margin-bottom: 0;
}

/* Phone / mail / social row */
.wac-author-hero__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    list-style: none;
    margin: 30px 0 0;
    padding: 0;
}

.wac-author-hero__meta-item {
    margin: 0;
    padding: 0 22px;
    border-left: 1px solid rgba(255, 255, 255, .28);
}

.wac-author-hero__meta-item:first-child {
    padding-left: 0;
    border-left: 0;
}

.wac-author-hero__meta-item a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-size: 14px;
    line-height: 1.4;
    text-decoration: none;
}

.wac-author-hero__meta-item a:hover,
.wac-author-hero__meta-item a:focus {
    color: #ffffff;
    text-decoration: underline;
}

.wac-author-hero__meta-item img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.wac-author-hero__meta-item svg {
    flex: 0 0 auto;
}

/* Portrait - the dotted ring is cropped out of the hero artwork and pinned to
   the photo, so the two always scale together whatever the viewport width. */
/* .wac-author-hero__figure {
    position: relative;
    flex: 0 0 30%;
    max-width: 370px;
    margin: 0;
    aspect-ratio: 1;
} */
.wac-author-hero__figure {
    position: relative;
    flex: 0 0 30%;
    max-width: 370px;
    margin: 0;
    aspect-ratio: 1;
    /* Flex items get min-height:auto, which lets the photo's 5:6 intrinsic
       ratio override aspect-ratio and turn the circle into an oval. */
    min-height: 0;
}
/* Ring diameter = 138% of the photo. background-size / position crop the ring
   out of the wide hero panel; nudge those two values to re-centre it. */
.wac-author-hero__figure::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 62%;
    width: 138%;
    height: 138%;
    transform: translate(-50%, -50%);
    background-image: url('../images/author-hero-bg.png');
    background-repeat: no-repeat;
    background-size: 287% 108%;
    background-position: 88% 50%;
    pointer-events: none;
}

/* .wac-author-hero__figure img {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    object-position: top center;
    background-color: #EDE9F2;
} */
 .wac-author-hero__figure img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    object-position: top center;
    background-color: #EDE9F2;
}

/* --------------------------------------------------------------------------
   Latest Insights
   -------------------------------------------------------------------------- */
.wac-author-posts {
    background-color: var(--wac-author-tint);
    padding: 72px 24px 88px;
}

.wac-author-posts__inner {
    max-width: var(--wac-author-max);
    margin: 0 auto;
}

.wac-author-posts__title {
    margin: 0 0 32px;
    color: var(--wac-author-indigo);
    font-size: 32px;
    line-height: 1.2;
    font-weight: 700;
}

.wac-author-posts__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px 24px;
}

.wac-author-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wac-author-card__link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.wac-author-card__media {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background-color: #E4E6EF;
}

.wac-author-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.wac-author-card__link:hover .wac-author-card__media img {
    transform: scale(1.04);
}

.wac-author-card__title {
    margin: 14px 0 0;
    color: var(--wac-author-ink);
    font-size: 15px;
    line-height: 1.5;
    font-weight: 600;
}

.wac-author-card__link:hover .wac-author-card__title {
    color: var(--wac-author-indigo);
}

.wac-author-card__date {
    display: block;
    color: var(--wac-author-grey);
    font-size: 12px;
    line-height: 1.4;
}

/* Load more */
.wac-author-posts__more {
    display: flex;
    justify-content: center;
    margin-top: 48px;
}

.wac-author-posts__more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 156px;
    padding: 14px 32px;
    color: #ffffff;
    background-color: var(--wac-author-indigo);
    border: 0;
    border-radius: 40px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color .25s ease, opacity .25s ease;
}

.wac-author-posts__more-btn:hover {
    background-color: #170F58;
}

.wac-author-posts__more-btn[disabled] {
    opacity: .6;
    cursor: default;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .wac-author-hero__inner {
        gap: 40px;
        min-height: 0;
    }

    .wac-author-hero__name {
        font-size: 36px;
    }

    .wac-author-posts__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* iPad Mini / iPad / iPad Air - 768px to 1024px
   The ring is 138% of the photo and sits at left:62%, so it overhangs the
   photo's right edge by 31% of the figure width. Fixing the figure width and
   reserving >= 31% of it as right margin keeps the ring off the hero edge. */
@media (min-width: 768px) and (max-width: 1024px) {
    .wac-author-hero {
        padding: 64px 32px;
    }

    .wac-author-hero__inner {
        gap: 32px;
    }

    .wac-author-hero__figure {
        flex: 0 0 200px;
        width: 200px;
        max-width: 200px;
        margin-right: 64px; /* 0.31 x 200 = 62px of ring overhang */
    }

    .wac-author-hero__name {
        font-size: 32px;
    }

    .wac-author-hero__role {
        margin-bottom: 18px;
    }

    .wac-author-hero__bio {
        max-width: none;
    }

    .wac-author-hero__meta {
        margin-top: 24px;
    }

    .wac-author-hero__meta-item {
        padding: 0 16px;
    }
}

@media (max-width: 767px) {
    .wac-author-hero {
        padding: 48px 20px;
    }

    .wac-author-hero__inner {
        flex-direction: column-reverse;
        align-items: flex-start;
        gap: 32px;
    }

    /* Explicit square instead of aspect-ratio: the main axis is vertical here,
       and with the photo positioned absolutely the figure has no content
       height to size from, so the ratio alone collapses the box to 0. */
    .wac-author-hero__figure {
        flex: 0 0 auto;
        width: 190px;
        max-width: none;
        height: 190px;
        min-height: 0;
        aspect-ratio: auto;
        align-self: center;
        /* The ring adds 19% of the width above and below the photo. */
        margin: 20px 0;
    }

    .wac-author-hero__name {
        font-size: 30px;
    }

    .wac-author-hero__meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        margin-top: 24px;
    }

    .wac-author-hero__meta-item {
        padding: 0;
        border-left: 0;
    }

    .wac-author-posts {
        padding: 48px 20px 64px;
    }

    .wac-author-posts__title {
        font-size: 26px;
    }

    .wac-author-posts__grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}