* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0f0f0f;
  --card: #1a1a1a;
  --card2: #222222;
  --border: #2a2a2a;
  --purple: #7c3aed;
  --purple-light: #8b5cf6;
  --cyan: #06b6d4;
  --text: #ffffff;
  --muted: #888888;
  --muted2: #555555;
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  padding-top: 80px;
}

/* FONTS */
[lang="ar"] body, [lang="ar"] * { font-family: 'Cairo', sans-serif; }
[lang="en"] body, [lang="en"] * { font-family: 'Inter', sans-serif; }
body { font-family: 'Inter', sans-serif; }

a { text-decoration: none; color: inherit; }

/* ===== SIDEBAR OVERLAY ===== */
.sidebar-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.sidebar-overlay.open { opacity: 1; pointer-events: all; }

/* ===== SIDEBAR — drops from top like anmka ===== */
.sidebar {
  position: fixed;
  top: -120%;
  left: 0; right: 0;
  z-index: 1001;
  transition: top 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar.open { top: 0; }

.sb-inner {
  background: #1c1c1c;
  margin: 12px 16px;
  border-radius: 20px;
  overflow: hidden;
  padding-bottom: 16px;
}

/* Nav card inside sidebar — rounded like anmka */
.sb-nav-card {
  background: #252525;
  border-radius: 16px;
  margin: 14px 14px 12px;
  overflow: hidden;
}
.sb-nav-card a {
  display: block;
  padding: 17px 20px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  text-align: right;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  direction: rtl;
}
[lang="en"] .sb-nav-card a { text-align: left; direction: ltr; }
.sb-nav-card a:last-child { border-bottom: none; }
.sb-nav-card a:active { background: rgba(255,255,255,0.05); }

/* White CTA button */
.sb-cta-btn {
  display: block;
  background: #ffffff;
  color: #111111;
  margin: 0 14px;
  padding: 17px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 1rem;
  text-align: center;
}
.sb-cta-btn:active { opacity: 0.9; }

/* ===== NAV ===== */
nav {
  background: rgba(28, 28, 28, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 18px;
  margin: 12px 16px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 998;
  border: 1px solid rgba(255,255,255,0.06);
  transition: background 0.3s;
}
.nav-logo { font-size: 1rem; font-weight: 800; color: var(--text); letter-spacing: -0.01em; }
.nav-sub { font-size: 0.7rem; color: var(--muted); margin-top: 1px; }
.nav-logo-wrap { text-align: center; flex: 1; }

/* FONT CLEANUP */
[lang="ar"] body, [lang="ar"] * { font-family: 'Cairo', sans-serif; }
[lang="en"] body, [lang="en"] * { font-family: 'Inter', sans-serif; }

a { text-decoration: none; color: inherit; }

/* ===== SIDEBAR OVERLAY ===== */
.sidebar-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.sidebar-overlay.open { opacity: 1; pointer-events: all; }

/* ===== SIDEBAR — drops from top ===== */
.sidebar {
  position: fixed;
  top: -100%;
  left: 0; right: 0;
  width: 100%;
  background: #1c1c1c;
  z-index: 1001;
  transition: top 0.38s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex; flex-direction: column;
  padding: 0;
  border-radius: 0 0 28px 28px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.7);
}
.sidebar.open { top: 0; }

.sidebar-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo { font-size: 1.1rem; font-weight: 800; color: var(--text); }
.sidebar-close {
  width: 36px; height: 36px; background: var(--card2);
  border-radius: 10px; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.sidebar-nav { padding: 20px 16px; flex: 1; }
.sidebar-nav {
  display: flex;
  flex-direction: column;
  padding: 8px 20px;
}
.sidebar-nav a {
  display: block;
  padding: 18px 0;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 700;
  text-align: right;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
  direction: rtl;
}
[lang="en"] .sidebar-nav a { text-align: left; direction: ltr; }
.sidebar-nav a:last-child { border-bottom: none; }
.sidebar-nav a:hover, .sidebar-nav a:active { color: var(--purple-light); }
.sidebar-footer {
  padding: 20px;
  border-top: 1px solid var(--border);
}
.sidebar-footer a {
  display: block;
  background: #ffffff;
  color: #111111;
  padding: 18px;
  border-radius: 16px;
  font-weight: 800;
  font-size: 1rem;
  text-align: center;
  transition: opacity 0.2s;
}
.sidebar-footer a:hover { opacity: 0.9; }

/* ===== NAV ===== */
nav {
  background: #1c1c1c;
  border-radius: 18px;
  margin: 12px 16px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 998;
}
.nav-logo { font-size: 1.05rem; font-weight: 800; color: var(--text); }
.nav-center { display: flex; align-items: center; gap: 10px; }

/* LANG TOGGLE */
.lang-toggle {
  display: flex; align-items: center;
  background: var(--card2); border: 1px solid var(--border);
  border-radius: 50px; padding: 4px;
  gap: 2px;
}
.lang-btn {
  padding: 5px 12px; border-radius: 50px;
  font-size: 0.75rem; font-weight: 700;
  cursor: pointer; border: none; background: transparent;
  color: var(--muted); transition: all 0.2s;
  font-family: inherit;
}
.lang-btn.active { background: var(--purple); color: white; }

.hamburger-btn {
  width: 38px; height: 38px; background: var(--card2);
  border-radius: 10px; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 5px;
}
.hamburger-btn span { width: 18px; height: 2px; background: var(--text); border-radius: 2px; display: block; }
.nav-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), #3b82f6);
  display: flex; align-items: center; justify-content: center;
}

