/* ============================================================
   Karwan Gaznay — Portfolio
   Slate & Gold · Obama-weight typography
   ============================================================ */

:root {
  --color-bg: #1C2128;
  --color-bg-alt: #242A33;
  --color-surface: #2D3440;
  --color-surface-hi: #353C4A;
  --color-footer: #141820;
  --color-text: #F0EDE8;
  --color-text-muted: #9BA3AE;
  --color-accent: #C9A84C;
  --color-accent-alt: #E8C76A;
  --color-white: #FFFFFF;
  --color-border: rgba(255, 255, 255, 0.08);
  --color-accent-soft: rgba(201, 168, 76, 0.4);

  --display: "Bebas Neue", Impact, sans-serif;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
  --shadow-soft: 0 14px 34px rgba(0, 0, 0, 0.32);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --nav-h: 78px;
  --maxw: 1180px;
  --pad: 24px;
}

/* ----------------------------- Reset ----------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

/* Keep anchored sections clear of the fixed navbar */
section[id] { scroll-margin-top: calc(var(--nav-h) + 10px); }

body {
  font-family: var(--sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.75;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

::selection { background: var(--color-accent); color: var(--color-bg); }

/* Scrollbar */
* { scrollbar-width: thin; scrollbar-color: var(--color-accent) var(--color-bg); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb { background: var(--color-accent); }
::-webkit-scrollbar-thumb:hover { background: var(--color-accent-alt); }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.section { padding: 104px 0; }

/* ----------------------------- Shared bits ----------------------------- */
.gold-rule {
  width: 100%;
  height: 3px;
  background: var(--color-accent);
  margin: 24px 0;
}

.section-marker {
  width: 48px;
  height: 3px;
  background: var(--color-accent);
  margin-bottom: 20px;
}

.section-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(36px, 5vw, 52px);
  line-height: 1.1;
  color: var(--color-white);
  letter-spacing: -0.01em;
}

.section-intro {
  max-width: 640px;
  margin-top: 18px;
  color: var(--color-text-muted);
  font-size: 17px;
}

/* ----------------------------- Buttons ----------------------------- */
.btn {
  position: relative;
  display: inline-block;
  padding: 15px 34px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 2px solid transparent;
  cursor: pointer;
  overflow: hidden;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
/* Sheen sweep on hover */
.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -45%;
  width: 35%;
  height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: skewX(-20deg);
  pointer-events: none;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--color-accent); color: var(--color-bg); border-color: var(--color-accent); }
.btn-primary:hover { background: var(--color-accent-alt); border-color: var(--color-accent-alt); box-shadow: 0 10px 26px rgba(201, 168, 76, 0.25); }
.btn-secondary { background: transparent; color: var(--color-white); border-color: var(--color-white); }
.btn-secondary:hover { background: var(--color-white); color: var(--color-bg); box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3); }

/* ============================= NAVBAR ============================= */
.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  background: transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.navbar.scrolled {
  background: rgba(28, 33, 40, 0.86);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--color-accent-soft);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}
@supports not (backdrop-filter: blur(14px)) {
  .navbar.scrolled { background: var(--color-bg); }
}

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 140;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-alt));
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}
.rtl .scroll-progress { transform-origin: right; }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--display);
  font-size: 30px;
  letter-spacing: 0.06em;
  color: var(--color-accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-link {
  position: relative;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-white);
  padding: 6px 0;
  transition: color 0.25s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--color-accent);
  transition: width 0.25s ease;
}
.nav-link:hover { color: var(--color-accent); }
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }
.nav-link.active { color: var(--color-accent); }

