@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Source+Sans+3:wght@400;500;600;700&family=Inter:wght@400;500;600;700&family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&family=Noto+Naskh+Arabic:wght@400;500;600&display=swap');
:root{--rail:#182b3d;--rail-deep:#132233;--rail-line:rgba(255,255,255,.13);--rail-text:#f6f9fb;--rail-dim:#b3c2cd;--bg:#f7f9fa;--surface:#fff;--ink:#1c2c38;--muted:#5c6c76;--line:#dde5e8;--teal:#247c86;--teal-dark:#176672;--gold:#b98b60;--shadow:0 10px 42px rgba(24,43,61,.055);--rail-width:258px}
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth;scroll-padding-top:22px}
body{margin:0;min-height:100vh;display:grid;grid-template-columns:var(--rail-width) minmax(0,1fr);font:400 15.5px/1.85 Inter,-apple-system,BlinkMacSystemFont,Arial,sans-serif;color:var(--ink);background:var(--bg);-webkit-font-smoothing:antialiased}
a{color:var(--teal-dark);text-underline-offset:.2em}
a:hover{color:#10525e}
a:focus-visible,button:focus-visible{outline:3px solid var(--gold);outline-offset:4px;border-radius:3px}
::selection{background:#c6dfe1;color:#0d2733}
.skip-link{position:fixed;top:-130px;left:20px;padding:10px 15px;background:white;z-index:200}
.skip-link:focus{top:12px}
.site-rail{grid-column:1;grid-row:1;position:sticky;top:0;height:100vh;background:linear-gradient(158deg,#21394c 0%,var(--rail) 46%,var(--rail-deep) 100%);color:var(--rail-text);display:flex;flex-direction:column;padding:38px 25px 28px;z-index:30;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#506477 transparent}
.site-rail::before{content:"";position:absolute;top:0;inset-inline-start:0;width:4px;height:130px;background:linear-gradient(var(--gold),var(--teal));opacity:.92}
.rail-profile{display:flex;flex-direction:column;gap:15px;margin-bottom:44px}
.rail-avatar{width:78px;height:78px;border-radius:17px;object-fit:cover;object-position:center top;border:2px solid rgba(255,255,255,.8);box-shadow:0 7px 25px rgba(0,0,0,.14)}
.rail-identity{display:block;color:white;text-decoration:none;font:800 1.14rem/1.3 Manrope,Arial,sans-serif;letter-spacing:-.035em}
.rail-identity:hover{color:white}
.rail-caption{margin:6px 0 0;color:var(--rail-dim);font-size:.77rem;line-height:1.65}
.rail-heading{font:600 .64rem/1.4 Inter,Arial,sans-serif;color:#97adba;letter-spacing:.15em;text-transform:uppercase;margin:0 0 16px 13px}
.rail-nav{display:flex;flex-direction:column;gap:6px}
.rail-nav a{display:flex;align-items:center;gap:13px;min-height:42px;padding:9px 12px;color:#c6d3db;font-weight:500;font-size:.88rem;text-decoration:none;border:1px solid transparent;border-radius:9px;transition:background .18s,color .18s,border .18s}
.rail-nav a:hover{background:rgba(255,255,255,.075);color:#fff}
.rail-nav a[aria-current=page]{background:rgba(70,153,160,.2);border-color:rgba(119,183,187,.23);color:#fff;font-weight:700}
.rail-nav a[aria-current=page] .nav-indicator{background:#73c5ca}
.nav-indicator{width:6px;height:6px;border:1.5px solid #8ea7b4;border-radius:50%;flex:none}
.rail-nav a.rail-nav-language{display:none}
.rail-bottom{margin-top:auto;padding-top:28px}
.rail-bottom-rule{height:1px;background:var(--rail-line);margin-bottom:18px}
.rail-language{display:flex;align-items:center;justify-content:space-between;border:1px solid var(--rail-line);color:white;text-decoration:none;font-weight:650;font-size:.83rem;padding:9px 12px;border-radius:9px}
.rail-language:hover{color:#fff;border-color:#7798a6;background:rgba(255,255,255,.07)}
.rail-language span:last-child{opacity:.62}
.rail-mini{display:flex;gap:15px;flex-wrap:wrap;margin-top:19px}
.rail-mini a{font-size:.78rem;text-decoration:none;color:var(--rail-dim)}
.rail-mini a:hover{color:white}
.site-content{grid-column:2;grid-row:1;min-width:0;display:flex;flex-direction:column;min-height:100vh}
.content-wrap,.wrap{width:min(960px,calc(100% - 112px));margin-inline:auto}
main{flex:1}
.hero{padding:86px 0 64px;border-bottom:1px solid var(--line)}

.kicker{display:block;font-size:.7rem;letter-spacing:.16em;text-transform:uppercase;font-weight:700;color:var(--teal);margin:0 0 22px}
.hero h1{font:800 clamp(2.9rem,5vw,4.8rem)/1.17 Manrope,Arial,sans-serif;letter-spacing:-.07em;margin:0 0 19px;color:var(--ink)}
.hero h1 span{color:var(--teal)}
.hero-lead{font:600 clamp(1.13rem,1.7vw,1.34rem)/1.7 Manrope,Arial,sans-serif;letter-spacing:-.025em;max-width:670px;margin:0 0 13px;color:#314b5e}
.hero-sub{color:var(--muted);max-width:690px;line-height:1.95;font-size:.98rem;margin:0}
.hero-actions{display:flex;align-items:center;gap:12px 24px;margin-top:27px;flex-wrap:wrap}
.primary-link{background:var(--teal-dark);border-radius:7px;padding:9px 17px;color:white;text-decoration:none;font-size:.88rem;font-weight:650;display:inline-flex;align-items:center;gap:18px;transition:background .18s,transform .18s}
.primary-link:hover{background:var(--rail);color:white;transform:translateY(-1px)}
.text-link{font-weight:650;font-size:.86rem;text-decoration:none;display:inline-flex;align-items:center;gap:8px}
.text-link:hover{text-decoration:underline}
.home-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:21px;padding:42px 0 72px}
.home-columns .section{background:var(--surface);border:1px solid var(--line);box-shadow:var(--shadow);border-radius:13px;padding:28px 27px 20px;min-width:0}
.home-columns .section:first-child{border-top:3px solid var(--teal)}
.home-columns .section:last-child{border-top:3px solid var(--gold)}
.section-top{display:flex;justify-content:space-between;align-items:baseline;gap:15px;padding-bottom:16px}
.section h2{font:750 1.28rem/1.4 Manrope,Arial,sans-serif;letter-spacing:-.04em;margin:0}
.more{font-size:.77rem;white-space:nowrap;font-weight:650;text-decoration:none}
.more:hover{text-decoration:underline}
.entry{padding:14px 0;border-top:1px solid var(--line)}
.entry h3{font-size:.95rem;font-weight:650;line-height:1.65;letter-spacing:-.018em;margin:0 0 4px}
.entry h3 a{color:var(--ink);text-decoration:none}
.entry h3 a:hover{color:var(--teal);text-decoration:underline}
.entry p{font-size:.84rem;color:var(--muted);line-height:1.7;margin:0}
.page-header{padding:76px 0 42px;border-bottom:1px solid var(--line)}
.page-header h1{font:800 clamp(2.5rem,4.4vw,3.8rem)/1.2 Manrope,Arial,sans-serif;letter-spacing:-.06em;margin:0 0 15px}
.page-header p{max-width:690px;color:var(--muted);line-height:1.9;margin:0;font-size:1rem}
.page-section{padding:32px 0 43px;border-bottom:1px solid var(--line)}
.page-section h2{font:750 1.27rem/1.5 Manrope,Arial,sans-serif;letter-spacing:-.03em;color:var(--ink);margin:0 0 18px}
.detail{padding:19px 0;border-top:1px solid var(--line)}
.detail:first-of-type{border-top:0;padding-top:3px}
.detail h3{font-size:1.03rem;font-weight:700;margin:0 0 5px;line-height:1.65}
.detail p{font-size:.91rem;line-height:1.82;color:var(--muted);margin:0}
.detail .meta{font-size:.82rem;margin-top:7px;color:#637987}
.detail ul{font-size:.9rem;color:var(--muted);line-height:1.8;margin:9px 0;padding-inline-start:24px}
.pill-links{display:flex;gap:14px 25px;flex-wrap:wrap;margin:19px 0}
.pill-links a{font-weight:650;font-size:.89rem;text-decoration:none}
.pill-links a:hover{text-decoration:underline}
.list-lines{list-style:none;padding:0;margin:10px 0}
.list-lines li{padding:10px 0;border-bottom:1px solid var(--line);color:var(--muted);font-size:.89rem}
.list-lines li:last-child{border-bottom:0}
.contact-line a{font-weight:650;text-decoration:none}
.site-footer,.footer{border-top:1px solid var(--line);background:#f1f5f6}
.footer-inner{width:min(960px,calc(100% - 112px));margin-inline:auto;display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap;padding:20px 0 25px;color:#63747f;font-size:.79rem}
.footer-links{display:flex;gap:21px;flex-wrap:wrap}
.footer-links a{text-decoration:none;font-weight:600}
[lang=fa],html[lang=fa] body{font-family:'IBM Plex Sans Arabic',Tahoma,Arial,sans-serif}
html[lang=fa] body{font-size:15px;line-height:2}
html[lang=fa] .rail-identity,html[lang=fa] .hero h1,html[lang=fa] .hero-lead,html[lang=fa] .section h2,html[lang=fa] .page-header h1,html[lang=fa] .page-section h2{font-family:'IBM Plex Sans Arabic',Tahoma,Arial,sans-serif;letter-spacing:0}
html[lang=fa] .rail-identity{font-size:1.14rem;font-weight:700}
html[lang=fa] .rail-caption{font-size:.78rem}
html[lang=fa] .hero h1{font-size:clamp(2.45rem,4.7vw,4rem);line-height:1.55;font-weight:700;margin-bottom:8px}
html[lang=fa] .hero-lead{font-size:1.16rem;line-height:2;font-weight:600}
html[lang=fa] .hero-sub,html[lang=fa] .page-header p{line-height:2.1}
html[lang=fa] .page-header h1{letter-spacing:0;line-height:1.6}
html[lang=fa] .section h2,html[lang=fa] .page-section h2{line-height:1.85;font-weight:700}
html[lang=fa] .entry h3,html[lang=fa] .detail h3{letter-spacing:0;line-height:1.95}
html[lang=fa] .kicker,html[lang=fa] .rail-heading{letter-spacing:0}
html[dir=rtl] body{grid-template-columns:minmax(0,1fr) var(--rail-width)}
html[dir=rtl] .site-rail{grid-column:2}
html[dir=rtl] .site-content{grid-column:1}
html[dir=rtl] .rail-heading{margin-inline-start:12px}

html[dir=rtl] .hero h1 span{color:var(--teal)}
html[dir=rtl] .entry h3 a[lang=en]{font:600 .91rem/1.7 Inter,Arial,sans-serif;display:inline-block}
.blog-shell{width:min(850px,calc(100% - 112px));margin-inline:auto;padding:70px 0 100px}
.blog-header h1,.post-header h1,.post-title{font:800 clamp(2.2rem,4vw,3.5rem)/1.3 Manrope,Arial,sans-serif;letter-spacing:-.055em;margin:16px 0 15px}
.blog-intro,.post-meta{max-width:670px;color:var(--muted);line-height:1.9}
.blog-header,.post-header{margin-bottom:32px}
.site-link,.back-link{display:inline-block;font-size:.87rem;font-weight:650;text-decoration:none}
.blog-shell .post-list{border-top:1px solid var(--line)}
.blog-shell .post-list[hidden]{display:none}
.post-item{border-bottom:1px solid var(--line);padding:18px 0}
.post-link{font-size:1.04rem;color:var(--ink);font-weight:650;text-decoration:none;line-height:1.7}
.post-link:hover{text-decoration:underline}
.post-item p{font-size:.89rem;color:var(--muted);margin:5px 0 0}
.language-switch{display:flex;gap:20px;margin-top:22px;border-bottom:1px solid var(--line)}
.language-button{border:0;border-bottom:2px solid transparent;background:none;font:650 .91rem/1.9 Inter,Arial,sans-serif;color:var(--muted);padding:6px 0 10px;cursor:pointer}
.language-button[aria-pressed=true]{border-color:var(--teal);color:var(--teal-dark)}
.post-body{font-size:1rem;line-height:2.05;max-width:800px;overflow-wrap:break-word}
.post-body p{margin:0 0 1.5rem}
.post-body h2{font-size:1.38rem;line-height:1.5;margin:2.2rem 0 .9rem}
.post-body img,.post-body svg{max-width:100%;height:auto}
.post-body pre,.post-body .equation{overflow-x:auto;max-width:100%}
.post-body code{overflow-wrap:anywhere}
.post-body li{margin-bottom:.5rem}
.references{border-top:1px solid var(--line);margin-top:45px;padding-top:18px}
.post-footer{margin:55px 0 0;border-top:1px solid var(--line);padding-top:22px}
.persian-post .post-title,.post-list[lang=fa] .post-link,html[lang=fa] .blog-header h1{font-family:'IBM Plex Sans Arabic',Tahoma,sans-serif;letter-spacing:0;line-height:1.8}
.persian-post .post-body{font-family:'Noto Naskh Arabic','IBM Plex Sans Arabic',serif;font-size:1.22rem;line-height:2.35}
.persian-post .post-body p{margin-bottom:1.6rem}
.blog-shell[dir=rtl] .post-link[lang=en]{font-family:Inter,Arial,sans-serif}
@media(max-width:1100px){:root{--rail-width:225px}.site-rail{padding:32px 19px}.content-wrap,.wrap,.footer-inner{width:min(920px,calc(100% - 66px))}.blog-shell{width:calc(100% - 66px)}.home-columns{gap:15px}.home-columns .section{padding:23px 20px 13px}}
@media(max-width:760px){body,html[dir=rtl] body{display:block}.site-rail,html[dir=rtl] .site-rail{position:relative;height:auto;overflow:visible;display:flex;flex-direction:row;align-items:center;flex-wrap:wrap;padding:13px 20px;gap:12px;background:var(--rail)}.site-rail::before{height:3px;width:100%;top:auto;bottom:0;inset-inline-start:0}.rail-profile{margin:0;display:flex;flex-direction:row;align-items:center;gap:10px}.rail-avatar{height:40px;width:40px;border-radius:9px}.rail-identity{font-size:.95rem}.rail-caption,.rail-heading,.rail-bottom,.nav-indicator{display:none}.rail-nav{flex:1;display:flex;flex-direction:row;justify-content:flex-end;gap:2px;flex-wrap:wrap}.rail-nav a{padding:7px 9px;min-height:0;font-size:.76rem}.rail-nav a[aria-current=page]{background:#30566a}.rail-nav a:hover{background:#30566a}.rail-nav a.rail-nav-language{display:inline-flex;color:#d9eeee}.site-content,html[dir=rtl] .site-content{display:flex;min-height:calc(100vh - 68px)}.content-wrap,.wrap,.footer-inner,.blog-shell{width:calc(100% - 44px)}.hero{padding:57px 0 43px}.hero h1{font-size:clamp(2.65rem,8vw,3.6rem)}.home-columns{padding:28px 0 50px}.page-header{padding:55px 0 32px}.blog-shell{padding:48px 0 70px}}
@media(max-width:560px){.site-rail{gap:12px}.rail-profile{width:100%}.rail-nav{width:100%;justify-content:space-between;flex:auto;gap:1px}.rail-nav a{padding:6px 8px;font-size:.76rem}.hero h1{font-size:2.55rem}.hero-actions{margin-top:23px}.home-columns{grid-template-columns:1fr;gap:16px}.home-columns .section{padding:23px 21px 14px}.section-top{align-items:baseline}.section h2{font-size:1.25rem}.page-section{padding:24px 0 34px}.footer-inner{padding:18px 0;gap:12px}.footer-links{gap:13px}.blog-shell{padding:40px 0 65px}html[lang=fa] .hero h1{font-size:2.58rem}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}a,.primary-link{transition:none}}

/* A clear, personal first impression without adding visual noise. */
.hero-with-portrait{display:grid;grid-template-columns:minmax(0,1fr) clamp(185px,22vw,250px);align-items:center;gap:clamp(27px,4vw,54px)}
.hero-with-portrait .hero-copy{min-width:0}
.hero-portrait{margin:0;width:100%;justify-self:end;align-self:center}
.hero-portrait img{width:100%;height:auto;aspect-ratio:4/5;display:block;object-fit:cover;object-position:50% 24%;border-radius:12px;border:1px solid #d7e0e5;box-shadow:0 14px 32px rgba(21,42,57,.12)}
html[dir=rtl] .hero-portrait{justify-self:start}
@media(max-width:900px) and (min-width:621px){.hero-with-portrait{grid-template-columns:minmax(0,1fr) 185px;gap:24px}.hero-with-portrait h1{font-size:clamp(2.45rem,4.4vw,3.75rem)}}
@media(max-width:620px){.hero-with-portrait{display:grid;grid-template-columns:1fr;gap:21px}.hero-portrait,html[dir=rtl] .hero-portrait{grid-row:1;justify-self:start;width:132px}.hero-portrait img{aspect-ratio:1/1;object-position:50% 21%;border-radius:11px}.hero-copy{grid-row:2}}

/* V4: clearer profile, breathable typography, structured facts. */
body{font-family:'Source Sans 3',Arial,sans-serif;font-size:17px;line-height:1.78}
.rail-identity,.hero-name,.section h2,.page-header h1,.page-section h2{font-family:'Plus Jakarta Sans',Arial,sans-serif}
.rail-identity{font-size:1.17rem;letter-spacing:-.025em}
.rail-nav a{font-size:.96rem}
.rail-caption{font-size:.84rem}
.hero.hero-with-portrait{grid-template-columns:minmax(0,1fr) clamp(185px,20vw,245px);gap:clamp(30px,4vw,58px);padding-block:70px 66px}
.hero .kicker{font-size:.76rem;letter-spacing:.13em;margin-bottom:18px}
.hero h1.hero-name{display:flex;flex-wrap:wrap;align-items:baseline;gap:0 .21em;margin:0 0 28px;font-family:'Plus Jakarta Sans',Arial,sans-serif;font-size:clamp(2.75rem,4.1vw,4.3rem);font-weight:800;line-height:1.27;letter-spacing:-.048em}
.hero-name .name-part{display:inline-block;white-space:nowrap}
.hero-name .name-accent{color:var(--teal)}
.hero-facts{display:grid;gap:13px;margin:0;padding:0;list-style:none;max-width:700px}
.hero-facts li{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px;padding-inline-start:18px;position:relative;line-height:1.6;font-size:1.045rem}
.hero-facts li::before{content:"";position:absolute;inset-inline-start:0;top:.71em;width:7px;height:7px;background:var(--teal);border-radius:50%}
.hero-facts strong{font-weight:700;color:#253949}
.hero-facts span{color:var(--muted)}
.hero-actions{margin-top:29px;gap:12px 24px}
.primary-link,.text-link{font-size:.95rem}
.entry h3{font-size:1.065rem;line-height:1.6}
.entry p,.detail p,.post-item p{font-size:.96rem}
.section h2{font-size:1.42rem}
.page-header p{font-size:1.09rem}
.detail h3{font-size:1.1rem}
.home-columns .section{padding:29px 29px 24px}
.hero-portrait img{border-radius:15px}
html[lang=fa] body{font-family:'IBM Plex Sans Arabic',Tahoma,sans-serif;font-size:16px;line-height:1.95}
html[lang=fa] .hero h1.hero-name{font-family:'IBM Plex Sans Arabic',Tahoma,sans-serif;font-size:clamp(2.65rem,4.1vw,4.1rem);letter-spacing:0;line-height:1.5;gap:0 .22em;margin-bottom:18px}
html[lang=fa] .hero-facts li{font-family:'IBM Plex Sans Arabic',Tahoma,sans-serif;line-height:2.0;font-size:1rem}
html[lang=fa] .hero-facts li::before{top:.94em}
html[lang=fa] .rail-nav a{font-size:.92rem}
html[lang=fa] .section h2,html[lang=fa] .page-section h2{font-family:'IBM Plex Sans Arabic',Tahoma,sans-serif}
html[lang=fa] .entry h3{font-size:1.04rem}
.ltr-tools{direction:ltr;text-align:right;unicode-bidi:isolate;font:600 1rem/1.9 Inter,Arial,sans-serif;overflow-wrap:anywhere}
bdi[dir=ltr],a[dir=ltr],h3[dir=ltr]{unicode-bidi:isolate}
@media(max-width:1000px) and (min-width:761px){
 .hero.hero-with-portrait{grid-template-columns:minmax(0,1fr) 180px;gap:26px}
 .hero h1.hero-name{font-size:clamp(2.4rem,4vw,3.3rem)}
 html[lang=fa] .hero h1.hero-name{font-size:clamp(2.35rem,3.8vw,3.2rem)}
}
@media(max-width:760px){
 .hero.hero-with-portrait{gap:24px;padding-block:53px 48px}
 .hero h1.hero-name{font-size:clamp(2.5rem,7vw,3.5rem)}
 .hero-facts li{font-size:1rem}
 .rail-nav a{font-size:.83rem}
}
@media(max-width:620px){
 .hero.hero-with-portrait{grid-template-columns:1fr}
 .hero-portrait{width:150px}
 .hero h1.hero-name{font-size:clamp(2.45rem,9vw,3.4rem);gap:0 .22em}
 .hero .kicker{font-size:.71rem}
 .hero-facts{gap:10px}
 .hero-facts li{font-size:1rem;display:block}
 .hero-facts strong{display:block}
 .hero-facts span{display:block}
 html[lang=fa] .hero h1.hero-name{font-size:clamp(2.35rem,8vw,3.35rem)}
}

/* Minimal hero: one sidebar portrait, an unbroken name and compact facts. */
.hero:not(.hero-with-portrait){display:block;max-width:100%;padding-block:64px 54px}
.hero h1.hero-name,.hero:not(.hero-with-portrait) h1.hero-name{display:block;white-space:normal;overflow-wrap:normal;word-break:normal;line-height:1.3;letter-spacing:-.045em;font-size:clamp(2.75rem,5vw,4.3rem);max-width:100%;margin:0 0 24px}
html[lang=fa] .hero h1.hero-name{font-family:'IBM Plex Sans Arabic',Tahoma,sans-serif;font-size:clamp(2.6rem,4.7vw,4.05rem);line-height:1.65;letter-spacing:0}
.rail-profile{margin-bottom:34px}
.rail-heading{display:none}
.cv-dropdown{position:relative;min-width:0;font-size:.93rem}
.rail-nav .cv-dropdown{margin:2px 0}
.cv-dropdown summary{list-style:none;display:flex;justify-content:space-between;align-items:center;gap:12px;cursor:pointer;user-select:none;border:1px solid transparent;padding:9px 12px;min-height:42px;border-radius:9px;font-weight:650;color:inherit}
.cv-dropdown summary::-webkit-details-marker{display:none}
.rail-nav .cv-dropdown summary{color:#c6d3db}
.rail-nav .cv-dropdown[open] summary,.rail-nav .cv-dropdown summary:hover{color:white;background:rgba(255,255,255,.095)}
.cv-dropdown summary span{transition:transform .15s ease}
.cv-dropdown[open] summary span{transform:rotate(180deg)}
.cv-dropdown-menu{display:flex;flex-direction:column;gap:4px;min-width:168px;z-index:35;padding:7px;background:white;border:1px solid var(--line);box-shadow:0 12px 28px rgba(16,32,45,.17);border-radius:9px;color:var(--ink)}
.rail-nav .cv-dropdown-menu{position:relative;margin:5px 0 4px}
.cv-dropdown-menu a{padding:9px 11px;color:var(--ink);border-radius:5px;display:flex;justify-content:space-between;gap:12px;align-items:center;text-decoration:none;font-size:.89rem;font-weight:600;white-space:nowrap}
.cv-dropdown-menu a:hover{color:var(--teal-dark);background:#edf5f6}
.pill-links>.cv-dropdown summary{border:1px solid var(--line);background:white;color:var(--teal-dark);border-radius:8px;font-weight:700}
.pill-links>.cv-dropdown-menu{position:absolute;top:100%;inset-inline-start:0}
.contact-line{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.contact-line a{overflow-wrap:anywhere}
html[lang=fa] .cv-dropdown-menu a[lang=en],.ltr-tools{direction:ltr;unicode-bidi:isolate;font-family:Inter,Arial,sans-serif}
@media(max-width:760px){
 .rail-nav .cv-dropdown{flex:0 0 auto}
 .rail-nav .cv-dropdown summary{padding:6px 8px;min-height:0;color:#d9eeee;font-size:.78rem}
 .rail-nav .cv-dropdown-menu{position:absolute;top:100%;inset-inline-end:0;min-width:170px;margin-top:5px}
}
@media(max-width:560px){
 .hero:not(.hero-with-portrait){padding:42px 0 44px}
 .hero h1.hero-name{font-size:clamp(2.25rem,9vw,3.2rem);letter-spacing:-.04em}
 html[lang=fa] .hero h1.hero-name{font-size:clamp(2.25rem,8vw,3.1rem)}
}

/* Static bilingual blog navigation: no language-switch hydration or flash. */
.blog-language-links{display:flex;align-items:center;gap:18px;margin-top:20px;margin-bottom:4px;border-bottom:1px solid var(--line)}
.blog-language-links a{display:inline-block;padding:7px 2px 11px;color:var(--muted);font-size:.94rem;font-weight:650;text-decoration:none;border-bottom:2px solid transparent}
.blog-language-links a[aria-current="page"]{color:var(--teal-dark);border-bottom-color:var(--teal)}
.blog-language-links a:hover{color:var(--teal-dark)}
.blog-language-links a[lang="en"]{font-family:Inter,Arial,sans-serif}
.detail-points{margin:12px 0 5px;padding-inline-start:22px;color:var(--muted);font-size:.96rem;line-height:1.85}
.detail-points li{padding:4px 0}
html[lang=fa] .detail-points{font-family:'IBM Plex Sans Arabic',Tahoma,sans-serif;font-size:.96rem;line-height:2}

/* Native bilingual navigation: clear, keyboard-accessible segmented control. */
.language-picker{display:flex;direction:ltr;align-items:stretch;gap:3px;padding:4px;background:rgba(255,255,255,.07);border:1px solid rgba(188,211,221,.26);border-radius:12px;box-shadow:inset 0 1px 2px rgba(0,0,0,.08)}
.language-picker a{flex:1;display:flex;justify-content:center;align-items:center;min-height:39px;padding:7px 10px;border:1px solid transparent;border-radius:8px;color:#d3dee5;text-decoration:none;line-height:1.45;font-size:.89rem;font-weight:600;white-space:nowrap;transition:background .18s ease,color .18s ease,box-shadow .18s ease}
.language-picker a:hover{color:white;background:rgba(255,255,255,.11)}
.language-picker a[aria-current="page"]{color:#173748;background:#e5f4f3;border-color:#cee7e5;box-shadow:0 2px 7px rgba(0,0,0,.16);font-weight:700}
.language-picker a[aria-current="page"]:hover{background:#fff;color:#173748}
.language-picker .language-en{font-family:Inter,Arial,sans-serif;direction:ltr}
.language-picker .language-fa{font-family:'IBM Plex Sans Arabic',Tahoma,sans-serif;direction:rtl;letter-spacing:0;font-size:1rem;font-weight:600}
.language-picker-desktop{width:100%;margin-bottom:16px}
.language-picker-mobile{display:none}
html[lang=fa] .rail-identity,html[lang=fa] .page-header h1,html[lang=fa] .hero h1{font-weight:700}
@media(max-width:760px){
 .language-picker-desktop{display:none}
 .language-picker-mobile{display:flex;align-self:center;min-width:162px;margin-inline-start:8px}
 .language-picker-mobile a{min-height:34px;padding:5px 9px;font-size:.79rem}
 .language-picker-mobile .language-fa{font-size:.9rem}
}
@media(max-width:560px){
 .language-picker-mobile{flex:0 0 auto;margin-top:4px;margin-inline-start:auto}
 .rail-nav .language-picker a{padding:6px 10px;font-size:.8rem}
 .rail-nav .language-picker .language-fa{font-size:.94rem}
}

/* Blog-specific language control is deliberately independent of page routing. */
.blog-locales{display:inline-flex;direction:ltr;align-items:center;gap:4px;margin:19px 0 8px;padding:4px;background:#e9eff1;border:1px solid #d7e2e5;border-radius:12px}
.blog-locales a{display:inline-flex;min-width:82px;align-items:center;justify-content:center;min-height:35px;padding:6px 13px;border:1px solid transparent;border-radius:8px;background:transparent;color:#49616e;text-decoration:none;font-size:.92rem;font-weight:600;line-height:1.5}
.blog-locales a[aria-current=page]{border-color:#d6e6e8;background:#fff;box-shadow:0 2px 7px rgba(19,38,52,.09);color:#176672}
.blog-locales a:not([aria-current=page]):hover{background:rgba(255,255,255,.65);color:var(--teal-dark)}
.blog-locales a[lang=fa]{font-family:'IBM Plex Sans Arabic',Tahoma,sans-serif;direction:rtl;font-size:1rem}
.blog-locales a[lang=en]{font-family:Inter,Arial,sans-serif;direction:ltr}
