/* Dr. Mehryar Shababi — academic profile
   Visual direction: editorial, oversized type, dark media panel. */

:root {
  --ink: #111311;
  --ink-soft: #2c332e;
  --paper: #f4f2ed;
  --paper-2: #eae7df;
  --green: #143b32;
  --green-deep: #0c2821;
  --gold: #b08d57;
  --gold-soft: #cfb183;
  --muted: #6d746e;
  --line: rgba(17, 19, 17, 0.15);
  --line-light: rgba(244, 242, 237, 0.2);
  --max: 1240px;
  --pad: clamp(20px, 4vw, 48px);
  --radius: clamp(20px, 2.2vw, 32px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --display: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --body: "Inter", "Helvetica Neue", Arial, sans-serif;
  --fa: "Vazirmatn", "Tahoma", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

h1,
h2,
h3,
h4 {
  font-family: var(--display);
  font-weight: 500;
  line-height: 0.96;
  letter-spacing: -0.05em;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}

::selection {
  background: var(--green);
  color: var(--paper);
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  background: var(--green);
  color: var(--paper);
  padding: 12px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 12px;
}

.skip-link:focus {
  top: 16px;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 242, 237, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}

.site-header.is-scrolled {
  border-color: var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 78px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  flex: 0 0 auto;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--green);
  color: var(--paper);
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.brand-text {
  display: block;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.brand-text small {
  display: block;
  font-family: var(--body);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 3px;
}

.header-note {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin-inline-start: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.2vw, 28px);
  font-size: 13px;
  font-weight: 500;
}

.nav a {
  text-decoration: none;
  padding-block: 4px;
  transition: color 0.25s var(--ease);
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--gold);
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  flex: 0 0 auto;
}

.lang-toggle button {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: var(--body);
  font-size: 11px;
  font-weight: 500;
  padding: 6px 11px;
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

.lang-toggle button.is-active {
  background: var(--green);
  color: var(--paper);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  padding: 0;
  cursor: pointer;
  place-items: center;
}

.menu-toggle span {
  width: 16px;
  height: 1.5px;
  background: currentColor;
  position: relative;
  display: block;
}

.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.3s var(--ease), top 0.3s var(--ease);
}

.menu-toggle span::before {
  top: -5px;
}

.menu-toggle span::after {
  top: 5px;
}

body.nav-open .menu-toggle span {
  background: transparent;
}

body.nav-open .menu-toggle span::before {
  top: 0;
  transform: rotate(45deg);
}

body.nav-open .menu-toggle span::after {
  top: 0;
  transform: rotate(-45deg);
}

/* ---------- shared ---------- */

.eyebrow {
  display: inline-flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-top: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: 0 0 auto;
}

.section {
  padding-block: clamp(64px, 8vw, 112px);
}

.section--paper2 {
  background: var(--paper-2);
}

.section--green {
  background: var(--green);
  color: var(--paper);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: end;
  margin-bottom: clamp(34px, 4.5vw, 56px);
}

.section-head h2 {
  font-size: clamp(2.2rem, 4.8vw, 4.4rem);
  max-width: 16ch;
}

.section-head p {
  color: var(--muted);
  font-size: 16px;
  max-width: 46ch;
}

.section--green .section-head p {
  color: rgba(244, 242, 237, 0.68);
}

.section--green .eyebrow {
  color: var(--gold-soft);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 13px 24px;
  background: var(--green);
  color: var(--paper);
  border: 1px solid var(--green);
  border-radius: 999px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.3s var(--ease), color 0.3s var(--ease),
    border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.btn svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  transition: transform 0.3s var(--ease);
}

.btn:hover,
.btn:focus-visible {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--green-deep);
  transform: translateY(-1px);
}

.btn:hover svg {
  transform: translateX(4px);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  background: var(--green);
  border-color: var(--green);
  color: var(--paper);
}

.btn--light {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--green-deep);
}

.btn--light:hover,
.btn--light:focus-visible {
  background: var(--gold);
  border-color: var(--gold);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 5px;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.text-link:hover,
.text-link:focus-visible {
  color: var(--gold);
  border-color: var(--gold);
}

/* ---------- hero ---------- */

.hero {
  padding-top: clamp(36px, 5vw, 64px);
  padding-bottom: clamp(36px, 5vw, 64px);
}

.hero__head {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 18px;
  padding-bottom: clamp(28px, 4vw, 48px);
}

.hero h1 {
  font-size: clamp(3.4rem, 10vw, 9rem);
  line-height: 0.9;
  letter-spacing: -0.065em;
  max-width: 12ch;
}

.hero__role {
  font-family: var(--display);
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--green);
}

