/* ========== Responsive Design ========== */

/* Hero Section Responsive - triggers when screen is 968px or smaller */
@media (max-width: 968px) {
  .hero-container {
    /* Collapse to single column layout */
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }
  .hero-subtitle {
    /* Expand width and center subtitle */
    max-width: 100%;
    margin: 0 auto 2rem;
  }
  .hero-cta {
    /* Center CTA elements horizontally */
    justify-content: center;
  }
  .profile-img-container {
    /* Center profile image block */
    margin: 0 auto;
  }
}

/* Tablets and Small Laptops - layout adapts below 768px */
@media (max-width: 768px) {
  section {
    padding: 4rem 0; /* Add vertical spacing */
  }
  #home {
    padding-top: 6rem; /* Give extra top space */
  }
  .section-title {
    font-size: 2rem; /* Scale down heading size */
  }
  .hero-title {
    font-size: 2.5rem;
  }
  .hero-subtitle {
    font-size: 1.125rem;
  }
  .profile-img-container {
    width: 250px;
    height: 250px; /* Constrain image size */
  }
  .about-grid {
    grid-template-columns: 1fr; /* Collapse to single column */
    gap: 1.5rem;
  }
  .skills-grid {
    grid-template-columns: 1fr;
  }
  .footer-content {
    grid-template-columns: 1fr; /* Stack footer sections */
    gap: 2rem;
    text-align: center;
  }
  .footer-info {
    max-width: none;
    margin: 0 auto;
  }
  .footer-nav,
  .social-links {
    align-items: center;
  }

  /* Adjust footer space for mobile navigation overlays */
}

/* Phones - layout tweaks below 480px */
@media (max-width: 480px) {
  section {
    padding: 3rem 0;
  }
  #home {
    padding-top: 5rem;
  }
  .section-title {
    font-size: 1.75rem;
  }
  .hero-title {
    font-size: 2rem;
  }
  .hero-subtitle {
    font-size: 1rem;
  }
  .hero-cta {
    /* Stack CTA buttons and center them */
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  .profile-img-container {
    width: 200px;
    height: 200px;
  }
}

/* Very Small Phones */
@media (max-width: 360px) {
  .hero-title {
    font-size: 1.8rem;
  }
  .section-title {
    font-size: 1.6rem;
  }
  .hero-subtitle {
    font-size: 0.9rem;
  }
  .education-header {
    /* Stack layout vertically and align to start */
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .project-links {
    flex-direction: column;
    gap: 0.8rem;
  }
}

/* Smooth scrolling adjustments for mobile nav */
@media (max-width: 768px) {
  html {
    scroll-padding-top: 80px; /* Prevents anchor links from being hidden behind fixed headers */
    scroll-padding-bottom: 80px;
  }
}
