/* ============================================================================
 * Person.css — صفحه‌ی شخصی یک عضو تیم، به شکل کارنامه (/team/<slug>).
 *
 * روی `Team.css` سوار می‌شود و رنگ و فاصله و قلم را از
 * `platform-tokens.css` می‌گیرد، پس این صفحه با بقیه‌ی سایت یک خانواده
 * می‌ماند.
 *
 * ⚠ راست‌چینی از `dir` سند می‌آید و همه‌ی فاصله‌ها منطقی‌اند
 *   (`margin-inline`, `padding-inline`), پس نسخه‌ی انگلیسی خودش آینه می‌شود.
 * ⭐ نمای تیره از ۲۶ آبان ۱۴۰۵ واقعی است، نه تزئین: همان نام‌های محلی
 *   `Team.css` دوباره تعریف می‌شوند، پس هر چیزی که از آن‌ها رنگ می‌گیرد
 *   خودش عوض می‌شود.
 * ========================================================================== */

/* ───── نمای تیره ─────
   دو حالت: وقتی کاربر خودش انتخاب کرده (`data-theme="dark"`) و وقتی
   دستگاهش تیره است و کاربر چیزی انتخاب نکرده.
   ⛔ تصویر سه‌بعدی `mix-blend-mode: multiply` دارد و روی زمینه‌ی تیره
   سیاه می‌شود، پس در نمای تیره روی تخته‌ی روشن خودش می‌نشیند. */
@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) {
        color-scheme: dark;
        --c-paper:    #0e1524;
        --c-paper-2:  #141d31;
        --c-paper-3:  #1b2540;
        --c-ink:      #eaf0fb;
        --c-ink-soft: #a6b4ce;
        --c-hair:     #22304d;
        --c-hair-2:   #2d3f63;
        --c-brand:    #6b9bff;
        --c-brand-deep: #8fb4ff;
        --c-brand-wash: rgba(107, 155, 255, .12);
        --c-ok:       #86efac;
    --c-ok-ink:   #86efac;
    --c-ok-wash:  rgba(134, 239, 172, .12);
    --c-ok-line:  rgba(134, 239, 172, .30);
    --c-on-brand: #0b1220;
    }
    /* ⛔ `mix-blend-mode: multiply` با پس‌زمینه‌ی خودِ عنصر کاری ندارد؛ با
       آنچه پشتش است ضرب می‌شود. پس در نمای تیره ضرب خاموش می‌شود و
       تصویر روی تخته‌ی روشن خودش می‌نشیند. ۲۶ آبان ۱۴۰۵. */
    html:not([data-theme="light"]) .pr-art,
    html:not([data-theme="light"]) .tm-hero__art {
        mix-blend-mode: normal;
        background: #eef2f9; border-radius: var(--r-lg); padding: 10px;
    }
}

html[data-theme="dark"] {
    color-scheme: dark;
    --c-paper:    #0e1524;
    --c-paper-2:  #141d31;
    --c-paper-3:  #1b2540;
    --c-ink:      #eaf0fb;
    --c-ink-soft: #a6b4ce;
    --c-hair:     #22304d;
    --c-hair-2:   #2d3f63;
    --c-brand:    #6b9bff;
    --c-brand-deep: #8fb4ff;
    --c-brand-wash: rgba(107, 155, 255, .12);
    --c-ok:       #86efac;
    --c-ok-ink:   #86efac;
    --c-ok-wash:  rgba(134, 239, 172, .12);
    --c-ok-line:  rgba(134, 239, 172, .30);
    --c-on-brand: #0b1220;
}
html[data-theme="dark"] .pr-art,
html[data-theme="dark"] .tm-hero__art {
    mix-blend-mode: normal;
    background: #eef2f9; border-radius: var(--r-lg); padding: 10px;
}

/* ⚠ سرصفحه‌ی چسبیده پس‌زمینه‌ی سفید ثابت دارد؛ در نمای تیره باید از
   همان کاغذ صفحه بگیرد، وگرنه یک نوار سفید بالای صفحه‌ی تیره می‌ماند. */
