/* 
   Premium Portfolio Stylesheet
   Developer: Brijesh kumar pandey
   Design Theme: Dark Futuristic / Glassmorphism
*/

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@400;500;600;700;800&display=swap');

/* Color Variables and Base Styling */
:root {
  --bg-color: #0f172a;
  --primary: #3b82f6;
  --accent: #06b6d4;
  --text-white: #ffffff;
  --text-gray: #94a3b8;
  --font-title: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  background-color: var(--bg-color);
  color: var(--text-white);
  font-family: var(--font-body);
}

body {
  overflow-x: hidden;
  position: relative;
  background-color: var(--bg-color);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--accent), var(--primary));
}

/* Custom Cursor (Desktop Only) */
.custom-cursor-dot,
.custom-cursor-outline {
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  z-index: 9999;
  pointer-events: none;
  display: none;
  transition: transform 0.1s ease-out, opacity 0.15s ease-out;
}

@media (min-width: 1024px) {
  .custom-cursor-dot {
    display: block;
    width: 8px;
    height: 8px;
    background-color: var(--accent);
    box-shadow: 0 0 10px var(--accent);
  }
  .custom-cursor-outline {
    display: block;
    width: 40px;
    height: 40px;
    border: 2px solid rgba(59, 130, 246, 0.4);
    transition: width 0.2s, height 0.2s, border-color 0.2s, background-color 0.2s;
  }
}

/* Loading Screen */
#loading-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background-color: var(--bg-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.6s;
}

#loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Glassmorphism Styles */
.glass-card {
  background: rgba(30, 41, 59, 0.45);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  transition: var(--transition-smooth);
}

.glass-card:hover {
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(6, 182, 212, 0.3);
  transform: translateY(-5px);
  box-shadow: 0 12px 40px 0 rgba(6, 182, 212, 0.15);
}

.glass-nav {
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Glow and Hover Effects */
.hover-glow {
  transition: var(--transition-smooth);
}
.hover-glow:hover {
  box-shadow: 0 0 25px rgba(59, 130, 246, 0.4);
  border-color: rgba(6, 182, 212, 0.5);
}

.glow-btn {
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  z-index: 1;
}

.glow-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}

.glow-btn:hover::before {
  opacity: 1;
}

.glow-btn:hover {
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.5);
  transform: translateY(-2px);
}

/* Button Ripple Effect Helper */
.ripple {
  position: absolute;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  transform: scale(0);
  animation: ripple-effect 0.6s linear;
  pointer-events: none;
}

@keyframes ripple-effect {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Interactive Timelines */
.timeline-item {
  position: relative;
  transition: var(--transition-smooth);
}

.timeline-item::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  background-color: var(--bg-color);
  border: 4px solid var(--accent);
  border-radius: 50%;
  top: 6px;
  z-index: 1;
  transition: var(--transition-smooth);
}

/* Left/Right layouts adjustments */
@media (min-width: 768px) {
  .timeline-item-left::after {
    right: -8px;
  }
  .timeline-item-right::after {
    left: -8px;
  }
}
@media (max-width: 767px) {
  .timeline-item::after {
    left: -8px;
  }
}

.timeline-item:hover::after {
  background-color: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  transform: scale(1.2);
}

/* Animated Title Underline */
.title-underline {
  position: relative;
}

.title-underline::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 40px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
  transition: width 0.3s ease-in-out;
}

.title-underline:hover::after {
  width: 100px;
}

/* Floating Animations */
@keyframes float {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(3deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

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

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

/* Pulsing Background Gradients */
@keyframes gradient-bg {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.animate-gradient {
  background-size: 200% 200%;
  animation: gradient-bg 8s ease infinite;
}

/* Scroll Progress Bar */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  z-index: 9999;
  width: 0%;
  transition: width 0.1s ease-out;
}

/* Back to Top Button */
#back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  color: var(--text-white);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#back-to-top:hover {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
  transform: translateY(-3px) scale(1.05);
}

/* Typing Effect Caret Animation */
.typing-caret::after {
  content: '|';
  animation: caret-blink 0.8s infinite;
  color: var(--accent);
  font-weight: 700;
  margin-left: 3px;
}

@keyframes caret-blink {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

/* Scroll Reveal Classes */
.reveal {
  opacity: 0;
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-fade-in.revealed {
  opacity: 1;
}

.reveal-slide-left {
  transform: translateX(-40px);
}

.reveal-slide-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-slide-right {
  transform: translateX(40px);
}

.reveal-slide-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-zoom-in {
  transform: scale(0.9);
}

.reveal-zoom-in.revealed {
  opacity: 1;
  transform: scale(1);
}

/* Skill Progress Bars */
.progress-bar-container {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 9999px;
  overflow: hidden;
  height: 8px;
}

.progress-bar-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 9999px;
  transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Mobile Navigation Sliding Sidebar Drawer */
#mobile-sidebar {
  transform: translateX(-100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#mobile-sidebar.open {
  transform: translateX(0);
}

/* Nav Item Underline Animation */
.nav-link {
  position: relative;
  transition: color 0.3s;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: width 0.3s ease;
}

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

.nav-link.active {
  color: var(--accent);
}
