/* ============================================================
   NTM Article — Author bio (dark, split editorial)

   Figma reference: 1920x659 section, dark #161616 background.
       - Portrait bleeds to the section's left edge and is taller
         than the section: its bottom sits flush with the section
         bottom and its top extends ABOVE the section top.
       - Diagonal teal beam/streak behind the portrait.
       - Right column with rule-flanked "WRITTEN BY" eyebrow,
         serif name, italic bio paragraph.
   On narrow viewports collapses to a centered stacked column.
   ============================================================ */

.ntm-article-author {
    position: relative;
    background-color: #161616;
    color: #ffffff;
    /* No vertical padding — portrait bleeds top/bottom of the section.
       Right padding is applied to the inner so the text has breathing room. */
    padding: 0;
    /* overflow visible so the portrait can extend above the section.
       Children with their own overflow:hidden (arc, vignette) clip themselves. */
    overflow: visible;
    isolation: isolate;
}

/* Diagonal beam glow behind the portrait — clipped to the section. */
.ntm-article-author__arc {
    position: absolute;
    top: 0;
    left: 0;
    width: 80%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.ntm-article-author__arc img {
    position: absolute;
    top: 50%;
    left: 0;
    width: 110%;
    height: auto;
    max-width: none;
    transform: translateY(-55%);
    object-fit: contain;
    object-position: left center;
    display: block;
    opacity: 0.7;
    mix-blend-mode: screen;
}

/* Soft dark wash that fades the streak toward the right. */
.ntm-article-author__vignette {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background: linear-gradient(
        90deg,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0) 35%,
        rgba(22, 22, 22, 0.65) 60%,
        #161616 88%
    );
}

.ntm-article-author__inner {
    position: relative;
    z-index: 1;
    max-width: var(--ntm-container-max, 1920px);
    margin: 0 auto;
    /* Section's visible height is defined by this min-height — the portrait
       is taller and overflows above it. */
    min-height: clamp(380px, 38vw, 520px);
    /* Reserve space on the left for the absolutely-positioned portrait, plus
       a generous gap so the text sits well off the image. */
    padding-left: clamp(340px, 46vw, 720px);
    padding-right: clamp(24px, 13.75vw, 264px);
    display: flex;
    align-items: center;
}

/* ---------- Portrait (left, bleeds to edge, extends above) ---------- */
.ntm-article-author__portrait {
    position: absolute;
    left: 0;
    bottom: 0;
    width: clamp(280px, 38vw, 560px);
    aspect-ratio: 669 / 744;
    overflow: hidden;
    z-index: 1;
}

.ntm-article-author__portrait-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    filter: grayscale(100%) brightness(0.92) contrast(1.06);
}

.ntm-article-author__portrait-img--placeholder {
    background:
        radial-gradient(circle at 30% 30%, rgba(42, 139, 148, 0.22), rgba(0, 0, 0, 0) 60%),
        linear-gradient(135deg, #1a1a1a 0%, #232323 100%);
}

/* ---------- Text (right) ---------- */
.ntm-article-author__text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: clamp(12px, 1.2vw, 18px);
    max-width: 696px;
    /* Vertical padding inside the inner so text isn't flush against section edge. */
    padding: clamp(32px, 4vw, 56px) 0;
}

.ntm-article-author__eyebrow {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--ntm-font-sans);
    font-weight: 500;
    font-size: clamp(0.75rem, 0.85vw, 0.875rem);
    line-height: 1;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--ntm-accent-teal);
}

.ntm-article-author__eyebrow-rule {
    display: inline-block;
    width: 28px;
    height: 1px;
    background-color: var(--ntm-accent-teal);
    opacity: 0.9;
}

.ntm-article-author__name {
    margin: 0;
    font-family: var(--ntm-font-serif);
    font-weight: 400;
    font-size: clamp(1.75rem, 2.6vw, 2.5rem); /* up to ~40px */
    line-height: 1.15;
    letter-spacing: -0.005em;
    color: #ffffff;
}

.ntm-article-author__name a {
    color: inherit;
    text-decoration: none;
    transition: color 0.18s ease;
}

.ntm-article-author__name a:hover,
.ntm-article-author__name a:focus-visible {
    color: var(--ntm-accent-teal);
}

.ntm-article-author__bio {
    margin: 0;
    max-width: 60ch;
    font-family: var(--ntm-font-serif);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(0.875rem, 1vw, 1.0625rem); /* up to ~17px */
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.88);
}

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
    .ntm-article-author__inner {
        min-height: clamp(320px, 50vw, 440px);
        padding-left: clamp(220px, 42vw, 380px);
        padding-right: clamp(20px, 5vw, 56px);
    }

    .ntm-article-author__name {
        font-size: clamp(1.5rem, 3vw, 2.125rem);
    }

    .ntm-article-author__bio {
        font-size: clamp(0.8125rem, 1.2vw, 1rem);
    }
}

@media (max-width: 768px) {
    .ntm-article-author {
        /* Restore vertical padding on mobile since the portrait is centered, not bleeding. */
        padding: clamp(40px, 8vw, 64px) 0;
        overflow: hidden;
    }

    .ntm-article-author__inner {
        flex-direction: column;
        min-height: 0;
        padding: 0 clamp(20px, 5vw, 32px);
        gap: clamp(24px, 6vw, 40px);
        align-items: center;
        text-align: center;
    }

    .ntm-article-author__portrait {
        position: relative;
        left: auto;
        bottom: auto;
        width: clamp(220px, 60vw, 320px);
    }

    .ntm-article-author__text {
        padding: 0;
        align-items: center;
    }

    .ntm-article-author__arc {
        width: 140%;
        height: 100%;
        left: -20%;
    }

    .ntm-article-author__arc img {
        opacity: 0.45;
    }

    .ntm-article-author__vignette {
        background: linear-gradient(
            180deg,
            rgba(0, 0, 0, 0) 0%,
            rgba(22, 22, 22, 0.5) 100%
        );
    }
}
