/* ==========================================================================
   MUHAMMAD ANSAR PORTFOLIO — FULL MOBILE RESPONSIVE STYLES
   Optimized for 320px, 375px, 414px, 768px, 1024px, 1280px, 1440px+
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. LARGE DESKTOP SCREENS (1440px +)
   -------------------------------------------------------------------------- */
@media (min-width: 1440px) {
  :root {
    --container-max: 1380px;
    --section-gap: 110px;
  }
}

/* --------------------------------------------------------------------------
   2. LAPTOPS & STANDARD DESKTOPS (1025px - 1280px)
   -------------------------------------------------------------------------- */
@media (max-width: 1280px) {
  .expertise-grid, .services-grid, .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .values-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .industries-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* --------------------------------------------------------------------------
   3. TABLETS & PORTRAIT IPADS (769px - 1024px)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  :root {
    --section-gap: 80px;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero-content {
    text-align: left;
  }
  .hero-portrait-wrapper {
    max-width: 580px;
    width: 100%;
    margin: 0 auto;
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .skill-strip-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .skill-strip-item {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 14px;
  }
  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* --------------------------------------------------------------------------
   4. SMARTPHONES & MOBILE DEVICES (max 768px) — FULL MOBILE EXPERIENCE
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  :root {
    --section-gap: 60px;
    --container-pad: 16px;
  }

  /* Full Width Navigation Header */
  .navbar {
    padding: 14px 0;
    background: rgba(250, 250, 250, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
  }
  .brand-logo {
    font-size: 1.2rem;
  }
  .brand-logo span.badge {
    font-size: 0.6rem;
    padding: 2px 6px;
  }

  .nav-links {
    display: none;
  }
  .hamburger {
    display: block;
  }

  /* Full Width Mobile Menu Drawer */
  .mobile-drawer {
    width: 100%;
    max-width: 100%;
    padding: 90px 24px 30px;
  }

  /* Hero Section Full Mobile Formatting */
  .hero-section {
    padding-top: 110px;
    padding-bottom: 50px;
    min-height: auto;
  }
  .hero-eyebrow {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    flex-wrap: wrap;
  }
  .hero-headline {
    font-size: clamp(1.9rem, 7.5vw, 2.8rem);
    line-height: 1.2;
    margin-bottom: 20px;
  }
  .hero-subtitle {
    font-size: 0.98rem;
    padding-left: 14px;
    margin-bottom: 30px;
  }
  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }
  .btn {
    width: 100%;
    min-height: 52px;
    font-size: 0.82rem;
  }

  /* Hero Portrait Full Width Mobile */
  .hero-portrait-wrapper {
    width: 100%;
    max-width: 100%;
  }
  .portrait-card {
    padding: 12px;
  }
  .portrait-credential-badge {
    padding: 14px 16px;
  }
  .portrait-name {
    font-size: 1.15rem;
  }
  .portrait-roles {
    font-size: 0.82rem;
  }

  /* Skill Strip 100% Full Width */
  .skill-strip-section {
    padding: 20px 0;
  }
  .skill-strip-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .skill-strip-item {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
    padding: 8px 0;
  }
  .skill-strip-item:last-child {
    border-bottom: none;
  }
  .skill-strip-icon {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }
  .skill-strip-title {
    font-size: 0.88rem;
  }

  /* 1-Column Grids for All Sections */
  .expertise-grid, 
  .services-grid, 
  .projects-grid, 
  .research-grid, 
  .training-grid,
  .profile-cards-grid,
  .why-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Industries 2-Column Mobile Grid */
  .industries-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .industry-card {
    padding: 16px 10px;
  }
  .industry-icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
  }
  .industry-name {
    font-size: 0.88rem;
  }

  /* Project Filter Bar Swipeable Scroll on Mobile */
  .project-filter-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 12px;
    margin-bottom: 24px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .project-filter-bar::-webkit-scrollbar {
    display: none;
  }
  .filter-btn {
    flex-shrink: 0;
    padding: 8px 18px;
    font-size: 0.75rem;
  }

  /* Modal Popup Full Width Mobile */
  .modal-overlay {
    padding: 12px;
  }
  .modal-container {
    padding: 22px 18px;
    max-height: 94vh;
  }

  /* Timeline Vertical Adjustments for Mobile */
  .timeline {
    padding: 10px 0;
  }
  .timeline::before {
    left: 12px;
  }
  .timeline-item {
    padding-left: 36px;
    margin-bottom: 28px;
  }
  .timeline-node {
    left: 3px;
    width: 18px;
    height: 18px;
  }
  .timeline-card {
    padding: 18px;
  }
  .timeline-role {
    font-size: 1.1rem;
  }

  /* Values 2-Column Mobile Grid */
  .values-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  /* Contact Cards Full Width Mobile */
  .contact-info-card, .contact-form {
    padding: 24px 18px;
  }

  /* Footer Full Width Mobile */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

/* --------------------------------------------------------------------------
   5. SMALL SMARTPHONES (320px - 480px)
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  :root {
    --section-gap: 50px;
    --container-pad: 14px;
  }
  .section-title {
    font-size: 1.85rem;
  }
  .hero-headline {
    font-size: 1.85rem;
  }
  .industries-grid {
    grid-template-columns: 1fr;
  }
  .values-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
