/* ============================================================
   AHMED SULIMAN PORTFOLIO — GLOBAL STYLES
   Glassmorphism + Cyberpunk + Futuristic Professional
   ============================================================ */

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

/* ── CSS VARIABLES ── */
:root {
  --bg-primary: #0A0A0F;
  --bg-secondary: #0F172A;
  --bg-tertiary: #111827;
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-bg-hover: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-border-hover: rgba(0, 212, 255, 0.5);
  --neon-blue: #00D4FF;
  --neon-purple: #7C3AED;
  --neon-cyan: #22D3EE;
  --neon-pink: #F472B6;
  --neon-green: #10B981;
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #475569;
  --gradient-1: linear-gradient(135deg, #00D4FF, #7C3AED, #22D3EE);
  --gradient-2: linear-gradient(135deg, #7C3AED, #F472B6, #00D4FF);
  --gradient-3: linear-gradient(135deg, #22D3EE, #00D4FF);
  --shadow-glow: 0 0 30px rgba(0, 212, 255, 0.2);
  --shadow-purple: 0 0 30px rgba(124, 58, 237, 0.2);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius: 16px;
  --border-radius-lg: 24px;
  --font-heading: 'Sora', sans-serif;
  --font-body: 'Space Grotesk', sans-serif;
  --font-alt: 'Inter', sans-serif;
}

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

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ── ANIMATED BACKGROUND ── */
.animated-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: -10;
  pointer-events: none;
  overflow: hidden;
}

.animated-bg::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 20% 20%, rgba(0, 212, 255, 0.06) 0%, transparent 50%),
              radial-gradient(ellipse at 80% 80%, rgba(124, 58, 237, 0.06) 0%, transparent 50%),
              radial-gradient(ellipse at 50% 50%, rgba(34, 211, 238, 0.03) 0%, transparent 60%);
  animation: bgPulse 8s ease-in-out infinite alternate;
}

@keyframes bgPulse {
  0% { transform: scale(1) rotate(0deg); }
  100% { transform: scale(1.1) rotate(2deg); }
}

/* ── PARTICLES CANVAS ── */
#particles-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: -9;
  pointer-events: none;
  opacity: 0.4;
}

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 6vw, 5rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 700; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.8rem); font-weight: 600; }
h4 { font-size: 1.2rem; font-weight: 600; }

p { color: var(--text-secondary); font-size: 1rem; }

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

/* ── GRADIENT TEXT ── */
.gradient-text {
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradientShift 4s ease infinite;
}

.gradient-text-2 {
  background: var(--gradient-2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── GLASS CARDS ── */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, transparent 100%);
  pointer-events: none;
}

.glass-card:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
  box-shadow: var(--shadow-glow), inset 0 0 0 1px rgba(0, 212, 255, 0.1);
  transform: translateY(-4px);
}

/* ── GLOW BORDER ── */
.glow-border {
  position: relative;
}

.glow-border::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: var(--gradient-1);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: var(--transition);
}

.glow-border:hover::after {
  opacity: 1;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-1);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 8px 30px rgba(0, 212, 255, 0.5);
  transform: translateY(-2px) scale(1.02);
}

.btn-secondary {
  background: var(--glass-bg);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  border-color: var(--neon-blue);
  background: rgba(0, 212, 255, 0.1);
  color: var(--neon-blue);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

.btn-ghost {
  background: transparent;
  color: var(--neon-blue);
  border: 1px solid var(--neon-blue);
}

.btn-ghost:hover {
  background: var(--neon-blue);
  color: #000;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
}

/* ── NEON BADGE ── */
.neon-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.9rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.badge-blue { background: rgba(0, 212, 255, 0.1); color: var(--neon-blue); border: 1px solid rgba(0, 212, 255, 0.3); }
.badge-purple { background: rgba(124, 58, 237, 0.1); color: #A78BFA; border: 1px solid rgba(124, 58, 237, 0.3); }
.badge-cyan { background: rgba(34, 211, 238, 0.1); color: var(--neon-cyan); border: 1px solid rgba(34, 211, 238, 0.3); }
.badge-pink { background: rgba(244, 114, 182, 0.1); color: var(--neon-pink); border: 1px solid rgba(244, 114, 182, 0.3); }
.badge-green { background: rgba(16, 185, 129, 0.1); color: var(--neon-green); border: 1px solid rgba(16, 185, 129, 0.3); }

/* ── SECTION STYLES ── */
.section {
  padding: 6rem 0;
  position: relative;
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--neon-blue);
  margin-bottom: 1rem;
}

.section-label::before {
  content: '';
  width: 30px;
  height: 2px;
  background: var(--neon-blue);
  display: inline-block;
}

.section-title {
  margin-bottom: 1rem;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin-bottom: 3rem;
}

/* ── DIVIDER GLOW ── */
.divider-glow {
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--neon-blue), rgba(124, 58, 237, 0.5), transparent);
  margin: 2rem 0;
  opacity: 0.4;
}

