
:root {
  --blue-deep: #0a1628;
  --blue-mid: #1a3a6e;
  --blue-accent: #1e5fd4;
  --blue-light: #4a8af4;
  --blue-glow: #6ba3ff;
  --gold: #e8b84b;
  --white: #f8f9ff;
  --gray-light: #c5cfe0;
  --gray-mid: #7a8ba8;
  --surface: #111c30;
  --surface2: #16233a;
  --card: #1a2d4a;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--blue-deep);
  color: var(--white);
  overflow-x: hidden;
}
body.lang-ar {
  font-family: 'Cairo', 'DM Sans', sans-serif;
  direction: rtl;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--blue-deep); }
::-webkit-scrollbar-thumb { background: var(--blue-accent); border-radius: 2px; }

/* ─── LANGUAGE SWITCHER ─── */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(74,138,244,0.08);
  border: 1px solid rgba(74,138,244,0.22);
  border-radius: 999px;
  padding: 0.25rem 0.4rem;
  flex-shrink: 0;
}
.lang-btn {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--gray-mid);
  transition: all 0.2s;
  text-transform: uppercase;
  white-space: nowrap;
}
.lang-btn .flag {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.lang-btn .flag svg { display: block; }
.lang-btn:hover { color: var(--white); }
.lang-btn.active {
  background: var(--blue-accent);
  color: var(--white);
}
.lang-btn.active-ar {
  background: var(--gold);
  color: var(--blue-deep);
}

/* ─── NAV ─── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.2rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(20px);
  background: rgba(10, 22, 40, 0.85);
  border-bottom: 1px solid rgba(74, 138, 244, 0.15);
  transition: all 0.3s;
}
.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.02em;
}
.nav-logo span { color: var(--blue-glow); }
.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}
body.lang-ar .nav-links { padding-right: 0; padding-left: 0; }
.nav-links a {
  color: var(--gray-light);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--blue-glow);
  transition: width 0.3s;
}
body.lang-ar .nav-links a::after { right: 0; left: auto; }
.nav-links a:hover { color: var(--blue-glow); }
.nav-links a:hover::after { width: 100%; }
.nav-cta {
  background: var(--blue-accent);
  color: var(--white) !important;
  padding: 0.5rem 1.3rem;
  border-radius: 4px;
  transition: background 0.2s !important;
}
.nav-cta:hover { background: var(--blue-light) !important; color: var(--white) !important; }
.nav-cta::after { display: none !important; }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
.hamburger span { width: 24px; height: 2px; background: var(--white); border-radius: 2px; transition: all 0.3s; }

/* ─── HERO ─── */
.hero {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  padding: 6rem 3rem 3rem;
  overflow: hidden;
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(74,138,244,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74,138,244,0.06) 1px, transparent 1px);
  background-size: 60px 60px;
}
.hero-orb1 {
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(30,95,212,0.25) 0%, transparent 70%);
  top: -150px; right: -100px;
  animation: float 8s ease-in-out infinite;
}
.hero-orb2 {
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(107,163,255,0.12) 0%, transparent 70%);
  bottom: 0; left: 10%;
  animation: float 10s ease-in-out infinite reverse;
}
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-30px); }
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(30,95,212,0.2);
  border: 1px solid rgba(74,138,244,0.3);
  padding: 0.35rem 1rem;
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--blue-glow);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  animation: fadeUp 0.6s ease both;
}
body.lang-ar .hero-label { letter-spacing: 0; }
.hero-label::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--blue-glow);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.hero-name {
  font-family: 'Playfair Display', serif;
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 900;
  line-height: 1.0;
  margin-bottom: 0.3rem;
  animation: fadeUp 0.7s ease 0.1s both;
}
.hero-name .accent { color: var(--blue-glow); }
.hero-title {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--gold);
  font-weight: 500;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
  animation: fadeUp 0.7s ease 0.2s both;
}
body.lang-ar .hero-title { letter-spacing: 0; }
.hero-desc {
  color: var(--gray-light);
  line-height: 1.8;
  max-width: 480px;
  margin-bottom: 2.5rem;
  animation: fadeUp 0.7s ease 0.3s both;
}
.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  /*background: var(--card);*/
}
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  animation: fadeUp 0.7s ease 0.4s both;
}
.btn-primary {
  background: var(--blue-accent);
  color: var(--white);
  padding: 0.8rem 2rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
  border: 1px solid transparent;
}
.btn-primary:hover {
  background: var(--blue-light);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(30,95,212,0.4);
}
.btn-outline {
  background: transparent;
  color: var(--blue-glow);
  padding: 0.8rem 2rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid rgba(107,163,255,0.4);
  transition: all 0.2s;
}
.btn-outline:hover {
  background: rgba(107,163,255,0.1);
  border-color: var(--blue-glow);
}
.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2.5rem;
  animation: fadeUp 0.7s ease 0.5s both;
}
.stat-item { text-align: center; }
.stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--blue-glow);
  display: block;
}
.stat-label { font-size: 0.75rem; color: var(--gray-mid); text-transform: uppercase; letter-spacing: 0.08em; }
body.lang-ar .stat-label { letter-spacing: 0; }
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeUp 0.8s ease 0.3s both;
}
.hero-photo-wrap {
  position: relative;
  /*width: 550px;
  height: 420px;*/
}
.hero-photo-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  /*background: linear-gradient(135deg, var(--blue-mid), var(--surface2));*/
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--gray-mid);
  /*border: 2px dashed rgba(74,138,244,0.3);*/
  font-size: 0.9rem;
  text-align: center;
  gap: 0.5rem;
}
.photo-icon { font-size: 3rem; opacity: 0.4; }
/* .hero-photo-border {
  position: absolute;
  inset: -10px;
  border-radius: 18px;
  border: 1px solid rgba(74,138,244,0.25);
  z-index: -1;
} */
/* .hero-photo-border2 {
  position: absolute;
  inset: -20px;
  border-radius: 22px;
  border: 1px solid rgba(74,138,244,0.1);
  z-index: -2;
} */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── SECTIONS ─── */
.section {
  padding: 6rem 3rem;
  position: relative;
  z-index: 1;
}
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--blue-glow);
  margin-bottom: 0.8rem;
  font-weight: 600;
}
body.lang-ar .section-tag { letter-spacing: 0; }
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1rem;
}
body.lang-ar .section-title { font-family: 'Cairo', sans-serif; }
.section-title .line { display: block; }
.section-title .accent { color: var(--blue-glow); }
.section-subtitle { color: var(--gray-mid); font-size: 1rem; line-height: 1.7; max-width: 550px; }

