/* ===== Fonts ===== */
@font-face { font-family: "Vazirmatn"; src: url("fonts/Vazirmatn-Light.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("fonts/Vazirmatn-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("fonts/Vazirmatn-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("fonts/Vazirmatn-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("fonts/Vazirmatn-ExtraBold.woff2") format("woff2"); font-weight: 800; font-display: swap; }

/* ===== Tokens ===== */
:root {
  --bg: #0b0d12;
  --bg-alt: #0f1219;
  --surface: #141823;
  --surface-2: #1a1f2c;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .16);
  --text: #ecebe7;
  --muted: #9aa1ae;
  --faint: #6b7280;
  --accent: #f2b544;
  --accent-2: #ff8a4c;
  --accent-ink: #1a1203;
  --glow: rgba(242, 181, 68, .16);
  --shadow: 0 30px 60px -30px rgba(0, 0, 0, .6);
  --radius: 20px;
  --radius-sm: 12px;
  --wrap: 1180px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f7f5f0;
  --bg-alt: #efece4;
  --surface: #ffffff;
  --surface-2: #f6f3ec;
  --line: rgba(20, 20, 30, .09);
  --line-strong: rgba(20, 20, 30, .18);
  --text: #15171c;
  --muted: #565d6b;
  --faint: #8a8f9a;
  --accent: #c7861a;
  --accent-2: #e0662a;
  --accent-ink: #ffffff;
  --glow: rgba(199, 134, 26, .14);
  --shadow: 0 30px 60px -35px rgba(40, 30, 10, .35);
  color-scheme: light;
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Vazirmatn", Tahoma, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.9;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.35; font-weight: 800; letter-spacing: -.01em; }
p { margin: 0; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: max(20px, 4vw); }
.skip { position: absolute; inset-inline-start: 16px; top: -60px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 16px; border-radius: 8px; }
.skip:focus { top: 12px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 24px; border-radius: 999px;
  font: inherit; font-weight: 700; font-size: 15px; line-height: 1;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .25s var(--ease), background-color .25s, border-color .25s, box-shadow .25s, color .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-ink); box-shadow: 0 12px 30px -12px var(--accent); }
.btn--primary:hover { box-shadow: 0 18px 40px -12px var(--accent); }
.btn--ghost { border-color: var(--line-strong); color: var(--text); background: transparent; }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--small { padding: 10px 16px; font-size: 14px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

.icon-btn {
  width: 42px; height: 42px; display: inline-grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--line-strong); background: transparent;
  color: var(--text); cursor: pointer; transition: border-color .25s, color .25s, transform .25s var(--ease);
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ===== Nav ===== */
.nav {
  position: fixed; inset-inline: 0; top: 0; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  transition: background-color .35s, border-color .35s, backdrop-filter .35s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom-color: var(--line);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; }
.brand__mark {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px;
  font-family: system-ui, sans-serif; font-size: 14px; letter-spacing: .04em;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-ink);
}
.nav__links { display: flex; gap: 6px; }
.nav__links a { padding: 8px 14px; border-radius: 999px; font-size: 15px; color: var(--muted); transition: color .2s, background-color .2s; }
.nav__links a:hover, .nav__links a.is-active { color: var(--text); background: var(--surface-2); }
.nav__actions { display: flex; align-items: center; gap: 10px; }
.nav__burger { display: none; }
.i-moon { display: none; }
:root[data-theme="light"] .i-sun { display: none; }
:root[data-theme="light"] .i-moon { display: block; }

/* ===== Hero ===== */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding-block: 120px 80px; overflow: hidden; }
.hero__glow {
  position: absolute; inset: -20% -10% auto auto; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  background: radial-gradient(circle at center, var(--glow), transparent 62%);
  pointer-events: none;
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
  opacity: .55;
}
.hero__grid { position: relative; display: grid; grid-template-columns: 1.25fr .9fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 16px; border-radius: 999px; border: 1px solid var(--line-strong);
  font-size: 14px; font-weight: 500; color: var(--muted); background: color-mix(in srgb, var(--surface) 60%, transparent);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 4px rgba(61, 220, 132, .18); animation: pulse 2.4s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(61, 220, 132, 0); } }