/* ── NAVIGATION ── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 2rem;
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  padding: 0.75rem 2rem;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.03em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
}

.nav-links a {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: var(--glass-bg);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--neon-blue);
  border-radius: 1px;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* Mobile nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(10, 10, 15, 0.97);
  backdrop-filter: blur(20px);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav a {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  transition: var(--transition);
}

.mobile-nav a:hover {
  color: var(--neon-blue);
}

.mobile-nav-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  font-size: 2rem;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
}

/* ── FOOTER ── */
.footer {
  background: rgba(10, 10, 15, 0.8);
  border-top: 1px solid var(--glass-border);
  padding: 3rem 2rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.75rem;
}

.footer-tagline {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.footer-links h4 {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--neon-blue);
  margin-bottom: 1rem;
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links ul a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-links ul a:hover { color: var(--neon-blue); }

.footer-social {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-end;
}

.social-links {
  display: flex;
  gap: 0.75rem;
}

.social-link {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: var(--transition);
  text-decoration: none;
}

.social-link:hover {
  border-color: var(--neon-blue);
  color: var(--neon-blue);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

.footer-bottom {
  max-width: 1200px;
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── STAT CARD ── */
.stat-card {
  text-align: center;
  padding: 1.5rem;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ── SCROLL REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ── PAGE HEADER ── */
.page-header {
  padding: 9rem 2rem 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 100%;
  background: radial-gradient(ellipse at center top, rgba(0, 212, 255, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.page-header-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--neon-blue);
  margin-bottom: 1.25rem;
}

.page-header-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 1rem auto 0;
}

/* ── PROGRESS BAR ── */
.progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.05);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--gradient-1);
  width: 0;
  transition: width 1.5s ease;
}

/* ── TAG/CHIP ── */
.tag {
  display: inline-flex;
  padding: 0.3rem 0.8rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.tag-blue { color: var(--neon-blue); border-color: rgba(0, 212, 255, 0.2); background: rgba(0, 212, 255, 0.05); }
.tag-purple { color: #A78BFA; border-color: rgba(124, 58, 237, 0.2); background: rgba(124, 58, 237, 0.05); }

/* ── TOOLTIP ── */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  z-index: 10;
}

[data-tooltip]:hover::before {
  opacity: 1;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: rgba(0, 212, 255, 0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0, 212, 255, 0.6); }

/* ── SELECTION ── */
::selection {
  background: rgba(0, 212, 255, 0.3);
  color: #fff;
}

/* ── CURSOR GLOW (desktop only) ── */
.cursor-glow {
  position: fixed;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
}

/* ── GRID HELPERS ── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-social { align-items: flex-start; }
}

@media (max-width: 768px) {
  .section { padding: 4rem 0; }
  .nav-links, .nav-cta .btn-ghost { display: none; }
  .nav-toggle { display: flex; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-social { align-items: flex-start; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
}

@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
  h1 { font-size: 2rem; }
}

/* ── LOADING SCREEN ── */
.loading-screen {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1.5rem;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

.loading-logo {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.loading-bar {
  width: 200px;
  height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
}

.loading-bar-fill {
  height: 100%;
  background: var(--gradient-1);
  border-radius: 2px;
  animation: loadingFill 1.2s ease forwards;
}

@keyframes loadingFill {
  0% { width: 0%; }
  100% { width: 100%; }
}

/* ── HERO BLOB ── */
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  animation: blobFloat 6s ease-in-out infinite;
}

@keyframes blobFloat {
  0%, 100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(20px, -15px) scale(1.05); }
  66% { transform: translate(-10px, 10px) scale(0.98); }
}

/* ── MAGNETIC EFFECT (via JS) ── */
.magnetic {
  transition: transform 0.3s ease;
}

/* ── ICON BOX ── */
.icon-box {
  width: 50px; height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.icon-box-blue { background: rgba(0, 212, 255, 0.1); color: var(--neon-blue); }
.icon-box-purple { background: rgba(124, 58, 237, 0.1); color: #A78BFA; }
.icon-box-cyan { background: rgba(34, 211, 238, 0.1); color: var(--neon-cyan); }
.icon-box-pink { background: rgba(244, 114, 182, 0.1); color: var(--neon-pink); }

/* ── NOISE TEXTURE OVERLAY ── */
.noise-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: -8;
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}
