/* ============================================================
   Fauad Oubeid - portfolio v2
   Identity sampled from the 2026 portfolio PDF
   ============================================================ */
:root {
  --charcoal: #1c2021;
  --charcoal-2: #262b2c;
  --ink: #2b3330;
  --paper: #f7f7f6;
  --white: #ffffff;
  --mint: #d4ffe9;
  --mint-soft: #ddf5e7;
  --mint-dim: #a9d8bf;
  --blue: #d2f7ff;
  --cream: #fdffd8;
  --grey: #68706d;
  --line: #e3e6e4;
  --line-dark: #343a3b;

  --font-body: "Rubik", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-display: "Jost", "IBM Plex Sans Arabic", sans-serif;

  --radius: 26px;
  --radius-sm: 16px;
  --container: 1240px;
  --header-h: 78px;
  --ease: cubic-bezier(.22, .8, .3, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; background: var(--paper); }
body {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--charcoal);
  /* the canvas colour lives on <html> (needed before the body is revealed at
     boot); body stays transparent so z-index:-1 decor like the hero blob,
     which paints under body's background, stays visible */
  background: transparent;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; background: none; border: none; cursor: pointer; color: inherit; }
::selection { background: var(--mint); color: var(--charcoal); }

html[dir="rtl"] body { line-height: 1.95; }
.display { font-family: var(--font-display); font-weight: 300; }
html[lang="ar"] .display { font-family: "IBM Plex Sans Arabic", var(--font-body); }

.container { max-width: var(--container); margin-inline: auto; padding-inline: clamp(20px, 4vw, 44px); }
.section { padding-block: clamp(90px, 12vw, 160px); }
section[id], .contact-band { scroll-margin-top: var(--header-h); }

/* hidden until the language + webfonts are ready, so nothing flashes
   in English or in a fallback font first (see the boot script in index.html) */
html.is-booting body { visibility: hidden; }

/* ---------- grain ---------- */
.grain {
  position: fixed; inset: -50%; z-index: 98; pointer-events: none;
  opacity: .05; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 9s steps(6) infinite;
}
@keyframes grain {
  0%,100% { transform: translate(0,0); } 20% { transform: translate(-4%,3%); }
  40% { transform: translate(3%,-4%); } 60% { transform: translate(-3%,-2%); } 80% { transform: translate(2%,4%); }
}

/* ---------- preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: var(--paper);
  transition: opacity .55s var(--ease), visibility .55s;
}
.preloader.done { opacity: 0; visibility: hidden; }
.preloader-circle {
  width: 120px; height: 120px; border-radius: 50%;
  background: var(--mint-soft);
  display: flex; align-items: center; justify-content: center;
  animation: preloader-pulse 1.1s var(--ease) infinite alternate;
}
.preloader-circle img { width: 52px; }
@keyframes preloader-pulse { from { transform: scale(.92); } to { transform: scale(1.06); } }

/* ---------- scroll progress ---------- */
.scroll-progress {
  position: fixed; top: 0; inset-inline-start: 0; z-index: 60;
  height: 3px; width: 100%; background: var(--mint-dim);
  transform-origin: 0 50%;
  transform: scaleX(0);
}
html[dir="rtl"] .scroll-progress { transform-origin: 100% 50%; }

/* ---------- reveals & staggers ---------- */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.stagger > * { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.stagger.in > * { opacity: 1; transform: none; }

.mask-line { display: block; overflow: hidden; }
.mask-line > span { display: inline-block; transform: translateY(115%); transition: transform 1s var(--ease-out); }
body.loaded .mask-line > span { transform: none; }
body.loaded .mask-line:nth-of-type(2) > span { transition-delay: .08s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .stagger > * { opacity: 1 !important; transform: none !important; transition: none !important; }
  .mask-line > span { transform: none !important; transition: none !important; }
  .grain, .preloader { display: none !important; }
  * { animation-duration: .001s !important; animation-iteration-count: 1 !important; }
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed; inset-inline: 0; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 80%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: var(--header-h); }
.brand-logo { height: 40px; width: auto; transition: transform .3s var(--ease); }
.brand:hover .brand-logo { transform: scale(1.04); }

.main-nav { display: flex; gap: clamp(16px, 2.6vw, 34px); font-weight: 400; font-size: .98rem; }
.main-nav a { position: relative; padding-block: 6px; color: var(--grey); transition: color .25s ease; }
.main-nav a:hover, .main-nav a.is-active { color: var(--charcoal); }
.main-nav a::after {
  content: ""; position: absolute; inset-inline-start: 0; bottom: 0;
  width: 100%; height: 2px; background: var(--charcoal); border-radius: 2px;
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform .3s var(--ease);
}
html[dir="rtl"] .main-nav a::after { transform-origin: 100% 50%; }
.main-nav a:hover::after, .main-nav a.is-active::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 14px; }
.lang-switch { display: flex; gap: 2px; padding: 3px; background: var(--white); border: 1px solid var(--line); border-radius: 999px; }
.lang-btn { padding: 5px 13px; border-radius: 999px; font-size: .85rem; font-weight: 500; color: var(--grey); transition: all .25s ease; }
.lang-btn:hover { color: var(--charcoal); }
.lang-btn.is-active { background: var(--charcoal); color: var(--mint); }

