:root {
  --ink: #0a2736;
  --navy: #092d3f;
  --navy-2: #0e3b4e;
  --teal: #26b6a4;
  --teal-dark: #168f83;
  --aqua: #b9f2e8;
  --amber: #ffcb75;
  --paper: #f7faf9;
  --white: #ffffff;
  --muted: #61717a;
  --line: rgba(10, 39, 54, 0.14);
  --radius: 1.25rem;
  --shadow: 0 24px 70px rgba(7, 37, 50, 0.12);
  --container: min(1180px, calc(100vw - 3rem));
  --font-body: "Manrope", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Source Serif 4", Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.52;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
html[lang="fa"] {
  --font-body: "Vazirmatn", "Noto Sans Arabic", Tahoma, sans-serif;
  --font-display: "Vazirmatn", "Noto Sans Arabic", Tahoma, sans-serif;
}
html[lang="ar"] {
  --font-body: "Noto Sans Arabic", Tahoma, sans-serif;
  --font-display: "Noto Sans Arabic", Tahoma, sans-serif;
}
html[lang="zh-CN"] {
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-display: "Noto Serif SC", "Songti SC", serif;
}
a { color: inherit; text-decoration: none; }
button, select { font: inherit; }
.container { width: var(--container); margin-inline: auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; z-index: 999; left: 1rem; top: -4rem; padding: .8rem 1rem;
  background: var(--white); color: var(--navy); border-radius: .5rem;
}
.skip-link:focus { top: 1rem; }

.site-header {
  position: fixed; inset: 0 0 auto; z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.site-header.scrolled {
  background: rgba(8, 41, 56, .92);
  border-color: rgba(255,255,255,.1);
  box-shadow: 0 10px 40px rgba(0,0,0,.12);
  backdrop-filter: blur(18px);
}
.header-inner {
  width: var(--container); height: 4.45rem; margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
}
.brand { display: inline-flex; align-items: center; gap: .8rem; color: var(--white); font-weight: 650; }
.brand-mark {
  width: 2.25rem; height: 2.25rem; display: grid; place-items: center;
  border: 1px solid rgba(185,242,232,.55); border-radius: 50%;
  color: var(--aqua); font-size: .72rem; letter-spacing: .08em;
}
.brand-name { font-family: var(--font-display); font-size: 1.06rem; font-weight: 600; letter-spacing: -.01em; }
.site-nav { display: flex; align-items: center; gap: 1.65rem; color: rgba(255,255,255,.8); }
.site-nav > a { position: relative; font-size: .86rem; font-weight: 580; }
.site-nav > a::after {
  content: ""; position: absolute; inset: auto 0 -.45rem; height: 2px;
  background: var(--teal); transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.site-nav > a:hover, .site-nav > a:focus-visible { color: var(--white); }
.site-nav > a:hover::after, .site-nav > a:focus-visible::after { transform: scaleX(1); }
.language-shell {
  display: inline-flex; align-items: center; gap: .3rem; padding: .35rem .55rem;
  border: 1px solid rgba(255,255,255,.18); border-radius: 999px;
}
.language-shell select {
  color: var(--white); background: transparent; border: 0; outline: 0; cursor: pointer;
  font-size: .78rem; font-weight: 700;
}
.language-shell option { color: var(--ink); }
.globe { color: var(--aqua); }
.menu-toggle { display: none; background: none; border: 0; padding: .5rem; }
.menu-toggle span:not(.sr-only) { display: block; width: 1.5rem; height: 2px; margin: .3rem; background: var(--white); }
.scroll-progress { position: absolute; inset: auto 0 0; height: 2px; }
.scroll-progress span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--teal), var(--amber)); }

