/* ============================================
   IZZA FARIS PORTFOLIO — mediaqueries.css
   All mobile issues fixed
   ============================================ */

/* ─── LAPTOP / SMALL DESKTOP (max 1200px) ─── */
@media screen and (max-width: 1200px) {
  #desktop-nav  { display: none; }
  #hamburger-nav { display: flex; }

  #profile { gap: 4rem; padding: 80px 6% 60px; }
  .hero-name { font-size: clamp(3rem, 7vw, 5rem); }
  .section__pic-container { width: 310px; height: 310px; }
  .about-image-wrap { width: 310px; }
  .skills-grid { gap: 20px; }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-stat  { right: -10px; }
  .hero-stat-2 { left: -10px; }
  .contact-layout { gap: 28px; }
}

/* ─── TABLET (max 900px) ─── */
@media screen and (max-width: 900px) {
  section { padding: 80px 6%; min-height: auto; }

  /* ── Hero: vertical stack, image on top ── */
  #profile {
    flex-direction: column;          /* image first (HTML order reversed via column-reverse) */
    flex-direction: column-reverse;  /* text first in visual order */
    text-align: center;
    gap: 2rem;
    padding: 60px 6% 60px;
    min-height: auto;
  }
  .hero-content { max-width: 100%; }
  .hero-desc  { margin: 0 auto 38px; }
  .btn-container { justify-content: center; }
  #socials-container { justify-content: center; }
  .hero-badge { margin: 0 auto 24px; display: flex; justify-content: center; }

  /* Image wrap — centred, no overflow */
  .hero-image-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    /* Remove relative positioning context so stat cards don't bleed out */
    position: relative;
    width: 260px;
    height: 260px;
    margin: 0 auto;
  }
  .section__pic-container {
    width: 220px;
    height: 220px;
    position: relative;
    z-index: 2;
  }

  /* Rings scale with image */
  .hero-image-ring { inset: -12px; }
  .ring-2 { inset: -24px; }

  /* Stat cards: move BELOW the image, stack horizontally */
  .hero-stat,
  .hero-stat-2 {
    position: static;              /* take out of absolute flow */
    display: inline-flex;
    flex-direction: column;
    align-items: center;
  }

  /* Wrapper trick: row of stats below image */
  .hero-image-wrap {
    width: auto;
    height: auto;
    flex-direction: column;
    gap: 16px;
  }
  .hero-stats-row {
    display: flex;
    gap: 16px;
    justify-content: center;
  }
  /* If no .hero-stats-row wrapper, just hide on tablet */
  .hero-stat  { display: none; }
  .hero-stat-2 { display: none; }

  /* ── About ── */
  .section-container {
    flex-direction: column;
    gap: 3rem;
    align-items: center;
  }
  .about-image-wrap {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
  }
  .about-details-container { width: 100%; }
  .about-img-tag { font-size: 0.78rem; padding: 6px 16px; }

  /* ── Skills ── */
  .skills-grid {
    grid-template-columns: 1fr;
    max-width: 520px;
    margin: 0 auto;
  }

  /* ── Certs ── */
  .projects-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }

  /* ── Contact ── */
  .contact-layout { grid-template-columns: 1fr; gap: 28px; }
  .contact-intro  { max-width: 100%; }
}