/* Language switch */
.lang-switch {
  display: flex;
  gap: 6px;
  margin-left: 8px;
  padding-left: 20px;
  border-left: 1px solid var(--color-border);
}
.lang-btn {
  background: transparent;
  border: 1px solid var(--color-border);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding: 5px 10px;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.lang-btn:hover { color: var(--color-accent); border-color: var(--color-accent-soft); }
.lang-btn.active { color: var(--color-accent); border-color: var(--color-accent); }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.hamburger span {
  width: 26px; height: 2px;
  background: var(--color-white);
  transition: background 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================= HERO ============================= */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh; /* stable on mobile browsers with collapsing URL bar */
  display: flex;
  align-items: center;
  background-color: var(--color-bg);
  color: var(--color-text);
  overflow: hidden;
}

/* Photo layer — flipped in LTR so the subject sits on the right,
   away from the left-aligned text. RTL keeps the original orientation. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url("hero.jpeg") center center / cover no-repeat;
  transform: scaleX(-1);
}
.rtl .hero::before { transform: none; }

/* Gradient overlay layer — darkens the side where the text sits. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(
      90deg,
      rgba(20, 24, 32, 0.96) 0%,
      rgba(28, 33, 40, 0.88) 38%,
      rgba(28, 33, 40, 0.55) 100%
    ),
    linear-gradient(
      to top,
      rgba(20, 24, 32, 0.85) 0%,
      rgba(28, 33, 40, 0) 45%
    );
}
.rtl .hero::after {
  background:
    linear-gradient(
      270deg,
      rgba(20, 24, 32, 0.96) 0%,
      rgba(28, 33, 40, 0.88) 38%,
      rgba(28, 33, 40, 0.55) 100%
    ),
    linear-gradient(
      to top,
      rgba(20, 24, 32, 0.85) 0%,
      rgba(28, 33, 40, 0) 45%
    );
}

/* Diagonal geometric shape */
.hero-shape {
  position: absolute;
  inset: 0;
  background: var(--color-accent);
  opacity: 0.03;
  clip-path: polygon(0 100%, 60% 100%, 100% 0, 40% 0);
  z-index: 1;
  pointer-events: none;
}

/* Particle drift */
.hero-particles { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.hero-particles span {
  position: absolute;
  bottom: -10px;
  width: 2px; height: 2px;
  background: var(--color-accent);
  opacity: 0;
}

.hero-inner {
  position: relative;
  z-index: 2;
  padding-top: calc(var(--nav-h) + 30px);
  padding-bottom: 40px;
  width: 100%;
}

.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
}

.hero-name {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(64px, 12vw, 120px);
  line-height: 0.92;
  letter-spacing: -1px;
  color: var(--color-white);
  margin-top: 14px;
}

.hero .gold-rule { max-width: 560px; margin: 22px 0; }

.hero-title {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
}
.hero-title-sub {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
}

.hero-tagline {
  margin-top: 18px;
  max-width: 600px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 26px;
  line-height: 1.4;
  color: var(--color-text);
}

.hero-cta {
  display: flex;
  gap: 16px;
  margin-top: 38px;
  flex-wrap: wrap;
}

/* Hero stats row */
.hero-stats {
  display: flex;
  gap: 0;
  margin-top: 64px;
  flex-wrap: wrap;
}
.hero-stat {
  padding: 0 36px;
  border-left: 1px solid var(--color-border);
}
.hero-stat:first-child { padding-left: 0; border-left: none; }
.hero-stat-num {
  display: block;
  font-family: var(--display);
  font-size: 56px;
  line-height: 1;
  color: var(--color-accent);
  letter-spacing: 0.01em;
}
.hero-stat-label {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-white);
}

/* ============================= ABOUT ============================= */
.about { background: var(--color-bg-alt); }

.two-col {
  display: flex;
  gap: 64px;
  align-items: flex-start;
}

.about-photo {
  position: relative;
  flex: 0 0 38%;
  border: 2px solid var(--color-accent);
  background: var(--color-surface);
  padding: 0;
  line-height: 0;
  overflow: hidden;
}
.about-photo .about-img { transition: transform 0.7s var(--ease); }
.about-photo:hover .about-img { transform: scale(1.03); }
.photo-corner {
  position: absolute;
  top: -2px; left: -2px;
  width: 46px; height: 46px;
  border-top: 5px solid var(--color-accent);
  border-left: 5px solid var(--color-accent);
  z-index: 2;
}
.about-img {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 6;
  object-fit: cover;
  object-position: center top;
}
.about-body { flex: 1; }
.about-text {
  margin-top: 18px;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.85;
  color: var(--color-text);
}

.stat-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 40px;
}
.stat-card {
  position: relative;
  min-width: 0;
  min-height: 176px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0%, rgba(201, 168, 76, 0.13), transparent 42%),
    linear-gradient(145deg, var(--color-surface-hi), var(--color-surface));
  border: 1px solid var(--color-border);
  border-top: 2px solid var(--color-accent);
  padding: 24px;
  transition: background 0.35s var(--ease), transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.stat-card::after {
  content: "";
  position: absolute;
  right: -24px;
  bottom: -34px;
  width: 92px;
  height: 92px;
  border: 1px solid rgba(201, 168, 76, 0.12);
  transform: rotate(45deg);
}
.stat-card:hover { transform: translateY(-5px); border-color: rgba(201, 168, 76, 0.5); box-shadow: var(--shadow-soft); }
.stat-number {
  display: block;
  font-family: var(--display);
  font-size: clamp(48px, 5vw, 62px);
  color: var(--color-accent);
  line-height: 0.95;
  letter-spacing: 0.01em;
}
.stat-number-word {
  font-size: clamp(27px, 3vw, 36px);
  line-height: 1.05;
  max-width: 100%;
}
.stat-label {
  display: block;
  position: relative;
  z-index: 1;
  margin-top: 24px;
  max-width: 22ch;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.55;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--color-text);
}