.nav-toggle { display: none; flex-direction: column; gap: 7px; padding: 10px; z-index: 70; }
.nav-toggle span { width: 26px; height: 2px; background: var(--charcoal); border-radius: 2px; transition: transform .35s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4.5px) rotate(-45deg); }

/* mobile menu */
.mobile-menu {
  position: fixed; inset: 0; z-index: 45;
  background: var(--paper);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 40px;
  opacity: 0; visibility: hidden; transition: opacity .4s var(--ease), visibility .4s;
}
.mobile-menu.open { opacity: 1; visibility: visible; }
.mobile-nav { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.mobile-nav a {
  font-family: var(--font-display); font-size: clamp(2rem, 8vw, 3rem); font-weight: 300;
  padding: 6px 18px; opacity: 0; transform: translateY(24px);
  transition: opacity .5s var(--ease), transform .5s var(--ease), color .25s;
}
html[lang="ar"] .mobile-nav a { font-family: "IBM Plex Sans Arabic", var(--font-body); }
.mobile-menu.open .mobile-nav a { opacity: 1; transform: none; }
.mobile-menu.open .mobile-nav a:nth-child(1) { transition-delay: .05s; }
.mobile-menu.open .mobile-nav a:nth-child(2) { transition-delay: .1s; }
.mobile-menu.open .mobile-nav a:nth-child(3) { transition-delay: .15s; }
.mobile-menu.open .mobile-nav a:nth-child(4) { transition-delay: .2s; }
.mobile-menu.open .mobile-nav a:nth-child(5) { transition-delay: .25s; }
.mobile-nav a:hover { color: var(--grey); }
.mobile-menu-mark { width: 44px; opacity: .25; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: clamp(640px, 100svh, 1050px);
  display: flex; flex-direction: column; justify-content: center;
  padding-top: calc(var(--header-h) + clamp(40px, 6vw, 72px));
  padding-bottom: clamp(48px, 8vh, 90px);
  overflow: hidden;
}
/* the blob is a plain positioning box; the gradient/blur lives on ::before so
   the mark nested inside it stays sharp */
.hero-blob {
  position: absolute; z-index: -1;
  width: clamp(340px, 46vw, 700px); aspect-ratio: 1;
  inset-inline-end: clamp(-140px, -4vw, 40px); top: 10%;
}
.hero-blob::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 40% 35%, var(--mint) 0%, var(--mint-soft) 62%, #ecf9f1 100%);
  border-radius: 58% 42% 55% 45% / 48% 55% 45% 52%;
  animation: blob-morph 14s ease-in-out infinite alternate;
  filter: blur(1px);
}
@keyframes blob-morph {
  0%   { border-radius: 58% 42% 55% 45% / 48% 55% 45% 52%; }
  50%  { border-radius: 45% 55% 42% 58% / 55% 44% 56% 45%; }
  100% { border-radius: 52% 48% 60% 40% / 42% 58% 42% 58%; }
}
/* positioned as a share of the blob, so it keeps the exact same spot on the
   blob at every screen size (values taken from the desktop layout) */
.hero-mark {
  position: absolute;
  inset-inline-start: 43.3%; top: 60.3%;
  width: 29%;
  opacity: .1; transform: rotate(-10deg);
}

