@font-face {
  font-family: 'IRANSansX';
  src: url('./fonts/IRANSansXFaNum-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IRANSansX';
  src: url('./fonts/IRANSansXFaNum-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IRANSansX';
  src: url('./fonts/IRANSansXFaNum-DemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IRANSansX';
  src: url('./fonts/IRANSansXFaNum-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IRANSansX';
  src: url('./fonts/IRANSansXFaNum-ExtraBold.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Rokh';
  src: url('./fonts/RokhFaNum-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Rokh';
  src: url('./fonts/RokhFaNum-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Rokh';
  src: url('./fonts/RokhFaNum-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Rokh';
  src: url('./fonts/RokhFaNum-ExtraBold.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --shell: min(1180px, calc(100% - 48px));
  --radius: 28px;
  --radius-sm: 22px;
  --navy: #242424;
  --navy-2: #2f2d2a;
  --navy-3: #3a3631;
  --gold: #b78a2f;
  --gold-2: #d7b15b;
  --gold-soft: #efe3c1;
  --gold-glow: rgba(183, 138, 47, .18);
  --green: #d4af37;
  --green-2: #416454;
  --green-soft: rgba(47, 73, 62, .10);
  --bg: #f6f3ed;
  --surface: #ffffff;
  --surface-2: #f3ede1;
  --surface-3: #faf7f1;
  --text: #292725;
  --muted: #6e6a63;
  --line: rgba(36, 36, 36, .10);
  --line-strong: rgba(36, 36, 36, .18);
  --shadow: 0 18px 48px rgba(36, 36, 36, .08);
  --shadow-strong: 0 24px 60px rgba(36, 36, 36, .16);
  --ease: cubic-bezier(.2,.75,.2,1);
}

:root[data-theme="dark"] {
  --bg: #171614;
  --surface: #201f1d;
  --surface-2: #292724;
  --surface-3: #34312d;
  --text: #ecf2f8;
  --muted: #aaa39a;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .14);
  --shadow: 0 20px 48px rgba(0, 0, 0, .28);
  --shadow-strong: 0 24px 70px rgba(0, 0, 0, .42);
  --gold-soft: rgba(183, 138, 47, .12);
  --gold-glow: rgba(215, 177, 91, .14);
  --green: #3f6653;
  --green-2: #5c816f;
  --green-soft: rgba(63, 102, 83, .16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Rokh', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background:
    radial-gradient(circle at top right, rgba(215,177,91,.09), transparent 28%),
    linear-gradient(180deg, rgba(36,36,36,.015), rgba(36,36,36,0) 18%),
    var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
::selection { background: var(--gold-soft); color: var(--navy); }

.en { display: none; }
body.lang-en .fa { display: none; }
body.lang-en .en { display: revert; }
body.lang-en { letter-spacing: 0; }
body.lang-en h1,
body.lang-en h2,
body.lang-en h3,
body.lang-en strong,
body.lang-en b,
body.lang-en .btn,
body.lang-en .brand-copy,
body.lang-en .hero-title,
body.lang-en .project-card,
body.lang-en .contact-actions strong { letter-spacing: -.02em; }

.shell { width: var(--shell); margin-inline: auto; }
.section-pad { padding: 108px 0; }
.surface {
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 92%, var(--gold-soft) 8%), var(--surface));
  border-block: 1px solid var(--line);
}
.skip-link {
  position: absolute; inset-inline-start: 18px; top: -100px; z-index: 999;
  background: var(--navy); color: #fff; padding: 12px 16px; border-radius: 14px;
}
.skip-link:focus { top: 18px; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(160%) blur(14px);
  background: color-mix(in srgb, var(--bg) 76%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav-wrap {
  height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 22px;
}
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-mark {
  width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--navy), var(--navy-3)); color: var(--gold-2);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 10px 24px rgba(36,36,36,.16);
  font-size: 14px; font-weight: 800; letter-spacing: .08em;
}
.brand-copy { display: grid; gap: 2px; min-width: 0; }
.brand-copy b { font-size: 16px; font-weight: 800; white-space: nowrap; }
.brand-copy small { color: var(--muted); font-size: 10px; letter-spacing: .18em; }
.desktop-nav { display: flex; align-items: center; gap: 28px; }
.desktop-nav a,
.nav-cta,
.lang-btn,
.icon-btn {
  transition: .28s var(--ease);
}
.desktop-nav a {
  color: var(--muted); font-size: 13px; font-weight: 600; position: relative;
}
.desktop-nav a::after {
  content: ''; position: absolute; inset-inline: 0; bottom: -10px; height: 2px;
  transform: scaleX(0); transform-origin: center;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transition: transform .28s var(--ease);
}
.desktop-nav a:hover,
.desktop-nav a:focus-visible { color: var(--text); }
.desktop-nav a:hover::after,
.desktop-nav a:focus-visible::after { transform: scaleX(1); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn,
.lang-btn {
  width: 42px; height: 42px; border-radius: 14px; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 84%, transparent); color: var(--text);
  display: grid; place-items: center; cursor: pointer;
}
.icon-btn:hover,
.lang-btn:hover,
.nav-cta:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--gold) 45%, var(--line));
  box-shadow: 0 12px 24px var(--gold-glow);
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .moon { display: none; }
:root[data-theme="dark"] .icon-btn .sun { display: none; }
:root[data-theme="dark"] .icon-btn .moon { display: block; }
.lang-btn { font-weight: 700; font-size: 12px; }
.nav-cta {
  padding: 11px 18px; border-radius: 14px; border: 1px solid var(--line);
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 90%, transparent), color-mix(in srgb, var(--surface-2) 85%, transparent));
  font-size: 13px; font-weight: 700;
}

.hero { min-height: calc(100vh - 86px); display: grid; align-items: center; }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; align-items: center; gap: 64px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 78%, transparent);
  border: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 600;
  box-shadow: 0 10px 18px rgba(36,36,36,.04);
}
.dot {
  width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, var(--gold), var(--gold-2));
  box-shadow: 0 0 0 5px var(--gold-glow);
}
.hero h1 {
  margin: 20px 0 12px; font-size: clamp(46px, 7vw, 76px); line-height: 1.05; font-weight: 800;
  letter-spacing: -.04em;
}
.hero-title { margin: 0 0 18px; font-size: clamp(20px, 2vw, 24px); line-height: 1.8; color: var(--text); }
.hero-title strong { color: var(--gold); font-weight: 800; }
.hero-lead { margin: 0; max-width: 720px; font-size: 16px; line-height: 2; color: var(--muted); }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.btn {
  min-height: 54px; padding: 0 22px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 14px; font-weight: 700; border: 1px solid transparent; cursor: pointer;
  transition: transform .28s var(--ease), box-shadow .28s var(--ease), border-color .28s var(--ease), background .28s var(--ease);
}
.btn svg { width: 18px; height: 18px; }
.btn.primary {
  color: #fff; background: linear-gradient(135deg, var(--navy), var(--navy-3));
  box-shadow: 0 18px 32px rgba(36,36,36,.18);
}
.btn.primary:hover { transform: translateY(-3px); box-shadow: 0 22px 36px rgba(36,36,36,.26); }
.btn.ghost {
  border-color: color-mix(in srgb, var(--gold) 40%, var(--line));
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  color: var(--text);
}
.btn.ghost:hover {
  transform: translateY(-3px);
  background: color-mix(in srgb, var(--gold-soft) 40%, var(--surface));
  box-shadow: 0 16px 28px var(--gold-glow);
}
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 24px; color: var(--muted); font-size: 13px; }
.hero-meta > span,
.hero-meta > a { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta svg { width: 17px; height: 17px; color: var(--gold); }

.hero-visual { position: relative; }
.portrait-frame {
  position: relative; isolation: isolate; max-width: 520px; margin-inline: auto;
}
.portrait-frame::before {
  content: ''; position: absolute; inset: -26px; border-radius: calc(var(--radius) + 16px);
  background: radial-gradient(circle at 30% 20%, rgba(215,177,91,.18), transparent 32%),
              linear-gradient(135deg, rgba(36,36,36,.14), rgba(36,36,36,.02));
  z-index: -2;
}
.portrait-frame::after {
  content: ''; position: absolute; inset: 18px -18px -18px 18px;
  border-radius: calc(var(--radius) + 4px); border: 1px solid color-mix(in srgb, var(--gold) 52%, transparent);
  z-index: -1; opacity: .55;
}
.portrait-frame img {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: center 22%;
  border-radius: var(--radius); border: 1px solid var(--line);
  box-shadow: var(--shadow-strong);
}
.portrait-halo {
  position: absolute; width: 72%; aspect-ratio: 1; inset-inline-start: -8%; top: -4%; z-index: -1;
  background: radial-gradient(circle, rgba(215,177,91,.30), rgba(215,177,91,.08) 38%, transparent 70%);
  filter: blur(18px);
}
.experience-card {
  position: absolute; inset-inline-start: -34px; bottom: 26px; z-index: 2;
  min-width: 170px; padding: 18px 18px 16px; border-radius: 20px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: blur(14px);
  border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--line));
  box-shadow: var(--shadow);
}
.experience-card b { display: block; color: var(--gold); font-size: 30px; line-height: 1; margin-bottom: 6px; }
.experience-card span { color: var(--text); font-size: 12px; line-height: 1.9; }

.stats-bar {
  padding: 22px 0 0;
}
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); overflow: hidden;
  background: color-mix(in srgb, var(--surface) 92%, transparent); border: 1px solid var(--line);
  border-radius: 24px; box-shadow: var(--shadow);
}
.stats-grid > div {
  min-height: 142px; padding: 28px 26px; display: grid; align-content: start; gap: 8px;
  border-inline-start: 1px solid var(--line); position: relative;
}
.stats-grid > div:first-child { border-inline-start: 0; }
.stats-grid > div::before {
  content: ''; position: absolute; inset-inline: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .7;
}
.stats-grid strong { color: var(--navy); font-size: 34px; line-height: 1; }
:root[data-theme="dark"] .stats-grid strong { color: #fff; }
.stats-grid span { color: var(--muted); font-size: 13px; line-height: 1.9; }

.two-col,
.skill-layout,
.education-layout,
.contact-grid {
  display: grid;
}
.two-col { grid-template-columns: .9fr 1.1fr; gap: 72px; }
.skill-layout { grid-template-columns: .7fr 1.3fr; gap: 82px; }
.education-layout { grid-template-columns: .76fr 1.24fr; gap: 90px; }
.contact-grid { grid-template-columns: 1fr .72fr; gap: 86px; align-items: center; }
.section-intro h2,
.section-head h2,
.contact-grid h2,
.volunteer-card h2 {
  margin: 10px 0 0; font-size: clamp(34px, 4vw, 46px); line-height: 1.35; letter-spacing: -.03em;
}
.section-intro p,
.section-head p,
.contact-grid p,
.volunteer-card p { color: var(--muted); }
.section-kicker {
  display: inline-block; color: var(--gold); font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
}
.section-kicker.light { color: var(--gold-2); }
.about-copy p { margin: 0 0 18px; font-size: 15px; line-height: 2.15; }
.capability-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 54px;
}
.capability-grid article,
.project-card,
.volunteer-card,
.edu-card,
.contact-actions a {
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease), background .35s var(--ease);
}
.capability-grid article {
  padding: 26px 22px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 88%, transparent), color-mix(in srgb, var(--surface-2) 68%, transparent));
  box-shadow: 0 10px 18px rgba(36,36,36,.04);
  position: relative; overflow: hidden;
}
.capability-grid article::before,
.project-card::before,
.edu-card::before {
  content: ''; position: absolute; inset-inline: 0; top: 0; height: 2px; opacity: 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent); transition: opacity .35s var(--ease);
}
.capability-grid article:hover,
.project-card:hover,
.edu-card:hover,
.contact-actions a:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--gold) 40%, var(--line-strong));
  box-shadow: 0 22px 42px rgba(36,36,36,.10);
}
.capability-grid article:hover::before,
.project-card:hover::before,
.edu-card:hover::before { opacity: 1; }
.capability-grid article > span { font-size: 12px; font-weight: 800; color: var(--gold); }
.capability-grid h3 { margin: 16px 0 10px; font-size: 17px; }
.capability-grid p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.9; }