/* ===== HERO ===== */
.hero { position: relative; padding: 60px 20px 40px; overflow: hidden; }
.hero-canvas { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero-canvas::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 60%, var(--bg) 100%); }
.hero-content { position: relative; z-index: 1; }
.hero-label { font-size: 0.82rem; color: var(--muted); text-align: center; margin-bottom: 12px; }
.hero h1 {
  font-size: clamp(2.2rem, 8vw, 3.8rem);
  font-weight: 900; line-height: 1.15;
  letter-spacing: -0.02em; color: var(--text);
  margin-bottom: 18px; text-align: right;
}
[lang="en"] .hero h1 { text-align: left; }
.hero-desc { font-size: 0.92rem; color: var(--muted); line-height: 1.9; text-align: center; margin-bottom: 28px; }
.tech-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; justify-content: center; }
.tech-tag { background: var(--card); border: 1px solid var(--border); padding: 6px 14px; border-radius: 50px; font-size: 0.78rem; color: var(--muted); font-weight: 600; }
.hero-btns { display: flex; gap: 12px; margin-bottom: 16px; }
.btn-purple { flex: 1; background: var(--purple); color: white; padding: 15px; border-radius: 14px; font-weight: 700; font-size: 0.92rem; text-align: center; transition: opacity 0.2s; font-family: inherit; }
.btn-purple:hover { opacity: 0.88; }
.btn-outline { flex: 1; background: var(--card); color: var(--text); padding: 15px; border-radius: 14px; font-weight: 600; font-size: 0.92rem; text-align: center; border: 1px solid var(--border); transition: border-color 0.2s; }
.btn-outline:hover { border-color: var(--purple-light); }

/* ===== SECTION ===== */
.sec-wrap { padding: 32px 20px; }
.section-label { font-size: 0.78rem; color: var(--muted); text-align: center; margin-bottom: 10px; font-weight: 600; letter-spacing: 0.05em; }
.section-title { font-size: clamp(1.9rem, 7vw, 3rem); font-weight: 900; letter-spacing: -0.02em; line-height: 1.15; color: var(--text); text-align: right; margin-bottom: 10px; }
[lang="en"] .section-title { text-align: left; }
.section-sub { font-size: 0.88rem; color: var(--muted); text-align: center; line-height: 1.85; margin-bottom: 24px; }
.divider { height: 1px; background: var(--border); margin: 0 20px; }