.hero-inner { position: relative; width: 100%; }
.hero-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: clamp(28px, 4vh, 46px); }
.hero-badge {
  font-size: .84rem; font-weight: 500; letter-spacing: .07em;
  padding: 7px 16px; border: 1px solid var(--charcoal); border-radius: 999px;
}
.hero-available { display: inline-flex; align-items: center; gap: 9px; font-size: .9rem; color: var(--grey); }
.pulse-dot { width: 9px; height: 9px; border-radius: 50%; background: #35c47c; animation: pulse 2s ease-out infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(53, 196, 124, .45); }
  70% { box-shadow: 0 0 0 10px rgba(53, 196, 124, 0); }
  100% { box-shadow: 0 0 0 0 rgba(53, 196, 124, 0); }
}

.hero-kicker { font-size: clamp(1.02rem, 1.8vw, 1.3rem); font-weight: 400; letter-spacing: .05em; color: var(--ink); margin-bottom: 6px; }
.hero-name {
  font-size: clamp(3.4rem, 11.5vw, 9.5rem);
  line-height: .98; letter-spacing: -0.02em;
  margin-bottom: clamp(18px, 3vh, 30px);
}
html[lang="ar"] .hero-name { line-height: 1.25; letter-spacing: 0; }
.hero-name-2 > span { transition-delay: .1s; }
.hero-dot { color: var(--mint-dim); }

.hero-role-line { display: flex; align-items: center; gap: 16px; font-size: clamp(1.15rem, 2.4vw, 1.7rem); margin-bottom: clamp(20px, 3vh, 32px); }
.hero-role-static { flex: 0 0 38px; height: 2px; background: var(--mint-dim); border-radius: 2px; }
.hero-roles { position: relative; display: inline-block; min-width: 14ch; height: 1.6em; overflow: hidden; vertical-align: bottom; }
.role-word {
  position: absolute; inset-inline-start: 0; top: 0;
  font-weight: 500; white-space: nowrap;
  transform: translateY(120%); opacity: 0;
  transition: transform .55s var(--ease), opacity .55s;
}
.role-word.is-in { transform: none; opacity: 1; }
.role-word.is-out { transform: translateY(-120%); opacity: 0; }

.hero-tagline { max-width: 52ch; font-size: clamp(1rem, 1.6vw, 1.18rem); color: var(--ink); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: clamp(28px, 4vh, 44px); }

.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 34px; border-radius: 999px; font-weight: 500; font-size: 1rem;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s, color .3s, border-color .3s;
  will-change: transform;
}
.btn-arrow { display: inline-flex; align-items: center; transition: transform .3s var(--ease); }
.btn-arrow svg { width: 17px; height: 17px; }
.btn:hover .btn-arrow { transform: translateX(4px); }
html[dir="rtl"] .btn-arrow { transform: scaleX(-1); }
html[dir="rtl"] .btn:hover .btn-arrow { transform: scaleX(-1) translateX(4px); }
/* the hero CTA scrolls down, so its arrow points down and is never mirrored */
.btn-arrow-down { display: inline-flex; align-items: center; transition: transform .3s var(--ease); }
.btn-arrow-down svg { width: 17px; height: 17px; }
.btn:hover .btn-arrow-down { transform: translateY(3px); }
.btn-dark { background: var(--charcoal); color: var(--mint); }
.btn-dark:hover { box-shadow: 0 16px 34px rgba(28, 32, 33, .28); }
.btn-ghost { border: 1.5px solid var(--charcoal); }
.btn-ghost:hover { background: var(--charcoal); color: var(--mint); }
.btn-mint { background: var(--mint); color: var(--charcoal); }
.btn-mint:hover { box-shadow: 0 16px 34px rgba(212, 255, 233, .22); }
.btn-outline-light { border: 1.5px solid var(--line-dark); color: var(--white); }
.btn-outline-light:hover { border-color: var(--mint); color: var(--mint); }

.hero-scroll {
  position: absolute; bottom: 44px; inset-inline-start: clamp(20px, 4vw, 44px);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; color: var(--grey);
  writing-mode: vertical-lr;
}
html[lang="ar"] .hero-scroll { letter-spacing: 0; }
.scroll-line { width: 1.5px; height: 52px; background: var(--line); position: relative; overflow: hidden; }
.scroll-line::after {
  content: ""; position: absolute; inset-inline: 0; top: -100%;
  height: 100%; background: var(--charcoal);
  animation: scroll-hint 1.8s var(--ease) infinite;
}
@keyframes scroll-hint { 0% { top: -100%; } 55% { top: 0; } 100% { top: 100%; } }