/* ============================= PLATFORM ============================= */
.platform {
  background:
    radial-gradient(circle at 85% 15%, rgba(201, 168, 76, 0.055), transparent 30%),
    var(--color-bg);
}

.platform-block { margin-top: 56px; }
.platform-block:first-of-type { margin-top: 44px; }

.subsection-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(24px, 3vw, 32px);
  color: var(--color-white);
  margin-bottom: 8px;
}
.subsection-intro {
  color: var(--color-text-muted);
  font-size: 16px;
  margin-bottom: 28px;
  max-width: 560px;
}

/* — Current Positions — */
.positions-block {
  padding-bottom: 0;
}

.position-card {
  position: relative;
  background: linear-gradient(145deg, var(--color-surface), rgba(45, 52, 64, 0.78));
  border-left: 3px solid var(--color-accent);
  padding: 28px 30px;
  cursor: pointer;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease), transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.position-card:hover {
  background: var(--color-surface-hi);
  border-left-color: var(--color-accent-alt);
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
}
.position-card:focus-visible {
  background: var(--color-surface-hi);
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  transform: translateY(-3px);
}

.position-featured {
  display: flex;
  align-items: flex-start;
  gap: 28px;
  padding: 36px 38px;
  margin-bottom: 22px;
  border-top: 3px solid var(--color-accent);
  border-left: 3px solid var(--color-accent);
  background:
    linear-gradient(135deg, rgba(201, 168, 76, 0.06) 0%, transparent 55%),
    var(--color-surface);
}
.position-featured:hover { transform: translateY(-4px); }
.position-featured:focus-visible { transform: translateY(-4px); }

.position-badge {
  position: absolute;
  top: 0; right: 0;
  background: var(--color-accent);
  color: var(--color-bg);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 14px;
}

.position-icon {
  flex: 0 0 auto;
  color: var(--color-accent);
  margin-top: 4px;
}
.position-body { flex: 1; min-width: 0; }

.position-num {
  display: block;
  font-family: var(--display);
  font-size: 40px;
  line-height: 1;
  color: var(--color-accent);
  opacity: 0.45;
  margin-bottom: 14px;
}

.position-org {
  display: block;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 8px;
}

.position-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  color: var(--color-white);
  line-height: 1.25;
}
.position-featured .position-title { font-size: 28px; }

.position-desc {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-text-muted);
}

.positions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin-top: 48px;
}

/* ============================= TIMELINE ============================= */
.timeline { background: var(--color-bg-alt); }

.timeline-track {
  position: relative;
  margin-top: 60px;
}
.timeline-track::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    var(--color-accent-soft) 6%,
    var(--color-accent-soft) 94%,
    transparent 100%
  );
}

.timeline-entry {
  position: relative;
  display: flex;
  width: 50%;
  padding: 0 46px 46px 0;
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.timeline-entry:nth-child(even) {
  margin-left: 50%;
  padding: 0 0 46px 46px;
  justify-content: flex-start;
  transform: translateX(40px);
}
.timeline-entry:nth-child(odd) { justify-content: flex-end; text-align: right; }
.timeline-entry.visible { opacity: 1; transform: translateX(0); }

.timeline-content {
  position: relative;
  background: var(--color-surface);
  border-left: 3px solid var(--color-accent);
  padding: 22px 26px;
  max-width: 380px;
  transition: background 0.35s var(--ease), transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.timeline-content:hover { background: var(--color-surface-hi); transform: translateY(-3px); box-shadow: var(--shadow-soft); }

/* node dot */
.timeline-entry::after {
  content: "";
  position: absolute;
  top: 26px;
  width: 12px; height: 12px;
  background: var(--color-accent);
  border: 3px solid var(--color-white);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(201, 168, 76, 0.14);
}
.timeline-entry:nth-child(odd)::after { right: -7px; }
.timeline-entry:nth-child(even)::after { left: -7px; }

.timeline-year {
  display: inline-block;
  font-family: var(--display);
  font-size: 32px;
  color: var(--color-accent);
  line-height: 1;
}
.timeline-heading {
  margin-top: 6px;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--color-white);
}
.timeline-desc { margin-top: 8px; font-size: 15px; color: var(--color-text-muted); }

/* ============================= MEDIA ============================= */
.media { background: var(--color-bg); }
.media-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
  margin-bottom: 28px;
}

