/* ============================================================
   AUTHOR ARCHIVE PAGE
   ============================================================ */

.author-page {
    --ap-primary: #0873ed;
    --ap-primary-dark: #075fd0;
    --ap-primary-light: #e8f3ff;
    --ap-navy: #092b50;
    --ap-body: #3a526c;
    --ap-muted: #52647d;
    --ap-border: #e8edf3;
    --ap-bg: #f8fafc;
    --ap-white: #ffffff;

    --ap-radius-sm: 8px;
    --ap-radius-md: 12px;
    --ap-radius-lg: 16px;
    --ap-radius-xl: 20px;

    --ap-shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.03);
    --ap-shadow-md: 0 4px 15px rgba(29, 51, 80, 0.05);
    --ap-shadow-lg: 0 8px 25px rgba(29, 51, 80, 0.08);

    --ap-font-display: "Caveat", cursive;

    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--ap-bg);
    color: var(--ap-body);
    font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
    line-height: 1.7;
    padding: clamp(14px, 2.5vw, 28px) clamp(14px, 3vw, 40px) clamp(40px, 6vw, 80px);
    -webkit-font-smoothing: antialiased;
}

.author-page *,
.author-page *::before,
.author-page *::after {
    box-sizing: border-box;
}

.author-page a { text-decoration: none; }
.author-page img { max-width: 100%; height: auto; display: block; }

/* ---------------- BREADCRUMB ---------------- */
.author-breadcrumb {
    max-width: 1280px;
    margin: 0 auto clamp(14px, 2vw, 22px);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.9375rem;
}
.author-breadcrumb a {
    color: var(--ap-primary);
    font-weight: 500;
}
.author-breadcrumb a:hover { color: var(--ap-primary-dark); }
.author-breadcrumb-sep { color: #b5beca; }
.author-breadcrumb-current {
    color: #111827;
    font-weight: 700;
}

/* ---------------- HERO ---------------- */
.author-hero {
    position: relative;
    max-width: 1280px;
    margin: 0 auto clamp(24px, 3vw, 36px);
    min-height: clamp(180px, 22vw, 240px);
    overflow: hidden;
    border-radius: var(--ap-radius-xl);
    background: linear-gradient(112deg, #d9edff 0%, #dcefff 48%, #d5ebff 100%);
    display: flex;
    align-items: center;
    padding: clamp(24px, 4vw, 44px);
}
.author-hero::before {
    content: "";
    position: absolute;
    width: 700px; height: 470px;
    right: -175px; bottom: -345px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.6);
    transform: rotate(-9deg);
    pointer-events: none;
}
.author-hero::after {
    content: "";
    position: absolute;
    width: 800px; height: 530px;
    right: -80px; bottom: -410px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    transform: rotate(-12deg);
    pointer-events: none;
}

.author-hero-content {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: flex-start;
    gap: clamp(20px, 3.5vw, 38px);
    flex-wrap: wrap;
    width: 100%;
}

.author-hero-avatar {
    flex: 0 0 auto;
}
.author-hero-avatar img {
    width: clamp(90px, 12vw, 130px);
    height: clamp(90px, 12vw, 130px);
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 8px 24px rgba(29, 51, 80, 0.15);
    display: block;
}

.author-hero-info { flex: 1; min-width: 260px; }

.author-hero-label {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: var(--ap-primary);
    margin-bottom: 6px;
    text-transform: uppercase;
}

.author-hero-name {
    color: #07142b;
    font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.75rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1.4px;
    margin: 0 0 6px;
}

.author-hero-role {
    color: var(--ap-primary-dark);
    font-size: clamp(0.9375rem, 0.9rem + 0.25vw, 1rem);
    font-weight: 600;
    margin: 0 0 10px;
}

.author-hero-bio {
    max-width: 720px;
    color: var(--ap-muted);
    font-size: clamp(1rem, 0.95rem + 0.2vw, 1.0625rem);
    line-height: 1.65;
    margin: 0 0 14px;
}

.author-hero-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.9375rem;
    color: var(--ap-muted);
    margin-bottom: 14px;
}
.author-hero-stat strong {
    color: var(--ap-navy);
    font-weight: 800;
    font-size: 1.1em;
    margin-right: 3px;
}
.author-hero-sep { color: #b5beca; }
.author-hero-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--ap-primary);
    font-weight: 600;
    transition: color 0.2s ease;
}
.author-hero-link:hover { color: var(--ap-primary-dark); }
.author-hero-link svg { flex-shrink: 0; }

