/* ========================================
   Saurabh Vishwakarma - Premium Portfolio Styles
   Modern Dark Tech Theme with Neon Accents
   ======================================== */

:root {
  --primary: #00E5FF;
  --secondary: #7C3AED;
  --accent: #00FFB2;
  --dark: #0B0F19;
  --surface: #121826;
  --surface-2: #1A2233;
  --text: #FFFFFF;
  --text-muted: #A0AEC0;
  --border: rgba(255, 255, 255, 0.1);
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--surface);
}

/* Global fix: Ensure all buttons, links and form elements are always clickable */
a, button, .btn-primary, .btn-secondary, .filter-btn, 
input, textarea, select, [role="button"] {
  pointer-events: auto !important;
  position: relative;
}

a, button, .btn-primary, .btn-secondary, .filter-btn {
  cursor: pointer;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* Base & Typography */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system_ui, sans-serif;
  background-color: var(--dark);
  color: var(--text);
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Poppins', 'Inter', system_ui, sans-serif;
  font-weight: 700;
  line-height: 1.1;
}

.section-title {
  position: relative;
  display: inline-block;
  font-size: 2.25rem;
  font-weight: 800;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(to right, var(--primary), var(--accent));
  border-radius: 3px;
}

/* Glassmorphism */
.glass {
  background: rgba(18, 24, 38, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.glass-hover:hover {
  background: rgba(26, 34, 51, 0.95);
  border-color: rgba(0, 229, 255, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Neon Effects */
.neon-text {
  text-shadow: 
    0 0 5px var(--primary),
    0 0 10px var(--primary),
    0 0 20px var(--primary);
}

.neon-cyan {
  box-shadow: 
    0 0 5px var(--primary),
    0 0 15px var(--primary),
    0 0 30px rgba(0, 229, 255, 0.3);
}

.neon-purple {
  box-shadow: 
    0 0 5px var(--secondary),
    0 0 15px var(--secondary);
}

/* Buttons */
.btn-primary {
  background: var(--primary);
  color: var(--dark);
  font-weight: 700;
  padding: 0.875rem 2rem;
  border-radius: 9999px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  letter-spacing: 0.025em;
}

.btn-primary:hover {
  background: var(--accent);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 15px -3px rgb(0 229 255 / 0.3), 0 4px 6px -4px rgb(0 229 255 / 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  font-weight: 600;
  padding: 0.875rem 2rem;
  border-radius: 9999px;
  border: 2px solid var(--primary);
  transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.btn-secondary:hover {
  background: var(--primary);
  color: var(--dark);
  transform: translateY(-2px);
}

/* Skill Bars */
.skill-bar {
  height: 8px;
  background: var(--surface-2);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

.skill-bar-inner {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 9999px;
  width: 0;
  transition: width 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.skill-bar-inner::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,0.4),
    transparent
  );
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(400%); }
}

/* Circular Progress (optional enhancement) */
.progress-circle {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: conic-gradient(var(--primary) 0deg, var(--surface-2) 0deg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background 1.2s ease;
}

.progress-circle::before {
  content: '';
  width: 82px;
  height: 82px;
  background: var(--surface);
  border-radius: 50%;
  position: absolute;
}

/* Timeline */
.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 100%;
  background: linear-gradient(to bottom, var(--primary), var(--secondary));
  border-radius: 3px;
  top: 0;
}

.timeline-item {
  position: relative;
  width: 50%;
  padding: 2rem 2.5rem;
}

.timeline-item:nth-child(odd) {
  left: 0;
  padding-right: 3rem;
}

.timeline-item:nth-child(even) {
  left: 50%;
  padding-left: 3rem;
}

.timeline-dot {
  position: absolute;
  top: 2.5rem;
  width: 20px;
  height: 20px;
  background: var(--dark);
  border: 3px solid var(--primary);
  border-radius: 50%;
  z-index: 10;
  box-shadow: 0 0 0 4px rgba(0, 229, 255, 0.2);
  transition: all 0.3s ease;
}

.timeline-item:nth-child(odd) .timeline-dot {
  right: -10px;
}

.timeline-item:nth-child(even) .timeline-dot {
  left: -10px;
}

.timeline-item:hover .timeline-dot {
  background: var(--primary);
  box-shadow: 0 0 0 6px rgba(0, 229, 255, 0.3);
  transform: scale(1.1);
}

.timeline-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem;
  transition: all 0.3s ease;
}

.timeline-content:hover {
  border-color: var(--primary);
  box-shadow: 0 10px 30px -15px rgba(0, 229, 255, 0.2);
}

/* Project Cards */
.project-card {
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.project-card:hover {
  transform: translateY(-12px) scale(1.01);
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.4);
}

.project-card .project-image {
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.project-card:hover .project-image img {
  transform: scale(1.08);
}

.project-card .tech-tag {
  font-size: 0.7rem;
  padding: 0.2rem 0.65rem;
  background: rgba(0, 229, 255, 0.1);
  color: var(--primary);
  border-radius: 9999px;
  border: 1px solid rgba(0, 229, 255, 0.3);
  transition: all 0.2s ease;
}

.project-card:hover .tech-tag {
  background: rgba(0, 229, 255, 0.2);
  border-color: var(--primary);
}

/* Modal */
.modal {
  animation: modalPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalPop {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(40px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Testimonial Swiper */
.testimonial-card {
  background: var(--surface);
  border: 1px solid var(--border);
}

.swiper-pagination-bullet {
  background: var(--primary) !important;
  opacity: 0.5;
}

.swiper-pagination-bullet-active {
  opacity: 1;
  background: var(--accent) !important;
}

/* Contact Form */
.form-input {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  transition: all 0.3s ease;
  pointer-events: auto !important;
  position: relative;
  z-index: 30;
  cursor: text;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(0, 229, 255, 0.15);
  outline: none;
  background: var(--surface);
}

.form-input::placeholder {
  color: var(--text-muted);
}

/* Force all interactive elements to be clickable */
button,
.btn-primary,
.btn-secondary,
.filter-btn,
input[type="text"],
input[type="email"],
textarea,
a {
  pointer-events: auto !important;
}

button,
.btn-primary,
.btn-secondary,
.filter-btn {
  cursor: pointer;
}

/* Floating WhatsApp Button */
.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  width: 56px;
  height: 56px;
  background: #25D366;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  box-shadow: 0 10px 15px -3px rgb(37 211 102 / 0.4), 0 4px 6px -4px rgb(37 211 102 / 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.whatsapp-float:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 20px 25px -5px rgb(37 211 102 / 0.4), 0 8px 10px -6px rgb(37 211 102 / 0.4);
}

/* Back to Top */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 5.5rem;
  z-index: 998;
  width: 48px;
  height: 48px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--primary);
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

#back-to-top.show {
  display: flex;
}

#back-to-top:hover {
  background: var(--primary);
  color: var(--dark);
  transform: translateY(-3px);
}

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

/* Navbar */
.navbar {
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background: rgba(11, 15, 25, 0.95);
  backdrop-filter: blur(16px);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

/* Particle Background */
#particles-js {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Hero Profile Image */
.hero-profile {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 4px solid var(--surface);
  box-shadow: 
    0 0 0 8px rgba(0, 229, 255, 0.1),
    0 25px 50px -12px rgb(0 0 0 / 0.5);
}

.hero-profile:hover {
  transform: scale(1.03) rotate(1deg);
}

/* Service Cards with Tilt */
.service-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card .icon-wrapper {
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.service-card:hover .icon-wrapper {
  transform: scale(1.1) rotate(5deg);
  color: var(--primary);
}

/* Filter Buttons */
.filter-btn {
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.2s ease;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--primary);
  color: var(--dark);
  border-color: var(--primary);
  transform: translateY(-1px);
}

/* Toast Notification */
.toast {
  animation: slideUp 0.4s ease forwards;
}

@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
  }
  
  .timeline::before {
    left: 1.25rem !important;
  }
  
  .timeline-item {
    width: 100% !important;
    padding-left: 3rem !important;
    padding-right: 1rem !important;
    margin-bottom: 2rem;
  }
  
  .timeline-item:nth-child(odd),
  .timeline-item:nth-child(even) {
    left: 0 !important;
  }
  
  .timeline-dot {
    left: 0.9rem !important;
    right: auto !important;
    width: 18px !important;
    height: 18px !important;
  }
  
  .section-title {
    font-size: 2rem !important;
  }
  
  .glass {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }
}

/* Loading Animation for images */
img {
  transition: opacity 0.4s ease;
}

img[loading="lazy"] {
  opacity: 0.85;
}

/* Custom Cursor disabled to fix click blocking issues
.cursor-dot {
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 99999;
  mix-blend-mode: difference;
  transition: transform 0.15s ease;
  display: none;
}

@media (pointer: fine) {
  .cursor-dot {
    display: block;
  }
}
*/

/* ========================================
   MOBILE OPTIMIZATION (Extra Polish)
   ======================================== */
@media (max-width: 640px) {
  .section-title {
    font-size: 2rem !important;
  }

  h1 {
    font-size: 2.75rem !important;
    line-height: 1.1 !important;
  }

  .btn-primary, .btn-secondary {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    width: 100%;
    justify-content: center;
  }

  .glass {
    padding: 1.25rem !important;
  }

  .project-card {
    margin-bottom: 1rem;
  }

  .timeline-item {
    padding-left: 2.5rem !important;
  }

  .skill-bar {
    height: 6px;
  }

  /* Better touch targets */
  button, a.btn-primary, a.btn-secondary, .filter-btn {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Form on mobile */
  .form-input {
    padding: 1rem 1.25rem;
    font-size: 1rem;
  }
}

/* Very small phones */
@media (max-width: 380px) {
  .section-title {
    font-size: 1.75rem !important;
  }
}