/* ═══════════════════════════════════════════
   AHMED KAMEL — Professional Portfolio
   Design System & Styles
   ═══════════════════════════════════════════ */

/* ── DESIGN TOKENS ── */
:root {
  /* Colors */
  --bg:         #06080f;
  --bg-alt:     #0c1020;
  --surface:    #111624;
  --card:       #141a2e;
  --card-hover: #181f36;
  --border:     #1c2640;
  --border-hover: #2a3a5c;

  /* Brand */
  --accent:     #3ddc84;
  --accent-dim: rgba(61, 220, 132, 0.12);
  --accent2:    #60a5fa;
  --accent2-dim:rgba(96, 165, 250, 0.12);
  --accent3:    #f472b6;
  --accent3-dim:rgba(244, 114, 182, 0.12);
  --purple:     #a78bfa;
  --purple-dim: rgba(167, 139, 250, 0.12);
  --yellow:     #fbbf24;
  --yellow-dim: rgba(251, 191, 36, 0.12);
  --red:        #f87171;
  --red-dim:    rgba(248, 113, 113, 0.12);

  /* Text */
  --text:       #e8ecf4;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  --gradient-shine:   linear-gradient(135deg, #fff 0%, var(--accent) 50%, var(--accent2) 100%);
  --gradient-glow:    linear-gradient(135deg, rgba(61,220,132,.15), rgba(96,165,250,.08));

  /* Typography */
  --font-sans:  'Cairo', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:  'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --section-padding: 120px;
  --container-width: 1100px;

  /* Transitions */
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out:    cubic-bezier(0, 0, 0.2, 1);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.75;
  overflow-x: hidden;
  cursor: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: rgba(61, 220, 132, 0.25);
  color: #fff;
}

img { max-width: 100%; display: block; }

strong { color: var(--text); font-weight: 700; }

/* ── SCROLL PROGRESS BAR ── */
.scroll-progress {
  position: fixed;
  top: 0;
  right: 0;
  width: 0%;
  height: 3px;
  background: var(--gradient-primary);
  z-index: 10000;
  transition: width 0.1s linear;
  box-shadow: 0 0 10px rgba(61, 220, 132, 0.5);
}

/* ── CUSTOM CURSOR ── */
.cursor {
  width: 22px; height: 22px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 99999;
  transition: width 0.25s var(--ease-smooth),
              height 0.25s var(--ease-smooth),
              border-color 0.25s var(--ease-smooth),
              background 0.25s var(--ease-smooth),
              opacity 0.25s var(--ease-smooth);
  mix-blend-mode: difference;
  transform: translate(-50%, -50%);
  opacity: 0;
}
.cursor.visible { opacity: 1; }
.cursor.hover {
  width: 56px; height: 56px;
  border-color: var(--accent2);
  background: rgba(96, 165, 250, 0.08);
}
.cursor-dot {
  width: 5px; height: 5px;
  background: var(--accent);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.cursor-dot.visible { opacity: 1; }

/* ── LOADING SCREEN ── */
.loading-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1.5rem;
  transition: opacity 1s var(--ease-smooth),
              visibility 1s var(--ease-smooth),
              transform 1s var(--ease-smooth);
}
.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.05);
}
.loader-logo {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.05em;
}
.loader-logo .loader-bracket {
  color: var(--accent);
}
.loader-logo .loader-name {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.loader-text {
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.loader-bar {
  width: 220px;
  height: 3px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.loader-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--gradient-primary);
  border-radius: 3px;
  transition: width 0.3s ease;
}
.loader-percent {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.05em;
}

/* ── AURORA BACKGROUND ── */
.aurora-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.aurora-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.1;
  animation: auroraMove 25s ease-in-out infinite;
  will-change: transform;
}
.aurora-blob:nth-child(1) {
  width: 700px; height: 700px;
  background: var(--accent);
  top: -300px; left: -200px;
}
.aurora-blob:nth-child(2) {
  width: 550px; height: 550px;
  background: var(--accent2);
  bottom: -200px; right: -150px;
  animation-delay: -8s;
}
.aurora-blob:nth-child(3) {
  width: 450px; height: 450px;
  background: var(--accent3);
  top: 40%; left: 40%;
  animation-delay: -16s;
}
@keyframes auroraMove {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(60px, -40px) scale(1.1); }
  50% { transform: translate(-40px, 60px) scale(0.9); }
  75% { transform: translate(30px, 30px) scale(1.05); }
}

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