/* ─── ABOUT ─── */
.about-bg { background: var(--surface); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}
.about-text p { color: var(--gray-light); line-height: 1.9; margin-bottom: 1.2rem; }
.about-text .highlight { color: var(--blue-glow); font-weight: 600; }
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
}
.info-card {
  background: var(--card);
  border: 1px solid rgba(74,138,244,0.15);
  border-radius: 10px;
  padding: 1rem 1.2rem;
}
.info-card label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--blue-glow);
  display: block;
  margin-bottom: 0.3rem;
}
body.lang-ar .info-card label { letter-spacing: 0; }
.info-card p {
  font-size: 0.9rem !important;
  color: var(--white) !important;
  margin: 0 !important;
  line-height: 1.4 !important;
  font-weight: 500;
}
.lang-section { margin-bottom: 2.5rem; }
.lang-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--blue-glow);
  margin-bottom: 1rem;
}
body.lang-ar .lang-title { letter-spacing: 0; }
.lang-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.9rem;
}
.lang-name { font-size: 0.9rem; font-weight: 600; width: 80px; flex-shrink: 0; }
.lang-bar-wrap {
  flex: 1;
  height: 4px;
  background: rgba(74,138,244,0.15);
  border-radius: 2px;
  overflow: hidden;
}
.lang-bar {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--blue-accent), var(--blue-glow));
  transition: width 1.5s ease;
}
.lang-level { font-size: 0.75rem; color: var(--gray-mid); width: 90px; text-align: right; flex-shrink: 0; }
body.lang-ar .lang-level { text-align: left; }
.interest-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--blue-glow);
  margin-bottom: 1rem;
}
.interests-wrap { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.interest-tag {
  background: rgba(30,95,212,0.15);
  border: 1px solid rgba(74,138,244,0.25);
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--gray-light);
  transition: all 0.2s;
}
.interest-tag:hover { background: rgba(30,95,212,0.3); color: var(--white); border-color: rgba(74,138,244,0.5); }

