/* ==========================================================================
   responsive.css — breakpoints for laptop, tablet, mobile, orientation
   ========================================================================== */

/* ---------- Laptop / small desktop (<=1200px) ---------- */
@media (max-width: 1200px) {
  .projects-grid,
  .cert-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- Tablet (<=980px) ---------- */
@media (max-width: 980px) {
  .nav-links {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(78vw, 340px);
    height: 100svh;
    background: rgba(10, 11, 16, 0.97);
    border-left: 1px solid var(--glass-border);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 1.6rem;
    padding: 2rem clamp(1.5rem, 6vw, 2.5rem);
    transform: translateX(100%);
    transition: transform 0.45s var(--ease-out);
    z-index: 105;
    backdrop-filter: blur(20px);
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links a {
    font-size: var(--fs-lg);
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .nav-cta .btn-ghost {
    display: none;
  }

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

  .hero-visual {
    order: -1;
    max-width: 340px;
    margin: 0 auto;
  }

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

  .about-photo {
    max-width: 360px;
    margin: 0 auto;
  }

  .github-panel {
    grid-template-columns: 1fr;
  }

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

  .skill-panel.active {
    grid-template-columns: 1fr;
  }

  .projects-grid,
  .cert-grid,
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .repo-list {
    grid-template-columns: 1fr;
  }
}

/* ---------- Mobile (<=640px) ---------- */
@media (max-width: 640px) {
  .hero {
    padding-top: 6.5rem;
    text-align: left;
  }

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

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

  .hero-meta {
    gap: 1.4rem;
  }

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

  .about-stats .stat:last-child {
    grid-column: 1 / -1;
  }

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

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-top,
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .skills-tabs {
    gap: 0.5rem;
  }

  .skill-tab {
    padding: 0.5rem 0.9rem;
    font-size: var(--fs-xs);
  }

  .gh-stats {
    grid-template-columns: 1fr 1fr 1fr;
  }

  section {
    padding: 3.2rem 0;
  }
}

/* ---------- Small mobile (<=380px) ---------- */
@media (max-width: 380px) {
  .hero-title {
    font-size: clamp(2.2rem, 9vw, 2.6rem);
  }

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

  .gh-stats {
    grid-template-columns: 1fr;
  }
}

/* ---------- Landscape phones ---------- */
@media (max-height: 480px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding-top: 6rem;
  }

  .scroll-indicator {
    display: none;
  }
}

/* ---------- Larger desktop refinement ---------- */
@media (min-width: 1440px) {
  :root {
    --container: 1280px;
  }
}
