/* ===== CONTACT PAGE ENHANCEMENTS ===== */
/* Works with existing light theme in base.css */

/* Neural Grid Background - Subtle on light theme */
.contact-content-wrapper::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 1px 1px, rgba(100, 116, 139 0.08) 1px, transparent 0);
  background-size: 50px 50px;
  animation: gridPulse 6s ease-in-out infinite;
  z-index: 1;
  pointer-events: none;
}

@keyframes gridPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.6; }
}

/* Floating neural dots */
.contact-content-wrapper::after {
  content: '';
  position: fixed;
  top: -10px;
  left: 20%;
  width: 3px;
  height: 3px;
  background: rgba(100, 116, 139 0.6);
  border-radius: 50%;
  box-shadow: 
    30vw 0 0 rgba(100, 116, 139 0.4),
    50vw 0 0 rgba(100, 116, 139 0.5),
    70vw 0 0 rgba(100, 116, 139 0.3);
  animation: floatDots 8s linear infinite;
  z-index: 1;
  pointer-events: none;
}

@keyframes floatDots {
  0% { transform: translateY(-20px); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(calc(100vh + 50px)); opacity: 0; }
}

/* Enhanced contact wrapper positioning */
.contact-content-wrapper {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 4rem;
  max-width: 1000px;
  align-items: start;
}

/* Contact info section */
.contact-info-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-top: 2rem;
}

.contact-info-title {
  font-size: 1.5rem;
  font-weight: 500;
  color: #1a1a1a;
  margin-bottom: 1rem;
}

/* Floating Contact Cards */
.contact-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(100, 116, 139 0.15);
  border-radius: 16px;
  padding: 1.5rem;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.contact-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(100, 116, 139 0.05), 
    transparent);
  transition: left 0.6s ease;
}

.contact-card:hover {
  transform: translateY(-8px) translateX(4px);
  border-color: rgba(100, 116, 139 0.4);
  box-shadow: 0 20px 40px rgba(100, 116, 139 0.1), 0 8px 20px rgba(0, 0, 0, 0.1);
}

.contact-card:hover::before {
  left: 100%;
}

.contact-card h3 {
  color: #1a1a1a;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.contact-card p {
  color: #4B5563;
  font-size: 0.95rem;
  line-height: 1.5;
}

.contact-card .contact-subtitle {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: #6B7280;
  opacity: 0.8;
}

/* Neural-style Contact Icons */
.contact-icon {
  width: 24px;
  height: 24px;
  background: rgba(100, 116, 139 0.08);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border: 1px solid rgba(100, 116, 139 0.2);
  transition: all 0.3s ease;
}

.contact-card:hover .contact-icon {
  background: rgba(100, 116, 139 0.15);
  border-color: rgba(100, 116, 139 0.4);
  transform: scale(1.1);
}

/* Email Icon - Circuit Pattern */
.icon-email::before {
  content: '';
  position: absolute;
  width: 14px;
  height: 10px;
  border: 1.5px solid rgba(100, 116, 139 0.7);
  border-radius: 2px;
  background: linear-gradient(45deg, 
    transparent 40%, 
    rgba(100, 116, 139 0.15) 40%, 
    rgba(100, 116, 139 0.15) 60%, 
    transparent 60%);
}

.icon-email::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 1px;
  background: rgba(100, 116, 139 0.7);
  box-shadow: 
    0 3px 0 rgba(100, 116, 139 0.5), 
    0 6px 0 rgba(100, 116, 139 0.3);
}

/* Network Icon - Connected Nodes */
.icon-network::before {
  content: '';
  position: absolute;
  width: 3px;
  height: 3px;
  background: rgba(100, 116, 139 0.8);
  border-radius: 50%;
  box-shadow: 
    8px 0 0 rgba(100, 116, 139 0.6),
    4px 6px 0 rgba(100, 116, 139 0.7),
    -4px 6px 0 rgba(100, 116, 139 0.5);
}

.icon-network::after {
  content: '';
  position: absolute;
  width: 1px;
  height: 8px;
  background: linear-gradient(45deg, rgba(100, 116, 139 0.4), transparent);
  transform: rotate(30deg);
  box-shadow: 6px -3px 0 rgba(100, 116, 139 0.25);
}

/* Code Icon - Brackets with Pulse */
.icon-code {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: rgba(100, 116, 139 0.8);
  font-weight: bold;
}

.icon-code::before {
  content: '< />';
  animation: codePulse 2s ease-in-out infinite;
}

@keyframes codePulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}

/* Glassmorphic Form Container */
.contact-form {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(100, 116, 139 0.2);
  border-radius: 24px;
  padding: 3rem;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
  margin-top: 0;
}