.media-tab {
  background: transparent;
  border: 1px solid var(--color-border);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding: 10px 16px;
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.media-tab:hover,
.media-tab:focus-visible {
  color: var(--color-accent);
  border-color: var(--color-accent-soft);
  outline: none;
  transform: translateY(-2px);
}

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

.media-tab.active {
  color: var(--color-bg);
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.media-panel {
  opacity: 1;
  transform: translateY(0);
}

.media-panel[hidden] { display: none; }

.media-grid.pulse-highlight {
  box-shadow: 0 0 0 0 rgba(201, 168, 76, 0);
}

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

.video-card {
  background: var(--color-surface);
  border-top: 3px solid var(--color-accent);
  cursor: pointer;
  overflow: hidden;
  transition: background 0.35s var(--ease), transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.video-card:hover,
.video-card:focus-visible { background: var(--color-surface-hi); transform: translateY(-5px); outline: none; box-shadow: var(--shadow-soft); }
.video-card:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

.video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background:
    repeating-linear-gradient(45deg, #20262E 0 10px, #262D36 10px 20px);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform 0.6s var(--ease);
}
.video-card:hover .video-thumb { transform: scale(1.04); }
.video-thumb.has-thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(20, 24, 32, 0.35);
  transition: background 0.25s ease;
}
.video-card:hover .video-thumb.has-thumb::before {
  background: rgba(20, 24, 32, 0.2);
}
.video-thumb .play-btn {
  position: relative;
  z-index: 1;
}
.play-btn {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: transparent;
  border: 2px solid var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 4px;
  transition: transform 0.25s ease, background 0.25s ease;
}
.play-btn svg path { fill: var(--color-accent); transition: fill 0.25s ease; }
.video-card:hover .play-btn { background: var(--color-accent); transform: scale(1.08); }
.video-card:hover .play-btn svg path { fill: var(--color-bg); }
.play-btn-lg { width: 76px; height: 76px; }

.video-meta { padding: 18px 20px; }
.video-title { font-family: var(--sans); font-weight: 600; font-size: 16px; color: var(--color-white); }

/* ============================= CONTACT ============================= */
.contact { background: var(--color-bg-alt); }
.contact-info { flex: 0 0 38%; }
.contact-text { margin-top: 18px; color: var(--color-text-muted); font-size: 17px; }

.social-links { display: flex; gap: 14px; margin-top: 30px; }
.social-link {
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.social-link:hover { color: var(--color-accent); border-color: var(--color-accent); transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3); }

.contact-form {
  flex: 1;
  padding: 30px;
  background: rgba(45, 52, 64, 0.38);
  border: 1px solid var(--color-border);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.14);
}
.field { margin-bottom: 20px; }
.field label, .field legend {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: var(--color-text);
  text-align: start;
}
.field input, .field textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 15px;
  padding: 14px 15px;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
  text-align: start;
  transition: border-color 0.25s ease;
}
.field input::placeholder, .field textarea::placeholder { color: var(--color-text-muted); }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: transparent;
  border-bottom: 2px solid var(--color-accent);
}
.field textarea { resize: vertical; }
.field input.error, .field textarea.error { border-color: #E5534B; }

.checkbox-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  border: 1px solid var(--color-border);
  padding: 18px;
}
.checkbox-group legend {
  padding: 0 8px;
  margin-inline-start: -8px;
}
.checkbox-group .checkbox {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 50px;
  margin: 0;
  padding: 11px 12px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.35;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  color: var(--color-text);
  text-align: start;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.checkbox-group .checkbox:hover { border-color: rgba(201, 168, 76, 0.55); background: var(--color-surface); }
.checkbox-group .checkbox input {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  margin: 0;
  padding: 0;
  border: 1.5px solid var(--color-accent);
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: background 0.2s ease;
}
.checkbox-group .checkbox input:checked { background: var(--color-accent); }
.checkbox-group .checkbox input:checked::after {
  content: "";
  position: absolute;
  top: 2px; left: 6px;
  width: 4px; height: 9px;
  border: solid var(--color-bg);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.checkbox-group .checkbox input:focus-visible { outline: 2px solid var(--color-accent-alt); outline-offset: 2px; }

.success-banner,
.error-banner {
  background: var(--color-surface);
  color: var(--color-white);
  padding: 16px 18px;
  margin-bottom: 24px;
  font-weight: 500;
  font-size: 15px;
  border-left: 4px solid var(--color-accent);
}
.error-banner { border-left-color: #E5534B; }
.rtl .success-banner,
.rtl .error-banner { border-left: none; border-right: 4px solid var(--color-accent); }
.rtl .error-banner { border-right-color: #E5534B; }

.contact-form .btn-primary { width: 100%; text-align: center; }

/* ============================= FOOTER ============================= */
.footer {
  background: var(--color-footer);
  color: var(--color-text);
  padding: 60px 0 40px;
  text-align: center;
}
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.footer-name { font-family: var(--display); font-size: 38px; color: var(--color-accent); letter-spacing: 0.03em; }
.footer-rule {
  width: 80px; height: 1px;
  background: var(--color-accent);
  margin: -10px 0 4px;
}
.footer-nav { display: flex; gap: 28px; flex-wrap: wrap; justify-content: center; }
.footer-nav a {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  transition: color 0.25s ease;
}
.footer-nav a:hover { color: var(--color-white); }
.footer-social { margin: 0; }
.footer-social .social-link { border-color: var(--color-border); color: var(--color-text-muted); }
.footer-social .social-link:hover { color: var(--color-accent); border-color: var(--color-accent); }
.footer-copy {
  font-size: 12px;
  color: var(--color-text-muted);
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  border-top: 1px solid var(--color-border);
  padding-top: 24px;
  width: 100%;
}
/* ============================= MODAL ============================= */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal.open { display: flex; }
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
}
.modal-box {
  position: relative;
  z-index: 2;
  background: var(--color-surface);
  border: 1px solid var(--color-accent);
  width: 100%;
  max-width: 720px;
  padding: 32px;
  box-shadow: var(--shadow);
}
.modal-close {
  position: absolute;
  top: 12px; right: 16px;
  background: none;
  border: none;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  color: var(--color-white);
  transition: color 0.25s ease;
}
.modal-close:hover { color: var(--color-accent); }
.modal-title { font-family: var(--serif); font-weight: 600; font-size: 22px; color: var(--color-white); margin-bottom: 18px; }
.modal-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  background:
    repeating-linear-gradient(45deg, #20262E 0 10px, #262D36 10px 20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--color-text-muted);
  font-size: 14px;
  overflow: hidden;
}
.modal-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 24px;
  text-align: center;
}

/* ============================= BACK TO TOP ============================= */
.to-top {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 90;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface);
  border: 1px solid var(--color-accent-soft);
  color: var(--color-accent);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0.35s, background 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.to-top:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-bg);
}
.to-top:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
.rtl .to-top { right: auto; left: 26px; }

