/* ==========================================================================
   WAQAR AHMAD MALIK — EXECUTIVE PORTFOLIO & CV PLATFORM
   High-Contrast, Modern Executive Engineering Aesthetic
   Full-Screen Section Transitions & Rich Scroll Animations
   ========================================================================== */

:root {
  --bg-canvas: #fafbfd;
  --bg-subtle: #f1f5f9;
  --bg-card: #ffffff;
  
  --border-light: #e2e8f0;
  --border-subtle: #f1f5f9;
  --border-dark: #cbd5e1;
  --border-focus: #3b82f6;

  --text-primary: #090d16;
  --text-secondary: #334155;
  --text-muted: #64748b;
  
  --brand-blue: #0A66C2;
  --brand-navy: #0b1329;
  --brand-accent: #1d4ed8;
  --whatsapp-green: #25D366;
  --gold-accent: #b45309;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
}

body {
  overflow-x: hidden;
  background-color: var(--bg-canvas);
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* Blueprint Grid Background with Ambient Radiance */
.lean-grid-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: 
    linear-gradient(to right, rgba(15, 23, 42, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 30%, black 40%, transparent 85%);
  -webkit-mask-image: radial-gradient(circle at 50% 30%, black 40%, transparent 85%);
}

/* Ambient dynamic light glow behind sections */
.ambient-glow {
  position: absolute;
  border-radius: 9999px;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.45;
  transition: all 1s ease;
  z-index: 0;
}

/* Header with reading progress indicator */
.lean-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.lean-header.header-scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.08);
  border-color: rgba(203, 213, 225, 0.9);
}

/* Top Progress Bar */
#scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #2563eb, #3b82f6, #0A66C2, #10b981);
  width: 0%;
  z-index: 100;
  transition: width 0.1s linear;
}

/* Full-Screen Section Framework */
.fullscreen-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding-top: 5.5rem;
  padding-bottom: 5.5rem;
  z-index: 1;
}

@media (max-width: 640px) {
  .fullscreen-section {
    min-height: auto;
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
}

/* Executive Cards */
.lean-card {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 18px -4px rgba(15, 23, 42, 0.03);
}

.lean-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 18px 38px -8px rgba(15, 23, 42, 0.09);
  transform: translateY(-4px);
}

/* Client Brand Tiles */
.client-tile {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.client-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 14px;
  border: 1.5px solid transparent;
  transition: border-color 0.25s ease;
  pointer-events: none;
}

.client-tile:hover {
  border-color: #93c5fd;
  box-shadow: 0 12px 28px -4px rgba(10, 102, 194, 0.12);
  transform: translateY(-4px) scale(1.02);
}

.client-tile:hover::after {
  border-color: #3b82f6;
}

/* Exact LinkedIn Newsletter Button */
.libutton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 20px;
  text-align: center;
  outline: none;
  text-decoration: none !important;
  color: #ffffff !important;
  height: 44px;
  border-radius: 9999px;
  background-color: #0A66C2;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 13px;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(10, 102, 194, 0.25);
}

.libutton:hover {
  background-color: #004182;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(10, 102, 194, 0.38);
}

/* WhatsApp Buttons */
.whatsapp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 20px;
  height: 44px;
  border-radius: 9999px;
  background-color: #25D366;
  color: #ffffff !important;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none !important;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.28);
}

.whatsapp-btn:hover {
  background-color: #1ebc57;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(37, 211, 102, 0.4);
}

/* Floating WhatsApp button */
.floating-whatsapp {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: #25D366;
  color: #ffffff;
  padding: 12px 22px;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 8px 26px rgba(37, 211, 102, 0.45);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none !important;
}

.floating-whatsapp:hover {
  background-color: #1ebc57;
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 32px rgba(37, 211, 102, 0.55);
}

/* Tags */
.lean-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
}

/* Timeline Components */
.timeline-item {
  position: relative;
  padding-left: 32px;
  transition: all 0.3s ease;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 10px;
  bottom: -28px;
  width: 2px;
  background: #cbd5e1;
}

