 /* Custom scrollbar */
 ::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background-color: hsl(0, 0%, 5%);
}

.light ::-webkit-scrollbar-track {
  background-color: hsl(0, 0%, 95%);
  border: 2px ;
}

::-webkit-scrollbar-thumb {
  background-color: hsl(0, 0%, 50%);
  border-radius: 5px;
}

.light ::-webkit-scrollbar-thumb {
  background-color: hsl(0, 0%, 70%);
}

::-webkit-scrollbar-thumb:hover {
  background-color: hsl(0, 0%, 60%);
}

.light ::-webkit-scrollbar-thumb:hover {
  background-color: hsl(0, 0%, 60%);
}

/* Smooth transitions */
* {
  scroll-behavior: smooth;
  transition: .2s;
}

nav {
  position: sticky;
  top: 0;
  will-change: transform;
  backface-visibility: hidden;
}

/* Ensure theme transitions are smooth */
.theme-transition {
  transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease;
}

/* Hide scrollbar for sidebar toggle animation */
.sidebar-closed {
  transform: translateX(-100%);
}

.sidebar-open {
  transform: translateX(0);
}

/* Project card hover effect */
.project-card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.project-card-hover:hover {
  transform: scale(1.02);
}

/* Primary button animation */
.btn-primary-hover:hover {
  box-shadow: 0 6px 30px 1px hsl(20, 100%, 25%);
}

/* Secondary button animation */
.btn-secondary-hover:hover {
  box-shadow: 0 6px 30px 1px hsl(20, 100%, 25%);
}

/* Active nav link */
.active-nav-link {
  border-bottom: 2px solid hsl(25, 100%, 45%);
  color: hsl(25, 100%, 45%);
}

/* Theme toggle switch */
.theme-switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 30px;
}

.theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.theme-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: hsl(0, 0%, 20%);
  transition: .4s;
  border-radius: 34px;
}

.theme-slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .theme-slider {
  background-color: hsl(25, 100%, 45%);
}

input:checked + .theme-slider:before {
  transform: translateX(30px);
}

.light .theme-slider {
  background-color: hsl(0, 0%, 70%);
}