/* ===================================
   Hero Projects CSS - 메인 왼쪽 대표 프로젝트 성과 패널
   =================================== */

.hero-projects {
  position: absolute;
  left: clamp(24px, 5vw, 120px);
  top: calc(50% + 10px);
  transform: translateY(-50%);
  width: 300px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 2;
}

.hero-projects-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  text-align: center;
}

.hero-project {
  padding: 14px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  transition: border-color 0.3s ease, background 0.3s ease;
}

.hero-project:hover {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(129, 140, 248, 0.5);
}

.hero-project-main,
.hero-project-result {
  background: none;
  border: none;
  font-family: inherit;
  color: var(--white);
  cursor: pointer;
}

.hero-project-main {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  border-radius: var(--radius);
}

.hero-project-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 60px;
}

.hero-project-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hero-project-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-project-name {
  font-size: 1.1rem;
  font-weight: 700;
}

.hero-project-tagline {
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--gray-light);
  word-break: keep-all;
}

.hero-project-arrow {
  font-size: 0.8rem;
  color: var(--gray-light);
  transition: transform 0.3s ease, color 0.3s ease;
}

.hero-project-main:hover .hero-project-arrow {
  color: var(--primary-light);
  transform: translateX(3px);
}

.hero-project-results {
  display: flex;
  gap: 6px;
  margin-top: 12px;
}

.hero-project-result {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 9px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.hero-project-result:hover {
  background: rgba(129, 140, 248, 0.25);
  border-color: var(--primary-light);
}

.hero-project-main:focus-visible,
.hero-project-result:focus-visible {
  outline: 2px solid var(--primary-light);
  outline-offset: 3px;
}

/* 등장 연출 (hero-intro.css 의 heroFadeUp 사용) */
.hero-anim #main .hero-projects-title,
.hero-anim #main .hero-project {
  opacity: 0;
}

.hero-anim #main.is-revealed .hero-projects-title,
.hero-anim #main.is-revealed .hero-project {
  animation: heroFadeUp 0.9s cubic-bezier(0.19, 1, 0.22, 1) 1s forwards;
}

.hero-anim #main.is-revealed .hero-project:nth-child(3) { animation-delay: 1.12s; }
.hero-anim #main.is-revealed .hero-project:nth-child(4) { animation-delay: 1.24s; }

/* 왼쪽 여백이 부족한 화면: 이력서 버튼 아래 가로 3열 */
@media (max-width: 1100px) {
  .hero-section {
    height: auto;
    max-height: none;
  }

  .hero-inner {
    min-height: 100vh;
    padding-top: calc(var(--header-height) + 24px);
    padding-bottom: 56px;
  }

  .hero-projects {
    position: static;
    transform: none;
    width: 100%;
    max-width: 720px;
    margin-top: 60px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .hero-projects-title {
    grid-column: 1 / -1;
  }

  .hero-project-main {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .hero-project-arrow {
    display: none;
  }

  .hero-project-results {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 600px) {
  /* 방문자 카운터와 배지가 겹치지 않도록 */
  .hero-inner {
    padding-top: calc(var(--header-height) + 44px);
  }

  .hero-projects {
    margin-top: 48px;
    gap: 8px;
  }

  .hero-project {
    padding: 10px 6px;
  }

  .hero-project-logo {
    width: 64px;
    height: 48px;
  }

  .hero-project-name {
    font-size: 0.85rem;
  }

  .hero-project-tagline {
    font-size: 0.7rem;
    min-height: 2.7em; /* 두 줄 기준으로 카드별 버튼 높이 맞춤 */
  }

  .hero-project-results {
    flex-direction: column;
    margin-top: 8px;
  }
}
