/* ============================================
   responsive.css — Sujan Rai Portfolio
   Handles: hamburger menu, tablet, mobile,
            small mobile breakpoints
   ============================================ */

/* ── HAMBURGER MENU ── */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 4px; background: none; border: none;
}
.hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--green); border-radius: 2px;
  transition: all 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none; position: fixed; top: 64px; left: 0; right: 0;
  background: rgba(245,240,232,0.98); backdrop-filter: blur(16px);
  padding: 1.5rem 2rem 2rem; z-index: 99;
  border-bottom: 1px solid rgba(42,92,62,0.12);
  flex-direction: column; gap: 0;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-size: 1rem; font-weight: 500; color: var(--text);
  text-decoration: none; padding: 0.85rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  display: block;
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu .nav-cta {
  margin-top: 1rem; text-align: center;
  background: var(--green); color: var(--cream);
  border-radius: 2rem; padding: 0.85rem;
}

/* ── TABLET: 768px–1024px ── */
@media (max-width: 1024px) {
  nav { padding: 1.1rem 2rem; }
  .nav-links { gap: 1.5rem; }
  section { padding: 5rem 2.5rem; }
  .hero-left { padding: 5rem 2.5rem 3rem; }
  .hero-img-wrap { width: 320px; height: 420px; }
  .hero-name { font-size: 4rem; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── MOBILE: ≤768px ── */
@media (max-width: 768px) {
  /* Nav */
  nav { padding: 1rem 1.25rem; }
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .hamburger { display: flex; }

  /* Sections */
  section { padding: 4rem 1.25rem; }

  /* Hero */
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 64px;
  }
  .hero::before {
    width: 100%; height: 48%;
    top: auto; bottom: 0;
  }
  .hero-left {
    padding: 3rem 1.25rem 1.5rem;
    text-align: center;
    align-items: center;
  }
  .hero-tag { margin: 0 auto 1.5rem; }
  .hero-name { font-size: clamp(2.8rem, 12vw, 4rem); margin-bottom: 1rem; }
  .hero-desc { font-size: 0.95rem; margin-bottom: 1.5rem; text-align: center; }
  .hero-stats { justify-content: center; gap: 1.5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
  .hero-btns { flex-direction: column; align-items: center; gap: 0.75rem; }
  .btn-primary, .btn-outline { width: 100%; max-width: 280px; text-align: center; padding: 0.9rem 1.5rem; }
  .hero-right {
    padding: 2rem 1.25rem 0;
    align-items: center;
  }
  .hero-img-wrap { width: 260px; height: 340px; }
  .hero-card { left: 50%; transform: translateX(-50%); bottom: 1.5rem; min-width: 180px; }

  /* About */
  #about { padding: 4rem 1.25rem; }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .about-story { font-size: 0.95rem; }
  .highlight-card { padding: 1rem 1.1rem; }

  /* Experience */
  .timeline { padding-left: 1rem; }
  .timeline-item { padding-left: 1.75rem; padding-bottom: 2.5rem; }
  .timeline-dot { left: -1.55rem; }
  .job-title { font-size: 1.2rem; }
  .job-meta { gap: 0.5rem; }
  .job-duties li { font-size: 0.88rem; }

  /* Skills */
  .skills-grid { grid-template-columns: 1fr; gap: 1rem; }
  .skill-group { padding: 1.25rem; }

  /* Projects */
  .projects-grid { grid-template-columns: 1fr; gap: 1rem; }
  .project-card { padding: 1.5rem; }
  .project-num { font-size: 2.2rem; }

  /* Contact */
  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
  .contact-item { padding: 1rem 1.1rem; }
  .form-row { grid-template-columns: 1fr; }
  .form-submit { width: 100%; text-align: center; }

  /* Section titles */
  .section-title { font-size: 1.8rem; }
  .section-sub { font-size: 0.92rem; margin-bottom: 2rem; }

  /* Footer */
  footer {
    flex-direction: column; gap: 0.75rem;
    text-align: center; padding: 1.75rem 1.25rem;
  }
  .footer-links { justify-content: center; }
}

/* ── SMALL MOBILE: ≤480px ── */
@media (max-width: 480px) {
  .hero-name { font-size: clamp(2.4rem, 14vw, 3rem); }
  .hero-img-wrap { width: 200px; height: 280px; }
  .stat-num { font-size: 1.6rem; }
  .hero-stats { gap: 1.2rem; }
  .section-title { font-size: 1.6rem; }
  .job-title { font-size: 1.1rem; }
  .highlight-card { flex-direction: column; }
  .contact-info { gap: 0.8rem; }
  .project-card { padding: 1.2rem; }
}
@media (max-width: 768px) {
  #beyond { padding: 4rem 1.25rem !important; }
  #beyond > div:nth-child(2) { grid-template-columns: 1fr !important; }
}
@media (max-width: 1024px) {
  #beyond > div:nth-child(2) { grid-template-columns: repeat(2,1fr) !important; }
}