/* ─── SKILLS ─── */
.skills-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
  align-items: end;
}
.skills-categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}
.skill-cat {
  background: var(--surface2);
  border: 1px solid rgba(74,138,244,0.12);
  border-radius: 14px;
  padding: 1.8rem;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.skill-cat::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--blue-accent), var(--blue-glow));
  opacity: 0;
  transition: opacity 0.3s;
}
.skill-cat:hover { border-color: rgba(74,138,244,0.3); transform: translateY(-3px); box-shadow: 0 15px 40px rgba(10,22,40,0.5); }
.skill-cat:hover::before { opacity: 1; }
.cat-icon { font-size: 1.8rem; margin-bottom: 0.8rem; display: block; }
.cat-name { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--blue-glow); margin-bottom: 0.5rem; font-weight: 600; }
body.lang-ar .cat-name { letter-spacing: 0; }
.cat-title { font-family: 'Playfair Display', serif; font-size: 1.2rem; font-weight: 700; margin-bottom: 1.2rem; }
body.lang-ar .cat-title { font-family: 'Cairo', sans-serif; }
.skill-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pill {
  background: rgba(74,138,244,0.1);
  border: 1px solid rgba(74,138,244,0.2);
  color: var(--gray-light);
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.2s;
}
.pill:hover { background: rgba(74,138,244,0.25); color: var(--white); border-color: rgba(74,138,244,0.5); }
.pill.primary { background: rgba(30,95,212,0.3); border-color: rgba(74,138,244,0.4); color: var(--blue-glow); }

/* ─── EXPERIENCE ─── */
.exp-bg { background: var(--surface); }
.exp-timeline { position: relative; padding-left: 2.5rem; }
body.lang-ar .exp-timeline { padding-left: 0; padding-right: 2.5rem; }
.exp-timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 8px; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--blue-accent), transparent);
}
body.lang-ar .exp-timeline::before { left: auto; right: 0; }
.exp-item { position: relative; margin-bottom: 3.5rem; }
.exp-dot {
  position: absolute;
  left: -2.5rem;
  top: 8px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--blue-accent);
  border: 2px solid var(--blue-deep);
  box-shadow: 0 0 0 4px rgba(30,95,212,0.2);
}
body.lang-ar .exp-dot { left: auto; right: -2.5rem; }
.exp-meta { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.5rem; flex-wrap: wrap; }
.exp-date { font-size: 0.8rem; color: var(--blue-glow); font-weight: 600; background: rgba(30,95,212,0.15); border: 1px solid rgba(74,138,244,0.25); padding: 0.2rem 0.8rem; border-radius: 999px; }
.exp-org { font-size: 0.85rem; color: var(--gold); font-weight: 500; }
.exp-role { font-family: 'Playfair Display', serif; font-size: 1.4rem; font-weight: 700; margin-bottom: 1rem; }
body.lang-ar .exp-role { font-family: 'Cairo', sans-serif; }
.exp-tasks { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0.6rem; }
.exp-task { display: flex; align-items: flex-start; gap: 0.6rem; color: var(--gray-light); font-size: 0.88rem; line-height: 1.5; }
.exp-task::before { content: '→'; color: var(--blue-glow); flex-shrink: 0; margin-top: 0.1rem; }
body.lang-ar .exp-task::before { content: '←'; }

