/* ==========================================================================
   GLASSMORPHISM DESIGN SYSTEM - OPTIMIZED
   Modern glass effect utilities for portfolio site
   ========================================================================== */

/* Core Glassmorphism Variables */
:root {
  /* Glass effects */
  --glass-blur: blur(8px);
  --glass-blur-strong: blur(12px);

  /* Glass transitions */
  --glass-transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ==========================================================================
   GLASS PROJECTS (Main tiles - count cards, skill cards, testimonials, icon boxes)
   ========================================================================== */

.count-card.glass-projects,
.skill-card.glass-projects,
.testimonial-item.glass-projects,
.icon-box.glass-projects {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
  padding: 2rem;
  cursor: pointer;
}

/* Before pseudo-element for top highlight */
.count-card.glass-projects::before,
.skill-card.glass-projects::before,
.testimonial-item.glass-projects::before,
.icon-box.glass-projects::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

/* After pseudo-element for bottom accent line */
.count-card.glass-projects::after,
.skill-card.glass-projects::after,
.testimonial-item.glass-projects::after,
.icon-box.glass-projects::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, #18d26e, #35e888, #18d26e, transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Hover effects for all tiles */
.count-card.glass-projects:hover,
.skill-card.glass-projects:hover,
.testimonial-item.glass-projects:hover,
.icon-box.glass-projects:hover {
  background: linear-gradient(135deg, rgba(24, 210, 110, 0.15), rgba(24, 210, 110, 0.08));
  border: 1px solid rgba(24, 210, 110, 0.4);
  box-shadow: 0 20px 40px 0 rgba(24, 210, 110, 0.2),
    0 0 80px 0 rgba(24, 210, 110, 0.1);
  transform: translateY(-4px) scale(1.02);
}

.count-card.glass-projects:hover::after,
.skill-card.glass-projects:hover::after,
.testimonial-item.glass-projects:hover::after,
.icon-box.glass-projects:hover::after {
  transform: scaleX(1);
}

.count-card.glass-projects:hover::before,
.skill-card.glass-projects:hover::before,
.testimonial-item.glass-projects:hover::before,
.icon-box.glass-projects:hover::before {
  opacity: 1;
}

/* Light reflection effect */
.count-card.glass-projects .light-reflection,
.skill-card.glass-projects .light-reflection,
.testimonial-item.glass-projects .light-reflection,
.icon-box.glass-projects .light-reflection {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: rotate(-45deg) translateX(-100%);
  transition: transform 0.8s ease;
  z-index: 1;
  pointer-events: none;
}

.count-card.glass-projects:hover .light-reflection,
.skill-card.glass-projects:hover .light-reflection,
.testimonial-item.glass-projects:hover .light-reflection,
.icon-box.glass-projects:hover .light-reflection {
  transform: rotate(-45deg) translateX(100%);
}

/* Icon styling for count and skill cards */
.count-card.glass-projects .count-icon,
.skill-card.glass-projects .skill-icon,
.icon-box.glass-projects .icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, rgba(24, 210, 110, 0.2), rgba(24, 210, 110, 0.1)),
    linear-gradient(135deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.2));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(24, 210, 110, 0.3);
  border-radius: 16px;
  margin: 0 auto 1.5rem;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 2;
  overflow: hidden;
}

.count-card.glass-projects:hover .count-icon,
.skill-card.glass-projects:hover .skill-icon,
.icon-box.glass-projects:hover .icon {
  background: linear-gradient(135deg, rgba(24, 210, 110, 0.3), rgba(24, 210, 110, 0.2)),
    linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.3));
  border: 1px solid rgba(24, 210, 110, 0.5);
  transform: scale(1.15);
  box-shadow: 0 0 20px rgba(24, 210, 110, 0.4);
}

.count-card.glass-projects .count-icon i,
.skill-card.glass-projects .skill-icon i,
.icon-box.glass-projects .icon i {
  font-size: 1.8rem;
  color: #18d26e;
  text-shadow: 0 2px 8px rgba(24, 210, 110, 0.5);
  transition: all 0.3s ease;
  filter: drop-shadow(0 0 10px rgba(24, 210, 110, 0.3));
  position: relative;
  z-index: 2;
}