.section-head { display: grid; grid-template-columns: 1fr .7fr; gap: 52px; align-items: end; margin-bottom: 50px; }
.timeline { border-top: 1px solid var(--line); }
.timeline-item {
  display: grid; grid-template-columns: 190px 1fr; gap: 44px; padding: 36px 0; border-bottom: 1px solid var(--line);
}
.time { display: grid; gap: 5px; }
.time b { color: var(--gold); font-size: 14px; }
.time span { color: var(--muted); font-size: 11px; }
.role-label { display: block; color: var(--muted); font-size: 12px; }
.timeline-body h3 { margin: 8px 0 10px; font-size: 22px; }
.timeline-body p { margin: 0; max-width: 820px; color: var(--text); font-size: 14px; line-height: 2; }
.compact-item { padding-block: 26px; }

.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.project-card {
  min-height: 312px; display: flex; flex-direction: column; position: relative; overflow: hidden;
  padding: 28px; border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 92%, transparent), color-mix(in srgb, var(--surface-2) 55%, transparent));
  box-shadow: 0 10px 18px rgba(36,36,36,.04);
}
.project-card::after {
  content: ''; position: absolute; width: 180px; height: 180px; border-radius: 50%;
  inset-inline-end: -80px; bottom: -90px; border: 1px solid var(--line); opacity: .5;
}
.project-card.featured {
  background: linear-gradient(135deg, var(--navy), var(--navy-3)); color: #fff;
  border-color: rgba(255,255,255,.08);
}
.project-card.featured p,
.project-card.featured .year,
.project-card.featured .tag { color: #e5dfd4; }
.project-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: auto; }
.project-no { color: var(--gold); font-size: 12px; font-weight: 800; }
.tag {
  padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line);
  font-size: 11px; color: var(--muted); background: color-mix(in srgb, var(--surface) 50%, transparent);
}
.project-card.featured .tag { border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.06); }
.project-card h3 { margin: 42px 0 10px; font-size: 21px; line-height: 1.7; max-width: 92%; }
.project-card p { margin: 0 0 22px; color: var(--text); font-size: 13px; line-height: 2; max-width: 92%; }
.project-card.featured p { color: #eee9df; }
.year { margin-top: auto; color: var(--muted); font-size: 12px; font-weight: 700; }

.expertise-section { position: relative; overflow: hidden; }
.expertise-section::before {
  content: ''; position: absolute; width: 440px; height: 440px; border-radius: 50%;
  inset-inline-end: -240px; top: -210px; pointer-events: none;
  background: radial-gradient(circle, var(--green-soft), transparent 68%);
}
.expertise-intro { margin-bottom: 42px; max-width: 720px; }
.expertise-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.expertise-card {
  position: relative; overflow: hidden; min-height: 270px; padding: 30px 30px 28px;
  border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(155deg, color-mix(in srgb, var(--surface) 94%, transparent), color-mix(in srgb, var(--surface-2) 72%, transparent));
  box-shadow: 0 12px 26px rgba(36,36,36,.045);
  transition: transform .34s var(--ease), border-color .34s var(--ease), box-shadow .34s var(--ease), background .34s var(--ease);
}
.expertise-card::after {
  content: ''; position: absolute; width: 150px; height: 150px; border-radius: 50%;
  inset-inline-end: -75px; bottom: -86px; border: 1px solid color-mix(in srgb, var(--gold) 24%, transparent); opacity: .6;
}
.expertise-card.green-accent::after { border-color: color-mix(in srgb, var(--green) 42%, transparent); }
.expertise-card:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--gold) 44%, var(--line));
  box-shadow: 0 24px 46px rgba(36,36,36,.10);
}
.expertise-card.green-accent:hover { border-color: color-mix(in srgb, var(--green) 55%, var(--line)); }
.expertise-card h3 { margin: 0; font-size: 21px; line-height: 1.65; font-weight: 800; }
.expertise-rule {
  width: 74px; height: 2px; margin: 17px 0 20px;
  background: linear-gradient(90deg, var(--gold), color-mix(in srgb, var(--gold) 30%, transparent));
  border-radius: 99px; transition: width .34s var(--ease);
}
[dir="rtl"] .expertise-rule { background: linear-gradient(270deg, var(--gold), color-mix(in srgb, var(--gold) 30%, transparent)); }
.expertise-card.green-accent .expertise-rule {
  background: linear-gradient(90deg, var(--green-2), color-mix(in srgb, var(--green) 24%, transparent));
}
[dir="rtl"] .expertise-card.green-accent .expertise-rule {
  background: linear-gradient(270deg, var(--green-2), color-mix(in srgb, var(--green) 24%, transparent));
}
.expertise-card:hover .expertise-rule { width: 110px; }
.expertise-card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 11px; }
.expertise-card li { position: relative; padding-inline-start: 18px; color: var(--muted); font-size: 13.5px; line-height: 1.95; }
.expertise-card li::before {
  content: ''; position: absolute; inset-inline-start: 0; top: .82em; width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 0 4px var(--gold-glow);
}
.expertise-card.green-accent li::before { background: var(--green-2); box-shadow: 0 0 0 4px var(--green-soft); }

.edu-list { border-top: 1px solid var(--line); }
.edu-card {
  position: relative; display: grid; grid-template-columns: 56px 1fr; gap: 18px; padding: 30px 0; border-bottom: 1px solid var(--line);
}
.edu-card > span {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--navy), var(--navy-3)); color: var(--gold-2); font-size: 12px; font-weight: 800;
}
.edu-card h3 { margin: 0 0 8px; font-size: 18px; }
.edu-card p { margin: 0; color: var(--muted); font-size: 13px; }

.volunteer-section { padding-top: 18px; }
.volunteer-card {
  background: linear-gradient(145deg, color-mix(in srgb, var(--surface) 92%, transparent), color-mix(in srgb, var(--gold-soft) 24%, var(--surface)));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 40px;
  display: grid; grid-template-columns: 70px 1fr; gap: 28px; align-items: start;
  box-shadow: var(--shadow);
}
.volunteer-icon {
  width: 62px; height: 62px; border-radius: 20px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--navy), var(--navy-3)); color: var(--gold-2);
  box-shadow: 0 12px 24px rgba(36,36,36,.16);
}
.volunteer-icon svg { width: 28px; height: 28px; }