/* ============================================================
   SECTION HEADS
   ============================================================ */
.section-head { position: relative; margin-bottom: clamp(44px, 6vw, 72px); }
.section-head { padding-top: clamp(6px, 1vw, 14px); }
.ghost-num {
  position: absolute; top: -0.24em; inset-inline-start: -0.05em; z-index: -1;
  font-family: var(--font-display); font-weight: 200;
  font-size: clamp(6rem, 14vw, 11rem); line-height: 1;
  color: transparent; -webkit-text-stroke: 1.2px #dcdfdc;
  user-select: none;
}
.section-label {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: .92rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--grey);
  margin-bottom: 12px;
}
html[lang="ar"] .section-label { letter-spacing: 0; }
.section-label::before { content: ""; width: 34px; height: 2px; background: var(--mint-dim); border-radius: 2px; }
.section-title { font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 600; line-height: 1.16; letter-spacing: -0.01em; }
.section-intro { max-width: 56ch; color: var(--ink); margin-top: 18px; font-size: 1.05rem; }

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid {
  display: grid; grid-template-columns: minmax(300px, 440px) 1fr;
  gap: clamp(48px, 7vw, 110px); align-items: start;
}
.photo-card {
  position: relative;
  padding-inline: clamp(8px, 1.5vw, 20px);
  transition: transform .4s var(--ease);
  will-change: transform;
}
.photo-card img { position: relative; margin-inline: auto; }

.about-meta { margin-top: 26px; border-top: 1px solid var(--line); }
.about-meta li { display: flex; justify-content: space-between; gap: 16px; padding-block: 13px; border-bottom: 1px solid var(--line); font-size: .96rem; }
.meta-k { color: var(--grey); }
.meta-v { font-weight: 500; text-align: end; }

.about-title {
  font-size: clamp(2rem, 3.8vw, 3rem);
  margin-bottom: clamp(20px, 2.4vw, 30px);
}
.about-lead { font-size: clamp(1.1rem, 1.8vw, 1.3rem); font-weight: 400; color: var(--charcoal); }
.about-text p + p { margin-top: 20px; }
.about-text > p { max-width: 60ch; color: var(--ink); }

.about-sub { margin-top: 44px; }
.about-sub h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 18px; display: flex; align-items: center; gap: 12px; }
.about-sub h3::after { content: ""; flex: 0 0 44px; height: 2px; background: var(--mint); border-radius: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips li {
  padding: 9px 20px; background: var(--white); border: 1px solid var(--line);
  border-radius: 999px; font-size: .95rem; font-weight: 400;
  transition: background .3s, border-color .3s, transform .3s var(--ease);
}
.chips li:hover { background: var(--mint-soft); border-color: var(--mint-soft); transform: translateY(-2px); }

.tools { display: flex; flex-wrap: wrap; gap: 18px 28px; }
.tools li { display: flex; align-items: center; gap: 10px; font-size: .95rem; color: var(--ink); }
.tool-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--charcoal); color: var(--mint);
  font-weight: 600; font-size: .95rem;
  transition: transform .3s var(--ease);
}
.tools li:hover .tool-badge { transform: translateY(-3px) rotate(-6deg); }

/* ============================================================
   QUOTE
   ============================================================ */
.quote-band { position: relative; background: var(--blue); overflow: hidden; }
.quote-glyph {
  /* background mark: drawn as a circle + two cubics, proportioned to the
     portfolio's quote mark. viewBox == ink box, so centring is exact. */
  position: absolute; z-index: 0;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: clamp(170px, 17vw, 260px);
  color: #bde5ed;
  pointer-events: none; user-select: none;
}
.quote-glyph svg { display: block; width: 100%; height: auto; }
.quote-inner blockquote { position: relative; z-index: 1; }
.quote-inner { position: relative; text-align: center; padding-block: clamp(70px, 9vw, 120px); }
.quote-text { font-size: clamp(1.5rem, 3.4vw, 2.5rem); font-weight: 300; line-height: 1.5; max-width: 36ch; margin-inline: auto; }
.quote-text strong { font-weight: 600; }
.quote-author {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin-top: 30px; font-style: normal; font-size: 1rem; color: var(--ink); font-weight: 500;
}
.quote-author::before { content: ""; width: 28px; height: 2px; background: var(--ink); opacity: .45; border-radius: 2px; }

/* ============================================================
   SERVICES
   ============================================================ */
