/* ==========================================================================
   MOHAMMAD ABU ABBAS - CYBER TECH PORTFOLIO
   Design System & Main Stylesheet
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;800;900&family=Outfit:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@400;600;700&display=swap');

:root {
  /* Cyber Dark Core Palette */
  --bg-primary: #05070e;
  --bg-secondary: #090e1a;
  --bg-surface: #0e1526;
  --bg-glass: rgba(14, 21, 38, 0.7);
  --bg-glass-card: rgba(16, 26, 48, 0.55);
  --bg-glass-hover: rgba(26, 40, 72, 0.65);
  
  /* Vibrant Cyber Neon Accents */
  --neon-cyan: #00f2fe;
  --neon-blue: #4facfe;
  --neon-purple: #9d4edd;
  --neon-magenta: #ff007f;
  --neon-emerald: #10b981;
  --neon-amber: #f59e0b;

  /* Gradients */
  --grad-cyan-blue: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  --grad-purple-pink: linear-gradient(135deg, #9d4edd 0%, #ff007f 100%);
  --grad-cyber: linear-gradient(135deg, #00f2fe 0%, #9d4edd 50%, #ff007f 100%);
  --grad-surface: linear-gradient(180deg, rgba(16, 26, 48, 0.7) 0%, rgba(10, 16, 30, 0.9) 100%);

  /* Borders & Glows */
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-neon: rgba(0, 242, 254, 0.35);
  --glow-cyan: 0 0 25px rgba(0, 242, 254, 0.35);
  --glow-purple: 0 0 25px rgba(157, 78, 221, 0.35);
  --glow-pink: 0 0 25px rgba(255, 0, 127, 0.35);
  --glow-text: 0 0 15px rgba(0, 242, 254, 0.5);

  /* Typography */
  --font-ar: 'Cairo', 'Tajawal', sans-serif;
  --font-en: 'Outfit', 'Space Grotesk', sans-serif;
  --font-mono: 'Space Grotesk', monospace;

  /* Text Colors */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-highlight: #38bdf8;

  /* Layout & Transitions */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;
  --radius-full: 9999px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);

  --max-width: 1240px;
}

/* Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-ar);
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* English Direction Override */
body[dir="ltr"] {
  font-family: var(--font-en);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-primary);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--neon-cyan);
}

/* Selection Color */
::selection {
  background: var(--neon-cyan);
  color: #030712;
}

/* Background Canvas & Ambient Aura */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.75;
}

.ambient-aura {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(140px);
  z-index: 0;
  opacity: 0.15;
  transition: transform 0.8s ease;
}
.aura-1 {
  top: -150px;
  right: -150px;
  background: radial-gradient(circle, var(--neon-cyan), transparent 70%);
}
.aura-2 {
  bottom: 10%;
  left: -200px;
  background: radial-gradient(circle, var(--neon-purple), transparent 70%);
}

/* Custom Neon Cursor */
.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 10px;
  height: 10px;
  background: var(--neon-cyan);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 12px var(--neon-cyan), 0 0 20px var(--neon-cyan);
  transition: transform 0.08s linear, width 0.2s ease, height 0.2s ease, background 0.2s ease;
}
.custom-cursor-follower {
  position: fixed;
  top: 0;
  left: 0;
  width: 38px;
  height: 38px;
  border: 1.5px solid rgba(0, 242, 254, 0.5);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99998;
  transform: translate(-50%, -50%);
  transition: transform 0.18s cubic-bezier(0.1, 1, 0.1, 1), border-color 0.2s ease, scale 0.2s ease;
}
.cursor-hover .custom-cursor {
  transform: translate(-50%, -50%) scale(2.2);
  background: var(--neon-magenta);
  box-shadow: 0 0 15px var(--neon-magenta);
}
.cursor-hover .custom-cursor-follower {
  transform: translate(-50%, -50%) scale(1.6);
  border-color: var(--neon-magenta);
  background: rgba(255, 0, 127, 0.08);
}

@media (pointer: coarse), (max-width: 1024px) {
  .custom-cursor, .custom-cursor-follower {
    display: none !important;
  }
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.section {
  padding: 100px 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

/* Badges & Section Titles */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.3);
  border-radius: var(--radius-full);
  color: var(--neon-cyan);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 18px;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}
.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--neon-cyan);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--neon-cyan);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.5; }
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.25;
  background: linear-gradient(135deg, #ffffff 30%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.7;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  border: none;
}

.btn-primary {
  background: var(--grad-cyan-blue);
  color: #030712;
  box-shadow: 0 6px 24px rgba(0, 242, 254, 0.35);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 242, 254, 0.55);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(12px);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(0, 242, 254, 0.4);
  color: var(--neon-cyan);
  transform: translateY(-3px);
}

.btn-whatsapp {
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: #ffffff;
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.3);
}
.btn-whatsapp:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.5);
}

.btn-glow {
  position: relative;
}
.btn-glow::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 60%);
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.3s, transform 0.3s;
}
.btn-glow:hover::after {
  opacity: 1;
  transform: scale(1);
}

/* Glassmorphism Card Utility */
.glass-card {
  background: var(--bg-glass-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  transition: all var(--transition-normal);
  position: relative;
}
.glass-card:hover {
  border-color: var(--border-neon);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.4), var(--glow-cyan);
}

/* Header & Navigation Bar */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 12px 0;
  background: rgba(5, 7, 14, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: all var(--transition-normal);
}
.site-header.scrolled {
  background: rgba(5, 7, 14, 0.98);
  padding: 8px 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  flex-shrink: 0;
}
.brand-monogram {
  width: 40px;
  height: 40px;
  background: var(--grad-cyber);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.15rem;
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.4);
  transition: transform var(--transition-normal);
}
.brand-logo:hover .brand-monogram {
  transform: rotate(5deg) scale(1.08);
}
.brand-info {
  display: flex;
  flex-direction: column;
}
.brand-name {
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1.2;
  letter-spacing: -0.3px;
  white-space: nowrap;
}
.brand-role {
  font-size: 0.72rem;
  color: var(--neon-cyan);
  font-weight: 600;
  white-space: nowrap;
}

/* Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
}
.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  transition: color var(--transition-fast);
  position: relative;
  padding: 6px 0;
}
.nav-link:hover, .nav-link.active {
  color: var(--neon-cyan);
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--grad-cyan-blue);
  transition: width var(--transition-normal);
  border-radius: var(--radius-full);
}
.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

/* Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.btn-lang {
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}
.btn-lang:hover {
  background: rgba(0, 242, 254, 0.12);
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
}

.btn-admin-nav {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}
.btn-admin-nav:hover {
  background: rgba(157, 78, 221, 0.2);
  border-color: var(--neon-purple);
  color: var(--neon-purple);
}
.admin-badge-count {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  background: var(--neon-magenta);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-primary);
}
.admin-badge-count.visible {
  display: flex;
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px;
}

/* Responsive Rules for Header & Mobile View */
@media (max-width: 900px) {
  .mobile-nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .brand-role {
    display: none; /* Keep header ultra-compact on mobile */
  }
  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    width: 100%;
    background: rgba(9, 14, 26, 0.98);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    flex-direction: column;
    padding: 24px 20px;
    gap: 16px;
    border-bottom: 1px solid rgba(0, 242, 254, 0.2);
    transform: translateY(-150%);
    transition: transform var(--transition-normal);
    opacity: 0;
    pointer-events: none;
    z-index: 999;
  }
  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
}
