/* Contact */

.contact__layout {
  display: flex;
  align-items: center;
  gap: var(--space-2xl);
}

.contact__character {
  flex-shrink: 0;
  width: 280px;
}

.contact__character-img {
  width: 100%;
  height: auto;
  animation: varek-float 3.5s ease-in-out infinite;
}

@keyframes varek-float {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
  100% {
    transform: translateY(0);
  }
}

.contact__content {
  flex: 1;
  text-align: left;
}

.contact__content .section__title {
  text-align: left;
}

.contact__intro {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-lg);
  line-height: 1.7;
}

/* Targets ONLY the second intro paragraph ("Reach us at") to tighten the gap */
.contact__intro:nth-of-type(2) {
  margin-bottom: var(--space-xs); 
}

.contact__email {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
  display: block;
}

.contact__disclaimer {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-style: italic;
  margin-bottom: var(--space-xl);
}

.contact__social-intro {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
}

.social-icons {
  display: flex;
  gap: var(--space-lg);
}

.social-icons a {
  color: var(--color-text-muted);
  font-size: 1.5rem;
  transition: all var(--transition-fast);
}

.social-icons a:hover {
  color: var(--color-yellow);
  transform: translateY(-3px);
}

/* Footer */
.site-footer {
  text-align: center;
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.8rem;
}

@media (max-width: 900px) {
  .contact__layout {
    display: flex; /* Ensure it stays a flex container */
    flex-direction: column;
    align-items: center;
    gap: 0; /* Kills the massive gap between text elements */
  }

  /* Flatten the text container so its children can mix with the image */
  .contact__content {
    display: contents;
  }

  /* 1. Title at the very top */
  .contact__content .section__title {
    order: 1;
    text-align: center;
  }

  /* 2. First line of intro text */
  .contact__content .contact__intro:nth-of-type(1) {
    order: 2;
    text-align: center;
  }

  /* 3. Varek (Sandwiched in the middle) */
  .contact__character {
    order: 3;
    width: 200px;
    margin: var(--space-md) auto var(--space-lg); /* Add breathing room */
  }

  /* 4. Second line of intro text */
  .contact__content .contact__intro:nth-of-type(2) {
    order: 4;
    text-align: center;
  }

  /* 5. Email Link */
  .contact__content .contact__email {
    order: 5;
    text-align: center;
  }

  /* 6. Disclaimer */
  .contact__content .contact__disclaimer {
    order: 6;
    text-align: center;
  }

  /* 7. Social Intro Text */
  .contact__content .contact__social-intro {
    order: 7;
    text-align: center;
  }

  /* 8. Social Icons */
  .contact__content .social-icons {
    order: 8;
    justify-content: center;
    width: 100%; /* Ensures they center properly inside the flattened grid */
  }
}