/**
 * InGoal Author Archive — magazine-quality profile page.
 *
 * Loaded conditionally on is_author() via includes/authors/author-archive-styles.php.
 * Uses existing --ig-* design system tokens from assets/css/ingoal-design-system.css.
 *
 * Structure:
 *   .ap-crumbs      — breadcrumbs strip
 *   .ap-hero        — navy portrait + name + title + stats + social
 *   .ap-bio         — cream 2-col bio with drop cap
 *   .ap-metabar     — ice-blue expertise chips + credentials list
 *   .ap-articles    — header, feature slot, grid, load-more
 */

.ap-wrap {
    max-width: 1280px;
    margin: 0 auto;
    background: var(--ig-bg-white);
    border-left: 1px solid var(--ig-rule);
    border-right: 1px solid var(--ig-rule);
}

/* ===== BREADCRUMBS ===== */
.ap-crumbs {
    padding: 14px 32px;
    font-size: 11.5px;
    color: var(--ig-text-tertiary);
    border-bottom: 1px solid var(--ig-rule);
    letter-spacing: 0.3px;
}
.ap-crumbs a {
    color: var(--ig-accent-blue);
    text-decoration: none;
}
.ap-crumbs .sep {
    margin: 0 8px;
    color: #C0C0C0;
}

/* ===== HERO ===== */
.ap-hero {
    background: var(--ig-navy);
    color: #fff;
    padding: 60px 50px 80px;
    position: relative;
    overflow: hidden;
}
.ap-hero::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle at center, rgba(255,217,61,0.1), transparent 60%);
    pointer-events: none;
}
.ap-hero-grid {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 40px;
    align-items: center;
    position: relative;
}
.ap-photo {
    width: 200px;
    height: 240px;
    object-fit: cover;
    border: 4px solid var(--ig-yellow);
    filter: grayscale(0.2) contrast(1.05);
    display: block;
}
.ap-photo--placeholder {
    width: 200px;
    height: 240px;
    border: 4px solid var(--ig-yellow);
    background: linear-gradient(135deg, var(--ig-navy-medium), var(--ig-navy-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.5);
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.ap-meta-tag {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--ig-yellow);
    padding: 5px 10px;
    border: 1px solid rgba(255,217,61,0.4);
    margin-bottom: 14px;
}
.ap-name {
    font-family: var(--ig-font-heading);
    font-size: 72px;
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 0.95;
    margin: 0 0 8px;
    color: #fff;
}
.ap-title {
    font-family: var(--ig-font-body);
    font-style: italic;
    font-size: 19px;
    line-height: 1.4;
    color: rgba(255,255,255,0.85);
    margin: 0 0 14px;
}
.ap-loc {
    font-family: var(--ig-font-ui);
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
    margin: 0 0 18px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.ap-loc svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
}
.ap-stats {
    display: flex;
    gap: 32px;
    margin-top: 10px;
}
.ap-stat {
    display: flex;
    flex-direction: column;
}
.ap-stat .val {
    font-family: var(--ig-font-heading);
    font-size: 32px;
    font-weight: 800;
    color: var(--ig-yellow);
    letter-spacing: -0.02em;
    line-height: 1;
}
.ap-stat .lbl {
    font-family: var(--ig-font-ui);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
    margin-top: 4px;
}
.ap-social {
    display: flex;
    gap: 8px;
    margin-top: 22px;
    flex-wrap: wrap;
}
.ap-social a {
    font-family: var(--ig-font-ui);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 7px 14px;
    background: rgba(255,255,255,0.08);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    text-decoration: none;
    border-radius: 3px;
    transition: background-color .2s, color .2s, border-color .2s;
}
.ap-social a:hover,
.ap-social a:focus-visible {
    background: var(--ig-yellow);
    color: var(--ig-navy);
    border-color: var(--ig-yellow);
}

/* ===== BIO ===== */
.ap-bio {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 50px;
    padding: 50px 50px 40px;
    border-bottom: 1px solid var(--ig-rule);
    background: var(--ig-bg-cream);
}
.ap-bio-side .kick {
    font-family: var(--ig-font-ui);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--ig-accent-blue);
    margin-bottom: 8px;
}
.ap-bio-side .kick::before {
    content: '';
    display: block;
    width: 28px;
    height: 2px;
    background: var(--ig-navy);
    margin-bottom: 10px;
}
.ap-bio-side h2 {
    font-family: var(--ig-font-body);
    font-size: 22px;
    font-weight: 700;
    color: var(--ig-navy);
    margin: 10px 0 0;
    line-height: 1.2;
}
.ap-bio-content {
    font-family: var(--ig-font-body);
    font-size: 16px;
    line-height: 1.7;
    color: #1A1A1A;
}
.ap-bio-content p {
    margin: 0 0 14px;
}
.ap-bio-content p:first-of-type::first-letter {
    font-family: var(--ig-font-heading);
    font-size: 56px;
    font-weight: 800;
    color: var(--ig-navy);
    float: left;
    line-height: 0.9;
    padding: 6px 10px 0 0;
}

/* ===== META BAR ===== */
.ap-metabar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    padding: 36px 50px;
    background: var(--ig-ice-blue);
    border-bottom: 1px solid var(--ig-rule);
}
.ap-metabar .group .lbl {
    font-family: var(--ig-font-ui);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--ig-accent-blue);
    margin-bottom: 10px;
}
.ap-metabar .chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.ap-metabar .chip {
    font-family: var(--ig-font-ui);
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    background: #fff;
    color: var(--ig-navy);
    border-radius: 3px;
    border: 1px solid rgba(10,22,40,0.1);
}
.ap-metabar .creds {
    font-family: var(--ig-font-body);
    font-size: 14px;
    line-height: 1.5;
    color: #2A2A2A;
}
.ap-metabar .creds ul {
    margin: 0;
    padding-left: 18px;
}
.ap-metabar .creds li {
    margin-bottom: 4px;
}

