/* ============================================================
   CONTACT SECTION — contact.css
   Glassmorphic contact cards + Custom traveling perimeter light
   ============================================================ */

/* ---------- Container ---------- */
.contact-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  width: 100%;
  max-width: 1100px;
  margin-top: 2rem; /* Reduced to match the sleek spacing system */
  z-index: 1;
}

/* ---------- Individual Contact Card ---------- */
.contact-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

/* Base Hover Translation */
.contact-card:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.04);
}

/* Custom platform glow backdrops */
.contact-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at center, var(--platform-color) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
  pointer-events: none;
}

.contact-card:hover::after {
  opacity: 0.12; /* Subtle platform brand colored glow backing */
}

/* ---------- Content positioning ---------- */
.contact-icon-wrapper {
  position: relative;
  z-index: 2;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #a3a3a3;
  margin-bottom: 1.5rem;
  transition: all 0.4s ease;
}

.contact-icon {
  width: 26px;
  height: 26px;
  transition: transform 0.4s ease;
}

.contact-card:hover .contact-icon-wrapper {
  border-color: var(--platform-color);
  background: rgba(255, 255, 255, 0.06);
  color: var(--platform-color);
  box-shadow: 0 0 15px var(--platform-color-alpha);
}

.contact-card:hover .contact-icon {
  transform: scale(1.15) rotate(5deg);
}

.contact-name {
  position: relative;
  z-index: 2;
  font-size: 1.2rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.contact-label {
  position: relative;
  z-index: 2;
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
}

/* ---------- Perimeter Trace animations (Brand Specific Colors!) ---------- */
.contact-card::before {
  content: '';
  position: absolute;
  inset: 0px;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(from var(--angle), transparent 25%, var(--platform-color-dim) 44%, var(--platform-color) 50%, var(--platform-color-dim) 56%, transparent 75%);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: 5;
}

.contact-card:hover::before {
  opacity: 1;
  animation: rotateBorder 2.2s linear infinite;
}

.contact-card:hover {
  border-color: transparent;
  box-shadow: 
    0 15px 40px rgba(0, 0, 0, 0.6),
    0 0 20px var(--platform-color-alpha);
}

/* ---------- Brand Colors Config ---------- */
.card-linkedin {
  --platform-color: #0a66c2;
  --platform-color-dim: #074b8f;
  --platform-color-alpha: rgba(10, 102, 194, 0.25);
}

.card-whatsapp {
  --platform-color: #25d366;
  --platform-color-dim: #1ca850;
  --platform-color-alpha: rgba(37, 211, 102, 0.25);
}

.card-email {
  --platform-color: #ea4335;
  --platform-color-dim: #c5221f;
  --platform-color-alpha: rgba(234, 67, 53, 0.25);
}

.card-github {
  --platform-color: #ffffff;
  --platform-color-dim: #888888;
  --platform-color-alpha: rgba(255, 255, 255, 0.15);
}

/* ============================================================
   RESPONSIVE — MOBILE (≤768px)
   ============================================================ */
@media (max-width: 768px) {
  .contact-container {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    padding: 0 1rem;
  }

  .contact-card {
    padding: 2rem 1rem;
  }
}
