/* css/enhancements.css - Modern visual enhancements */

/*======================================
//--//---> MODERN ENHANCEMENTS
======================================*/

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

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
  width: 10px;
}

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

::-webkit-scrollbar-thumb {
  background: #1e1e1e;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #000000;
}

/*======================================
//--//---> ENHANCED WORK BOX (PORTFOLIO ITEMS)
======================================*/

.work-box {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.work-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.05) 0%,
    rgba(0, 0, 0, 0) 100%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
  pointer-events: none;
}

.work-box:hover::before {
  opacity: 1;
}

.work-box:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.work-box:hover .work-img img {
  transform: scale(1.08);
}

.work-img {
  position: relative;
  overflow: hidden;
  background: #f5f5f5;
}

.work-img img {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

/* Add loading state for images */
.work-img.loading {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/*======================================
//--//---> GLASSMORPHISM EFFECTS
======================================*/

.box-shadow-full {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.box-shadow-full:hover {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.12);
}

/*======================================
//--//---> MODERN BUTTON STYLES
======================================*/

.btn-primary {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50px;
  padding: 12px 32px;
  font-weight: 600;
  letter-spacing: 0.5px;
  background: #000000;
  border: 2px solid #000000;
  color: #ffffff;
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -50%);
  transition:
    width 0.6s,
    height 0.6s;
}

.btn-primary:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  background: #1e1e1e;
  border-color: #1e1e1e;
  color: #ffffff;
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

/*======================================
//--//---> ENHANCED NAVIGATION
======================================*/

.navbar-b {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.navbar-b.navbar-reduce {
  background-color: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.navbar-b .nav-link {
  position: relative;
  transition: all 0.3s ease;
}

.navbar-b .nav-link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: #000000;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(-50%);
}

.navbar-b .nav-link:hover::after,
.navbar-b .nav-link.active::after {
  width: 80%;
}

/*======================================
//--//---> GRADIENT OVERLAYS FOR CATEGORIES
======================================*/

.work-content {
  position: relative;
  background: linear-gradient(to top, #ffffff 0%, #ffffff 100%);
  transition: all 0.3s ease;
}

.work-box:hover .work-content {
  background: linear-gradient(to top, #f8f8f8 0%, #ffffff 100%);
}

/*======================================
//--//---> SCROLL REVEAL ANIMATIONS
======================================*/

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger effect for grid items */
.work-box.animate-on-scroll {
  animation-delay: calc(var(--item-index, 0) * 0.1s);
}

/*======================================
//--//---> CONTACT FORM ENHANCEMENTS
======================================*/

.form-control {
  border-radius: 8px;
  border: 2px solid #e0e0e0;
  transition: all 0.3s ease;
  padding: 12px 16px;
}

.form-control:focus {
  border-color: #000000;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
  outline: none;
}

/*======================================
//--//---> ENHANCED TESTIMONIALS
======================================*/

.testimonials {
  position: relative;
  overflow: hidden;
}

.testimonial-box {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 2rem;
  transition: all 0.3s ease;
}

.testimonial-box:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-5px);
}

/*======================================
//--//---> LOADING STATES
======================================*/

.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

/*======================================
//--//---> IMPROVED TRANSITIONS
======================================*/

.page-transition {
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/*======================================
//--//---> ENHANCED BACK TO TOP BUTTON
======================================*/

.back-to-top {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  background: rgba(255, 255, 255, 1);
}

.back-to-top i {
  transition: transform 0.3s ease;
}

.back-to-top:hover i {
  transform: translateY(-2px);
}

/*======================================
//--//---> HERO SECTION ENHANCEMENTS
======================================*/

.intro {
  position: relative;
  overflow: hidden;
}

.intro::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.7) 0%,
    rgba(0, 0, 0, 0.5) 100%
  );
  z-index: 1;
}

.intro .intro-content {
  z-index: 2;
}

.intro-title {
  animation: titleFadeIn 1s ease-out;
}

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

/*======================================
//--//---> ACCESSIBILITY IMPROVEMENTS
======================================*/

/* Focus visible for keyboard navigation */
*:focus-visible {
  outline: 3px solid #000000;
  outline-offset: 2px;
}

/* High contrast link underlines on hover */
a:hover {
  text-decoration-thickness: 2px;
}

/* Ensure sufficient touch target sizes */
@media (max-width: 768px) {
  .btn,
  .nav-link,
  a.back-to-top {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/*======================================
//--//---> PERFORMANCE OPTIMIZATIONS
======================================*/

/* Will-change for animated elements */
.work-box,
.work-img img,
.btn-primary,
.back-to-top {
  will-change: transform;
}

/* Contain layout shifts */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Prevent flash of unstyled content */
.fade-in {
  animation: fadeIn 0.3s ease-in;
}
