/* ========================================================================
   responsive.css - breakpoints: 1080 / 900 (nav) / 720 / 520
   ======================================================================== */

@media (max-width: 1080px) {
  .section-head { grid-template-columns: 1fr; gap: var(--sp-2); }
  .section-index { padding-top: 0; }
  .section-head h2,
  .section-head h1.section-h1 { max-width: 20ch; }

  .exp-grid { grid-template-columns: repeat(2, 1fr); }

  .perf-layout { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .about-figure { max-width: 380px; }
  .remote-layout { grid-template-columns: 1fr; }
  .footer-top {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .footer-brand { grid-column: 1 / -1; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-form { max-width: 34rem; }
}

@media (max-width: 900px) {
  :root { --header-h: 84px; --header-h-scrolled: 68px; }

  /* hero stacks: copy first, 3D scene below */
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .hero-copy-col { max-width: none; }
  .brand-logo { height: 54px; }
  .is-scrolled .brand-logo { height: 44px; }

  .primary-nav,
  .header-actions { display: none; }
  .nav-toggle { display: flex; }

  .work-item,
  .work-item:nth-child(even) { grid-template-columns: 1fr; }
  .work-media,
  .work-item:nth-child(even) .work-media { grid-column: 1 / -1; order: 0; }
  .work-body,
  .work-item:nth-child(even) .work-body { grid-column: 1 / -1; }

  .why-grid { grid-template-columns: 1fr; border-top: 0; }
  .why-col {
    border-right: 0;
    border-top: 1px solid var(--border);
    padding: var(--sp-4) 0;
  }
  .why-col:last-child { padding-bottom: 0; }

  .blog-link { grid-template-columns: 1fr; gap: var(--sp-3); }
  .blog-thumb { aspect-ratio: 16 / 9; }
  .blog-cue { align-self: start; }
}

@media (max-width: 720px) {
  :root {
    --fs-hero: clamp(2.5rem, 1.9rem + 3.4vw, 3rem);
    --section-pad: clamp(3.5rem, 2.5rem + 6vw, 5rem);
  }

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

  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat { padding: var(--sp-4); }
  .stat:nth-child(odd) { padding-left: 0; }
  .stat:nth-child(even) { border-right: 0; padding-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .stat-label { max-width: none; }

  .perf-score { flex-direction: column; text-align: center; align-items: center; }

  .skill-row { grid-template-columns: 1fr; gap: var(--sp-2); }

  .review { grid-template-columns: 1fr; gap: var(--sp-1); }
  .review-mark { font-size: 2rem; }

  .hero-actions .btn { flex: 1 1 100%; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .footer-bottom .f-built { margin-right: 0; }

  .contact-details div { flex-direction: column; gap: 0.3rem; }
  .contact-details dd { text-align: left; }
}

@media (max-width: 520px) {
  :root {
    --gutter: 1.25rem;
    --header-h: 72px;
    --header-h-scrolled: 64px;
  }
  .timeline-step { padding-left: 2.75rem; }
  .footer-sitemap ul { grid-template-columns: 1fr; }
  .brand-logo,
  .is-scrolled .brand-logo { height: 40px; }
}
