/* ============================================================
   responsive.css — All-Device Breakpoints
   Covers: Galaxy Z Fold, iPhone SE → 14 Pro Max, Pixel 7,
   Samsung A51/71, Surface Duo, iPad Mini, iPad Air, Surface Pro 7,
   iPad Pro, Nest Hub, Nest Hub Max
   ============================================================ */

/* ─────────────────────────────────────────
   GALAXY Z FOLD 5 / VERY SMALL (≤ 360px)
───────────────────────────────────────── */
@media (max-width: 360px) {
  .global-nav { padding: 8px 10px; }
  .logo { font-size: 18px; }
  .nav-item { font-size: 11px; gap: 8px; }
  .hero-text h1 { font-size: 1.6rem; }
  .skills-header-card h2 { font-size: 1.8rem; }
  .sidebar-title { font-size: 1.6rem; }
  .section-title h2 { font-size: 1.4rem; }
  .heroic-text { font-size: 1.8rem; }
  .showcase-visual { height: 160px !important; }
  .footer-center p { font-size: 11px; white-space: nowrap; }
}

/* ─────────────────────────────────────────
   SMALL PHONES — iPhone SE, iPhone XR/12/14, Pixel 7 (≤ 480px)
───────────────────────────────────────── */
@media (max-width: 480px) {

  /* NAV */
  .global-nav {
    padding: 10px 14px;
    flex-wrap: wrap;
  }
  .logo { font-size: 20px; }
  .logo span { display: none; }
  .nav-links {
    width: 100%;
    order: 3;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 0 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    justify-content: center;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-item { font-size: 12px; white-space: nowrap; margin: 0; }
  .global-nav.scrolled .nav-item[href="#home"] { display: none; }

  /* HERO */
  .hero { padding-top: 80px; }
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 30px 16px 0;
    gap: 24px;
  }
  .hero-text h1 { font-size: clamp(2rem, 11vw, 2.6rem); }
  .hero-description { font-size: 14px; }
  .hero-cta, .socials { justify-content: center; }
  .hero-pic-mobile { display: flex; justify-content: center; margin: 10px 0; }
  .hero-pic-mobile .hero-image-card { max-width: 180px; }
  .tech-badges {
    transform: scale(0.85);
    transform-origin: center;
    justify-content: center;
  }

  /* ABOUT */
  .about { padding: 60px 16px; }
  .about-text-hero { margin-bottom: 32px; }
  .about-info { grid-template-columns: 1fr; gap: 12px; margin-top: 24px; }
  .info-item { padding: 20px; }
  .heroic-text { font-size: clamp(1.8rem, 9vw, 2.4rem); letter-spacing: -1px; }

  /* SKILLS */
  .skills { padding: 60px 16px; }
  .skills-bento-grid { grid-template-columns: 1fr !important; gap: 10px; }
  .skills-header-card {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
    padding: 24px;
    text-align: center;
    align-items: center;
    order: -1;
  }
  .skills-header-card h2 { font-size: clamp(1.8rem, 9vw, 2.4rem); }
  .skill-bento-card { padding: 20px; }
  .skill-bento-icon { width: 40px; height: 40px; margin-bottom: 16px; }

  /* PROJECTS */
  .projects-sidebar { padding: 50px 16px 20px !important; }
  .sidebar-title { font-size: clamp(1.6rem, 8vw, 2rem); letter-spacing: -1px; margin-bottom: 20px; }
  .projects-filters { gap: 6px; }
  .filter-btn { padding: 6px 12px; font-size: 11px; }
  .showcase-visual { height: 180px !important; flex: none !important; }
  .showcase-info { padding: 18px 16px !important; }
  .info-content h3 { font-size: 1rem; }
  .showcase-tags span { font-size: 10px; padding: 4px 9px; }
  .btn-action { font-size: 11px; padding: 7px 12px; }

  /* EXPERIENCE */
  .experience { padding: 60px 16px; }
  .timeline::before { left: 10px; transform: none; }
  .timeline-marker { left: 10px; transform: none; width: 16px; height: 16px; }
  .timeline-item { padding-left: 30px; padding-bottom: 24px; }
  .timeline-item:nth-child(odd) .timeline-content,
  .timeline-item:nth-child(even) .timeline-content {
    margin-left: 0; margin-right: 0;
    text-align: left; padding-left: 14px; padding-right: 14px;
  }
  .timeline-item:nth-child(odd) .timeline-tags,
  .timeline-item:nth-child(even) .timeline-tags { justify-content: flex-start; }
  .timeline-content { padding: 18px; }
  .timeline-content h3 { font-size: 15px; }
  .certifications { padding: 20px; }

  /* CONTACT */
  .contact { padding: 60px 16px; }
  .section-title h2 { font-size: clamp(1.4rem, 7vw, 1.8rem); }
  .contact-container { grid-template-columns: 1fr !important; gap: 28px; }
  .contact-info h3 { font-size: 1.3rem; }
  .contact-links { gap: 14px; }
  .contact-item { gap: 12px; }
  .contact-item i { font-size: 22px; }
  .form-group input, .form-group textarea { padding: 12px 14px; font-size: 13px; }
  .btn-submit { padding: 12px 28px; font-size: 14px; }

  /* FOOTER */
  .footer-content { flex-direction: column; gap: 10px; text-align: center; }
  .footer-divider { display: none; }
  .footer-socials-minimal { justify-content: center; }
  .local-time { justify-content: center; }
  .footer-center p { font-size: 13px; white-space: nowrap; margin: 0; }

  /* CHATBOT */
  .chatbot-window {
    width: calc(100vw - 24px);
    bottom: 0; right: 12px;
    height: 60vh;
    max-height: 450px;
  }
  .chatbot-container { bottom: 100px; right: 16px; }

  /* MISC */
  .wave-left, .wave-right { display: none; }
}

