/* ============================================
   Modern Colorful Portfolio — Ibrahim Mansour
   2026 Dopamine Design · Light Theme
   Bilingual (EN/AR) with RTL Support
   ============================================ */

@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&family=Noto+Kufi+Arabic:wght@300;400;500;600;700;800&display=swap");

/* ---------- Custom Properties ---------- */
:root {
  --bg: #faf9ff;
  --bg-2: #f3f1fa;
  --bg-card: #ffffff;
  --border: rgba(0, 0, 0, 0.06);
  --border-hover: rgba(0, 0, 0, 0.1);
  --text: #1a1a2e;
  --text-muted: #555770;
  --text-dim: #8888a4;
  --accent: #7c5cfc;
  --accent-light: #a78bfa;
  --coral: #ff6b6b;
  --yellow: #ffd43b;
  --teal: #38d9a9;
  --blue: #4dabf7;
  --pink: #f783ac;
  --orange: #ff922b;
  --gradient-hero: linear-gradient(135deg, #7c5cfc, #ff6b9d, #ffd43b);
  --gradient-text: linear-gradient(135deg, #7c5cfc, #ff6b9d);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.08);
  --shadow-color: 0 8px 32px rgba(124, 92, 252, 0.12);
  --radius: 1.2rem;
  --radius-lg: 1.8rem;
  --radius-xl: 2.4rem;
  --font-en: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-ar: "Noto Kufi Arabic", "Plus Jakarta Sans", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
  scroll-padding-top: 8rem;
}

body {
  font-family: var(--font-en);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.rtl {
  font-family: var(--font-ar);
  direction: rtl;
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

section {
  padding: 10rem 6% 6rem;
  position: relative;
}

/* ---------- Scroll Progress Bar ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--gradient-hero);
  z-index: 1001;
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
}

/* ---------- Ambient Background ---------- */
.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(150px);
  opacity: 0.12;
}

.blob-1 {
  width: 700px;
  height: 700px;
  background: #7c5cfc;
  top: -300px;
  right: -200px;
  animation: float 20s ease-in-out infinite;
}

.blob-2 {
  width: 600px;
  height: 600px;
  background: #ff6b9d;
  bottom: -200px;
  left: -150px;
  animation: float 25s ease-in-out infinite reverse;
}

.blob-3 {
  width: 500px;
  height: 500px;
  background: #ffd43b;
  top: 40%;
  left: 40%;
  animation: float 30s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -50px) scale(1.05); }
  66% { transform: translate(-20px, 30px) scale(0.95); }
}

/* ---------- Header ---------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.4rem 6%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  background: rgba(250, 249, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.logo {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
}

.logo span {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.navbar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.navbar a {
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.7rem 1.4rem;
  border-radius: 10rem;
  transition: var(--transition);
}

.navbar a:hover {
  color: var(--text);
  background: var(--bg-2);
}

.navbar a.active {
  color: var(--accent);
  background: rgba(124, 92, 252, 0.08);
}

/* Language Toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10rem;
  overflow: hidden;
  padding: 0.3rem;
}

.lang-toggle button {
  padding: 0.5rem 1rem;
  font-size: 1.2rem;
  font-weight: 600;
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-en);
  border-radius: 10rem;
}

.lang-toggle button[data-lang="ar"] {
  font-family: var(--font-ar);
}

.lang-toggle button.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(124, 92, 252, 0.3);
}

#menu-icon {
  font-size: 3rem;
  color: var(--text);
  cursor: pointer;
  display: none;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1.2rem 2.4rem;
  font-size: 1.4rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: 10rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn i { font-size: 1.6rem; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 16px rgba(124, 92, 252, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(124, 92, 252, 0.4);
  background: #6b4ce0;
}

.btn-outline {
  background: var(--bg-card);
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: var(--shadow);
}

/* ---------- Section Header ---------- */
.section-header {
  text-align: center;
  margin-bottom: 6rem;
}

.section-tag {
  display: inline-block;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 1.2rem;
  padding: 0.5rem 1.6rem;
  background: rgba(124, 92, 252, 0.08);
  border-radius: 10rem;
}

body.rtl .section-tag { letter-spacing: 0; }

.section-title {
  font-size: 4.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

body.rtl .section-title { letter-spacing: 0; }

.section-title span {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  font-size: 1.5rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6rem;
  padding-top: 12rem;
}

.hero-content {
  flex: 1;
  max-width: 60rem;
}

.hero-greeting {
  font-size: 1.6rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.8rem;
}

.hero-name {
  font-size: clamp(4.4rem, 6vw, 7rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 1.2rem;
  background: linear-gradient(135deg, var(--text) 0%, #7c5cfc 50%, #ff6b9d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body.rtl .hero-name { letter-spacing: 0; }

.hero-role {
  font-size: 2.4rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  min-height: 3.6rem;
}

.hero-role .typed-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cursor {
  color: var(--accent);
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Status Badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.6rem 1.6rem;
  background: rgba(56, 217, 169, 0.1);
  border: 1px solid rgba(56, 217, 169, 0.25);
  border-radius: 10rem;
  font-size: 1.2rem;
  font-weight: 600;
  color: #0ca678;
  margin-bottom: 2rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #0ca678;
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(12, 166, 120, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(12, 166, 120, 0); }
}

.hero-desc {
  font-size: 1.6rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 3.2rem;
  max-width: 50rem;
}

.hero-cta {
  display: flex;
  gap: 1.2rem;
  margin-bottom: 3.2rem;
  flex-wrap: wrap;
}

.hero-socials {
  display: flex;
  gap: 1rem;
}

.hero-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4.4rem;
  height: 4.4rem;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  font-size: 2rem;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.hero-socials a:hover {
  color: #fff;
  border-color: transparent;
  transform: translateY(-3px);
}

.hero-socials a:nth-child(1):hover { background: #333; }       /* GitHub */
.hero-socials a:nth-child(2):hover { background: #0077b5; }    /* LinkedIn */
.hero-socials a:nth-child(3):hover { background: #25d366; }    /* WhatsApp */
.hero-socials a:nth-child(4):hover { background: #1877f2; }    /* Facebook */
.hero-socials a:nth-child(5):hover { background: #ff0000; }    /* YouTube */

/* Hero Image */
.hero-visual { flex: 0 0 auto; }

.hero-img-wrapper {
  position: relative;
  width: 34rem;
  height: 34rem;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: linear-gradient(135deg, #7c5cfc33, #ff6b9d33, #ffd43b33);
  padding: 4px;
  animation: heroFloat 6s ease-in-out infinite;
}

.hero-img-wrapper::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #7c5cfc, #ff6b9d, #ffd43b);
  z-index: 0;
}

.hero-img-wrapper img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  border-radius: calc(var(--radius-xl) - 4px);
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-1.2rem); }
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about { background: transparent; }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 6rem;
  align-items: center;
  max-width: 110rem;
  margin: 0 auto;
}

.about-img-wrapper {
  width: 100%;
  max-width: 34rem;
  aspect-ratio: 1;
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin: 0 auto;
  animation: heroFloat 6s ease-in-out infinite;
  background: linear-gradient(135deg, #38d9a933, #4dabf733);
  padding: 4px;
}

.about-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  border-radius: calc(var(--radius-xl) - 4px);
}

.about-text h3 {
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: 2rem;
  letter-spacing: -0.01em;
}

body.rtl .about-text h3 { letter-spacing: 0; }

.about-text p {
  font-size: 1.5rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.about-stats {
  display: flex;
  gap: 4rem;
  margin-top: 3rem;
  padding-top: 3rem;
  border-top: 1.5px solid var(--border);
}

.stat-item { display: flex; flex-direction: column; }

.stat-number {
  font-size: 3.6rem;
  font-weight: 800;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.stat-label {
  font-size: 1.3rem;
  color: var(--text-dim);
  margin-top: 0.4rem;
  font-weight: 500;
}

/* ============================================
   SKILLS SECTION
   ============================================ */
.skills { background: var(--bg-2); border-radius: 0; }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  max-width: 100rem;
  margin: 0 auto;
}

.skill-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.skill-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.skill-card:nth-child(1):hover { border-color: var(--blue); }
.skill-card:nth-child(2):hover { border-color: var(--teal); }
.skill-card:nth-child(3):hover { border-color: var(--orange); }
.skill-card:nth-child(4):hover { border-color: var(--coral); }
.skill-card:nth-child(5):hover { border-color: var(--accent); }
.skill-card:nth-child(6):hover { border-color: var(--pink); }
.skill-card:nth-child(7):hover { border-color: var(--teal); }
.skill-card:nth-child(8):hover { border-color: var(--yellow); }

.skill-card i {
  font-size: 4rem;
  margin-bottom: 1.5rem;
}

.skill-card:nth-child(1) i { color: var(--blue); }
.skill-card:nth-child(2) i { color: var(--teal); }
.skill-card:nth-child(3) i { color: var(--orange); }
.skill-card:nth-child(4) i { color: var(--coral); }
.skill-card:nth-child(5) i { color: var(--accent); }
.skill-card:nth-child(6) i { color: var(--pink); }
.skill-card:nth-child(7) i { color: var(--teal); }
.skill-card:nth-child(8) i { color: var(--yellow); }

.skill-card h4 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.skill-card p {
  font-size: 1.2rem;
  color: var(--text-dim);
}

/* ============================================
   PROJECTS SECTION
   ============================================ */

/* Filter Bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 4rem;
}

.filter-btn {
  padding: 0.7rem 1.6rem;
  font-size: 1.3rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 10rem;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.filter-btn:hover {
  color: var(--text);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-sm);
}

.filter-btn.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(124, 92, 252, 0.25);
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.4rem;
  max-width: 120rem;
  margin: 0 auto;
}

.projects-grid.featured-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 2.8rem;
  max-width: 96rem;
}

.featured-grid .project-card-header {
  height: 18rem;
}

.featured-grid .device-frame {
  width: 9.6rem;
  height: 15rem;
}

.featured-grid .card-app-icon {
  width: 6rem;
  height: 6rem;
}

.featured-grid .card-app-icon i {
  font-size: 3rem;
}

.featured-grid .project-info {
  padding: 2.4rem 2.8rem;
}

.featured-grid .project-info h3 {
  font-size: 2.2rem;
}

.featured-grid .project-info p {
  font-size: 1.35rem;
  -webkit-line-clamp: 4;
}

.project-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  animation: cardIn 0.4s ease forwards;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.project-card.hidden { display: none; }

@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.project-card-header {
  position: relative;
  height: 14rem;
  background: var(--gradient, linear-gradient(135deg, #7c5cfc, #ff6b9d));
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.8rem 2.2rem;
  overflow: hidden;
}

/* Subtle noise texture overlay */
.project-card-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' 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;
}

/* Left meta area */
.card-meta {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  z-index: 1;
  flex: 1;
}

.card-app-icon {
  width: 5rem;
  height: 5rem;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(6px);
  border-radius: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.card-app-icon i {
  font-size: 2.6rem;
  color: rgba(255, 255, 255, 0.95);
}

.card-label {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.7);
}

/* ── Device Frame Mockup ── */
.device-frame {
  width: 8.4rem;
  height: 13rem;
  border: 2.5px solid rgba(255, 255, 255, 0.55);
  border-radius: 1.8rem;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  z-index: 1;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.25);
}

/* notch */
.device-frame::before {
  content: '';
  position: absolute;
  top: 7px;
  left: 50%;
  transform: translateX(-50%);
  width: 2.4rem;
  height: 0.35rem;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 2px;
  z-index: 10;
}

.device-screen {
  position: absolute;
  inset: 0;
  padding: 1.6rem 0.7rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* Skeleton UI pieces */
.ds-bar {
  height: 0.6rem;
  border-radius: 0.3rem;
  background: rgba(255, 255, 255, 0.55);
}
.ds-bar.w-full  { width: 100%; }
.ds-bar.w-75    { width: 75%; }
.ds-bar.w-55    { width: 55%; }
.ds-bar.w-40    { width: 40%; }
.ds-bar.thin    { height: 0.4rem; }
.ds-bar.thick   { height: 0.9rem; }

.ds-block {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 0.6rem;
}

.ds-row {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.ds-circle {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}

.ds-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}

.ds-grid .ds-block {
  height: 3.2rem;
}

.ds-spacer { flex: 1; }

.project-badge {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  padding: 0.3rem 1.2rem;
  border-radius: 10rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
}

body.rtl .project-badge { right: auto; left: 1.2rem; }

.project-info { padding: 2rem 2.2rem; }

.project-info h3 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.project-info p {
  font-size: 1.25rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.4rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.2rem;
}

.project-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0.5rem 1.2rem;
  border-radius: 10rem;
  transition: var(--transition);
  border: none;
  color: #fff;
}

.project-links a:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.project-links a i { font-size: 1.4rem; }

.project-links .link-playstore {
  background: linear-gradient(135deg, #34a853, #0f9d58);
  box-shadow: 0 3px 10px rgba(52, 168, 83, 0.25);
}

.project-links .link-appstore {
  background: linear-gradient(135deg, #007aff, #0055d4);
  box-shadow: 0 3px 10px rgba(0, 122, 255, 0.25);
}

.project-links .link-github {
  background: linear-gradient(135deg, #333, #555);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.project-links .link-web {
  background: var(--gradient);
  box-shadow: 0 3px 10px rgba(124, 92, 252, 0.25);
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project-tech span {
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--accent);
  background: rgba(124, 92, 252, 0.07);
  padding: 0.25rem 0.9rem;
  border-radius: 0.5rem;
}

.projects-count {
  text-align: center;
  margin-top: 2.5rem;
}

.projects-count p {
  font-size: 1.3rem;
  color: var(--text-dim);
}

.projects-count span {
  color: var(--accent);
  font-weight: 700;
}

.projects-more {
  text-align: center;
  margin-top: 3rem;
}

/* ============================================
   PROJECT DETAIL MODAL
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(26, 26, 46, 0.5);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  padding: 2rem;
}

.modal-overlay.active { opacity: 1; visibility: visible; }

.modal {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  max-width: 64rem;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  transform: translateY(40px) scale(0.95);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.15);
}

.modal-overlay.active .modal { transform: translateY(0) scale(1); }

.modal-header {
  position: relative;
  height: 20rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.modal-header i.modal-icon {
  font-size: 8rem;
  color: rgba(255, 255, 255, 0.25);
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 4rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 2.2rem;
  cursor: pointer;
  transition: var(--transition);
  z-index: 10;
}

body.rtl .modal-close { right: auto; left: 1.5rem; }

.modal-close:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: rotate(90deg);
}

.modal-badge {
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  padding: 0.5rem 1.5rem;
  border-radius: 10rem;
  font-size: 1.3rem;
  font-weight: 600;
  color: #fff;
}

body.rtl .modal-badge { left: auto; right: 1.5rem; }

.modal-body { padding: 3rem; }

.modal-body h2 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

body.rtl .modal-body h2 { letter-spacing: 0; }

.modal-body .modal-desc {
  font-size: 1.5rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 2.5rem;
}

.modal-section-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1.2rem;
}

body.rtl .modal-section-title { letter-spacing: 0; }

.modal-tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 2.5rem;
}

.modal-tech-list span {
  font-size: 1.3rem;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--accent);
  background: rgba(124, 92, 252, 0.07);
  border: 1px solid rgba(124, 92, 252, 0.12);
  padding: 0.5rem 1.4rem;
  border-radius: 0.6rem;
}

.modal-features {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.modal-features li {
  font-size: 1.35rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.modal-features li i {
  color: var(--teal);
  font-size: 1.6rem;
  flex-shrink: 0;
}

.modal::-webkit-scrollbar { width: 6px; }
.modal::-webkit-scrollbar-track { background: transparent; }
.modal::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 3px; }

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact { background: var(--bg-2); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  max-width: 100rem;
  margin: 0 auto;
}

.contact-info > p {
  font-size: 1.5rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 3rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.4rem 1.8rem;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.contact-link:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow);
  border-color: transparent;
}

body.rtl .contact-link:hover { transform: translateX(-4px); }

.contact-link i {
  font-size: 2.2rem;
  flex-shrink: 0;
}

.contact-link:nth-child(1) i { color: var(--coral); }
.contact-link:nth-child(2) i { color: #25d366; }
.contact-link:nth-child(3) i { color: #0077b5; }
.contact-link:nth-child(4) i { color: #333; }
.contact-link:nth-child(5) i { color: #ff0000; }

.contact-link-label {
  display: block;
  font-size: 1.1rem;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

body.rtl .contact-link-label { letter-spacing: 0; }

.contact-link-value {
  display: block;
  font-size: 1.4rem;
  color: var(--text);
  font-weight: 500;
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.form-row { display: flex; gap: 1.2rem; }
.form-group { flex: 1; }

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 1.4rem 1.8rem;
  font-size: 1.4rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: var(--transition);
  resize: none;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--text-dim); }

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(124, 92, 252, 0.08);
}

.contact-form .btn { align-self: flex-start; }
body.rtl .contact-form .btn { align-self: flex-end; }

/* ============================================
   FOOTER
   ============================================ */
.footer {
  padding: 3rem 6%;
  border-top: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-content {
  display: flex;
  align-items: center;
  gap: 3rem;
}

.footer-logo {
  font-size: 2rem;
  font-weight: 800;
}

.footer-logo span {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-content p {
  font-size: 1.3rem;
  color: var(--text-dim);
}

.scroll-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 2rem;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.scroll-top:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  html { font-size: 55%; }
  .skills-grid { grid-template-columns: repeat(3, 1fr); }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .modal-features { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  section { padding: 8rem 5% 4rem; }

  #menu-icon { display: block; }

  .navbar {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(250, 249, 255, 0.97);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 2rem;
    gap: 0.5rem;
    display: none;
    box-shadow: var(--shadow-lg);
  }

  .navbar.active { display: flex; }

  .navbar a {
    font-size: 1.6rem;
    padding: 1.2rem;
    width: 100%;
    text-align: center;
  }

  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: 14rem;
    gap: 4rem;
  }

  .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-desc { text-align: center; }
  .hero-cta { justify-content: center; }
  .hero-socials { justify-content: center; }
  .hero-img-wrapper { width: 26rem; height: 26rem; }

  .about-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 4rem;
  }

  .about-img-wrapper { max-width: 24rem; }
  .about-stats { justify-content: center; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: 1fr; max-width: 50rem; }
  .projects-grid.featured-grid { grid-template-columns: 1fr; max-width: 50rem; }
  .contact { border-radius: 0; }
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { flex-direction: column; }
  .contact-form .btn { width: 100%; justify-content: center; }
  body.rtl .contact-form .btn { align-self: stretch; }
  .footer { flex-direction: column; gap: 2rem; }
  .footer-content { flex-direction: column; gap: 1rem; text-align: center; }
  .modal { max-height: 90vh; margin: 1rem; border-radius: var(--radius-lg); }
  .modal-header { height: 16rem; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .modal-body { padding: 2rem; }
  .modal-features { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  html { font-size: 50%; }
  .section-title { font-size: 3.2rem; }
  .about-stats { flex-direction: column; gap: 2rem; align-items: center; }
  .skills-grid { grid-template-columns: 1fr 1fr; gap: 1.2rem; }
  .filter-bar { gap: 0.5rem; }
  .filter-btn { padding: 0.6rem 1.2rem; font-size: 1.1rem; }
}