.services { background: var(--white); }
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(16px, 2vw, 26px); }
.svc-card {
  position: relative; overflow: hidden;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(26px, 3vw, 40px);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s;
}
.svc-card::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: var(--mint-soft);
  transform: translateY(101%); transition: transform .45s var(--ease);
}
.svc-card:hover::before { transform: none; }
.svc-card:hover { transform: translateY(-8px); box-shadow: 0 24px 48px rgba(28, 32, 33, .1); border-color: var(--mint-soft); }
.svc-card > * { position: relative; z-index: 1; }
.svc-num {
  position: absolute; top: 16px; inset-inline-end: 20px;
  font-family: var(--font-display); font-weight: 200; font-size: 2.2rem;
  color: transparent; -webkit-text-stroke: 1px var(--grey); opacity: .5;
}
.svc-icon { display: block; font-size: 2rem; margin-bottom: 18px; color: var(--charcoal); }
.svc-card h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: 10px; line-height: 1.35; min-height: 2.7em; display: flex; align-items: flex-end; }
.svc-card p { font-size: .95rem; color: var(--ink); }

/* ============================================================
   WORK
   ============================================================ */
.work { background: var(--paper); }

/* featured rows */
.featured-list { display: flex; flex-direction: column; gap: clamp(40px, 6vw, 80px); margin-bottom: clamp(64px, 8vw, 110px); }
.feat-row {
  display: grid; grid-template-columns: 1.25fr 1fr;
  gap: clamp(26px, 4vw, 60px); align-items: center;
  cursor: pointer;
}
.feat-row.alt { direction: rtl; }
html[dir="rtl"] .feat-row.alt { direction: ltr; }
.feat-row.alt > * { direction: ltr; }
html[dir="rtl"] .feat-row.alt > *, html[dir="rtl"] .feat-row > * { direction: rtl; }
.feat-media {
  position: relative; overflow: hidden; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--white);
  box-shadow: 0 18px 44px rgba(28, 32, 33, .07);
}
.feat-media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .8s var(--ease); }
.feat-row:hover .feat-media img { transform: scale(1.045); }
.feat-badge {
  position: absolute; top: 18px; inset-inline-start: 18px;
  padding: 6px 14px; border-radius: 999px;
  background: color-mix(in srgb, var(--charcoal) 82%, transparent); color: var(--mint);
  font-size: .78rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  backdrop-filter: blur(6px);
}
html[lang="ar"] .feat-badge { letter-spacing: 0; }
.feat-count {
  position: absolute; bottom: 18px; inset-inline-end: 18px;
  padding: 6px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--white) 85%, transparent); color: var(--charcoal);
  font-size: .8rem; font-weight: 500; backdrop-filter: blur(6px);
}
.feat-info .feat-cat { display: inline-block; font-size: .85rem; font-weight: 500; color: var(--grey); margin-bottom: 12px; }
.feat-info h3 { font-size: clamp(1.5rem, 3vw, 2.3rem); font-weight: 600; line-height: 1.2; margin-bottom: 14px; }
.feat-info p { color: var(--ink); max-width: 46ch; margin-bottom: 22px; }
.feat-link {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 500; padding-bottom: 4px;
  border-bottom: 2px solid var(--mint-dim);
  transition: gap .3s var(--ease), border-color .3s;
}
.feat-row:hover .feat-link { gap: 16px; border-color: var(--charcoal); }
html[dir="rtl"] .feat-link .btn-arrow { transform: scaleX(-1); }

/* filters + grid */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 40px; }
.filter-btn {
  padding: 10px 22px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--white); font-size: .93rem; font-weight: 400;
  transition: all .3s var(--ease);
}
.filter-btn:hover { border-color: var(--charcoal); transform: translateY(-2px); }
.filter-btn.is-active { background: var(--charcoal); color: var(--mint); border-color: var(--charcoal); }

