/* Formal Afghan Dari, right-to-left page only. English site unchanged. */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800&display=swap');
html[lang="fa-AF"]{direction:rtl;scroll-padding-top:80px}
html[lang="fa-AF"] body{direction:rtl;font-family:Vazirmatn,Tahoma,"Noto Sans Arabic",Arial,sans-serif;font-size:15px;line-height:1.85;text-align:right}
html[lang="fa-AF"] :is(h1,h2,h3,h4,p,li,summary,button,a,span,small,strong,label){font-family:inherit}
html[lang="fa-AF"] .brand-name{font-family:system-ui,"Segoe UI",Arial,sans-serif;letter-spacing:-.035em}
html[lang="fa-AF"] .header-inner{direction:rtl}
html[lang="fa-AF"] .nav-links{direction:rtl}
html[lang="fa-AF"] .nav-links a{font-size:14px;font-weight:600}
html[lang="fa-AF"] .nav-cv{font-size:12px}
html[lang="fa-AF"] .hero-inner{direction:rtl}
html[lang="fa-AF"] .hero .greeting{font-family:Vazirmatn,Tahoma,sans-serif;font-size:13px;letter-spacing:0;font-weight:800}
html[lang="fa-AF"] .hero h1{font-family:Vazirmatn,Tahoma,sans-serif;font-size:clamp(28px,3vw,39px);letter-spacing:-.02em;line-height:1.6;font-weight:800}
html[lang="fa-AF"] .hero-role{font-family:Vazirmatn,Tahoma,sans-serif;font-size:14px;line-height:1.8}
html[lang="fa-AF"] .hero-intro{font-family:Vazirmatn,Tahoma,sans-serif;font-size:15px;line-height:1.95;max-width:790px}
html[lang="fa-AF"] .hero-actions{display:flex;flex-wrap:wrap;direction:rtl}
html[lang="fa-AF"] .hero-actions a{font-size:13px;line-height:1.7}
html[lang="fa-AF"] .hero-location{font-family:Vazirmatn,Tahoma,sans-serif;font-size:13px}
html[lang="fa-AF"] .hero-shapes{transform:scaleX(-1)}
html[lang="fa-AF"] .section-container{direction:rtl}
html[lang="fa-AF"] .section-label h2{font-family:Vazirmatn,Tahoma,sans-serif;font-size:clamp(25px,2.7vw,36px);letter-spacing:0;line-height:1.55}
html[lang="fa-AF"] .section-label h2 .section-heading-icon{margin-inline:0}
html[lang="fa-AF"] .section-lead,html[lang="fa-AF"] .about-paragraph,html[lang="fa-AF"] .job-description{font-family:Vazirmatn,Tahoma,sans-serif;font-size:14px;line-height:2}
html[lang="fa-AF"] .skill-group h4{font-family:Vazirmatn,Tahoma,sans-serif;font-size:14px;line-height:1.8}
html[lang="fa-AF"] .skill-tags span{font-family:Vazirmatn,Tahoma,sans-serif;font-size:12px;line-height:1.65}
html[lang="fa-AF"] .job-title-row h3{font-family:Vazirmatn,Tahoma,sans-serif;font-size:16px;line-height:1.75}
html[lang="fa-AF"] .job-company{font-family:Vazirmatn,Tahoma,sans-serif;font-size:13px}
html[lang="fa-AF"] .job-bullets{font-family:Vazirmatn,Tahoma,sans-serif;font-size:13px;line-height:1.9;padding-right:18px;padding-left:0}
html[lang="fa-AF"] .job-dates{font-family:Vazirmatn,Tahoma,sans-serif;direction:rtl;unicode-bidi:plaintext}
html[lang="fa-AF"] .education-card h3{font-family:Vazirmatn,Tahoma,sans-serif;font-size:17px;line-height:1.6}
html[lang="fa-AF"] .education-card p{font-family:Vazirmatn,Tahoma,sans-serif;font-size:14px}
html[lang="fa-AF"] .education-card p a{color:#1d4ed8;text-decoration:none;border-bottom:1px solid #bfd2fb}
html[lang="fa-AF"] .education-card p a:hover{color:#1e40af;border-color:#1e40af}
html[lang="fa-AF"] .category-label{font-family:Vazirmatn,Tahoma,sans-serif;font-size:11px;letter-spacing:0}
html[lang="fa-AF"] .featured-project :is(h4,p),html[lang="fa-AF"] .project-card :is(h3,p){font-family:Vazirmatn,Tahoma,sans-serif;line-height:1.85}
html[lang="fa-AF"] .featured-project h4,html[lang="fa-AF"] .project-card h3{font-size:16px;line-height:1.75}
html[lang="fa-AF"] .featured-project p,html[lang="fa-AF"] .project-card>p{font-size:13px;line-height:1.9}
html[lang="fa-AF"] .featured-open,html[lang="fa-AF"] .project-details summary,html[lang="fa-AF"] .filter{font-family:Vazirmatn,Tahoma,sans-serif;font-size:13px;line-height:1.8}
html[lang="fa-AF"] .project-details :is(h4,p,li),html[lang="fa-AF"] .dialog-content :is(p,li){font-family:Vazirmatn,Tahoma,sans-serif;line-height:1.95}
html[lang="fa-AF"] .project-details :is(ul,ol),html[lang="fa-AF"] .dialog-content :is(ul,ol){padding-right:21px;padding-left:0}
html[lang="fa-AF"] .case-study-row{direction:rtl}
html[lang="fa-AF"] .case-study-row h4{font-family:Vazirmatn,Tahoma,sans-serif}
html[lang="fa-AF"] .case-study-row p{font-family:Vazirmatn,Tahoma,sans-serif}
html[lang="fa-AF"] .contact-intro{font-family:Vazirmatn,Tahoma,sans-serif;font-size:14px}
html[lang="fa-AF"] .contact-card-copy strong,html[lang="fa-AF"] .contact-secondary-title{font-family:Vazirmatn,Tahoma,sans-serif;font-size:14px}
html[lang="fa-AF"] .contact-card-copy small,html[lang="fa-AF"] .contact-secondary-desc{font-family:Vazirmatn,Tahoma,sans-serif;font-size:12px}
html[lang="fa-AF"] .contact-arrow{margin-right:auto;margin-left:0;transform:scaleX(-1)}
html[lang="fa-AF"] .contact-card:hover .contact-arrow,html[lang="fa-AF"] .contact-secondary-grid>a:hover .contact-arrow{transform:scaleX(-1) translate(2px,-2px)}
html[lang="fa-AF"] .bidi-technical{direction:ltr;unicode-bidi:isolate;text-align:right;font-family:system-ui,"Segoe UI",Arial,sans-serif}
html[lang="fa-AF"] .brand-logo-svg,html[lang="fa-AF"] .utility-icon-svg{transform:none}
html[lang="fa-AF"] .lang-switch{direction:ltr;margin-right:0;margin-left:0}
html[lang="fa-AF"] .lang-option[lang="fa-AF"]{font-family:Vazirmatn,Tahoma,sans-serif;font-size:12px}
html[lang="fa-AF"] .project-dialog{text-align:right}
html[lang="fa-AF"] .dialog-head{text-align:right}
html[lang="fa-AF"] .dialog-close{margin-right:auto;margin-left:0}
html[lang="fa-AF"] .site-footer{direction:rtl}
html[lang="fa-AF"] .footer-inner{direction:rtl;text-align:right}
html[lang="fa-AF"] .back-top{left:20px;right:auto}
@media(min-width:901px){
 html[lang="fa-AF"] .content-section:not(.contact-section) .section-heading-icon{left:auto;right:-43px}
}
@media(max-width:960px){
 html[lang="fa-AF"] .nav-links{right:0;left:0}
 html[lang="fa-AF"] .header-inner{gap:10px}
}
@media(max-width:680px){
 html[lang="fa-AF"] .header-inner{gap:8px}
 html[lang="fa-AF"] .brand{margin:0}
 html[lang="fa-AF"] .lang-switch{margin-right:auto;margin-left:0}
 html[lang="fa-AF"] .hero h1{font-size:clamp(24px,6.1vw,33px);line-height:1.65}
 html[lang="fa-AF"] .hero-intro{font-size:13.8px;line-height:1.9}
 html[lang="fa-AF"] .hero-actions a{font-size:12px}
 html[lang="fa-AF"] .section-label h2{font-size:25px;line-height:1.55}
 html[lang="fa-AF"] .featured-project h4,html[lang="fa-AF"] .project-card h3{font-size:15px}
}
@media(max-width:360px){
 html[lang="fa-AF"] .brand-name{font-size:15px}
 html[lang="fa-AF"] .hero h1{font-size:23px}
 html[lang="fa-AF"] .lang-option{min-width:28px}
}
@media(prefers-reduced-motion:reduce){html[lang="fa-AF"] .lang-option{transition:none!important}}

/* Dari visual and responsive refinement — 2026-11-13.
   Keep English layout untouched; preserve the calm blue/neutral design system. */
html[lang="fa-AF"] .hero h1{
  white-space:normal;
  text-wrap:balance;
  overflow-wrap:normal;
}
html[lang="fa-AF"] .hero-intro{font-size:16px;line-height:1.9}
html[lang="fa-AF"] .section-lead,
html[lang="fa-AF"] .about-paragraph,
html[lang="fa-AF"] .job-description{font-size:15.5px;line-height:1.9}
html[lang="fa-AF"] .skills-organized>h3,
html[lang="fa-AF"] .all-projects-summary{font-family:Vazirmatn,Tahoma,"Noto Sans Arabic",sans-serif}
html[lang="fa-AF"] .skills-organized>h3{font-size:18px;line-height:1.65}
html[lang="fa-AF"] .skill-group h4{font-size:14px;line-height:1.75}
html[lang="fa-AF"] .skill-tags span{font-size:12.5px;line-height:1.7}
html[lang="fa-AF"] .job-title-row h3{font-size:17px;line-height:1.7}
html[lang="fa-AF"] .job-dates{font-size:13px;line-height:1.65}
html[lang="fa-AF"] .job-company{font-size:14px}
html[lang="fa-AF"] .job-bullets{font-size:14px;line-height:1.85}
html[lang="fa-AF"] .featured-project h4,
html[lang="fa-AF"] .project-card h3{font-size:17px;line-height:1.7}
html[lang="fa-AF"] .featured-project p,
html[lang="fa-AF"] .project-card>p{font-size:14.5px;line-height:1.85}
html[lang="fa-AF"] .category-label{font-size:12px;line-height:1.6}
html[lang="fa-AF"] .featured-head p,
html[lang="fa-AF"] .all-projects-head p{font-size:14px;line-height:1.85}
html[lang="fa-AF"] .project-tags span,
html[lang="fa-AF"] .dialog-tags span{font-size:12px;line-height:1.6}
html[lang="fa-AF"] .project-filters button,
html[lang="fa-AF"] .featured-open,
html[lang="fa-AF"] .project-details summary,
html[lang="fa-AF"] .all-projects-summary{font-size:14px;line-height:1.7}
html[lang="fa-AF"] .dialog-head h2{font-size:clamp(19px,2.5vw,24px);line-height:1.6}
html[lang="fa-AF"] .dialog-eyebrow{letter-spacing:0;font-size:12px}
html[lang="fa-AF"] .dialog-lead,
html[lang="fa-AF"] .dialog-features,
html[lang="fa-AF"] .dialog-content :is(p,li){font-size:14.5px;line-height:1.9}
html[lang="fa-AF"] .case-study-row h4{font-size:13px;line-height:1.75}
html[lang="fa-AF"] .case-study-row p{font-size:14px;line-height:1.9}
html[lang="fa-AF"] .contact-intro{font-size:15px;line-height:1.85}
html[lang="fa-AF"] .contact-card-copy small,
html[lang="fa-AF"] .contact-secondary-desc{font-size:13px;line-height:1.6}
html[lang="fa-AF"] .footer-side,
html[lang="fa-AF"] .site-footer .footer-side{text-align:right}
html[lang="fa-AF"] .footer-inner span,
html[lang="fa-AF"] .footer-side a{font-size:12.5px;line-height:1.75}
/* Mirror the full experience timeline, including the track and dots. */
html[lang="fa-AF"] .timeline:before{right:10px;left:auto}
html[lang="fa-AF"] .experience-card{margin-right:30px;margin-left:0}
html[lang="fa-AF"] .timeline-dot{right:-25px;left:auto}
/* Isolate Latin technical names, numbers and URLs without changing paragraph flow. */
html[lang="fa-AF"] [lang="en"][dir="ltr"]{unicode-bidi:isolate}
html[lang="fa-AF"] .bidi-technical{overflow-wrap:anywhere}
/* Touch ergonomics and a clear, consistent language switch. */
html[lang="fa-AF"] .hero-actions a,
html[lang="fa-AF"] .featured-open,
html[lang="fa-AF"] .project-filters button,
html[lang="fa-AF"] .project-details summary{min-height:44px}
html[lang="fa-AF"] .all-projects-summary{min-height:48px}
html[lang="fa-AF"] .nav-links.open{align-items:stretch;text-align:right}
html[lang="fa-AF"] .nav-links.open a{display:flex;align-items:center;min-height:44px;padding:8px 10px}
html[lang="fa-AF"] .lang-option{min-height:36px;min-width:36px}
html[lang="fa-AF"] .menu-toggle{min-width:44px;min-height:44px;align-items:center;justify-content:center}
@media(max-width:960px){
  html[lang="fa-AF"] .hero h1{font-size:clamp(27px,3.8vw,35px);line-height:1.55}
  html[lang="fa-AF"] .header-inner{gap:10px}
}
@media(max-width:680px){
  html[lang="fa-AF"] .header-inner .brand{order:0;min-width:0}
  html[lang="fa-AF"] .header-inner .lang-switch{order:1;margin-right:auto;margin-left:0}
  html[lang="fa-AF"] .header-inner .menu-toggle{order:2;margin:0}
  html[lang="fa-AF"] .brand-name{font-size:clamp(14px,3.65vw,17px);letter-spacing:-.035em}
  html[lang="fa-AF"] .hero h1{font-size:clamp(25px,6.2vw,33px);line-height:1.6}
  html[lang="fa-AF"] .hero-intro{font-size:15.5px;line-height:1.9}
  html[lang="fa-AF"] .section-label h2{font-size:clamp(24px,5.8vw,29px);line-height:1.55}
  html[lang="fa-AF"] .section-lead,
  html[lang="fa-AF"] .about-paragraph,
  html[lang="fa-AF"] .job-description{font-size:15px}
  html[lang="fa-AF"] .job-dates{display:block;text-align:right}
  html[lang="fa-AF"] .job-bullets{font-size:14px}
  html[lang="fa-AF"] .project-card>p,
  html[lang="fa-AF"] .featured-project p{font-size:14.5px}
  html[lang="fa-AF"] .lang-option{min-width:34px;min-height:34px;padding:5px}
  html[lang="fa-AF"] .lang-switch{padding:3px;gap:2px}
  html[lang="fa-AF"] .footer-side{text-align:right}
}
@media(max-width:360px){
  html[lang="fa-AF"] .header-inner{padding-inline:10px;gap:5px}
  html[lang="fa-AF"] .brand-name{font-size:13px}
  html[lang="fa-AF"] .brand-mark{width:20px;height:20px}
  html[lang="fa-AF"] .hero h1{font-size:25px}
  html[lang="fa-AF"] .lang-option{min-width:32px;min-height:34px;padding:4px}
}

/* Dari technical terms, logos and microtype refinement — 2026-11-13.
   Scope changes to /dr/ only; preserve the English site and image assets. */
html[lang="fa-AF"] .brand-name{
  font-family:Vazirmatn,Tahoma,"Noto Sans Arabic",sans-serif;
  font-size:21px;
  font-weight:800;
  letter-spacing:0;
  line-height:1.5;
  white-space:nowrap;
}
html[lang="fa-AF"] .brand-mark{
  width:30px;
  height:30px;
  padding:2px;
  border:1px solid #dce5f3;
  border-radius:9px;
  background:#fff;
  object-fit:contain;
  box-shadow:0 2px 7px rgba(29,78,216,.07);
}
html[lang="fa-AF"] .hero-logo{
  flex:0 0 140px;
  width:140px;
  height:140px;
  max-width:140px;
  padding:12px;
  border:1px solid #dce7f5;
  border-radius:24px;
  background:#f9fbff;
  box-shadow:0 10px 30px rgba(23,48,89,.07);
  overflow:hidden;
}
html[lang="fa-AF"] .hero-logo img{
  width:100%;
  height:100%;
  object-fit:contain;
  border-radius:14px;
}
html[lang="fa-AF"] .skill-groups{align-items:start}
html[lang="fa-AF"] .skill-group{height:auto;padding:16px;border-radius:15px}
html[lang="fa-AF"] .skill-group h4[lang="en"]{
  font:750 14px/1.55 system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
  direction:ltr;
  unicode-bidi:isolate;
  text-align:right;
  letter-spacing:-.01em;
  margin:0 0 12px;
}
html[lang="fa-AF"] .skill-group .skill-tags{gap:7px;align-items:flex-start}
html[lang="fa-AF"] .skill-group .skill-tags span[lang="en"]{
  font:500 13px/1.5 system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
  direction:ltr;
  unicode-bidi:isolate;
  text-align:left;
  background:#fff;
  border:1px solid #e0e7f0;
  border-radius:999px;
  padding:7px 11px;
  white-space:normal;
  overflow-wrap:normal;
}
html[lang="fa-AF"] .contact-card-icon{
  width:42px;
  height:42px;
  border-radius:13px;
}
html[lang="fa-AF"] .contact-inline-icon{width:31px;height:31px;border-radius:10px}
html[lang="fa-AF"] .section-heading-icon{border-radius:10px}
html[lang="fa-AF"] .category-label[lang="en"]{
  font-family:system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
  font-size:12px;
  direction:ltr;
  unicode-bidi:isolate;
  text-align:right;
}
html[lang="fa-AF"] .project-filters button [lang="en"]{
  font-family:system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
  direction:ltr;
  unicode-bidi:isolate;
}
@media(min-width:681px) and (max-width:960px){
  html[lang="fa-AF"] .brand-name{font-size:20px}
  html[lang="fa-AF"] .hero-logo{
    flex-basis:118px;
    width:118px;
    height:118px;
    max-width:118px;
    padding:9px;
    border-radius:20px;
  }
}
@media(max-width:680px){
  html[lang="fa-AF"] .brand-name{font-size:18px;line-height:1.5}
  html[lang="fa-AF"] .brand-mark{width:27px;height:27px;border-radius:8px}
  html[lang="fa-AF"] .skill-group{padding:14px}
  html[lang="fa-AF"] .skill-group .skill-tags span[lang="en"]{font-size:13px;padding:7px 10px}
  html[lang="fa-AF"] .contact-card-icon{width:40px;height:40px;border-radius:12px}
}
@media(max-width:360px){
  html[lang="fa-AF"] .brand-name{font-size:16px}
  html[lang="fa-AF"] .brand-mark{width:24px;height:24px;padding:1px}
  html[lang="fa-AF"] .skill-group .skill-tags span[lang="en"]{font-size:12.5px}
}
