:root {
  --accent: #3d5a45;
  --accent-dark: #2f4636;
  --text: #1c1917;
  --muted: #57534e;
  --line: #e7e5e4;
  --bg: #ffffff;
  --soft: #fafaf9;
  --font-ar: "Cairo", "Inter", sans-serif;
  --font-en: "Inter", "Cairo", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-ar);
  -webkit-font-smoothing: antialiased;
}

html[lang="en"] body {
  font-family: var(--font-en);
}

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

a {
  color: inherit;
}

button,
a,
.btn {
  -webkit-tap-highlight-color: transparent;
  font-family: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.container {
  width: min(1152px, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  border-bottom-color: rgba(231, 229, 228, 0.9);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

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

.brand {
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.nav-links {
  display: none;
  list-style: none;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: inline-block;
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
}

.nav-links a:hover {
  background: #f5f5f4;
  color: var(--accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.lang-switch button {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 0.375rem;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  font: inherit;
}

.lang-switch button.active {
  background: var(--accent);
  color: #fff;
}

.lang-switch span {
  color: #d6d3d1;
}

.menu-btn {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: #fff;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  border-top: 1px solid var(--line);
  background: #fff;
}

.mobile-menu.open {
  display: block;
}

.mobile-menu a {
  display: block;
  padding: 0.85rem 1rem;
  text-decoration: none;
  color: #44403c;
  font-weight: 500;
}

.mobile-menu a:hover {
  background: #fafaf9;
  color: var(--accent);
}

.section {
  scroll-margin-top: 80px;
  padding: 4rem 0;
  border-bottom: 1px solid #f5f5f4;
}

.section-soft {
  background: rgba(250, 250, 249, 0.7);
}

.section-title {
  margin: 0;
  text-align: center;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  letter-spacing: -0.02em;
}

.section-subtitle {
  margin: 0.75rem auto 0;
  max-width: 40rem;
  text-align: center;
  color: var(--muted);
}

.hero {
  background: linear-gradient(to bottom, #fafaf9, #ffffff);
}

.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.hero-photo {
  position: relative;
  width: min(100%, 24rem);
  margin-inline: auto;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 1.5rem;
  border: 1px solid var(--line);
  background: #f5f5f4;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.hero-copy {
  text-align: center;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(2.25rem, 5vw, 3rem);
  letter-spacing: -0.03em;
}

.roles {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
}

.roles li {
  margin: 0.4rem 0;
  color: var(--accent);
  font-weight: 700;
  font-size: 1.05rem;
}

.hero-desc {
  margin: 1.25rem auto 0;
  max-width: 36rem;
  color: var(--muted);
  line-height: 1.7;
}

.hero-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid transparent;
  text-decoration: none;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-dark);
}

.btn-secondary {
  background: #fff;
  color: var(--accent);
  border-color: var(--line);
}

.btn-secondary:hover {
  border-color: var(--accent);
  background: #fafaf9;
}

.impact-grid {
  margin-top: 2.5rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.impact-card {
  text-align: center;
  padding: 1.25rem 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(250, 250, 249, 0.75);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.impact-card .value {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.impact-card .label {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
}

.carousel {
  margin-top: 2.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 48rem;
  margin-inline: auto;
}

.carousel-arrow {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: #292524;
  cursor: pointer;
  padding: 0.25rem;
}

.carousel-arrow:hover {
  opacity: 0.6;
}

.carousel-main {
  flex: 1;
  min-width: 0;
}

.video-frame {
  position: relative;
  width: min(100%, 360px);
  margin-inline: auto;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 1rem;
  background: #e7e5e4;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.video-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #e7e5e4;
}

.dots {
  margin-top: 1.25rem;
  display: flex;
  justify-content: center;
  gap: 0.6rem;
}

.dots button {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 0;
  background: #d6d3d1;
  cursor: pointer;
  padding: 0;
}

.dots button.active {
  background: #44403c;
}

.panel {
  margin-top: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(250, 250, 249, 0.75);
  padding: 1.5rem;
}

.panel h3,
.block h3 {
  margin: 0 0 0.75rem;
  font-size: 1.125rem;
}

.panel p,
.block p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.timeline {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  border-inline-start: 1px solid var(--line);
}

.timeline > li {
  position: relative;
  padding-inline-start: 1.5rem;
  margin-bottom: 1.25rem;
}

.timeline > li::before {
  content: "";
  position: absolute;
  inset-inline-start: -7px;
  top: 0.45rem;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 2px solid var(--accent);
  background: #fff;
}

.job-card {
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #fff;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.job-card h4 {
  margin: 0;
  font-size: 1.05rem;
}

.job-org {
  margin-top: 0.25rem;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
}

.job-period {
  margin-top: 0.25rem;
  color: #78716c;
  font-size: 0.875rem;
}

.job-card ul {
  margin: 0.85rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.job-card ul li {
  position: relative;
  padding-inline-start: 1.1rem;
  margin-bottom: 0.45rem;
}

.job-card ul li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
}

.two-col {
  margin-top: 1.5rem;
  display: grid;
  gap: 1.25rem;
}

.block {
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #fff;
  padding: 1.5rem;
}

.cert-list,
.skill-list {
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.cert-list li,
.skill-list li {
  display: flex;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 0.45rem;
}

.cert-list li::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-top: 0.55rem;
  border-radius: 999px;
  background: var(--accent);
  flex: 0 0 auto;
}

.skill-list strong {
  display: block;
  color: #292524;
  margin-bottom: 0.15rem;
}

.cv-box {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
  border: 1px solid rgba(61, 90, 69, 0.2);
  background: rgba(61, 90, 69, 0.05);
  border-radius: 1rem;
  padding: 1.5rem;
}

.contact-wrap {
  max-width: 36rem;
  margin: 2rem auto 0;
  text-align: center;
}

.contact-list {
  margin-top: 1.75rem;
  display: grid;
  gap: 0.75rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-align: start;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #fff;
  padding: 1rem 1.15rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.contact-item:hover {
  border-color: rgba(61, 90, 69, 0.4);
  background: #fafaf9;
}

.contact-icon {
  width: 40px;
  height: 40px;
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(61, 90, 69, 0.1);
  color: var(--accent);
  flex: 0 0 auto;
  line-height: 0;
}

.contact-icon svg {
  width: 20px;
  height: 20px;
  display: block;
  flex-shrink: 0;
}

.contact-item strong {
  display: block;
  font-size: 0.875rem;
}

.contact-item span {
  display: block;
  margin-top: 0.15rem;
  color: #78716c;
  font-size: 0.875rem;
  direction: ltr;
  unicode-bidi: isolate;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0;
  text-align: center;
}

.site-footer p {
  margin: 0 auto;
  max-width: 40rem;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.7;
}

.footer-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.footer-social {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-decoration: none;
}

.footer-social a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.footer-copy {
  margin-top: 1rem !important;
  color: #a8a29e !important;
  font-size: 0.75rem !important;
}

.fade-in {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 640px) {
  .hero-actions {
    flex-direction: row;
    justify-content: center;
  }

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

  .cv-box {
    flex-direction: row;
    align-items: center;
  }
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }

  .menu-btn {
    display: none;
  }

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

  html[lang="ar"] .hero-photo-wrap {
    order: 2;
  }

  html[lang="ar"] .hero-copy {
    order: 1;
    text-align: start;
  }

  html[lang="en"] .hero-copy {
    text-align: start;
  }

  html[lang="ar"] .hero-actions,
  html[lang="en"] .hero-actions {
    justify-content: flex-start;
  }

  .two-col {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .impact-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