/* ─────────────────────────────────────────
   SURFACE DUO / MEDIUM PHONE (≤ 560px)
───────────────────────────────────────── */
@media (min-width: 481px) and (max-width: 560px) {
  .global-nav { padding: 10px 18px; flex-wrap: wrap; }
  .nav-links { width: 100%; order: 3; overflow-x: auto; gap: 8px; padding: 10px 0 4px; scrollbar-width: none; justify-content: center; }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-item { font-size: 12px; white-space: nowrap; margin: 0; }
  .global-nav.scrolled .nav-item[href="#home"] { display: none; }

  .hero-content { grid-template-columns: 1fr; text-align: center; padding: 40px 20px 0; }
  .hero-text h1 { font-size: clamp(2.2rem, 10vw, 2.8rem); }
  .hero-cta, .socials { justify-content: center; }
  .hero-pic-mobile { display: flex; justify-content: center; }

  .skills-bento-grid { grid-template-columns: 1fr !important; }
  .skills-header-card { grid-column: 1 / -1 !important; grid-row: auto !important; text-align: center; align-items: center; order: -1; }

  .projects-sidebar { padding: 60px 20px 24px !important; }
  .project-showcase { position: relative !important; height: auto !important; }
  .showcase-visual { height: 200px !important; flex: none !important; }
  .showcase-info { padding: 20px !important; height: auto !important; }

  .timeline::before { left: 10px; transform: none; }
  .timeline-marker { left: 10px; transform: none; }
  .timeline-item { padding-left: 32px; }
  .timeline-item:nth-child(odd) .timeline-content,
  .timeline-item:nth-child(even) .timeline-content {
    margin-left: 0; margin-right: 0; text-align: left; padding: 0 16px;
  }

  .contact-container { grid-template-columns: 1fr !important; }
  .footer-content { flex-direction: column; gap: 10px; text-align: center; }
}