.hero__title { margin-top: 24px; font-size: clamp(48px, 8vw, 96px); line-height: 1.1; letter-spacing: -.02em; }
.hero__sub {
  display: block; margin-top: 18px; font-size: clamp(22px, 2.8vw, 34px); font-weight: 700; line-height: 1.5;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__lead { margin-top: 22px; max-width: 58ch; font-size: clamp(16px, 1.4vw, 19px); color: var(--muted); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.stats { display: flex; flex-wrap: wrap; gap: clamp(20px, 4vw, 48px); margin: 48px 0 0; padding-top: 28px; border-top: 1px solid var(--line); }
.stat { display: flex; flex-direction: column-reverse; }
.stat dt { font-size: 14px; color: var(--muted); }
.stat dd { margin: 0; font-size: clamp(32px, 4vw, 44px); font-weight: 800; line-height: 1.2; color: var(--text); }

.hero__media { justify-self: center; width: 100%; max-width: 440px; }
.portrait { position: relative; aspect-ratio: 1 / 1.08; }
.portrait::before {
  content: ""; position: absolute; inset: -14px; border-radius: 36px;
  background: conic-gradient(from 210deg, var(--accent), transparent 30%, transparent 60%, var(--accent-2), var(--accent));
  opacity: .55; filter: blur(.5px);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  padding: 1px;
}
.portrait picture, .portrait img { width: 100%; height: 100%; }
.portrait img { object-fit: cover; object-position: 50% 30%; border-radius: 28px; box-shadow: var(--shadow); }
.chip {
  position: absolute; display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line-strong); box-shadow: var(--shadow);
  font-size: 13px; line-height: 1.5; animation: float 6s ease-in-out infinite;
}
.chip b { display: block; font-size: 15px; }
.chip small { color: var(--muted); font-size: 12.5px; }
.chip__icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--glow); color: var(--accent); }
.chip--a { top: 12%; inset-inline-end: -14%; }
.chip--b { bottom: 10%; inset-inline-start: -12%; animation-delay: -3s; }
@keyframes float { 50% { transform: translateY(-10px); } }

/* ===== Sections ===== */
.section { padding-block: clamp(80px, 11vw, 140px); }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section__head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 64px); }
.kicker { font-size: 14px; font-weight: 700; color: var(--accent); letter-spacing: .02em; }
.section h2 { margin-top: 12px; font-size: clamp(32px, 4.6vw, 52px); }
.section__lead { margin-top: 18px; font-size: clamp(16px, 1.4vw, 19px); color: var(--muted); max-width: 62ch; }
.org { color: var(--muted); font-size: 15px; }
.when { font-size: 13.5px; color: var(--faint); font-weight: 500; white-space: nowrap; }