/* ─── MOBILE (max 600px) ─── */
@media screen and (max-width: 600px) {
  section { padding: 60px 5%; min-height: auto; }
  .section-title  { font-size: 1.9rem; }
  .section-header { margin-bottom: 36px; }

  /* ── Nav ── */
  #hamburger-nav { padding: 0 5%; height: 62px; }
  .logo { font-size: 1.6rem; }

  /* ── Hero ── */
  #profile { padding: 48px 5% 52px; gap: 1.8rem; }
  .hero-name  { font-size: 2.9rem; line-height: 1; }
  .hero-title { font-size: 0.78rem; letter-spacing: 1.5px; margin: 14px 0 10px; }
  .hero-desc  { font-size: 0.93rem; margin-bottom: 28px; }
  .hero-badge { font-size: 0.72rem; padding: 5px 14px; }

  /* Image */
  .hero-image-wrap {
    width: auto; height: auto;
    flex-direction: column;
    align-items: center;
    gap: 0;
  }
  .section__pic-container {
    width: 200px;
    height: 200px;
    /* Ensure it stays circular */
    border-radius: 50% !important;
    overflow: hidden;
  }
  .section__pic-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
  }
  .hero-image-ring { inset: -10px; }
  .ring-2 { inset: -20px; }

  /* Stat cards hidden on mobile — they break the layout */
  .hero-stat,
  .hero-stat-2 { display: none !important; }

  /* Buttons */
  .btn { padding: 12px 20px; font-size: 0.87rem; }
  .btn-container { gap: 10px; justify-content: center; }

  /* Socials */
  .social-link { width: 40px; height: 40px; }

  /* ── About ── */
  .about-cards { flex-direction: column; gap: 12px; }
  .about-card  { padding: 18px; }
  .about-image-wrap { max-width: 280px; }
  .about-img-tag { font-size: 0.72rem; white-space: nowrap; }

  /* ── Skills ── */
  .skill-category { padding: 20px 18px; }
  .skill-name  { min-width: 100px; font-size: 0.82rem; }
  .skill-level { min-width: 70px; font-size: 0.67rem; }
  .skill-item  { gap: 8px; }

  /* ── Certifications ── */
  .projects-grid { grid-template-columns: 1fr; gap: 16px; }
  .project-img-wrap { height: 170px; }
  .project-info { padding: 16px; }
  .project-title { font-size: 0.97rem; }
  .project-para  { font-size: 0.8rem; }
  .project-tags span { font-size: 0.65rem; }

  /* ── Contact ── */
  #contact { padding: 60px 5% 60px; }
  .contact-layout { gap: 24px; }
  .contact-form-wrap { padding: 22px 18px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .form-group { margin-bottom: 14px; }
  .form-group input,
  .form-group textarea { font-size: 0.88rem; padding: 11px 14px; }
  .form-group label { font-size: 0.72rem; }
  .contact-info-item { padding: 12px 14px; gap: 12px; }
  .contact-info-icon { width: 38px; height: 38px; }
  .contact-info-icon svg { width: 17px; height: 17px; }
  .contact-info-value { font-size: 0.85rem; }
  .contact-intro { font-size: 0.9rem; }

  /* ── Footer ── */
  footer { padding: 26px 5%; }
  .footer-inner { flex-direction: column; text-align: center; gap: 14px; }
  .footer-links { flex-wrap: wrap; justify-content: center; gap: 14px; }
  .footer-links a { font-size: 0.85rem; }
  .footer-copy { font-size: 0.75rem; }
}

/* ─── SMALL MOBILE (max 400px) ─── */
@media screen and (max-width: 400px) {
  section { padding: 50px 4%; }

  #hamburger-nav { padding: 0 4%; }
  .logo { font-size: 1.45rem; }

  #profile { padding: 44px 4% 48px; gap: 1.5rem; }
  .hero-name { font-size: 2.5rem; }
  .section__pic-container { width: 175px; height: 175px; }
  .hero-image-ring { inset: -8px; }
  .ring-2 { inset: -16px; }

  .btn { padding: 11px 18px; font-size: 0.84rem; }
  .btn-container { flex-direction: column; align-items: center; gap: 10px; }

  .about-image-wrap { max-width: 240px; }
  .projects-grid { grid-template-columns: 1fr; }

  .contact-form-wrap { padding: 18px 14px; }
  .contact-info-item { padding: 10px 12px; }
  .contact-info-icon { width: 34px; height: 34px; }
}

/* ─── PROJECTS SLIDER responsive ─── */
@media screen and (max-width: 1200px) {
  .proj-arrow--prev { left: -16px; }
  .proj-arrow--next { right: -16px; }
}
@media screen and (max-width: 900px) {
  .proj-slide-inner {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .proj-slide-preview {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .proj-slide-preview .proj-browser-screen { min-height: 220px; }
  .proj-slide-info { padding: 28px 28px 32px; }
  .proj-slide-number { font-size: 2.8rem; margin-bottom: 10px; }
  .proj-arrow--prev { left: 0; top: auto; bottom: -64px; transform: none; }
  .proj-arrow--next { right: 0; top: auto; bottom: -64px; transform: none; }
  .proj-slider-wrapper { padding-bottom: 80px; }
  .proj-dots { margin-top: 16px; }
}
@media screen and (max-width: 600px) {
  .proj-slide-info { padding: 20px 18px 24px; }
  .proj-slide-info .proj-title { font-size: 1.1rem; }
  .proj-slide-info .proj-desc { font-size: 0.82rem; }
  .proj-slide-preview .proj-browser-screen { min-height: 180px; }
  .proj-slide-btns .btn { padding: 9px 16px; font-size: 0.8rem; }
  .proj-arrow { width: 40px; height: 40px; }
  .proj-filter-btn { padding: 7px 16px; font-size: 0.78rem; }
}