html[data-theme="dark"] .m-head.is-stuck,
html:not([data-theme="light"]) .m-head.is-stuck { background: var(--c-paper); }

.pr-body { background: var(--c-bg); }
.pr-wrap { padding-bottom: 24px; }

/* ───── مسیر بالای صفحه ───── */
.pr-crumb {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    margin-bottom: 10px; color: var(--c-soft); font-size: 13px;
}
.pr-crumb a {
    display: inline-flex; align-items: center; min-height: 28px;
    color: var(--c-soft); text-decoration: none;
}
.pr-crumb a:hover { color: var(--c-brand); text-decoration: underline; }

/* ───── سرصفحه ───── */
.pr-hero { display: grid; gap: 20px; align-items: center; margin-bottom: 8px; }
.pr-art {
    width: 100%; height: auto; max-width: 240px;
    margin-inline: auto; mix-blend-mode: multiply;
}
.pr-eyebrow {
    margin: 0 0 6px; color: var(--c-brand); font-size: 14px; font-weight: 700;
    letter-spacing: .02em;
}
.pr-name { margin: 0; font-size: clamp(30px, 5.6vw, 52px); font-weight: 800; line-height: 1.35; }
.pr-headline {
    margin: 10px 0 0; font-size: clamp(17px, 2vw, 22px); font-weight: 700;
    line-height: 1.7; max-width: 30ch; color: var(--c-ink);
}
.pr-lede { margin: 0; color: var(--c-soft); font-size: 15px; line-height: 2; max-width: 64ch; }
.pr-bio  { margin: 14px 0 0; color: var(--c-soft); font-size: 15px; line-height: 2; max-width: 56ch; }

.pr-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.pr-btn {
    display: inline-flex; align-items: center; min-height: 44px;
    padding-inline: 20px; border-radius: 999px;
    font-size: 14px; font-weight: 700; text-decoration: none;
    border: 1px solid transparent; transition: transform .18s ease, box-shadow .18s ease;
}
/* ⚠ در نمای تیره رنگ برند روشن می‌شود، پس متن سفید رویش ۲٫۶:۱ است.
   مرکب دکمه هم توکن خودش را دارد. */
.pr-btn--solid { background: var(--c-brand); color: var(--c-on-brand, #fff); }
.pr-btn--line  { border-color: var(--c-hair-2, var(--c-hair)); color: var(--c-ink); }
.pr-btn:hover  { transform: translateY(-1px); }
.pr-btn--line:hover { border-color: var(--c-brand); color: var(--c-brand); }

/* ───── ناوبری درون‌صفحه ─────
   ⚠ روی گوشی یک نوار افقی می‌شود، نه ستونی که نصف صفحه را بگیرد. */
.pr-jump {
    display: flex; gap: 8px; flex-wrap: nowrap;
    margin: 26px 0 6px; padding-bottom: 6px;
    overflow-x: auto; scrollbar-width: none;
    border-block-end: 1px solid var(--c-hair);
}
.pr-jump::-webkit-scrollbar { display: none; }
.pr-jump a {
    display: inline-flex; align-items: center; min-height: 40px;
    padding-inline: 14px; border-radius: 999px; white-space: nowrap;
    color: var(--c-soft); font-size: 14px; font-weight: 600; text-decoration: none;
    transition: background .18s ease, color .18s ease;
}
.pr-jump a:hover { background: var(--c-brand-wash, rgba(37, 99, 235, .08)); color: var(--c-brand); }

/* ───── یک نگاه ───── */
.pr-glance {
    list-style: none; margin: 26px 0 0; padding: 0;
    display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr));
}
.pr-glance li {
    display: grid; gap: 2px; align-content: start;
    padding: 16px 18px;
    background: var(--c-card); border: 1px solid var(--c-hair);
    border-radius: var(--radius);
}
.pr-glance b {
    color: var(--c-brand); font-size: clamp(22px, 3.4vw, 30px); font-weight: 800;
    line-height: 1.4; direction: ltr; unicode-bidi: isolate;
}
.pr-glance strong { font-size: 14px; font-weight: 700; }
.pr-glance span { color: var(--c-soft); font-size: 13px; line-height: 1.8; }

