/* Custom CSS for Umar Zulfqar - Aura-Inspired Personal SEO Portfolio */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:ital,wght@0,500;0,600;0,700;0,800;1,700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --bg-dark: #070A11;
  --bg-card: rgba(15, 23, 42, 0.75);
  --accent-emerald: #10B981;
  --accent-cyan: #06B6D4;
  --accent-indigo: #6366F1;
  --text-primary: #F8FAFC;
  --text-muted: #94A3B8;
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-hover: rgba(16, 185, 129, 0.35);
  --glass-nav-bg: rgba(7, 10, 17, 0.85);
  --glass-nav-scrolled: rgba(7, 10, 17, 0.95);
  --glass-card-bg: rgba(15, 23, 42, 0.65);
  --modal-bg: #070A11;
  --modal-card-bg: #0F172A;
  --input-bg: rgba(15, 23, 42, 0.8);
  --input-border: rgba(255, 255, 255, 0.12);
  --shadow-color: rgba(0, 0, 0, 0.5);
  --glow-emerald: rgba(16, 185, 129, 0.18);
  --glow-cyan: rgba(6, 182, 212, 0.18);
}

/* Light Mode Variables & High-Contrast Cyber Design */
/* Light Mode Variables & High-Contrast Clean Theme */
html:not(.dark) {
  --bg-dark: #FFFFFF;
  --bg-card: #FFFFFF;
  --text-primary: #0F172A;
  --text-muted: #475569;
  --border-glass: rgba(15, 23, 42, 0.1);
  --border-glass-hover: rgba(16, 185, 129, 0.45);
  --glass-nav-bg: rgba(255, 255, 255, 0.9);
  --glass-nav-scrolled: rgba(255, 255, 255, 0.98);
  --glass-card-bg: #FFFFFF;
  --modal-bg: #FFFFFF;
  --modal-card-bg: #FFFFFF;
  --input-bg: #FFFFFF;
  --input-border: rgba(15, 23, 42, 0.15);
  --shadow-color: rgba(0, 0, 0, 0.05);
  --glow-emerald: rgba(16, 185, 129, 0.12);
  --glow-cyan: rgba(6, 182, 212, 0.12);
}