.hero {
  position: relative; isolation: isolate; min-height: 620px; padding: 6.2rem 0 1.4rem;
  background: var(--navy); color: var(--white); overflow: hidden;
}
.hero-grid {
  position: absolute; inset: 0; z-index: -3; opacity: .18;
  background-image:
    linear-gradient(rgba(255,255,255,.075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.075) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}
.hero::after {
  content: ""; position: absolute; z-index: -2; width: 48vw; height: 48vw;
  right: -15vw; top: -22vw; border: 1px solid rgba(185,242,232,.2); border-radius: 50%;
  box-shadow: 0 0 0 8vw rgba(255,255,255,.012), 0 0 0 16vw rgba(255,255,255,.01);
}
.hero-orb { position: absolute; z-index: -1; border-radius: 50%; filter: blur(2px); }
.hero-orb-one { width: 18rem; height: 18rem; left: -10rem; bottom: 8rem; background: rgba(38,182,164,.12); }
.hero-orb-two { width: 7rem; height: 7rem; right: 32%; top: 10rem; background: rgba(255,203,117,.08); }
.hero-layout { display: grid; grid-template-columns: 1.08fr .72fr; gap: 2rem; align-items: center; }
.eyebrow {
  display: flex; align-items: center; gap: .65rem; margin: 0 0 .75rem;
  color: var(--aqua); font-size: .77rem; font-weight: 720; letter-spacing: .11em; text-transform: uppercase;
}
.eyebrow span { width: 2.5rem; height: 1px; background: var(--teal); }
.hero h1 {
  margin: 0; max-width: 760px; color: #f8fbfa;
  font-family: var(--font-display); font-size: clamp(3.35rem, 6.2vw, 5.4rem);
  font-optical-sizing: auto; line-height: .87; letter-spacing: -.047em; font-weight: 600;
}
.hero h1, .brand-name { direction: ltr; unicode-bidi: isolate; }
.hero h1 span { display: block; color: inherit; font: inherit; }
.hero-role { margin: 1.05rem 0 .4rem; font-size: clamp(1.04rem, 1.45vw, 1.22rem); font-weight: 620; }
.hero-intro { max-width: 620px; margin: 0; color: rgba(255,255,255,.7); font-size: 1rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.05rem; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .7rem; min-height: 2.9rem;
  padding: .62rem 1.05rem; border: 1px solid transparent; border-radius: .65rem;
  font-size: .9rem; font-weight: 700; transition: transform .25s ease, background .25s ease, color .25s ease;
}
.button:hover, .button:focus-visible { transform: translateY(-2px); }
.button-primary { background: var(--teal); color: #052e32; }
.button-primary:hover { background: var(--aqua); }
.button-ghost { color: var(--white); border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.04); }
.button-ghost:hover { background: rgba(255,255,255,.1); }
.affiliation { display: flex; gap: .7rem; align-items: center; margin-top: 1rem; color: rgba(255,255,255,.65); font-size: .8rem; line-height: 1.3; }
.affiliation strong { color: var(--white); font-weight: 650; }
.affiliation-symbol {
  width: 3.8rem; height: 2.5rem; padding: .38rem; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.22);
  border-radius: .38rem; background: rgba(255,255,255,.94);
}
.affiliation-symbol img { display: block; width: 100%; height: 100%; object-fit: contain; }
.profile-visual { display: grid; justify-items: center; width: 100%; }
.portrait-frame {
  position: relative; width: min(325px, 100%); aspect-ratio: .74;
  display: grid; place-items: center; border: 1px solid rgba(255,255,255,.16);
  background: linear-gradient(145deg, rgba(255,255,255,.09), rgba(255,255,255,.015));
  border-radius: 48% 48% 1.25rem 1.25rem; box-shadow: 0 30px 80px rgba(0,0,0,.22);
  overflow: visible;
}
.portrait-frame picture {
  position: absolute; inset: 0; display: block; overflow: hidden;
  border-radius: inherit; background: #dfe9e7;
}
.portrait-frame picture::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(4,31,44,.22), transparent 34%);
  pointer-events: none;
}
.portrait-frame img {
  width: 100%; height: 100%; display: block; object-fit: cover; object-position: center 18%;
  transition: transform .45s ease;
}
html[dir="ltr"] .portrait-frame img { transform: scaleX(-1); }
html[dir="rtl"] .portrait-frame img { transform: none; }
.focus-chip {
  position: absolute; z-index: 2; padding: .48rem .7rem; color: rgba(255,255,255,.88);
  background: rgba(4,29,41,.82); border: 1px solid rgba(255,255,255,.15); border-radius: 999px;
  backdrop-filter: blur(10px); font-size: .72rem; font-weight: 650;
}
.chip-one { left: -1rem; top: 26%; }
.chip-two { right: -1.4rem; bottom: 20%; }
.profile-note {
  width: 86%; margin-top: -1.1rem; z-index: 1; padding: .75rem .9rem;
  background: var(--white); color: var(--ink); box-shadow: var(--shadow); border-radius: .8rem;
  display: flex; align-items: flex-start; gap: .65rem; font-size: .82rem; line-height: 1.45;
}
.status-dot { flex: 0 0 auto; width: .6rem; height: .6rem; margin-top: .28rem; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 .28rem rgba(38,182,164,.13); }
.hero-footer {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; margin-top: 1.45rem; padding-top: .7rem;
  border-top: 1px solid rgba(255,255,255,.11); color: rgba(255,255,255,.58); font-size: .77rem;
}
.hero-footer div { display: flex; align-items: center; gap: .65rem; }
.hero-footer span { color: var(--teal); font-size: .68rem; font-weight: 800; }
.hero-footer b, .eyebrow b { font: inherit; }