.timeline-item:last-child::before {
  bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: 0;
  top: 8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #2563eb;
  border: 3px solid #ffffff;
  box-shadow: 0 0 0 3px #bfdbfe;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.timeline-item:hover .timeline-dot {
  transform: scale(1.25);
  box-shadow: 0 0 0 5px #93c5fd;
}

/* Desktop Side Dot Navigation */
.section-nav-dots {
  position: fixed;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: none;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 1280px) {
  .section-nav-dots {
    display: flex;
  }
}

.section-nav-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #cbd5e1;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.section-nav-dot:hover {
  background: #64748b;
  transform: scale(1.3);
}

.section-nav-dot.active {
  background: #2563eb;
  transform: scale(1.4);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

.section-nav-dot .tooltip {
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  padding: 4px 9px;
  border-radius: 6px;
  background: #0f172a;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translateY(-50%) translateX(6px);
}

.section-nav-dot:hover .tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* Scroll Down Indicator */
.scroll-down-cue {
  animation: bounceSlow 2.5s infinite;
}

@keyframes bounceSlow {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-8px); }
  60% { transform: translateY(-4px); }
}

/* ==========================================================================
   ADVANCED SCROLL ANIMATIONS
   ========================================================================== */

/* Section Level Entrance */
.section-animate {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.section-animate.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered Children Animations */
.stagger-child {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(var(--order, 0) * 85ms);
  will-change: opacity, transform;
}

.is-visible .stagger-child {
  opacity: 1;
  transform: translateY(0);
}

/* Scaling / Zoom Entrance for Hero Media */
.zoom-child {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.is-visible .zoom-child {
  opacity: 1;
  transform: scale(1);
}

/* Interactive Floating Pulse */
@keyframes floatGentle {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-5px); }
}

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

/* Soft Glow Behind Headshot */
.avatar-glow {
  position: absolute;
  inset: -8px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.25), rgba(16, 185, 129, 0.2), rgba(245, 158, 11, 0.25));
  filter: blur(14px);
  z-index: -1;
  opacity: 0.8;
  animation: floatGentle 4s ease-in-out infinite alternate;
}

/* Minimal Scrollbar */
::-webkit-scrollbar {
  width: 7px;
}
::-webkit-scrollbar-track {
  background: #f8fafc;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Button & Interactive Press Feedback */
button:active, a.libutton:active, a.whatsapp-btn:active {
  transform: scale(0.97) !important;
}

/* Timeline Dot Glow Pulse */
@keyframes timelinePulse {
  0%, 100% {
    box-shadow: 0 0 0 3px #bfdbfe, 0 0 10px rgba(37, 99, 235, 0.2);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(147, 197, 253, 0.6), 0 0 16px rgba(37, 99, 235, 0.4);
  }
}

.timeline-dot {
  animation: timelinePulse 3.5s ease-in-out infinite;
}

/* Subtle Shimmer Effect for Badges & Honors */
@keyframes goldGleam {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.gleam-badge {
  background: linear-gradient(90deg, rgba(254, 243, 199, 0.9) 0%, rgba(253, 230, 138, 1) 40%, rgba(255, 255, 255, 0.95) 50%, rgba(253, 230, 138, 1) 60%, rgba(254, 243, 199, 0.9) 100%);
  background-size: 200% 100%;
  animation: goldGleam 4s infinite linear;
}

/* Ambient Background Drift */
@keyframes driftSlow {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(25px, -20px) scale(1.08);
  }
}

.ambient-glow {
  animation: driftSlow 16s ease-in-out infinite alternate;
  will-change: transform;
}

/* Pulse Beacon */
@keyframes beaconPulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(37, 99, 235, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  }
}

.beacon-pulse {
  animation: beaconPulse 2.4s infinite;
}

/* Interactive Card Elevation & Border Light */
.interactive-card {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
}

.interactive-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 36px -8px rgba(15, 23, 42, 0.08);
}

/* KPI Animated Progress Bar */
.kpi-fill {
  width: 0%;
  transition: width 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.is-visible .kpi-fill {
  width: var(--kpi-pct, 100%);
}