/* ───── بخش‌ها ───── */
.pr-sec { margin-top: 40px; scroll-margin-top: calc(var(--head, 64px) + 16px); }
.pr-sec h2 { margin: 0 0 16px; font-size: clamp(19px, 2.2vw, 24px); font-weight: 800; }
.pr-sec h3 { margin: 0 0 10px; font-size: 15px; font-weight: 700; color: var(--c-ink); }

.pr-points, .pr-works, .pr-links, .pr-skills {
    list-style: none; margin: 0; padding: 0; display: grid; gap: 12px;
}
.pr-points li {
    display: grid; gap: 4px;
    padding: 16px 18px;
    background: var(--c-card); border: 1px solid var(--c-hair);
    border-radius: var(--radius);
}
.pr-points b { font-size: 15px; font-weight: 700; }
.pr-points span { color: var(--c-soft); font-size: 14px; line-height: 1.9; }

/* ───── توانایی‌ها ───── */
.pr-skills > li {
    padding: 18px 20px;
    background: var(--c-card); border: 1px solid var(--c-hair);
    border-radius: var(--radius);
}
.pr-skills > li > b { display: block; margin-bottom: 10px; font-size: 15px; font-weight: 700; }
.pr-skills ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pr-skills ul li {
    position: relative; padding-inline-start: 16px;
    color: var(--c-soft); font-size: 14px; line-height: 1.9;
}
/* ⚠ نقطه با CSS کشیده می‌شود، نه با نویسه‌ی خنثی در متن: نویسه‌ی خنثی
   کنار واژه‌ی لاتین جایش را عوض می‌کند. */
.pr-skills ul li::before {
    content: ""; position: absolute; inset-inline-start: 0; inset-block-start: .85em;
    width: 5px; height: 5px; border-radius: 50%; background: var(--c-brand);
}