.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.2vw, 28px); }
.work-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: var(--white); border: 1px solid var(--line);
  cursor: pointer;
  opacity: 0; transform: translateY(28px);
  transition: opacity .6s var(--ease), transform .6s var(--ease), box-shadow .45s var(--ease);
}
.work-card.in { opacity: 1; transform: none; }
.work-card:hover { box-shadow: 0 26px 50px rgba(28, 32, 33, .13); }
.wc-media { position: relative; overflow: hidden; }
.wc-media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .7s var(--ease); }
.work-card:hover .wc-media img { transform: scale(1.05); }
.wc-count {
  position: absolute; top: 14px; inset-inline-end: 14px;
  padding: 4px 11px; border-radius: 999px;
  background: color-mix(in srgb, var(--charcoal) 78%, transparent); color: var(--mint);
  font-size: .76rem; font-weight: 500; backdrop-filter: blur(6px);
}
.wc-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--charcoal) 34%, transparent);
  opacity: 0; transition: opacity .4s ease;
}
.work-card:hover .wc-overlay { opacity: 1; }
.wc-overlay span {
  padding: 11px 24px; border-radius: 999px; background: var(--mint); color: var(--charcoal);
  font-size: .9rem; font-weight: 500;
  transform: translateY(10px); transition: transform .4s var(--ease);
}
.work-card:hover .wc-overlay span { transform: none; }
.work-card figcaption { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; }
.wc-title { font-size: .95rem; font-weight: 500; line-height: 1.4; }
.wc-cat { flex-shrink: 0; font-size: .76rem; font-weight: 500; background: var(--mint-soft); color: var(--ink); padding: 4px 12px; border-radius: 999px; white-space: nowrap; }

/* ============================================================
   STATS + CLIENTS
   ============================================================ */
.stats-band { background: var(--charcoal); color: var(--white); padding-block: clamp(72px, 9vw, 120px); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 34px 20px; text-align: center; }
.stat { position: relative; }
.stat + .stat::before {
  content: ""; position: absolute; inset-inline-start: -10px; top: 15%;
  height: 70%; width: 1px; background: var(--line-dark);
}
.stat-num { display: block; font-size: clamp(2.7rem, 6vw, 4.6rem); font-weight: 700; color: var(--mint); line-height: 1.1; }
.stat-num::before { content: "+"; }
.stat-label { display: block; margin-top: 8px; font-size: .98rem; color: #a7b0ab; }

.clients-label { text-align: center; margin-top: clamp(48px, 6vw, 72px); margin-bottom: 34px; color: #a7b0ab; font-size: .95rem; }
.logos-rows {
  display: flex; flex-direction: column; align-items: center;
  gap: clamp(20px, 2.8vw, 34px);
}
.logos-rows img {
  width: 100%; max-width: 1000px; height: auto;
  filter: invert(1) opacity(.62);
}

/* ============================================================
   EXPERIENCE
   ============================================================ */
.experience { background: var(--white); }
.exp-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(48px, 7vw, 100px); align-items: start; }
.timeline { position: relative; padding-inline-start: 36px; }
.timeline::before {
  content: ""; position: absolute; inset-inline-start: 8px; top: 8px; bottom: 8px;
  width: 2px; background: var(--line); border-radius: 2px;
}
.timeline-fill {
  position: absolute; inset-inline-start: 8px; top: 8px;
  width: 2px; height: calc(100% - 16px); background: var(--charcoal); border-radius: 2px;
  transform-origin: top; transform: scaleY(0);
  transition: transform .2s linear;
}
.timeline-item { position: relative; padding-bottom: 46px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: ""; position: absolute; inset-inline-start: -34px; top: 8px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--mint); border: 3px solid var(--charcoal);
  transition: transform .3s var(--ease);
}
.timeline-item:hover::before { transform: scale(1.35); }
.tl-date {
  display: inline-block; font-size: .82rem; font-weight: 500; color: var(--grey);
  letter-spacing: .04em; padding: 3px 12px; border: 1px solid var(--line); border-radius: 999px;
  margin-bottom: 8px;
}
html[lang="ar"] .tl-date { letter-spacing: 0; }
.tl-role { font-size: 1.3rem; font-weight: 600; }
.tl-org { color: var(--ink); margin-top: 2px; }

