:root {
  /* Premium HSL Color Palette */
  --bg: #030307;
  --bg-rgb: 3, 3, 7;
  --bg2: #07070f;
  --card: rgba(13, 13, 24, 0.45);
  --card-hover: rgba(20, 20, 38, 0.7);
  --border: rgba(255, 255, 255, 0.05);
  --border-hover: rgba(var(--green-rgb), 0.25);
  --border2: rgba(255, 255, 255, 0.08);
  
  /* Cyber Colors */
  --green: #0dff8c;
  --green-rgb: 13, 255, 140;
  --blue: #3d8bff;
  --blue-rgb: 61, 139, 255;
  --purple: #a855f7;
  --purple-rgb: 168, 85, 247;
  --pink: #ff3d8b;
  --pink-rgb: 255, 61, 139;
  --orange: #ff8c3d;
  --orange-rgb: 255, 140, 61;
  
  /* Typography */
  --text: #f0f0ff;
  --muted: rgba(240, 240, 255, 0.45);
  --muted2: rgba(240, 240, 255, 0.75);
  
  /* Fonts - Swapped Cairo to IBM Plex Sans Arabic for highly modern look */
  --syne: 'Syne', sans-serif;
  --arabic: 'IBM Plex Sans Arabic', sans-serif;
  --mono: 'Outfit', sans-serif;
  
  /* Utilities */
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --glow: 0 0 40px rgba(var(--green-rgb), 0.06);
  --glow-hover: 0 0 60px rgba(var(--green-rgb), 0.15);
  --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ═══ LIGHT MODE VARIABLE OVERRIDES ═══ */
body.light-mode {
  --bg: #f6f6f9;
  --bg-rgb: 246, 246, 249;
  --bg2: #ececf1;
  --card: rgba(255, 255, 255, 0.72);
  --card-hover: rgba(255, 255, 255, 0.95);
  --border: rgba(5, 5, 10, 0.06);
  --border-hover: rgba(var(--green-rgb), 0.5);
  --border2: rgba(5, 5, 10, 0.08);
  --text: #08080f;
  --muted: rgba(8, 8, 15, 0.55);
  --muted2: rgba(8, 8, 15, 0.8);
  --glow: 0 10px 40px rgba(var(--green-rgb), 0.03);
  --glow-hover: 0 15px 50px rgba(var(--green-rgb), 0.08);

  /* Light Mode Cyber Colors (Sleek, High Contrast) */
  --green: #0da65f;
  --green-rgb: 13, 166, 95;
  --blue: #1a73e8;
  --blue-rgb: 26, 115, 232;
  --purple: #7c3aed;
  --purple-rgb: 124, 58, 237;
  --pink: #db2777;
  --pink-rgb: 219, 39, 119;
  --orange: #ea580c;
  --orange-rgb: 234, 88, 12;
}

/* Light mode specific element adjustments */
body.light-mode #canvas {
  opacity: 0.85;
}
body.light-mode nav {
  background: rgba(var(--bg-rgb), 0.75);
}
body.light-mode nav.scrolled {
  background: rgba(var(--bg-rgb), 0.92);
}
body.light-mode .proj-visual {
  background: #fdfdfd;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.06);
}
body.light-mode .sec-title span {
  -webkit-text-stroke: 1px rgba(8, 8, 15, 0.25);
}
body.light-mode .skill-bar-wrap {
  background: rgba(8, 8, 15, 0.06);
}
body.light-mode .proj-preview-image img {
  opacity: 0.92;
}
body.light-mode .btn-outline {
  background: rgba(8, 8, 15, 0.02);
}
body.light-mode .btn-outline:hover {
  background: rgba(8, 8, 15, 0.05);
  color: var(--text);
}
body.light-mode .fc-stat {
  background: rgba(8, 8, 15, 0.02);
}
body.light-mode .fc-stat:hover {
  background: rgba(8, 8, 15, 0.04);
}