.contact-section {
  position: relative; overflow: hidden; padding: 94px 0;
  background: linear-gradient(135deg, #1b1a18, #242321 52%, #312e29);
  color: #fff;
}
.contact-section::before,
.contact-section::after {
  content: ''; position: absolute; border-radius: 50%; pointer-events: none;
}
.contact-section::before {
  width: 420px; height: 420px; inset-inline-end: -150px; top: -160px;
  border: 1px solid rgba(255,255,255,.08);
}
.contact-section::after {
  width: 260px; height: 260px; inset-inline-start: -100px; bottom: -120px;
  background: radial-gradient(circle, rgba(215,177,91,.12), transparent 66%);
}
.contact-grid p { color: #c7c0b6; }
.contact-actions { display: grid; gap: 12px; }
.contact-actions a {
  padding: 18px 20px; border-radius: 18px; border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04); backdrop-filter: blur(8px);
  display: flex; flex-direction: column; gap: 5px;
}
.contact-actions a:hover { border-color: rgba(215,177,91,.55); box-shadow: 0 16px 32px rgba(0,0,0,.18); }
.contact-actions small { color: #aaa39a; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.contact-actions strong { font-size: 15px; }

.site-footer { background: #171614; color: #918a81; padding: 24px 0; font-size: 12px; }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.footer-row div { display: flex; align-items: center; gap: 10px; }
.footer-row a:hover { color: #fff; }
.separator { opacity: .45; }

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity .78s var(--ease),
    transform .78s var(--ease),
    filter .78s var(--ease);
  will-change: transform, opacity;
}
.reveal.in {
  opacity: 1;
  transform: none;
}
.reveal[data-anim="left"] { transform: translateX(-22px); }
.reveal[data-anim="right"] { transform: translateX(22px); }
.reveal[data-anim="scale"] { transform: scale(.96); }
.reveal.in[data-anim="left"],
.reveal.in[data-anim="right"],
.reveal.in[data-anim="scale"] { transform: none; }

@media (max-width: 980px) {
  :root { --shell: min(100% - 32px, 760px); }
  .desktop-nav { display: none; }
  .hero { min-height: auto; }
  .hero-grid,
  .two-col,
  .skill-layout,
  .education-layout,
  .contact-grid,
  .section-head { grid-template-columns: 1fr; }
  .hero-grid { gap: 56px; }
  .hero-copy { text-align: center; }
  .eyebrow,
  .hero-actions,
  .hero-meta { justify-content: center; }
  .hero-lead { margin-inline: auto; }
  .hero-visual { max-width: 450px; width: 100%; margin-inline: auto; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid > div:nth-child(3),
  .stats-grid > div:nth-child(4) { border-top: 1px solid var(--line); }
  .stats-grid > div:nth-child(3) { border-inline-start: 0; }
  .capability-grid { grid-template-columns: repeat(2, 1fr); }
  .expertise-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-head { gap: 18px; }
  .timeline-item { grid-template-columns: 150px 1fr; gap: 28px; }
}

@media (max-width: 620px) {
  :root { --shell: calc(100% - 28px); --radius: 22px; --radius-sm: 18px; }
  .nav-wrap { height: 74px; }
  .site-header { top: 0; }
  .brand-copy small,
  .nav-cta { display: none; }
  .brand-mark { width: 40px; height: 40px; }
  .header-actions { gap: 8px; }
  .icon-btn,
  .lang-btn { width: 38px; height: 38px; border-radius: 12px; }
  .section-pad { padding: 72px 0; }
  .hero { padding-top: 54px; }
  .hero-grid { gap: 40px; }
  .hero h1 { font-size: 50px; }
  .hero-title { font-size: 20px; }
  .hero-lead { font-size: 14px; }
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .hero-meta { gap: 12px; font-size: 12px; }
  .portrait-frame { max-width: 340px; }
  .portrait-frame::after { inset: 12px -10px -10px 12px; }
  .experience-card { inset-inline-start: 0; bottom: 18px; min-width: 150px; padding: 14px 14px 12px; }
  .experience-card b { font-size: 24px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid > div { min-height: 110px; padding: 20px 14px; }
  .stats-grid strong { font-size: 24px; }
  .capability-grid,
  .projects-grid,
  .expertise-grid { grid-template-columns: 1fr; }
  .expertise-intro { margin-bottom: 30px; }
  .expertise-card { min-height: 0; padding: 24px 22px; }
  .expertise-card h3 { font-size: 19px; }
  .timeline-item { grid-template-columns: 1fr; gap: 12px; padding: 28px 0; }
  .time { display: flex; align-items: baseline; gap: 10px; }
  .timeline-body h3 { font-size: 18px; }
  .section-intro h2,
  .section-head h2,
  .contact-grid h2,
  .volunteer-card h2 { font-size: 32px; }
  .volunteer-card { grid-template-columns: 1fr; padding: 28px; }
  .contact-section { padding: 76px 0; }
  .footer-row { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none !important; }
}

@media print {
  .site-header,
  .hero-actions,
  .contact-section,
  .site-footer,
  .experience-card { display: none !important; }
  body { background: #fff; color: #000; }
  .hero { min-height: auto; }
  .hero-grid { grid-template-columns: 1.15fr .55fr; }
  .section-pad { padding: 32px 0; }
  .surface { background: #fff; }
  .reveal { opacity: 1; transform: none; }
}

/* ===== V3 Executive Polish ===== */
:root {
  --gold: #b68a36;
  --gold-2: #e0bf73;
  --gold-deep: #8d6927;
  --gold-soft: #f1e6ca;
}

.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 1000;
  pointer-events: none;
  background: transparent;
}
.scroll-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-2));
  box-shadow: 0 0 18px rgba(224,191,115,.38);
}

.hero {
  position: relative;
  overflow: clip;
}
.hero::before {
  content: '';
  position: absolute;
  width: 520px;
  height: 520px;
  inset-inline-start: -260px;
  top: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(224,191,115,.09), transparent 67%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  width: 420px;
  height: 1px;
  inset-inline-start: 6vw;
  bottom: 72px;
  background: linear-gradient(90deg, transparent, rgba(182,138,54,.52), transparent);
  transform: rotate(-4deg);
  pointer-events: none;
}

.executive-strip {
  display: inline-flex;
  align-items: center;
  margin-top: 18px;
  padding: 8px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .025em;
  border-top: 1px solid color-mix(in srgb, var(--gold) 32%, var(--line));
}

.portrait-accent {
  position: absolute;
  z-index: 3;
  pointer-events: none;
}
.portrait-accent-a {
  width: 92px;
  height: 92px;
  inset-inline-end: -30px;
  top: 34px;
  border-top: 2px solid var(--gold-2);
  border-inline-end: 2px solid var(--gold-2);
  border-radius: 0 24px 0 0;
  opacity: .8;
}
.portrait-accent-b {
  width: 64px;
  height: 64px;
  inset-inline-start: -20px;
  bottom: 68px;
  border-bottom: 1px solid var(--gold);
  border-inline-start: 1px solid var(--gold);
  border-radius: 0 0 0 18px;
  opacity: .55;
}

.section-intro h2,
.section-head h2,
.contact-grid h2,
.volunteer-card h2,
.timeline-body h3,
.project-card h3,
.edu-card h3 {
  text-wrap: balance;
}

.section-kicker {
  letter-spacing: .11em;
}

.project-card.featured {
  box-shadow: inset 0 0 0 1px rgba(224,191,115,.08), 0 16px 34px rgba(20,19,18,.10);
}
.project-card.featured::after {
  border-color: rgba(224,191,115,.16);
}

.timeline-item {
  position: relative;
}
.timeline-item::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
  transition: width .7s var(--ease);
}
.timeline-item.in::before { width: min(240px, 36%); }

.contact-side { display: grid; gap: 18px; }
.qr-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.qr-card {
  display: grid;
  grid-template-columns: 68px 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.13);
  background: rgba(255,255,255,.045);
  transition: transform .28s var(--ease), border-color .28s var(--ease), background .28s var(--ease);
}
.qr-card:hover {
  transform: translateY(-4px);
  border-color: rgba(224,191,115,.54);
  background: rgba(255,255,255,.065);
}
.qr-card img {
  width: 68px;
  height: 68px;
  border-radius: 12px;
  padding: 4px;
  background: #fff;
}
.qr-card span { min-width: 0; display: grid; gap: 3px; }
.qr-card b { font-size: 12px; color: #fff; }
.qr-card small { font-size: 9px; color: #aaa39a; direction: ltr; text-align: start; overflow: hidden; text-overflow: ellipsis; }

.reveal[data-anim="left"] { transform: translate3d(-28px, 10px, 0); }
.reveal[data-anim="right"] { transform: translate3d(28px, 10px, 0); }
.reveal[data-anim="scale"] { transform: scale(.965) translateY(10px); }
.reveal.in[data-anim="left"],
.reveal.in[data-anim="right"],
.reveal.in[data-anim="scale"] { transform: none; }

@media (max-width: 620px) {
  .executive-strip { justify-content: center; width: 100%; line-height: 1.8; }
  .portrait-accent-a { inset-inline-end: -10px; top: 22px; }
  .portrait-accent-b { inset-inline-start: -8px; bottom: 58px; }
  .qr-grid { grid-template-columns: 1fr; }
  .qr-card { grid-template-columns: 58px 1fr; }
  .qr-card img { width: 58px; height: 58px; }
}


/* ===== V4 Charcoal & Gold / Font Controller ===== */
:root {
  --navy: #242424;
  --navy-2: #2f2d2a;
  --navy-3: #3a3631;
  --gold: #b7923f;
  --gold-2: #d2b46a;
  --gold-deep: #8c6a25;
  --gold-soft: #efe5cf;
  --gold-glow: rgba(183,146,63,.18);
  --bg: #f6f2e9;
  --surface: #ffffff;
  --surface-2: #f1ece3;
  --surface-3: #faf7f1;
  --text: #292725;
  --muted: #6e6a63;
  --line: rgba(36,36,36,.10);
  --line-strong: rgba(36,36,36,.18);
  --shadow: 0 18px 48px rgba(36,36,36,.08);
  --shadow-strong: 0 24px 60px rgba(36,36,36,.16);
  --font-main: 'Rokh';
}

:root[data-theme="dark"] {
  --bg: #171614;
  --surface: #201f1d;
  --surface-2: #292724;
  --surface-3: #34312d;
  --text: #f2eee7;
  --muted: #aaa39a;
  --line: rgba(255,255,255,.08);
  --line-strong: rgba(255,255,255,.14);
  --gold-soft: rgba(183,146,63,.13);
  --gold-glow: rgba(210,180,106,.15);
}

:root[data-font="iransans"] { --font-main: 'IRANSansX'; }
:root[data-font="rokh"] { --font-main: 'Rokh'; }
body { font-family: var(--font-main), system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }

body {
  background:
    radial-gradient(circle at top right, rgba(210,180,106,.10), transparent 28%),
    linear-gradient(180deg, rgba(36,36,36,.018), rgba(36,36,36,0) 18%),
    var(--bg);
}

.brand-mark,
.btn.primary,
.edu-card > span,
.volunteer-icon {
  background: linear-gradient(135deg, #242424, #3a3631);
}

.contact-section {
  background: linear-gradient(135deg, #191816, #242321 52%, #312e29);
}
.site-footer { background: #171614; }

.font-control { position: relative; }
.font-btn {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color .24s var(--ease), box-shadow .24s var(--ease), background .24s var(--ease);
}
.font-btn:hover,
.font-control.open .font-btn {
  border-color: color-mix(in srgb, var(--gold) 52%, var(--line));
  box-shadow: 0 10px 24px var(--gold-glow);
  background: color-mix(in srgb, var(--gold-soft) 34%, var(--surface));
}
.font-icon {
  font-family: Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -.03em;
}
.font-menu {
  position: absolute;
  top: calc(100% + 10px);
  inset-inline-end: 0;
  width: 180px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-strong);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(.98);
  transform-origin: top right;
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
  z-index: 80;
}
.font-control.open .font-menu {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.font-option {
  width: 100%;
  min-height: 42px;
  padding: 8px 11px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--text);
  text-align: start;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.font-option:hover { background: var(--surface-2); }
.font-option.active {
  background: color-mix(in srgb, var(--gold-soft) 56%, var(--surface));
  color: var(--gold-deep);
  font-weight: 700;
}
.font-option[data-font="iransans"] { font-family: 'IRANSansX', sans-serif; }
.font-option[data-font="rokh"] { font-family: 'Rokh', sans-serif; }

.current-project {
  border-color: color-mix(in srgb, var(--gold) 60%, rgba(255,255,255,.08)) !important;
  background:
    radial-gradient(circle at 100% 0%, rgba(210,180,106,.16), transparent 34%),
    linear-gradient(135deg, #242424, #36322d) !important;
}
.current-project .project-no { color: var(--gold-2); }
.current-project .tag { color: #f0e8d8; border-color: rgba(210,180,106,.28); }
.project-bottom {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.project-link {
  position: relative;
  z-index: 2;
  font-size: 11px;
  direction: ltr;
  color: var(--gold-2);
  border-bottom: 1px solid rgba(210,180,106,.30);
  padding-bottom: 2px;
  transition: color .2s ease, border-color .2s ease;
}
.project-link:hover { color: #fff; border-color: var(--gold-2); }

@media (max-width: 620px) {
  .font-btn { width: 38px; height: 38px; border-radius: 12px; }
  .font-menu { width: 164px; inset-inline-end: -48px; }
  .hero-visual { max-width: 290px; }
  .portrait-frame { width: min(260px, 72vw); max-width: 260px; }
  .portrait-frame::before { inset: -18px; }
  .portrait-frame::after { inset: 10px -8px -8px 10px; }
  .experience-card {
    min-width: 126px;
    padding: 11px 12px 10px;
    bottom: 14px;
    border-radius: 16px;
  }
  .experience-card b { font-size: 21px; }
  .experience-card span { font-size: 10px; }
  .portrait-accent-a { width: 68px; height: 68px; inset-inline-end: -8px; top: 18px; }
  .portrait-accent-b { width: 48px; height: 48px; inset-inline-start: -6px; bottom: 48px; }
  .project-bottom { align-items: flex-end; }
}

@media (max-width: 390px) {
  .portrait-frame { width: min(235px, 68vw); max-width: 235px; }
  .hero-grid { gap: 32px; }
  .experience-card { inset-inline-start: -4px; }
}

/* ===== V5 — dark-first, true gold, Persian readability, minimal font control ===== */
:root {
  --navy: #1d1d1d;
  --navy-2: #252525;
  --navy-3: #303030;
  --gold: #d4af37;
  --gold-2: #f0cf69;
  --gold-deep: #9b7418;
  --gold-soft: #f3e5ad;
  --gold-glow: rgba(212,175,55,.24);
  --bg: #f5f1e8;
  --surface: #fffdf8;
  --surface-2: #eee7d8;
  --surface-3: #faf6ed;
  --text: #282522;
  --muted: #706a61;
}

:root[data-theme="dark"] {
  --bg: #151515;
  --surface: #1e1e1e;
  --surface-2: #272727;
  --surface-3: #303030;
  --text: #f6f1e7;
  --muted: #b6aea1;
  --line: rgba(255,255,255,.085);
  --line-strong: rgba(212,175,55,.22);
  --gold: #d4af37;
  --gold-2: #f0cf69;
  --gold-deep: #b98d1f;
  --gold-soft: rgba(212,175,55,.14);
  --gold-glow: rgba(212,175,55,.22);
}

body:not(.lang-en) {
  word-spacing: .085em;
  letter-spacing: 0;
}
body:not(.lang-en) h1,
body:not(.lang-en) h2,
body:not(.lang-en) h3,
body:not(.lang-en) h4,
body:not(.lang-en) p,
body:not(.lang-en) a,
body:not(.lang-en) button,
body:not(.lang-en) span,
body:not(.lang-en) strong,
body:not(.lang-en) b {
  letter-spacing: 0;
}
.hero h1 { letter-spacing: 0; word-spacing: .1em; }
.hero-title { line-height: 1.95; word-spacing: .08em; }
.hero-lead,
.about-copy p,
.timeline-body p,
.project-card p,
.volunteer-card p,
.section-head p,
.section-intro p { line-height: 2.15; }

.scroll-progress span {
  background: linear-gradient(90deg, #aa7b12, var(--gold), var(--gold-2));
  box-shadow: 0 0 16px rgba(212,175,55,.46);
}

.brand-mark {
  background: #1b1b1b;
  color: var(--gold-2);
  border: 1px solid rgba(212,175,55,.48);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.035), 0 10px 24px rgba(0,0,0,.22);
}
.brand-copy small { letter-spacing: 0; }
body.lang-en .brand-copy small { letter-spacing: .16em; }

.dot { background: var(--gold); box-shadow: 0 0 0 5px rgba(212,175,55,.14); }
.hero-title strong,
.section-kicker,
.time b,
.project-no,
.experience-card b { color: var(--gold); }

.btn.primary {
  color: #17140b;
  background: linear-gradient(135deg, #c99c27, var(--gold) 52%, var(--gold-2));
  border-color: rgba(240,207,105,.55);
  box-shadow: 0 16px 34px rgba(212,175,55,.19);
}
.btn.primary:hover {
  box-shadow: 0 20px 42px rgba(212,175,55,.30);
  filter: saturate(1.08) brightness(1.04);
}
:root[data-theme="light"] .btn.primary { color: #211b0e; }

.portrait-frame::after { border-color: rgba(212,175,55,.62); }
.portrait-halo {
  background: radial-gradient(circle, rgba(212,175,55,.32), rgba(212,175,55,.09) 40%, transparent 72%);
}
.experience-card { border-color: rgba(212,175,55,.38); }

.stats-grid > div::before,
.capability-grid article::before,
.project-card::before,
.edu-card::before {
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* The font control is intentionally the same visual weight as the theme control. */
.font-btn {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: .28s var(--ease);
}
.font-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(212,175,55,.46);
  box-shadow: 0 12px 24px var(--gold-glow);
}
.font-number {
  font-family: var(--font-main), sans-serif;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  color: var(--gold-2);
  word-spacing: 0;
}
.lang-btn svg { width: 18px; height: 18px; }

/* Hide the legacy V4 menu styles because V5 uses a single 1/2 toggle button. */
.font-menu,
.font-option { display: none !important; }

.current-project {
  border-color: rgba(212,175,55,.52) !important;
  background:
    radial-gradient(circle at 100% 0%, rgba(212,175,55,.15), transparent 34%),
    linear-gradient(135deg, #1a1a1a, #292929) !important;
}
.current-project .tag { color: #f7eac1; border-color: rgba(212,175,55,.34); }

.project-link.project-cta {
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid rgba(212,175,55,.42);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  direction: rtl;
  color: #1c180e;
  background: linear-gradient(135deg, #c99c27, var(--gold));
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), filter .22s ease;
}
body.lang-en .project-link.project-cta { direction: ltr; }
.project-link.project-cta svg { width: 15px; height: 15px; }
.project-link.project-cta:hover {
  color: #17140b;
  transform: translateY(-2px);
  border-color: var(--gold-2);
  box-shadow: 0 10px 22px rgba(212,175,55,.20);
  filter: brightness(1.06);
}
.project-card.featured .project-link.project-cta { color: #17140b; }

.contact-section {
  background:
    radial-gradient(circle at 82% 10%, rgba(212,175,55,.11), transparent 26%),
    linear-gradient(135deg, #151515, #1c1c1c 52%, #272727);
}
.contact-actions a:hover { border-color: rgba(212,175,55,.56); }

@media (max-width: 620px) {
  .font-btn { width: 38px; height: 38px; border-radius: 12px; }
  .font-number { font-size: 13px; }
  .project-link.project-cta { min-height: 34px; padding: 7px 10px; }
}


/* ===== V6 — strict language isolation, mobile portrait sizing, Persian typography ===== */
/* Language visibility must win over component display rules such as .section-kicker and .role-label. */
body:not(.lang-en) .en { display: none !important; }
body.lang-en .fa { display: none !important; }
body.lang-en .en { display: revert !important; }
body.lang-en .section-kicker.en { display: inline-block !important; }
body.lang-en .role-label.en { display: block !important; }
body:not(.lang-en) .section-kicker.fa { display: inline-block; }
body:not(.lang-en) .role-label.fa { display: block; }

/* Keep Persian block elements as block elements; this prevents headings and paragraphs from running together. */
body:not(.lang-en) h1.fa,
body:not(.lang-en) h2.fa,
body:not(.lang-en) h3.fa,
body:not(.lang-en) h4.fa,
body:not(.lang-en) p.fa { display: block; }

/* More breathable Persian typesetting without artificially stretching the page. */
body:not(.lang-en) {
  word-spacing: .055em;
  letter-spacing: normal;
}
body:not(.lang-en) h1,
body:not(.lang-en) h2,
body:not(.lang-en) h3,
body:not(.lang-en) h4,
body:not(.lang-en) .hero-title {
  word-spacing: .075em;
  letter-spacing: normal;
}
body:not(.lang-en) .hero-lead,
body:not(.lang-en) .about-copy p,
body:not(.lang-en) .timeline-body p,
body:not(.lang-en) .project-card p,
body:not(.lang-en) .volunteer-card p,
body:not(.lang-en) .section-head p,
body:not(.lang-en) .section-intro p {
  line-height: 2.2;
}
.timeline-body h3 { margin-bottom: 13px; }
.timeline-body p { margin-top: 0; }

@media (max-width: 620px) {
  .hero-visual {
    width: 100%;
    max-width: 230px;
    margin-inline: auto;
  }
  .portrait-frame {
    width: min(210px, 52vw);
    max-width: 210px;
    margin-inline: auto;
  }
  .portrait-frame img {
    width: 210px;
    height: 280px;
    max-width: 100%;
    aspect-ratio: auto;
    object-fit: cover;
    object-position: center 22%;
  }
  .portrait-frame::before { inset: -12px; }
  .portrait-frame::after { inset: 8px -7px -7px 8px; }
  .portrait-halo { width: 66%; inset-inline-start: -5%; }
  .experience-card {
    min-width: 112px;
    max-width: 126px;
    padding: 9px 10px 8px;
    bottom: 10px;
    border-radius: 14px;
  }
  .experience-card b { font-size: 19px; }
  .experience-card span { font-size: 9px; line-height: 1.65; }
  .portrait-accent-a { width: 54px; height: 54px; inset-inline-end: -4px; top: 14px; }
  .portrait-accent-b { width: 38px; height: 38px; inset-inline-start: -3px; bottom: 38px; }
  .hero-grid { gap: 34px; }
  .timeline-body h3 { line-height: 1.85; }
  .timeline-body p { line-height: 2.15; }
}

@media (max-width: 390px) {
  .hero-visual { max-width: 205px; }
  .portrait-frame { width: min(185px, 50vw); max-width: 185px; }
  .portrait-frame img { width: 185px; height: 247px; }
  .experience-card { min-width: 104px; max-width: 112px; inset-inline-start: -3px; }
}

/* ===== V8 — English typography, semantic font menu, number cleanup, AI ===== */
body.lang-en {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  word-spacing: normal;
  letter-spacing: 0;
}
body.lang-en h1,
body.lang-en h2,
body.lang-en h3,
body.lang-en h4,
body.lang-en .brand-copy,
body.lang-en .btn,
body.lang-en .eyebrow,
body.lang-en .section-kicker,
body.lang-en .stats-grid strong,
body.lang-en .experience-card b,
body.lang-en .time,
body.lang-en .year,
body.lang-en .tag {
  font-family: 'Manrope', 'Inter', system-ui, sans-serif;
}
body.lang-en h1,
body.lang-en h2,
body.lang-en h3 { letter-spacing: -.025em; }
body.lang-en .brand-copy small,
body.lang-en .section-kicker { letter-spacing: .12em; }
body.lang-en .font-control { display: none; }

/* The Persian font selector is a minimal typography control, not a 1/2 switch. */
.font-control { position: relative; }
.font-btn .font-icon {
  font-family: 'IRANSansX', 'Rokh', sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  color: var(--gold-2);
}
.font-control.open .font-btn {
  border-color: color-mix(in srgb, var(--gold) 55%, var(--line));
  background: color-mix(in srgb, var(--gold-soft) 22%, var(--surface));
  box-shadow: 0 10px 26px var(--gold-glow);
}
.font-menu {
  display: grid;
  gap: 4px;
  width: 178px;
  padding: 7px;
}
.font-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 9px 11px;
}
.font-option-label { white-space: nowrap; }
.font-check {
  width: 16px;
  height: 16px;
  color: var(--gold);
  opacity: 0;
  transform: scale(.8);
  transition: opacity .18s ease, transform .18s ease;
}
.font-option.active .font-check { opacity: 1; transform: scale(1); }

/* Ordinal numbers removed: hierarchy now comes from tag, title, year and spacing. */
.capability-grid h3 { margin-top: 0; }
.project-top { justify-content: flex-start; min-height: 28px; }
.project-card h3 { margin-top: 34px; }
.current-project .project-no { display: none; }

.edu-card {
  grid-template-columns: 1fr;
  gap: 0;
  padding: 30px 4px;
}
.edu-card > div { min-width: 0; }
.edu-card h3 { margin-top: 0; }

/* Keep the expanded AI item visually balanced in the technology card. */
.expertise-card li { max-width: 96%; }

@media (max-width: 620px) {
  .font-menu { inset-inline-end: -34px; width: 170px; }
  .project-card h3 { margin-top: 30px; }
  .edu-card { padding: 26px 2px; }
}

/* V9 — Mobile contact and messenger links in footer */
.footer-row-v9 {
  display: grid;
  grid-template-columns: minmax(170px, .85fr) auto minmax(260px, 1.15fr);
  align-items: center;
  gap: 22px;
}
.footer-identity { white-space: nowrap; }
.footer-mobile-contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 6px 8px 6px 12px;
  border: 1px solid rgba(212,175,55,.18);
  border-radius: 18px;
  background: rgba(255,255,255,.025);
}
.footer-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #c6beb4;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.footer-phone svg {
  width: 17px;
  height: 17px;
  color: var(--gold);
}
.footer-phone:hover { color: #fff; }
.footer-socials {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-inline-start: 9px;
  border-inline-start: 1px solid rgba(255,255,255,.08);
}
.social-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  border: 1px solid rgba(255,255,255,.09);
  background: rgba(255,255,255,.035);
  color: #b6aea4;
  transition: transform .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease);
}
.social-icon svg { width: 18px; height: 18px; }
.social-icon.whatsapp svg,
.social-icon.telegram svg { fill: currentColor; stroke: none; }
.social-icon.bale svg { fill: none; stroke: currentColor; stroke-width: 1.55; }
.social-icon:hover,
.social-icon:focus-visible {
  transform: translateY(-2px);
  color: var(--gold);
  border-color: rgba(212,175,55,.5);
  background: rgba(212,175,55,.08);
  box-shadow: 0 10px 24px rgba(212,175,55,.10);
}
.footer-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 980px) {
  .footer-row-v9 {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .footer-links { justify-content: center; }
}

@media (max-width: 520px) {
  .footer-mobile-contact {
    width: 100%;
    max-width: 360px;
    justify-content: space-between;
    padding: 7px 8px 7px 12px;
  }
  .footer-phone { font-size: 11px; }
  .social-icon { width: 32px; height: 32px; border-radius: 10px; }
  .social-icon svg { width: 17px; height: 17px; }
  .footer-links { font-size: 11px; row-gap: 7px; }
}

/* V10 — unified footer contact cluster */
.footer-row-v9 {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
}
.footer-contact-cluster {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}
.footer-contact-item {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 13px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.035);
  color: #b7c0cc;
  transition: transform .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease), background .25s var(--ease);
}
.footer-contact-item svg {
  width: 17px;
  height: 17px;
  color: var(--gold);
  flex: 0 0 auto;
}
.footer-contact-item span {
  font-size: 11px;
  white-space: nowrap;
}
.footer-contact-item:hover {
  color: #fff;
  transform: translateY(-2px);
  border-color: rgba(212,175,55,.42);
  background: rgba(212,175,55,.06);
}
.footer-socials {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.035);
  color: #b7c0cc;
  transition: transform .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease), background .25s var(--ease);
}
.social-icon svg { width: 19px; height: 19px; }
.social-icon:hover {
  color: var(--gold-2);
  transform: translateY(-2px);
  border-color: rgba(212,175,55,.42);
  background: rgba(212,175,55,.06);
}

@media (max-width: 1060px) {
  .footer-row-v9 {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .footer-contact-cluster { order: 2; }
  .footer-links { order: 3; justify-content: center; }
}

@media (max-width: 620px) {
  .footer-contact-cluster {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .footer-contact-item {
    width: 100%;
    justify-content: center;
    min-width: 0;
  }
  .footer-email span {
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .footer-socials {
    grid-column: 1 / -1;
    justify-content: center;
    padding-top: 2px;
  }
}

/* ===== V10 print/PDF profile export ===== */
@media print {
  @page {
    size: A4;
    margin: 10mm 11mm 12mm;
  }

  html,
  html[data-theme="dark"],
  html[data-theme="light"] {
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-2: #f7f3ea;
    --surface-3: #fbf9f5;
    --text: #242424;
    --muted: #665f55;
    --line: rgba(36, 36, 36, .13);
    --line-strong: rgba(36, 36, 36, .20);
    --gold: #b88a22;
    --gold-2: #d4af37;
    --gold-deep: #8d6815;
    --green: #d4af37;
    --green-2: #416454;
    color-scheme: light;
    background: #fff !important;
  }

  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  html { scroll-behavior: auto !important; }
  body {
    background: #fff !important;
    color: var(--text) !important;
    font-family: 'IRANSansX', 'Rokh', sans-serif !important;
    font-size: 10pt;
    word-spacing: .035em;
  }

  .site-header,
  .scroll-progress,
  .skip-link,
  .hero-actions,
  .font-menu,
  .footer-links,
  .qr-card:nth-child(2) {
    display: none !important;
  }

  .shell {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
  }

  .section-pad {
    padding: 10mm 0 !important;
  }

  .hero {
    min-height: 0 !important;
    padding: 4mm 0 9mm !important;
    overflow: visible !important;
    background: #fff !important;
  }
  .hero::before,
  .hero::after,
  .portrait-accent,
  .portrait-halo { display: none !important; }

  .hero-grid {
    grid-template-columns: 1.2fr .54fr !important;
    gap: 10mm !important;
    align-items: center !important;
  }
  .hero-copy { text-align: right !important; }
  .hero h1 {
    font-size: 29pt !important;
    line-height: 1.2 !important;
    margin: 3mm 0 2mm !important;
  }
  .hero-title {
    font-size: 13pt !important;
    line-height: 1.65 !important;
    margin-bottom: 3mm !important;
  }
  .hero-lead {
    font-size: 9.4pt !important;
    line-height: 1.9 !important;
    color: #514b43 !important;
  }
  .eyebrow {
    padding: 1.8mm 3mm !important;
    font-size: 8pt !important;
    background: #faf7f0 !important;
  }
  .executive-strip {
    margin-top: 4mm !important;
    padding-top: 2mm !important;
    font-size: 7.7pt !important;
  }
  .hero-meta {
    margin-top: 4mm !important;
    font-size: 8pt !important;
    gap: 2mm 5mm !important;
  }
  .portrait-frame {
    max-width: 48mm !important;
    margin-inline: auto !important;
  }
  .portrait-frame::before,
  .portrait-frame::after { display: none !important; }
  .portrait-frame img {
    box-shadow: none !important;
    border-radius: 5mm !important;
    border: .35mm solid rgba(184,138,34,.55) !important;
  }
  .experience-card {
    display: block !important;
    inset-inline-start: -6mm !important;
    bottom: 5mm !important;
    min-width: 28mm !important;
    padding: 2.5mm 3mm !important;
    border-radius: 3mm !important;
    background: rgba(255,255,255,.94) !important;
    box-shadow: 0 2mm 5mm rgba(36,36,36,.08) !important;
  }
  .experience-card b { font-size: 17pt !important; }
  .experience-card span { font-size: 7pt !important; color: #333 !important; }

  .stats-bar { padding: 0 0 7mm !important; }
  .stats-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    border-radius: 4mm !important;
    box-shadow: none !important;
  }
  .stats-grid > div {
    min-height: 26mm !important;
    padding: 4mm !important;
  }
  .stats-grid strong { font-size: 18pt !important; color: #242424 !important; }
  .stats-grid span { font-size: 7.4pt !important; line-height: 1.55 !important; }

  .surface {
    background: #fff !important;
    border-block: .25mm solid var(--line) !important;
  }

  .two-col,
  .skill-layout,
  .education-layout,
  .contact-grid,
  .section-head {
    gap: 8mm !important;
  }
  .two-col { grid-template-columns: .78fr 1.22fr !important; }
  .skill-layout { grid-template-columns: .55fr 1.45fr !important; }
  .education-layout { grid-template-columns: .62fr 1.38fr !important; }
  .section-head { grid-template-columns: 1fr .72fr !important; margin-bottom: 7mm !important; }

  .section-kicker { font-size: 7.5pt !important; }
  .section-intro h2,
  .section-head h2,
  .contact-grid h2,
  .volunteer-card h2 {
    font-size: 19pt !important;
    line-height: 1.4 !important;
  }
  .about-copy p,
  .section-head p,
  .section-intro p,
  .volunteer-card p,
  .contact-grid p {
    font-size: 8.5pt !important;
    line-height: 1.9 !important;
  }

  .capability-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 3mm !important;
    margin-top: 7mm !important;
  }
  .capability-grid article {
    padding: 4mm !important;
    border-radius: 4mm !important;
    box-shadow: none !important;
    background: #fbf9f5 !important;
    break-inside: avoid;
  }
  .capability-grid h3 { font-size: 10pt !important; margin: 0 0 2mm !important; }
  .capability-grid p { font-size: 7.3pt !important; line-height: 1.65 !important; }

  .timeline-item {
    grid-template-columns: 31mm 1fr !important;
    gap: 6mm !important;
    padding: 5mm 0 !important;
    break-inside: avoid;
  }
  .time b { font-size: 8.6pt !important; }
  .time span { font-size: 7pt !important; }
  .role-label { font-size: 7.2pt !important; }
  .timeline-body h3 { font-size: 12pt !important; margin: 1mm 0 2mm !important; }
  .timeline-body p { font-size: 8.2pt !important; line-height: 1.8 !important; }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 4mm !important;
  }
  .project-card {
    min-height: 0 !important;
    padding: 5mm !important;
    border-radius: 4.5mm !important;
    box-shadow: none !important;
    break-inside: avoid;
  }
  .project-card.featured {
    background: #2c2925 !important;
    color: #fff !important;
  }
  .project-card h3 { font-size: 11pt !important; line-height: 1.65 !important; margin: 6mm 0 2mm !important; }
  .project-card p { font-size: 7.7pt !important; line-height: 1.75 !important; margin-bottom: 3mm !important; }
  .tag, .year { font-size: 6.8pt !important; }
  .project-cta { font-size: 7pt !important; padding: 1.7mm 3mm !important; }

  .expertise-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 4mm !important;
  }
  .expertise-card {
    padding: 5mm !important;
    border-radius: 4mm !important;
    break-inside: avoid;
    box-shadow: none !important;
  }
  .expertise-card h3 { font-size: 11pt !important; }
  .expertise-card li { font-size: 7.8pt !important; line-height: 1.7 !important; }

  .edu-card {
    grid-template-columns: 1fr !important;
    padding: 5mm 0 !important;
    break-inside: avoid;
  }
  .edu-card h3 { font-size: 11pt !important; }
  .edu-card p { font-size: 7.8pt !important; }

  .volunteer-section { padding-top: 3mm !important; }
  .volunteer-card {
    grid-template-columns: 14mm 1fr !important;
    gap: 5mm !important;
    padding: 6mm !important;
    border-radius: 4mm !important;
    box-shadow: none !important;
    break-inside: avoid;
  }
  .volunteer-icon { width: 12mm !important; height: 12mm !important; border-radius: 3mm !important; }

  .contact-section {
    display: block !important;
    background: #f7f3ea !important;
    color: #242424 !important;
    padding: 8mm 0 !important;
    border-top: .3mm solid rgba(184,138,34,.38) !important;
    break-inside: avoid;
  }
  .contact-section::before,
  .contact-section::after { display: none !important; }
  .contact-grid {
    grid-template-columns: 1.2fr .8fr !important;
    align-items: center !important;
  }
  .contact-grid h2 { font-size: 17pt !important; }
  .contact-grid p { color: #665f55 !important; }
  .qr-grid { grid-template-columns: 1fr !important; gap: 3mm !important; }
  .qr-card {
    padding: 3mm !important;
    border: .25mm solid var(--line) !important;
    background: #fff !important;
    color: #242424 !important;
    border-radius: 3mm !important;
  }
  .qr-card img { width: 24mm !important; height: 24mm !important; }
  .qr-card b { font-size: 8.5pt !important; }
  .qr-card small { font-size: 6.7pt !important; }

  .site-footer {
    display: block !important;
    background: #242424 !important;
    color: #fff !important;
    padding: 5mm 0 !important;
    break-inside: avoid;
  }
  .footer-row-v9 {
    display: grid !important;
    grid-template-columns: auto 1fr !important;
    align-items: center !important;
    gap: 5mm !important;
  }
  .footer-identity { font-size: 7pt !important; color: #bdb7af !important; }
  .footer-contact-cluster {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    flex-wrap: wrap !important;
    gap: 2mm 3mm !important;
  }
  .footer-contact-item {
    color: #fff !important;
    font-size: 7.4pt !important;
    padding: 1.6mm 2.3mm !important;
    border: .2mm solid rgba(255,255,255,.15) !important;
    border-radius: 2mm !important;
  }
  .footer-contact-item svg { width: 3.4mm !important; height: 3.4mm !important; color: var(--gold-2) !important; }
  .footer-socials { display: flex !important; gap: 1.8mm !important; }
  .social-icon {
    width: 7mm !important;
    height: 7mm !important;
    border-radius: 2mm !important;
    border: .2mm solid rgba(255,255,255,.15) !important;
    color: var(--gold-2) !important;
  }
  .social-icon svg { width: 4mm !important; height: 4mm !important; }

  .reveal,
  .reveal[data-anim="left"],
  .reveal[data-anim="right"],
  .reveal[data-anim="scale"] {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }

  a { text-decoration: none !important; }
}

/* ===== V11 — robust Persian font switching ===== */
html[data-font="iransans"] body:not(.lang-en),
html[data-font="iransans"] body:not(.lang-en) input,
html[data-font="iransans"] body:not(.lang-en) textarea,
html[data-font="iransans"] body:not(.lang-en) select,
html[data-font="iransans"] body:not(.lang-en) button {
  font-family: 'IRANSansX', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}
html[data-font="rokh"] body:not(.lang-en),
html[data-font="rokh"] body:not(.lang-en) input,
html[data-font="rokh"] body:not(.lang-en) textarea,
html[data-font="rokh"] body:not(.lang-en) select,
html[data-font="rokh"] body:not(.lang-en) button {
  font-family: 'Rokh', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}
html[data-font="iransans"] body:not(.lang-en) .fa,
html[data-font="iransans"] body:not(.lang-en) .brand-copy,
html[data-font="iransans"] body:not(.lang-en) .hero-title,
html[data-font="iransans"] body:not(.lang-en) .hero-lead,
html[data-font="iransans"] body:not(.lang-en) .section-kicker,
html[data-font="iransans"] body:not(.lang-en) .project-card,
html[data-font="iransans"] body:not(.lang-en) .timeline,
html[data-font="iransans"] body:not(.lang-en) .expertise-card,
html[data-font="iransans"] body:not(.lang-en) .edu-card {
  font-family: 'IRANSansX', system-ui, sans-serif !important;
}
html[data-font="rokh"] body:not(.lang-en) .fa,
html[data-font="rokh"] body:not(.lang-en) .brand-copy,
html[data-font="rokh"] body:not(.lang-en) .hero-title,
html[data-font="rokh"] body:not(.lang-en) .hero-lead,
html[data-font="rokh"] body:not(.lang-en) .section-kicker,
html[data-font="rokh"] body:not(.lang-en) .project-card,
html[data-font="rokh"] body:not(.lang-en) .timeline,
html[data-font="rokh"] body:not(.lang-en) .expertise-card,
html[data-font="rokh"] body:not(.lang-en) .edu-card {
  font-family: 'Rokh', system-ui, sans-serif !important;
}
.font-option[data-font="iransans"] .font-option-label { font-family: 'IRANSansX', sans-serif !important; }
.font-option[data-font="rokh"] .font-option-label { font-family: 'Rokh', sans-serif !important; }

/* ===== V12 — desktop proportion & readability polish ===== */
@media screen and (min-width: 981px) {
  /* Hero is intentionally reduced to roughly half of the previous desktop footprint. */
  .hero {
    min-height: 52vh;
    padding-block: 54px !important;
  }
  .hero-grid {
    grid-template-columns: 1.28fr .72fr;
    gap: 42px;
  }
  .hero h1 {
    font-size: clamp(42px, 4.4vw, 58px);
    margin: 14px 0 8px;
  }
  .hero-title {
    font-size: clamp(18px, 1.55vw, 21px);
    line-height: 1.72;
    margin-bottom: 12px;
  }
  .hero-lead {
    max-width: 680px;
    font-size: 15px;
    line-height: 1.95;
  }
  .hero-actions { margin-top: 22px; }
  .hero-meta { margin-top: 18px; }
  .executive-strip { margin-top: 12px; }

  .hero-visual { max-width: 300px; justify-self: center; width: 100%; }
  .portrait-frame { max-width: 260px; }
  .portrait-frame::before { inset: -14px; }
  .portrait-frame::after { inset: 10px -10px -10px 10px; }
  .portrait-halo { width: 64%; inset-inline-start: -4%; filter: blur(12px); }
  .portrait-accent-a { transform: scale(.72); transform-origin: top right; }
  .portrait-accent-b { transform: scale(.72); transform-origin: bottom left; }
  .experience-card {
    inset-inline-start: -22px;
    bottom: 16px;
    min-width: 126px;
    padding: 12px 13px 11px;
    border-radius: 15px;
  }
  .experience-card b { font-size: 22px; margin-bottom: 4px; }
  .experience-card span { font-size: 10.5px; line-height: 1.65; }

  .hero::before {
    width: 320px;
    height: 320px;
    inset-inline-start: -170px;
    top: 38px;
  }
  .hero::after { bottom: 36px; width: 300px; }

  /* Slightly denser stat strip after the reduced hero. */
  .stats-grid > div { min-height: 118px; padding: 22px 24px; }
  .stats-grid strong { font-size: 30px; }

  /* Improve desktop text readability and use the available width. */
  .two-col { grid-template-columns: .78fr 1.22fr; gap: 62px; }
  .about-copy p { font-size: 16px; line-height: 2.2; margin-bottom: 20px; }
  .capability-grid { gap: 18px; }
  .capability-grid article { padding: 30px 25px; }
  .capability-grid h3 { font-size: 18px; }
  .capability-grid p { font-size: 14px; line-height: 2; }

  /* Give experience descriptions more horizontal room. */
  .timeline-item {
    grid-template-columns: 128px minmax(0, 1fr);
    gap: 34px;
    padding: 34px 0;
  }
  .timeline-body p {
    max-width: 980px;
    font-size: 14.5px;
    line-height: 2.05;
  }
  .timeline-body h3 { font-size: 22px; line-height: 1.6; }

  /* Open the project cards slightly for easier desktop scanning. */
  .projects-grid { gap: 20px; }
  .project-card { padding: 32px; }
  .project-card h3 { font-size: 22px; line-height: 1.72; }
  .project-card p { font-size: 14px; line-height: 2.05; max-width: 94%; }

  /* Compact closing area without losing hierarchy. */
  .contact-section { padding: 72px 0; }
  .site-footer { padding: 18px 0; }
}

/* Faster, more responsive scroll reveals. */
.reveal {
  transition-duration: .64s;
}

/* ===== V13 — panoramic desktop hero, working font selector, denser page ===== */

/* Restore the menu that an older V5 compatibility rule hid with !important. */
.font-menu {
  display: grid !important;
  pointer-events: none;
}
.font-option {
  display: flex !important;
}
.font-control.open .font-menu {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  pointer-events: auto;
}
.font-control:not(.open) .font-menu {
  pointer-events: none;
}

/* Reduce vertical footprint across the whole page by roughly 20%. */
.section-pad { padding-block: 86px; }
.section-head { margin-bottom: 40px; }
.capability-grid { margin-top: 42px; }
.timeline-item { padding-block: 27px; }
.project-card { min-height: 250px; }
.volunteer-card { padding: 32px; }
.contact-section { padding-block: 58px; }
.stats-grid > div { min-height: 96px; padding-block: 18px; }
.edu-card { padding-block: 24px; }

@media screen and (min-width: 981px) {
  /* Wide, shallow portrait treatment requested for desktop. */
  .hero {
    min-height: auto;
    padding-block: 28px !important;
  }
  .hero-grid {
    grid-template-columns: minmax(0, 1.06fr) minmax(520px, .94fr);
    gap: 34px;
    align-items: center;
  }
  .hero-visual {
    width: 100%;
    max-width: 600px;
    justify-self: end;
  }
  .portrait-frame {
    width: 100%;
    max-width: 520px; /* ~2× V12's 260px */
    margin-inline: auto;
  }
  .portrait-frame img {
    width: 100%;
    height: 150px; /* ~60% less than the previous portrait height */
    aspect-ratio: auto;
    object-fit: cover;
    object-position: center 42%;
    border-radius: 22px;
  }
  .portrait-frame::before { inset: -10px; border-radius: 30px; }
  .portrait-frame::after { inset: 7px -8px -8px 7px; border-radius: 25px; }
  .portrait-halo {
    width: 72%;
    height: 130px;
    aspect-ratio: auto;
    top: -16px;
    inset-inline-start: 5%;
    filter: blur(10px);
  }
  .portrait-accent-a,
  .portrait-accent-b { transform: scale(.58); }
  .experience-card {
    inset-inline-start: 18px;
    bottom: 12px;
    min-width: 116px;
    padding: 9px 11px 8px;
    border-radius: 13px;
  }
  .experience-card b { font-size: 20px; }
  .experience-card span { font-size: 9.5px; line-height: 1.55; }

  /* Keep the shorter hero visually balanced. */
  .hero h1 { margin-block: 10px 6px; }
  .hero-title { margin-bottom: 9px; line-height: 1.62; }
  .hero-lead { line-height: 1.8; }
  .hero-actions { margin-top: 16px; }
  .hero-meta { margin-top: 13px; }
  .executive-strip { margin-top: 8px; }

  /* Global desktop density target: about 20% shorter than V12. */
  .section-pad { padding-block: 72px; }
  .two-col { gap: 50px; }
  .about-copy p { margin-bottom: 15px; line-height: 2.02; }
  .capability-grid article { padding: 24px 22px; }
  .timeline-item { padding-block: 26px; }
  .projects-grid { gap: 16px; }
  .project-card { padding: 26px; min-height: 242px; }
  .project-card h3 { margin-top: 27px; }
  .project-card p { line-height: 1.88; }
  .expertise-grid { gap: 16px; }
  .expertise-card { padding: 24px; }
  .contact-section { padding-block: 56px; }
  .site-footer { padding-block: 14px; }
}

@media screen and (max-width: 980px) {
  /* Preserve the improved mobile portrait proportions while reducing page length. */
  .section-pad { padding-block: 58px; }
  .section-head { margin-bottom: 32px; }
  .capability-grid { margin-top: 32px; }
  .timeline-item { padding-block: 23px; }
  .project-card { min-height: 230px; }
  .volunteer-card { padding: 24px; }
  .contact-section { padding-block: 60px; }
}

/* ===== V14 — themed portraits, favicon logo, tighter layout ===== */
.brand-mark {
  padding: 0;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
  border: 1px solid rgba(212,175,55,.34);
}
.brand-logo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 14px;
}

/* keep the hero visual wide, but restore enough height for a proper portrait crop */
.hero-grid {
  grid-template-columns: .96fr 1.04fr;
  gap: 36px;
}
.hero-copy { align-self: center; }
.hero-visual { display: flex; justify-content: center; }
.portrait-frame {
  width: min(560px, 100%);
  max-width: 560px;
}
.portrait-frame img {
  width: 100%;
  height: 272px;
  object-fit: cover;
  object-position: center 16%;
  border-radius: 24px;
}
.experience-card {
  min-width: 154px;
  padding: 18px 18px 15px;
}

/* slightly taller summary stats bar under hero */
.stats-grid > div {
  min-height: 110px;
  padding-top: 20px;
  padding-bottom: 20px;
}

/* reduce overall empty space by roughly another 20% */
.section-pad { padding-block: 68px; }
.hero.section-pad { padding-block: 52px 34px; }
.hero-title { margin-bottom: 14px; }
.hero-lead { max-width: 680px; }
.hero-actions { margin-top: 22px; }
.hero-meta { margin-top: 18px; }
.stats-bar { padding-top: 12px; }
.two-col { gap: 42px; }
.skill-layout { gap: 48px; }
.education-layout { gap: 54px; }
.contact-grid { gap: 44px; }
.section-head { margin-bottom: 32px; gap: 26px; }
.timeline-item { padding-block: 22px; }
.project-card { min-height: 214px; padding: 24px; }
.project-card h3 { margin-top: 24px; font-size: 20px; }
.project-card p { margin-bottom: 16px; line-height: 1.88; }
.expertise-card { padding: 24px 22px; }
.edu-card { padding: 22px 2px; }
.volunteer-card { padding: 28px; }
.contact-section { padding-block: 50px; }
.site-footer { padding-block: 16px; }

/* light mode: featured projects become gold-gradient cards, without featured wording */
:root[data-theme="light"] .current-project {
  color: #2c2412 !important;
  border-color: rgba(212,175,55,.55) !important;
  background:
    radial-gradient(circle at 15% 12%, rgba(255,255,255,.46), transparent 24%),
    linear-gradient(135deg, #fff1be 0%, #f2d26c 44%, #d4af37 100%) !important;
  box-shadow: 0 18px 34px rgba(212,175,55,.18);
}
:root[data-theme="light"] .current-project h3,
:root[data-theme="light"] .current-project p,
:root[data-theme="light"] .current-project .year,
:root[data-theme="light"] .current-project .tag {
  color: #2c2412 !important;
}
:root[data-theme="light"] .current-project .tag {
  background: rgba(255,255,255,.34);
  border-color: rgba(60,46,14,.18);
}
:root[data-theme="light"] .current-project .project-link.project-cta {
  color: #2c2412;
  border-color: rgba(60,46,14,.22);
  background: rgba(255,255,255,.38);
}

@media (min-width: 981px) {
  .stats-grid > div { min-height: 112px; }
}

@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 38px;
  }
  .section-pad { padding-block: 60px; }
  .two-col, .skill-layout, .education-layout, .contact-grid { gap: 32px; }
}

@media (max-width: 620px) {
  .section-pad { padding-block: 54px; }
  .hero.section-pad { padding-block: 40px 24px; }
  .project-card { min-height: 208px; padding: 22px; }
  .project-card h3 { margin-top: 22px; }
  .stats-grid > div { min-height: 108px; }
}

/* ===== V15 — portrait contain, tighter section rhythm, light gold project cards ===== */

/* Hero portrait: preserve the whole portrait instead of aggressive cropping. */
.portrait-frame {
  width: min(560px, 100%);
  max-width: 560px;
  min-height: 272px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(212,175,55,.10), rgba(255,255,255,.02));
}
.portrait-frame img {
  width: 100%;
  height: 272px;
  object-fit: contain;
  object-position: center;
  border-radius: 24px;
  background: transparent;
}
:root[data-theme="dark"] .portrait-frame {
  background: radial-gradient(circle at 50% 42%, rgba(212,175,55,.10), transparent 45%), #242424;
}
:root[data-theme="light"] .portrait-frame {
  background: radial-gradient(circle at 50% 42%, rgba(212,175,55,.18), transparent 48%), #f6e8bb;
}

/* Tighten the vertical rhythm throughout the page. */
.section-pad { padding-block: 58px; }
.hero.section-pad { padding-block: 44px 24px; }
.stats-bar { padding-top: 8px; }
.section-head { margin-bottom: 26px; }
.capability-grid { margin-top: 34px; }
.volunteer-section { padding-top: 0; }
.education-layout { gap: 42px; }
.edu-list { margin-bottom: 0; }
.volunteer-card { margin-top: 18px; }
#education.section-pad { padding-bottom: 34px; }
.contact-section { padding-block: 46px; }

/* All selected-project cards receive a very light gold gradient. */
.projects-grid .project-card {
  background:
    radial-gradient(circle at 12% 8%, rgba(255,255,255,.72), transparent 26%),
    linear-gradient(145deg, #fffdf7 0%, #fff8df 48%, #f6e7ad 100%);
  border-color: rgba(212,175,55,.26);
  box-shadow: 0 14px 30px rgba(132,101,27,.07);
}
.projects-grid .project-card::after {
  border-color: rgba(212,175,55,.16);
}
.projects-grid .project-card h3 { color: #2f2a20; }
.projects-grid .project-card p,
.projects-grid .project-card .year { color: #6d6555; }
.projects-grid .project-card .tag {
  color: #7d6722;
  border-color: rgba(212,175,55,.30);
  background: rgba(255,255,255,.42);
}
.projects-grid .project-card:hover {
  border-color: rgba(212,175,55,.48);
  box-shadow: 0 22px 42px rgba(132,101,27,.13);
}

/* In dark mode keep readability, but retain a subtle gold tint. */
:root[data-theme="dark"] .projects-grid .project-card {
  background:
    radial-gradient(circle at 12% 8%, rgba(212,175,55,.10), transparent 28%),
    linear-gradient(145deg, #1b1b1b 0%, #22201b 55%, #2a2518 100%);
  border-color: rgba(212,175,55,.22);
}
:root[data-theme="dark"] .projects-grid .project-card h3 { color: #f3efe7; }
:root[data-theme="dark"] .projects-grid .project-card p,
:root[data-theme="dark"] .projects-grid .project-card .year { color: #cfc7b8; }
:root[data-theme="dark"] .projects-grid .project-card .tag {
  color: #e8d28b;
  border-color: rgba(212,175,55,.28);
  background: rgba(212,175,55,.06);
}

/* Featured/current projects remain slightly more pronounced in light mode. */
:root[data-theme="light"] .projects-grid .current-project {
  background:
    radial-gradient(circle at 10% 8%, rgba(255,255,255,.76), transparent 24%),
    linear-gradient(145deg, #fff9df 0%, #f7df8c 54%, #e6c04e 100%) !important;
  border-color: rgba(212,175,55,.45) !important;
}

@media (max-width: 980px) {
  .section-pad { padding-block: 52px; }
  #education.section-pad { padding-bottom: 28px; }
  .volunteer-card { margin-top: 14px; }
}

@media (max-width: 620px) {
  .section-pad { padding-block: 48px; }
  .hero.section-pad { padding-block: 36px 20px; }
  .portrait-frame {
    min-height: 0;
    width: min(210px, 54vw);
    max-width: 210px;
    background: transparent;
  }
  .portrait-frame img {
    width: 210px;
    height: 280px;
    object-fit: cover;
    object-position: center 18%;
  }
  #education.section-pad { padding-bottom: 22px; }
  .volunteer-card { margin-top: 10px; }
}

/* ===== V16 — single portrait, no photo box, centered stats, one-tap font toggle ===== */

/* Font control is now a single-tap toggle: no popover/menu. */
.font-menu,
.font-option { display: none !important; }
.font-control { position: relative; }
.font-btn .font-icon {
  font-family: inherit;
  font-size: 17px;
  line-height: 1;
  font-weight: 800;
}

/* Hero portrait: no card/box, only a soft halo and feathered edges. */
.hero-visual {
  overflow: visible;
  align-self: center;
}
.portrait-frame,
:root[data-theme="dark"] .portrait-frame,
:root[data-theme="light"] .portrait-frame {
  width: min(430px, 100%);
  max-width: 430px;
  min-height: 0;
  overflow: visible;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0;
  box-shadow: none !important;
  position: relative;
  isolation: isolate;
}
.portrait-frame::after,
.portrait-accent { display: none !important; }
.portrait-frame::before {
  display: block !important;
  content: "";
  position: absolute;
  inset: 7% 3% 8%;
  z-index: -2;
  border: 0 !important;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 46%, rgba(212,175,55,.24) 0%, rgba(212,175,55,.12) 38%, transparent 72%);
  filter: blur(30px);
  opacity: .9;
}
:root[data-theme="dark"] .portrait-frame::before {
  background: radial-gradient(ellipse at 50% 46%, rgba(212,175,55,.27) 0%, rgba(212,175,55,.12) 42%, transparent 74%);
}
:root[data-theme="light"] .portrait-frame::before {
  background: radial-gradient(ellipse at 50% 46%, rgba(212,175,55,.22) 0%, rgba(212,175,55,.08) 44%, transparent 76%);
}
.portrait-halo {
  display: block !important;
  position: absolute;
  inset: 10% 10% 7%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255,255,255,.18), transparent 68%);
  filter: blur(24px);
  pointer-events: none;
}
.portrait-frame img {
  width: 100%;
  height: auto;
  max-height: 430px;
  object-fit: contain;
  object-position: center;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  -webkit-mask-image: radial-gradient(ellipse 69% 82% at 50% 46%, #000 58%, rgba(0,0,0,.96) 68%, rgba(0,0,0,.55) 82%, transparent 100%);
  mask-image: radial-gradient(ellipse 69% 82% at 50% 46%, #000 58%, rgba(0,0,0,.96) 68%, rgba(0,0,0,.55) 82%, transparent 100%);
}
.experience-card {
  inset-inline-start: 4px;
  bottom: 26px;
}

/* Summary box below hero: fully center each stat. */
.stats-grid > div {
  text-align: center;
  justify-items: center;
  align-content: center;
  place-content: center;
}
.stats-grid strong,
.stats-grid span { text-align: center; }

/* Dark-mode gold project cards are brighter and warmer. */
:root[data-theme="dark"] .projects-grid .project-card {
  background:
    radial-gradient(circle at 12% 8%, rgba(255,224,132,.16), transparent 30%),
    linear-gradient(145deg, #2b271c 0%, #39301a 54%, #4c3b17 100%);
  border-color: rgba(222,184,69,.32);
  box-shadow: 0 16px 34px rgba(0,0,0,.19);
}
:root[data-theme="dark"] .projects-grid .project-card h3 { color: #fff8e8; }
:root[data-theme="dark"] .projects-grid .project-card p,
:root[data-theme="dark"] .projects-grid .project-card .year { color: #e1d8c5; }
:root[data-theme="dark"] .projects-grid .project-card .tag {
  color: #ffe48a;
  border-color: rgba(230,193,82,.38);
  background: rgba(230,193,82,.10);
}
:root[data-theme="dark"] .projects-grid .current-project {
  background:
    radial-gradient(circle at 10% 8%, rgba(255,239,180,.18), transparent 28%),
    linear-gradient(145deg, #4f4018 0%, #71591b 52%, #927323 100%) !important;
  border-color: rgba(236,202,99,.48) !important;
  box-shadow: 0 18px 40px rgba(0,0,0,.24);
}
:root[data-theme="dark"] .projects-grid .current-project h3,
:root[data-theme="dark"] .projects-grid .current-project p,
:root[data-theme="dark"] .projects-grid .current-project .year,
:root[data-theme="dark"] .projects-grid .current-project .tag { color: #fffaf0 !important; }

@media (max-width: 980px) {
  .portrait-frame,
  :root[data-theme="dark"] .portrait-frame,
  :root[data-theme="light"] .portrait-frame {
    width: min(330px, 72vw);
    max-width: 330px;
  }
  .portrait-frame img { max-height: 390px; }
}

@media (max-width: 620px) {
  .portrait-frame,
  :root[data-theme="dark"] .portrait-frame,
  :root[data-theme="light"] .portrait-frame {
    width: min(230px, 58vw);
    max-width: 230px;
    min-height: 0;
  }
  .portrait-frame img {
    width: 100%;
    height: auto;
    max-height: 310px;
    object-fit: contain;
    object-position: center;
  }
  .experience-card {
    inset-inline-start: -8px;
    bottom: 18px;
  }
}

/* ===== V18 — circular hero experience badge ===== */
.experience-card {
  inset-inline-start: auto;
  inset-inline-end: -10px;
  bottom: 14px;
  width: 154px;
  height: 154px;
  min-width: 0;
  max-width: 154px;
  padding: 20px 18px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid color-mix(in srgb, var(--gold) 56%, var(--line));
  box-shadow: 0 18px 36px rgba(0,0,0,.10), 0 0 0 8px color-mix(in srgb, var(--gold) 10%, transparent);
}
.experience-card::before {
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent);
  pointer-events: none;
}
.experience-card b {
  margin: 0;
  font-size: 42px;
  line-height: .95;
  font-weight: 800;
}
.experience-card span {
  display: block;
  max-width: 92px;
  font-size: 11px;
  line-height: 1.7;
}
body.lang-en .experience-card span { max-width: 108px; font-size: 10px; line-height: 1.45; }

@media (max-width: 980px) {
  .experience-card {
    inset-inline-end: -2px;
    bottom: 10px;
    width: 138px;
    height: 138px;
    max-width: 138px;
    padding: 18px 16px;
    gap: 6px;
  }
  .experience-card b { font-size: 37px; }
  .experience-card span { max-width: 84px; font-size: 10px; line-height: 1.62; }
}

@media (max-width: 620px) {
  .experience-card {
    inset-inline-end: -8px;
    bottom: -6px;
    width: 122px;
    height: 122px;
    max-width: 122px;
    padding: 16px 14px;
    gap: 5px;
    box-shadow: 0 14px 28px rgba(0,0,0,.09), 0 0 0 6px color-mix(in srgb, var(--gold) 10%, transparent);
  }
  .experience-card::before { inset: 8px; }
  .experience-card b { font-size: 33px; }
  .experience-card span { max-width: 76px; font-size: 9.5px; line-height: 1.55; }
}

@media (max-width: 420px) {
  .experience-card {
    width: 112px;
    height: 112px;
    max-width: 112px;
    inset-inline-end: -4px;
    bottom: -2px;
  }
  .experience-card b { font-size: 30px; }
  .experience-card span { max-width: 70px; font-size: 8.9px; }
}

@media print {
  .experience-card {
    width: 82pt !important;
    height: 82pt !important;
    max-width: 82pt !important;
    bottom: 6pt !important;
    inset-inline-end: 0 !important;
    border-radius: 50% !important;
    padding: 10pt 8pt !important;
    box-shadow: none !important;
  }
  .experience-card::before { inset: 6pt !important; }
  .experience-card b { font-size: 18pt !important; }
  .experience-card span { font-size: 7pt !important; max-width: 52pt !important; line-height: 1.35 !important; }
}

/* ===== V19 — lighter first two selected projects + smaller hero circle ===== */
.projects-grid .idea-project {
  background: linear-gradient(135deg, rgba(238,217,152,.18) 0%, rgba(212,175,55,.28) 100%);
  border-color: rgba(212,175,55,.34);
}
.projects-grid .idea-project::after {
  background: radial-gradient(circle at top left, rgba(255,255,255,.18), transparent 42%);
}
:root[data-theme="light"] .projects-grid .idea-project {
  background: linear-gradient(135deg, #fff8e2 0%, #f7efc9 56%, #f2df9d 100%) !important;
  border-color: rgba(212,175,55,.34) !important;
  box-shadow: 0 18px 34px rgba(212,175,55,.10);
}
:root[data-theme="light"] .projects-grid .idea-project h3,
:root[data-theme="light"] .projects-grid .idea-project p,
:root[data-theme="light"] .projects-grid .idea-project .year,
:root[data-theme="light"] .projects-grid .idea-project .tag { color: #2d2411 !important; }
:root[data-theme="light"] .projects-grid .idea-project .tag {
  background: rgba(255,255,255,.44) !important;
  border-color: rgba(84,63,8,.10) !important;
}
:root[data-theme="light"] .projects-grid .idea-project .project-link.project-cta {
  color: #2d2411 !important;
  border-color: rgba(84,63,8,.14) !important;
  background: rgba(255,255,255,.42) !important;
}

/* Smaller circular experience badge */
.experience-card {
  width: 128px;
  height: 128px;
  max-width: 128px;
  padding: 16px 14px;
  bottom: 10px;
}
.experience-card::before { inset: 8px; }
.experience-card b { font-size: 34px; }
.experience-card span { max-width: 74px; font-size: 9.5px; line-height: 1.5; }
body.lang-en .experience-card span { max-width: 86px; font-size: 9px; }

@media (max-width: 980px) {
  .experience-card {
    width: 118px;
    height: 118px;
    max-width: 118px;
    padding: 14px 12px;
    bottom: 8px;
  }
  .experience-card b { font-size: 31px; }
  .experience-card span { max-width: 70px; font-size: 8.8px; }
}
@media (max-width: 620px) {
  .experience-card {
    width: 104px;
    height: 104px;
    max-width: 104px;
    bottom: -2px;
    inset-inline-end: -6px;
    padding: 12px 10px;
  }
  .experience-card::before { inset: 7px; }
  .experience-card b { font-size: 28px; }
  .experience-card span { max-width: 62px; font-size: 8.2px; line-height: 1.45; }
}


/* ===== V21 refinements ===== */
/* Gold-only accent system: legacy green tokens now resolve to gold. */
:root,
:root[data-theme="dark"] {
  --green: var(--gold);
  --green-2: var(--gold-2);
  --green-soft: var(--gold-soft);
}
.expertise-card.green-accent::after { border-color: color-mix(in srgb, var(--gold) 42%, transparent); }
.expertise-card.green-accent:hover { border-color: color-mix(in srgb, var(--gold) 55%, var(--line)); }
.expertise-card.green-accent .expertise-rule { background: linear-gradient(90deg, var(--gold), var(--gold-2)); }
.expertise-card.green-accent li::before { background: var(--gold-2); box-shadow: 0 0 0 4px var(--gold-soft); }

/* More breathing room in the compact hero copy. */
.hero-title { line-height: 2.05 !important; }
.hero-title strong { display: inline-block; margin-top: 7px; line-height: 1.9; }
.eyebrow { line-height: 1.9; }

/* Soft gold gradient for the stats box directly below the hero. */
.stats-grid {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--surface) 90%, var(--gold-soft)) 0%,
    color-mix(in srgb, var(--surface) 78%, var(--gold-soft)) 52%,
    color-mix(in srgb, var(--surface) 92%, var(--gold-2)) 100%) !important;
  border-color: color-mix(in srgb, var(--gold) 24%, var(--line)) !important;
}
:root[data-theme="dark"] .stats-grid {
  background: linear-gradient(135deg, rgba(183,138,47,.10), rgba(32,31,29,.96) 48%, rgba(215,177,91,.12)) !important;
}

/* Softer, slightly later motion. */
.reveal {
  transition-duration: .92s !important;
  transition-timing-function: cubic-bezier(.16,.84,.28,1) !important;
}

/* Minimal floating back-to-top control. */
.back-to-top {
  position: fixed;
  inset-inline-end: 22px;
  bottom: 22px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--gold) 42%, var(--line));
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--gold-2);
  box-shadow: 0 10px 28px rgba(0,0,0,.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: grid;
  place-items: center;
  z-index: 80;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(.94);
  transition: opacity .38s var(--ease), transform .38s var(--ease), visibility .38s;
  cursor: pointer;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { border-color: var(--gold); transform: translateY(-2px); }
.back-to-top svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width:620px){.back-to-top{inset-inline-end:14px;bottom:14px;width:40px;height:40px}}
@media print {.back-to-top{display:none!important}}


/* ===== V22 final requested refinements ===== */
/* Gold-only palette: no green visual accents remain. */
:root, :root[data-theme="dark"] {
  --green: var(--gold) !important;
  --green-2: var(--gold-2) !important;
  --green-soft: color-mix(in srgb, var(--gold-soft) 65%, transparent) !important;
}
.expertise-card.green-accent .expertise-rule,
[dir="rtl"] .expertise-card.green-accent .expertise-rule {
  background: linear-gradient(90deg, var(--gold), var(--gold-2)) !important;
}
.expertise-card.green-accent li::before { background: var(--gold-2) !important; box-shadow: 0 0 0 4px color-mix(in srgb,var(--gold) 14%,transparent) !important; }

/* Hero typography — more line breathing without adding copy. */
.hero-title { line-height: 2.2 !important; }
.hero-title strong { line-height: 2.05 !important; margin-top: 9px !important; }
.eyebrow { line-height: 2 !important; }

/* Soft gold gradient for the box immediately below hero. */
.stats-grid {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--surface) 96%, var(--gold-soft)) 0%,
    color-mix(in srgb, var(--surface) 84%, var(--gold-soft)) 50%,
    color-mix(in srgb, var(--surface) 92%, var(--gold-2)) 100%) !important;
  border-color: color-mix(in srgb, var(--gold) 30%, var(--line)) !important;
}
:root[data-theme="dark"] .stats-grid {
  background: linear-gradient(135deg, rgba(183,138,47,.14), rgba(32,31,29,.96) 52%, rgba(215,177,91,.15)) !important;
}

/* Softer motion with a slightly longer perceived delay. */
.reveal {
  transition-duration: 1.06s !important;
  transition-timing-function: cubic-bezier(.16,.78,.24,1) !important;
}


/* ===== V25 — Rokh alternate font + mobile hero line fix ===== */
:root[data-font="rokh"] { --font-main: 'Rokh'; }
.font-option[data-font="rokh"] { font-family: 'Rokh', sans-serif; }
@media (max-width: 620px) {
  .hero::after { display: none !important; content: none !important; }
}

/* ===== V26 — Rokh primary, IRANSansX alternate ===== */
:root { --font-main: 'Rokh'; }
:root[data-font="rokh"] { --font-main: 'Rokh'; }
:root[data-font="iransans"] { --font-main: 'IRANSansX'; }
html:not([data-font]) body:not(.lang-en),
html[data-font="rokh"] body:not(.lang-en) {
  font-family: 'Rokh', 'IRANSansX', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}
html[data-font="iransans"] body:not(.lang-en) {
  font-family: 'IRANSansX', 'Rokh', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

/* ===== V30 — Improve Rokh legibility at small Persian text sizes ===== */
@media screen {
  html[data-font="rokh"] body:not(.lang-en) :is(
    .brand-copy small,
    .nav-link,
    .lang-btn,
    .theme-toggle,
    .font-trigger,
    .font-option-label,
    .eyebrow,
    .hero-meta,
    .experience-card span,
    .stats-grid span,
    .section-kicker,
    .capability-grid p,
    .time span,
    .role-label,
    .timeline-body p,
    .project-no,
    .tag,
    .project-card p,
    .year,
    .project-cta,
    .expertise-card li,
    .edu-card p,
    .contact-actions small,
    .site-footer,
    .qr-card b,
    .qr-card small
  ) {
    font-weight: 600;
  }
}

/* ===== V31 — Restrained desktop pointer companion ===== */
.cursor-companion {
  display: none;
}

@media screen and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .cursor-companion {
    position: fixed;
    inset: 0 auto auto 0;
    z-index: 9999;
    display: block;
    width: 7px;
    height: 7px;
    border: 1px solid rgba(59, 181, 128, .9);
    border-radius: 50%;
    background: rgba(59, 181, 128, .3);
    box-shadow: 0 0 8px rgba(59, 181, 128, .22);
    opacity: 0;
    pointer-events: none;
    will-change: transform;
    transition:
      width 160ms ease,
      height 160ms ease,
      opacity 140ms ease,
      background-color 160ms ease,
      border-color 160ms ease,
      box-shadow 160ms ease;
  }

  .cursor-companion.is-visible { opacity: .78; }

  .cursor-companion.is-interactive {
    width: 10px;
    height: 10px;
    background: rgba(59, 181, 128, .16);
    border-color: rgba(59, 181, 128, 1);
    box-shadow: 0 0 11px rgba(59, 181, 128, .3);
  }

  .cursor-companion.is-project {
    width: 12px;
    height: 12px;
    background: rgba(183, 138, 47, .12);
    border-color: rgba(183, 138, 47, .92);
    box-shadow: 0 0 12px rgba(183, 138, 47, .24);
  }

  .cursor-companion.is-pressed {
    width: 6px;
    height: 6px;
    opacity: .95;
  }
}

/* V32 — Solid gold desktop cursor companion */
@media screen and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .cursor-companion, .cursor-companion.is-interactive, .cursor-companion.is-project {
    background: #c79a42; border-color: #d7ad5d;
    box-shadow: 0 0 9px rgba(199,154,66,.28);
  }
  .cursor-companion.is-visible { opacity: 1; }
}

/* V33 — Executive profile headings, English Rogoro and footer SVGs */
@font-face {font-family:'RogoroEn';src:url('fonts/rogoro-regular.woff') format('woff');font-style:normal;font-weight:100 900;font-display:swap;}
@font-face {font-family:'RogoroEn';src:url('fonts/rogoro-italic.woff') format('woff');font-style:italic;font-weight:100 900;font-display:swap;}


.capability-grid article h3 {color:#c79a42;}
.footer-socials .social-icon img {width:20px;height:20px;object-fit:contain;display:block;}
.footer-socials .social-icon.bale img {width:19px;height:24px;}
@media screen and (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference) {
.cursor-companion.is-interactive {background:transparent;border:1.5px solid #d7ad5d;box-shadow:0 0 7px rgba(199,154,66,.20);}
.cursor-companion.is-project {background:transparent;border:1.5px solid #d7ad5d;box-shadow:0 0 7px rgba(199,154,66,.20);}
}

/* V34 — monochrome footer SVG icons matching Telegram */
.footer-socials .social-icon.whatsapp img,.footer-socials .social-icon.bale img {display:none;}
.footer-socials .social-icon.whatsapp::before,.footer-socials .social-icon.bale::before {content:"";display:block;width:19px;height:19px;background-color:currentColor;mask-position:center;mask-repeat:no-repeat;mask-size:contain;-webkit-mask-position:center;-webkit-mask-repeat:no-repeat;-webkit-mask-size:contain;}
.footer-socials .social-icon.whatsapp::before {mask-image:url('whatsapp.svg');-webkit-mask-image:url('whatsapp.svg');}
.footer-socials .social-icon.bale::before {mask-image:url('bale.svg');-webkit-mask-image:url('bale.svg');}



/* V36 — Manrope across English website */
@font-face{font-family:'ManropeEn';src:url('fonts/Manrope-ExtraLight.woff') format('woff');font-style:normal;font-weight:200;font-display:swap;}
@font-face{font-family:'ManropeEn';src:url('fonts/Manrope-Light.woff') format('woff');font-style:normal;font-weight:300;font-display:swap;}
@font-face{font-family:'ManropeEn';src:url('fonts/Manrope-Regular.woff') format('woff');font-style:normal;font-weight:400;font-display:swap;}
@font-face{font-family:'ManropeEn';src:url('fonts/Manrope-Medium.woff') format('woff');font-style:normal;font-weight:500;font-display:swap;}
@font-face{font-family:'ManropeEn';src:url('fonts/Manrope-SemiBold.woff') format('woff');font-style:normal;font-weight:600;font-display:swap;}
@font-face{font-family:'ManropeEn';src:url('fonts/Manrope-Bold.woff') format('woff');font-style:normal;font-weight:700;font-display:swap;}
@font-face{font-family:'ManropeEn';src:url('fonts/Manrope-ExtraBold.woff') format('woff');font-style:normal;font-weight:800;font-display:swap;}
body.lang-en, body.lang-en *:not(svg):not(path):not(i) {font-family:"ManropeEn",Arial,sans-serif !important;}

/* V37: prevent horizontal page scrolling without blocking vertical scroll */
html { overflow-x: clip; }
body { overflow-x: clip; max-width: 100%; }
@supports not (overflow: clip) { html, body { overflow-x: hidden; } }