/* ─── PROJECTS ─── */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; margin-top: 3rem; }
.project-card { background: var(--surface2); border: 1px solid rgba(74,138,244,0.12); border-radius: 14px; overflow: hidden; transition: all 0.3s; }
.project-card:hover { border-color: rgba(74,138,244,0.35); transform: translateY(-4px); box-shadow: 0 20px 50px rgba(10,22,40,0.6); }
.project-img-placeholder { width: 100%; height: 200px; background: linear-gradient(135deg, #1a3a6e 0%, #111c30 100%); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem; color: var(--gray-mid); border-bottom: 1px solid rgba(74,138,244,0.15); }
.img-icon { font-size: 2.5rem; opacity: 0.3; }
.img-label { font-size: 0.8rem; opacity: 0.5; }
.project-body { padding: 1.5rem; }
.project-tags { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.project-tag { font-size: 0.7rem; padding: 0.2rem 0.6rem; border-radius: 3px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.tag-blue { background: rgba(30,95,212,0.25); color: var(--blue-glow); }
.tag-gold { background: rgba(232,184,75,0.15); color: var(--gold); }
.tag-green { background: rgba(74,212,130,0.15); color: #5de8a0; }
.project-title { font-family: 'Playfair Display', serif; font-size: 1.15rem; font-weight: 700; margin-bottom: 0.6rem; }
body.lang-ar .project-title { font-family: 'Cairo', sans-serif; }
.project-desc { color: var(--gray-mid); font-size: 0.88rem; line-height: 1.6; }

/* ─── CONTACT ─── */
.contact-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; margin-top: 3rem; }
.contact-cards { display: flex; flex-direction: column; gap: 1rem; }
.contact-card { display: flex; align-items: center; gap: 1.2rem; background: var(--card); border: 1px solid rgba(74,138,244,0.15); border-radius: 12px; padding: 1.2rem 1.5rem; text-decoration: none; color: inherit; transition: all 0.2s; }
.contact-card:hover { border-color: rgba(74,138,244,0.35); transform: translateX(4px); }
.contact-card-phone { cursor: default; }
.contact-card-phone:hover { transform: none; }
.phone-actions { display: flex; gap: 0.6rem; margin-top: 0.6rem; flex-wrap: wrap; }
.phone-btn { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.38rem 0.9rem; border-radius: 6px; font-size: 0.8rem; font-weight: 600; text-decoration: none; transition: all 0.2s; }
.phone-btn-wa { background: rgba(37,211,102,0.15); border: 1px solid rgba(37,211,102,0.35); color: #25d366; }
.phone-btn-wa:hover { background: rgba(37,211,102,0.28); border-color: #25d366; }
.phone-btn-call { background: rgba(74,138,244,0.15); border: 1px solid rgba(74,138,244,0.35); color: var(--blue-glow); }
.phone-btn-call:hover { background: rgba(74,138,244,0.28); border-color: var(--blue-glow); }
body.lang-ar .contact-card:hover { transform: translateX(-4px); }
.contact-icon { font-size: 1.5rem; flex-shrink: 0; }
.contact-info label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--blue-glow); display: block; margin-bottom: 0.3rem; }
body.lang-ar .contact-info label { letter-spacing: 0; }
.contact-info p { font-size: 0.95rem; font-weight: 500; }
.contact-social { margin-top: 2rem; }
.social-title { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--gray-mid); margin-bottom: 1rem; }
.social-links { display: flex; gap: 0.8rem; }
.social-btn { width: 44px; height: 44px; background: var(--surface2); border: 1px solid rgba(74,138,244,0.2); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; color: var(--gray-light); text-decoration: none; transition: all 0.2s; }
.social-btn:hover { background: rgba(30,95,212,0.25); border-color: rgba(74,138,244,0.5); color: var(--blue-glow); transform: translateY(-2px); }
.contact-right h3 { font-family: 'Playfair Display', serif; font-size: 1.8rem; font-weight: 700; margin-bottom: 1rem; }
body.lang-ar .contact-right h3 { font-family: 'Cairo', sans-serif; }
.contact-right p { color: var(--gray-light); line-height: 1.8; margin-bottom: 1.5rem; }
.availability-badge { display: inline-flex; align-items: center; gap: 0.6rem; background: rgba(93,232,160,0.1); border: 1px solid rgba(93,232,160,0.25); padding: 0.5rem 1.2rem; border-radius: 999px; font-size: 0.82rem; color: #5de8a0; font-weight: 600; }
.availability-dot { width: 8px; height: 8px; background: #5de8a0; border-radius: 50%; animation: pulse 2s infinite; }


body.lang-ar .contact-info .num {
  direction: ltr;
  text-align: right;
  unicode-bidi: bidi-override;
}

/* ─── FOOTER ─── */
footer { background: #060e1c; padding: 2rem 3rem; border-top: 1px solid rgba(74,138,244,0.1); display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; }
.footer-name { font-family: 'Playfair Display', serif; font-size: 1.1rem; font-weight: 700; }
.footer-copy { font-size: 0.8rem; color: var(--gray-mid); }

/* ─── DIVIDER ─── */
.divider { height: 1px; background: linear-gradient(90deg, transparent, rgba(74,138,244,0.2), transparent); margin: 0; }

/* ─── MOBILE NAV — SIDE DRAWER ─── */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(5, 12, 25, 0.6);
  z-index: 98;
  backdrop-filter: blur(3px);
}
.mobile-overlay.open { display: block; }

/* Drawer LTR (gauche) — par défaut */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(70vw, 280px);
  background: linear-gradient(160deg, #0d1f3c 0%, #0a1628 60%, #081220 100%);
  border-right: 1px solid rgba(74,138,244,0.25);
  z-index: 99;
  display: flex;
  flex-direction: column;
  padding: 4.5rem 1.6rem 2rem;
  gap: 0;
  transform: translateX(-110%);
  transition: transform 0.32s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 6px 0 32px rgba(5,12,25,0.7);
}

/* Drawer RTL (droite) */
.mobile-menu[data-dir="rtl"] {
  left: auto;
  right: 0;
  border-right: none;
  border-left: 1px solid rgba(74,138,244,0.25);
  box-shadow: -6px 0 32px rgba(5,12,25,0.7);
  transform: translateX(110%);
}

.mobile-menu.open {
  transform: translateX(0) !important;
}

/* Liens nav */
.mobile-menu a {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--gray-light);
  text-decoration: none;
  font-weight: 700;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(74,138,244,0.1);
  transition: color 0.2s, padding-left 0.2s;
  display: block;
}
.mobile-menu[data-dir="rtl"] a { font-family: 'Cairo', sans-serif; text-align: right; }
.mobile-menu a:last-of-type { border-bottom: none; }
.mobile-menu a:hover { color: var(--blue-glow); padding-left: 0.5rem; }
.mobile-menu[data-dir="rtl"] a:hover { padding-left: 0; padding-right: 0.5rem; }

/* Bouton fermeture */
.mobile-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  color: var(--gray-mid);
  cursor: pointer;
  background: rgba(74,138,244,0.1);
  border: 1px solid rgba(74,138,244,0.2);
  border-radius: 7px;
  transition: all 0.2s;
}
.mobile-close:hover { color: var(--white); background: rgba(74,138,244,0.22); }
.mobile-menu[data-dir="rtl"] .mobile-close { right: auto; left: 1rem; }

/* Logo dans le drawer */
.mobile-menu .drawer-logo {
  position: absolute;
  top: 1rem;
  left: 1.4rem;
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
}
.mobile-menu[data-dir="rtl"] .drawer-logo { left: auto; right: 1.4rem; }
.mobile-menu .drawer-logo span { color: var(--blue-glow); }

/* Switcher langue dans le drawer */
.mobile-lang-switcher {
  display: flex !important;
  margin-bottom: 1.2rem;
  justify-content: flex-start;
}
.mobile-menu[data-dir="rtl"] .mobile-lang-switcher { justify-content: flex-end; }

/* Hamburger → X */
.hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  nav { padding: 1rem 1.5rem; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .lang-switcher { display: none; }
  .hero { padding: 5rem 1.5rem 3rem; }
  .hero-content { grid-template-columns: 1fr; gap: 3rem; }
  .hero-visual { display: none; }
  .section { padding: 4rem 1.5rem; }
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .skills-header { grid-template-columns: 1fr; gap: 1.5rem; }
  .exp-tasks { grid-template-columns: 1fr; }
  .contact-wrap { grid-template-columns: 1fr; gap: 2.5rem; }
  footer { flex-direction: column; gap: 0.5rem; text-align: center; }
  .exp-edu-wrap { grid-template-columns: 1fr !important; gap: 2rem !important; }
}
@media (max-width: 600px) {
  .hero-stats { gap: 1.2rem; }
  .skills-categories { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .edu-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .lang-btn .lang-text { display: none; }
}

.flag {
  width: 20px;
  height: 15px;
  display: inline-block;
  margin-right: 6px;
}

/* ─── SCROLL ANIMATIONS ─── */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* hidden by language */
[data-lang] { display: none !important; }
[data-lang].active { display: revert !important; }