/* ═══════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════ */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  background: rgba(6, 8, 15, 0.6);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(28, 38, 64, 0.4);
  padding: 0 2.5rem;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.4s var(--ease-smooth);
}
nav.scrolled {
  background: rgba(6, 8, 15, 0.92);
  height: 56px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  border-bottom-color: rgba(28, 38, 64, 0.6);
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: transform 0.3s var(--ease-smooth);
}
.nav-logo:hover { transform: scale(1.05); }
.logo-bracket { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 0.5rem;
  list-style: none;
}
.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: color 0.3s var(--ease-smooth),
              background 0.3s var(--ease-smooth);
  position: relative;
}
.nav-links a:hover {
  color: var(--accent);
  background: var(--accent-dim);
}
.nav-links a.active {
  color: var(--accent);
  background: var(--accent-dim);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px;
  z-index: 101;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.4s var(--ease-smooth), opacity 0.3s;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(6, 8, 15, 0.97);
  backdrop-filter: blur(30px);
  z-index: 99;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.95);
  transition: all 0.5s var(--ease-smooth);
}
.mobile-menu.open {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}
.mobile-menu a {
  color: var(--text);
  font-size: 1.5rem;
  text-decoration: none;
  font-weight: 700;
  padding: 10px 30px;
  border-radius: var(--radius-md);
  transition: all 0.3s var(--ease-smooth);
}
.mobile-menu a:hover {
  color: var(--accent);
  background: var(--accent-dim);
}

/* ═══════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════ */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 140px 2rem 60px;
  position: relative;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  width: 900px; height: 900px;
  background: radial-gradient(circle, rgba(61,220,132,.1) 0%, rgba(96,165,250,.04) 40%, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: pulse-glow 5s ease-in-out infinite;
}
@keyframes pulse-glow {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
  50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

/* Avatar */
.hero-avatar-wrap {
  position: relative;
  width: 180px; height: 180px;
  margin: 0 auto 2rem;
  animation: float 5s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.hero-avatar-ring {
  position: absolute; inset: -6px;
  border-radius: 50%;
  background: conic-gradient(var(--accent), var(--accent2), var(--accent3), var(--accent2), var(--accent));
  animation: spin 4s linear infinite;
  opacity: 0.8;
}
@keyframes spin { to { transform: rotate(360deg); } }
.hero-avatar-bg {
  position: absolute; inset: 3px;
  border-radius: 50%;
  background: var(--bg);
}
.hero-avatar {
  position: absolute; inset: 6px;
  border-radius: 50%;
  object-fit: cover;
  width: calc(100% - 12px);
  height: calc(100% - 12px);
  filter: brightness(1.05) contrast(1.05);
  transition: transform 0.4s var(--ease-smooth);
}
.hero-avatar-wrap:hover .hero-avatar {
  transform: scale(1.08);
}

.avatar-status {
  position: absolute;
  bottom: 8px; right: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(6, 8, 15, 0.9);
  border: 1px solid rgba(61, 220, 132, 0.3);
  padding: 4px 12px 4px 8px;
  border-radius: 100px;
  backdrop-filter: blur(10px);
}
.status-dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: status-blink 2s ease-in-out infinite;
}
@keyframes status-blink {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(61,220,132,.4); }
  50% { opacity: 0.6; box-shadow: 0 0 0 4px rgba(61,220,132,0); }
}
.status-text {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
}

/* Hero Tag */
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  border: 1px solid rgba(61, 220, 132, 0.2);
  background: var(--accent-dim);
  padding: 8px 20px;
  border-radius: 100px;
  margin-bottom: 1.5rem;
  letter-spacing: 0.04em;
  animation: fadeInUp 0.8s var(--ease-out) forwards;
  opacity: 0;
}
.hero-tag i { font-size: 1rem; }