/* Roles */
.roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.role {
  position: relative; padding: 34px 30px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  transition: transform .35s var(--ease), border-color .35s, box-shadow .35s;
  overflow: hidden;
}
.role::after {
  content: ""; position: absolute; inset: auto -30% -60% auto; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, var(--glow), transparent 70%); opacity: 0; transition: opacity .4s;
}
.role:hover { transform: translateY(-6px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.role:hover::after { opacity: 1; }
.role--featured { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.role__icon { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 16px; background: var(--glow); color: var(--accent); margin-bottom: 24px; }
.role__icon svg { width: 26px; height: 26px; }
.role h3 { font-size: 23px; margin-bottom: 12px; }
.role p { color: var(--muted); font-size: 16px; }
.tags { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { font-size: 13px; padding: 4px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }

/* Experience */
.leads { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.lead-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 30px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  transition: transform .35s var(--ease), border-color .35s;
}
.lead-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.lead-card__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.badge { font-size: 12.5px; font-weight: 700; padding: 4px 12px; border-radius: 999px; color: var(--accent); background: var(--glow); }
.lead-card h3 { font-size: 28px; }
.lead-card p:not(.org) { color: var(--muted); font-size: 15.5px; margin-top: 6px; }
.link { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 16px; font-weight: 700; font-size: 15px; color: var(--accent); }
.link svg { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.link:hover svg { transform: translate(-3px, -3px); }

.sub-title { margin: 72px 0 24px; font-size: 20px; color: var(--muted); font-weight: 700; }
.timeline { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.timeline li {
  display: grid; grid-template-columns: 220px 1fr; gap: 24px; padding: 24px 0;
  border-bottom: 1px solid var(--line); transition: background-color .25s;
}
.timeline li:hover { background: linear-gradient(90deg, transparent, var(--glow)); }
.timeline .when { padding-top: 4px; }
.timeline h4 { font-size: 18px; font-weight: 700; }
.timeline p:not(.org) { color: var(--muted); font-size: 15px; margin-top: 4px; }

/* Background */
.bg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  display: flex; flex-direction: column; gap: 8px; padding: 30px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
}
.card__label { font-size: 13px; font-weight: 700; color: var(--accent); margin-bottom: 8px; }
.card h3 { font-size: 20px; line-height: 1.6; }
.card .when { margin-top: auto; padding-top: 12px; }
.quote { position: relative; margin: clamp(56px, 8vw, 96px) 0 0; padding: 0 clamp(24px, 5vw, 64px); }
.quote::before {
  content: "”"; position: absolute; inset-inline-start: -6px; top: -40px;
  font-size: 140px; line-height: 1; font-family: Georgia, serif; color: var(--accent); opacity: .5;
}
.quote p { font-size: clamp(20px, 2.4vw, 30px); font-weight: 500; line-height: 1.8; max-width: 34em; }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 88px); align-items: start; }
.contact__list { list-style: none; padding: 0; margin: 36px 0 0; display: grid; gap: 14px; }
.contact__list li { display: flex; align-items: center; gap: 14px; font-size: 17px; }
.contact__list a:hover { color: var(--accent); }
.ci { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--accent); }

.form { padding: clamp(24px, 4vw, 40px); border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); display: grid; gap: 18px; }
.field { position: relative; }
.field input, .field textarea {
  width: 100%; padding: 26px 18px 10px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text);
  font: inherit; font-size: 16px; resize: vertical; transition: border-color .2s, box-shadow .2s;
}
.field input[dir="ltr"] { text-align: right; }
.field input[dir="ltr"]:not(:placeholder-shown) { text-align: left; }
.field textarea { min-height: 150px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--glow); }
.field label {
  position: absolute; inset-inline-start: 18px; top: 17px; color: var(--muted); font-size: 16px;
  pointer-events: none; transition: transform .2s var(--ease), font-size .2s, top .2s, color .2s;
}
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label { top: 6px; font-size: 12.5px; color: var(--accent); }
.field.is-invalid input, .field.is-invalid textarea { border-color: #ef5350; }
.hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.form__status { min-height: 1.6em; font-size: 15px; text-align: center; color: var(--muted); }
.form__status.ok { color: #3ddc84; }
.form__status.err { color: #ef5350; }

/* Footer */
.footer { padding-block: 32px calc(32px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--faint); font-size: 14px; }
.to-top { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-strong); color: var(--text); transition: border-color .25s, color .25s, transform .25s var(--ease); }
.to-top:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-3px); }

/* Reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 1020px) {
  .roles, .leads, .bg-grid { grid-template-columns: 1fr 1fr; }
  .role--featured { order: -1; grid-column: 1 / -1; }
  .leads > :first-child { grid-column: 1 / -1; }
  .bg-grid > :last-child { grid-column: 1 / -1; }
  .chip--a { inset-inline-end: -4%; }
  .chip--b { inset-inline-start: -4%; }
}
@media (max-width: 860px) {
  .nav__burger { display: inline-grid; }
  .nav__cv { display: none; }
  .nav__links {
    position: absolute; top: calc(100% + 8px); inset-inline: 16px;
    flex-direction: column; padding: 10px; gap: 2px; border-radius: 18px;
    background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .25s, transform .25s var(--ease), visibility .25s;
  }
  .nav__links a { padding: 12px 16px; font-size: 16px; }
  .nav.is-open .nav__links { opacity: 1; visibility: visible; transform: none; }
  .nav.is-open { background: var(--bg); border-bottom-color: var(--line); }
  .hero { padding-top: 110px; }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__media { order: -1; max-width: 300px; justify-self: start; }
  .chip { padding: 8px 12px; }
  .chip__icon { width: 32px; height: 32px; }
  .chip--a { inset-inline-end: -30%; top: 8%; }
  .chip--b { inset-inline-start: auto; inset-inline-end: -36%; bottom: 8%; }
  .contact { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .roles, .leads, .bg-grid { grid-template-columns: 1fr; }
  .hero__media { max-width: 220px; }
  .chip--a { inset-inline-end: -62%; }
  .chip--b { inset-inline-end: -72%; }
  .chip small { display: none; }
  .timeline li { grid-template-columns: 1fr; gap: 6px; }
  .brand__name { display: none; }
  .hero__cta .btn { flex: 1 1 auto; }
}
@media (max-width: 420px) {
  .chip { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
