/* ==========================================================================
   Aws Hameed - Portfolio Stylesheet
   Modern Cyberpunk Glassmorphism & Micro-animations
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --bg-primary: #07090e;
  --bg-secondary: #0d111a;
  --bg-card: rgba(15, 23, 42, 0.65);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(139, 92, 246, 0.35);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-purple: #8b5cf6;
  --accent-cyan: #06b6d4;
  --accent-indigo: #6366f1;
  --accent-emerald: #10b981;
}

html.light {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.8);
  --bg-card-hover: rgba(255, 255, 255, 0.95);
  --border-color: rgba(0, 0, 0, 0.08);
  --border-glow: rgba(99, 102, 241, 0.3);
  --text-main: #0f172a;
  --text-muted: #64748b;
  --accent-purple: #7c3aed;
  --accent-cyan: #0284c7;
  --accent-indigo: #4f46e5;
  --accent-emerald: #059669;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

body {
  overflow-x: hidden;
  min-height: 100vh;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-purple);
}

/* Dynamic Gradient Text */
.text-gradient {
  background: linear-gradient(135deg, #a855f7 0%, #6366f1 50%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-alt {
  background: linear-gradient(135deg, #38bdf8 0%, #818cf8 50%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-shimmer {
  background: linear-gradient(90deg, #e2e8f0 0%, #a855f7 25%, #38bdf8 50%, #e2e8f0 75%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 4s linear infinite;
}

@keyframes shine {
  to {
    background-position: 200% center;
  }
}

/* Ambient Radial Glows */
.ambient-glow-purple {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, rgba(139, 92, 246, 0) 70%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

.ambient-glow-cyan {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.12) 0%, rgba(6, 182, 212, 0) 70%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

/* Grid Matrix Pattern */
.bg-grid-pattern {
  background-size: 36px 36px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
}

html.light .bg-grid-pattern {
  background-image: 
    linear-gradient(to right, rgba(0, 0, 0, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
}

/* Glassmorphism Card Style */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 1.25rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  box-shadow: 0 12px 30px -10px rgba(139, 92, 246, 0.18);
}

/* Spotlight Effect overlay on cards */
.spotlight-card {
  position: relative;
}

.spotlight-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: radial-gradient(400px circle at var(--mouse-x, 0) var(--mouse-y, 0), rgba(168, 85, 247, 0.4), transparent 40%);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.spotlight-card:hover::before {
  opacity: 1;
}

/* Floating animation */
@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-8px) rotate(1deg);
  }
}

@keyframes float-reverse {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(8px) rotate(-1deg);
  }
}

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

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

.animate-float-reverse {
  animation: float-reverse 5.5s ease-in-out 0.8s infinite;
}

/* Pulsing Badge Halo */
@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
}

.pulse-badge {
  animation: pulseGlow 2.5s infinite;
}

/* Profile Photo Glow Ring */
.profile-ring {
  background: linear-gradient(135deg, #a855f7, #6366f1, #06b6d4);
  padding: 3px;
  border-radius: 9999px;
  position: relative;
}

.profile-ring::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: inherit;
  background: inherit;
  filter: blur(14px);
  opacity: 0.6;
  z-index: -1;
  animation: rotateGradient 6s linear infinite;
}

@keyframes rotateGradient {
  0% { filter: hue-rotate(0deg) blur(14px); }
  100% { filter: hue-rotate(360deg) blur(14px); }
}

/* 3D Tilt Card */
.tilt-card {
  transform-style: preserve-3d;
  will-change: transform;
}

/* Magnetic Button Glow */
.btn-glow {
  position: relative;
  transition: all 0.25s ease;
}

.btn-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(139, 92, 246, 0.4);
}

/* Animated Underline */
.hover-underline {
  position: relative;
}
.hover-underline::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background: linear-gradient(90deg, #8b5cf6, #06b6d4);
  transition: width 0.3s ease;
}
.hover-underline:hover::after {
  width: 100%;
}

/* Timeline Vertical Line */
.timeline-track {
  position: relative;
}
.timeline-track::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 20px;
  width: 2px;
  background: linear-gradient(to bottom, #8b5cf6, #3b82f6, #06b6d4, transparent);
}

@media (min-width: 768px) {
  .timeline-track-center::before {
    left: 50%;
    transform: translateX(-50%);
  }
}

/* Scroll Fade In Animations */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Toast Notification */
#toast {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

/* Terminal Cursor Blink */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.cursor-blink {
  display: inline-block;
  width: 8px;
  height: 15px;
  background-color: #38bdf8;
  vertical-align: middle;
  animation: blink 1s step-start infinite;
}
