:root {
    --header-height: clamp(40px, 16vh, 180px);
    --footer-height: clamp(60px, 4vh, 80px);
    --content-offset: calc(var(--header-height) + 40px);
}


.author-page {
    padding-top: var(--content-offset);
    padding-bottom: calc(var(--footer-height, 0px) + 30px);
    position: relative;
}

.ap-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---- Hero ---- */
.ap-hero {
    padding: 0 0 40px;
    background: #fff;
}

.ap-hero-inner {
    display: grid;
    grid-template-columns: 1fr 524px;
    gap: 40px;
    align-items: flex-start;
}

.ap-label {
    margin-bottom: 12px;
    background: #cfcac2;
    color: #000;
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
    display: inline-flex;
    padding: 6px 20px;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

.ap-author-name {
    font-size: clamp(24px, 2.5vw, 40px);
    font-weight: 500;
    line-height: 1.15;
    color: #111;
    margin: 0 0 8px;

}

.ap-author-role {
    font-size: clamp(16px, 1.25vw, 18px);
    color: #444;
    margin: 0 0 20px;
    font-weight: 400;
}

.ap-author-bio {
    margin: 0 0 40px;
    color: #000;
    font-size: clamp(14px, 1.5vw, 18px);
    font-weight: 400;
    opacity: 0.5;
    max-width: 580px;
}

.ap-linkedin-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1.5px solid #1a1a2e;
    border-radius: 100px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #1a1a2e;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.ap-linkedin-btn:hover {
    background: #1a1a2e;
    color: #fff;
    text-decoration: none;
}

.ap-linkedin-btn:hover svg.arrow path {
    stroke: white;
}

.ap-linkedin-btn:hover svg path {
    fill: #ffffff;
}

.ap-hero-photo {
    overflow: hidden;
    aspect-ratio: 1/1;
    background: #CFCAC2;
}

.ap-hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.ap-posts-grid .blog-card img {

    height: auto;
}

.ap-photo-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

/* ---- Meta Cards ---- */
.ap-meta-cards {
    padding: 0 0 64px;
    background: #fff;
}

.ap-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.ap-meta-card {
    padding: 32px;
    background: #F4F4F4;
}

.ap-card-label {
    display: block;
    margin-bottom: 10px;
    color: #000;
    font-size: clamp(14px, 1vw, 16px);
    font-weight: 400;
    opacity: 0.5;
}

.ap-card-value {
    margin: 0;
    color: #000;
    font-size: clamp(16px, 1.5vw, 18px);
    font-weight: 500;
}

/* ---- Articles ---- */
.ap-articles {
    padding: 64px 0 0;
}

.ap-articles-header {
    margin-bottom: 60px;
}

.ap-articles-title {
    font-size: clamp(28px, 3vw, 40px);
    font-weight: 500;
    color: #111;
    margin: 0 0 12px;
}

.ap-articles-count {
    margin: 0;
    color: #000;
    font-size: 16px;
    font-weight: 400;
    opacity: 0.5;
}

/* ---- Post Grid ---- */
.ap-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.ap-post-card {
    background: #F4F4F4;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.ap-post-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.10);
    transform: translateY(-3px);
}

.ap-post-thumb {
    display: block;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #ddd;
}

.ap-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.ap-post-card:hover .ap-post-thumb img {
    transform: scale(1.04);
}

.ap-thumb-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e2e2ea, #c8c8d8);
}

.ap-post-body {
    flex: 1;
    display: flex;
    padding: 24px;
    flex-direction: column;
    align-self: stretch;
}

.ap-post-cat {
    font-size: 12px;
    color: #777;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
    display: block;
}

.ap-post-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
    color: #111;
    margin: 0 0 auto;
    flex: 1;
}

.ap-post-title a {
    color: inherit;
    text-decoration: none;
}

.ap-post-title a:hover {
    color: #E21E31;
}

.ap-post-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f4;
}

.ap-post-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #888;
}

.ap-meta-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #ccc;
    display: inline-block;
}

.ap-post-arrow {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #E21E31;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.ap-post-arrow:hover {
    background: #c01828;
    transform: scale(1.08);
}

/* ---- Load More / Sentinel ---- */
.ap-load-more-wrap {
    margin-top: 40px;
    text-align: center;
}

.ap-load-more-sentinel {
    height: 1px;
}

.ap-loader {
    display: none;
    gap: 8px;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
}

.ap-loader.visible {
    display: flex;
}

.ap-loader span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #E21E31;
    animation: apBounce 0.6s infinite alternate;
}

.ap-loader span:nth-child(2) {
    animation-delay: 0.2s;
}

.ap-loader span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes apBounce {
    from {
        transform: translateY(0);
        opacity: 0.6;
    }

    to {
        transform: translateY(-10px);
        opacity: 1;
    }
}

.ap-no-posts {
    color: #777;
    font-size: 15px;
    grid-column: 1/-1;
    text-align: center;
    padding: 40px 0;
}



/* ---- Pagination ---- */
.ap-pagination {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #eaeaea;
}

.ap-pagination .ajax-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    width: 100%;
}

.ap-pagination .page-numbers-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.ap-pagination .author-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 36px;
    padding: 0;
    font-size: 14px;
    font-weight: 400;
    color: #888;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ap-pagination .page-numbers-wrap .author-page-btn {
    width: 36px;
    min-width: 36px;
}

.ap-pagination .author-page-btn:hover:not(.disabled) {
    color: #111;
}

.ap-pagination .page-numbers-wrap .author-page-btn:hover:not(.disabled):not(.active) {
    background: #f4f4f4;
}

.ap-pagination .author-page-btn.active {
    background: #000;
    color: #fff;
}

.ap-pagination .author-page-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.ap-pagination .author-page-btn .arrow {
    display: flex;
    justify-content: center;
    align-items: center;
}

.author-page-btn .arrow svg {
    display: flex;
    margin-top: 2px;
}

@media (max-width: 600px) {
    .ap-pagination .ajax-pagination {

        gap: 20px;
    }




}

.ap-no-posts {
    color: #777;
    font-size: 15px;
    grid-column: 1/-1;
    text-align: center;
    padding: 40px 0;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {


    .ap-hero-photo {
        max-width: 360px;
        order: -1;
    }


    .ap-hero-inner {
        display: grid;
        grid-template-columns: 1fr 450px;
        gap: 32px;
        align-items: flex-start;
    }

    .ap-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ap-meta-card {
        padding: 24px;
    }
}

@media screen and (max-width: 768px) {
    .ap-hero-inner {
        display: grid;
        grid-template-columns: 1fr 330px;


    }

}

@media (max-width: 580px) {
    .ap-hero-inner {
        display: grid;
        grid-template-columns: 1fr;
    }

    .ap-hero-photo {
        max-width: 100%;
    }

    .ap-cards-grid {
        grid-template-columns: 1fr;
    }

    .ap-posts-grid {
        grid-template-columns: 1fr;
    }




}