/* 모바일 반응형 + 햄버거 메뉴 */

/* 햄버거 버튼 (모바일에서만 표시) */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}
.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-main, #111);
  margin: 5px auto;
  transition: all 0.3s;
}
.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 768px) {
  /* 헤더 */
  header {
    padding: 15px 5% !important;
    position: relative;
  }
  .logo {
    font-size: 1.2rem !important;
  }
  .menu-toggle {
    display: block;
  }

  /* 네비게이션 */
  .header-right {
    position: fixed;
    top: 0;
    right: -280px;
    width: 260px;
    height: 100vh;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    padding: 70px 30px 30px;
    gap: 0;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 1000;
  }
  .header-right.open {
    right: 0;
  }
  nav {
    flex-direction: column;
    gap: 0 !important;
    width: 100%;
  }
  nav a {
    padding: 14px 0;
    font-size: 1.05rem !important;
    border-bottom: 1px solid #f0f0f0;
    display: block;
    width: 100%;
  }
  .lang-toggle {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eaeaea;
    width: 100%;
    justify-content: center;
  }

  /* 오버레이 */
  .menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 999;
  }
  .menu-overlay.active {
    display: block;
  }

  /* 메인 콘텐츠 */
  main {
    padding: 50px 5% !important;
  }
  .page-title {
    font-size: 1.6rem !important;
  }
  .page-desc {
    font-size: 0.95rem !important;
    margin-bottom: 30px !important;
  }

  /* index.html 타이틀 */
  h1 {
    font-size: 2.2rem !important;
    letter-spacing: -1px !important;
  }
  main p {
    font-size: 1rem !important;
  }

  /* about.html */
  h2 {
    font-size: 1.6rem !important;
  }
  .about-text {
    font-size: 1rem !important;
    line-height: 1.8 !important;
  }

  /* projects.html */
  .project-item {
    padding: 25px !important;
  }
  .project-title {
    font-size: 1.2rem !important;
  }
  .project-desc {
    font-size: 0.9rem !important;
  }
  .btn-group {
    gap: 8px !important;
  }
  .btn {
    padding: 8px 14px !important;
    font-size: 0.85rem !important;
  }

  /* releases.html */
  .tab-menu {
    gap: 8px !important;
    margin-bottom: 25px !important;
  }
  .tab-btn {
    font-size: 0.95rem !important;
    padding: 6px 12px !important;
  }

  /* docs.html */
  .shortcut-table {
    font-size: 0.8rem !important;
  }
  .shortcut-table th,
  .shortcut-table td {
    padding: 6px 8px !important;
  }
  .docs-content h2 {
    font-size: 1.2rem !important;
    margin-top: 30px !important;
  }
  .docs-content h3 {
    font-size: 1rem !important;
  }
  kbd {
    font-size: 0.75em !important;
    padding: 1px 4px !important;
  }

  /* 푸터 */
  footer {
    flex-direction: column !important;
    gap: 8px !important;
    text-align: center !important;
    padding: 30px 5% !important;
    margin-top: 30px !important;
    font-size: 0.8rem !important;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.8rem !important;
  }
  .page-title {
    font-size: 1.4rem !important;
  }
  .btn-group {
    flex-direction: column !important;
  }
  .btn {
    width: 100% !important;
  }
}
