/* Sidebar Component Styles */
.sidebar {
  background: linear-gradient(180deg, var(--bg-secondary) 0%, #f1f5f9 100%);
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-inner {
  position: relative;
}

.sidebar-inner::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: var(--space-6);
  right: var(--space-6);
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border-color), transparent);
}

/* Profile Section */
.profile-photo {
  position: relative;
}

.profile-photo::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 128px;
  height: 128px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  border-radius: 50%;
  z-index: -1;
  opacity: 0.1;
}

/* Contact Info Enhancements */
.contact-info {
  background-color: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
}

.contact-item {
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-3) 0;
  transition: all var(--transition-fast);
}

.contact-item:last-child {
  border-bottom: none;
}

.contact-item:hover {
  background-color: var(--bg-secondary);
  margin: 0 calc(-1 * var(--space-4));
  padding-left: var(--space-4);
  padding-right: var(--space-4);
  border-radius: var(--radius-base);
}

/* Navigation Enhancements */
.sidebar-nav {
  background-color: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: var(--space-2);
  box-shadow: var(--shadow-sm);
}

.nav-item {
  position: relative;
  transition: all var(--transition-fast);
}

.nav-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: linear-gradient(to bottom, var(--primary-color), var(--accent-color));
  border-radius: var(--radius-full);
  transition: height var(--transition-base);
}

.nav-item:hover::before,
.nav-item.active::before {
  height: 20px;
}

.nav-item.active {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
  color: white;
  box-shadow: var(--shadow-md);
}

/* Skills Preview Enhancements */
.skills-preview {
  background-color: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.skills-preview h3 {
  color: var(--text-primary);
  margin-bottom: var(--space-6);
  text-align: center;
  position: relative;
}

.skills-preview h3::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 2px;
  background: linear-gradient(to right, var(--primary-color), var(--accent-color));
  border-radius: var(--radius-full);
}

.skill-bar {
  position: relative;
}

.skill-progress {
  position: relative;
  overflow: hidden;
}

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

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

/* Social Links Enhancements */
.social-links {
  background-color: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
}

.social-links a {
  position: relative;
  overflow: hidden;
}

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

.social-links a:hover::before {
  left: 100%;
}

/* Download CV Button */
.download-cv {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

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

.download-cv:hover::before {
  left: 100%;
}

.download-cv:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Mobile Sidebar Adjustments */
@media (max-width: 767px) {
  .sidebar {
    background: var(--bg-primary);
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.15);
  }
  
  .sidebar-inner {
    padding: var(--space-8) var(--space-6);
  }
  
  .profile-photo img {
    width: 100px;
    height: 100px;
  }
  
  .profile-name {
    font-size: var(--text-lg);
  }
  
  .profile-title {
    font-size: var(--text-sm);
  }
  
  .contact-info,
  .sidebar-nav,
  .skills-preview,
  .social-links {
    margin-bottom: var(--space-6);
  }
  
  .skills-preview {
    padding: var(--space-4);
  }
  
  .skills-preview h3 {
    font-size: var(--text-base);
    margin-bottom: var(--space-4);
  }
  
  .skill-bar {
    margin-bottom: var(--space-3);
  }
}

/* Scrollbar Styling for Sidebar */
.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

.sidebar::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: var(--radius-full);
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--primary-hover);
}

/* Focus States for Accessibility */
.nav-item:focus,
.contact-item:focus,
.social-links a:focus,
.download-cv:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Animation for sidebar entrance */
@media (prefers-reduced-motion: no-preference) {
  .sidebar {
    animation: slideInLeft 0.5s ease-out;
  }
  
  @keyframes slideInLeft {
    from {
      transform: translateX(-100%);
    }
    to {
      transform: translateX(0);
    }
  }
}

/* Sidebar scrolling state */
.sidebar-scrolling {
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.2s ease;
}

.sidebar-scrolling::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  z-index: 10;
  transition: opacity 0.2s ease;
}

/* Scroll behavior improvements */
.sidebar {
  scroll-behavior: auto; /* Disable smooth scroll to prevent vibration */
  -webkit-overflow-scrolling: touch; /* iOS smooth scrolling */
  overscroll-behavior: contain; /* Prevent scroll chaining */
}

/* Custom scrollbar for better control */
.sidebar::-webkit-scrollbar {
  width: 7px; /* Reduced from 8px by ~12.5% */
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  transition: background 0.2s ease;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

/* Firefox scrollbar */
.sidebar {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

/* Sidebar Extra Content */
.sidebar-extra-content {
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-color);
}

.sidebar-extra-content h4 {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-3);
  margin-top: var(--space-4);
}

.sidebar-extra-content h4:first-child {
  margin-top: 0;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border-color);
}

.stat-item:last-child {
  border-bottom: none;
}

.stat-number {
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  color: var(--primary-color);
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.availability-text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-4);
}

.role-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.role-tag {
  display: inline-block;
  padding: var(--space-1) var(--space-2);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  background-color: var(--primary-light);
  color: var(--primary-color);
  border-radius: var(--radius-sm);
}
