@media (max-width: 920px) {
  :root {
    --container: min(100% - 28px, 720px);
  }

  .site-header {
    top: 12px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(8, 13, 20, 0.82);
    backdrop-filter: blur(18px);
  }

  .nav-toggle {
    display: grid;
  }

  .nav-toggle.is-open span:first-child {
    transform: translateY(3px) rotate(45deg);
  }

  .nav-toggle.is-open span:last-child {
    transform: translateY(-3px) rotate(-45deg);
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    display: grid;
    min-width: 220px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(8, 13, 20, 0.95);
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: transform 180ms ease, opacity 180ms ease;
  }

  .site-nav.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 22px;
    padding-top: 120px;
  }

  .hero-visual {
    min-height: 420px;
  }

  #character-canvas {
    min-height: 420px;
  }

  .skill-grid,
  .project-grid,
  .status-grid,
  .contact-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  :root {
    --container: min(100% - 24px, 440px);
  }

  .section {
    padding: 78px 0;
  }

  .hero {
    min-height: auto;
    padding-bottom: 46px;
  }

  h1 {
    font-size: clamp(2.5rem, 15vw, 4.7rem);
  }

  .hero-actions,
  .project-actions,
  .site-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .btn,
  .project-actions .btn {
    width: 100%;
  }

  .hero-visual {
    min-height: 340px;
  }

  #character-canvas {
    min-height: 340px;
  }

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

  .skill-card {
    min-height: 68px;
  }

  .music-toggle {
    right: 12px;
    bottom: 12px;
    min-height: 38px;
    padding: 0 11px;
    font-size: 0.86rem;
  }
}
