/* =============================================================
   RESPONSIVE STYLESHEET — Rashed Billah Portfolio
   Breakpoints: 1200px | 1024px | 991px | 768px | 480px | 360px
   ============================================================= */

/* ── 1200px — Large Tablet / Small Desktop ──────────────────── */
@media screen and (max-width: 1200px) {
  .container {
    padding: 0 2rem;
  }

  .portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
  }

  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

/* ── 1024px — Tablet Landscape ──────────────────────────────── */
@media screen and (max-width: 1024px) {
  .section-padding {
    padding: 6rem 0;
  }

  /* Hero */
  .hero {
    padding-top: 7rem;
    min-height: auto;
    padding-bottom: 5rem;
  }

  .hero-content {
    max-width: 100%;
  }

  /* About */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .about-image {
    order: -1;
  }

  .about-image .image-wrapper {
    max-width: 480px;
    margin: 0 auto;
  }

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

  /* Portfolio */
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Process */
  .process-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  /* Why Choose Me */
  .why-split-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .why-left {
    position: static;
    text-align: center;
  }

  .why-left .btn {
    margin-top: 1.5rem;
  }

  /* Stats Banner */
  .stats-banner {
    padding: 2.5rem 1.5rem;
  }

  .stat-item {
    padding: 0.75rem 1rem;
  }

  /* Testimonials */
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Footer */
  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

/* ── 991px — Tablet Portrait ─────────────────────────────────── */
@media screen and (max-width: 991px) {
  h1 {
    font-size: clamp(2.2rem, 6vw, 3.5rem);
  }

  h2 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
  }

  .section-padding {
    padding: 5rem 0;
  }

  /* Stats in hero */
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 3rem;
  }

  .stat-num {
    font-size: 2.2rem;
  }

  /* Page Header */
  .page-header {
    padding: 8rem 0 3rem;
  }

  /* CTA Banner */
  .cta-banner {
    padding: 4rem 2rem;
  }

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

  .cta-btn-group .btn {
    width: 100%;
    max-width: 320px;
  }
}

/* ── 768px — Mobile (hamburger triggers) ─────────────────────── */
@media screen and (max-width: 768px) {
  /* ── Navbar ── */
  .navbar {
    padding: 1rem 0;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
  }

  .hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    cursor: pointer;
    z-index: 1002;
    position: relative;
    transition: all 0.3s ease;
  }

  .hamburger:active {
    transform: scale(0.9);
  }

  .hamburger i {
    font-size: 1.4rem; /* Increased for better touch target */
    color: var(--text-primary);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .hamburger.active i {
    transform: rotate(90deg);
  }

  /* Mobile menu — Improved overlay */
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100dvh;
    background: #0A0A0F;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    transform: translateX(100%); /* Slide from right */
    transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: 1001;
    padding: 2rem;
  }

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

  .nav-links li {
    width: 100%;
    max-width: 300px;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
  }

  .nav-links.active li {
    opacity: 1;
    transform: translateY(0);
  }

  /* Stagger animation for links */
  .nav-links.active li:nth-child(1) { transition-delay: 0.1s; }
  .nav-links.active li:nth-child(2) { transition-delay: 0.2s; }
  .nav-links.active li:nth-child(3) { transition-delay: 0.3s; }
  .nav-links.active li:nth-child(4) { transition-delay: 0.4s; }
  .nav-links.active li:nth-child(5) { transition-delay: 0.5s; }
  .nav-links.active li:nth-child(6) { transition-delay: 0.6s; }

  .nav-link {
    display: inline-block;
    font-size: 1.5rem; /* Larger font for mobile */
    font-weight: 600;
    padding: 1rem;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    transition: color 0.3s ease;
  }

  .nav-link:hover,
  .nav-link.active {
    color: var(--accent-primary);
  }

  .nav-link::after {
    display: none; /* Hide desktop underline */
  }

  .nav-mobile-cta {
    display: block !important;
    margin-top: 2rem;
  }

  .nav-link-cta {
    background: var(--gradient-primary);
    color: white !important;
    padding: 1rem 2.5rem !important;
    border-radius: 50px;
    font-size: 1.1rem !important;
    box-shadow: var(--shadow-glow);
  }

  .btn-nav {
    display: none !important;
  }

  /* ── Hero ── */
  .hero {
    padding-top: 7rem;
    padding-bottom: 4rem;
  }

  .hero-content {
    text-align: center;
  }

  .btn-group {
    flex-direction: column;
    gap: 1rem;
  }

  .btn-group .btn {
    width: 100%;
  }

  /* ── Services ── */
  .services-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* ── Portfolio ── */
  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Always-visible overlay on touch (no hover) */
  .portfolio-overlay {
    opacity: 1 !important;
    background: linear-gradient(to top, rgba(10, 10, 15, 0.95) 0%, rgba(10, 10, 15, 0.3) 70%, transparent 100%) !important;
    backdrop-filter: blur(2px) !important;
  }

  .portfolio-title, .portfolio-category, .portfolio-link {
    transform: translateY(0) !important;
  }

  /* ── Process ── */
  .process-grid {
    grid-template-columns: 1fr;
  }

  .process-card {
    padding: 2rem 1.5rem;
    text-align: center;
    align-items: center;
  }

  /* ── Stats Banner ── */
  .stats-banner {
    flex-direction: column;
    padding: 2rem 1rem;
  }

  .stat-item {
    width: 100%;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
  }

  .stat-item:last-child {
    border-bottom: none;
  }

  .stat-divider {
    display: none;
  }

  /* ── Footer ── */
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-brand p {
    margin: 1rem auto 2rem;
  }

  .social-links {
    justify-content: center;
  }
}

/* ── 480px — Small Mobile ─────────────────────────────────────── */
@media screen and (max-width: 480px) {
  .container {
    padding: 0 1.25rem;
  }

  .section-padding {
    padding: 4rem 0;
  }

  h1 {
    font-size: 2.5rem;
  }

  .hero-badge {
    font-size: 0.8rem;
  }

  /* Hero stats */
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
  }

  .stat-card {
    flex-direction: row;
    text-align: left;
    justify-content: flex-start;
    padding: 1.25rem;
    gap: 1.5rem;
  }

  .stat-num {
    font-size: 2.2rem;
    margin-bottom: 0;
  }

  .stat-card p {
    font-size: 0.9rem;
    margin: 0;
  }

  /* Glow orbs */
  .glow-orb-1 { width: 200px; height: 200px; }
  .glow-orb-2 { width: 250px; height: 250px; }
}

/* ── 360px — Very Small Devices ──────────────────────────────── */
@media screen and (max-width: 360px) {
  .logo {
    font-size: 1.3rem;
  }

  h1 {
    font-size: 2.2rem;
  }
}

/* ── Accessibility: Reduced Motion ───────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .nav-links, .nav-links li {
    transition: none !important;
    transform: none !important;
  }
}
