/* ==========================================================
   صفحه پروفایل نویسنده (شبیه لینکدین) + دکمه ورود نویسنده
   ========================================================== */

/* ---------- دکمه ورود نویسنده در فوتر ---------- */
.njk-author-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.njk-author-login__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 20px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, .28);
    background: rgba(255, 255, 255, .08);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: all .25s ease;
}

.njk-author-login__btn:hover {
    background: var(--thm-primary, #FF5A79);
    border-color: var(--thm-primary, #FF5A79);
    color: #fff;
}

.njk-author-login__out {
    font-size: 12px;
    color: rgba(255, 255, 255, .7);
    text-decoration: none;
}

.njk-author-login__out:hover {
    color: #fff;
}

/* ---------- صفحه پروفایل ---------- */
.njk-profile {
    padding: 0 0 80px;
    background: #f4f2ee;
    margin-top: -1px;
}

.njk-profile .container {
    padding-top: 40px;
}

.njk-card {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 16px;
    padding: 26px;
    margin-bottom: 20px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, .04);
}

.njk-card__title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    font-size: 18px;
    line-height: 1.5;
    color: #151515;
}

.njk-card__title i {
    color: var(--thm-primary, #FF5A79);
    font-size: 16px;
}

.njk-muted {
    color: #8a8a8a;
    font-size: 13px;
    margin: 0;
}

.njk-empty {
    text-align: center;
    padding: 60px 20px;
}

/* ---------- هدر ---------- */
.njk-hero {
    padding: 0;
    overflow: hidden;
}

.njk-hero__cover {
    height: 210px;
    background: linear-gradient(120deg, #151515, #3b3b46 55%, var(--thm-primary, #FF5A79));
    background-size: cover;
    background-position: center;
}

.njk-hero__body {
    position: relative;
    padding: 0 28px 26px;
}

.njk-hero__avatar {
    margin-top: -70px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid #fff;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .14);
}

.njk-hero__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.njk-hero__actions {
    position: absolute;
    top: 16px;
    left: 24px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.njk-hero__name {
    margin: 16px 0 4px;
    font-size: 28px;
    line-height: 1.4;
    color: #151515;
}

.njk-hero__headline {
    margin: 0 0 10px;
    font-size: 16px;
    color: #444;
}

.njk-hero__meta {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    font-size: 13px;
    color: #7a7a7a;
}

.njk-hero__meta i {
    color: var(--thm-primary, #FF5A79);
    margin-left: 6px;
}

/* ---------- دکمه‌ها ---------- */
.njk-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 30px;
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    cursor: pointer;
    text-decoration: none;
    transition: all .25s ease;
}

.njk-btn--primary {
    background: var(--thm-primary, #FF5A79);
    color: #fff;
}

.njk-btn--primary:hover {
    background: #151515;
    color: #fff;
}

.njk-btn--ghost {
    background: #fff;
    border-color: #dcdcdc;
    color: #333;
}

.njk-btn--ghost:hover {
    border-color: var(--thm-primary, #FF5A79);
    color: var(--thm-primary, #FF5A79);
}

/* ---------- پیام‌ها ---------- */
.njk-notice {
    padding: 14px 18px;
    margin-bottom: 20px;
    border-radius: 12px;
    font-size: 14px;
}

.njk-notice--ok {
    background: #e7f8ee;
    border: 1px solid #b7e8c9;
    color: #166534;
}

.njk-notice--err {
    background: #ffe9ec;
    border: 1px solid #ffc2cb;
    color: #9f1239;
}

/* ---------- آمار ---------- */
.njk-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

.njk-stat {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 14px;
    padding: 18px 10px;
    text-align: center;
    box-shadow: 0 4px 18px rgba(0, 0, 0, .04);
}

.njk-stat strong {
    display: block;
    font-size: 26px;
    line-height: 1.3;
    color: var(--thm-primary, #FF5A79);
}

.njk-stat span {
    font-size: 13px;
    color: #7a7a7a;
}

/* ---------- درباره / مهارت‌ها ---------- */
.njk-about {
    margin: 0;
    line-height: 2;
    color: #444;
}

.njk-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.njk-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 15px;
    border-radius: 30px;
    background: #f4f2ee;
    border: 1px solid #ebe7e0;
    font-size: 13px;
    color: #333;
    text-decoration: none;
}

.njk-chip b {
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: var(--thm-primary, #FF5A79);
    color: #fff;
    font-size: 11px;
    line-height: 20px;
    text-align: center;
}

.njk-chip--link:hover {
    background: #fff0f3;
    border-color: var(--thm-primary, #FF5A79);
    color: var(--thm-primary, #FF5A79);
}

/* ---------- سوابق ---------- */
.njk-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
}

.njk-timeline li {
    display: flex;
    gap: 14px;
    padding-bottom: 20px;
    position: relative;
}

.njk-timeline li:last-child {
    padding-bottom: 0;
}

.njk-timeline li:not(:last-child)::before {
    content: "";
    position: absolute;
    right: 21px;
    top: 44px;
    bottom: 4px;
    width: 2px;
    background: #eee;
}

.njk-timeline__dot {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff0f3;
    color: var(--thm-primary, #FF5A79);
}

.njk-timeline strong {
    display: block;
    font-size: 15px;
    color: #151515;
}

.njk-timeline span {
    display: block;
    font-size: 13px;
    color: #555;
}

.njk-timeline em {
    display: block;
    font-style: normal;
    font-size: 12px;
    color: #999;
}

/* ---------- مقالات ---------- */
.njk-post {
    display: flex;
    gap: 18px;
    padding: 18px 0;
    border-top: 1px solid #f0f0f0;
}

.njk-post:first-child {
    border-top: 0;
    padding-top: 0;
}

.njk-post__img {
    flex: 0 0 170px;
    height: 118px;
    border-radius: 12px;
    overflow: hidden;
    background: #eee;
}

.njk-post__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.njk-post:hover .njk-post__img img {
    transform: scale(1.06);
}

.njk-post__body {
    min-width: 0;
    flex: 1;
}

.njk-post__cat {
    display: inline-block;
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 700;
    color: var(--thm-primary, #FF5A79);
    text-decoration: none;
}

.njk-post__body h3 {
    margin: 0 0 6px;
    font-size: 17px;
    line-height: 1.7;
}

.njk-post__body h3 a {
    color: #151515;
    text-decoration: none;
}

.njk-post__body h3 a:hover {
    color: var(--thm-primary, #FF5A79);
}

.njk-post__body p {
    margin: 0 0 8px;
    font-size: 13px;
    line-height: 1.9;
    color: #6f6f6f;
}

.njk-post__meta {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    font-size: 12px;
    color: #8a8a8a;
}

.njk-post__meta i {
    margin-left: 4px;
    color: var(--thm-primary, #FF5A79);
}

.njk-pagination ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 22px 0 0;
    padding: 0;
}

.njk-pagination a,
.njk-pagination span {
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f2ee;
    color: #333;
    font-size: 13px;
    text-decoration: none;
}

.njk-pagination .current,
.njk-pagination a:hover {
    background: var(--thm-primary, #FF5A79);
    color: #fff;
}

/* ---------- ستون کناری ---------- */
.njk-side {
    position: sticky;
    top: 100px;
}

.njk-kv {
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
}

.njk-kv li {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px dashed #eee;
    font-size: 13px;
    color: #666;
}

.njk-kv li:last-child {
    border-bottom: 0;
}

.njk-kv strong {
    color: #151515;
}

.njk-chart {
    display: flex;
    align-items: flex-end;
    gap: 5px;
    height: 110px;
    padding-top: 6px;
}

.njk-chart__col {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 5px;
}

.njk-chart__bar {
    display: block;
    width: 100%;
    max-width: 16px;
    border-radius: 5px 5px 2px 2px;
    background: linear-gradient(180deg, var(--thm-primary, #FF5A79), #ff9bb0);
    min-height: 4px;
}

.njk-chart__col em {
    font-style: normal;
    font-size: 9px;
    color: #999;
    white-space: nowrap;
}

.njk-chart__cap {
    margin-top: 8px;
    text-align: center;
}

.njk-top {
    list-style: none;
    margin: 0;
    padding: 0;
}

.njk-top li {
    padding: 10px 0;
    border-bottom: 1px dashed #eee;
}

.njk-top li:last-child {
    border-bottom: 0;
}

.njk-top a {
    display: block;
    font-size: 13px;
    line-height: 1.8;
    color: #222;
    text-decoration: none;
}

.njk-top a:hover {
    color: var(--thm-primary, #FF5A79);
}

.njk-top span {
    font-size: 12px;
    color: #999;
}

.njk-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.njk-links a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 12px;
    background: #f4f2ee;
    color: #333;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all .25s ease;
}

.njk-links a i {
    width: 18px;
    text-align: center;
    color: var(--thm-primary, #FF5A79);
}

.njk-links a:hover {
    background: var(--thm-primary, #FF5A79);
    color: #fff;
}

.njk-links a:hover i {
    color: #fff;
}

/* ---------- فرم ویرایش ---------- */
.njk-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.njk-field {
    margin-bottom: 18px;
}

.njk-field label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 700;
    color: #333;
}

.njk-field input[type="text"],
.njk-field textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e3e3e3;
    border-radius: 12px;
    background: #fafafa;
    font-size: 14px;
    transition: all .2s ease;
}

.njk-field input[type="text"] {
    height: 50px;
    padding-top: 0;
    padding-bottom: 0;
}

.njk-field input:focus,
.njk-field textarea:focus {
    outline: none;
    background: #fff;
    border-color: var(--thm-primary, #FF5A79);
    box-shadow: 0 0 0 3px rgba(255, 90, 121, .12);
}

.njk-field input[type="file"] {
    width: 100%;
    font-size: 13px;
}

.njk-check {
    display: flex !important;
    align-items: center;
    gap: 8px;
    margin: 8px 0 0 !important;
    font-weight: 600 !important;
    color: #777 !important;
}

.njk-form__sub {
    margin: 10px 0 14px;
    font-size: 15px;
}

.njk-form__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 6px;
}

/* ---------- ریسپانسیو ---------- */
@media (max-width: 991px) {
    .njk-side {
        position: static;
    }
}

@media (max-width: 767px) {
    .njk-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .njk-form__row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .njk-hero__cover {
        height: 140px;
    }
    .njk-hero__avatar {
        width: 110px;
        height: 110px;
        margin-top: -55px;
    }
    .njk-hero__actions {
        position: static;
        margin-top: 14px;
    }
    .njk-hero__name {
        font-size: 22px;
    }
    .njk-post {
        flex-direction: column;
    }
    .njk-post__img {
        flex: none;
        width: 100%;
        height: 170px;
    }
}
