/* Modern CSS Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #333;
  overflow-x: hidden;
  position: relative;
  width: 100%;
  max-width: 100vw;
}

/* Navbar Styles */
#navbar {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#navbar .bg-white\/95 {
  background-color: rgba(255, 255, 255, 0.95);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Navbar scroll states */
#navbar.scrolled {
  top: 1rem !important;
}

#navbar.scrolled .bg-white\/95 {
  background-color: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.8) !important;
}

/* 3D Navigation Links */
.nav-link-3d {
  transform-style: preserve-3d;
  perspective: 1000px;
  position: relative;
  z-index: 1;
}

.nav-link-3d:hover {
  transform: translateZ(15px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.nav-link-3d.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(147, 51, 234, 0.1));
  color: #3b82f6;
  font-weight: 600;
}

/* Mobile Menu Button Active State */
#mobileMenuBtn.active {
  transform: rotate(90deg);
}

/* Particles Animation */
.particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  animation: float 12s infinite linear;
  opacity: 0.7;
}

@keyframes float {
  0% {
    transform: translateY(0px) rotate(0deg) scale(1);
    opacity: 0.7;
  }
  25% {
    transform: translateY(-20px) rotate(90deg) scale(1.1);
    opacity: 1;
  }
  50% {
    transform: translateY(10px) rotate(180deg) scale(0.9);
    opacity: 0.5;
  }
  75% {
    transform: translateY(-15px) rotate(270deg) scale(1.05);
    opacity: 0.8;
  }
  100% {
    transform: translateY(0px) rotate(360deg) scale(1);
    opacity: 0.7;
  }
}

/* Mobile Menu Styles */
#mobileMenu {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#mobileMenu.visible {
  opacity: 1;
  visibility: visible;
}

#mobileMenu .w-80 {
  width: 20rem;
}

/* Smooth transitions for mobile menu */
#mobileMenu .w-80.translate-x-0 {
  transform: translateX(0);
}

#mobileMenu .w-80.translate-x-full {
  transform: translateX(100%);
}

/* Page Container - Prevent horizontal overflow */
.page-container {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  position: relative;
}

/* Ensure all sections stay within viewport */
section, main {
  max-width: 100vw;
  overflow-x: hidden;
}

/* Fix for horizontal scrolling issues */
body.gsap-pin-spacer {
  overflow-x: hidden !important;
}

.gsap-pin-spacer {
  overflow-x: hidden !important;
}

/* Custom Animations */
@keyframes animate-spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg) scale(1); }
  25% { transform: translateY(-20px) rotate(2deg) scale(1.05); }
  50% { transform: translateY(10px) rotate(-1deg) scale(0.95); }
  75% { transform: translateY(-15px) rotate(1deg) scale(1.02); }
}

@keyframes pulse-glow {
  0%, 100% { 
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.4), 0 0 60px rgba(139, 92, 246, 0.2);
    transform: scale(1);
  }
  50% { 
    box-shadow: 0 0 50px rgba(59, 130, 246, 0.8), 0 0 100px rgba(139, 92, 246, 0.4);
    transform: scale(1.05);
  }
}