.count-card.glass-projects:hover .count-icon i,
.skill-card.glass-projects:hover .skill-icon i,
.icon-box.glass-projects:hover .icon i {
  color: #35e888;
  transform: scale(1.1);
  filter: drop-shadow(0 0 15px rgba(24, 210, 110, 0.6));
}

/* Typography styling */
.count-card.glass-projects .purecounter {
  font-size: 2.5rem;
  font-weight: 800;
  color: #18d26e;
  margin-bottom: 15px;
  text-shadow: 0 2px 8px rgba(24, 210, 110, 0.3);
  transition: all 0.4s ease;
  position: relative;
  z-index: 2;
}

.count-card.glass-projects:hover .purecounter {
  color: #35e888;
  text-shadow: 0 2px 8px rgba(24, 210, 110, 0.5);
  transform: scale(1.05);
}

.count-card.glass-projects h4,
.skill-card.glass-projects h4,
.icon-box.glass-projects h4 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
  transition: all 0.4s ease;
  position: relative;
  z-index: 2;
}

.count-card.glass-projects:hover h4,
.skill-card.glass-projects:hover h4,
.icon-box.glass-projects:hover h4 {
  color: #18d26e;
  text-shadow: 0 2px 8px rgba(24, 210, 110, 0.4);
  transform: translateY(-2px);
}

.icon-box.glass-projects h4 a {
  color: inherit;
  text-decoration: none;
  transition: all 0.3s ease;
}

.icon-box.glass-projects:hover h4 a {
  color: #18d26e;
  /* Ensures the link color matches the h4 color on hover */
}

.count-card.glass-projects .count-detail p,
.icon-box.glass-projects p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  transition: all 0.4s ease;
  position: relative;
  z-index: 2;
}

.count-card.glass-projects:hover .count-detail p,
.icon-box.glass-projects:hover p {
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  transform: translateY(-1px);
}

/* Tech tags styling */
.skill-card.glass-projects .skill-tags,
.icon-box.glass-projects .tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
  position: relative;
  z-index: 2;
}

.skill-card.glass-projects .tech-tag,
.icon-box.glass-projects .tech-tag {
  background: linear-gradient(135deg, rgba(24, 210, 110, 0.15), rgba(24, 210, 110, 0.08));
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(24, 210, 110, 0.3);
  border-radius: 12px;
  padding: 0.3rem 0.8rem;
  font-size: 0.75rem;
  color: #18d26e;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  white-space: nowrap;
  font-weight: 500;
}

.skill-card.glass-projects:hover .tech-tag,
.icon-box.glass-projects:hover .tech-tag {
  background: linear-gradient(135deg, rgba(24, 210, 110, 0.25), rgba(24, 210, 110, 0.15));
  border: 1px solid rgba(24, 210, 110, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(24, 210, 110, 0.2);
  color: #35e888;
}

/* Project actions for icon boxes */
.icon-box.glass-projects .project-actions {
  display: flex;
  gap: 0.8rem;
  margin-top: 1rem;
  position: relative;
  z-index: 2;
}

.icon-box.glass-projects .action-btn {
  background: linear-gradient(135deg, rgba(24, 210, 110, 0.2), rgba(24, 210, 110, 0.1));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(24, 210, 110, 0.3);
  border-radius: 20px;
  padding: 0.6rem 1.2rem;
  color: #18d26e;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.icon-box.glass-projects .action-btn:hover {
  background: linear-gradient(135deg, rgba(24, 210, 110, 0.3), rgba(24, 210, 110, 0.2));
  border: 1px solid rgba(24, 210, 110, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(24, 210, 110, 0.2);
  color: #35e888;
}

/* Testimonial specific styling */
.testimonial-item.glass-projects {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

.testimonial-item.glass-projects p {
  font-style: italic;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 30px;
  position: relative;
  z-index: 2;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  transition: all 0.4s ease;
}

.testimonial-item.glass-projects:hover p {
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  transform: translateY(-1px);
}

.testimonial-item.glass-projects .testimonial-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 20px;
  border: 3px solid rgba(24, 210, 110, 0.3);
  transition: all 0.4s ease;
  position: relative;
  z-index: 2;
}

.testimonial-item.glass-projects:hover .testimonial-img {
  border-color: rgba(24, 210, 110, 0.8);
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(24, 210, 110, 0.3);
}

.testimonial-item.glass-projects h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 5px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
  transition: all 0.4s ease;
  position: relative;
  z-index: 2;
}

.testimonial-item.glass-projects h4 {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  transition: all 0.4s ease;
  position: relative;
  z-index: 2;
}

.testimonial-item.glass-projects:hover h3 {
  color: #18d26e;
  text-shadow: 0 2px 8px rgba(24, 210, 110, 0.4);
  transform: translateY(-2px);
}

.testimonial-item.glass-projects:hover h4 {
  color: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
}

.testimonial-item.glass-projects .quote-icon-left,
.testimonial-item.glass-projects .quote-icon-right {
  color: rgba(24, 210, 110, 0.3);
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.testimonial-item.glass-projects:hover .quote-icon-left,
.testimonial-item.glass-projects:hover .quote-icon-right {
  color: rgba(24, 210, 110, 0.8);
  text-shadow: 0 0 10px rgba(24, 210, 110, 0.4);
}

/* ==========================================================================
   GLASS SOCIAL LINKS
   ========================================================================== */

.glass-social a {
  font-size: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  line-height: 1;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  transition: var(--glass-transition);
  position: relative;
  overflow: hidden;
}

.glass-social a:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 15px 35px 0 rgba(31, 38, 135, 0.4);
  transform: translateY(-2px) scale(1.05);
  color: #fff;
}

/* Header social links */
#header .social-links.glass-social {
  margin-top: 40px;
  display: flex;
  gap: 8px;
}

