:root {
  --navy-950: #0c1726;
  --navy-900: #102238;
  --navy-800: #17314d;
  --navy-700: #1d446c;
  --gold-500: #c7a75b;
  --gold-600: #b99136;
  --gray-100: #f5f7fa;
  --gray-200: #e7edf5;
  --gray-300: #d5dfe8;
  --gray-600: #677384;
  --gray-700: #46515e;
  --white: #ffffff;
  --form-blue: #c0d6df;
  --form-blue-600: #93b4c1;
  --form-blue-700: #4f6fd4;
  --shadow: 0 25px 60px rgba(12, 23, 38, 0.12);
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  font-family: "Inter", sans-serif;
  background: linear-gradient(180deg, #f6f8fa 0%, #eef2f7 100%);
  color: var(--navy-900);
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button,
input,
textarea {
  font: inherit;
}

.container {
  width: min(var(--container), calc(100% - 2rem));
  margin: 0 auto;
}

.section {
  padding: 110px 0;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--gold-600);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
}

.section-heading {
  max-width: 700px;
  margin-bottom: 42px;
}

.section-heading h3 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.04em;
  color: var(--navy-900);
}

/* ============ Frame ============ */
.page-frame {
  position: fixed;
  top: 0;
  left: 0;
  width: 34px;
  height: 100%;
  background: var(--navy-950);
  z-index: 1200;
  pointer-events: none;
}

/* ============ Top bar ============ */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1100;
  padding-left: 34px;
  background: transparent;
  transition: background 0.35s ease, box-shadow 0.35s ease, backdrop-filter 0.35s ease;
}

.topbar.is-stuck {
  background: rgba(229, 229, 229, 0.94);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(12, 23, 38, 0.1);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 92px;
}

.brand {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-weight: 600;
  font-size: 1.85rem;
  letter-spacing: -0.01em;
  color: var(--navy-950);
  transition: color 0.35s ease;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2.2rem;
  color: var(--navy-900);
  transition: color 0.35s ease;
}

.nav a {
  position: relative;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.005em;
  transition: opacity 0.25s ease;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -7px;
  width: 100%;
  height: 2px;
  background: var(--gold-600);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav a:hover::after,
.nav a:focus-visible::after {
  transform: scaleX(1);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.85rem 1.9rem;
  border-radius: 999px;
  background: var(--navy-950);
  color: var(--white);
  font-size: 0.92rem;
  font-weight: 600;
  transition: background 0.25s ease, transform 0.25s ease;
}

.nav-cta:hover,
.nav-cta:focus-visible {
  background: var(--gold-600);
  color: var(--navy-950);
  transform: translateY(-2px);
}

.topbar.is-stuck .nav-cta {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  color: var(--navy-950);
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(12, 23, 38, 0.18);
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--navy-950);
  margin: 5px auto;
  border-radius: 2px;
}

/* ============ Hero ============ */
.hero {
  position: relative;
  padding-left: 34px;
  background: #adb5bd;
  color: var(--navy-950);
  overflow: hidden;
}

.hero-stage {
  position: relative;
  width: min(1440px, 100%);
  margin: 0 auto;
  height: min(94vh, 860px);
  min-height: 640px;
}

/* Portrait */
.hero-portrait {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  z-index: 2;
  width: clamp(260px, 33vw, 470px);
  height: 94%;
}

.hero-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  mix-blend-mode: multiply;
  filter: contrast(1.06) brightness(1.06) saturate(1.02);
  -webkit-mask-image: radial-gradient(ellipse 50% 70% at 50% 46%, #000 0%, #000 46%, rgba(0, 0, 0, 0) 92%);
  mask-image: radial-gradient(ellipse 50% 70% at 50% 46%, #000 0%, #000 46%, rgba(0, 0, 0, 0) 92%);
}

/* Availability pill, bottom-left, facing the role stack */
.hero-badge {
  position: absolute;
  left: clamp(1.5rem, 5vw, 5rem);
  bottom: clamp(1.5rem, 4vh, 3.5rem);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  background: var(--white);
  box-shadow: 0 14px 34px rgba(12, 23, 38, 0.12);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--navy-900);
  white-space: nowrap;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold-600);
  box-shadow: 0 0 0 5px rgba(199, 167, 91, 0.25);
}

/* Credentials flanking the portrait: three left, two right */
.hero-note {
  position: absolute;
  z-index: 3;
  margin: 0;
  width: clamp(240px, 28vw, 400px);
  padding-top: 0.95rem;
  border-top: 2px solid var(--gold-500);
  font-family: "Anton", "Archivo Black", "Big Shoulders Display", "Inter", sans-serif;
  font-weight: 500;
  font-size: clamp(1.15rem, 1.6vw, 1.55rem);
  line-height: 1.35;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--navy-900);
}

