/* ===== RESPONSIVE STYLES ===== */

/* --- Tablet (≤1024px) --- */
@media (max-width: 1024px) {
  .hero-section {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
    padding-top: calc(var(--nav-h) + 60px);
  }
  .hero-description { margin: 0 auto 36px; }
  .hero-cta { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-visual { order: -1; }
  .hero-avatar-wrapper { width: 260px; height: 260px; }
  .pill-1,.pill-2,.pill-3,.pill-4 { display: none; }
  .hero-scroll-hint { display: none; }

  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-image-wrap { max-width: 400px; margin: 0 auto; }

  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .contact-info { text-align: center; }
  .contact-details { align-items: center; }
  .social-links { justify-content: center; }

  .gallery-preview-grid { columns: 3; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: span 2; }
}

/* --- Small Tablet (≤768px) --- */
@media (max-width: 768px) {
  :root { --nav-h: 64px; }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    flex-direction: column;
    background: rgba(10,14,26,0.97);
    backdrop-filter: blur(20px);
    padding: 24px;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
    z-index: 999;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-link { text-align: center; padding: 12px; border-radius: 10px; }
  .hamburger { display: flex; }
  .hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
  .hamburger.open span:nth-child(2) { opacity: 0; }
  .hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

  .section { padding: 72px 0; }
  .section-title { font-size: 1.8rem; }

  .projects-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .gallery-preview-grid { columns: 2; }

  .skills-grid { grid-template-columns: 1fr; }

  .form-row { grid-template-columns: 1fr; }
  .contact-form { padding: 24px; }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { grid-column: span 1; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }

  .lightbox-prev,.lightbox-next { padding: 8px; font-size: 1.5rem; }
}

/* --- Mobile (≤480px) --- */
@media (max-width: 480px) {
  .hero-title { font-size: 2rem; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { justify-content: center; }

  .gallery-preview-grid { columns: 1; }

  .projects-filter { gap: 6px; }
  .filter-btn { padding: 6px 14px; font-size: 0.8rem; }

  .btn { padding: 11px 22px; }
}

/* --- Blog & Gallery Pages --- */
@media (max-width: 768px) {
  .blog-hero, .gallery-hero { padding: 120px 0 60px; }
  .blog-list-grid { grid-template-columns: 1fr; }
  .gallery-masonry { columns: 1; }
  .post-content { padding: 0 16px; }
  .share-buttons { flex-wrap: wrap; }
}

/* --- Admin Pages --- */
@media (max-width: 768px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .admin-sidebar.open { display: flex; }
  .editor-toolbar { flex-wrap: wrap; gap: 4px; }
}