#header.header-top .social-links.glass-social {
  display: none !important;
}

/* Mobile social links */
.navbar-mobile .mobile-social-links.glass-social {
  display: flex;
  justify-content: center;
  margin-top: 30px;
  gap: 12px;
}

.navbar-mobile .mobile-social-links.glass-social a {
  width: 40px;
  height: 40px;
  font-size: 14px;
}

/* Contact section social links */
.contact .info-box .contact-social-links.glass-social {
  margin: 10px 0 0 0 !important; /* Reset margin */
  display: flex;
  justify-content: flex-start !important; /* Align to the left */
  gap: 12px;
}

.contact .info-box .social-links.glass-social a {
  width: 42px;
  height: 42px;
  font-size: 18px;
}

/* Platform-specific hover colors */
.glass-social a.twitter:hover {
  background: linear-gradient(135deg, rgba(29, 161, 242, 0.2), rgba(29, 161, 242, 0.1));
  border: 1px solid rgba(29, 161, 242, 0.3);
  box-shadow: 0 15px 35px 0 rgba(29, 161, 242, 0.2);
}

.glass-social a.facebook:hover {
  background: linear-gradient(135deg, rgba(24, 119, 242, 0.2), rgba(24, 119, 242, 0.1));
  border: 1px solid rgba(24, 119, 242, 0.3);
  box-shadow: 0 15px 35px 0 rgba(24, 119, 242, 0.2);
}

.glass-social a.instagram:hover {
  background: linear-gradient(135deg, rgba(225, 48, 108, 0.2), rgba(225, 48, 108, 0.1));
  border: 1px solid rgba(225, 48, 108, 0.3);
  box-shadow: 0 15px 35px 0 rgba(225, 48, 108, 0.2);
}

.glass-social a.linkedin:hover {
  background: linear-gradient(135deg, rgba(0, 119, 181, 0.2), rgba(0, 119, 181, 0.1));
  border: 1px solid rgba(0, 119, 181, 0.3);
  box-shadow: 0 15px 35px 0 rgba(0, 119, 181, 0.2);
}

.glass-social a.github:hover {
  background: linear-gradient(135deg, rgba(51, 51, 51, 0.3), rgba(51, 51, 51, 0.2));
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 15px 35px 0 rgba(51, 51, 51, 0.3);
}


