/* ===== Responsive rules (desktop-first). Test targets: 1440 / 768 / 390. ===== */
@media (max-width: 1180px) {
  .masonry--3 { --cols: 2; }
}

/* Mobile + tablet: no profile panel, full-width content, bottom nav */
@media (max-width: 900px) {
  body::before, body::after { display: none; }
  body { background: var(--surface); }
  .stage { display: block; padding: 0; }
  .shell { display: block; width: 100%; height: 100dvh; min-height: 0; border-radius: 0; box-shadow: none; }
  .profile { display: none; }
  .content { margin: 0; height: 100%; border-radius: 0; padding: 1.2rem 1.25rem calc(120px + env(safe-area-inset-bottom)); }
  .side-controls {
  position: static;
  display: contents;
}
  .section-title { padding-right: 3.6rem; margin-bottom: 1.4rem; font-size: 1.8rem; }

  .about-profile { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .4rem; margin: 1rem 0 1.5rem; color: var(--heading); }
  .about-profile .avatar { width: 150px; height: 150px; border-color: #fff; margin-bottom: .6rem; }
  .about-profile .profile__greeting { font-weight: 600; font-size: 1.1rem; }
  .about-profile .profile__name { font-size: 1.6rem; }
  /* .about-profile .profile__title::after { display: none; } */
  .about-intro { grid-template-columns: 1fr; gap: 1.2rem; }

/*   .nav {
    top: auto; right: auto; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom)); transform: translateX(-50%);
    width: min(92vw, 460px); flex-direction: row; justify-content: space-around; gap: 0; padding: .55rem .6rem;
  } */

  .nav {
  position: fixed;

  top: auto;
  right: auto;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom));

  transform: translateX(-50%);

  width: min(75vw, 460px);

  flex-direction: row;
  justify-content: space-around;

  gap: 0;
  padding: 7px 20px;

  z-index: 100;
}

  .nav__item { width: auto; flex: 1; height: auto; padding: .35rem .2rem; border-radius: var(--radius-lg); gap: 5px; }
  .nav__item .icon { font-size: 18px; }
  .nav__label { display: block; font-size: 9px; text-transform: uppercase; letter-spacing: .02em; }
/*   .theme-toggle { top: 12px; right: 14px; bottom: auto; width: 44px; height: 44px; font-size: 1.2rem; border: 1px solid var(--border); }
} */
 .theme-toggle {
  position: fixed;

  top: 12px;
  right: 14px;
  bottom: auto;
  left: auto;

  width: 44px;
  height: 44px;

  font-size: 1.2rem;
  border: 1px solid var(--border);

  z-index: 100;
}

@media (max-width: 640px) {
  .grid-equal { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .masonry, .masonry--3 { --cols: 1; }
  .sub-title { margin-top: 1.8rem; font-size: 1.2rem; }
  .case-title { font-size: 1.3rem; }
}