.edu-card {
  background: var(--paper); border-radius: var(--radius);
  padding: clamp(30px, 3.4vw, 44px);
  position: sticky; top: calc(var(--header-h) + 24px);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.edu-card:hover { box-shadow: 0 24px 48px rgba(28, 32, 33, .1); }
.edu-card h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 16px; display: flex; align-items: center; gap: 12px; }
.edu-card h3::after { content: ""; flex: 0 0 44px; height: 2px; background: var(--mint); border-radius: 2px; }
.edu-degree { font-weight: 500; font-size: 1.05rem; }
.edu-org { color: var(--grey); font-size: .95rem; }
.edu-date { color: var(--grey); font-size: .88rem; margin-top: 2px; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact-band { position: relative; background: var(--charcoal); color: var(--white); overflow: hidden; }
.contact-blob {
  position: absolute; width: clamp(300px, 40vw, 560px); aspect-ratio: 1;
  inset-inline-start: -12%; bottom: -25%;
  background: radial-gradient(circle at 40% 40%, rgba(212, 255, 233, .14), transparent 70%);
  border-radius: 50%;
}
.contact-inner { position: relative; text-align: center; padding-block: clamp(96px, 13vw, 180px); }
.contact-kicker { font-size: clamp(1rem, 2vw, 1.25rem); color: #a7b0ab; margin-bottom: 14px; }
.contact-title { font-size: clamp(2.3rem, 6vw, 4.6rem); font-weight: 300; line-height: 1.18; }
.contact-title strong { font-weight: 700; color: var(--mint); }
.contact-sub { max-width: 52ch; margin: 22px auto 0; color: #c3cbc6; font-size: 1.02rem; }
.contact-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 48px; }
.btn-icon { display: inline-flex; align-items: center; }
.btn-icon svg { width: 19px; height: 19px; }
.btn-copy-icon { display: inline-flex; opacity: .75; }
.btn-copy-icon svg { width: 17px; height: 17px; }
.contact-logo { width: clamp(92px, 10vw, 132px); margin: clamp(56px, 7vw, 68px) auto 0; }

.copy-toast {
  position: fixed; bottom: 34px; left: 50%; transform: translate(-50%, 20px);
  padding: 12px 26px; border-radius: 999px;
  background: var(--mint); color: var(--charcoal); font-weight: 500; font-size: .95rem;
  opacity: 0; pointer-events: none; z-index: 120;
  transition: opacity .35s var(--ease), transform .35s var(--ease);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .25);
}
.copy-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--paper); border-top: 1px solid var(--line); }
.footer-inner { position: relative; text-align: center; padding-block: 44px; font-size: .92rem; color: var(--grey); }
.footer-mark { width: 30px; margin: 0 auto 14px; opacity: .85; }
.footer-made { margin-top: 4px; font-size: .85rem; }
.back-top {
  position: absolute; inset-inline-end: 0; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--white);
  color: var(--charcoal);
  transition: background .3s, color .3s, transform .3s var(--ease);
}
.back-top svg { width: 18px; height: 18px; }
.back-top:hover { background: var(--charcoal); color: var(--mint); transform: translateY(calc(-50% - 4px)); }

/* ============================================================
   PROJECT MODAL + CAROUSEL
   ============================================================ */
.pmodal { position: fixed; inset: 0; z-index: 110; display: none; }
.pmodal.open { display: block; }
.pmodal-backdrop {
  position: absolute; inset: 0;
  background: rgba(18, 21, 22, .93);
  backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .35s ease;
}
.pmodal.visible .pmodal-backdrop { opacity: 1; }
.pmodal-panel {
  position: relative; height: 100%;
  display: grid; grid-template-rows: 1fr auto;
  max-width: 1280px; margin-inline: auto;
  padding: clamp(56px, 7vh, 80px) clamp(16px, 3vw, 44px) clamp(20px, 3vh, 32px);
  opacity: 0; transform: translateY(26px) scale(.985);
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.pmodal.visible .pmodal-panel { opacity: 1; transform: none; }
.pmodal-close {
  position: absolute; top: 16px; inset-inline-end: clamp(16px, 3vw, 44px);
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line-dark); color: #fff; font-size: 1.15rem;
  transition: background .3s, color .3s, transform .3s var(--ease);
  z-index: 5;
}
.pmodal-close:hover { background: var(--mint); color: var(--charcoal); transform: rotate(90deg); }