/* Hero Name */
.hero-name {
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 900;
  line-height: 1.15;
  background: linear-gradient(135deg, #fff 20%, var(--accent) 55%, var(--accent2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.8rem;
  animation: fadeInUp 0.8s var(--ease-out) 0.15s forwards;
  opacity: 0;
}

/* Hero Sub (Typing) */
.hero-sub {
  font-family: var(--font-mono);
  font-size: clamp(0.9rem, 2vw, 1.15rem);
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  animation: fadeInUp 0.8s var(--ease-out) 0.3s forwards;
  opacity: 0;
}
.typing-prefix { color: var(--accent); }
.typing-cursor {
  color: var(--accent);
  animation: blink 0.8s step-end infinite;
  font-weight: 300;
}
@keyframes blink { 50% { opacity: 0; } }

/* Hero Desc */
.hero-desc {
  max-width: 560px;
  margin: 0 auto 2rem;
  color: var(--text-secondary);
  font-size: 1.02rem;
  line-height: 1.85;
  animation: fadeInUp 0.8s var(--ease-out) 0.45s forwards;
  opacity: 0;
}

/* Hero CTA */
.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  animation: fadeInUp 0.8s var(--ease-out) 0.6s forwards;
  opacity: 0;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--gradient-primary);
  color: var(--bg);
  font-weight: 700;
  font-family: var(--font-sans);
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.95rem;
  border: none;
  cursor: none;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s var(--ease-smooth),
              box-shadow 0.3s var(--ease-smooth);
  box-shadow: 0 4px 20px rgba(61, 220, 132, 0.25);
}
.btn-primary::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  transition: left 0.6s ease;
}
.btn-primary:hover::after { left: 100%; }
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(61, 220, 132, 0.35);
}
.btn-primary:active { transform: translateY(0) scale(0.98); }
.btn-primary.btn-small {
  padding: 10px 24px;
  font-size: 0.88rem;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 600;
  font-family: var(--font-sans);
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  cursor: none;
  transition: all 0.3s var(--ease-smooth);
}
.btn-secondary:hover {
  color: var(--accent);
  border-color: rgba(61, 220, 132, 0.3);
  background: var(--accent-dim);
  transform: translateY(-2px);
}

/* Stats */
.stats-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  animation: fadeInUp 0.8s var(--ease-out) 0.75s forwards;
  opacity: 0;
  background: rgba(20, 26, 46, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2.5rem;
  backdrop-filter: blur(10px);
}
.stat-item { text-align: center; }
.stat-number {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}
.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  animation: fadeInUp 1s var(--ease-out) 1.2s forwards;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.scroll-indicator.hidden { opacity: 0 !important; }
.scroll-arrow {
  width: 28px; height: 28px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: bounce-down 2s ease-in-out infinite;
  font-size: 0.7rem;
  color: var(--accent);
}
@keyframes bounce-down {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ═══════════════════════════════════════════
   MARQUEE
   ═══════════════════════════════════════════ */
.marquee-container {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(12, 16, 32, 0.5);
  position: relative;
  z-index: 1;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 30s linear infinite;
}
.marquee-content {
  display: flex;
  align-items: center;
  padding: 1rem 0;
  flex-shrink: 0;
}
.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 0 1.5rem;
  white-space: nowrap;
}
.marquee-item i { color: var(--accent); font-size: 1rem; }
.marquee-dot {
  color: var(--accent);
  font-size: 0.4rem;
  opacity: 0.4;
}
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ═══════════════════════════════════════════
   SECTIONS — SHARED
   ═══════════════════════════════════════════ */
section {
  padding: var(--section-padding) 2rem;
  position: relative;
  z-index: 1;
}
.container {
  max-width: var(--container-width);
  margin: 0 auto;
}

.section-header {
  margin-bottom: 3.5rem;
}
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.7rem;
  font-weight: 500;
}
.label-line {
  display: inline-block;
  width: 24px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.8rem;
  line-height: 1.3;
}
.section-divider {
  width: 50px; height: 3px;
  background: var(--gradient-primary);
  border-radius: 3px;
  margin-bottom: 1rem;
}
.section-desc {
  color: var(--text-secondary);
  max-width: 520px;
  font-size: 0.98rem;
  line-height: 1.8;
}

/* ── SCROLL REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s var(--ease-smooth),
              transform 0.7s var(--ease-smooth);
}
.reveal.active {
  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; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════
   ABOUT SECTION
   ═══════════════════════════════════════════ */