.hero__intro {
  max-width: 56ch;
  color: var(--muted);
  font-size: clamp(15px, 1.5vw, 17.5px);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 6px;
}

.hero__panel {
  position: relative;
  border-radius: var(--radius);
  background: var(--green-deep);
  color: var(--paper);
  aspect-ratio: 16 / 8.2;
  min-height: 340px;
  overflow: hidden;
  isolation: isolate;
}

#orbit {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero__panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 48%, transparent 0%, rgba(6, 20, 16, 0.55) 78%);
  pointer-events: none;
  z-index: 1;
}

.hero__panel-top,
.hero__panel-bottom {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(16px, 2.4vw, 26px);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(244, 242, 237, 0.62);
}

.hero__panel-top {
  top: 0;
}

.hero__panel-bottom {
  bottom: 0;
  border-top: 1px solid rgba(244, 242, 237, 0.14);
}

.hero__panel-bottom .plus {
  font-size: 18px;
  line-height: 1;
  color: var(--gold-soft);
}

.hero__panel-center {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  gap: 8px;
  text-align: center;
  padding: 40px;
}

.hero__monogram {
  font-family: var(--display);
  font-size: clamp(5rem, 16vw, 12rem);
  font-weight: 500;
  letter-spacing: -0.08em;
  line-height: 0.85;
  color: var(--paper);
}

.hero__panel-caption {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.meta-bar {
  margin-top: clamp(24px, 3vw, 36px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.meta-bar__inner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.meta-item {
  padding: 16px 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 11px;
  color: var(--muted);
}

.meta-item + .meta-item {
  border-left: 1px solid var(--line);
  padding-left: clamp(16px, 2.4vw, 28px);
}

.meta-item b {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--gold);
}

/* ---------- profile ---------- */

.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.profile-grid h2 {
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  max-width: 13ch;
}

.profile-copy {
  display: grid;
  gap: 18px;
  padding-top: 8px;
}

.profile-copy p {
  color: var(--muted);
  font-size: 16px;
  max-width: 50ch;
}

.profile-copy .text-link {
  margin-top: 8px;
}

/* ---------- research ---------- */

.research-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 20px);
}

.research-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 3vw, 34px);
  min-height: 260px;
  display: grid;
  align-content: space-between;
  gap: 28px;
  transition: background 0.4s var(--ease), color 0.4s var(--ease),
    transform 0.4s var(--ease);
}

.research-card:hover {
  background: var(--green);
  color: var(--paper);
  transform: translateY(-4px);
}

.research-card span {
  font-family: var(--display);
  font-size: 13px;
  color: var(--gold);
}

.research-card h3 {
  font-size: clamp(1.4rem, 2.1vw, 1.8rem);
  letter-spacing: -0.035em;
}

.research-card p {
  color: var(--muted);
  font-size: 14.5px;
  margin-top: 10px;
  transition: color 0.4s var(--ease);
}

.research-card:hover p {
  color: rgba(244, 242, 237, 0.68);
}

/* ---------- publications ---------- */

.pub-list {
  border-top: 1px solid var(--line);
}

.pub {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: clamp(14px, 2.4vw, 30px);
  padding-block: 26px;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.pub__year {
  font-family: var(--display);
  font-size: 16px;
  color: var(--gold);
  padding-top: 3px;
  letter-spacing: -0.02em;
}

.pub h3 {
  font-size: clamp(1.25rem, 1.9vw, 1.55rem);
  letter-spacing: -0.03em;
  max-width: 46ch;
}

.pub h3 a {
  text-decoration: none;
  transition: color 0.25s var(--ease);
}

.pub h3 a:hover {
  color: var(--gold);
}

.pub__alt {
  margin-top: 5px;
  font-family: var(--fa);
  font-size: 14px;
  direction: rtl;
  text-align: right;
  color: var(--muted);
}

.pub__meta {
  margin-top: 7px;
  font-size: 12.5px;
  color: var(--muted);
}

.pub__meta a {
  color: var(--gold);
  text-decoration: none;
}

.pub__meta a:hover {
  text-decoration: underline;
}

.list-note {
  margin-top: 22px;
  font-size: 12.5px;
  color: var(--muted);
  max-width: 62ch;
}

.section-actions {
  margin-top: 30px;
  display: flex;
  justify-content: center;
}

/* ---------- books ---------- */

.book-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 20px);
}

