/* ==========================================================================
   Custom Author Box - v2.0.0
   Colors ek jagah: neeche wale variables badal kar poora look badal sakte hain.
   ========================================================================== */

.cab-author-box,
.cab-profile,
.cab-author-posts {
    --cab-ink: #1d211f;
    --cab-text: #333333;
    --cab-muted: #6b7078;
    --cab-line: #d8dbe0;
    --cab-chip: #eef0f2;
    --cab-chip-hover: #e2e6ea;
    --cab-ring-1: #307d98;
    --cab-ring-2: #e8b864;
    --cab-accent: #ef8051;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Theme ki "svg { width:auto }" jaisi CSS icons ko chhupa na de */
.cab-social-icon svg {
    display: block !important;
    width: var(--cab-icon, 16px) !important;
    height: var(--cab-icon, 16px) !important;
    fill: currentColor !important;
}

/* ==========================================================================
   1. Single post author box  [custom_author_box]
   ========================================================================== */

.cab-author-box {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    margin: 30px 0;
    padding: 10px 0;
}
.cab-author-box .cab-avatar-container {
    position: relative;
    flex-shrink: 0;
    width: 110px;
    height: 110px;
}
.cab-author-box .cab-avatar-container img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 5px var(--cab-ring-1), 0 0 0 10px var(--cab-ring-2);
}
.cab-author-box .cab-author-content {
    flex-grow: 1;
}
.cab-author-box .cab-author-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}
.cab-author-box .cab-author-name {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
}
.cab-author-box .cab-author-name a {
    color: #111111;
    text-decoration: underline;
    transition: color 0.2s ease;
}
.cab-author-box .cab-author-name a:hover {
    color: var(--cab-accent);
}
.cab-author-box .cab-social-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.cab-author-box .cab-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background-color: #f1f3f5;
    color: #111111;
    text-decoration: none;
    box-shadow: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
}
.cab-author-box .cab-social-icon:hover {
    background-color: var(--cab-chip-hover);
    transform: translateY(-2px);
}
.cab-author-box .cab-author-bio {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    color: var(--cab-text);
}

@media (max-width: 600px) {
    .cab-author-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .cab-author-box .cab-author-header,
    .cab-author-box .cab-social-links {
        justify-content: center;
    }
}

/* ==========================================================================
   2. Author page  (/author/name/)  +  [custom_author_profile]
   ========================================================================== */

.cab-author-page {
    padding: 56px 20px 80px;
}
.cab-author-page__inner {
    max-width: 100%;
    margin: 0 auto;
}
.cab-author-page {
    width: 100% !important;
}

.cab-profile {
    color: var(--cab-ink);
}
.cab-profile__top {
    display: flex;
    align-items: center;
    gap: 36px;
}
.cab-profile__avatar {
    flex-shrink: 0;
    width: 152px;
    height: 152px;
    margin: 12px; /* Rings ke liye jagah */
}
.cab-profile__avatar img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 6px var(--cab-ring-1), 0 0 0 12px var(--cab-ring-2);
}
.cab-profile__intro {
    min-width: 0;
}
.cab-profile .cab-profile__name {
    margin: 0 0 10px;
    padding: 0;
    font-size: clamp(2.25rem, 5vw, 4rem);
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--cab-ink);
    text-transform: none;
}
.cab-profile .cab-profile__role {
    margin: 0 0 18px;
    font-size: 15px;
    line-height: 1.4;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--cab-muted);
}
.cab-profile .cab-profile__role a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.cab-profile .cab-profile__role a:hover {
    color: var(--cab-accent);
}
.cab-profile__social {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.cab-profile .cab-social-icon {
    --cab-icon: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 6px;
    background-color: var(--cab-chip);
    color: var(--cab-ink);
    text-decoration: none;
    box-shadow: none;
    transition: background-color 0.2s ease;
}
.cab-profile .cab-social-icon:hover {
    background-color: var(--cab-chip-hover);
    color: var(--cab-ink);
}
.cab-profile a:focus-visible,
.cab-author-posts a:focus-visible {
    outline: 2px solid var(--cab-ring-1);
    outline-offset: 2px;
}

.cab-profile .cab-profile__bio {
    margin: 36px 0 40px;
    font-size: 17px;
    line-height: 1.65;
    color: var(--cab-text);
}
.cab-profile .cab-profile__bio p {
    margin: 0 0 1em;
}
.cab-profile .cab-profile__bio p:last-child {
    margin-bottom: 0;
}

.cab-profile__cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
}
.cab-profile .cab-card {
    margin: 0;
    padding: 22px 24px 26px;
    border: 1px solid var(--cab-line);
    border-radius: 8px;
    background: transparent;
}
.cab-profile .cab-card__title {
    margin: 0 0 14px;
    padding: 0;
    font-size: 26px;
    font-weight: 500;
    line-height: 1.2;
    color: var(--cab-ink);
    text-transform: none;
}

.cab-profile .cab-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.cab-profile .cab-tags li {
    margin: 0;
    padding: 6px 18px;
    border-radius: 999px;
    background-color: var(--cab-chip);
    color: #5b6068;
    font-size: 15px;
    line-height: 1.5;
    list-style: none;
}
.cab-profile .cab-tags li::before,
.cab-profile .cab-edu li::before {
    content: none;
}