/* ─────────────────────────────────────────
   TABLETS PORTRAIT — iPad Mini, Samsung A51/71 (≤ 820px)
───────────────────────────────────────── */
@media (min-width: 561px) and (max-width: 820px) {
  /* NAV — keep in one row but compact */
  .global-nav { padding: 14px 24px; flex-wrap: wrap; }
  .nav-links {
    width: 100%; order: 3;
    overflow-x: auto; gap: 18px;
    padding: 10px 0 4px; scrollbar-width: none;
    justify-content: center;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-item { font-size: 13px; white-space: nowrap; margin: 0; }

  /* HERO */
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 50px 30px 0;
    gap: 30px;
  }
  .hero-text h1 { font-size: clamp(2.5rem, 8vw, 3.5rem); }
  .hero-cta, .socials { justify-content: center; }
  .hero-pic-mobile { display: flex; justify-content: center; margin: 20px 0; }

  /* ABOUT */
  .about { padding: 90px 30px; }
  .about-info { grid-template-columns: repeat(2, 1fr); gap: 16px; }

  /* SKILLS */
  .skills { padding: 90px 30px; }
  .skills-bento-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .skills-header-card {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
    text-align: center;
    align-items: center;
    padding: 30px;
    order: -1;
  }

  /* PROJECTS — full mobile reflow */
  .projects-wrapper { flex-direction: column; }
  .projects-sidebar {
    width: 100% !important; height: auto !important;
    position: relative !important; top: auto !important;
    padding: 70px 30px 24px !important;
    border-right: none !important;
    border-bottom: 1px solid var(--border-subtle);
  }
  .projects-list { width: 100% !important; }
  .project-showcase {
    position: relative !important;
    height: auto !important; min-height: unset !important;
  }
  .showcase-visual { height: 260px !important; flex: none !important; }
  .showcase-info { padding: 28px 24px !important; height: auto !important; }

  /* EXPERIENCE */
  .experience { padding: 90px 30px; }
  .timeline::before { left: 12px; transform: none; }
  .timeline-marker { left: 12px; transform: none; }
  .timeline-item { padding-left: 36px; }
  .timeline-item:nth-child(odd) .timeline-content,
  .timeline-item:nth-child(even) .timeline-content {
    margin-left: 0; margin-right: 0; text-align: left; padding: 0 20px;
  }
  .timeline-item:nth-child(odd) .timeline-tags,
  .timeline-item:nth-child(even) .timeline-tags { justify-content: flex-start; }

  /* CONTACT */
  .contact { padding: 90px 30px; }
  .contact-container { grid-template-columns: 1fr !important; }

  /* FOOTER */
  .footer-content { flex-direction: column; gap: 12px; text-align: center; }
  .footer-divider { display: none; }
  .footer-socials-minimal { justify-content: center; }
}

/* ─────────────────────────────────────────
   TABLETS LANDSCAPE — iPad Air, Surface Pro 7 (≤ 1024px)
───────────────────────────────────────── */
@media (min-width: 821px) and (max-width: 1024px) {
  /* NAV — single row, compact */
  .global-nav { padding: 16px 32px; }
  .nav-item { font-size: 13px; margin: 0 8px; }

  /* HERO */
  .hero-content {
    grid-template-columns: 1fr 1fr;
    padding: 60px 40px 0;
    gap: 40px;
    align-items: center;
  }
  .hero-text h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); }

  /* ABOUT */
  .about { padding: 100px 40px; }
  .about-info { grid-template-columns: repeat(2, 1fr); gap: 20px; }

  /* SKILLS */
  .skills { padding: 100px 40px; }
  .skills-bento-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 16px; }
  .skills-header-card {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
    text-align: center;
    align-items: center;
    padding: 36px;
  }

  /* PROJECTS — keep sidebar + stack but size down */
  .projects-sidebar {
    width: 38% !important;
    padding: 80px 32px !important;
  }
  .projects-list { width: 62% !important; }
  .sidebar-title { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
  .showcase-visual { height: 260px !important; }

  /* EXPERIENCE */
  .experience { padding: 100px 40px; }

  /* CONTACT */
  .contact { padding: 100px 40px; }
  .contact-container { grid-template-columns: repeat(2, 1fr); }

  /* FOOTER */
  @media (max-width: 1024px) {
    .footer-content { gap: 16px; }
  }
}

/* ─────────────────────────────────────────
   LARGE TABLET / NEST HUB — (≤ 1280px)
───────────────────────────────────────── */
@media (min-width: 1025px) and (max-width: 1280px) {
  .global-nav { padding: 18px 40px; }
  .about { padding: 110px 40px; }
  .skills { padding: 110px 40px; }
  .experience { padding: 110px 40px; }
  .contact { padding: 110px 40px; }

  .projects-sidebar { width: 33% !important; padding: 80px 40px !important; }
  .projects-list { width: 67% !important; }

  .skills-bento-grid { grid-template-columns: repeat(3, 1fr); }
  .about-info { grid-template-columns: repeat(3, 1fr); }
}