/* STATS */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat-card { background: var(--card); border-radius: 18px; padding: 26px 18px; text-align: center; }
.stat-num { font-size: 2.5rem; font-weight: 900; color: var(--text); letter-spacing: -0.04em; line-height: 1; margin-bottom: 8px; }
.stat-lbl { font-size: 0.85rem; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.stat-sub { font-size: 0.75rem; color: var(--muted2); }

/* PROJECTS */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 14px; }
.project-card { background: var(--card); border: 1px solid var(--border); border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; transition: transform 0.3s, border-color 0.3s; cursor: pointer; }
.project-card:hover { transform: translateY(-4px); border-color: var(--purple-light); }
.proj-img-ph { height: 180px; background: var(--card2); display: flex; align-items: center; justify-content: center; border-bottom: 1px solid var(--border); }
.proj-body { padding: 20px; text-align: right; }
[lang="en"] .proj-body { text-align: left; }
.proj-cat { font-size: 0.75rem; color: var(--purple-light); font-weight: 700; margin-bottom: 6px; letter-spacing: 0.05em; text-transform: uppercase; }
.proj-title { font-size: 1.1rem; font-weight: 800; color: var(--text); margin-bottom: 8px; }
.proj-desc { font-size: 0.85rem; color: var(--muted); line-height: 1.6; margin-bottom: 16px; }