#about {
  background: var(--bg-alt);
}
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: start;
}
.about-text p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 0.98rem;
  line-height: 1.85;
}
.about-highlights {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 1.5rem;
}
.highlight-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--text-secondary);
}
.highlight-item i {
  color: var(--accent);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.about-info-cards {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.info-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.4rem;
  transition: all 0.3s var(--ease-smooth);
}
.info-card:hover {
  border-color: rgba(61, 220, 132, 0.2);
  transform: translateX(-4px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}
.info-card-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1rem;
  flex-shrink: 0;
}
.info-card-content {
  display: flex;
  flex-direction: column;
}
.info-card-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}
.info-card-value {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}
.info-card-value.available { color: var(--accent); }

/* ═══════════════════════════════════════════
   APP CARDS
   ═══════════════════════════════════════════ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.app-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
  cursor: none;
  position: relative;
  overflow: hidden;
  transition: all 0.4s var(--ease-smooth);
}
.app-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-glow);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.app-card:hover {
  border-color: rgba(61, 220, 132, 0.3);
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35),
              0 0 0 1px rgba(61, 220, 132, 0.1);
}
.app-card:hover::before { opacity: 1; }

.card-badge {
  position: absolute;
  top: 1rem; left: 1rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 4px 12px;
  border-radius: 100px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  z-index: 1;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  position: relative;
  z-index: 1;
}
.card-icon {
  width: 56px; height: 56px;
  background: var(--accent-dim);
  border: 1px solid rgba(61, 220, 132, 0.15);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 0.4s var(--ease-bounce),
              box-shadow 0.4s ease;
}
.card-icon.accent2 {
  background: var(--accent2-dim);
  border-color: rgba(96, 165, 250, 0.15);
  color: var(--accent2);
}
.app-card:hover .card-icon {
  transform: scale(1.1) rotate(8deg);
  box-shadow: 0 0 20px rgba(61, 220, 132, 0.2);
}
.card-meta { flex: 1; }
.card-name {
  font-size: 1.05rem;
  font-weight: 700;
  transition: color 0.3s ease;
  line-height: 1.4;
}
.app-card:hover .card-name { color: var(--accent); }
.card-category {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.card-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  flex: 1;
  line-height: 1.85;
  position: relative;
  z-index: 1;
}
.card-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.card-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  background: rgba(100, 116, 139, 0.1);
  padding: 3px 10px;
  border-radius: 100px;
  border: 1px solid rgba(100, 116, 139, 0.15);
}

.btn-play {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(20, 26, 46, 0.8);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.83rem;
  font-weight: 600;
  font-family: var(--font-sans);
  transition: all 0.3s var(--ease-smooth);
  width: fit-content;
  cursor: none;
  position: relative;
  z-index: 1;
}
.btn-play i { color: var(--accent); }
.btn-arrow {
  opacity: 0;
  transform: translateX(6px);
  transition: all 0.3s var(--ease-smooth);
  font-size: 0.75rem;
}
.btn-play:hover {
  background: var(--accent-dim);
  border-color: rgba(61, 220, 132, 0.3);
  color: var(--accent);
}
.app-card:hover .btn-play .btn-arrow,
.btn-play:hover .btn-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ═══════════════════════════════════════════
   PROJECTS
   ═══════════════════════════════════════════ */
#projects {
  background: var(--bg-alt);
}
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  text-decoration: none;
  color: inherit;
  cursor: none;
  position: relative;
  overflow: hidden;
  transition: all 0.4s var(--ease-smooth);
}
.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.06), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(96, 165, 250, 0.3);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
}
.project-card:hover::before { opacity: 1; }

.project-number {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 800;
  color: rgba(96, 165, 250, 0.08);
  position: absolute;
  top: 1rem; left: 1.5rem;
  line-height: 1;
  z-index: 0;
  transition: color 0.4s ease;
}
.project-card:hover .project-number {
  color: rgba(96, 165, 250, 0.15);
}
.project-icon {
  background: var(--accent2-dim) !important;
  border-color: rgba(96, 165, 250, 0.15) !important;
  color: var(--accent2) !important;
}
.project-card:hover .project-icon {
  transform: scale(1.1) rotate(-8deg);
  box-shadow: 0 0 20px rgba(96, 165, 250, 0.2);
}
.project-info {
  flex: 1;
  min-width: 180px;
  position: relative;
  z-index: 1;
}
.project-info h3 {
  font-size: 1.08rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  transition: color 0.3s ease;
}
.project-card:hover .project-info h3 { color: var(--accent2); }
.project-info p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.8;
}
.project-role {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent2);
  background: var(--accent2-dim);
  padding: 4px 12px;
  border-radius: 100px;
}
.project-role i { font-size: 0.7rem; }