.section { padding: 3.5rem 0; }
.section-grid { display: grid; grid-template-columns: 105px 1fr; gap: 1.7rem; }
.section-label { padding-top: .35rem; }
.section-label span { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border: 1px solid var(--line); border-radius: 50%; font-size: .67rem; font-weight: 760; color: var(--teal-dark); }
.section-label p { margin: .6rem 0 0; font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-weight: 720; }
.section-label.inline { display: flex; align-items: center; gap: .65rem; padding: 0; min-width: 115px; }
.section-label.inline p { margin: 0; }
.kicker { margin: 0 0 .75rem; color: var(--teal-dark); font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 800; }
.section h2 {
  margin: 0; max-width: 850px; font-size: clamp(1.9rem, 3.2vw, 2.7rem);
  font-family: var(--font-display); font-optical-sizing: auto; line-height: 1.07; letter-spacing: -.038em; font-weight: 600;
}
.about { background: var(--white); }
.about-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 1.35rem; margin-top: 1rem; max-width: 900px; color: var(--muted); }
.about-columns p { margin: 0; }
.fact-strip {
  display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 1.45rem;
  border-block: 1px solid var(--line);
}
.fact-strip div { padding: .75rem .9rem; border-right: 1px solid var(--line); }
.fact-strip div:first-child { padding-left: 0; }
.fact-strip div:last-child { border-right: 0; }
.fact-strip strong { display: block; font-size: 1.3rem; letter-spacing: -.03em; color: var(--navy); }
.fact-strip span { display: block; margin-top: .25rem; font-size: .75rem; color: var(--muted); }
.fact-brand-label { display: flex !important; align-items: center; gap: .45rem; }
.fact-brand-label img { width: 2.45rem; height: 1.25rem; padding: .12rem; object-fit: contain; border-radius: .2rem; background: #eef3f2; }
.fact-brand-label > span, .brand-lockup > span { display: inline; margin: 0; color: inherit; font: inherit; }
.brand-pair, .project-logos { display: flex !important; align-items: center; flex-wrap: wrap; gap: .7rem; }
.brand-lockup { display: inline-flex !important; align-items: center; gap: .38rem; margin: 0 !important; color: var(--navy) !important; font-size: .72rem !important; letter-spacing: 0; white-space: nowrap; }
.brand-lockup img { width: 1.35rem; height: 1.35rem; object-fit: contain; }
.brand-lockup:first-child img { width: 1.9rem; }
.brand-lockup img.kks-logo { width: 2.6rem; height: 1.45rem; padding: .15rem; border-radius: .2rem; background: var(--navy); }

.research { background: #edf5f3; }
.section-heading { display: grid; grid-template-columns: 105px 1fr auto; gap: 1.7rem; align-items: end; margin-bottom: 1.7rem; }
.research-grid { display: grid; grid-template-columns: 1.07fr .93fr; gap: 1rem; }
.research-card {
  position: relative; min-height: 215px; padding: 1.15rem; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.68);
  display: flex; flex-direction: column; transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.research-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: rgba(38,182,164,.35); }
.research-card.featured { background: var(--navy); color: var(--white); border-color: var(--navy); }
.research-card.accent-card { background: #d6eee8; }
.card-index { position: absolute; top: 1.1rem; right: 1.3rem; font-size: .66rem; font-weight: 800; color: var(--teal-dark); }
.featured .card-index { color: var(--aqua); }
.card-symbol { width: 2.25rem; height: 2.25rem; margin-bottom: auto; position: relative; color: var(--teal-dark); }
.shield-symbol { border: 1px solid rgba(185,242,232,.5); border-radius: 48% 48% 65% 65%; transform: scaleX(.82); }
.shield-symbol span { position: absolute; inset: 30%; border: 1px solid var(--teal); border-radius: 50%; }
.nodes-symbol i { position: absolute; width: .7rem; height: .7rem; border: 2px solid var(--teal-dark); border-radius: 50%; }
.nodes-symbol i:nth-child(1) { left: 0; top: 45%; }
.nodes-symbol i:nth-child(2) { right: 0; top: 5%; }
.nodes-symbol i:nth-child(3) { right: 0; bottom: 5%; }
.nodes-symbol::before, .nodes-symbol::after { content:""; position:absolute; width: 2.25rem; height:1px; left:.55rem; background:var(--teal-dark); transform-origin:left; }
.nodes-symbol::before { top:50%; transform:rotate(-27deg); }
.nodes-symbol::after { top:50%; transform:rotate(27deg); }
.pulse-symbol::before {
  content: ""; position: absolute; left: 0; top: 48%; width: 100%; height: 2px; background: var(--teal-dark);
  clip-path: polygon(0 40%, 25% 40%, 35% 0, 46% 100%, 58% 25%, 68% 40%, 100% 40%, 100% 60%, 67% 60%, 59% 48%, 45% 100%, 34% 27%, 28% 60%, 0 60%);
}
.ai-symbol { display: grid; place-items: center; border: 1px solid rgba(10,39,54,.18); border-radius: 50%; font-family: var(--font-display); font-size: 1.2rem; }
.research-card h3 { max-width: 520px; margin: .75rem 0 .4rem; font-family: var(--font-display); font-size: clamp(1.15rem, 1.65vw, 1.45rem); line-height: 1.18; letter-spacing: -.025em; font-weight: 600; }
.research-card p { max-width: 570px; margin: 0 0 .7rem; color: var(--muted); font-size: .86rem; }
.featured p { color: rgba(255,255,255,.67); }
.topic-tags { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: auto; }
.topic-tags span { padding: .35rem .55rem; border: 1px solid var(--line); border-radius: 999px; font-size: .68rem; color: var(--muted); }
.featured .topic-tags span { color: rgba(255,255,255,.72); border-color: rgba(255,255,255,.17); }

.experience { background: var(--white); }
.experience .section-content > h2 { margin-bottom: 1.6rem; }
.timeline { position: relative; }
.timeline::before { content: ""; position: absolute; left: 170px; top: .6rem; bottom: .6rem; width: 1px; background: var(--line); }
.timeline-item { display: grid; grid-template-columns: 145px 50px 1fr; gap: 0; padding: 0 0 1rem; }
.timeline-date { padding-top: .15rem; font-size: .75rem; font-weight: 750; color: var(--teal-dark); }
.timeline-marker { position: relative; }
.timeline-marker::before {
  content: ""; position: absolute; left: 20px; top: .35rem; width: 9px; height: 9px;
  border-radius: 50%; background: var(--white); border: 2px solid var(--teal);
  box-shadow: 0 0 0 5px rgba(38,182,164,.08);
}
.timeline-item h3 { margin: 0; font-family: var(--font-display); font-size: 1.08rem; line-height: 1.35; font-weight: 600; }
.timeline-item p { margin: .35rem 0 0; color: var(--muted); font-size: .85rem; }
.timeline-item .timeline-org { display: flex; align-items: center; gap: .55rem; color: var(--navy); font-weight: 620; }
.timeline-org img { width: 2.5rem; height: 1.2rem; padding: .12rem; object-fit: contain; border-radius: .22rem; background: #f4f7f6; }
.timeline-org img.university-seal { width: 1.55rem; height: 1.55rem; padding: 0; }

.publications { background: var(--navy); color: var(--white); }
.publications .section-heading { align-items: end; }
.section-label.inverse span { border-color: rgba(255,255,255,.22); color: var(--aqua); }
.section-label.inverse p { color: rgba(255,255,255,.5); }
.kicker.light { color: var(--aqua); }
.text-link { align-self: end; color: var(--aqua); font-size: .8rem; font-weight: 700; border-bottom: 1px solid rgba(185,242,232,.35); padding-bottom: .2rem; }
.publication-list { border-top: 1px solid rgba(255,255,255,.15); }
.publication {
  display: grid; grid-template-columns: 90px 1fr 100px; gap: 1.2rem; align-items: center;
  padding: .85rem .4rem; border-bottom: 1px solid rgba(255,255,255,.12); color: inherit;
  transition: background .25s ease, padding-inline .25s ease, color .25s ease;
}
.publication:hover, .publication:focus-visible { background: rgba(255,255,255,.055); padding-inline: 1rem; }
.publication:focus-visible { outline: 2px solid var(--aqua); outline-offset: 3px; }
.publication-year { color: var(--teal); font-size: .75rem; font-weight: 800; }
.publication h3 { margin: 0; max-width: 800px; font-family: var(--font-display); font-size: 1.06rem; line-height: 1.4; font-weight: 600; }
.publication p { margin: .35rem 0 0; color: rgba(255,255,255,.48); font-size: .78rem; }
.publication-type { justify-self: end; display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .5rem; border: 1px solid rgba(255,255,255,.15); border-radius: 999px; color: rgba(255,255,255,.62); font-size: .64rem; white-space: nowrap; }
.publication:hover .publication-type, .publication:focus-visible .publication-type { color: var(--aqua); border-color: rgba(185,242,232,.4); }

.projects { background: #edf5f3; }
.projects .section-content > h2 { margin-bottom: 1.5rem; }
.project-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.project-card { min-height: 175px; padding: 1.05rem; display: flex; flex-direction: column; border-radius: var(--radius); background: var(--white); border: 1px solid var(--line); }
.project-role { margin: 0; color: var(--teal-dark); font-size: .7rem; font-weight: 780; text-transform: uppercase; letter-spacing: .08em; }
.project-card h3 { margin: .6rem 0 .3rem; font-family: var(--font-display); font-size: 1.22rem; letter-spacing: -.02em; font-weight: 600; }
.project-card > p:not(.project-role) { margin: 0; color: var(--muted); font-size: .9rem; }
.project-card > span { margin-top: auto; padding-top: .8rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .72rem; }
.project-logos { margin: .65rem 0 .35rem; }

.teaching { background: var(--white); }
.teaching-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.teaching-copy .section-label { margin-bottom: 1.35rem; }
.teaching-list { border-top: 1px solid var(--line); }
.teaching-list div { display: grid; grid-template-columns: 45px 1fr; gap: .7rem; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.teaching-list span { color: var(--teal-dark); font-size: .68rem; font-weight: 800; }
.teaching-list p { margin: 0; font-weight: 620; line-height: 1.4; }

.contact { position: relative; isolation: isolate; padding: 3.4rem 0; background: var(--teal-dark); color: var(--white); overflow: hidden; }
.contact-pattern {
  position: absolute; z-index: -1; width: 38rem; height: 38rem; right: -7rem; top: -12rem; border: 1px solid rgba(255,255,255,.16); border-radius: 50%;
  box-shadow: 0 0 0 5rem rgba(255,255,255,.025), 0 0 0 10rem rgba(255,255,255,.018);
}
.contact-inner { max-width: 1000px; }
.contact h2 { max-width: 820px; margin: 0; font-family: var(--font-display); font-size: clamp(1.9rem, 3.2vw, 2.7rem); line-height: 1.08; letter-spacing: -.035em; font-weight: 600; }
.contact-inner > p:not(.kicker) { max-width: 650px; margin: 1rem 0 0; color: rgba(255,255,255,.72); }
.contact-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.button-logo { width: 2.3rem; height: 1.45rem; padding: .2rem; display: inline-flex; align-items: center; border-radius: .25rem; background: rgba(255,255,255,.92); }
.button-logo img, .footer-logo img { width: 100%; height: 100%; object-fit: contain; }
.button-light { background: var(--white); color: var(--navy); }
.button-outline-light { border-color: rgba(255,255,255,.38); color: var(--white); }
.button-outline-light:hover { background: rgba(255,255,255,.1); }
footer { background: #041f2c; color: rgba(255,255,255,.55); padding: 1.5rem 0; font-size: .75rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 2rem; }
.footer-inner p { margin: 0; }
.footer-inner div { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.footer-inner a:hover { color: var(--white); }
.footer-org { display: inline-flex; align-items: center; gap: .4rem; }
.footer-logo { width: 2.25rem; height: 1.15rem; padding: .15rem; display: inline-flex; border-radius: .2rem; background: rgba(255,255,255,.9); }

html[dir="rtl"] .hero-copy,
html[dir="rtl"] .section-content,
html[dir="rtl"] .research-card,
html[dir="rtl"] .project-card,
html[dir="rtl"] .teaching-copy,
html[dir="rtl"] .contact-inner { text-align: right; }
html[dir="rtl"] .timeline::before { left: auto; right: 170px; }
html[dir="rtl"] .timeline-marker::before { left: auto; right: 20px; }
html[dir="rtl"] .card-index { right: auto; left: 1.3rem; }
html[dir="rtl"] .fact-strip div { border-right: 0; border-left: 1px solid var(--line); }
html[dir="rtl"] .fact-strip div:last-child { border-left: 0; }
html[dir="rtl"] .text-link,
html[dir="rtl"] .button,
html[dir="rtl"] .affiliation { unicode-bidi: plaintext; }
html[lang="fa"] .hero h1,
html[lang="ar"] .hero h1,
html[lang="zh-CN"] .hero h1,
html[lang="fa"] .brand-name,
html[lang="ar"] .brand-name,
html[lang="zh-CN"] .brand-name { font-family: "Source Serif 4", Georgia, serif; }
html[lang="fa"] .hero h1,
html[lang="fa"] .brand-name { direction: rtl; font-family: "Vazirmatn", "Noto Sans Arabic", Tahoma, sans-serif; letter-spacing: -.035em; }
html[lang="fa"] .hero h1 { font-size: clamp(3.35rem, 6.2vw, 5.35rem); line-height: .98; }
html[lang="fa"] .section h2,
html[lang="fa"] .research-card h3,
html[lang="fa"] .timeline-item h3,
html[lang="fa"] .publication h3,
html[lang="fa"] .project-card h3,
html[lang="ar"] .section h2,
html[lang="ar"] .research-card h3,
html[lang="ar"] .timeline-item h3,
html[lang="ar"] .publication h3,
html[lang="ar"] .project-card h3 { letter-spacing: 0; }

.reveal { opacity: 0; transform: translateY(20px); transition: opacity .65s ease, transform .65s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: .1s; }
.delay-2 { transition-delay: .2s; }

@media (max-width: 980px) {
  :root { --container: min(100% - 2rem, 760px); }
  .menu-toggle { display: block; }
  .site-nav {
    position: fixed; inset: 4.45rem 1rem auto; display: grid; gap: 0;
    padding: .8rem; background: rgba(8,41,56,.98); border: 1px solid rgba(255,255,255,.13);
    border-radius: .9rem; box-shadow: var(--shadow); transform: translateY(-1rem); opacity: 0; pointer-events: none;
  }
  .site-nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .site-nav > a { padding: .8rem; }
  .language-shell { margin: .5rem .8rem; width: max-content; }
  .hero { padding-top: 6.4rem; }
  .hero-layout { grid-template-columns: 1fr; gap: 2rem; }
  .profile-visual { width: min(500px, 100%); margin-inline: auto; }
  .hero-footer { margin-top: 1.4rem; }
  .section-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .section-label:not(.inline) { display: flex; align-items: center; gap: .65rem; }
  .section-label:not(.inline) p { margin: 0; }
  .section-heading { grid-template-columns: 1fr; gap: 1.2rem; }
  .research-grid { grid-template-columns: 1fr; }
  .research-card { min-height: 215px; }
  .teaching-layout { grid-template-columns: 1fr; gap: 1.7rem; }
  .teaching-copy .section-label { margin-bottom: 1.1rem; }
}

@media (max-width: 640px) {
  :root { --container: calc(100% - 1.35rem); }
  body { line-height: 1.55; }
  .header-inner { height: 4.4rem; }
  .brand-name { font-size: .88rem; }
  .site-nav { inset: 4.4rem .65rem auto; }
  .hero { min-height: auto; padding: 5.6rem 0 1.25rem; }
  .hero h1 { font-size: clamp(2.85rem, 14vw, 4.1rem); }
  .hero-intro { font-size: 1rem; }
  .hero-actions { display: grid; }
  .button { width: 100%; }
  .portrait-frame { width: 94%; }
  .focus-chip { font-size: .63rem; }
  .chip-one { left: -.5rem; }
  .chip-two { right: -.5rem; }
  .hero-footer { display: none; }
  .section { padding: 2.8rem 0; }
  .section h2, .contact h2 { font-size: clamp(1.75rem, 8vw, 2.4rem); }
  .about-columns, .fact-strip, .project-grid { grid-template-columns: 1fr; }
  .about-columns { gap: 1rem; }
  .fact-strip div { padding: 1rem 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .fact-strip div:last-child { border-bottom: 0; }
  .research-card { min-height: 205px; padding: 1.05rem; }
  .timeline::before { left: 8px; }
  .timeline-item { grid-template-columns: 28px 1fr; padding-bottom: 1.1rem; }
  .timeline-date { grid-column: 2; padding: 0 0 .35rem; }
  .timeline-marker { grid-column: 1; grid-row: 1 / 3; }
  .timeline-marker::before { left: 4px; top: .3rem; }
  html[dir="rtl"] .timeline::before { left: auto; right: 8px; }
  html[dir="rtl"] .timeline-marker::before { left: auto; right: 4px; }
  .timeline-item > div:last-child { grid-column: 2; }
  .publication { grid-template-columns: 55px 1fr; align-items: start; }
  .publication-type { grid-column: 2; justify-self: start; }
  .project-card { min-height: 170px; }
  .contact { padding: 2.8rem 0; }
  .contact-actions { display: grid; }
  .footer-inner { align-items: flex-start; flex-direction: column; gap: .8rem; }
  .footer-inner div { gap: .9rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