.book {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(26px, 3.4vw, 40px);
  display: grid;
  gap: 26px;
  align-content: space-between;
  min-height: 250px;
}

.book span {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.book h3 {
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  letter-spacing: -0.035em;
  max-width: 18ch;
}

.book p {
  color: var(--muted);
  font-size: 13.5px;
  margin-top: 6px;
}

/* ---------- CTA ---------- */

.cta {
  padding: 0 var(--pad) clamp(40px, 5vw, 72px);
}

.cta__inner {
  max-width: var(--max);
  margin-inline: auto;
  background: var(--green);
  color: var(--paper);
  border-radius: var(--radius);
  padding: clamp(36px, 5vw, 68px);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}

.cta h2 {
  font-size: clamp(2.4rem, 5.4vw, 5rem);
  max-width: 15ch;
  letter-spacing: -0.055em;
}

.cta p {
  margin-top: 14px;
  max-width: 44ch;
  color: rgba(244, 242, 237, 0.72);
  font-size: 15.5px;
}

.cta .btn {
  flex: 0 0 auto;
}

/* ---------- page hero ---------- */

.page-hero {
  padding-top: clamp(48px, 6vw, 84px);
  padding-bottom: clamp(34px, 4.5vw, 56px);
}

.page-hero .wrap {
  display: grid;
  gap: 16px;
}

.page-hero h1 {
  font-size: clamp(3rem, 7.6vw, 7rem);
  max-width: 16ch;
  letter-spacing: -0.06em;
}

.page-hero p {
  max-width: 52ch;
  color: var(--muted);
  font-size: clamp(15px, 1.4vw, 17px);
}

.page-hero .count {
  font-family: var(--display);
  font-size: clamp(4rem, 10vw, 8rem);
  line-height: 0.85;
  color: var(--gold);
  letter-spacing: -0.06em;
}

/* ---------- CV ---------- */

.cv-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.65fr) minmax(0, 1.35fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.cv-aside {
  position: sticky;
  top: 100px;
  background: var(--green);
  color: var(--paper);
  border-radius: var(--radius);
  padding: clamp(24px, 3vw, 34px);
}

.cv-aside .monogram {
  width: 100%;
  border-bottom: 1px solid var(--line-light);
  padding-bottom: 20px;
  margin-bottom: 20px;
}

.cv-aside .monogram span {
  display: block;
  font-family: var(--display);
  font-size: clamp(3rem, 6vw, 5rem);
  line-height: 0.9;
  letter-spacing: -0.07em;
}

.cv-aside .monogram small {
  display: block;
  margin-top: 8px;
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.cv-aside p {
  color: rgba(244, 242, 237, 0.66);
  font-size: 13.5px;
}

.cv-links {
  margin-top: 22px;
  display: grid;
  gap: 8px;
}

.cv-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-decoration: none;
  color: var(--paper);
  font-size: 12.5px;
  border-bottom: 1px solid var(--line-light);
  padding-bottom: 7px;
  transition: color 0.25s var(--ease);
}

.cv-links a:hover {
  color: var(--gold-soft);
}

.cv-links a span {
  color: rgba(244, 242, 237, 0.45);
  font-size: 10px;
}

.cv-block + .cv-block {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.cv-block h2 {
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  letter-spacing: -0.035em;
  margin-bottom: 18px;
}

.cv-block ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}

.cv-block li {
  display: grid;
  gap: 3px;
}

.cv-block li strong {
  font-weight: 500;
  font-size: 15.5px;
}

.cv-block li span {
  color: var(--muted);
  font-size: 13.5px;
}

.cv-block p {
  color: var(--muted);
  font-size: 15.5px;
  max-width: 58ch;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: clamp(34px, 4vw, 52px);
}

.stat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
}

.stat b {
  display: block;
  font-family: var(--display);
  font-size: clamp(2rem, 3.4vw, 3rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--green);
}

