/*
 * custom.css
 * Advanced styles for DevSugam's Premium Portfolio
 * Part of SSStudio
 */

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

:root {
  --bg-primary: #05050a;
  --bg-secondary: #0b0b14;
  --bg-card: rgba(17, 17, 28, 0.7);
  --color-purple: #a855f7;
  --color-blue: #3b82f6;
  --color-cyan: #06b6d4;
  --glow-purple: 0 0 20px rgba(168, 85, 247, 0.4);
  --glow-blue: 0 0 20px rgba(59, 130, 246, 0.4);
  --glow-cyan: 0 0 20px rgba(6, 182, 212, 0.4);
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  color: #e2e8f0;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

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

.font-code {
  font-family: 'Fira Code', monospace;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: #1e1b4b;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #312e81;
}

/* Custom Cursor Glow */
.cursor-glow {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.15) 0%, rgba(59, 130, 246, 0.05) 50%, transparent 70%);
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s;
  mix-blend-mode: screen;
}

/* Glassmorphism Styles */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.glass-panel:hover {
  border-color: rgba(168, 85, 247, 0.2);
}

/* Neon Glow Utilities */
.glow-text-cyan {
  text-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}
.glow-text-purple {
  text-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
}

.glow-border-purple:hover {
  box-shadow: var(--glow-purple);
  border-color: var(--color-purple);
}

.glow-border-cyan:hover {
  box-shadow: var(--glow-cyan);
  border-color: var(--color-cyan);
}

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

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

@keyframes pulse-glow {
  0%, 100% {
    opacity: 0.6;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.2);
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.5), 0 0 50px rgba(6, 182, 212, 0.3);
  }
}

.animate-pulse-glow {
  animation: pulse-glow 3s infinite;
}

/* Timeline Stylings */
.timeline-item::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  right: -8px;
  background-color: var(--bg-primary);
  border: 4px solid var(--color-purple);
  border-radius: 50%;
  top: 0;
  z-index: 1;
  box-shadow: 0 0 10px var(--color-purple);
}

.timeline-item-left::after {
  left: -8px;
}

/* Custom Gradient Text */
.text-gradient-purple-cyan {
  background: linear-gradient(135deg, var(--color-purple) 0%, var(--color-blue) 50%, var(--color-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-cyan-purple {
  background: linear-gradient(135deg, var(--color-cyan) 0%, var(--color-blue) 50%, var(--color-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Card Hover Multi-Layers */
.interactive-card {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.interactive-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 15px 30px rgba(168, 85, 247, 0.15);
}

/* Loading Screen Animation */
#loader {
  background-color: #030307;
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease;
}

.loader-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(168, 85, 247, 0.1);
  border-radius: 50%;
  border-top-color: var(--color-purple);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Reveal on Scroll styling */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Skill Progress Load Animation */
.progress-bar-fill {
  width: 0;
  transition: width 1.5s cubic-bezier(0.1, 1, 0.1, 1);
}

/* Parallax Minecraft Avatar Container */
.minecraft-avatar-wrap {
  perspective: 1000px;
}
.minecraft-avatar-body {
  transform-style: preserve-3d;
  transition: transform 0.2s ease-out;
}

/* Mobile Responsive Adjustments */

/* Premium Mobile Menu Slide & Fade Transition */
#mobile-menu {
  display: flex !important;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-15px);
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

#mobile-menu.active {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Automatic Float Animation on Mobile Viewports where Mouse Parallax is unavailable */
@media (max-width: 1023px) {
  .minecraft-avatar-body {
    animation: float 6s ease-in-out infinite;
  }
}
