/* ============================================
   Responsive — All @media breakpoints
   ============================================ */

/* ==========================================
   Tablet Landscape / Small Desktop (< 1024px)
   ========================================== */
@media (max-width: 1024px) {
  :root {
    --section-gap: 70px;
  }

  /* About grid: 2-col → 2-col but tighter gap */
  .about-grid {
    gap: 30px;
  }

  /* Skills: 6 cols → 4 cols */
  .skills-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  /* Projects: 3 cols → 2 cols */
  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
  }

  /* Timeline: keep alternating but tighter */
  .timeline-item:nth-child(odd) {
    padding-right: 36px;
  }
  .timeline-item:nth-child(even) {
    padding-left: 36px;
  }
}

/* ==========================================
   Tablet Portrait (< 768px)
   ========================================== */
@media (max-width: 768px) {
  :root {
    --section-gap: 56px;
  }

  /* ---- Navbar: hamburger menu ---- */
  .hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    flex-direction: column;
    gap: 0;
    padding: 100px 32px 40px;
    background: rgba(12, 12, 29, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    transform: translateX(100%);
    transition: transform var(--transition-smooth);
    z-index: calc(var(--z-nav) + 1);
  }

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

  .nav-link {
    display: block;
    padding: 14px 0;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .nav-link::after {
    display: none;
  }

  /* ---- Hero ---- */
  .hero-name {
    font-size: clamp(1.8rem, 8vw, 2.8rem);
  }

  /* ---- About: stack to single column ---- */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

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

  /* ---- Skills: 3 cols ---- */
  .skills-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 14px;
  }

  /* ---- Projects: 1 col ---- */
  .projects-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
  }

  /* ---- Timeline: single-sided (all right) ---- */
  .timeline::before {
    left: 18px;
  }

  .timeline-item {
    width: 100%;
    padding-left: 50px !important;
    padding-right: 0 !important;
    text-align: left !important;
    left: 0 !important;
  }

  .timeline-item::before {
    left: 12px !important;
    right: auto !important;
  }

  .timeline-item::after {
    left: 24px !important;
    right: auto !important;
    width: 26px !important;
  }

  /* ---- Contact form: stack fields ---- */
  .form-row {
    grid-template-columns: 1fr;
  }

  /* ---- Tilt disabled by JS, but ensure cards look fine ---- */
  [data-tilt] {
    transform: none !important;
  }
}

/* ==========================================
   Small Phones (< 480px)
   ========================================== */
@media (max-width: 480px) {
  :root {
    --section-gap: 44px;
  }

  /* Navbar */
  .nav-inner {
    padding: 12px 20px;
  }

  .nav-brand {
    font-size: 1rem;
  }

  /* Hero */
  .hero {
    padding: 100px 16px 40px;
  }

  .hero-avatar {
    width: 100px;
    height: 100px;
  }

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

  .btn {
    width: 100%;
    justify-content: center;
  }

  /* About stats: 1 col */
  .about-stats {
    grid-template-columns: 1fr;
  }

  /* Skills: 2 cols */
  .skills-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .skill-card {
    padding: 20px 14px;
  }

  .skill-icon {
    font-size: 1.8rem;
  }

  /* Contact grid: 1 col */
  .contact-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  /* Section headings */
  .section-heading {
    margin-bottom: 36px;
  }

  /* Timeline dots smaller */
  .timeline-item::before {
    width: 10px;
    height: 10px;
    top: 28px;
  }

  .timeline-card {
    padding: 18px;
  }
}

/* ==========================================
   Wide Screens (> 1440px)
   ========================================== */
@media (min-width: 1440px) {
  :root {
    --section-gap: 120px;
  }

  .container {
    max-width: 1300px;
  }

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

  .hero-name {
    font-size: 4.5rem;
  }
}