.contact-form::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(100, 116, 139 0.6), 
    transparent);
  animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Form header enhancement */
.contact-content-wrapper h2 {
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 1rem;
  color: #1a1a1a;
  text-align: left;
}

.contact-form-subtitle {
  color: #6B7280;
  margin-bottom: 2rem;
  text-align: left;
  font-size: 1rem;
}

/* Progress Indicator */
.form-progress {
  width: 100%;
  height: 4px;
  background: rgba(229, 231, 235, 0.6);
  border-radius: 2px;
  margin-bottom: 2rem;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #64748B, #0099CC);
  border-radius: 2px;
  width: 0%;
  transition: width 0.4s cubic-bezier(0.23, 1, 0.320, 1);
  animation: progressGlow 2s ease-in-out infinite;
}

@keyframes progressGlow {
  0%, 100% { box-shadow: 0 0 5px rgba(100, 116, 139 0.3); }
  50% { box-shadow: 0 0 15px rgba(100, 116, 139 0.6); }
}

.progress-label {
  font-size: 0.8rem;
  color: #6B7280;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Enhanced Form Groups with Floating Labels */
.form-group {
  position: relative;
  margin-bottom: 2.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1.2rem 0 0.8rem 0;
  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(229, 231, 235, 0.6);
  color: #1a1a1a;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  transition: all 0.3s cubic-bezier(0.23, 1, 0.320, 1);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-bottom-color: #64748B;
  box-shadow: 0 3px 15px rgba(100, 116, 139 0.15);
}

.form-group input.invalid,
.form-group textarea.invalid {
  border-bottom-color: #EF4444;
  box-shadow: 0 3px 15px rgba(239, 68, 68, 0.15);
}

.form-group label {
  position: absolute;
  top: 1.2rem;
  left: 0;
  color: #6B7280;
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.23, 1, 0.320, 1);
  pointer-events: none;
  font-weight: 400;
}

.form-group input:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label,
.form-group textarea:focus ~ label,
.form-group textarea:not(:placeholder-shown) ~ label {
  top: 0;
  font-size: 0.8rem;
  color: #64748B;
  font-weight: 500;
  transform: translateY(-0.2rem);
}

.form-group input:focus ~ label,
.form-group textarea:focus ~ label {
  color: #64748B;
}

.form-group input.invalid ~ label,
.form-group textarea.invalid ~ label {
  color: #EF4444;
}

/* Character Counter with Neural Ring */
.char-counter-container {
  position: relative;
}

.char-counter {
  position: absolute;
  bottom: -2.5rem;
  right: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #6B7280;
}

.char-ring {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(229, 231, 235, 0.6);
  position: relative;
  transition: all 0.3s ease;
}

.char-ring::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #64748B;
  border-right-color: transparent;
  border-bottom-color: transparent;
  transform: rotate(0deg);
  transition: transform 0.3s ease;
}

.char-ring.active::after {
  animation: ringProgress 2s ease-in-out infinite;
}

@keyframes ringProgress {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.char-ring.invalid {
  border-color: #EF4444;
}

.char-ring.invalid::after {
  border-color: #EF4444;
  border-right-color: transparent;
  border-bottom-color: transparent;
}

/* Enhanced Submit Button */
.submit-btn {
  width: 100%;
  padding: 1.2rem 2rem;
  background: transparent;
  border: 2px solid rgba(100, 116, 139 0.6);
  border-radius: 12px;
  color: #64748B;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
  position: relative;
  overflow: hidden;
}

.submit-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(100, 116, 139 0.1), 
    transparent);
  transition: left 0.6s ease;
}

.submit-btn:hover {
  background: #64748B;
  color: #FFFFFF;
  border-color: #64748B;
  box-shadow: 0 10px 30px rgba(100, 116, 139 0.25);
  transform: translateY(-2px);
}

.submit-btn:hover::before {
  left: 100%;
}

.submit-btn:active {
  transform: translateY(0px);
}

.submit-btn.loading {
  pointer-events: none;
  opacity: 0.8;
}

.submit-btn.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Success State */
.submit-btn.success {
  background: #22C55E;
  border-color: #22C55E;
  color: #FFFFFF;
}

.submit-btn.success::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.2rem;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .contact-content-wrapper {
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 100%;
  }
  
  .contact-form {
    padding: 2rem 1.5rem;
  }
  
  .contact-info-section {
    order: 2;
  }
  
  .contact-form {
    order: 1;
  }
  
  .contact-card {
    padding: 1.2rem;
  }
  
  .contact-content-wrapper h2 {
    font-size: 1.8rem;
    text-align: center;
  }
  
  .contact-form-subtitle {
    text-align: center;
  }
  
  .contact-info-title {
    text-align: center;
    font-size: 1.3rem;
  }
}