/* ============================= SCROLL REVEAL ============================= */
/* .reveal is added only by JS, and only when reduced motion is off */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   RTL MIRRORING
   ============================================================ */
.rtl { text-align: right; }
.rtl .nav-links { flex-direction: row-reverse; }
.rtl .lang-switch { border-left: none; border-right: 1px solid var(--color-border); padding-left: 0; padding-right: 20px; margin-left: 0; margin-right: 8px; }

.rtl .two-col { flex-direction: row-reverse; }
.rtl .stat-cards { direction: rtl; }
.rtl .stat-card {
  border: 1px solid var(--color-border);
  border-top: 2px solid var(--color-accent);
}
.rtl .stat-card::after { right: auto; left: -24px; }
.rtl .stat-label { letter-spacing: 0; }
.rtl .position-card { border-left: none; border-right: 3px solid var(--color-accent); }
.rtl .position-card:hover { border-right-color: var(--color-accent-alt); }
.rtl .position-featured { border-left: none; border-right: 3px solid var(--color-accent); }
.rtl .position-badge { right: auto; left: 0; }
.rtl .position-featured { flex-direction: row-reverse; }
.rtl .timeline-content { border-left: none; border-right: 3px solid var(--color-accent); }
.rtl .hero-cta { flex-direction: row-reverse; justify-content: flex-start; }
.rtl .hero-stats { flex-direction: row-reverse; justify-content: flex-end; }
.rtl .hero-stat { border-left: none; border-right: 1px solid var(--color-border); }
.rtl .hero-stat:first-child { padding-right: 0; padding-left: 36px; border-right: none; }
.rtl .section-marker,
.rtl .gold-rule { margin-left: auto; margin-right: 0; }
.rtl .section-intro { margin-left: auto; }
.rtl .photo-corner { left: auto; right: -2px; border-left: none; border-right: 5px solid var(--color-accent); }
/* Timeline: true mirror in RTL — odd entries on the RIGHT, even on the LEFT.
   The layout alternates via width:50% + margin + justify-content (not
   flex-direction), so we mirror those properties rather than flipping rows. */
