﻿/* ==========================================================================
   NDX  Author Profile Page
   ========================================================================== */

:root {
    --ndx-navy: #002855;
    --ndx-yellow: #ffcc33;
    --ndx-slate: #4e6c89;
    --ndx-text: #4b5563;
    --ndx-accent: #00a4e4;
    --ndx-linkedin: #0077b5;
    --ndx-bg: #f8f9fa;
}

/* --- Page shell ---------------------------------------------------------- */
.ndx-author-profile-page {
    background-color: var(--ndx-bg);
    padding-bottom: 6rem;
    overflow-x: clip;
}

.ndx-author-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- Full-bleed banner with Premium Overlay ------------------------------ */
/* --- Full-bleed banner with Premium Overlay ------------------------------ */
.ndx-author-fullbleed-banner {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    position: relative;
}

.ndx-author-hero-bg {
    width: 100%;
    min-height: 405px; /* Matches the directory hub full height */
    background-color: var(--ndx-navy);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    border-bottom: 6px solid var(--ndx-yellow);
    position: relative;
}

    /* Injects a subtle gradient overlay so the banner isn't overly bright/distracting */
    .ndx-author-hero-bg::after {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(to bottom, rgba(0, 40, 85, 0.2) 0%, rgba(0, 40, 85, 0.6) 100%);
        pointer-events: none;
    }

/* --- Identity section (overlaps banner) ---------------------------------- */
.ndx-author-identity-section {
    margin-bottom: 5rem;
    position: relative;
}

.ndx-author-top-row {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: -90px;
    margin-bottom: 2rem;
}

/* Floating Premium Avatar */
.ndx-author-avatar-wrapper {
    width: 180px; /* Slightly larger for a stronger focal point */
    height: 180px;
    margin: 0;
    padding: 6px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 12px 35px rgba(0, 40, 85, 0.15); /* Deeper, softer shadow */
}

.ndx-author-avatar,
.ndx-author-avatar-fallback {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: #e2e8f0;
    border: 1px solid #cbd5e1;
}

/* --- LinkedIn Ghost Button ----------------------------------------------- */
.ndx-btn-linkedin {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.5rem;
    padding: 0.7rem 1.5rem;
    border: 2px solid var(--ndx-linkedin);
    border-radius: 50px;
    background: #ffffff;
    color: var(--ndx-linkedin);
    font-size: 0.95rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

    .ndx-btn-linkedin:hover,
    .ndx-btn-linkedin:focus-visible {
        background: var(--ndx-linkedin);
        color: #ffffff;
        transform: translateY(-3px);
        box-shadow: 0 8px 20px rgba(0, 119, 181, 0.25);
    }

/* --- Typography Hierarchy ------------------------------------------------ */
.ndx-author-profile-page .ndx-author-info {
    max-width: 900px;
    text-align: left;
}

.ndx-author-profile-page .ndx-author-name {
    margin: 0 0 0.25rem;
    color: var(--ndx-navy);
    font-size: 3.25rem; /* Larger, heavier name */
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.02em;
    text-align: left;
}

.ndx-author-profile-page .ndx-author-title {
    margin: 0 0 1.5rem;
    color: var(--ndx-slate);
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-align: left;
}

.ndx-author-profile-page .ndx-author-bio {
    margin: 0;
    color: var(--ndx-text);
    font-size: 1.15rem;
    line-height: 1.8;
    text-align: left;
}

/* --- Articles Grid Updates ----------------------------------------------- */
.ndx-author-articles-title {
    position: relative;
    margin-bottom: 3rem;
    color: var(--ndx-navy);
    font-size: 2.25rem;
    font-weight: 800;
    text-align: center;
}

    .ndx-author-articles-title::after {
        content: "";
        display: block;
        width: 60px;
        height: 5px;
        margin: 20px auto 0;
        border-radius: 3px;
        background: var(--ndx-accent);
    }

.ndx-author-articles-section .ndx-blog-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2.5rem;
}

.ndx-author-articles-section .ndx-blog-card {
    flex: 0 1 500px;
    max-width: 100%;
}

/* --- Mobile Responsiveness ----------------------------------------------- */
/* Tablets and smaller laptops */
@media (max-width: 1366px) {
    .ndx-author-hero-bg {
        min-height: 340px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .ndx-author-hero-bg {
        min-height: 220px; /* Prevents the banner from eating the whole screen */
    }

    .ndx-author-top-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
        margin-top: -70px; /* Pulls the avatar up proportionally for the shorter banner */
    }

    .ndx-author-avatar-wrapper {
        width: 140px;
        height: 140px;
    }

    .ndx-author-profile-page .ndx-author-name {
        font-size: 2rem;
    }

    .ndx-author-profile-page .ndx-author-title {
        font-size: 1.1rem;
    }
}
/* Base styles (without any media queries) */

.ndx-author-hero-bg {
    position: relative;
    width: 100%;
    min-height: 500px;
    display: flex;
    align-items: center;
    background-color: #002855;
    background-size: cover !important;
    background-position: right center !important;
    background-repeat: no-repeat !important;
    overflow: hidden;
}

/* Responsive styles for screens 1366px and below */
@media (max-width: 1366px) {

    .ndx-author-hero-bg {
        height: auto;
        min-height: 300px;
        padding: 4rem 1rem;
        justify-content: center;
    }
}