.btn-play-alt {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(96, 165, 250, 0.25);
  color: var(--accent2);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-sans);
  transition: all 0.3s var(--ease-smooth);
  cursor: none;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.btn-play-alt .btn-arrow {
  opacity: 0;
  transform: translateX(6px);
  transition: all 0.3s var(--ease-smooth);
  font-size: 0.75rem;
}
.btn-play-alt:hover {
  background: var(--accent2-dim);
  border-color: rgba(96, 165, 250, 0.4);
}
.btn-play-alt:hover .btn-arrow,
.project-card:hover .btn-play-alt .btn-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ═══════════════════════════════════════════
   SKILLS
   ═══════════════════════════════════════════ */
#skills {
  background: var(--bg);
}
.skills-categories {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.skills-category {
  background: rgba(20, 26, 46, 0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}
.category-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.category-title i {
  color: var(--accent);
  font-size: 0.9rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.8rem;
}
.skill-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.2rem 1.3rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.3s var(--ease-smooth);
  cursor: none;
}
.skill-card:hover {
  border-color: rgba(61, 220, 132, 0.2);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}
.skill-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  transition: transform 0.4s var(--ease-bounce);
}
.skill-card:hover .skill-icon {
  transform: scale(1.15) rotate(10deg);
}
.sk-green  { background: var(--accent-dim);  color: var(--accent); }
.sk-blue   { background: var(--accent2-dim); color: var(--accent2); }
.sk-purple { background: var(--purple-dim);  color: var(--purple); }
.sk-yellow { background: var(--yellow-dim);  color: var(--yellow); }
.sk-red    { background: var(--red-dim);     color: var(--red); }

.skill-name {
  font-weight: 700;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}
.skill-card:hover .skill-name { color: var(--accent); }
.skill-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 1px;
}

/* Skill Bars */
.skill-bars {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}
.skill-bar-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.3rem 1.5rem;
  transition: all 0.3s var(--ease-smooth);
}
.skill-bar-item:hover {
  border-color: rgba(61, 220, 132, 0.15);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}
.skill-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}
.skill-bar-name {
  font-weight: 600;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.skill-bar-name i {
  color: var(--accent);
  font-size: 0.9rem;
}
.skill-bar-percent {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 600;
}
.skill-bar-track {
  width: 100%;
  height: 6px;
  background: rgba(28, 38, 64, 0.8);
  border-radius: 3px;
  overflow: hidden;
}
.skill-bar-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 3px;
  width: 0%;
  transition: width 1.2s var(--ease-smooth);
  position: relative;
}

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 5rem 2rem 3rem;
  position: relative;
  z-index: 1;
}
footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent2), transparent);
  opacity: 0.4;
}
.footer-inner {
  max-width: var(--container-width);
  margin: 0 auto;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 3rem;
  flex-wrap: wrap;
}
.footer-brand { flex: 1; min-width: 250px; }
.footer-logo {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.footer-tagline {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.footer-cta {
  text-align: left;
  flex: 1;
  min-width: 250px;
}
.footer-cta h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.footer-cta p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-bottom: 1rem;
}

.footer-divider {
  height: 1px;
  background: var(--border);
  margin: 2.5rem 0;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.social-links {
  display: flex;
  gap: 0.8rem;
}
.social-link {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  text-decoration: none;
  transition: all 0.35s var(--ease-smooth);
  cursor: none;
}
.social-link.whatsapp:hover {
  color: #25d366;
  border-color: #25d366;
  background: rgba(37, 211, 102, 0.1);
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.15);
}
.social-link.facebook:hover {
  color: #1877f2;
  border-color: #1877f2;
  background: rgba(24, 119, 242, 0.1);
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(24, 119, 242, 0.15);
}
.social-link.instagram:hover {
  color: #e1306c;
  border-color: #e1306c;
  background: rgba(225, 48, 108, 0.1);
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(225, 48, 108, 0.15);
}

.footer-copy {
  color: var(--text-muted);
  font-size: 0.82rem;
}
.heart {
  color: var(--accent3);
  display: inline-block;
  animation: heartbeat 1.5s ease-in-out infinite;
}
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* ── BACK TO TOP ── */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--accent);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: none;
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.4s var(--ease-smooth);
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  background: var(--accent-dim);
  border-color: rgba(61, 220, 132, 0.3);
  transform: translateY(-3px);
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 80px;
  }

  .nav-links { display: none; }
  .hamburger { display: flex; }

  nav { padding: 0 1.2rem; }
  section { padding: 70px 1.2rem; }

  .hero-section { padding: 120px 1.2rem 60px; }

  .stats-bar {
    flex-direction: column;
    gap: 1rem;
    padding: 1.2rem 1.5rem;
  }
  .stat-divider {
    width: 40px;
    height: 1px;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    flex-direction: column;
    align-items: flex-start;
    text-align: right;
  }
  .btn-play-alt {
    width: 100%;
    justify-content: center;
  }

  .skills-grid {
    grid-template-columns: 1fr 1fr;
  }
  .skill-bars {
    grid-template-columns: 1fr;
  }

  .footer-top {
    flex-direction: column;
    text-align: center;
  }
  .footer-cta {
    text-align: center;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .cursor, .cursor-dot { display: none !important; }
  body { cursor: auto; }
  .app-card, .project-card, .btn-play, .btn-play-alt,
  .btn-primary, .btn-secondary, .social-link, .skill-card,
  .back-to-top { cursor: auto; }
}