.cab-profile .cab-edu {
    margin: 0;
    padding: 0;
    list-style: none;
}
.cab-profile .cab-edu li {
    margin: 0 0 14px;
    list-style: none;
}
.cab-profile .cab-edu li:last-child {
    margin-bottom: 0;
}
.cab-profile .cab-edu__school {
    display: inline-block;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--cab-ink);
}
.cab-profile a.cab-edu__school {
    text-decoration: underline;
    text-underline-offset: 3px;
}
.cab-profile a.cab-edu__school:hover {
    color: var(--cab-accent);
}
.cab-profile .cab-edu__degree {
    display: block;
    margin-top: 2px;
    font-size: 15px;
    line-height: 1.45;
    color: var(--cab-muted);
}

/* ==========================================================================
   3. Author ki posts (author page par)
   ========================================================================== */

.cab-author-posts {
    margin-top: 64px;
}
.cab-author-posts .cab-author-posts__title {
    margin: 0 0 24px;
    padding: 0;
    font-size: 28px;
    font-weight: 500;
    line-height: 1.2;
    color: var(--cab-ink);
}
.cab-post-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}
.cab-author-posts .cab-post-card {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--cab-line);
    border-radius: 8px;
    background: #ffffff;
}
.cab-post-card__thumb {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: var(--cab-chip);
}
.cab-post-card__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.cab-post-card:hover .cab-post-card__thumb img {
    transform: scale(1.03);
}
.cab-post-card__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px 20px 22px;
}
.cab-author-posts .cab-post-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    color: var(--cab-muted);
}
.cab-post-card__meta span {
    color: var(--cab-ring-1);
    font-weight: 600;
}
.cab-author-posts .cab-post-card__title {
    margin: 0;
    padding: 0;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.35;
}
.cab-author-posts .cab-post-card__title a {
    color: var(--cab-ink);
    text-decoration: none;
}
.cab-author-posts .cab-post-card__title a:hover {
    color: var(--cab-accent);
}
.cab-author-posts .cab-post-card__excerpt {
    margin: 0;
    font-size: 15px;
    line-height: 1.55;
    color: #4a4f56;
}
.cab-author-posts__empty {
    color: var(--cab-muted);
}

/* Pagination */
.cab-author-posts .navigation.pagination {
    margin-top: 40px;
}
.cab-author-posts .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.cab-author-posts .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border: 1px solid var(--cab-line);
    border-radius: 6px;
    color: var(--cab-ink);
    font-size: 15px;
    text-decoration: none;
}
.cab-author-posts a.page-numbers:hover {
    border-color: var(--cab-ink);
}
.cab-author-posts .page-numbers.current {
    border-color: var(--cab-ink);
    background-color: var(--cab-ink);
    color: #ffffff;
}
.cab-author-posts .page-numbers.dots {
    border-color: transparent;
}
.cab-author-posts .screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

/* ==========================================================================
   Mobile
   ========================================================================== */

@media (max-width: 1024px) {
    .cab-post-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
    }
}

@media (max-width: 782px) {
    .cab-post-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .cab-author-page {
        padding: 32px 16px 56px;
    }
    .cab-profile__top {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    .cab-profile__avatar {
        width: 116px;
        height: 116px;
    }
    .cab-profile .cab-profile__bio {
        margin: 28px 0 32px;
        font-size: 16px;
    }
    .cab-profile__cards {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }
    .cab-author-posts {
        margin-top: 48px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cab-author-box .cab-social-icon,
    .cab-post-card__thumb img {
        transition: none;
    }
    .cab-author-box .cab-social-icon:hover,
    .cab-post-card:hover .cab-post-card__thumb img {
        transform: none;
    }
}


.cab-profile__avatar,
.cab-author-box .cab-avatar-container {
    --cab-ring-color: #5b6b6b;   /* grey ring */
    --cab-dot-color: #f99a64;    /* orange circle (sirf transparent PNG photo mein dikhta hai) */
    --cab-step: calc(var(--cab-av) * 0.04);                /* har 90° par "step" ka size */
    --cab-r: calc(var(--cab-av) * 0.5 - var(--cab-step));
    --cab-spiral:
        radial-gradient(circle var(--cab-r) at 100% calc(100% - var(--cab-step)), var(--cab-ring-color) calc(100% - 1px), #0000 100%) left top / 50% 50% no-repeat,
        radial-gradient(circle var(--cab-r) at var(--cab-step) 100%, var(--cab-ring-color) calc(100% - 1px), #0000 100%) right top / 50% 50% no-repeat,
        radial-gradient(circle var(--cab-r) at 0 var(--cab-step), var(--cab-ring-color) calc(100% - 1px), #0000 100%) right bottom / 50% 50% no-repeat,
        radial-gradient(circle var(--cab-r) at calc(100% - var(--cab-step)) 0, var(--cab-ring-color) calc(100% - 1px), #0000 100%) left bottom / 50% 50% no-repeat;
 
    position: relative;
    box-sizing: border-box;
    width: var(--cab-av);
    height: var(--cab-av);
    margin: 0;
    padding: calc(var(--cab-av) * 0.11);  /* ring ki motai */
    background:
        radial-gradient(circle calc(var(--cab-av) * 0.32), var(--cab-dot-color) calc(100% - 1px), #0000 100%) center / 100% 100% no-repeat,
        var(--cab-spiral);
}
.cab-profile__avatar { --cab-av: 152px; }                          /* author page */
.cab-author-box .cab-avatar-container { --cab-av: 110px; }         /* post ke neeche wala box */
 
@media (max-width: 782px) {
    .cab-profile__avatar { --cab-av: 116px; }
}
 
.cab-author-box .cab-avatar-container a {
    display: block;
    width: 100%;
    height: 100%;
}
.cab-profile__avatar img,
.cab-author-box .cab-avatar-container img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: none;
}
