/* tolooie.ir — single stylesheet, RTL first. */
@font-face{font-family:Vazirmatn;src:url(../fonts/Vazirmatn-Variable.woff2) format("woff2");font-weight:100 900;font-display:swap}
:root{
  --bg:#f7f8fb;--surface:#fff;--surface-2:#f1f4f9;--text:#0f172a;--text-2:#3f4d63;--muted:#5b6880;--line:#e2e7ef;
  --brand:#4f46e5;--brand-2:#0d9488;--brand-soft:#eef2ff;--btn:#4f46e5;--btn-hover:#4338ca;--ok:#047857;--warn:#b45309;--err:#dc2626;
  --radius:16px;--radius-sm:10px;--radius-lg:24px;
  --shadow:0 1px 2px rgba(15,23,42,.04),0 6px 24px -8px rgba(15,23,42,.08);
  --shadow-lg:0 22px 48px -18px rgba(30,41,99,.28);
  --ring:0 0 0 3px color-mix(in srgb,var(--brand) 35%,transparent);
  --container:1120px;--header:68px;--ease:cubic-bezier(.2,.7,.2,1);
  color-scheme:light;
}
.dark{--bg:#0b1020;--surface:#111a2d;--surface-2:#17213a;--text:#e8edf6;--text-2:#bac5d8;--muted:#93a0b8;--line:#25324f;--brand:#8b93fa;--brand-2:#2dd4bf;--brand-soft:#1c2448;--btn:#5850ec;--btn-hover:#6560f0;--ok:#34d399;--warn:#fbbf24;--err:#f87171;--shadow:0 1px 2px rgba(0,0,0,.3),0 8px 28px -10px rgba(0,0,0,.5);--shadow-lg:0 24px 50px -20px rgba(0,0,0,.7);color-scheme:dark}
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%;scroll-padding-top:calc(var(--header) + 12px)}
body{margin:0;font-family:Vazirmatn,Tahoma,system-ui,sans-serif;font-size:1rem;line-height:1.9;color:var(--text);background:var(--bg);-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;overflow-wrap:break-word}
img{max-width:100%;height:auto;display:block}
a{color:var(--brand);text-decoration:none;text-underline-offset:4px}
a:hover{text-decoration:underline}
/* Persian is a joined script: never use negative letter-spacing on it. */
h1,h2,h3,h4{line-height:1.5;margin:0 0 .5em;font-weight:800;text-wrap:balance}
p{margin:0 0 1em;text-wrap:pretty}
code,.mono{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
::selection{background:color-mix(in srgb,var(--brand) 25%,transparent)}
:focus-visible{outline:3px solid color-mix(in srgb,var(--brand) 70%,transparent);outline-offset:3px;border-radius:6px}
.container{width:100%;max-width:var(--container);margin-inline:auto;padding-inline:20px}
.narrow{max-width:760px}
.muted{color:var(--muted)}
.small{font-size:.85rem}
.center{text-align:center;display:block}
.skip{position:absolute;inset-inline-start:-999px;top:8px;background:var(--btn);color:#fff;padding:6px 14px;border-radius:8px;z-index:99}
.skip:focus{inset-inline-start:8px}
.icon{flex:none;vertical-align:middle}
.en{font-family:system-ui,sans-serif}

/* ---------- Justified text (Persian-friendly) ----------
   Only paragraphs are justified, never headings/meta. Hyphenation is off (Persian has none),
   the last line stays at the start edge, and phones / narrow columns keep ragged text
   (justifying ~35-char lines opens ugly gaps). Containers report their width to @container.
   Only RTL (Persian) text is justified; legacy English snippets full of URLs/code stay left-aligned. */
.prose,.post-body,.project-body,.news-item,.news-featured,.timeline,.hero-text,.page-hero .container{container-type:inline-size}
.text-just,.prose p,.prose li,.prose blockquote{hyphens:none;-webkit-hyphens:none;text-justify:inter-word;text-align-last:start;overflow-wrap:break-word}
@media (min-width:37.5em){
  @container (min-width:17.5rem){
    .text-just:dir(rtl),.prose p:dir(rtl),.prose li:dir(rtl),.prose blockquote:dir(rtl){text-align:justify}
  }
}
/* News titles are justified (article titles were reverted to start-aligned at the owner's request). Unlike body text this applies
   on phones too; text-align-last:start keeps one-line titles and last lines on the start edge (right in RTL). */
.news-item h2,.news-featured h2,.news-featured h3{text-align:justify;text-align-last:start;text-justify:inter-word;hyphens:none;-webkit-hyphens:none;overflow-wrap:break-word}

/* ---------- Buttons ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:.5em;min-height:44px;padding:.6em 1.35em;border-radius:999px;border:1px solid transparent;background:var(--btn);color:#fff;font:inherit;font-weight:700;font-size:.95rem;line-height:1.4;cursor:pointer;text-decoration:none!important;transition:transform .18s var(--ease),box-shadow .2s,background-color .2s,border-color .2s,color .2s;box-shadow:0 8px 20px -10px color-mix(in srgb,var(--btn) 80%,transparent)}
.btn:hover{background:var(--btn-hover);transform:translateY(-1px)}
.btn:active{transform:none}
.btn:focus-visible{outline:0;box-shadow:var(--ring)}
.btn-ghost{background:var(--surface);color:var(--text);border-color:var(--line);box-shadow:none}
.btn-ghost:hover{background:var(--surface);border-color:var(--brand);color:var(--brand)}
.btn-light{background:#fff;color:#1e1b4b;box-shadow:none}
.btn-light:hover{background:#eef2ff}
.btn-github{background:#1f2328;color:#fff;box-shadow:0 8px 20px -10px rgba(31,35,40,.7)}
.btn-github:hover{background:#000}
.dark .btn-github{background:#f0f3f6;color:#1f2328}
.dark .btn-github:hover{background:#fff}
.btn.block{width:100%}

/* ---------- Header ---------- */
.site-header{position:sticky;top:0;z-index:50;background:color-mix(in srgb,var(--bg) 84%,transparent);backdrop-filter:saturate(1.6) blur(14px);-webkit-backdrop-filter:saturate(1.6) blur(14px);border-bottom:1px solid transparent;transition:border-color .2s,box-shadow .2s}
.site-header.scrolled{border-bottom-color:var(--line);box-shadow:0 6px 24px -18px rgba(15,23,42,.4)}
.nav-wrap{display:flex;align-items:center;justify-content:space-between;gap:16px;height:var(--header)}
.brand{display:flex;align-items:center;gap:12px;color:var(--text);border-radius:12px}
.brand:hover{text-decoration:none}
.brand-mark{display:grid;place-items:center;width:40px;height:40px;border-radius:12px;background:linear-gradient(135deg,var(--btn),var(--brand-2));color:#fff;font-weight:900;font-size:1.25rem;flex:none}
.brand-text{display:flex;flex-direction:column;line-height:1.35}
.brand-text strong{font-size:1rem}
.brand-text small{font-size:.75rem;color:var(--muted)}
.site-nav{display:flex;align-items:center;gap:2px}
.site-nav a{position:relative;color:var(--text-2);padding:.45em .85em;border-radius:999px;font-weight:600;font-size:.94rem;transition:color .2s,background-color .2s}
.site-nav a:hover{text-decoration:none;color:var(--text);background:var(--surface-2)}
.site-nav a.active{color:var(--brand);background:var(--brand-soft)}
.theme-toggle{display:grid;place-items:center;width:40px;height:40px;margin-inline-start:8px;border-radius:50%;border:1px solid var(--line);background:var(--surface);color:var(--text-2);cursor:pointer;transition:color .2s,border-color .2s,transform .3s var(--ease)}
.theme-toggle:hover{color:var(--brand);border-color:var(--brand);transform:rotate(-15deg)}
.theme-toggle .i-sun,.dark .theme-toggle .i-moon{display:none}
.dark .theme-toggle .i-sun{display:block}
.nav-toggle{display:none;width:44px;height:44px;border:1px solid var(--line);background:var(--surface);border-radius:12px;flex-direction:column;align-items:center;justify-content:center;gap:4px;cursor:pointer}
.nav-toggle span{display:block;width:18px;height:2px;background:var(--text);border-radius:2px;transition:transform .25s var(--ease),opacity .2s}
.nav-toggle[aria-expanded=true] span:nth-child(1){transform:translateY(6px) rotate(45deg)}
.nav-toggle[aria-expanded=true] span:nth-child(2){opacity:0}
.nav-toggle[aria-expanded=true] span:nth-child(3){transform:translateY(-6px) rotate(-45deg)}

/* ---------- Hero ---------- */
.hero{padding:76px 0 64px;background:radial-gradient(900px 420px at 85% -10%,color-mix(in srgb,var(--brand) 15%,transparent),transparent 70%),radial-gradient(700px 360px at 0% 10%,color-mix(in srgb,var(--brand-2) 11%,transparent),transparent 70%)}
.hero-grid{display:grid;grid-template-columns:1.25fr .85fr;gap:56px;align-items:center}
.eyebrow{display:inline-block;font-size:.82rem;font-weight:700;color:var(--brand);background:var(--brand-soft);padding:.15em .9em;border-radius:999px;margin-bottom:12px}
.hero h1{font-size:clamp(2.2rem,1.5rem + 3vw,3.4rem);font-weight:900;line-height:1.35;margin-bottom:.2em;background:linear-gradient(90deg,var(--text),color-mix(in srgb,var(--brand) 70%,var(--text)));-webkit-background-clip:text;background-clip:text;color:transparent}
.hero-role{font-size:1.2rem;font-weight:700;color:var(--text-2);margin-bottom:1em}
.hero-role .en{display:block;font-size:.9rem;font-weight:500;color:var(--muted);margin-top:2px;text-align:right}
.lead{font-size:1.08rem;line-height:2;color:var(--text-2);max-width:62ch}
.hero-actions{display:flex;gap:12px;flex-wrap:wrap;margin:26px 0}
.hero-meta{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:10px 24px;color:var(--text-2);font-size:.93rem}
.hero-meta li{display:flex;align-items:center;gap:8px}
.hero-meta .icon{color:var(--brand)}
.hero-meta a{color:inherit}
.hero-meta a:hover{color:var(--brand)}
.hero-photo{position:relative;justify-self:center;width:min(360px,100%)}
.photo-frame{border-radius:32px;overflow:hidden;aspect-ratio:1;box-shadow:var(--shadow-lg);border:6px solid var(--surface);transform:rotate(-2deg);background:var(--surface-2);transition:transform .5s var(--ease)}
.hero-photo:hover .photo-frame{transform:rotate(0)}
.photo-frame img{width:100%;height:100%;object-fit:cover}
.stat-card{position:absolute;background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:10px 18px;box-shadow:var(--shadow);display:flex;flex-direction:column;line-height:1.45}
.stat-card strong{font-size:1.4rem;color:var(--brand)}
.stat-card span{font-size:.8rem;color:var(--muted)}
.stat-card.s1{bottom:-14px;inset-inline-end:-18px}
.stat-card.s2{top:22px;inset-inline-start:-26px}

/* ---------- Sections ---------- */
.section{padding:88px 0}
.section.alt{background:var(--surface-2)}
.pt-0{padding-top:0}
.section-head{margin-bottom:36px}
.section-head h2{font-size:clamp(1.5rem,1.2rem + 1.2vw,2rem);margin:0}
.section-head.row{display:flex;align-items:flex-end;justify-content:space-between;gap:16px}
.head-actions{display:flex;align-items:center;gap:18px;flex-wrap:wrap}
.link-more{display:inline-flex;align-items:center;gap:4px;font-weight:700;white-space:nowrap;padding:.3em 0}
.link-more .icon{transition:transform .2s var(--ease)}
.link-more:hover .icon{transform:translateX(-4px)}
.page-hero{padding:60px 0 40px}
.page-hero h1{font-size:clamp(2rem,1.4rem + 2.4vw,2.75rem);font-weight:900;margin-bottom:.3em}
.page-hero .hero-actions{margin-bottom:0}

.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:28px;box-shadow:var(--shadow)}
.card-title{display:flex;align-items:center;gap:10px;font-size:1.15rem;margin-bottom:20px}
.card-title .icon{color:var(--brand)}
.chip{display:inline-block;font-size:.76rem;font-weight:600;line-height:1.7;color:var(--brand);background:var(--brand-soft);padding:0 .75em;border-radius:999px;white-space:nowrap}

/* ---------- Resume ---------- */
.resume-grid{display:grid;grid-template-columns:1fr 1fr;gap:24px;align-items:start}
.timeline{list-style:none;margin:0;padding:0;position:relative}
.timeline li{position:relative;padding-inline-start:28px;padding-bottom:24px}
.timeline li:last-child{padding-bottom:0}
.timeline li::before{content:"";position:absolute;inset-inline-start:0;top:10px;width:12px;height:12px;border-radius:50%;background:var(--surface);border:3px solid var(--brand)}
.timeline li::after{content:"";position:absolute;inset-inline-start:5.5px;top:26px;bottom:2px;width:1px;background:var(--line)}
.timeline li:last-child::after{display:none}
.tl-head{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;line-height:1.7}
.tl-sub{font-size:.92rem;color:var(--brand-2);font-weight:600}
.timeline p{margin:.35em 0 0;font-size:.93rem;line-height:1.95;color:var(--text-2)}

/* ---------- Skills ---------- */
.skills-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:24px}
.skills{list-style:none;margin:0;padding:0;display:grid;gap:14px}
.skill-row{display:flex;justify-content:space-between;gap:10px;font-size:.93rem;font-weight:600;margin-bottom:4px}
.bar{height:8px;background:var(--surface-2);border-radius:99px;overflow:hidden}
.card .bar{background:color-mix(in srgb,var(--line) 60%,var(--surface-2))}
.bar span{display:block;height:100%;width:var(--w);border-radius:inherit;background:linear-gradient(90deg,var(--brand-2),var(--brand))}

/* ---------- Projects (also replaces the old portfolio grid) ---------- */
.project-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:24px}
.project-card{position:relative;display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow);transition:transform .25s var(--ease),box-shadow .25s,border-color .25s}
.project-card:hover{transform:translateY(-4px);box-shadow:var(--shadow-lg);border-color:color-mix(in srgb,var(--brand) 30%,var(--line))}
.project-cover{aspect-ratio:3/2;background:#f6f6f6;overflow:hidden;border-bottom:1px solid var(--line)}
.project-cover img{width:100%;height:100%;object-fit:cover;transition:transform .6s var(--ease)}
.project-card:hover .project-cover img{transform:scale(1.04)}
.dark .project-cover img{filter:brightness(.9)}
.project-cover.placeholder{display:grid;place-items:center;background:linear-gradient(135deg,color-mix(in srgb,var(--btn) 85%,#000),var(--brand-2))}
.project-cover.placeholder span{font-size:3rem;font-weight:900;color:rgba(255,255,255,.92)}
.project-body{display:flex;flex-direction:column;gap:10px;padding:20px 22px 22px;flex:1}
.project-title{font-size:1.08rem;line-height:1.6;margin:0}
.project-desc{margin:0;font-size:.92rem;line-height:1.9;color:var(--text-2)}
.tags{list-style:none;margin:2px 0 0;padding:0;display:flex;flex-wrap:wrap;gap:6px}
.tags li{font-size:.75rem;font-weight:600;line-height:1.8;padding:0 .7em;border-radius:6px;background:var(--surface-2);color:var(--text-2);border:1px solid var(--line)}
.project-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:auto;padding-top:8px}
.project-actions .btn{min-height:40px;padding:.45em 1.1em;font-size:.88rem}

/* ---------- Posts ---------- */
.post-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:24px}
.post-card{position:relative;display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow);transition:transform .25s var(--ease),box-shadow .25s,border-color .25s}
.post-card:hover{transform:translateY(-4px);box-shadow:var(--shadow-lg);border-color:color-mix(in srgb,var(--brand) 30%,var(--line))}
.post-card:focus-within{box-shadow:var(--ring)}
.post-cover{display:block;aspect-ratio:16/9;background:var(--surface-2);overflow:hidden}
.post-cover img{width:100%;height:100%;object-fit:cover;transition:transform .6s var(--ease)}
.post-card:hover .post-cover img{transform:scale(1.04)}
.post-cover.placeholder{display:grid;place-items:center;background:linear-gradient(135deg,color-mix(in srgb,var(--btn) 85%,#000),var(--brand-2))}
.post-cover.placeholder span{font-size:3rem;font-weight:900;color:rgba(255,255,255,.92)}
.post-body{padding:20px 22px 24px;display:flex;flex-direction:column;flex:1}
.post-meta{display:flex;align-items:center;flex-wrap:wrap;gap:6px;font-size:.8rem;color:var(--muted);margin-bottom:8px}
.post-card h3{font-size:1.08rem;line-height:1.65;margin-bottom:.45em}
.post-card h3 a{color:var(--text)}
.post-card h3 a::after{content:"";position:absolute;inset:0;z-index:1}
.post-card h3 a:hover{text-decoration:none;color:var(--brand)}
.post-card h3 a:focus-visible{outline:0}
.post-card p{color:var(--text-2);font-size:.92rem;line-height:1.9;margin:0;overflow-wrap:anywhere}
.pager{display:flex;justify-content:center;gap:6px;margin-top:40px;flex-wrap:wrap}
.pager a{min-width:42px;height:42px;display:grid;place-items:center;border-radius:12px;border:1px solid var(--line);background:var(--surface);color:var(--text-2);font-weight:700;transition:border-color .2s,color .2s}
.pager a:hover{text-decoration:none;border-color:var(--brand);color:var(--brand)}
.pager a.active{background:var(--btn);border-color:var(--btn);color:#fff}

/* ---------- Article ---------- */
.article{padding:44px 0 72px}
.article-head{margin-bottom:28px}
.article-head h1{font-size:clamp(1.8rem,1.3rem + 2vw,2.5rem);font-weight:900;line-height:1.5;margin:14px 0 10px}
.back{display:inline-flex;align-items:center;gap:4px;font-weight:700;font-size:.9rem}
.back .icon{transform:scaleX(-1)}
.article-cover img{border-radius:var(--radius);width:100%;box-shadow:var(--shadow)}
.article-cover{margin:0 auto 36px}
.prose{font-size:1.0625rem;line-height:2.05;color:var(--text);overflow-wrap:break-word}
.prose>:first-child{margin-top:0}
.prose h2{font-size:1.5rem;margin:1.8em 0 .6em}
.prose h3{font-size:1.25rem;margin:1.6em 0 .5em}
.prose h4,.prose h5{font-size:1.08rem;margin:1.4em 0 .4em}
.prose p,.prose ul,.prose ol{margin:0 0 1.15em}
.prose ul,.prose ol{padding-inline-start:1.6em}
.prose li{margin:.35em 0;padding-inline-start:.2em}
.prose li::marker{color:var(--brand)}
.prose img{border-radius:var(--radius-sm);margin:1.5em auto}
.prose blockquote{margin:1.6em 0;padding:1em 1.4em;border-inline-start:4px solid var(--brand);background:var(--brand-soft);border-radius:var(--radius-sm);color:var(--text-2)}
.prose blockquote p:last-child{margin:0}
.prose pre{direction:ltr;text-align:left;background:#0f172a;color:#e2e8f0;padding:18px 20px;border-radius:var(--radius-sm);overflow:auto;font-size:.88rem;line-height:1.7}
.prose :not(pre)>code{background:var(--surface-2);padding:.15em .45em;border-radius:6px;font-size:.88em}
.prose table{width:100%;border-collapse:collapse;margin:1.5em 0;font-size:.95rem;display:block;overflow-x:auto}
.prose th,.prose td{border:1px solid var(--line);padding:.6em .8em}
.prose hr{border:0;border-top:1px solid var(--line);margin:2.5em 0}
.prose a{text-decoration:underline;overflow-wrap:anywhere}
.prose iframe{max-width:100%;border-radius:var(--radius-sm)}
.badge{display:inline-block;font-size:.75rem;font-weight:700;padding:.15em .75em;border-radius:999px;background:var(--surface-2);color:var(--text-2);white-space:nowrap}
.badge.ok{background:color-mix(in srgb,var(--ok) 14%,transparent);color:var(--ok)}
.badge.warn{background:color-mix(in srgb,var(--warn) 15%,transparent);color:var(--warn)}
.badge.err{background:color-mix(in srgb,var(--err) 13%,transparent);color:var(--err)}

/* ---------- News ---------- */
.filters{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:28px}
.filters a{padding:.35em 1em;border-radius:999px;border:1px solid var(--line);background:var(--surface);color:var(--text-2);font-size:.9rem;font-weight:600}
.filters a:hover{text-decoration:none;border-color:var(--brand)}
.filters a.active{background:var(--text);border-color:var(--text);color:var(--bg)}
.filters .sep{width:1px;height:22px;background:var(--line);margin:0 4px}
.news-list{display:grid;grid-template-columns:repeat(2,1fr);gap:20px}
.news-item{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:22px 24px;display:flex;flex-direction:column;box-shadow:var(--shadow);transition:border-color .2s,box-shadow .2s,transform .25s var(--ease)}
.news-item:hover{border-color:color-mix(in srgb,var(--brand) 35%,var(--line));box-shadow:var(--shadow-lg);transform:translateY(-2px)}
.news-item.ltr{font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif}
.news-meta{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:6px 10px;font-size:.8rem;color:var(--muted);margin-bottom:10px;font-family:Vazirmatn,Tahoma,sans-serif}
.news-item.ltr .news-meta{flex-direction:row-reverse}
.source{font-weight:700;padding:.1em .7em;border-radius:6px;background:var(--brand-soft);color:var(--brand)}
.src-0,.src-4,.src-8,.src-c{background:#ecfeff;color:#0e7490}.src-1,.src-5,.src-9,.src-d{background:#fef3c7;color:#92400e}
.src-2,.src-6,.src-a,.src-e{background:#fce7f3;color:#9d174d}.src-3,.src-7,.src-b,.src-f{background:#ecfdf5;color:#047857}
.dark .source{background:var(--surface-2)!important;color:var(--brand-2)!important}
.news-item h2{font-size:1.04rem;line-height:1.7;margin-bottom:.5em}
.news-item h2 a,.news-featured h2 a,.news-featured h3 a{color:var(--text)}
.news-item h2 a:hover,.news-featured h2 a:hover,.news-featured h3 a:hover{color:var(--brand);text-decoration:none}
.news-item p{font-size:.92rem;line-height:1.95;color:var(--text-2);margin-bottom:.8em;flex:1}
.news-link{display:inline-flex;align-items:center;gap:6px;font-size:.85rem;font-weight:700;align-self:flex-start;font-family:Vazirmatn,Tahoma,sans-serif}
.news-item.ltr .news-link{align-self:flex-end}
.news-featured{position:relative;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:30px 34px;box-shadow:var(--shadow);display:flex;flex-direction:column;gap:6px;overflow:hidden}
.news-featured::before{content:"";position:absolute;inset-block:0;inset-inline-start:0;width:5px;background:linear-gradient(180deg,var(--brand),var(--brand-2))}
.news-featured h2{font-size:clamp(1.3rem,1.1rem + 1vw,1.75rem);line-height:1.6;margin:.2em 0 .3em}
.news-featured h3{font-size:1.2rem;line-height:1.7;margin:.2em 0 .3em}
.news-featured p{color:var(--text-2);font-size:1rem;line-height:2;margin-bottom:.9em}
.news-featured .btn,.news-featured .news-link{align-self:flex-start}
.news-featured.compact{padding:24px 28px}
.pick-date{font-weight:700;color:var(--brand)}
.archive-title{font-size:1.2rem;margin:48px 0 18px}
.news-mini{list-style:none;margin:0;padding:0;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden}
.news-mini li{display:flex;justify-content:space-between;gap:16px;padding:14px 22px;border-bottom:1px solid var(--line)}
.news-mini li:last-child{border:0}
.news-mini a{color:var(--text);font-weight:600}
.news-mini span{font-size:.8rem;white-space:nowrap}

/* ---------- CTA ---------- */
.cta{position:relative;display:flex;align-items:center;justify-content:space-between;gap:24px;padding:44px 48px;border-radius:var(--radius-lg);color:#fff;background:linear-gradient(120deg,#312e81,#4f46e5 55%,#0d9488);overflow:hidden;box-shadow:var(--shadow-lg)}
.cta::after{content:"";position:absolute;width:320px;height:320px;border-radius:50%;inset-inline-start:-80px;top:-160px;background:rgba(255,255,255,.08);pointer-events:none}
.cta>*{position:relative}
.cta h2{margin-bottom:.3em}
.cta p{margin:0;opacity:.92}
.cta .muted{color:#c7d2fe}

/* ---------- Forms ---------- */
.form{display:grid;gap:16px}
.form label{display:grid;gap:6px;font-weight:600;font-size:.92rem}
input,textarea,select{width:100%;font:inherit;font-weight:400;color:var(--text);background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:.7em .95em;min-height:44px;transition:border-color .15s,box-shadow .15s}
input:hover,textarea:hover,select:hover{border-color:color-mix(in srgb,var(--brand) 35%,var(--line))}
input:focus,textarea:focus,select:focus{outline:0;border-color:var(--brand);box-shadow:var(--ring)}
textarea{resize:vertical;line-height:1.8}
input[type=file]{padding:.5em;background:var(--surface-2)}
input[type=checkbox]{width:18px;height:18px;min-height:0;accent-color:var(--btn)}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.form-row.three{grid-template-columns:repeat(3,1fr)}
/* honeypot: clipped in place (an off-screen `left:-9999px` box created a huge sideways scroll in RTL) */
.hp{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.alert{padding:12px 16px;border-radius:12px;font-size:.93rem;border:1px solid transparent}
.alert.ok{background:color-mix(in srgb,var(--ok) 10%,var(--surface));border-color:color-mix(in srgb,var(--ok) 30%,transparent);color:var(--ok)}
.alert.err{background:color-mix(in srgb,var(--err) 9%,var(--surface));border-color:color-mix(in srgb,var(--err) 30%,transparent);color:var(--err)}
.alert.warn{background:color-mix(in srgb,var(--warn) 10%,var(--surface));border-color:color-mix(in srgb,var(--warn) 30%,transparent);color:var(--warn)}
.contact-grid{position:relative;display:grid;grid-template-columns:.8fr 1.2fr;gap:24px;align-items:start}
.contact-cards{display:grid;gap:16px}
.contact-card{display:flex;align-items:center;gap:16px;color:var(--text);padding:20px 22px;transition:border-color .2s,transform .25s var(--ease)}
a.contact-card:hover{text-decoration:none;border-color:var(--brand);transform:translateY(-2px)}
.contact-card .icon{color:#fff;background:linear-gradient(135deg,var(--btn),var(--brand-2));padding:11px;width:46px;height:46px;border-radius:14px}
.contact-card div{display:flex;flex-direction:column;line-height:1.55;min-width:0}
.contact-card strong{font-size:1rem;text-align:right;overflow-wrap:anywhere}
.empty-state{text-align:center;padding:56px 24px;color:var(--muted);display:grid;justify-items:center;gap:6px}
.empty-state .icon{color:var(--brand);background:var(--brand-soft);padding:14px;width:64px;height:64px;border-radius:20px;margin-bottom:6px}
.empty-state h2{font-size:1.15rem;color:var(--text);margin:0}
.empty-state p{margin:0}
.empty-state.big{padding:72px 20px 88px}
.empty-state.big h1{font-size:clamp(4rem,10vw,6rem);line-height:1.2;color:var(--brand);margin:0}
.empty-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:center;margin-top:18px}

/* ---------- Footer ---------- */
.site-footer{border-top:1px solid var(--line);padding:52px 0 22px;background:var(--surface);font-size:.92rem}
.footer-grid{display:grid;grid-template-columns:1.5fr 1fr 1fr;gap:32px 48px}
.footer-about p{margin:14px 0 0;max-width:44ch;line-height:1.95}
.footer-col{display:flex;flex-direction:column;align-items:flex-start;gap:6px}
.footer-col h2{font-size:.95rem;margin:0 0 6px}
.footer-col a,.footer-col>span{display:inline-flex;align-items:center;gap:8px;color:var(--text-2)}
.footer-col a:hover{color:var(--brand);text-decoration:none}
.footer-col .icon{color:var(--brand)}
.footer-bottom{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px;margin-top:36px;padding-top:18px;border-top:1px solid var(--line);font-size:.8rem;color:var(--muted)}
.to-top{color:var(--muted);font-weight:600}
.to-top:hover{color:var(--brand);text-decoration:none}

/* ---------- Motion (opt-in via JS, disabled for reduced motion) ---------- */
.js .reveal{opacity:0;transform:translateY(14px);transition:opacity .6s var(--ease),transform .6s var(--ease)}
.js .reveal.in{opacity:1;transform:none}

/* ---------- Responsive ---------- */
@media (max-width:960px){
  .hero-grid{grid-template-columns:1fr;gap:44px}
  .hero-photo{grid-row:1;width:min(280px,80%)}
  .resume-grid,.contact-grid{grid-template-columns:1fr}
  .skills-grid,.project-grid,.post-grid{grid-template-columns:repeat(2,1fr)}
  .news-list{grid-template-columns:1fr}
  .footer-grid{grid-template-columns:1fr 1fr}
  .footer-about{grid-column:1/-1}
}
@media (max-width:760px){
  :root{--header:62px}
  .nav-toggle{display:flex}
  .site-nav{position:absolute;top:calc(var(--header) - 4px);inset-inline:12px;flex-direction:column;align-items:stretch;gap:2px;background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:10px;box-shadow:var(--shadow-lg);visibility:hidden;opacity:0;transform:translateY(-8px);transition:opacity .2s,transform .25s var(--ease),visibility 0s .25s}
  .site-nav.open{visibility:visible;opacity:1;transform:none;transition:opacity .2s,transform .25s var(--ease)}
  .site-nav a{padding:.75em 1em;border-radius:12px}
  .theme-toggle{margin:6px auto 2px}
  .skills-grid,.project-grid,.post-grid,.form-row,.form-row.three{grid-template-columns:1fr}
  .section{padding:60px 0}
  .hero{padding:36px 0 48px}
  .page-hero{padding:40px 0 28px}
  .card{padding:22px}
  .news-featured{padding:24px 22px}
  .cta{flex-direction:column;align-items:flex-start;padding:32px 26px}
  .section-head{margin-bottom:28px}
  .section-head.row{flex-direction:column;align-items:flex-start;gap:12px}
  .news-mini li{flex-direction:column;gap:2px}
  .stat-card.s2{inset-inline-start:-12px}.stat-card.s1{inset-inline-end:-10px}
  .brand-text small{display:none}
}
@media (max-width:520px){
  .footer-grid{grid-template-columns:1fr}
  .hero-actions .btn{flex:1 1 auto}
}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}.js .reveal{opacity:1;transform:none}}

/* ---------- Article like / dislike ---------- */
.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.votes{margin-top:44px;margin-bottom:8px}
.vote-box{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:14px 20px;padding:20px 24px;border:1px solid var(--line);border-radius:var(--radius);background:linear-gradient(135deg,var(--surface),var(--surface-2));box-shadow:var(--shadow)}
.vote-q{margin:0;font-weight:700;font-size:1.05rem;color:var(--text)}
.vote-btns{display:flex;gap:10px}
.vote-btn{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:8px 16px;border:1px solid var(--line);border-radius:999px;background:var(--surface);color:var(--text-2);font:inherit;font-size:.95rem;cursor:pointer;transition:background .2s,border-color .2s,color .2s,transform .15s}
.vote-btn:hover{border-color:var(--brand);color:var(--text);transform:translateY(-1px)}
.vote-btn:active{transform:translateY(0) scale(.97)}
.vote-btn:focus-visible{outline:3px solid var(--brand);outline-offset:2px}
.vote-btn .vote-ic{flex:none;transition:transform .25s}
.vote-btn .vote-ic.flip{transform:rotate(180deg)}
.vote-cnt{min-width:1.4em;padding:1px 8px;border-radius:999px;background:var(--surface-2);font-weight:700;font-variant-numeric:tabular-nums;text-align:center}
.vote-btn.like[aria-pressed="true"]{background:rgba(4,120,87,.1);border-color:var(--ok);color:var(--ok)}
.vote-btn.dislike[aria-pressed="true"]{background:rgba(220,38,38,.09);border-color:var(--err);color:var(--err)}
.vote-btn[aria-pressed="true"] .vote-ic path{fill:currentColor;fill-opacity:.18}
.vote-btn[aria-pressed="true"] .vote-cnt{background:transparent}
.vote-btn.pop .vote-ic{animation:vote-pop .4s ease}
.vote-btn.pop .vote-ic.flip{animation:vote-pop-flip .4s ease}
@keyframes vote-pop{40%{transform:scale(1.3) rotate(-8deg)}}
@keyframes vote-pop-flip{40%{transform:rotate(180deg) scale(1.3)}}
.vote-box.is-busy .vote-btn{opacity:.7;pointer-events:none}
.vote-msg{flex-basis:100%;margin:0;min-height:1.2em;font-size:.9rem;color:var(--muted)}
.vote-msg:empty{display:none}
.dark .vote-btn.like[aria-pressed="true"]{background:rgba(52,211,153,.12)}
.dark .vote-btn.dislike[aria-pressed="true"]{background:rgba(248,113,113,.12)}
.post-likes{display:inline-flex;align-items:center;gap:3px;color:var(--ok)}
.post-likes .vote-ic{width:14px;height:14px}
@media (max-width:560px){.vote-box{flex-direction:column;align-items:stretch;text-align:center}.vote-btns{justify-content:center}.vote-btn{flex:1;justify-content:center}}
@media (prefers-reduced-motion:reduce){.vote-btn,.vote-btn .vote-ic{transition:none;animation:none!important}}

/* ---------- Sectioned long articles (automatic TOC from H2s) ---------- */
.art-layout{display:flex;flex-direction:column;max-width:760px;container-type:inline-size}
.art-toc .toc-list li,.toc-list a,.sec-btn{text-align:start!important}
.prose .sec-next{text-align:end!important}
.art-main{display:contents}
.art-intro{order:0}
.art-toc{order:1;margin:0 0 30px}
.art-sec{order:2}
.art-sec.art-intro{order:0}
.art-sec>h2:first-of-type,.art-sec>.sec-progress+h2{margin-top:.4em}
.art-sec h2:focus{outline:none}
.art-sec h2:focus-visible{outline:2px solid var(--brand);outline-offset:4px;border-radius:6px}
.sec-progress{display:flex;align-items:center;gap:12px;margin:2.4em 0 0;font-size:.85rem;font-weight:600;color:var(--muted)}
.sec-bar{flex:1;height:4px;border-radius:4px;background:var(--surface-2);overflow:hidden}
.sec-bar i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--brand),var(--brand-2))}
.sec-nav{display:none}

/* TOC box */
.toc-box{border:1px solid var(--line);border-radius:var(--radius);background:linear-gradient(135deg,var(--surface),var(--surface-2));box-shadow:var(--shadow);font-size:.97rem;line-height:1.7}
.toc-box>summary{display:flex;align-items:center;gap:10px;padding:16px 20px;cursor:pointer;list-style:none;font-weight:800;color:var(--text);border-radius:var(--radius)}
.toc-box>summary::-webkit-details-marker{display:none}
.toc-box>summary::after{content:"";width:9px;height:9px;margin-inline-start:auto;border:solid var(--muted);border-width:0 2px 2px 0;transform:rotate(45deg);transition:transform .2s}
.toc-box[open]>summary::after{transform:rotate(-135deg)}
.toc-box>summary:focus-visible{outline:3px solid var(--brand);outline-offset:2px}
.toc-meta{font-size:.82rem;font-weight:600;color:var(--muted);padding:2px 10px;border-radius:999px;background:var(--surface-2)}
.art-toc .toc-list{list-style:none;margin:0;padding:0 10px 6px}
.art-toc .toc-list li::marker{content:none}
.art-toc .toc-list li{margin:0;padding:0}
.art-toc .toc-list a{display:flex;gap:10px;align-items:baseline;padding:7px 10px;border-radius:var(--radius-sm);color:var(--text-2);text-decoration:none;transition:background .15s,color .15s}
.art-toc .toc-list a:hover{background:var(--brand-soft);color:var(--text)}
.art-toc .toc-list a:focus-visible{outline:2px solid var(--brand);outline-offset:1px}
.toc-n{flex:none;min-width:1.7em;height:1.7em;display:inline-grid;place-items:center;border-radius:999px;background:var(--surface-2);color:var(--muted);font-size:.8rem;font-weight:700;font-variant-numeric:tabular-nums}
.art-toc .toc-list a[aria-current]{background:var(--brand-soft);color:var(--brand);font-weight:700}
.art-toc .toc-list a[aria-current] .toc-n{background:var(--brand);color:#fff}
.toc-actions{padding:6px 20px 16px;border-top:1px dashed var(--line);margin-top:4px}
.art-toc .toc-all{font-size:.9rem;font-weight:600;color:var(--brand);text-decoration:none}
.art-toc .toc-all:hover{text-decoration:underline}
.toc-actions [hidden]{display:none}

/* JS on: one section at a time */
.is-sectioned .sec-nav{display:grid;grid-template-columns:1fr auto 1fr;align-items:stretch;gap:12px;margin:2.4em 0 0;padding-top:20px;border-top:1px solid var(--line)}
.is-sectioned.is-full .sec-nav,.is-sectioned.is-full .sec-progress{display:none}
.is-sectioned .art-sec.is-active>.sec-progress{margin-top:0}
.is-sectioned:not(.is-home):not(.is-full) .art-intro{display:none}
.prose .sec-btn{display:flex;flex-direction:column;gap:2px;padding:12px 16px;border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--surface);color:var(--text);text-decoration:none;min-height:44px;transition:border-color .2s,background .2s,transform .15s}
.prose a.sec-btn:hover{border-color:var(--brand);background:var(--brand-soft);transform:translateY(-1px)}
.prose a.sec-btn:focus-visible{outline:3px solid var(--brand);outline-offset:2px}
.sec-next{text-align:end;align-items:flex-end}
.sec-btn.is-end{opacity:.75;border-style:dashed}
.sec-dir{font-size:.82rem;font-weight:700;color:var(--brand)}
.sec-name{font-size:.92rem;line-height:1.6;color:var(--text-2);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.sec-mid{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:.85rem;text-align:center}
.sec-count{font-weight:700;color:var(--muted)}
.prose .sec-link{color:var(--brand);text-decoration:none;font-weight:600}
.prose .sec-link:hover{text-decoration:underline}
@media (max-width:640px){
  .is-sectioned .sec-nav{grid-template-columns:1fr 1fr}
  .sec-mid{grid-column:1/-1;grid-row:2;flex-direction:row;flex-wrap:wrap;gap:6px 16px}
}

/* Desktop: sticky TOC beside the text (right/start side in RTL), text column stays aligned with the title */
@media (min-width:1280px){
  .art-layout{display:grid;grid-template-columns:1fr minmax(0,720px) 1fr;column-gap:32px;max-width:none;padding-inline:20px}
  .art-main{display:block;grid-column:2;grid-row:1;min-width:0}
  .art-toc{grid-column:1;grid-row:1;margin:0;width:min(290px,100%);justify-self:end}
  .toc-box{position:sticky;top:calc(var(--header) + 20px);max-height:calc(100vh - var(--header) - 40px);overflow:auto;font-size:.9rem}
  .toc-box>summary{position:sticky;top:0;z-index:1;background:var(--surface);border-radius:var(--radius) var(--radius) 0 0}
}

@media print{
  .art-layout{display:block;max-width:none}
  .art-main{display:block}
  .art-sec[hidden],.is-sectioned:not(.is-home) .art-intro{display:block!important}
  .art-toc,.sec-nav,.sec-progress,.votes,.site-header,.site-footer{display:none!important}
}
/* ---------- Comments (articles + news items) ---------- */
.news-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px 18px;margin-top:2px}
.news-cmt-link{display:inline-flex;align-items:center;gap:6px;font-size:.85rem;font-weight:700;color:var(--muted)}
.news-cmt-link:hover{color:var(--brand)}
.post-cmts{display:inline-flex;align-items:center;gap:3px}
.news-page .news-featured{margin-top:8px}
.comments{margin-top:40px;margin-bottom:12px;display:grid;gap:18px}
.cmt-head h2{font-size:1.25rem;display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;margin:0}
.cmt-count{font-size:.85rem;font-weight:600;color:var(--muted)}
.cmt-list{list-style:none;margin:0;padding:0;display:grid;gap:14px}
.cmt{display:grid;gap:10px}
.cmt-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:16px 20px;box-shadow:var(--shadow)}
.cmt-card:target,.cmt:target>.cmt-card:first-child{border-color:var(--brand);box-shadow:var(--ring)}
.cmt-reply{margin-inline-start:34px;background:color-mix(in srgb,var(--brand) 6%,var(--surface));border-color:color-mix(in srgb,var(--brand) 25%,var(--line));border-inline-start:4px solid var(--brand)}
.cmt-meta{display:flex;align-items:center;gap:12px;margin-bottom:8px}
.cmt-who{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 10px;min-width:0}
.cmt-who strong{font-size:.95rem;overflow-wrap:anywhere}
.cmt-who time{font-size:.78rem;color:var(--muted)}
.cmt-avatar{flex:none;width:38px;height:38px;border-radius:50%;display:grid;place-items:center;font-weight:800;color:#fff;background:hsl(var(--h,240) 55% 48%)}
.cmt-avatar.admin{background:linear-gradient(135deg,var(--btn),var(--brand-2))}
.cmt-badge{font-size:.72rem;font-weight:800;padding:.1em .7em;border-radius:999px;background:color-mix(in srgb,var(--brand) 16%,transparent);color:var(--brand)}
.cmt-body{line-height:2;color:var(--text-2);overflow-wrap:anywhere;white-space:normal}
.cmt-closed{text-align:center;padding:14px;border:1px dashed var(--line);border-radius:var(--radius);margin:0}
.cmt-form{padding:24px}
.cmt-form-title{font-size:1.08rem;margin:0}
.cmt-note{margin:-8px 0 0;line-height:1.9}
.cmt-form .req{color:var(--err)}
.cmt-form .lbl{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 6px}
.cmt-form .lbl .small{font-weight:400}
.cmt-len{font-weight:400}
.cmt-len.over{color:var(--err)}
.cmt-captcha{display:grid;grid-template-columns:auto 1fr;gap:10px 16px;align-items:start;padding:14px;border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--surface-2)}
.cap-img-wrap{display:flex;align-items:center;gap:8px}
.cap-img{display:block;width:200px;height:64px;border-radius:8px;border:1px solid var(--line);background:#eef1f6}
.cap-refresh{display:grid;place-items:center;width:44px;height:44px;border-radius:12px;border:1px solid var(--line);background:var(--surface);color:var(--text);cursor:pointer}
.cap-refresh:hover{border-color:var(--brand);color:var(--brand)}
.cap-refresh:focus-visible{outline:0;box-shadow:var(--ring)}
.cap-refresh.spin svg{animation:capspin .5s linear}
@keyframes capspin{to{transform:rotate(-360deg)}}
.cap-answer input{letter-spacing:.15em;text-transform:uppercase;max-width:240px}
.cap-answer .small{font-weight:400}
.cap-alt{grid-column:1/-1;font-size:.88rem}
.cap-alt summary{cursor:pointer;color:var(--brand);font-weight:600;width:max-content;max-width:100%}
.cap-alt p{margin:.5em 0 0;line-height:1.9}
.cmt-actions{display:flex;justify-content:flex-start}
.cmt-done:focus{outline:0}
@media (max-width:640px){
  .cmt-captcha{grid-template-columns:1fr}
  .cap-answer input{max-width:none}
  .cmt-reply{margin-inline-start:18px}
  .cmt-card{padding:14px 16px}
  .cmt-form{padding:18px}
}
@media (prefers-reduced-motion:reduce){.cap-refresh.spin svg{animation:none}}
@media print{.cmt-form,.cmt-closed{display:none!important}}

/* ---------- Bilingual: language switch + English (LTR) mode ---------- */
@font-face{font-family:Inter;src:url(../fonts/Inter-Variable.woff2) format("woff2");font-weight:100 900;font-display:swap}
.brand{margin-inline-end:auto}
.site-nav{order:2}
.lang-switch{order:3;display:inline-flex;align-items:center;gap:2px;padding:3px;border:1px solid var(--line);border-radius:999px;background:var(--surface);font:700 .78rem/1 Inter,system-ui,sans-serif;letter-spacing:.04em;flex:none}
.lang-switch a{display:grid;place-items:center;min-width:34px;height:30px;padding:0 8px;border-radius:999px;color:var(--muted);text-decoration:none;transition:background-color .2s,color .2s}
.lang-switch a:hover{color:var(--text);background:var(--surface-2);text-decoration:none}
.lang-switch a.on{background:var(--brand);color:#fff}
.nav-toggle{order:4}
@media (max-width:760px){.lang-switch a{height:34px;min-width:36px}}
.fa-only-note{display:flex;align-items:center;gap:8px;margin:0 0 12px;padding:8px 12px;border:1px dashed var(--line);border-radius:var(--radius-sm);background:var(--surface-2);color:var(--text-2);font-size:.88rem;line-height:1.5}
.fa-only-badge{display:inline-grid;place-items:center;padding:2px 7px;border-radius:6px;background:var(--brand-soft);color:var(--brand);font-weight:800;font-size:.72rem;letter-spacing:.05em}

/* English mode: Latin font stack (Inter, self-hosted; Persian snippets fall back to Vazirmatn), tighter rhythm */
html[lang=en] body{font-family:Inter,Vazirmatn,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;line-height:1.7;font-feature-settings:"cv11","ss01"}
html[lang=en] h1,html[lang=en] h2,html[lang=en] h3,html[lang=en] h4{line-height:1.3;letter-spacing:-.01em}
html[lang=en] .hero h1{line-height:1.15;letter-spacing:-.02em}
html[lang=en] .lead{line-height:1.75}
html[lang=en] .news-meta,html[lang=en] .news-link{font-family:inherit}
html[lang=en] .news-item h2,html[lang=en] .news-featured h2,html[lang=en] .news-featured h3{hyphens:manual}
/* English body text is justified like the Persian one (with hyphenation so lines don't open gaps) */
@media (min-width:37.5em){
  @container (min-width:17.5rem){
    html[lang=en] .text-just:dir(ltr),html[lang=en] .prose p:dir(ltr),html[lang=en] .prose li:dir(ltr),html[lang=en] .prose blockquote:dir(ltr){text-align:justify;hyphens:auto;-webkit-hyphens:auto}
  }
}
/* mirrored details for LTR */
[dir=ltr] .hero-role .en{text-align:left}
[dir=ltr] .contact-card strong{text-align:left}
[dir=ltr] .link-more .icon{transform:scaleX(-1)}
[dir=ltr] .link-more:hover .icon{transform:scaleX(-1) translateX(-4px)}
[dir=ltr] .back .icon{transform:none}
[dir=ltr] .prose pre{direction:ltr;text-align:left}
html[lang=en] .hero-role .en,html[lang=en] [lang=fa]{font-family:Vazirmatn,Tahoma,sans-serif}