/* ═══ THEME TOGGLE BUTTON ═══ */
.theme-toggle {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border2);
  color: var(--text);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 14px;
  transition: var(--transition);
  z-index: 106;
}

body.light-mode .theme-toggle {
  background: rgba(0, 0, 0, 0.03);
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--green);
  color: var(--green);
  transform: rotate(20deg) scale(1.05);
}

body.light-mode .theme-toggle:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--blue);
  border-color: var(--blue);
}

/* Toggle icon displays */
.sun-icon { display: none; }
.moon-icon { display: block; }

body.light-mode .sun-icon { display: block; }
body.light-mode .moon-icon { display: none; }


/* ═══ GLOBAL RESET & BASE ═══ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--border-hover) var(--bg);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--arabic); /* Swapped to modern IBM Plex Sans Arabic */
  overflow-x: hidden;
  position: relative;
  line-height: 1.75;
  font-weight: 500;
}

/* Custom Webkit Scrollbar */
body::-webkit-scrollbar {
  width: 8px;
}
body::-webkit-scrollbar-track {
  background: var(--bg);
}
body::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 99px;
}
body::-webkit-scrollbar-thumb:hover {
  background: var(--green);
}

/* Noise overlay */
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.03'/%3E%3C/svg%3E");
  background-size: 200px;
  pointer-events: none;
  z-index: 999;
  opacity: 0.35;
}

/* Interactive Canvas Background */
#canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.6;
}

/* ═══ CUSTOM CURSOR ═══ */
#cur {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background-color 0.2s;
  mix-blend-mode: screen;
}

#cur-ring {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(var(--green-rgb), 0.4);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), height 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s;
}

/* Hover effects for cursor */
.custom-hover #cur {
  width: 40px;
  height: 40px;
  background: rgba(var(--green-rgb), 0.1);
  border: 1px solid var(--green);
  mix-blend-mode: normal;
}
.custom-hover #cur-ring {
  width: 50px;
  height: 50px;
  border-color: rgba(var(--blue-rgb), 0.6);
  transform: translate(-50%, -50%) rotate(45deg);
}

/* ═══ NAVIGATION ═══ */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(var(--bg-rgb), 0.75);
  backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

nav.scrolled {
  height: 70px;
  background: rgba(var(--bg-rgb), 0.9);
  border-bottom: 1px solid rgba(var(--green-rgb), 0.15);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.nav-logo {
  font-family: var(--syne);
  font-size: 26px; /* Enlarged logo */
  font-weight: 800;
  letter-spacing: 4px; /* More tracking */
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--green), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  cursor: pointer;
}

.nav-links {
  display: flex;
  gap: 12px;
  list-style: none;
}

.nav-links a {
  display: flex;
  align-items: center;
  padding: 8px 20px;
  border-radius: 100px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid transparent;
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--text);
  border-color: var(--border2);
  background: rgba(255, 255, 255, 0.03);
}

.nav-cta {
  padding: 10px 24px;
  border-radius: 100px;
  background: linear-gradient(135deg, var(--green), var(--blue));
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: #000;
  text-decoration: none;
  transition: var(--transition);
  box-shadow: 0 0 20px rgba(var(--green-rgb), 0.15);
  border: none;
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 35px rgba(var(--green-rgb), 0.35);
}

/* Mobile Menu Toggle button */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 110;
}

.mobile-menu-toggle .bar {
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 99px;
  transition: var(--transition);
}

/* ═══ HERO SECTION ═══ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 140px 80px 80px;
  position: relative;
  z-index: 2;
  gap: 40px;
}

.hero-left {
  flex: 1.2;
  max-width: 760px;
}

.hero-pill {
  display: none !important;
}

.hero-pill .dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.hero-h1 {
  display: none !important;
}

.hero-h1 .line1 {
  display: block;
  color: var(--text);
}

.hero-h1 .line2 {
  display: block;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--green);
}

.hero-sub {
  font-size: clamp(16px, 1.8vw, 19px);
  font-weight: 500;
  color: var(--muted2);
  line-height: 1.8;
  max-width: 580px;
  margin-bottom: 40px;
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.hero-sub em {
  color: var(--green);
  font-style: normal;
  font-weight: 700; /* Bolder emphasis */
}