.rtl .timeline-entry:nth-child(odd) {
  margin-left: 0;
  margin-right: 0;
  justify-content: flex-end;
  padding: 0 0 46px 46px;
  text-align: right;
  transform: translateX(40px);
}
.rtl .timeline-entry:nth-child(even) {
  margin-left: 0;
  margin-right: 50%;
  justify-content: flex-start;
  padding: 0 46px 46px 0;
  text-align: right;
  transform: translateX(-40px);
}
.rtl .timeline-content { text-align: right; }
.rtl .timeline-entry:nth-child(odd)::after { left: -7px; right: auto; }
.rtl .timeline-entry:nth-child(even)::after { right: -7px; left: auto; }
.rtl .timeline-entry.visible { transform: translateX(0); }
.rtl .social-links { flex-direction: row-reverse; justify-content: flex-end; }
.rtl .footer-copy { flex-direction: row-reverse; }
.rtl .nav-link::after { left: auto; right: 0; }
.rtl .modal-close { right: auto; left: 16px; }
.rtl .checkbox input:checked::after { left: auto; right: 6px; }
.rtl .checkbox { direction: rtl; text-align: right; }
.rtl .media-tabs { flex-direction: row-reverse; justify-content: flex-end; }

/* Arabic / Kurdish typography breathing room */
.rtl body,
.rtl .about-text,
.rtl .timeline-desc,
.rtl .contact-text,
.rtl .hero-tagline,
.rtl .section-intro,
.rtl .subsection-intro,
.rtl .position-desc { line-height: 1.9; }
.rtl body { font-size: 18px; }

/* Arabic script is joined — wide tracking breaks the letterforms */
.rtl .hero-eyebrow,
.rtl .hero-title,
.rtl .hero-title-sub,
.rtl .hero-stat-label,
.rtl .stat-label,
.rtl .nav-link,
.rtl .btn,
.rtl .lang-btn,
.rtl .media-tab,
.rtl .position-org,
.rtl .position-badge,
.rtl .field label,
.rtl .field legend,
.rtl .footer-nav a { letter-spacing: 0; }

/* Tight display line-height clips Arabic-script ascenders/descenders */
.rtl .hero-name {
  font-size: clamp(52px, 11vw, 100px);
  line-height: 1.15;
  letter-spacing: 0;
}
.rtl .footer-name { line-height: 1.3; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .card-grid { grid-template-columns: 1fr; }
  .positions-grid { grid-template-columns: 1fr; }
  .position-featured { flex-direction: column; gap: 18px; }
  .rtl .position-featured { flex-direction: column; }
  .media-tabs { flex-direction: column; align-items: stretch; }
  .rtl .media-tabs { flex-direction: column; }
  .media-tab { width: 100%; text-align: center; padding: 14px 16px; font-size: 13px; }
  .media-grid { grid-template-columns: 1fr; }
  .two-col { flex-direction: column; gap: 44px; }
  .rtl .two-col { flex-direction: column; }
  .about-photo, .contact-info { flex: 1; width: 100%; }

  .timeline-track::before { left: 16px; }
  .timeline-entry,
  .timeline-entry:nth-child(odd),
  .timeline-entry:nth-child(even) {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
    text-align: left;
    padding: 0 0 36px 44px;
    transform: translateX(-40px);
  }
  .timeline-entry.visible { transform: translateX(0); }
  .timeline-entry:nth-child(odd)::after,
  .timeline-entry:nth-child(even)::after { left: 9px; right: auto; }
  .timeline-content { max-width: 100%; }

  .rtl .timeline-track::before { left: auto; right: 16px; }
  .rtl .timeline-entry,
  .rtl .timeline-entry:nth-child(odd),
  .rtl .timeline-entry:nth-child(even) {
    margin-left: 0;
    margin-right: 0;
    justify-content: flex-start;
    text-align: right;
    padding: 0 44px 36px 0;
    transform: translateX(40px);
  }
  .rtl .timeline-entry.visible { transform: translateX(0); }
  .rtl .timeline-entry:nth-child(odd)::after,
  .rtl .timeline-entry:nth-child(even)::after { right: 9px; left: auto; }
}

