/* Enhanced Social Links - Better visibility on sky background */
.social-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.social-links a {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.5rem;
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 0.75rem;
  border-radius: 50%;
  /* Enhanced glassmorphism effect */
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(15px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 
    0 8px 20px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  
  /* Consistent sizing */
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  
  /* Better contrast */
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.social-links a:hover {
  color: white;
  background: rgba(255, 255, 255, 0.4);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-3px);
  box-shadow: 
    0 12px 30px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* Animated Mail Icon - Enhanced visibility and centered */
.mail-icon {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.animated-mail {
  position: relative;
  height: 30px;
  width: 90%;
  transition: .4s;
  transform-origin: center;
  /* Center the mail icon properly */
  margin-left: -2px;
  margin-top: -1px;
  /* Add subtle shadow for better definition */
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.animated-mail .body {
  position: absolute;
  bottom: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 0 20px 40px;
  border-color: transparent transparent #ffffff transparent;
  z-index: 2;
  /* Enhanced shadow */
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.animated-mail .top-fold {
  position: absolute;
  top: 10px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 10px 20px 0 20px;
  transform-origin: 50% 0%;
  transition: transform .4s .4s, z-index .2s .4s;
  border-color: rgba(255, 255, 255, 0.95) transparent transparent transparent;
  z-index: 2;
  /* Better visibility */
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15));
}

.animated-mail .back-fold {
  position: absolute;
  bottom: 0;
  width: 40px;
  height: 20px;
  background: rgba(255, 255, 255, 0.95);
  z-index: 0;
  /* Add subtle shadow */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.animated-mail .left-fold {
  position: absolute;
  bottom: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 10px 0 10px 20px;
  border-color: transparent transparent transparent rgba(255, 255, 255, 0.95);
  z-index: 2;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.animated-mail .letter {
  left: 4px;
  bottom: 0px;
  position: absolute;
  width: 32px;
  height: 12px;
  background: white;
  z-index: 1;
  overflow: hidden;
  transition: .4s .2s;
  /* Better definition */
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.animated-mail .letter .letter-border {
  height: 2px;
  width: 100%;
  background: repeating-linear-gradient(
    -45deg,
    rgba(59, 130, 246, 0.8),
    rgba(59, 130, 246, 0.8) 2px,
    transparent 2px,
    transparent 4px
  );
}

.animated-mail .letter .letter-title {
  margin-top: 2px;
  margin-left: 1px;
  height: 2px;
  width: 40%;
  background: rgba(59, 130, 246, 0.8);
}

.animated-mail .letter .letter-context {
  margin-top: 2px;
  margin-left: 1px;
  height: 2px;
  width: 20%;
  background: rgba(59, 130, 246, 0.8);
}

.animated-mail .letter .letter-stamp {
  margin-top: 6px;
  margin-left: 24px;
  border-radius: 100%;
  height: 6px;
  width: 6px;
  background: rgba(59, 130, 246, 0.8);
  opacity: 0.7;
}

/* 
.mail-shadow {
  position: absolute;
  top: 35px;
  left: 50%;
  width: 60px;
  height: 4px;
  transition: .4s;
  transform: translateX(-50%);
  border-radius: 100%;
  background: radial-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.1), rgba(0,0,0,0.0));
} */

/* LinkedIn specific hover effect - Enhanced */
.social-links a[title="LinkedIn"]:hover {
  color: #0A66C2;
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(10, 102, 194, 0.3);
  box-shadow: 
    0 12px 30px rgba(10, 102, 194, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* Email hover effects - Enhanced */
.social-links a:hover .animated-mail {
  transform: translateY(8px);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.social-links a:hover .animated-mail .top-fold {
  transition: transform .4s, z-index .2s;
  transform: rotateX(180deg);
  z-index: 0;
}

.social-links a:hover .animated-mail .letter {
  height: 28px;
}

.social-links a:hover .mail-shadow {
  width: 40px;
  background: radial-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.2), rgba(0,0,0,0.0));
}

/* Add a subtle glow effect for better visibility */
.social-links a::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, 
    rgba(255, 255, 255, 0.1), 
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.1)
  );
  border-radius: 50%;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.social-links a:hover::before {
  opacity: 1;
}