/**
 * GURU PORTFOLIO 2026 - Responsive Stylesheet
 * Strict mobile-to-desktop viewport adaptability
 * Breakpoints: 320px, 375px, 390px, 430px, 768px, 1024px, 1366px, 1440px
 */

/* ==========================================================================
   LAPTOP / TABLET LANDSCAPE (max-width: 1024px)
   ========================================================================== */
@media screen and (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3.5rem;
  }

  .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-quick-facts {
    justify-content: center;
    width: 100%;
    max-width: 500px;
  }

  .hero-visual-frame {
    max-width: 380px;
    margin: 0 auto;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .about-card-frame {
    max-width: 440px;
    margin: 0 auto;
  }

  .featured-project-card {
    grid-template-columns: 1fr;
  }

  .project-visual-pane {
    border-left: none;
    border-top: 1px solid var(--border-subtle);
    padding: 2rem 1.5rem;
  }

  .experience-layout-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

/* ==========================================================================
   TABLET PORTRAIT & MOBILE (max-width: 768px)
   ========================================================================== */
@media screen and (max-width: 768px) {
  :root {
    --header-height: 68px;
    --section-padding-y: clamp(3.5rem, 6vw, 5rem);
    --section-padding-x: 1.25rem;
  }

  /* Hamburger & Mobile Menu Drawer */
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 82%;
    max-width: 320px;
    height: 100vh;
    background: var(--bg-card);
    border-left: 1px solid var(--border-subtle);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.8);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 5.5rem 1.5rem 2rem;
    gap: 0.5rem;
    transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
    overflow-y: auto;
  }

  .nav-menu.is-open {
    right: 0;
  }

  /* Mobile backdrop */
  .nav-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(8, 11, 20, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  .nav-backdrop.is-open {
    opacity: 1;
    visibility: visible;
  }

  .nav-link {
    display: block;
    padding: 0.85rem 1rem;
    font-size: 1.05rem;
    border-radius: var(--radius-md);
  }

  .nav-actions {
    display: none; /* Secondary action inside menu or header */
  }

  .nav-menu-cta {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  /* Hero Section Mobile */
  .hero-quick-facts {
    gap: 1.25rem;
  }

  .fact-value {
    font-size: 1.15rem;
  }

  .fact-label {
    font-size: 0.72rem;
  }

  .floating-badge {
    padding: 0.45rem 0.75rem;
    font-size: 0.725rem;
  }

  .floating-badge-1 {
    top: -10px;
    right: -5px;
  }

  .floating-badge-2 {
    bottom: -10px;
    left: -5px;
  }

  /* Grid Reductions */
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .project-highlights-grid {
    grid-template-columns: 1fr;
  }

  .about-highlights {
    grid-template-columns: 1fr;
  }

  .modal-container {
    max-height: 94vh;
    padding: 0;
  }

  .modal-header {
    padding: 1.25rem 1.5rem;
  }

  .modal-body {
    padding: 1.5rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* ==========================================================================
   MOBILE PHONES (320px - 480px)
   ========================================================================== */
@media screen and (max-width: 480px) {
  :root {
    --section-padding-x: 1rem;
  }

  .hero-heading {
    font-size: 2.15rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-quick-facts {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  .fact-item {
    align-items: center;
  }

  .hero-visual-frame {
    max-width: 100%;
    aspect-ratio: 1 / 1.1;
  }

  .about-card-footer {
    padding: 1rem;
  }

  .about-credentials {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .project-details-pane {
    padding: 1.5rem 1.25rem;
  }

  .project-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .project-actions .btn {
    width: 100%;
  }

  .project-notice-box {
    width: 100%;
    justify-content: center;
  }

  .service-card {
    padding: 1.75rem 1.25rem;
  }

  .experience-card {
    padding: 1.75rem 1.25rem;
  }

  .contact-form-card {
    padding: 1.75rem 1.25rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ==========================================================================
   EXTRA SMALL MOBILE (320px)
   ========================================================================== */
@media screen and (max-width: 340px) {
  .hero-heading {
    font-size: 1.85rem;
  }

  .brand-logo {
    font-size: 1.1rem;
  }

  .brand-symbol {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
  }

  .btn {
    padding: 0.75rem 1.2rem;
    font-size: 0.875rem;
  }

  .skill-category-card {
    padding: 1.5rem 1rem;
  }
}