/* Base resets & typography */
html {
  scroll-behavior: smooth;
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

body {
  overflow-x: hidden;
  position: relative;
  width: 100%;
}

html:not(.dark) body {
  background-color: #FFFFFF !important;
  color: #0F172A !important;
}

/* Override Dark Section Backgrounds & Gradients in Light Mode */
html:not(.dark) .bg-slate-950,
html:not(.dark) .bg-slate-950\/40,
html:not(.dark) .bg-slate-950\/50,
html:not(.dark) .bg-slate-950\/60,
html:not(.dark) .bg-slate-950\/80,
html:not(.dark) .bg-\[\#070A11\],
html:not(.dark) .bg-[#0a0f1d],
html:not(.dark) .bg-brandDark,
html:not(.dark) [class*="from-slate-950"],
html:not(.dark) [class*="via-slate-950"],
html:not(.dark) [class*="to-[#070A11]"],
html:not(.dark) [class*="to-slate-950"] {
  background-color: #FFFFFF !important;
  background-image: none !important;
}

/* Subtle Light Alternating Sections for Visual Distinction */
html:not(.dark) section.bg-slate-950\/40,
html:not(.dark) section.bg-slate-950\/50,
html:not(.dark) section.bg-slate-950\/60 {
  background-color: #F8FAFC !important;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.font-mono-tech {
  font-family: 'JetBrains Mono', monospace;
}

/* Custom Cyber Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #10B981 0%, #06B6D4 100%);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #10B981;
}

/* Futuristic Glassmorphism */
.glass-nav {
  background: var(--glass-nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  box-shadow: 0 10px 30px -10px var(--shadow-color);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-nav.scrolled {
  background: var(--glass-nav-scrolled);
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 12px 40px -10px var(--shadow-color), 0 0 25px rgba(16, 185, 129, 0.15);
}

.glass-card {
  background: var(--glass-card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  box-shadow: 0 8px 32px 0 var(--shadow-color);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s ease, box-shadow 0.35s ease, background 0.3s ease;
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  transition: left 0.7s ease;
}

.glass-card:hover::before {
  left: 100%;
}

.glass-card:hover {
  border-color: rgba(16, 185, 129, 0.45);
  transform: translateY(-5px);
  box-shadow: 0 20px 40px -15px rgba(16, 185, 129, 0.2), 0 0 20px rgba(6, 182, 212, 0.1);
}

html:not(.dark) .glass-card {
  background-color: #FFFFFF !important;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05) !important;
  border: 1px solid rgba(15, 23, 42, 0.1) !important;
}

html:not(.dark) .glass-card:hover {
  border-color: rgba(16, 185, 129, 0.5) !important;
  box-shadow: 0 12px 32px rgba(16, 185, 129, 0.12) !important;
}

.glass-card-interactive {
  background: var(--glass-card-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
}

/* Light Mode Overrides for Crisp Visibility */
html:not(.dark) .text-slate-100,
html:not(.dark) .text-slate-200,
html:not(.dark) .text-white {
  color: #0F172A !important;
}

html:not(.dark) .text-slate-300 {
  color: #1E293B !important;
}

html:not(.dark) .text-slate-400 {
  color: #475569 !important;
}

html:not(.dark) .text-slate-500 {
  color: #64748B !important;
}

html:not(.dark) .bg-slate-900\/40,
html:not(.dark) .bg-slate-900\/80,
html:not(.dark) .bg-slate-900\/90,
html:not(.dark) .bg-slate-900,
html:not(.dark) .bg-slate-800\/60,
html:not(.dark) .bg-slate-800\/80,
html:not(.dark) .bg-slate-800,
html:not(.dark) .bg-brandCard {
  background-color: #F1F5F9 !important;
}

html:not(.dark) .border-white\/5,
html:not(.dark) .border-white\/10,
html:not(.dark) .border-white\/20,
html:not(.dark) .border-slate-800,
html:not(.dark) .border-slate-800\/60,
html:not(.dark) .border-slate-800\/80,
html:not(.dark) .border-slate-700,
html:not(.dark) .border-slate-700\/40,
html:not(.dark) .border-slate-700\/80 {
  border-color: rgba(15, 23, 42, 0.1) !important;
}

html:not(.dark) input,
html:not(.dark) textarea {
  background-color: #FFFFFF !important;
  color: #0F172A !important;
  border-color: #CBD5E1 !important;
}

html:not(.dark) #mobile-menu {
  background-color: rgba(255, 255, 255, 0.98) !important;
}

html:not(.dark) #project-modal .glass-card {
  background-color: #FFFFFF !important;
}

/* Gradient Utilities */
.text-gradient {
  background: linear-gradient(135deg, #10B981 0%, #06B6D4 50%, #3B82F6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-alt {
  background: linear-gradient(135deg, #0EA5E9 0%, #6366F1 50%, #EC4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-gold {
  background: linear-gradient(135deg, #F59E0B 0%, #10B981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.bg-gradient-accent {
  background: linear-gradient(135deg, #10B981 0%, #06B6D4 100%);
}

.bg-gradient-glow {
  background: radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.2) 0%, rgba(6, 182, 212, 0.05) 50%, transparent 70%);
}

/* Cyber Glow Badge */
.cyber-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10B981;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.15);
}

html:not(.dark) .cyber-badge {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  border-color: rgba(16, 185, 129, 0.4);
}

/* Animations */
@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(0.5deg); }
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.08); }
}

.animate-float {
  animation: float 5s ease-in-out infinite;
}

.animate-float-delayed {
  animation: float 6s ease-in-out 2.5s infinite;
}

.animate-pulse-glow {
  animation: pulseGlow 4s ease-in-out infinite;
}

/* Project Filter Transitions */
.project-card {
  transition: opacity 0.4s ease, transform 0.4s ease, filter 0.4s ease;
  opacity: 1;
  transform: scale(1);
}

.project-card.is-hidden {
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
  position: absolute;
  visibility: hidden;
}

/* Scroll Reveal States with Fail-Safe Visibility */
.reveal-on-scroll {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

html.js-ready .reveal-on-scroll:not(.is-visible):not(.is-revealed) {
  opacity: 0;
  transform: translateY(28px);
}

.reveal-on-scroll.is-visible,
.reveal-on-scroll.is-revealed {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Active Nav Indicator */
.nav-link {
  position: relative;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, #10B981, #06B6D4);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.nav-link.active {
  color: #10B981 !important;
}

.nav-link.active::after {
  width: 100%;
}

/* Progress bar fill animation */
.progress-bar-fill {
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Modal styles */
.modal-backdrop {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  transform: scale(0.95) translateY(20px);
  transition: transform 0.3s ease;
}

.modal-backdrop.is-open .modal-content {
  transform: scale(1) translateY(0);
}

/* Touch targets & mobile optimization */
@media (max-width: 768px) {
  button, a, input, select, textarea {
    min-height: 44px;
  }
  .filter-btn {
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
  }
  input, select, textarea {
    font-size: 16px !important; /* Prevents auto-zoom on iOS Safari */
  }
}

/* ==========================================================================
   FLOATING BOTTOM NAVIGATION BAR (iOS App Style)
   ========================================================================== */
.bottom-nav-bar {
  position: fixed;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  left: 1rem;
  right: 1rem;
  z-index: 50;
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9999px;
  padding: 0.35rem 0.5rem;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.6), 0 0 25px rgba(16, 185, 129, 0.15);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

html:not(.dark) .bottom-nav-bar {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.12), 0 0 20px rgba(16, 185, 129, 0.12);
}

.bottom-nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.55rem;
  border-radius: 9999px;
  color: #94A3B8;
  font-size: 0.65rem;
  font-weight: 600;
  line-height: 1;
  gap: 0.25rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 44px;
}

.bottom-nav-link svg {
  width: 1.25rem;
  height: 1.25rem;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.25s ease;
}

.bottom-nav-link.active,
.bottom-nav-link:hover {
  color: #10B981 !important;
  background: rgba(16, 185, 129, 0.15);
}

.bottom-nav-link.active svg {
  transform: translateY(-1px) scale(1.1);
  color: #10B981 !important;
}

html:not(.dark) .bottom-nav-link {
  color: #64748B;
}

html:not(.dark) .bottom-nav-link.active {
  color: #047857 !important;
  background: rgba(16, 185, 129, 0.18);
}

/* Safe area padding helper for content container */
.has-bottom-nav {
  padding-bottom: calc(6rem + env(safe-area-inset-bottom, 0px)) !important;
}

@media (min-width: 1024px) {
  .has-bottom-nav {
    padding-bottom: 0 !important;
  }
}

/* Responsive & Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal-on-scroll,
  .animate-float,
  .animate-float-delayed,
  .project-card,
  .glass-card {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}