@keyframes text-reveal {
  0% { 
    background-position: -100% 0;
    opacity: 0;
    transform: translateY(30px);
  }
  50% { 
    opacity: 1;
    transform: translateY(0);
  }
  100% { 
    background-position: 100% 0;
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-up-stagger {
  0% { 
    opacity: 0;
    transform: translateY(50px) scale(0.9);
  }
  100% { 
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes bounce-in {
  0% {
    opacity: 0;
    transform: scale(0.3) translateY(50px);
  }
  50% {
    opacity: 1;
    transform: scale(1.1) translateY(-10px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes particle-flow {
  0% { transform: translateX(-10px) translateY(-10px); }
  25% { transform: translateX(10px) translateY(-5px); }
  50% { transform: translateX(5px) translateY(10px); }
  75% { transform: translateX(-5px) translateY(5px); }
  100% { transform: translateX(-10px) translateY(-10px); }
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% {
    background-position: 100% 50%;
  }
  to {
    background-position: 0% 50%;
  }
}

/* Animation Classes */
.animate-float { animation: float 8s ease-in-out infinite; }
.animate-float-delayed { animation: float 8s ease-in-out infinite 2s; }
.animate-float-delayed-2 { animation: float 8s ease-in-out infinite 4s; }
.animate-pulse-glow { animation: pulse-glow 3s ease-in-out infinite; }
.animate-gradient { 
    background-size: 400% 400%;
    animation: gradient-shift 6s ease infinite;
}
.animate-text-reveal { animation: text-reveal 2.5s ease-out forwards; }
.animate-slide-up-1 { animation: slide-up-stagger 0.8s ease-out forwards 0.2s; opacity: 0; }
.animate-slide-up-2 { animation: slide-up-stagger 0.8s ease-out forwards 0.4s; opacity: 0; }
.animate-slide-up-3 { animation: slide-up-stagger 0.8s ease-out forwards 0.6s; opacity: 0; }
.animate-slide-up-4 { animation: slide-up-stagger 0.8s ease-out forwards 0.8s; opacity: 0; }
.animate-slide-up-5 { animation: slide-up-stagger 0.8s ease-out forwards 1s; opacity: 0; }
.animate-bounce-in { animation: bounce-in 1s ease-out forwards; }

/* Utility Classes */
.animate-spin-slow {
  animation: animate-spin-slow 8s linear infinite;
}

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

.animate-pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

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

/* Glass Morphism Effect */
.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-dark {
  background: rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}



/* Card Hover Effects */
.card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.card-hover:hover {
  transform: translateY(-10px) rotateX(5deg);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* Timeline Styles */
.timeline-item {
  position: relative;
  transition: all 0.3s ease;
}

.timeline-item:hover {
  transform: scale(1.02);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -50px;
  top: 50%;
  width: 12px;
  height: 12px;
  background: linear-gradient(45deg, #3b82f6, #8b5cf6);
  border-radius: 50%;
  transform: translateY(-50%);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

/* Project Card Enhancements */
.project-card {
  background: linear-gradient(145deg, #ffffff, #f8fafc);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.5s;
}

.project-card:hover::before {
  left: 100%;
}

.project-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Skills Progress Bars */
.skill-bar {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.1);
}

.skill-progress {
  height: 100%;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  transition: width 2s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-progress::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(255, 255, 255, 0.2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.2) 75%, transparent 75%);
  background-size: 20px 20px;
  animation: move-stripes 1s linear infinite;
}

@keyframes move-stripes {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 20px 0;
  }
}

/* Scroll Indicator */
.scroll-indicator {
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* Loading Animation */
.loader {
  background: linear-gradient(45deg, #3b82f6, #8b5cf6, #ec4899, #f59e0b);
  background-size: 400% 400%;
  animation: gradient-shift 2s ease infinite;
}

/* Work Experience Section */
.work-experience-section {
  position: relative;
  overflow: hidden;
  padding: 80px 0;
}

/* Horizontal Scroll Container */
.variants-sticky {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  padding: 2rem 0;
}

.variants-track {
  display: flex;
  gap: 2rem;
  padding: 1rem;
  width: max-content;
  will-change: transform;
}

/* Card Styles */
.variant-panel {
  flex: 0 0 auto;
  width: 80vw;
  max-width: 400px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.variant-content {
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

.variant-visual {
  position: relative;
  overflow: hidden;
  height: 200px;
}

.variant-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.variant-info {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.variant-info h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #1f2937;
}

.variant-info h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.variant-info p {
  color: #4b5563;
  margin-bottom: 1rem;
  line-height: 1.5;
  flex-grow: 1;
}

/* Responsive Adjustments */
@media (min-width: 768px) {
  .variant-panel {
    width: 40vw;
  }
}

@media (min-width: 1024px) {
  .variants-track {
    gap: 2.5rem;
    padding: 2rem;
  }
  
  .variant-panel {
    width: 30vw;
  }
}

/* Animation Classes */
.variant-panel.is-active {
  transform: translateY(-10px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.variant-panel:hover .variant-visual img {
  transform: scale(1.1);
}

.variant-panel:hover .variant-content {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.work-experience-track {
  display: flex;
  width: max-content;
  will-change: transform;
  padding: 0 1rem;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.work-card {
  position: relative;
  margin-right: 2rem;
  flex: 0 0 auto;
  transition: all 0.3s ease;
  will-change: transform;
  cursor: grab;
}

.work-card:active {
  cursor: grabbing;
}

/* Hide scrollbar but keep functionality */
.work-experience-container::-webkit-scrollbar {
  display: none;
}

.work-experience-container {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Navigation Buttons */
#prevBtn, #nextBtn {
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

#prevBtn:hover, #nextBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

#prevBtn:active, #nextBtn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .work-card {
    margin-right: 1.5rem;
    width: 280px;
  }
  
  .work-experience-track {
    padding: 0 0.5rem;
  }
}

/* Animation for work cards */
.work-card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.work-card.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Gradient overlay for scroll indication */
.work-experience-container::before,
.work-experience-container::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100px;
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.3s ease;
}

.work-experience-container::before {
  left: 0;
  background: linear-gradient(90deg, rgba(236, 253, 255, 0.8) 0%, rgba(236, 253, 255, 0) 100%);
  opacity: 0;
}

.work-experience-container::after {
  right: 0;
  background: linear-gradient(270deg, rgba(236, 253, 255, 0.8) 0%, rgba(236, 253, 255, 0) 100%);
  opacity: 1;
}

.work-experience-container.scroll-start::before {
  opacity: 0;
}

.work-experience-container.scroll-start::after {
  opacity: 1;
}

.work-experience-container.scroll-end::before {
  opacity: 1;
}

.work-experience-container.scroll-end::after {
  opacity: 0;
}

.work-experience-container.scroll-middle::before,
.work-experience-container.scroll-middle::after {
  opacity: 1;
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 768px) {
  /* Hero Section Mobile */
  .hero-title {
    font-size: 2.5rem !important;
    line-height: 1.1 !important;
  }
  
  .hero-subtitle {
    font-size: 1.5rem !important;
  }
  
  .hero-description {
    font-size: 1rem !important;
    padding: 0 1rem;
  }
  
  /* Navbar Mobile */
  #navbar {
    top: 1rem !important;
    left: 1rem !important;
    right: 1rem !important;
    transform: none !important;
    width: auto !important;
  }
  
  #navbar .bg-white\/95 {
    padding: 0.75rem 1rem !important;
  }
  
  /* Mobile Menu Improvements */
  #mobileMenu .w-80 {
    width: 100vw !important;
    max-width: 350px !important;
  }
  
  /* Section Padding */
  .section-padding {
    padding: 3rem 1rem;
  }
  
  /* Card Grid */
  .card-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  /* Work Experience Mobile */
  .work-card {
    flex: 0 0 280px !important;
    margin-right: 1rem !important;
  }
  
  /* Profile Image Mobile */
  .hero-profile .w-36 {
    width: 8rem !important;
    height: 8rem !important;
  }
  
  /* Button Spacing Mobile */
  .hero-cta {
    flex-direction: column !important;
    gap: 1rem !important;
  }
  
  .hero-cta a {
    width: 100% !important;
    max-width: 280px !important;
  }
}

@media (max-width: 640px) {
  .hero-title {
    font-size: 2rem !important;
  }
  
  .hero-subtitle {
    font-size: 1.25rem !important;
  }
  
  .text-responsive {
    font-size: 0.875rem;
  }
  
  /* Extra small screens */
  #navbar {
    top: 0.5rem !important;
    left: 0.5rem !important;
    right: 0.5rem !important;
  }
  
  .hero-profile .w-36 {
    width: 6rem !important;
    height: 6rem !important;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.75rem !important;
  }
  
  .hero-subtitle {
    font-size: 1.125rem !important;
  }
  
  .hero-description {
    font-size: 0.875rem !important;
  }
  
  /* Very small screens */
  #navbar .bg-white\/95 {
    padding: 0.5rem 0.75rem !important;
  }
  
  .hero-cta a {
    padding: 0.75rem 1.5rem !important;
    font-size: 0.875rem !important;
  }
}

/* Touch Improvements */
@media (hover: none) and (pointer: coarse) {
  .nav-link-3d:hover {
    transform: none !important;
    box-shadow: none !important;
  }
  
  .card-hover:hover {
    transform: none !important;
  }
  
  /* Better touch targets */
  .mobile-nav-link {
    min-height: 48px !important;
    display: flex !important;
    align-items: center !important;
  }
  
  button, .btn {
    min-height: 44px !important;
    min-width: 44px !important;
  }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
  #home {
    min-height: 100vh !important;
    padding-top: 1rem !important;
  }
  
  .hero-profile {
    margin-bottom: 2rem !important;
  }
  
  .hero-profile .w-36 {
    width: 5rem !important;
    height: 5rem !important;
  }
  
  .hero-title {
    font-size: 1.5rem !important;
    margin-bottom: 1rem !important;
  }
  
  .hero-subtitle {
    font-size: 1rem !important;
    margin-bottom: 1rem !important;
  }
  
  .hero-description {
    font-size: 0.875rem !important;
    margin-bottom: 1.5rem !important;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .auto-dark {
    background-color: #1f2937;
    color: #f9fafb;
  }
}

/* Dark Mode Styles */
.dark {
  color-scheme: dark;
}

.dark body {
  background-color: #0f172a;
  color: #f1f5f9;
}

/* Dark Mode Navbar */
.dark #navbar .bg-white\/95 {
  background-color: rgba(30, 41, 59, 0.95) !important;
  border-color: rgba(71, 85, 105, 0.5) !important;
}

.dark #navbar.scrolled .bg-white\/95 {
  background-color: rgba(30, 41, 59, 0.98) !important;
  border-color: rgba(71, 85, 105, 0.8) !important;
}

/* Dark Mode Navigation Links */
.dark .nav-link-3d.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(147, 51, 234, 0.2));
  color: #60a5fa;
}

/* Dark Mode Mobile Menu */
.dark #mobileMenu {
  background-color: rgba(0, 0, 0, 0.7);
}

/* Dark Mode Cards */
.dark .project-card,
.dark .service-card,
.dark .work-card {
  background: linear-gradient(145deg, #1e293b, #334155);
  border-color: #475569;
  color: #f1f5f9;
}

.dark .project-card:hover,
.dark .service-card:hover,
.dark .work-card:hover {
  background: linear-gradient(145deg, #334155, #475569);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Dark Mode Glass Effects */
.dark .glass {
  background: rgba(30, 41, 59, 0.3);
  border-color: rgba(71, 85, 105, 0.3);
}

.dark .glass-dark {
  background: rgba(15, 23, 42, 0.3);
  border-color: rgba(51, 65, 85, 0.3);
}

/* Dark Mode Scrollbar */
.dark ::-webkit-scrollbar-track {
  background: #1e293b;
}

.dark ::-webkit-scrollbar-thumb {
  background: linear-gradient(45deg, #3b82f6, #8b5cf6);
}

.dark ::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(45deg, #2563eb, #7c3aed);
}

/* Dark Mode Text Colors */
.dark h1, .dark h2, .dark h3, .dark h4, .dark h5, .dark h6 {
  color: #f1f5f9;
}

.dark p {
  color: #cbd5e1;
}

/* Dark Mode Buttons */
.dark .spotlight-btn {
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
}

.dark .spotlight-btn:hover {
  box-shadow: 0 15px 35px rgba(147, 51, 234, 0.5);
}

/* Dark Mode Form Elements */
.dark input, .dark textarea, .dark select {
  background-color: #1e293b;
  border-color: #475569;
  color: #f1f5f9;
}

.dark input:focus, .dark textarea:focus, .dark select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Dark Mode Transitions */
* {
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* Mobile Responsive Dark Mode */
@media (max-width: 768px) {
  .dark .mobile-nav-link {
    color: #cbd5e1;
  }
  
  .dark .mobile-nav-link:hover {
    color: #60a5fa;
    background-color: rgba(59, 130, 246, 0.1);
  }
}

/* Performance Optimizations */
.gpu-accelerated {
  transform: translateZ(0);
  will-change: transform;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus States */
.focus-visible:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

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

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(45deg, #3b82f6, #8b5cf6);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(45deg, #2563eb, #7c3aed);
}

.nav-links a {
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: #bfdbfe;
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

@media (max-width: 768px) {
  .nav-links {
    background: linear-gradient(to right, #2563eb, #1d4ed8);
  }
}

.gradient-text {
  background: linear-gradient(to right, #2563eb, #1d4ed8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 1s ease-out forwards;
}

.project-card {
  transition: transform 0.3s ease;
}

.project-card:hover {
  transform: translateY(-10px);
}

.service-card {
  transition: all 0.3s ease;
}

.service-card:hover {
  background: linear-gradient(to bottom right, #2563eb08, #1d4ed808);
  border-color: #2563eb;
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #2563eb;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #1d4ed8;
}
html {
  scroll-behavior: smooth;
}

.section-container {
  min-height: 100vh;
  padding: 100px 0;
}

.gradient-text {
  background: linear-gradient(to right, #2563eb, #1d4ed8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.project-card {
  transition: transform 0.3s ease;
}

.project-card:hover {
  transform: translateY(-10px);
}

.service-card {
  transition: all 0.3s ease;
}

.service-card:hover {
  background: linear-gradient(to bottom right, #2563eb08, #1d4ed808);
  border-color: #2563eb;
}

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

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #2563eb;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #1d4ed8;
}

/* Work Experience Section */
.work-experience-container {
  position: relative;
  width: 100%;
  padding: 20px 0;
  overflow: hidden;
}

.work-experience-track {
  display: flex;
  gap: 2rem;
  padding: 1rem 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 2rem 1rem;
  margin: 0 -1rem;
  scrollbar-width: none; /* Hide scrollbar for Firefox */
}

.work-experience-track::-webkit-scrollbar {
  display: none; /* Hide scrollbar for Chrome/Safari/Edge */
}

.work-card {
  flex: 0 0 350px;
  scroll-snap-align: start;
  transition: all 0.3s ease;
  margin: 0 0.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  overflow: hidden;
  background: white;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.work-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.work-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.work-card:hover img {
  transform: scale(1.05);
}

.work-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #1f2937;
}

.work-card p {
  color: #4b5563;
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

/* Navigation Buttons */
#prevBtn,
#nextBtn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  border: none;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.3s ease;
}

#prevBtn {
  left: 1rem;
}

#nextBtn {
  right: 1rem;
}

#prevBtn:hover,
#nextBtn:hover {
  background: #3b82f6;
  color: white;
  transform: translateY(-50%) scale(1.1);
}

#prevBtn:disabled,
#nextBtn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .work-card {
    flex: 0 0 280px;
  }
  
  #prevBtn,
  #nextBtn {
    width: 36px;
    height: 36px;
  }
}

/* Project card hover effects */
.group:hover img {
  transform: scale(1.1);
}

.group img {
  transition: transform 0.5s ease;
}

.group .absolute {
  transition: opacity 0.3s ease;
}

/* Fade in animation for project info */
.group:hover .absolute {
  opacity: 1;
}

/* Smooth transitions for all hover effects */
.transition-all {
  transition: all 0.3s ease;
}

/* Ensure images cover their container properly */
.object-cover {
  object-fit: cover;
}

/* Ensure proper overflow handling */
.overflow-hidden {
  overflow: hidden;
}

/* Work Experience Section - GSAP Horizontal Scroll */
#work-experience {
  position: relative;
  width: 100%;
}

#work-experience-main {
  position: relative;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

/* Prevent vertical scroll during horizontal scroll */
body.horizontal-scrolling {
  overflow-y: hidden !important;
  overflow-x: hidden !important;
}

/* Ensure mobile menu works properly */
#mobileMenu {
  z-index: 9999;
}

#mobileMenu .w-80 {
  transition: transform 0.3s ease-in-out;
}

#panels-container {
  display: flex;
  width: 400vw; /* 4 panels x 100vw */
  height: 100vh;
  will-change: transform;
  flex-wrap: nowrap;
  position: relative;
}

.panel {
  width: 100vw; /* Each panel takes full viewport width */
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  box-sizing: border-box;
  position: relative;
  flex-shrink: 0;
  backface-visibility: hidden;
  transform: translateZ(0);
  opacity: 1 !important;
  visibility: visible !important;
}

.panel .container {
  max-width: 1200px;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
}

.panel .grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  width: 100%;
}

.panel .text-content,
.panel .image-content {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
  position: relative;
  z-index: 2;
}

.panel .image-content img {
  max-width: 100%;
  height: auto;
  border-radius: 1rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Ensure all panel content is fully visible */
.panel * {
  opacity: 1 !important;
  visibility: visible !important;
}

.panel .text-content > *,
.panel .image-content > * {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}

/* Responsive adjustments for panels */
@media (max-width: 1024px) {
  .panel {
    padding: 1.5rem;
  }
  
  .panel .grid {
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .panel {
    padding: 1rem;
  }
  
  .panel .container {
    flex-direction: column;
    text-align: center;
    justify-content: center;
  }
  
  .panel .grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 500px;
    margin: 0 auto;
  }
  
  .panel .text-content {
    order: 2;
  }
  
  .panel .image-content {
    order: 1;
  }
  
  .panel .image-content img {
    max-height: 300px;
    width: auto;
  }
}

@media (max-width: 480px) {
  .panel {
    padding: 0.5rem;
  }
  
  .panel .grid {
    gap: 1.5rem;
  }
  
  .panel h3 {
    font-size: 2.5rem !important;
  }
}

/* Text shadow utility */
.text-shadow {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Smooth scrolling behavior */
html {
  scroll-behavior: smooth;
}

/* Ensure proper overflow handling */
body {
  overflow-x: hidden;
}

html {
  overflow-x: hidden;
}

/* Prevent horizontal scrolling issues */
* {
  box-sizing: border-box;
}

.page-container {
  overflow-x: hidden;
  width: 100%;
}

/* Work Experience Section - Milk Variants Style (Legacy) */
.work-experience-section {
  position: relative;
  overflow: hidden;
}

.variants-sticky {
  position: relative;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.variants-track {
  display: flex;
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 400%;
  will-change: transform;
}

.variant-panel {
  position: relative;
  width: 100vw;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  box-sizing: border-box;
}

.variant-content {
  display: flex;
  max-width: 1200px;
  width: 100%;
  height: 80vh;
  background: white;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.variant-visual {
  flex: 1;
  position: relative;
  overflow: hidden;
  min-width: 0;
}

.variant-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.variant-info {
  flex: 1;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: white;
  position: relative;
  z-index: 2;
}

.variant-tag {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 2px solid;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.variant-name {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.company-info {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
}

.company-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  margin-right: 1rem;
  flex-shrink: 0;
}

.company-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 0.25rem 0;
}

.company-location {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
}

.variant-description {
  font-size: 1.125rem;
  line-height: 1.7;
  color: #4b5563;
  margin-bottom: 2.5rem;
}

.skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: auto;
}

.skill-tag {
  padding: 0.4rem 0.9rem;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .variant-content {
    height: auto;
    max-height: 80vh;
    overflow-y: auto;
    flex-direction: column;
  }
  
  .variant-visual {
    height: 40vh;
    min-height: 300px;
  }
  
  .variant-info {
    padding: 2rem;
  }
  
  .variant-name {
    font-size: 2.25rem;
  }
}

@media (max-width: 640px) {
  .variant-panel {
    padding: 1rem;
  }
  
  .variant-info {
    padding: 1.5rem;
  }
  
  .variant-name {
    font-size: 1.875rem;
  }
  
  .variant-description {
    font-size: 1rem;
  }
  
  .variant-tag {
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem;
  }
}
/* Custom CSS to enable horizontal scrolling layout */
/* We need to ensure the track is a flex container and panels have full viewport width */
.variants-track {
  display: flex;
  height: 100vh; /* Make track as tall as the viewport */
  align-items: center; /* Center panels vertically */
}

.variant-panel {
  width: 100vw; /* Each panel takes full viewport width */
  flex-shrink: 0; /* Prevent panels from shrinking */
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem 2rem; /* Padding for smaller screens */
}

/* The main content card within a panel */
.variant-content {
  display: grid;
  grid-template-columns: 1fr; /* Single column on mobile */
  gap: 2rem;
  align-items: center;
  max-width: 1100px; /* Max width of the content card */
  width: 100%;
  margin: 0 auto;
  background-color: white;
  border-radius: 1.5rem; /* rounded-3xl */
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1); /* shadow-xl */
  padding: 2rem;
  overflow: hidden;
  border: 1px solid #e5e7eb; /* border-gray-200 */
  transition: box-shadow 0.3s ease-in-out; /* Add transition for smooth shadow effect */
}

/* On medium screens and up, switch to two columns */
@media (min-width: 768px) {
  .variant-panel {
      padding: 2rem 4rem;
  }
  .variant-content {
      grid-template-columns: repeat(2, 1fr);
      padding: 3rem;
  }
}

.variant-visual img {
  width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: cover;
  border-radius: 1rem; /* rounded-xl */
}

/* Utility classes from the original HTML for reference */
.company-info { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.company-logo { width: 40px; height: 40px; border-radius: 9999px; display: inline-flex; align-items: center; justify-content: center; font-weight: bold; }
.company-name { font-weight: 600; color: #1f2937; }
.company-location { font-size: 0.875rem; color: #6b7280; }
.variant-tag { border-width: 1px; border-radius: 9999px; padding: 0.25rem 0.75rem; font-size: 0.75rem; font-weight: 600; display: inline-block; margin-bottom: 1rem; }
.variant-name { font-size: 2.25rem; font-weight: bold; margin-bottom: 1rem; line-height: 1.1; }
.variant-description { color: #4b5563; margin-bottom: 1.5rem; }
.skills-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.skill-tag { border-radius: 9999px; padding: 0.5rem 1rem; font-size: 0.875rem; font-weight: 500; }

/* Style for the active panel */
.variant-panel.active .variant-content {
   box-shadow: 0 25px 50px -12px rgba(99, 102, 241, 0.25); /* shadow-xl shadow-indigo-200 */
}

/* Mobile-First Utilities */
.mobile-container {
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .mobile-container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .mobile-container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* Safe Area for iOS */
.safe-area-top {
  padding-top: env(safe-area-inset-top);
}

.safe-area-bottom {
  padding-bottom: env(safe-area-inset-bottom);
}

.safe-area-left {
  padding-left: env(safe-area-inset-left);
}

.safe-area-right {
  padding-right: env(safe-area-inset-right);
}

/* Mobile Navigation Enhancements */
.mobile-nav-enhanced {
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
}

/* Smooth Scrolling for Mobile */
@media (max-width: 768px) {
  html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }
  
  body {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
  }
}

/* Mobile Dark Mode Toggle Animation */
.dark-mode-toggle {
  position: relative;
  overflow: hidden;
}

.dark-mode-toggle::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.3) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease;
  border-radius: 50%;
}

.dark-mode-toggle:active::before {
  width: 100px;
  height: 100px;
}

/* Mobile Menu Animation Improvements */
@media (max-width: 768px) {
  #mobileMenu .w-80 {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  .mobile-nav-link {
    transform: translateX(20px);
    opacity: 0;
    transition: all 0.3s ease;
  }
  
  #mobileMenu.visible .mobile-nav-link {
    transform: translateX(0);
    opacity: 1;
  }
  
  #mobileMenu.visible .mobile-nav-link:nth-child(1) { transition-delay: 0.1s; }
  #mobileMenu.visible .mobile-nav-link:nth-child(2) { transition-delay: 0.15s; }
  #mobileMenu.visible .mobile-nav-link:nth-child(3) { transition-delay: 0.2s; }
  #mobileMenu.visible .mobile-nav-link:nth-child(4) { transition-delay: 0.25s; }
  #mobileMenu.visible .mobile-nav-link:nth-child(5) { transition-delay: 0.3s; }
  #mobileMenu.visible .mobile-nav-link:nth-child(6) { transition-delay: 0.35s; }
}

/* Mobile Performance Optimizations */
.mobile-optimized {
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Mobile Gesture Support */
.swipe-area {
  touch-action: pan-x;
}

/* Mobile Loading States */
.mobile-loading {
  pointer-events: none;
  opacity: 0.7;
}

.mobile-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #3b82f6;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Mobile Focus States */
@media (max-width: 768px) {
  button:focus,
  a:focus,
  input:focus,
  textarea:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
  }
}

/* Mobile Typography Scaling */
@media (max-width: 768px) {
  .text-scale-mobile {
    font-size: clamp(0.875rem, 2.5vw, 1.125rem);
  }
  
  .heading-scale-mobile {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
  }
}

/* Mobile Card Improvements */
@media (max-width: 768px) {
  .card-mobile {
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  
  .card-mobile:active {
    transform: scale(0.98);
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.1);
  }
}

/* Mobile Bottom Navigation Support */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding: 0.5rem;
  z-index: 1000;
}

.dark .mobile-bottom-nav {
  background: rgba(30, 41, 59, 0.95);
  border-top-color: rgba(71, 85, 105, 0.3);
}

/* Mobile Accessibility */
@media (prefers-reduced-motion: reduce) {
  .mobile-nav-link {
    transition: none !important;
  }
  
  .dark-mode-toggle::before {
    transition: none !important;
  }
}

/* Mobile Print Styles */
@media print {
  #navbar,
  #mobileMenu,
  .mobile-bottom-nav {
    display: none !important;
  }
}