.author-hero-container{
    max-width:1400px;
    margin:60px auto;
    padding:0 20px;
    display:grid;
    grid-template-columns:220px 1fr;
    gap:60px;
    align-items:center;
}

.author-hero-right{
    display:flex;
    justify-content:center;
}

.author-avatar-wrapper{
    position:relative;
    display: inline-block; /* Keeps the wrapper bound to the exact size of the image */
}

.author-main-img{
    width:150px !important;
    height:150px !important;
    border-radius:50%;
    object-fit:cover;
    border:5px solid #29363b;
    box-shadow:0 10px 30px rgba(0,0,0,.12);
}

.author-counter-badge{
    position:absolute;
    /* Default desktop boundary positions to prevent breaking layout */
    right:-11px;
    bottom:-15px; 
    display:flex;
    align-items:center;
    gap:10px;
    background:#FFF;
    color:#222;
    padding:12px 18px;
    border-radius:12px;
    box-shadow:0 10px 25px rgba(0,0,0,.15);
}

.author-counter-icon{
    font-size:22px;
}

.author-counter-number{
    font-size:20px;
    font-weight:700;
    line-height:1;
}

.author-counter-label{
    font-size:12px;
    color:#444;
}

.author-name{
    font-size:46px;
    font-weight:700;
    color:#111;
    margin:0 0 10px;
    line-height:1.2;
}

.author-tagline{
    font-size:20px;
    font-weight:600;
    color:#29363b;
    margin-bottom:20px;
}

.author-bio{
    font-size:17px;
    line-height:1.8;
    color:#666;
    margin-bottom:30px;
    max-width:750px;
}

.author-action-links{
    display:flex;
    gap:15px;
    flex-wrap:wrap;
}

.btn-author-primary{
    display:inline-block;
    background:#29363b;
    color:#222;
    text-decoration:none;
    padding:14px 28px;
    border-radius:4px;
    font-weight:600;
    transition:.3s;
}

.btn-author-primary:hover{
    background:#111;
    color:#fff;
}

/*=========================================
    POSTS SECTION
==========================================*/

.author-posts-section{
    max-width:1400px;
    margin:70px auto;
    padding:0 20px;
}

.author-posts-heading{
    font-size:32px;
    font-weight:700;
    margin-bottom:35px;
    border-left:5px solid #29363b;
    padding-left:15px;
    color:#111;
}

.author-posts-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:30px;
}

.author-post-card{
    background:#fff;
    border:1px solid #eee;
    border-radius:8px;
    padding:25px;
    transition:.3s;
    box-shadow:0 3px 12px rgba(0,0,0,.05);
}

.author-post-card:hover{
    transform:translateY(-6px);
    box-shadow:0 15px 35px rgba(0,0,0,.12);
}

.author-post-title{
    margin:0 0 15px;
    font-size:22px;
    line-height:1.4;
}

.author-post-title a{
    color:#111;
    text-decoration:none;
    transition:.3s;
}

.author-post-title a:hover{
    color:#29363b;
}

.author-post-excerpt{
    color:#666;
    line-height:1.8;
    margin:0;
    font-size:15px;
}

/*=========================================
    TABLET
==========================================*/

@media(max-width:1024px){

.author-hero-container{
    grid-template-columns:1fr;
    text-align:center;
    gap:50px; /* Increased gap to give the floating badge extra safe breathing room */
}

/* Forces the image column block to render as the first item visually */
.author-hero-right{
    grid-row: 1;
    display:flex;
    justify-content:center;
}

/* Ensures the text container naturally falls directly underneath the image */
.author-hero-left {
    grid-row: 2;
}

.author-action-links{
    justify-content:center;
}

.author-bio{
    max-width:100%;
}

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

.author-counter-badge{
    right:-11px;
    bottom:-10px;
}

}

/*=========================================
    MOBILE
==========================================*/

@media(max-width:767px){

.author-hero-container{
    margin:40px auto;
    padding:0 15px;
    gap:60px; /* Large layout gap keeps the absolute badge from hitting the text below */
}

.author-main-img{
    width:150px !important;
    height:150px !important;
}

.author-name{
    font-size:34px;
}

.author-tagline{
    font-size:18px;
}

.author-bio{
    font-size:16px;
}

.author-posts-heading{
    font-size:26px;
}

.author-posts-grid{
    grid-template-columns:1fr;
    gap:20px;
}

.author-post-card{
    padding:20px;
}

.author-post-title{
    font-size:20px;
}

/* Re-anchored badge layout rules to keep it neatly aligned under the circular mask */
.author-counter-badge{
    position:absolute;
    right: 50%;
    transform: translateX(50%); /* Centers the absolute badge globally underneath the image circle */
    bottom:-25px;
    padding:8px 14px;
}

.btn-author-primary{
    width:100%;
    text-align:center;
}

}