.hero-btns {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

.btn-grad {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 36px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--green) 0%, var(--blue) 100%);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: #000;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 8px 30px rgba(var(--green-rgb), 0.2);
}

.btn-grad:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 50px rgba(var(--green-rgb), 0.35);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 36px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border2);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted2);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text);
}

/* Floating Avatar Card */
.hero-right {
  flex: 0.8;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

.floating-card {
  width: 350px;
  padding: 32px;
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(24px);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6), var(--glow);
  position: relative;
  overflow: hidden;
  animation: float 6s ease-in-out infinite;
  transition: border-color 0.3s;
}

.floating-card:hover {
  border-color: rgba(var(--green-rgb), 0.35);
}

.floating-card::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(var(--green-rgb), 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.fc-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.fc-avatar {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--green), var(--blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 8px 20px rgba(var(--green-rgb), 0.2);
}

.fc-name {
  font-family: var(--syne);
  font-size: 16px;
  font-weight: 700;
}

.fc-role {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--green);
  letter-spacing: 1px;
}

.fc-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.fc-stat {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  transition: var(--transition);
}

.fc-stat:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(var(--green-rgb), 0.15);
}

.fc-stat-num {
  font-family: var(--syne);
  font-size: 28px;
  font-weight: 800;
  color: var(--green);
  line-height: 1.1;
}

.fc-stat-lbl {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
  margin-top: 4px;
}

.fc-status {
  display: none !important;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: 12px;
  background: rgba(var(--green-rgb), 0.04);
  border: 1px solid rgba(var(--green-rgb), 0.15);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--green);
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

/* ═══ STATS BAR ═══ */
.stats-bar-sec {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--border);
  background: rgba(var(--bg-rgb), 0.4);
}

.stats-bar {
  display: flex;
}

.stat-item {
  flex: 1;
  padding: 48px 60px;
  border-right: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.stat-item:last-child {
  border-right: none;
}

.stat-item:hover {
  background: rgba(var(--green-rgb), 0.015);
}

.stat-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--green), var(--blue));
  transform: scaleX(0);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: left;
}

.stat-item:hover::before {
  transform: scaleX(1);
}

.stat-num {
  font-family: var(--syne);
  font-size: 52px;
  font-weight: 800;
  color: var(--green);
  line-height: 1;
}

.stat-lbl {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
  letter-spacing: 0.5px;
}

/* ═══ SECTIONS & TYPOGRAPHY ═══ */
section {
  padding: 120px 80px;
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--border);
}

.sec-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--green);
  letter-spacing: 3px;
  margin-bottom: 20px;
}

.sec-eyebrow::before {
  content: '';
  width: 30px;
  height: 1px;
  background: var(--green);
}

.sec-title {
  font-family: var(--syne);
  font-size: clamp(38px, 5.5vw, 64px);
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 40px;
  letter-spacing: -1px;
}

.sec-title span {
  color: transparent;
  -webkit-text-stroke: 1px rgba(240, 240, 255, 0.35);
}

.projects-subtext {
  font-size: 15px;
  color: var(--muted2);
  margin-bottom: 60px;
  font-weight: 500;
  border-right: 3px solid var(--green);
  padding-right: 14px;
}

/* ═══ ABOUT SECTION ═══ */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 80px;
  align-items: start;
}

.about-body {
  font-size: 18px; /* Larger body font size */
  line-height: 2;
  color: var(--muted2);
  font-weight: 500; /* Swapped to standard weight */
}

.about-body p {
  margin-bottom: 24px;
}

.about-body strong {
  color: var(--text);
  font-weight: 700; /* Bolder bold text */
}