.stat span {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.contact-block {
  display: grid;
  gap: 8px;
}

.contact-item {
  border-top: 1px solid var(--line);
  padding-block: 15px;
}

.contact-item > span {
  display: block;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 5px;
}

.contact-item a,
.contact-item p {
  font-size: 15.5px;
  text-decoration: none;
  color: var(--ink);
  line-height: 1.55;
}

.contact-item a:hover {
  color: var(--gold);
}

.profile-links {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.profile-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 9px;
  font-size: 13px;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.profile-links a:hover {
  color: var(--gold);
  border-color: var(--gold);
}

.profile-links a span {
  color: var(--muted);
  font-size: 11px;
}

.form {
  background: var(--paper-2);
  border-radius: var(--radius);
  padding: clamp(24px, 3.4vw, 42px);
  display: grid;
  gap: 18px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  padding: 13px 14px;
  transition: border-color 0.25s var(--ease);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.field textarea {
  min-height: 130px;
  resize: vertical;
}

.form-note {
  font-size: 12.5px;
  color: var(--muted);
  max-width: 52ch;
}

/* ---------- footer ---------- */

.site-footer {
  background: var(--green-deep);
  color: var(--paper);
  padding-top: clamp(48px, 6vw, 76px);
  padding-bottom: 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 0.7fr));
  gap: clamp(24px, 4vw, 52px);
  padding-bottom: clamp(36px, 4.5vw, 56px);
  border-bottom: 1px solid var(--line-light);
}

.footer-brand .brand-text {
  color: var(--paper);
}

.footer-brand .brand-mark {
  background: var(--paper);
  color: var(--green-deep);
}

.footer-brand p {
  margin-top: 18px;
  max-width: 38ch;
  color: rgba(244, 242, 237, 0.6);
  font-size: 13.5px;
}

.footer-col h2 {
  font-family: var(--body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244, 242, 237, 0.45);
  margin-bottom: 14px;
}

.footer-col a,
.footer-col p {
  display: block;
  text-decoration: none;
  color: rgba(244, 242, 237, 0.8);
  font-size: 13.5px;
  margin-bottom: 8px;
}

.footer-col a:hover {
  color: var(--gold-soft);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 20px;
  font-size: 11.5px;
  color: rgba(244, 242, 237, 0.45);
}

/* ---------- reveal ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Farsi ---------- */

body.lang-fa {
  font-family: var(--fa);
  line-height: 1.9;
}

body.lang-fa h1,
body.lang-fa h2,
body.lang-fa h3,
body.lang-fa h4,
body.lang-fa .hero__role,
body.lang-fa .hero__monogram,
body.lang-fa .meta-item b,
body.lang-fa .pub__year,
body.lang-fa .stat b,
body.lang-fa .cv-aside .monogram span {
  font-family: var(--fa);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.4;
}

body.lang-fa .hero h1 {
  font-size: clamp(2.8rem, 7vw, 6.6rem);
  max-width: 16ch;
  line-height: 1.3;
}

body.lang-fa .eyebrow,
body.lang-fa .btn,
body.lang-fa .nav,
body.lang-fa .brand-text small,
body.lang-fa .hero__panel-top,
body.lang-fa .hero__panel-bottom,
body.lang-fa .meta-item,
body.lang-fa .footer-bottom,
body.lang-fa .field label,
body.lang-fa .stat span {
  letter-spacing: 0;
}

body.lang-fa .pub__alt {
  font-family: var(--body);
  direction: ltr;
  text-align: left;
}

body.lang-fa .brand-text {
  font-family: var(--fa);
}

body.lang-fa .hero__monogram {
  font-size: clamp(4rem, 12vw, 9rem);
}

/* ---------- RTL ---------- */

[dir="rtl"] .eyebrow::before {
  order: 2;
}

[dir="rtl"] .text-link,
[dir="rtl"] .btn {
  flex-direction: row-reverse;
}

[dir="rtl"] .btn:hover svg {
  transform: translateX(-4px);
}

[dir="rtl"] .hero__panel-top,
[dir="rtl"] .hero__panel-bottom {
  flex-direction: row-reverse;
}

/* ---------- responsive ---------- */

@media (max-width: 980px) {
  .site-header {
    backdrop-filter: none;
  }

  .header-note {
    display: none;
  }

  .nav {
    max-height: calc(100dvh - 78px);
    overflow-y: auto;
    position: fixed;
    inset: 78px 0 auto 0;
    background: var(--paper);
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    padding: 24px var(--pad) 32px;
    border-bottom: 1px solid var(--line);
    font-size: 17px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  }

  .nav.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .menu-toggle {
    display: grid;
  }

  .section-head,
  .profile-grid,
  .cv-grid,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .research-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .cv-aside {
    position: static;
  }

  .cta__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

@media (max-width: 680px) {
  .hero__panel {
    aspect-ratio: 4 / 4.2;
  }

  .hero__panel-top span:last-child,
  .hero__panel-bottom span:first-child {
    display: none;
  }

  .form-row,
  .book-grid,
  .stat-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .pub,
  [dir="rtl"] .pub {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .meta-bar__inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .meta-item + .meta-item {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-left: 0;
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .brand-text small {
    display: none;
  }

  .hero__actions .btn {
    flex: 1 1 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