@media (max-width: 576px) {

  .count-card.glass-projects,
  .skill-card.glass-projects,
  .testimonial-item.glass-projects,
  .icon-box.glass-projects {
    padding: 1.2rem;
  }

  .count-card.glass-projects:hover,
  .skill-card.glass-projects:hover,
  .testimonial-item.glass-projects:hover,
  .icon-box.glass-projects:hover {
    transform: translateY(-2px) scale(1.01);
  }

  .skill-card.glass-projects .skill-tags,
  .icon-box.glass-projects .tech-tags {
    gap: 0.3rem;
  }

  .glass-social a {
    width: 34px;
    height: 34px;
    font-size: 13px;
  }

  .contact .info-box .social-links.glass-social {
    margin: 5px 0 0 0;
    justify-content: center;
  }
}

/* ==========================================================================
  MOBILE PERFORMANCE OPTIMIZATIONS
   ========================================================================== */
@media (max-width: 768px) {

  /* Disable expensive effects on mobile to prevent scrolling lag */
  .glass-btn,
  .count-card.glass-projects,
  .skill-card.glass-projects,
  .testimonial-item.glass-projects,
  .icon-box.glass-projects,
  .glass-social a {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    background: linear-gradient(135deg, rgba(0, 255, 55, 0.044), rgba(255, 255, 255, 0.04));
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: none !important;
    transition: none !important;
  }

  /* Remove costly transforms and hover effects on mobile */
  .glass-btn:hover,
  .count-card.glass-projects:hover,
  .skill-card.glass-projects:hover,
  .testimonial-item.glass-projects:hover,
  .icon-box.glass-projects:hover,
  .glass-social a:hover {
    transform: none !important;
    box-shadow: none !important;
    background: linear-gradient(135deg, rgba(24, 210, 111, 0.17), rgba(24, 210, 111, 0.052)) !important;
    border: 1px solid rgba(24, 210, 110, 0.4) !important;
  }

  /* Remove pseudo-elements and light reflection on mobile */
  .count-card.glass-projects::before,
  .skill-card.glass-projects::before,
  .testimonial-item.glass-projects::before,
  .icon-box.glass-projects::before,
  .count-card.glass-projects::after,
  .skill-card.glass-projects::after,
  .testimonial-item.glass-projects::after,
  .icon-box.glass-projects::after,
  .count-card.glass-projects .light-reflection,
  .skill-card.glass-projects .light-reflection,
  .testimonial-item.glass-projects .light-reflection,
  .icon-box.glass-projects .light-reflection {
    display: none !important;
  }

  /* Simplify icon and tag styling on mobile */
  .count-card.glass-projects .count-icon,
  .skill-card.glass-projects .skill-icon,
  .icon-box.glass-projects .icon,
  .skill-card.glass-projects .tech-tag,
  .icon-box.glass-projects .tech-tag,
  .icon-box.glass-projects .action-btn {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    transition: none !important;
  }

  .count-card.glass-projects:hover .count-icon,
  .skill-card.glass-projects:hover .skill-icon,
  .icon-box.glass-projects:hover .icon {
    transform: none !important;
    box-shadow: none !important;
  }

   .count-card.glass-projects,
  .skill-card.glass-projects,
  .testimonial-item.glass-projects,
  .icon-box.glass-projects {
    padding: 1.5rem;
  }

  .count-card.glass-projects .count-icon,
  .skill-card.glass-projects .skill-icon,
  .icon-box.glass-projects .icon {
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
  }

  .count-card.glass-projects .count-icon i,
  .skill-card.glass-projects .skill-icon i,
  .icon-box.glass-projects .icon i {
    font-size: 1.5rem;
  }

  .count-card.glass-projects h4,
  .skill-card.glass-projects h4,
  .icon-box.glass-projects h4 {
    font-size: 1.1rem;
  }

  .count-card.glass-projects .purecounter {
    font-size: 2rem;
  }

  .skill-card.glass-projects .tech-tag,
  .icon-box.glass-projects .tech-tag {
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
  }

  .glass-social a {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }


  .contact .info-box .contact-social-links.glass-social {
    margin: 5px 0 0 0 !important; /* Reset margin */
    justify-content: flex-start !important; /* Align to the left */
    gap: 8px;
  }

  .contact .info-box .social-links.glass-social a {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }

  
  #header .social-links.glass-social {
  margin-top: 0px !important;
  display: flex;
  gap: 8px;
  }

  #header .social-links.glass-social a {
    width: 38px;
    height: 38px;
    font-size: 16px;
}

}