@media (max-width: 480px) {
  .skills-grid {
    grid-template-columns: 1fr;
  }
  .hero-name {
    font-size: 2.2rem;
  }
  .hero-avatar-wrap {
    width: 140px;
    height: 140px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ═══════════════════════════════════════════
   PROFESSIONAL UPGRADES
   ═══════════════════════════════════════════ */

/* ── SKIP LINK (Accessibility) ── */
.skip-link {
  position: fixed;
  top: -60px;
  right: 1rem;
  z-index: 100000;
  background: var(--accent);
  color: #06080f;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: top 0.25s var(--ease-smooth);
}
.skip-link:focus-visible { top: 1rem; }

/* ── FOCUS VISIBLE ── */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ── HERO (moved from inline styles) ── */
.hero-cta-spaced { margin-bottom: 1.5rem; }
.hero-social {
  justify-content: center;
  margin-bottom: 3rem;
  animation: fadeInUp 0.8s var(--ease-out) 0.65s forwards;
  opacity: 0;
}

/* ── SERVICES ── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
.service-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  transition: transform 0.35s var(--ease-smooth),
              border-color 0.35s var(--ease-smooth),
              background 0.35s var(--ease-smooth),
              box-shadow 0.35s var(--ease-smooth);
  will-change: transform;
}
.service-card:hover {
  background: var(--card-hover);
  border-color: var(--border-hover);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}
.service-icon {
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  border-radius: var(--radius-md);
  background: var(--accent-dim);
  color: var(--accent);
  margin-bottom: 1.25rem;
}
.service-icon.accent2 { background: var(--accent2-dim); color: var(--accent2); }
.service-icon.accent3 { background: var(--red-dim); color: var(--red); }
.service-icon.accent4 { background: var(--purple-dim); color: var(--purple); }
.service-card h3 {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 0.6rem;
}
.service-card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.8;
}

/* ── CURSOR: only on precise pointers (fixes tablets/touch laptops) ── */
@media (pointer: coarse), (hover: none) {
  .cursor, .cursor-dot { display: none !important; }
  body, a, button { cursor: auto !important; }
}

/* ── REDUCED MOTION: hide decorative layers entirely ── */
@media (prefers-reduced-motion: reduce) {
  .aurora-blob, #particles-canvas { display: none; }
  .marquee-content { animation: none !important; }
}

/* ── PRINT ── */
@media print {
  .cursor, .cursor-dot, .aurora-bg, #particles-canvas,
  .loading-screen, .scroll-progress, .back-to-top,
  .scroll-indicator, .marquee-container { display: none !important; }
  body { background: #fff; color: #000; cursor: auto; }
}
