/*
 * 헤더 Project 드롭다운 (main.html, project.html, project-detail.html 공통)
 * Figma 261113_랜딩_Project: 1693:5501(기본), 1693:6116(액티브)
 */
.project-menu {
  position: relative;
  height: 24px;
  margin-left: 30px;
}

.project-menu__toggle {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 20px;
  text-align: left;
}

.project-menu__list {
  position: absolute;
  z-index: 10;
  top: 35px;
  left: 50%;
  display: flex;
  min-width: 152px;
  /* 항목이 5개 이상이면 4개 높이까지만 보이고 나머지는 목록 안에서 스크롤한다.
     (항목 20px × 4 + 간격 13px × 3 + 상하 여백 17px × 2 + 테두리 2px) */
  max-height: 155px;
  flex-direction: column;
  gap: 13px;
  margin: 0;
  padding: 17px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #072012;
  border-radius: 8px;
  background: #010a05;
  list-style: none;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
  scrollbar-width: thin;
  transform: translateX(-50%);
}

/* main.css 처럼 [hidden] 기본 규칙이 없는 페이지에서도 닫힌 상태를 유지한다. */
.project-menu__list[hidden] {
  display: none;
}

.project-menu__list li {
  display: flex;
  flex: 0 0 auto;
}

/* 토글과 목록 사이 빈 공간(11px)에서 hover가 끊기지 않게 한다. */
.project-menu.is-open::after {
  position: absolute;
  top: 100%;
  right: -48px;
  left: -48px;
  height: 11px;
  content: "";
}

.project-menu__link {
  position: relative;
  display: inline-block;
  color: rgba(255, 255, 255, 0.8);
  font-family: "Pretendard", sans-serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 20px;
  white-space: nowrap;
  transition: color 160ms ease;
}

.project-menu__link:hover,
.project-menu__link:focus-visible {
  color: #fff;
}

.project-menu__link[aria-current="page"] {
  color: #fff;
  font-weight: 500;
}

.project-menu__link[aria-current="page"]::after {
  position: absolute;
  top: 22px;
  right: 0;
  left: 1px;
  height: 1px;
  background: #fff;
  content: "";
}

.project-menu__link:focus-visible {
  outline: 2px solid #f3dfaf;
  outline-offset: 4px;
}

html[lang="en"] .project-menu__link {
  font-family: "Poppins", sans-serif;
}

@media (prefers-reduced-motion: reduce) {
  .project-menu__link {
    transition: none;
  }
}