/* SERVICE CARDS */
.svc-card { background: var(--card); border-radius: 20px; padding: 22px; margin-bottom: 14px; }
.svc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
[lang="en"] .svc-top { flex-direction: row-reverse; }
.svc-title-text { font-size: 1.1rem; font-weight: 800; color: var(--text); }
.svc-icon-box { width: 50px; height: 50px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.svc-icon-purple { background: var(--purple); }
.svc-icon-blue { background: #1d4ed8; }
.svc-icon-cyan { background: #0e7490; }
.svc-icon-green { background: #15803d; }
.svc-icon-orange { background: #c2410c; }
.svc-desc { font-size: 0.875rem; color: var(--muted); line-height: 1.85; text-align: right; margin-bottom: 16px; }
[lang="en"] .svc-desc { text-align: left; }

/* MOCK BOX */
.mock-box { background: var(--card2); border-radius: 14px; padding: 16px; margin-top: 8px; }
.mock-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.mock-header span { font-size: 0.78rem; color: var(--muted); }
.mock-dots { display: flex; gap: 6px; }
.mock-dots span { width: 9px; height: 9px; border-radius: 50%; display: block; }
.mock-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.mock-stat { background: var(--card); border-radius: 10px; padding: 10px; text-align: center; }
.mock-stat .mv { font-size: 0.95rem; font-weight: 800; color: var(--text); }
.mock-stat .ml { font-size: 0.68rem; color: var(--muted); margin-top: 2px; }
.mock-stat .mg { font-size: 0.66rem; color: #22c55e; }
.mock-bar-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.mock-bar-label { font-size: 0.73rem; color: var(--muted); min-width: 80px; text-align: right; }
[lang="en"] .mock-bar-label { text-align: left; }
.mock-bar-track { flex: 1; height: 5px; background: var(--border); border-radius: 99px; margin-right: 10px; overflow: hidden; }
[lang="en"] .mock-bar-track { margin-right: 0; margin-left: 10px; }
.mock-bar-fill { height: 100%; border-radius: 99px; background: var(--cyan); }

/* FEAT TILES */
.feat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.feat-tile { background: var(--card2); border-radius: 12px; padding: 14px; display: flex; align-items: center; justify-content: space-between; }
.feat-tile .ft-text { text-align: right; }
[lang="en"] .feat-tile .ft-text { text-align: left; }
.feat-tile .ft-title { font-size: 0.85rem; font-weight: 700; color: var(--text); }
.feat-tile .ft-sub { font-size: 0.72rem; color: var(--muted); margin-top: 2px; }
.feat-tile .ft-icon { flex-shrink: 0; margin-right: 8px; }
[lang="en"] .feat-tile .ft-icon { margin-right: 0; margin-left: 8px; }

/* PLATFORM */
.platform-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.platform-tile { background: var(--card2); border-radius: 14px; padding: 18px 14px; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 0.85rem; font-weight: 600; color: var(--text); }

/* TAGS */
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; justify-content: flex-end; }
[lang="en"] .tags { justify-content: flex-start; }
.tag { font-size: 0.72rem; font-weight: 600; background: rgba(124,58,237,0.15); border: 1px solid rgba(124,58,237,0.25); color: var(--purple-light); padding: 5px 12px; border-radius: 50px; }

/* SKILLS */
.skills-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sk-tile { background: var(--card); border-radius: 14px; padding: 16px 14px; display: flex; align-items: center; gap: 12px; }
.sk-name { font-size: 0.88rem; font-weight: 700; color: var(--text); }
.sk-sub { font-size: 0.72rem; color: var(--muted); margin-top: 2px; }

/* WHY */
.why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.why-card { background: var(--card); border-radius: 18px; padding: 22px 16px; text-align: center; }
.why-icon-box { width: 44px; height: 44px; background: rgba(124,58,237,0.15); border-radius: 12px; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }
.why-card h4 { font-size: 0.9rem; font-weight: 800; color: var(--text); margin-bottom: 8px; }
.why-card p { font-size: 0.78rem; color: var(--muted); line-height: 1.7; }

/* CONTACT FORM */
.contact-form { background: var(--card); border-radius: 20px; padding: 24px; }
.form-label { font-size: 0.88rem; font-weight: 700; color: var(--text); display: block; text-align: right; margin-bottom: 10px; }
[lang="en"] .form-label { text-align: left; }
.form-input, .form-select {
  width: 100%; background: var(--card2); border: 1px solid var(--border);
  border-radius: 12px; padding: 15px 18px; font-size: 0.9rem; color: var(--muted);
  text-align: right; margin-bottom: 18px; outline: none;
  font-family: inherit; direction: rtl; transition: border-color 0.2s;
}
[lang="en"] .form-input, [lang="en"] .form-select { text-align: left; direction: ltr; }
.form-input:focus, .form-select:focus { border-color: var(--purple-light); color: var(--text); }
.form-input::placeholder { color: var(--muted2); }
.form-select { appearance: none; cursor: pointer; margin-bottom: 24px; }
.btn-send { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; background: var(--text); color: var(--bg); padding: 16px; border-radius: 14px; font-weight: 800; font-size: 0.95rem; border: none; cursor: pointer; transition: opacity 0.2s; font-family: inherit; }
.btn-send:hover { opacity: 0.88; }

/* CLINKS */
.clinks-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.clink-tile { background: var(--card); border-radius: 14px; padding: 18px 14px; display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 0.85rem; font-weight: 700; color: var(--text); transition: background 0.2s; }
.clink-tile:hover { background: var(--card2); }
.clink-icon-box { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }

/* CTA */
.cta-strip { background: var(--purple); margin: 0 20px 20px; border-radius: 16px; padding: 24px 20px; text-align: center; }
.cta-strip h3 { font-size: 1.15rem; font-weight: 800; color: white; margin-bottom: 6px; }
.cta-strip p { font-size: 0.82rem; color: rgba(255,255,255,0.75); margin-bottom: 16px; }
.btn-white { display: inline-block; background: white; color: var(--purple); padding: 12px 28px; border-radius: 50px; font-weight: 800; font-size: 0.9rem; }

/* FOOTER */
footer { padding: 32px 20px 40px; text-align: center; }
.footer-logo { font-size: 1.2rem; font-weight: 900; color: var(--text); margin-bottom: 6px; }
footer p { font-size: 0.8rem; color: var(--muted2); margin-top: 4px; }

/* HIDDEN for lang toggle */
.ar-only, .en-only { }
[lang="ar"] .en-only { display: none !important; }
[lang="en"] .ar-only { display: none !important; }

/* FLOATING WHATSAPP */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  background-color: #25d366;
  color: #fff;
  border-radius: 50px;
  text-align: center;
  font-size: 30px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  animation: pulse-whatsapp 2s infinite;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  background-color: #20ba5a;
  box-shadow: 0 6px 25px rgba(0,0,0,0.4);
}

@keyframes pulse-whatsapp {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

[lang="ar"] .whatsapp-float {
  right: auto;
  left: 24px;
}