.about-body a {
  color: var(--green);
  text-decoration: none;
  border-bottom: 1px dotted var(--green);
  transition: var(--transition);
}

.about-body a:hover {
  color: var(--blue);
  border-color: var(--blue);
}

.skills-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.skill-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  transition: var(--transition);
  cursor: default;
}

.skill-row:hover {
  border-color: rgba(var(--green-rgb), 0.2);
  background: rgba(var(--green-rgb), 0.03);
  transform: translateX(-4px);
}

.skill-icon {
  font-size: 22px;
  width: 36px;
  flex-shrink: 0;
}

.skill-info {
  flex: 1;
}

.skill-name {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.skill-bar-wrap {
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 99px;
  overflow: hidden;
}

.skill-bar {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--green), var(--blue));
  width: 0;
  transition: width 1.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.skill-pct {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--green);
  flex-shrink: 0;
  min-width: 32px;
  text-align: left;
}

/* ═══ PROJECTS SECTION ═══ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.proj-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  transform-style: preserve-3d;
  perspective: 1000px;
  text-decoration: none;
  color: inherit;
  display: block;
}

.proj-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(var(--green-rgb), 0.05) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
}

.proj-card:hover::before {
  opacity: 1;
}

.proj-card:hover {
  border-color: rgba(var(--green-rgb), 0.25);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4), var(--glow);
  transform: translateY(-6px);
}

.proj-card.span2 {
  grid-column: span 2;
}

.proj-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 2px;
  margin-bottom: 20px;
}

.proj-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.proj-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.5px;
  padding: 4px 12px;
  border-radius: 100px;
  border: 1px solid var(--border2);
  color: var(--muted);
}

.proj-tag.g {
  border-color: rgba(var(--green-rgb), 0.3);
  color: var(--green);
  background: rgba(var(--green-rgb), 0.04);
}

.proj-tag.b {
  border-color: rgba(var(--blue-rgb), 0.3);
  color: var(--blue);
  background: rgba(var(--blue-rgb), 0.04);
}

.proj-tag.p {
  border-color: rgba(var(--purple-rgb), 0.3);
  color: var(--purple);
  background: rgba(var(--purple-rgb), 0.04);
}

.proj-title {
  font-family: var(--arabic);
  font-size: clamp(20px, 2.2vw, 24px);
  font-weight: 800; /* Extra bold headings */
  margin-bottom: 14px;
  line-height: 1.3;
}

.proj-desc {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.85;
  font-weight: 500;
}

.proj-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.proj-link {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--green);
  letter-spacing: 1px;
}

.proj-arrow {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.proj-card:hover .proj-arrow {
  background: var(--green);
  border-color: var(--green);
  color: #000;
}

.proj-arrow svg {
  transition: transform 0.3s;
}

.proj-card:hover .proj-arrow svg {
  transform: rotate(-45deg);
}

/* Featured Project Inner Grid */
.proj-inner-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 40px;
  align-items: start;
}

/* Featured visual panel (Code editor simulation) */
.proj-visual {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.8;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.8);
}

.proj-preview-image {
  width: 100%;
  height: 180px;
  margin-top: 20px;
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--bg2);
  position: relative;
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.5);
}

body.light-mode .proj-preview-image {
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.06);
}

.proj-preview-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s;
}

.proj-preview-image.featured-preview {
  height: 350px;
}

@media (max-width: 768px) {
  .proj-preview-image.featured-preview {
    height: 200px;
  }
}

.proj-card:hover .proj-preview-image img {
  transform: scale(1.03);
  opacity: 1;
}

.pv-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}