.note-l1,
.note-l2,
.note-l3 {
  left: clamp(1.5rem, 5vw, 5rem);
}

.note-r1,
.note-r2 {
  right: clamp(1.5rem, 5vw, 5rem);
  text-align: right;
}

.note-l1 {
  top: 17%;
}

.note-l2 {
  top: 40%;
}

.note-l3 {
  top: 65%;
}

.note-r1 {
  top: 17%;
}

.note-r2 {
  top: 55%;
}

/* Strip under the hero stage */
.hero-footnote {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2.5rem;
  padding: 1.8rem 0 2.6rem;
  border-top: 1px solid rgba(12, 23, 38, 0.1);
  margin-top: 1.5rem;
}

.hero-footnote > div {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1 1 200px;
  min-width: 0;
  max-width: 32ch;
}

.hero-footnote strong {
  font-size: 0.98rem;
  line-height: 1.35;
  color: var(--navy-900);
}

.hero-footnote .btn {
  margin-left: auto;
}

.meta-label {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray-600);
}

/* Buttons */
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.9rem 1.6rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  color: var(--navy-950);
  box-shadow: 0 18px 30px rgba(199, 167, 91, 0.28);
}

.btn-secondary {
  background: transparent;
  border-color: rgba(12, 23, 38, 0.2);
  color: var(--navy-950);
}

/* Remaining sections sit inside the frame too */
main > section:not(.hero),
.footer {
  padding-left: 34px;
}

.about-section {
  background: rgba(255, 255, 255, 0.6);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2rem;
  align-items: start;
}

.about-portrait {
  grid-column: 1 / -1;
  margin: 0 0 0.6rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(180deg, rgba(16, 34, 56, 0.06), rgba(16, 34, 56, 0.02));
  box-shadow: 0 20px 45px rgba(16, 34, 56, 0.08);
  aspect-ratio: 16 / 7;
}

.about-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  display: block;
}

.about-copy {
  font-size: 1.04rem;
  color: var(--gray-700);
}

.about-copy p {
  margin-top: 0;
}

.expertise-box {
  background: var(--white);
  border: 1px solid rgba(16, 34, 56, 0.08);
  box-shadow: 0 20px 45px rgba(16, 34, 56, 0.04);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.expertise-box h4 {
  margin-top: 0;
  margin-bottom: 1.2rem;
  font-size: 1.3rem;
  color: var(--navy-900);
}

.expertise-box ul {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.9rem;
  color: var(--gray-700);
}

.timeline-section {
  background: linear-gradient(180deg, rgba(16, 34, 56, 0.03), rgba(16, 34, 56, 0.01));
}

.timeline {
  position: relative;
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 12.5%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, rgba(199, 167, 91, 0.5), rgba(16,34,56,0.1));
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1.5rem;
  align-items: start;
  padding-left: 2rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: calc(12.5% - 6px);
  top: 0.8rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold-500);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 4px rgba(199, 167, 91, 0.2);
}

.timeline-date {
  font-weight: 700;
  color: var(--navy-800);
  padding-top: 0.35rem;
}