.pmodal-media { min-height: 0; display: flex; }
.carousel { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.carousel-track { position: relative; width: 100%; height: 100%; }
/* Direction only changes --slide-x; `transform` is declared in just two places
   so the centred (active) state can never be out-specified in RTL. */
.car-slide {
  --slide-x: 46px;
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateX(var(--slide-x)); pointer-events: none;
  transition: opacity .45s var(--ease), transform .45s var(--ease);
}
html[dir="rtl"] .car-slide { --slide-x: -46px; }
.car-slide.from-left { --slide-x: -46px; }
html[dir="rtl"] .car-slide.from-left { --slide-x: 46px; }
.car-slide.active { opacity: 1; transform: none; pointer-events: auto; }
.car-slide img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .5);
}
.car-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 4;
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 50%;
  background: color-mix(in srgb, var(--charcoal) 72%, transparent);
  border: 1px solid var(--line-dark); color: #fff;
  transition: background .3s, color .3s, transform .3s var(--ease);
  backdrop-filter: blur(4px);
}
.car-nav svg { width: 22px; height: 22px; }
html[dir="rtl"] .car-nav svg { transform: scaleX(-1); }
.car-nav:hover { background: var(--mint); color: var(--charcoal); }
.car-prev { inset-inline-start: 6px; }
.car-next { inset-inline-end: 6px; }
.car-nav:disabled { opacity: .3; pointer-events: none; }
.car-dots { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 4; }
.car-dot { width: 9px; height: 9px; border-radius: 50%; background: #56605c; transition: background .3s, transform .3s; }
.car-dot.active { background: var(--mint); transform: scale(1.25); }

.pmodal-info { padding: 20px 16px 0; text-align: center; color: #fff; }
.pmodal-cat {
  display: inline-block; padding: 4px 14px; border-radius: 999px;
  background: var(--charcoal-2); border: 1px solid var(--line-dark);
  color: var(--mint); font-size: .8rem; font-weight: 500; margin-bottom: 10px;
}
.pmodal-title { font-size: clamp(1.2rem, 2.6vw, 1.7rem); font-weight: 600; }
.pmodal-desc { max-width: 68ch; margin: 8px auto 0; color: #b9c1bd; font-size: .95rem; line-height: 1.65; }
.pmodal-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; }
.pnav-btn {
  display: inline-flex; align-items: center; gap: 10px;
  color: #b9c1bd; font-size: .92rem; font-weight: 500; padding: 8px 6px;
  transition: color .25s;
}
.pnav-btn:hover { color: var(--mint); }
.pnav-arrow { display: inline-flex; align-items: center; transition: transform .3s var(--ease); }
.pnav-arrow svg { width: 18px; height: 18px; }
html[dir="rtl"] .pnav-arrow { transform: scaleX(-1); }
.pmodal-counter { font-size: .88rem; color: #7c857f; letter-spacing: .1em; }

body.modal-open { overflow: hidden; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .work-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .about-grid, .exp-grid { grid-template-columns: 1fr; }
  .photo-card { max-width: 400px; }
  .edu-card { position: static; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3)::before { display: none; }
  .feat-row { grid-template-columns: 1fr; gap: 20px; }
  .hero-scroll { display: none; }
}

/* contact buttons: on narrow screens use a 2-column grid so the email pill
   spans the full width and the two social buttons are exactly equal halves */
@media (max-width: 620px) {
  .contact-actions {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 12px; justify-content: stretch;
  }
  .contact-actions .btn { width: 100%; padding-inline: 16px; }
  .contact-actions #copyEmail { grid-column: 1 / -1; }
}

/* mobile: tighten the hand-off from the hero into About */
@media (max-width: 760px) {
  .hero {
    min-height: clamp(520px, 82svh, 900px);
    padding-bottom: 30px;
  }
  .about.section { padding-top: clamp(50px, 14vw, 64px); }
  /* the desktop 11.5vw falls under the rem floor on phones, so the name
     stopped scaling; give small screens their own viewport-based ramp */
  .hero-name { font-size: clamp(3.5rem, 18vw, 5.9rem); }
  /* on phones the blob sits behind the text column, so the mark would fall
     behind the tagline: hide it there (desktop keeps it locked to the blob) */
  .hero-mark { display: none; }
  /* a 10% top put the blob's edge behind the translucent header bar;
     anchor it to the header height instead so it always clears it */
  .hero-blob {
    top: calc(var(--header-h) + 74px);
    width: clamp(320px, 84vw, 440px);
  }
}

@media (max-width: 760px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .work-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .svc-card h3 { min-height: 0; display: block; }
  .lang-btn { padding: 5px 10px; font-size: .8rem; }
  .brand-logo { height: 33px; }
  .pmodal-panel { padding-inline: 10px; }
  .car-nav { width: 42px; height: 42px; font-size: 1.4rem; }
  .pmodal-nav { flex-direction: column; gap: 6px; }
  .back-top { position: static; transform: none; margin-top: 18px; }
  .back-top:hover { transform: translateY(-4px); }
}