.pv-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.pv-r { background: #ff5f57; }
.pv-y { background: #ffbd2e; }
.pv-g { background: #28c840; }

.pv-line {
  display: block;
  white-space: nowrap;
}

.pv-key { color: var(--blue); }
.pv-val { color: var(--green); }
.pv-str { color: var(--orange); }
.pv-cmt { color: var(--muted); }

/* ═══ EXPANDED BOOKING SECTION ═══ */
.booking-section {
  background: radial-gradient(ellipse at 50% 0%, rgba(var(--green-rgb), 0.04) 0%, transparent 60%);
  padding: 160px 80px; /* Bigger padding */
}

.booking-wrap {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 80px;
  align-items: start;
}

.booking-left {
  max-width: 600px;
}

.booking-sub {
  font-size: 18px; /* Bigger font */
  color: var(--muted2);
  line-height: 1.9;
  margin-bottom: 40px;
}

.booking-perks {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 40px;
}

.perk {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px; /* Larger perk padding */
  border-radius: var(--radius-md);
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 15.5px;
  color: var(--muted2);
  transition: var(--transition);
}

.perk:hover {
  border-color: rgba(var(--green-rgb), 0.25);
  background: rgba(var(--green-rgb), 0.02);
  transform: translateX(-4px);
}

.perk-icon {
  font-size: 24px;
  width: 32px;
  flex-shrink: 0;
}

.booking-right {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.4), var(--glow);
  position: relative;
  height: 860px; /* Set to fixed height to hold the Calendly frame */
}

.booking-header {
  padding: 28px 32px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
}

.bh-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--green), var(--blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(var(--green-rgb), 0.2);
}

.bh-title {
  font-family: var(--syne);
  font-size: 16px;
  font-weight: 800;
}

.bh-sub {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--green);
  margin-top: 4px;
  letter-spacing: 0.5px;
}

#calendly-embed {
  height: 750px; /* Enlarge calendar embed viewport */
}

/* ═══ INTERACTIVE LIGHTBOX MODAL ═══ */
.modal {
  display: none; /* Hidden by default */
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(var(--bg-rgb), 0.95);
  backdrop-filter: blur(20px);
  align-items: center;
  justify-content: center;
  padding: 40px;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.modal.active {
  display: flex;
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  background: rgba(13, 13, 24, 0.85);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  max-width: 1100px;
  width: 100%;
  padding: 48px;
  position: relative;
  box-shadow: 0 50px 120px rgba(0, 0, 0, 0.8), var(--glow);
  transform: translateY(40px) scale(0.95);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.modal.active .modal-content {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 24px;
  left: 24px; /* RTL close positioning */
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border2);
  color: var(--text);
  font-size: 24px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  z-index: 10;
}

.modal-close:hover {
  background: var(--green);
  border-color: var(--green);
  color: #000;
  transform: rotate(90deg);
}

.modal-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
}

.modal-left {
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--bg2);
  box-shadow: inset 0 2px 20px rgba(0,0,0,0.8);
}

.modal-double-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.modal-image-wrap {
  width: 100%;
  aspect-ratio: 1.1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative; /* Set to relative for absolute children */
}

.modal-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.5s;
}

.modal-image-wrap:hover img {
  transform: scale(1.05);
}

.image-label {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(var(--bg-rgb), 0.85);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 11px;
  color: var(--green);
  font-family: var(--mono);
  z-index: 5;
  letter-spacing: 0.5px;
}

.modal-right {
  display: flex;
  flex-direction: column;
}

.modal-num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--green);
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.modal-title {
  font-family: var(--arabic);
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.35;
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.modal-desc {
  font-size: 15.5px;
  color: var(--muted2);
  line-height: 1.9;
  margin-bottom: 32px;
}

.modal-actions {
  display: flex;
  gap: 16px;
}

/* ═══ CONTACT SECTION ═══ */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 28px 32px;
  border-radius: var(--radius-md);
  background: var(--card);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.contact-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(var(--green-rgb), 0.05) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}

.contact-card:hover::before {
  opacity: 1;
}