@media (max-width: 760px) {
  :root { --nav-h: 64px; }
  .logo { font-size: 26px; }

  /* — Full-screen mobile menu — */
  .hamburger { display: flex; }
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    right: 0;
    width: 100%;
    height: calc(100vh - var(--nav-h));
    height: calc(100dvh - var(--nav-h));
    background: rgba(20, 24, 32, 0.98);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 36px 28px;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease);
    overflow-y: auto;
  }
  /* Override desktop RTL row-reverse — the menu must stack on phones */
  .rtl .nav-links { flex-direction: column; }
  .nav-links.open { transform: translateX(0); }

  .nav-link {
    width: 100%;
    text-align: center;
    font-size: 19px;
    letter-spacing: 0.14em;
    padding: 13px 0;
  }
  .nav-link::after,
  .rtl .nav-link::after {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    bottom: 4px;
  }
  .nav-link:hover::after,
  .nav-link.active::after { width: 32px; }

  .lang-switch {
    width: min(320px, 100%);
    margin: 26px 0 0;
    padding: 26px 0 0;
    border-left: none;
    border-top: 1px solid var(--color-border);
    justify-content: center;
    gap: 10px;
  }
  .lang-btn { font-size: 13px; padding: 9px 16px; }

  .rtl .nav-links { right: auto; left: 0; transform: translateX(-100%); }
  .rtl .nav-links.open { transform: translateX(0); }
  .rtl .lang-switch { border-right: none; margin: 26px 0 0; padding: 26px 0 0; }

  /* Lock the page behind the open menu */
  body.menu-open { overflow: hidden; }
  body.menu-open .navbar { background: var(--color-bg); }

  /* — Hero: tighter rhythm, stronger legibility over the photo — */
  /* The subject stands in the left third of the photo; on a tall
     phone screen "cover" would crop him out, so aim the crop at him.
     (The layer is mirrored in LTR, which keeps him centered either way.) */
  .hero::before { background-position: 27% center; }
  .hero::after,
  .rtl .hero::after {
    background:
      linear-gradient(
        to top,
        rgba(20, 24, 32, 0.96) 0%,
        rgba(20, 24, 32, 0.72) 55%,
        rgba(20, 24, 32, 0.45) 100%
      );
  }
  .hero-inner { padding-top: calc(var(--nav-h) + 42px); padding-bottom: 52px; }
  .hero-eyebrow { font-size: 11px; }
  .hero-name { font-size: clamp(48px, 14vw, 68px); }
  .hero .gold-rule { margin: 18px 0; }
  .hero-tagline { font-size: 20px; margin-top: 14px; }
  .hero-cta { gap: 12px; margin-top: 28px; }
  .hero-cta .btn { padding: 13px 20px; font-size: 13px; }
  .hero-stats { gap: 0; margin-top: 44px; }
  .hero-stat { padding: 0 22px; }
  .hero-stat-num { font-size: 42px; }
  .rtl .hero-name { font-size: clamp(40px, 12vw, 62px); }
  .footer-name { font-size: 32px; }

  /* — Sections & cards — */
  .section { padding: 68px 0; }
  .stat-cards { grid-template-columns: 1fr; }
  .stat-card { min-height: 150px; }
  .position-featured { padding: 26px 22px; }
  .position-card { padding: 24px 22px; }
  .timeline-year { font-size: 28px; }
  .timeline-content { padding: 18px 20px; }
  .video-meta { padding: 15px 16px; }
  .video-title { font-size: 15px; }

  /* — Form: 16px inputs stop iOS from zooming on focus — */
  .field input, .field textarea { font-size: 16px; }
  .contact-form { width: 100%; padding: 24px 20px; }

  /* — Modal: use the full phone width — */
  .modal { padding: 14px; }
  .modal-box { padding: 44px 16px 20px; }
  .modal-title { font-size: 18px; margin-bottom: 14px; }
  .modal-close { top: 6px; right: 10px; padding: 6px; }
  .rtl .modal-close { right: auto; left: 10px; }

  /* — Floating controls closer to the edge — */
  .to-top { right: 16px; bottom: 16px; width: 44px; height: 44px; }
  .rtl .to-top { right: auto; left: 16px; }
}