.timeline-content {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(16, 34, 56, 0.08);
  box-shadow: 0 18px 40px rgba(16,34,56,0.05);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.timeline-content h4 {
  margin: 0 0 0.25rem;
  font-size: 1.4rem;
  color: var(--navy-900);
}

.institution {
  margin: 0 0 0.9rem;
  color: var(--gold-600);
  font-weight: 600;
}

.timeline-content ul {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.45rem;
  color: var(--gray-700);
}

.skills-section {
  background: var(--white);
}

.skill-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.skill-group {
  background: linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
  border: 1px solid rgba(16,34,56,0.08);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.skill-group h4 {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  color: var(--navy-900);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.tag-list span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  background: rgba(16, 34, 56, 0.05);
  border: 1px solid rgba(16, 34, 56, 0.08);
  color: var(--navy-900);
  font-size: 0.82rem;
  font-weight: 600;
}

.services-section {
  background: rgba(12, 23, 38, 0.02);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.3rem;
}

.service-card {
  background: var(--white);
  border: 1px solid rgba(16, 34, 56, 0.08);
  border-radius: var(--radius-lg);
  padding: 1.7rem 1.4rem;
  box-shadow: 0 16px 30px rgba(16,34,56,0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 44px rgba(16,34,56,0.08);
}

.icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(199,167,91,0.18), rgba(16,34,56,0.08));
  color: var(--navy-900);
  font-size: 0.8rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.service-card h4 {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  color: var(--navy-900);
}

.service-card p {
  margin: 0;
  color: var(--gray-700);
}

.contact-section {
  background: #ddd5ca;
  color: var(--navy-900);
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 2rem;
  align-items: start;
}

.contact-avatar {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  display: block;
  margin-bottom: 1.1rem;
  border: 3px solid var(--white);
  box-shadow: 0 12px 30px rgba(16, 34, 56, 0.16);
}

.contact-info h3 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.contact-info > p {
  margin: 0 0 1.5rem;
  color: var(--gray-700);
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.contact-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(12, 23, 38, 0.14);
  color: var(--gray-700);
}

.contact-list li span:first-child {
  color: var(--gold-600);
  font-weight: 600;
}

.contact-list a {
  color: var(--navy-900);
}

.contact-form {
  background: var(--form-blue);
  border: 1px solid var(--form-blue-600);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.field-row {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 1.15rem;
}

.field-row label {
  color: var(--navy-950);
  font-weight: 600;
}

.field-row input,
.field-row textarea {
  width: 100%;
  border: 1px solid var(--form-blue-600);
  background: rgba(255, 255, 255, 0.82);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  color: var(--navy-950);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.field-row input:focus,
.field-row textarea:focus {
  outline: none;
  border-color: var(--form-blue-700);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(79, 111, 212, 0.3);
}

.field-row input::placeholder,
.field-row textarea::placeholder {
  color: rgba(12, 23, 38, 0.45);
}

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

.btn-block {
  width: 100%;
  border: none;
}

.contact-form .btn-primary {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  color: var(--navy-950);
  box-shadow: 0 18px 30px rgba(185, 145, 54, 0.35);
}

.contact-form .btn-primary:hover,
.contact-form .btn-primary:focus-visible {
  box-shadow: 0 22px 38px rgba(185, 145, 54, 0.45);
}

.form-status {
  min-height: 1.3em;
  margin: 0.8rem 0 0;
  color: var(--navy-900);
  font-size: 0.92rem;
}

.form-status-link {
  color: var(--gold-600);
  font-weight: 700;
  text-decoration: underline;
}

.footer {
  background: #0a1320;
  color: rgba(255,255,255,0.7);
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: 72px;
}

.footer a {
  color: var(--gold-500);
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1180px) {
  .nav {
    gap: 1.4rem;
  }

  .hero-note {
    width: clamp(200px, 24vw, 305px);
    font-size: clamp(1.05rem, 1.4vw, 1.3rem);
  }
}

@media (max-width: 980px) {
  .about-grid,
  .contact-grid,
  .services-grid {
    grid-template-columns: 1fr;
  }

  .about-portrait {
    aspect-ratio: 16 / 10;
  }

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

  .skill-groups {
    grid-template-columns: 1fr;
  }

  .nav {
    display: none;
  }

  .hero-stage {
    height: auto;
    min-height: 0;
    padding: 130px 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .hero-portrait,
  .hero-badge,
  .hero-note {
    position: static;
    transform: none;
  }

  .hero-portrait {
    width: min(420px, 80%);
    height: auto;
    margin: -0.5rem 0 1.6rem;
  }

  .hero-portrait img {
    height: auto;
    aspect-ratio: 3 / 4;
    -webkit-mask-image: radial-gradient(ellipse 52% 62% at 50% 46%, #000 0%, #000 40%, rgba(0, 0, 0, 0) 88%);
    mask-image: radial-gradient(ellipse 52% 62% at 50% 46%, #000 0%, #000 40%, rgba(0, 0, 0, 0) 88%);
  }

  .hero-badge {
    margin-bottom: 1.2rem;
  }

  .hero-note {
    width: min(420px, 88%);
    text-align: center;
    font-size: clamp(1.05rem, 3.6vw, 1.35rem);
    margin-bottom: 1.5rem;
  }

  .note-r1,
  .note-r2 {
    text-align: center;
  }

  .hero-footnote {
    gap: 1.6rem;
  }

  .hero-footnote .btn {
    margin-left: 0;
  }
}

@media (max-width: 760px) {
  .page-frame {
    width: 16px;
  }

  .topbar,
  .hero,
  main > section:not(.hero),
  .footer {
    padding-left: 16px;
  }

  .nav-toggle {
    display: block;
  }

  .nav-cta {
    display: none;
  }

  .nav {
    position: absolute;
    top: 84px;
    left: 1rem;
    right: 1rem;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
    padding: 1.1rem 1.2rem 1.4rem;
    background: rgba(12, 23, 38, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow: var(--shadow);
    color: var(--white);
  }

  .nav.is-open {
    display: flex;
  }

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

  .hero-footnote > div {
    max-width: 100%;
  }

  .timeline::before {
    left: 22px;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    padding-left: 2.6rem;
  }

  .timeline-date {
    padding-top: 0;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .footer-wrap,
  .contact-list li {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.form-status.is-error {
  color: #a3221a;
}

.form-status.is-success {
  color: #15633a;
}

.contact-form button[disabled] {
  opacity: 0.65;
  cursor: progress;
  transform: none;
}

/* ============ Language switcher ============ */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(12, 23, 38, 0.06);
  border: 1px solid rgba(12, 23, 38, 0.1);
}

.lang-btn {
  min-width: 40px;
  padding: 0.4rem 0.65rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--navy-900);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}

.lang-btn[lang="ar"] {
  font-family: "Cairo", "Inter", sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0;
}

.lang-btn:hover {
  color: var(--gold-600);
}

.lang-btn.is-active {
  background: var(--navy-950);
  color: var(--white);
}

.topbar.is-stuck .lang-switch {
  background: rgba(12, 23, 38, 0.07);
  border-color: rgba(12, 23, 38, 0.14);
}

.topbar.is-stuck .lang-btn.is-active {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  color: var(--navy-950);
}

/* ============ Arabic typography ============ */
[lang="ar"] body,
html[lang="ar"] body {
  font-family: "Cairo", "Inter", sans-serif;
  line-height: 1.9;
}

html[lang="ar"] .brand {
  font-family: "Amiri", "Cormorant Garamond", serif;
  font-style: normal;
}

html[lang="ar"] .hero-note {
  font-family: "Cairo", sans-serif;
  font-weight: 600;
  line-height: 1.7;
  letter-spacing: 0;
}

html[lang="ar"] .section-heading h3,
html[lang="ar"] .contact-info h3 {
  letter-spacing: 0;
  line-height: 1.35;
}

html[lang="ar"] .eyebrow,
html[lang="ar"] .meta-label {
  letter-spacing: 0.04em;
}

/* ============ Right-to-left layout ============ */
[dir="rtl"] .page-frame {
  left: auto;
  right: 0;
}

[dir="rtl"] .topbar,
[dir="rtl"] .hero,
[dir="rtl"] main > section:not(.hero),
[dir="rtl"] .footer {
  padding-left: 0;
  padding-right: 34px;
}

[dir="rtl"] .nav a::after {
  transform-origin: right;
}

[dir="rtl"] .hero-badge {
  left: auto;
  right: clamp(1.5rem, 5vw, 5rem);
}

[dir="rtl"] .note-l1,
[dir="rtl"] .note-l2,
[dir="rtl"] .note-l3 {
  left: auto;
  right: clamp(1.5rem, 5vw, 5rem);
  text-align: right;
}

[dir="rtl"] .note-r1,
[dir="rtl"] .note-r2 {
  right: auto;
  left: clamp(1.5rem, 5vw, 5rem);
  text-align: left;
}

[dir="rtl"] .hero-footnote .btn {
  margin-left: 0;
  margin-right: auto;
}

[dir="rtl"] .expertise-box ul,
[dir="rtl"] .timeline-content ul {
  padding-left: 0;
  padding-right: 1.1rem;
}

[dir="rtl"] .timeline::before {
  left: auto;
  right: 12.5%;
}

[dir="rtl"] .timeline-item {
  padding-left: 0;
  padding-right: 2rem;
}

[dir="rtl"] .timeline-item::before {
  left: auto;
  right: calc(12.5% - 6px);
}

@media (max-width: 760px) {
  [dir="rtl"] .page-frame {
    left: auto;
    right: 0;
  }

  [dir="rtl"] .topbar,
  [dir="rtl"] .hero,
  [dir="rtl"] main > section:not(.hero),
  [dir="rtl"] .footer {
    padding-left: 0;
    padding-right: 16px;
  }

  [dir="rtl"] .timeline::before {
    left: auto;
    right: 22px;
  }

  [dir="rtl"] .timeline-item {
    padding-left: 0;
    padding-right: 2.6rem;
  }
}

@media (max-width: 980px) {
  [dir="rtl"] .hero-note {
    align-items: center;
    text-align: center;
  }

  [dir="rtl"] .hero-footnote .btn {
    margin-right: 0;
  }
}

@media (max-width: 520px) {
  .lang-btn {
    min-width: 32px;
    padding: 0.35rem 0.45rem;
    font-size: 0.7rem;
  }

  .nav-actions {
    gap: 0.5rem;
  }
}

/* Arabic sets on a larger body than Latin at the same px size: scale the
   statements down so the hero keeps the reference proportions. */
html[lang="ar"] .hero-note {
  font-size: clamp(1.05rem, 1.4vw, 1.35rem);
}

/* Year ranges must keep their reading order in RTL: bidi would otherwise
   flip "2007 – 2016" into "2016 – 2007". */
[dir="rtl"] .timeline-date {
  direction: ltr;
  text-align: right;
}

/* The availability pill is a WhatsApp link */
a.hero-badge {
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}

a.hero-badge:hover,
a.hero-badge:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(12, 23, 38, 0.18);
  color: var(--gold-600);
}

.badge-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #25d366;
}