.contact-card:hover {
  border-color: rgba(var(--green-rgb), 0.25);
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.cc-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.cc-icon.green { background: rgba(var(--green-rgb), 0.1); }
.cc-icon.blue { background: rgba(var(--blue-rgb), 0.1); }
.cc-icon.purple { background: rgba(var(--purple-rgb), 0.1); }
.cc-icon.orange { background: rgba(var(--orange-rgb), 0.1); }

.cc-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.cc-val {
  font-size: 15px;
  font-weight: 600;
}

.cc-arrow {
  margin-right: 0;
  margin-left: auto;
  font-size: 20px;
  opacity: 0.3;
  transition: var(--transition);
}

.contact-card:hover .cc-arrow {
  opacity: 1;
  transform: translate(-4px, -4px);
  color: var(--green);
}

/* ═══ FOOTER ═══ */
footer {
  padding: 48px 80px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 2;
  background: rgba(var(--bg-rgb), 0.6);
}

.footer-logo {
  display: none !important;
}

.footer-copy {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  width: 100%;
  text-align: center;
}

.footer-badge {
  display: none !important;
  font-family: var(--mono);
  font-size: 11px;
  padding: 8px 18px;
  border-radius: 100px;
  border: 1px solid rgba(var(--green-rgb), 0.2);
  color: var(--green);
  letter-spacing: 1px;
}

/* ═══ ANIMATIONS & REVEALS ═══ */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(32px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-16px);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(var(--green-rgb), 0.3);
  }
  50% {
    opacity: 0.85;
    box-shadow: 0 0 0 8px rgba(var(--green-rgb), 0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(60px) rotateX(12deg) scale(0.95);
  transform-origin: top center;
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  perspective: 1000px;
  will-change: transform, opacity;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0) rotateX(0) scale(1);
}

.reveal-delay-1 { transition-delay: 0.12s; }
.reveal-delay-2 { transition-delay: 0.24s; }
.reveal-delay-3 { transition-delay: 0.36s; }

/* ═══ MEDIA QUERIES (RESPONSIVENESS) ═══ */
@media (max-width: 1200px) {
  nav {
    padding: 0 40px;
  }
  .hero {
    padding: 120px 40px 60px;
    gap: 20px;
  }
  section {
    padding: 100px 40px;
  }
  .booking-section {
    padding: 120px 40px;
  }
  .stats-bar {
    flex-wrap: wrap;
  }
  .stat-item {
    flex: unset;
    width: 50%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 36px 40px;
  }
  .stat-item:nth-child(even) {
    border-left: 1px solid var(--border);
  }
  .stat-item:nth-child(3), .stat-item:nth-child(4) {
    border-bottom: none;
  }
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .proj-card.span2 {
    grid-column: span 2;
  }
  footer {
    padding: 40px;
  }
}