/* ===== ARTICLES ===== */
.ap-articles {
    padding: 50px 50px 60px;
    background: var(--ig-bg-white);
}
.ap-articles-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 2px solid var(--ig-navy);
    padding-bottom: 14px;
    margin-bottom: 30px;
    gap: 20px;
    flex-wrap: wrap;
}
.ap-articles-head h2 {
    font-family: var(--ig-font-heading);
    font-size: 32px;
    font-weight: 800;
    color: var(--ig-navy);
    letter-spacing: -0.025em;
    margin: 0;
}
.ap-articles-head h2 em {
    font-family: var(--ig-font-body);
    font-style: italic;
    font-weight: 400;
    color: var(--ig-accent-blue);
}
.ap-filters {
    display: flex;
    gap: 16px;
    font-size: 12px;
    flex-wrap: wrap;
}
.ap-filters button {
    font-family: var(--ig-font-ui);
    color: var(--ig-text-tertiary);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 4px 0;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    font-size: 12px;
    transition: color .15s, border-color .15s;
}
.ap-filters button:hover {
    color: var(--ig-navy);
}
.ap-filters button.active {
    color: var(--ig-navy);
    border-bottom-color: var(--ig-yellow);
}
.ap-filters button:focus-visible {
    outline: 2px solid var(--ig-accent-blue);
    outline-offset: 2px;
}

/* FEATURE SLOT */
.ap-feature {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 30px;
    background: var(--ig-navy);
    color: #fff;
    padding: 36px;
    margin-bottom: 30px;
    text-decoration: none;
}
.ap-feature:hover,
.ap-feature:focus-visible {
    color: #fff;
}
.ap-feature:focus-visible {
    outline: 3px solid var(--ig-yellow);
    outline-offset: 2px;
}
.ap-feature .kick {
    font-family: var(--ig-font-ui);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--ig-yellow);
    margin-bottom: 12px;
}
.ap-feature h3 {
    font-family: var(--ig-font-heading);
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.05;
    margin: 0 0 14px;
    color: #fff;
}
.ap-feature p {
    font-family: var(--ig-font-body);
    font-size: 15px;
    line-height: 1.55;
    color: rgba(255,255,255,0.8);
    margin: 0 0 16px;
}
.ap-feature .meta {
    font-family: var(--ig-font-ui);
    font-size: 11.5px;
    color: rgba(255,255,255,0.6);
    letter-spacing: 0.5px;
}
.ap-feature-img {
    background: linear-gradient(135deg, #6b8aa8, var(--ig-accent-blue));
    aspect-ratio: 4/3;
    position: relative;
    overflow: hidden;
}
.ap-feature-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* GRID */
.ap-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.ap-card {
    background: #fff;
    text-decoration: none;
    display: flex;
    flex-direction: column;
}
.ap-card--hidden {
    display: none;
}
.ap-card-img {
    background: linear-gradient(135deg, #c8d4e0, #9CB0C8);
    aspect-ratio: 4/3;
    margin-bottom: 14px;
    overflow: hidden;
}
.ap-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}
.ap-card:hover .ap-card-img img {
    transform: scale(1.03);
}
.ap-card-cat {
    font-family: var(--ig-font-ui);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--ig-accent-blue);
    margin-bottom: 6px;
}
.ap-card-title {
    font-family: var(--ig-font-heading);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--ig-navy);
    line-height: 1.25;
    margin: 0 0 8px;
    transition: color .15s;
}
.ap-card:hover .ap-card-title {
    color: var(--ig-accent-blue);
}
.ap-card-meta {
    font-family: var(--ig-font-ui);
    font-size: 11.5px;
    color: var(--ig-text-tertiary);
}
.ap-card-meta .dot {
    display: inline-block;
    margin: 0 6px;
    opacity: 0.5;
}

/* LOAD MORE */
.ap-load {
    text-align: center;
    margin-top: 36px;
}
.ap-load button {
    font-family: var(--ig-font-ui);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--ig-navy);
    background: transparent;
    border: 1.5px solid var(--ig-navy);
    padding: 14px 32px;
    cursor: pointer;
    transition: background-color .2s, color .2s;
}
.ap-load button:hover,
.ap-load button:focus-visible {
    background: var(--ig-navy);
    color: #fff;
}

/* EMPTY STATE */
.ap-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--ig-text-tertiary);
    font-family: var(--ig-font-body);
    font-size: 16px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .ap-hero {
        padding: 40px 30px 60px;
    }
    .ap-hero-grid,
    .ap-bio,
    .ap-metabar,
    .ap-feature {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .ap-bio,
    .ap-metabar,
    .ap-articles {
        padding: 40px 30px;
    }
    .ap-articles {
        padding-bottom: 60px;
    }
    .ap-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .ap-articles-head {
        flex-direction: column;
        align-items: flex-start;
    }
    .ap-photo,
    .ap-photo--placeholder {
        justify-self: center;
    }
}
@media (max-width: 600px) {
    .ap-hero,
    .ap-bio,
    .ap-metabar,
    .ap-articles {
        padding-left: 20px;
        padding-right: 20px;
    }
    .ap-name {
        font-size: 44px;
    }
    .ap-grid {
        grid-template-columns: 1fr;
    }
    .ap-stats {
        gap: 20px;
    }
    .ap-feature {
        padding: 24px;
    }
    .ap-feature h3 {
        font-size: 26px;
    }
}
