/* 크리티컬 대표홈페이지 — projects 화면 스타일 (원본 Vue 컴포넌트 scoped 스타일을 전역으로 옮김) */

/* ── views/portfolio/modules/PjHero.vue ── */
.pj-hero {
  padding: calc(var(--header-h) + 96px) 0 56px;
  color: #fff;
}
.pj-hero__eyebrow {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--brand);
  animation: pj-rise 0.9s var(--ease) both;
}
/* 강조 — 다른 페이지 히어로와 같은 빨강 */
.pj-hero__title em {
  font-style: normal;
  color: var(--brand);
}
.pj-hero__title {
  margin-top: 20px;
  font-size: clamp(34px, 4.6vw, 72px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.05em;
  word-break: keep-all;
  animation: pj-rise 0.9s var(--ease) 0.1s both;
}
.pj-hero__lead {
  margin-top: 28px;
  max-width: 640px;
  font-size: clamp(16px, 1.25vw, 20px);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.75);
  word-break: keep-all;
  animation: pj-rise 0.9s var(--ease) 0.2s both;
}
.pj-hero__count {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  margin-top: 36px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.6);
  animation: pj-rise 0.9s var(--ease) 0.3s both;
}
.pj-hero__count b {
  font-family: var(--font-display);
  font-size: 20px;
  color: #fff;
}
.pj-hero__note {
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-eng);
  line-height: 1.5;
  word-break: keep-all;
}
@keyframes pj-rise {
  from {
    opacity: 0;
    transform: translateY(32px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .pj-hero * {
    animation: none;
  }
}
@media (max-width: 768px) {
  .pj-hero {
    padding: calc(var(--header-h) + 48px) 0 32px;
  }
  .pj-hero__title br {
    display: none;
  }
  .pj-hero__lead {
    margin-top: 18px;
  }
  .pj-hero__count {
    margin-top: 24px;
    font-size: 14px;
  }
}

/* ── views/portfolio/modules/PjList.vue ── */
.pj-list {
  position: relative;
  z-index: 1;
  padding-bottom: 120px;
  color: #fff;
}
.pj-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

/* 모자이크 — 화면 끝까지, 칸 사이는 얇은 선만 */
.pj-mosaic {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.pj-row {
  display: flex;
  gap: 3px;
  height: clamp(260px, 27vw, 460px);
}
.pj-row.is-two {
  height: clamp(300px, 33vw, 560px);
}
/* 마우스를 올린 장이 옆으로 늘어나는 아코디언 */
.pj-tile {
  position: relative;
  flex: var(--w) 1 0;
  min-width: 0;
  overflow: hidden;
  background: #222;
  transition: flex-grow 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.pj-row:hover .pj-tile {
  flex-grow: calc(var(--w) * 0.8);
}
.pj-row .pj-tile:hover,
.pj-row .pj-tile:focus-visible {
  flex-grow: calc(var(--w) * 1.9);
}
.pj-tile:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: -3px;
}
.pj-tile__img {
  position: absolute;
  inset: 0;
}
.pj-tile__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.15);
  transition:
    opacity 0.8s,
    transform 1.2s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.5s;
}
.pj-tile__img img.is-loaded {
  opacity: 1;
}
/* 다른 장에 마우스가 있으면 나머지는 살짝 어둡고 흐리게 */
.pj-mosaic:hover .pj-tile:not(:hover) .pj-tile__img img {
  filter: grayscale(0.6) brightness(0.55);
}
.pj-tile:hover .pj-tile__img img {
  transform: scale(1.04);
}
.pj-tile__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 40%, rgba(0, 0, 0, 0.78));
}
/* 큰 번호 — 왼쪽 위 */
.pj-tile__no {
  position: absolute;
  top: 14px;
  left: 20px;
  font-family: var(--font-display);
  font-size: clamp(36px, 4vw, 64px);
  font-weight: 800;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.7);
  transition:
    color 0.4s,
    -webkit-text-stroke-color 0.4s;
}
.pj-tile:hover .pj-tile__no {
  color: var(--brand);
  -webkit-text-stroke-color: var(--brand);
}
.pj-tile__cap {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pj-tile__meta {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
}
.pj-tile__cap b {
  font-size: clamp(17px, 1.5vw, 22px);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.02em;
  word-break: keep-all;
}
/* 요약은 마우스를 올렸을 때만 올라옴 */
.pj-tile__sum {
  max-height: 0;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  opacity: 0;
  transform: translateY(8px);
  transition:
    max-height 0.5s,
    opacity 0.4s 0.1s,
    transform 0.4s 0.1s;
}
.pj-tile:hover .pj-tile__sum {
  max-height: 80px;
  opacity: 1;
  transform: none;
}

/* 등장: 줄이 화면에 들어오면 칸마다 아래에서 위로 걷히며 사진이 제자리로 줄어듦
   (잘린 요소는 화면 감지가 안 되므로 줄 단위로 감지) */
.pj-row[data-show]:not([data-show='in']) .pj-tile {
  clip-path: inset(100% 0 0 0);
}
.pj-row[data-show='in'] .pj-tile {
  clip-path: inset(0 0 0 0);
  transition:
    clip-path 1s cubic-bezier(0.76, 0, 0.24, 1) var(--d),
    flex-grow 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.pj-row[data-show='in'] .pj-tile__img img.is-loaded {
  transform: scale(1);
}
.pj-row[data-show='in'] .pj-tile:hover .pj-tile__img img {
  transform: scale(1.04);
}

/* 'VIEW' 커서 */
.pj-cursor {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 5;
  pointer-events: none;
}
.pj-cursor i {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  margin: -46px 0 0 -46px;
  border-radius: 50%;
  background: var(--brand);
  font-family: var(--font-display);
  font-size: 14px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #fff;
  transform: scale(0);
  transition: transform 0.35s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.pj-cursor.is-on i {
  transform: scale(1);
}

.pj-empty {
  padding: 80px var(--gutter);
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
}
.pj-empty button {
  min-height: 48px;
  margin-top: 20px;
  padding: 0 24px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  background: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

/* 쪽 번호 — 한 쪽 16건을 넘으면 (2026-11-04 사용자). 빈 안내의 단추와 같은 결 */
.pj-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 48px var(--gutter) 0;
}
.pj-pager a,
.pj-pager strong,
.pj-pager span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  transition: background 0.3s, border-color 0.3s;
}
.pj-pager a:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.1);
}
.pj-pager strong {
  background: #fff;
  color: #111;
  border-color: #fff;
}
.pj-pager span {
  opacity: 0.35;
}

@media (hover: none) {
  .pj-cursor {
    display: none;
  }
}
@media (max-width: 768px) {
  .pj-list {
    padding-bottom: 80px;
  }
  .pj-mosaic,
  .pj-row {
    gap: 2px;
  }
  .pj-row,
  .pj-row.is-two {
    height: 56vw;
  }
  .pj-row:not(.is-two) {
    height: 62vw;
  }
  .pj-tile__no {
    top: 10px;
    left: 12px;
    font-size: 30px;
  }
  .pj-badge {
    top: 10px;
    right: 10px;
  }
  .pj-tile__cap {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }
  .pj-tile__meta {
    font-size: 11px;
  }
  .pj-tile__cap b {
    font-size: 14px;
  }
  .pj-tile__sum {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pj-row[data-show] .pj-tile,
  .pj-row[data-show='in'] .pj-tile {
    clip-path: none;
    transition: none;
  }
  .pj-tile__img img {
    transform: none;
  }
}

/* ── views/portfolio/index.vue ── */
/* 페이지 전체 다크 (route meta.darkPage) — 푸터와 같은 톤으로 이어지게 */
.portfolio {
  background: var(--dark);
  overflow-x: clip;
}