.author-hero-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.author-social-link {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    color: #52647d;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
    font-size: 16px;
}
.author-social-link:hover {
    transform: translateY(-2px);
    color: #ffffff;
}
.author-social-link.youtube:hover   { background: #e21d25; }
.author-social-link.facebook:hover  { background: #1877f2; }
.author-social-link.instagram:hover { background: #d52d73; }
.author-social-link.linkedin:hover  { background: #0a66c2; }
.author-social-link.x:hover         { background: #111111; }

.author-hero-decoration {
    position: absolute;
    z-index: 4;
    right: clamp(20px, 5vw, 70px);
    top: clamp(24px, 4vw, 46px);
    width: clamp(130px, 16vw, 190px);
    color: #315b91;
    font-family: var(--ap-font-display);
    font-size: clamp(1.125rem, 1.8vw + 0.5rem, 1.75rem);
    line-height: 1.2;
    font-weight: 600;
    transform: rotate(-6deg);
    text-align: right;
    pointer-events: none;
}
.author-hero-decoration span {
    display: block;
    margin-bottom: 2px;
}

/* ---------------- MAIN GRID ---------------- */
.author-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    gap: clamp(20px, 3vw, 44px);
    align-items: flex-start;
}

.author-posts-column {
    flex: 1;
    min-width: 0;
}

/* ---------------- POSTS HEADER ---------------- */
.author-posts-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: clamp(16px, 2vw, 24px);
    flex-wrap: wrap;
}
.author-posts-title {
    color: var(--ap-navy);
    font-size: clamp(1.375rem, 1.2rem + 0.7vw, 1.75rem);
    font-weight: 800;
    letter-spacing: -0.7px;
    margin: 0;
}
.author-posts-count {
    color: var(--ap-muted);
    font-size: 0.9375rem;
    font-weight: 500;
}

/* ---------------- FEATURED POST ---------------- */
.author-featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(14px, 2vw, 24px);
    background: var(--ap-white);
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius-lg);
    overflow: hidden;
    box-shadow: var(--ap-shadow-md);
    margin-bottom: clamp(20px, 2.5vw, 28px);
}
.author-featured-image {
    display: block;
    height: 100%;
    min-height: clamp(200px, 24vw, 280px);
    overflow: hidden;
}
.author-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.author-featured:hover .author-featured-image img {
    transform: scale(1.04);
}
.author-featured-body {
    padding: clamp(20px, 3vw, 34px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.author-post-category {
    color: var(--ap-primary);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    margin-bottom: 10px;
    display: inline-block;
}
.author-featured-title {
    color: var(--ap-navy);
    font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.625rem);
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.5px;
    margin: 0 0 12px;
}
.author-featured-title a {
    color: inherit;
    transition: color 0.2s ease;
}
.author-featured-title a:hover { color: var(--ap-primary); }

.author-featured-excerpt {
    color: var(--ap-body);
    font-size: 1rem;
    line-height: 1.65;
    margin: 0 0 14px;
}

.author-post-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ap-muted);
    font-size: 0.875rem;
    font-weight: 500;
}
.author-post-meta-sep { color: #b5beca; }

/* ---------------- POST GRID ---------------- */
.author-post-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(12px, 1.5vw, 20px);
}

.author-post-card {
    background: var(--ap-white);
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius-md);
    overflow: hidden;
    box-shadow: var(--ap-shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}
.author-post-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--ap-shadow-lg);
}

.author-post-card-image {
    display: block;
    height: clamp(140px, 18vw, 180px);
    overflow: hidden;
}
.author-post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.author-post-card:hover .author-post-card-image img {
    transform: scale(1.05);
}

.author-post-card-body {
    padding: clamp(14px, 1.8vw, 20px);
    display: flex;
    flex-direction: column;
    flex: 1;
}
.author-post-card-title {
    color: var(--ap-navy);
    font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.3px;
    margin: 0 0 8px;
}
.author-post-card-title a {
    color: inherit;
    transition: color 0.2s ease;
}
.author-post-card-title a:hover { color: var(--ap-primary); }

.author-post-card-excerpt {
    color: var(--ap-body);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin: 0 0 12px;
    flex: 1;
}

/* ---------------- PAGINATION ---------------- */
.author-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(6px, 0.9vw, 10px);
    padding: clamp(24px, 3vw, 40px) 0 clamp(8px, 1vw, 16px);
    flex-wrap: wrap;
}
.author-page-number,
.author-page-arrow {
    min-width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    background: var(--ap-white);
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius-sm);
    color: #18233a;
    font-size: 0.9375rem;
    font-weight: 600;
    box-shadow: var(--ap-shadow-sm);
    cursor: pointer;
    transition: all 0.15s ease;
}
.author-page-number:hover,
.author-page-arrow:hover {
    background: var(--ap-primary-light);
    border-color: #c9dffb;
    color: var(--ap-primary);
}
.author-page-number.active {
    background: var(--ap-primary);
    border-color: var(--ap-primary);
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(8, 115, 237, 0.25);
}
.author-page-arrow.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}
.author-page-dots {
    color: var(--ap-muted);
    font-weight: 700;
    padding: 0 4px;
    font-size: 1rem;
}

.author-no-posts {
    padding: 60px 20px;
    text-align: center;
    color: var(--ap-muted);
    font-size: 1.0625rem;
    background: var(--ap-white);
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius-lg);
}

/* ---------------- SIDEBAR (reuse .review-sidebar + its classes) ---------------- */
.author-grid .review-sidebar {
    flex: 0 0 clamp(260px, 26vw, 320px);
    width: auto;
    max-width: none;
    margin: 0;
    position: sticky;
    top: 90px;
    height: fit-content;
}

/* ---------------- RESPONSIVE ---------------- */
@media (max-width: 1024px) {
    .author-grid {
        flex-direction: column;
    }
    .author-grid .review-sidebar {
        flex: 1 1 auto;
        width: 100%;
        max-width: 100%;
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: clamp(14px, 2vw, 20px);
    }
    .author-featured {
        grid-template-columns: 1fr;
    }
    .author-featured-image {
        min-height: clamp(180px, 40vw, 240px);
    }
}

@media (max-width: 768px) {
    .author-hero-decoration {
        display: none;
    }
    .author-hero {
        padding: clamp(20px, 4vw, 30px);
        min-height: auto;
        border-radius: clamp(14px, 2.5vw, 18px);
    }
    .author-hero-content {
        gap: clamp(14px, 2.5vw, 22px);
    }
    .author-hero-avatar img {
        width: clamp(80px, 22vw, 110px);
        height: clamp(80px, 22vw, 110px);
    }
    .author-post-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .author-hero-name {
        font-size: clamp(1.5rem, 7vw, 1.9rem);
        letter-spacing: -0.8px;
    }
    .author-hero-bio {
        font-size: 0.9375rem;
    }
    .author-post-grid {
        gap: 14px;
    }
    .author-page-number,
    .author-page-arrow {
        min-width: 38px;
        height: 38px;
        font-size: 0.875rem;
    }
}