/* ───── تجربه‌ی کاری ───── */
.pr-xp { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.pr-xp > li {
    display: flex; flex-direction: column;
    padding: 18px 20px;
    background: var(--c-card); border: 1px solid var(--c-hair);
    border-radius: var(--radius);
}
.pr-xp__head {
    display: flex; align-items: baseline; justify-content: space-between;
    flex-wrap: wrap; gap: 6px 14px;
}
.pr-xp__head b { font-size: 16px; font-weight: 800; }
.pr-xp__when {
    color: var(--c-soft); font-size: 13px; font-weight: 600;
    white-space: nowrap;
}
.pr-xp__role { margin: 2px 0 0; color: var(--c-brand); font-size: 14px; font-weight: 700; }
.pr-xp__note { margin: 8px 0 0; color: var(--c-soft); font-size: 14px; line-height: 1.9; }
.pr-xp__points { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 7px; }
.pr-xp__points li {
    position: relative; padding-inline-start: 16px;
    color: var(--c-soft); font-size: 14px; line-height: 1.95;
}
.pr-xp__points li::before {
    content: ""; position: absolute; inset-inline-start: 0; inset-block-start: .88em;
    width: 5px; height: 5px; border-radius: 50%; background: var(--c-hair-2, #ccd6e6);
}

/* ───── تحصیلات، زبان، گواهی‌نامه ───── */
.pr-edu { display: grid; gap: 14px; }
.pr-edu__col {
    padding: 18px 20px;
    background: var(--c-card); border: 1px solid var(--c-hair);
    border-radius: var(--radius);
}
.pr-edu__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.pr-edu__list li { display: grid; gap: 2px; }
.pr-edu__list b { font-size: 14px; font-weight: 700; }
.pr-edu__list span { color: var(--c-soft); font-size: 13px; line-height: 1.8; }

/* ───── پروژه‌ها ───── */
.pr-works li {
    display: flex; flex-direction: column; gap: 4px;
    padding: 16px 18px;
    background: var(--c-card); border: 1px solid var(--c-hair);
    border-radius: var(--radius);
}
.pr-works__line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pr-works b { font-size: 15px; font-weight: 700; }
.pr-works > li > span:not(.pr-works__line) { color: var(--c-soft); font-size: 14px; line-height: 1.9; }
/* نشانی سمت پایان کارت می‌نشیند، مثل کارت‌های نمونه‌کار صفحه‌ی معرفی. */
.pr-works a, .pr-addr {
    display: inline-flex; align-items: center; min-height: 28px;
    align-self: flex-end; margin-top: 4px;
    font-size: 13px; font-weight: 600;
    direction: ltr; unicode-bidi: isolate; text-decoration: none;
}
.pr-works a { color: var(--c-brand); }
.pr-works a:hover { text-decoration: underline; }
.pr-addr { color: var(--c-soft); }

/* برچسب وضعیت — واژه‌اش نوشته می‌شود، پس رنگ تنها حامل معنا نیست. */
.pr-badge {
    display: inline-flex; align-items: center;
    padding: 2px 10px; border-radius: 999px;
    font-size: 12px; font-weight: 700; line-height: 1.9;
    color: var(--c-soft); background: var(--c-paper-2); border: 1px solid var(--c-hair);
}
.pr-badge.is-live {
    /* ⚠ سبز توکن روی همین زمینه ۴٫۴:۱ می‌داد، کمی زیر کف ۴٫۵.
       سبز تیره‌تر روی زمینه‌ی روشن‌تر ۶٫۳:۱ می‌دهد. */
    color: var(--c-ok-ink, #116634);
    background: var(--c-ok-wash, rgba(21, 128, 61, .08));
    border-color: var(--c-ok-line, rgba(21, 128, 61, .24));
}

.pr-links li { font-size: 14px; }
.pr-links a {
    display: inline-flex; align-items: center; min-height: 28px;
    color: var(--c-brand); text-decoration: none;
}
.pr-links a:hover { text-decoration: underline; }

.pr-contact { padding-bottom: 8px; }

/* ───── تبلت به بالا ───── */
@media (min-width: 640px) {
    .pr-glance { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 760px) {
    .pr-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 300px); gap: 32px; }
    .pr-art { max-width: 300px; }
    .pr-points, .pr-works, .pr-skills { grid-template-columns: 1fr 1fr; }
    .pr-edu { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ⚠ روی لپ‌تاپ، بندهای تجربه در یک ستون ۱۳۲ تا ۱۴۵ نویسه در هر خط
   می‌شدند و سقف خوانایی فارسی حدود ۶۰ است. دو ستون هم خط را کوتاه
   می‌کند هم پهنا را می‌خرد. سنجیده با `wd_gate.py`، ۲۶ آبان ۱۴۰۵. */
@media (min-width: 1024px) {
    .pr-xp { grid-template-columns: 1fr 1fr; }
}

/* ⛔ و سقف نویسه مستقل از ستون هم نوشته می‌شود، چون جمله‌ی بلند در یک
   کارت پهن باز هم خط بلند می‌دهد. واحد `em` است نه `rem`: اندازه‌ی قلم
   خود بند مبناست. */
.pr-xp__points li, .pr-skills ul li, .pr-xp__note { max-width: 42em; }

/* ───── نمایشگر پهن ─────
   ⚠ روی ۱۹۲۰ پیکسل، ظرف ۱۱۲۰ پیکسلی یعنی ۲۱ درصد هر طرف هوا. پهن‌تر
   شدن ظرف به‌تنهایی فقط خط را بلند می‌کند، پس پهنای اضافه ستون می‌خرد:
   سه بند توانایی در یک ردیف، چهار پروژه در یک ردیف و تجربه‌ی کاری
   دوستونی. متن معرفی همچنان سقف ۶۴ نویسه دارد و کشیده نمی‌شود.
   سنجیده با `wd_gate.py`، ۲۶ آبان ۱۴۰۵. */
@media (min-width: 1700px) {
    .pr-wrap { max-width: 1480px; }
    .pr-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: 48px; }
    .pr-art { max-width: 360px; }
    .pr-skills { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .pr-works { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