@media (max-width: 420px) {
  :root { --pad: 18px; }
  .checkbox-group { grid-template-columns: 1fr; }
  .btn { width: 100%; text-align: center; }
  /* Hero buttons: compact pair on one row instead of stacked bars */
  .hero-cta { width: 100%; flex-wrap: nowrap; }
  .hero-cta .btn {
    width: auto;
    flex: 1;
    padding: 13px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.4;
  }
  .hero-stats { flex-direction: column; gap: 22px; }
  .rtl .hero-stats { flex-direction: column; }
  .hero-stat,
  .hero-stat:first-child { padding: 0 0 0 16px; border-left: 2px solid var(--color-border); border-right: none; }
  .rtl .hero-stat,
  .rtl .hero-stat:first-child { padding: 0 16px 0 0; border-right: 2px solid var(--color-border); border-left: none; }
}

/* ============================================================
   MOTION
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .media-panel {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  .media-panel.active {
    opacity: 1;
    transform: translateY(0);
  }

  .media-grid.pulse-highlight {
    animation: mediaPulse 700ms ease-out;
  }

  @keyframes mediaPulse {
    0% { box-shadow: 0 0 0 0 rgba(201, 168, 76, 0); }
    35% { box-shadow: 0 0 0 10px rgba(201, 168, 76, 0.14); }
    100% { box-shadow: 0 0 0 0 rgba(201, 168, 76, 0); }
  }

  .hero-particles span {
    animation-name: particleDrift;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
  }
  @keyframes particleDrift {
    0% { transform: translateY(0); opacity: 0; }
    10% { opacity: 0.15; }
    90% { opacity: 0.15; }
    100% { transform: translateY(-100vh); opacity: 0; }
  }

  /* — Hero entrance stagger on load — */
  .hero-eyebrow,
  .hero-name,
  .hero .gold-rule,
  .hero-title,
  .hero-tagline,
  .hero-cta,
  .hero-stats {
    animation: heroRise 0.9s var(--ease) backwards;
  }
  .hero-eyebrow  { animation-delay: 0.05s; }
  .hero-name     { animation-delay: 0.15s; }
  .hero .gold-rule { animation-delay: 0.3s; }
  .hero-title    { animation-delay: 0.4s; }
  .hero-tagline  { animation-delay: 0.5s; }
  .hero-cta      { animation-delay: 0.62s; }
  .hero-stats    { animation-delay: 0.75s; }
  @keyframes heroRise {
    from { opacity: 0; transform: translateY(28px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* — Gold rule sheen — */
  .hero .gold-rule { position: relative; overflow: hidden; }
  .hero .gold-rule::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    transform: translateX(-100%);
    animation: ruleSheen 4.5s var(--ease) 1.4s infinite;
  }
  .rtl .hero .gold-rule::after { animation-name: ruleSheenRtl; }
  @keyframes ruleSheen {
    0% { transform: translateX(-100%); }
    45%, 100% { transform: translateX(100%); }
  }
  @keyframes ruleSheenRtl {
    0% { transform: translateX(100%); }
    45%, 100% { transform: translateX(-100%); }
  }

  /* — Button sheen sweep — */
  .btn::before { transition: transform 0.6s var(--ease); }
  .btn:hover::before { transform: skewX(-20deg) translateX(430%); }

  /* — Modal open — */
  .modal.open .modal-box { animation: modalIn 0.4s var(--ease); }
  .modal.open .modal-overlay { animation: overlayIn 0.3s ease; }
  @keyframes modalIn {
    from { opacity: 0; transform: translateY(22px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }
  @keyframes overlayIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
}

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

/* Mobile menu: links rise in one after another */
@media (prefers-reduced-motion: no-preference) and (max-width: 760px) {
  .nav-links .nav-link,
  .nav-links .lang-switch {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
  }
  .nav-links.open .nav-link,
  .nav-links.open .lang-switch {
    opacity: 1;
    transform: translateY(0);
  }
  .nav-links.open .nav-link:nth-child(1) { transition-delay: 0.05s; }
  .nav-links.open .nav-link:nth-child(2) { transition-delay: 0.1s; }
  .nav-links.open .nav-link:nth-child(3) { transition-delay: 0.15s; }
  .nav-links.open .nav-link:nth-child(4) { transition-delay: 0.2s; }
  .nav-links.open .nav-link:nth-child(5) { transition-delay: 0.25s; }
  .nav-links.open .lang-switch { transition-delay: 0.32s; }
}

/* ============================================================
   TOUCH DEVICES — press feedback instead of hover
   ============================================================ */
@media (hover: none) {
  .btn:active { transform: scale(0.98); }
  .media-tab:active { transform: scale(0.98); }
  .video-card:active,
  .position-card:active,
  .stat-card:active,
  .timeline-content:active { transform: scale(0.985); }
  .social-link:active { transform: scale(0.94); }
}