@media (max-width: 992px) {
  /* Mobile Menu burger styling */
  .mobile-menu-toggle {
    display: flex;
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: rgba(13, 13, 24, 0.95);
    backdrop-filter: blur(30px);
    border-left: 1px solid var(--border2);
    flex-direction: column;
    padding: 100px 30px;
    gap: 20px;
    z-index: 105;
    transition: var(--transition);
  }
  
  .nav-links.active {
    right: 0;
  }
  
  .nav-links a {
    font-size: 16px;
    width: 100%;
    padding: 12px 24px;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
  }
  
  .nav-links a:hover {
    border-color: var(--green);
  }
  
  /* Menu icon active state transformation */
  .mobile-menu-toggle.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .mobile-menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }
  .mobile-menu-toggle.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }
  
  .hero {
    flex-direction: column;
    text-align: center;
    padding: 120px 32px 60px;
    gap: 60px;
  }
  
  .hero-pill {
    margin-bottom: 24px;
  }
  
  .hero-sub {
    margin-left: auto;
    margin-right: auto;
  }
  
  .hero-btns {
    justify-content: center;
  }
  
  .hero-right {
    width: 100%;
  }
  
  .floating-card {
    width: 100%;
    max-width: 480px;
  }
  
  .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  
  .booking-wrap {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  
  .booking-right {
    min-height: unset;
  }
  
  .modal-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .modal-double-images {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .modal-content {
    padding: 40px 24px;
    max-height: 90vh;
    overflow-y: auto;
  }
}

@media (max-width: 768px) {
  nav {
    padding: 0 24px;
  }
  
  .nav-cta {
    display: none; /* Hide top CTA on small screens */
  }
  
  .hero {
    padding: 100px 24px 40px;
  }
  
  section {
    padding: 80px 24px;
  }
  
  .stat-item {
    width: 100%;
    border-left: none !important;
    border-bottom: 1px solid var(--border) !important;
  }
  
  .stat-item:last-child {
    border-bottom: none !important;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .proj-card.span2 {
    grid-column: span 1;
  }
  
  .proj-inner-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
  }
  
  footer {
    flex-direction: column;
    gap: 20px;
    padding: 40px 24px;
    text-align: center;
  }
  
  .modal {
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .hero-h1 {
    font-size: 42px;
  }
  
  .btn-grad, .btn-outline {
    width: 100%;
    justify-content: center;
  }
}

/* ═══ FULLSCREEN IMAGE ZOOM OVERLAY ═══ */
.zoom-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(var(--bg-rgb), 0.98);
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  cursor: zoom-out;
}

body.light-mode .zoom-overlay {
  background: rgba(246, 246, 249, 0.98);
}

.zoom-overlay.active {
  display: flex;
  opacity: 1;
  pointer-events: all;
}

.zoom-image-container {
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg);
}

.zoom-image-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 20px 80px rgba(0,0,0,0.8);
}

.zoom-close {
  position: absolute;
  top: 24px;
  left: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border2);
  color: var(--text);
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.zoom-close:hover {
  background: var(--green);
  border-color: var(--green);
  color: #000;
  transform: scale(1.05);
}

/* Dual image layout in zoom overlay */
.zoom-double-images {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr; /* Workflow wider, Chatbot narrower */
  gap: 32px;
  width: 100%;
  max-width: 1400px;
}

.zoom-img-box {
  position: relative;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--bg2);
  display: flex;
  flex-direction: column;
}

.zoom-img-box img {
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
}

.zoom-img-label {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(var(--bg-rgb), 0.85);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 11px;
  color: var(--green);
  font-family: var(--mono);
  z-index: 5;
  letter-spacing: 0.5px;
}

body.light-mode .zoom-img-label {
  background: rgba(246, 246, 249, 0.85);
  color: var(--blue);
  border-color: var(--border2);
}

@media (max-width: 992px) {
  .zoom-double-images {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .zoom-img-box img {
    max-height: 45vh;
  }
}

/* New Fullscreen Zoom Details Bar & Wrapper Styling */
.zoom-content-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 1400px;
  max-height: 92vh;
  margin: auto;
}

.zoom-details-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 18px 28px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  gap: 24px;
  z-index: 10;
  cursor: default;
}

body.light-mode .zoom-details-bar {
  background: var(--card);
  border-color: var(--border2);
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.zoom-details-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  text-align: right; /* RTL alignment */
  flex: 1;
}

.zoom-details-title {
  font-family: var(--arabic);
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.zoom-details-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.zoom-details-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.zoom-details-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--green) 0%, var(--blue) 100%);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: #000;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.zoom-details-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(var(--green-rgb), 0.3);
}

/* Ensure image container has correct dimensions under the content wrapper */
.zoom-image-container {
  width: 100%;
  max-height: 75vh;
  margin: 0;
}

@media (max-width: 768px) {
  .zoom-details-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 16px;
  }
  .zoom-details-info {
    align-items: stretch;
  }
  .zoom-details-actions {
    justify-content: center;
  }
  .zoom-details-btn {
    width: 100%;
    justify-content: center;
  }
  .zoom-image-container {
    max-height: 60vh;
  }
}
