/* ===== 새 사이트 전용 스타일 (예전 PORTFOLIO 페이지 안에 있던 스타일 + GALLERY 타일) ===== */

.crisp, .portfolio-gallery img, .portfolio-view-image img {
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}

/* PORTFOLIO: 정사각형 썸네일 */
.portfolio-gallery {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}
.portfolio-gallery .portfolio-item {
  position: relative;
  display: block;
  width: 200px;
  aspect-ratio: 1 / 1;
  box-shadow: 0 0 3px black;
  overflow: hidden;
}
.portfolio-gallery .portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
}
.portfolio-gallery .portfolio-item:hover { box-shadow: 0 0 10px black !important; cursor: pointer; }
@media (max-width: 700px) {
  .portfolio-gallery .portfolio-item { width: calc(50% - 5px) !important; }
}

/* GALLERY / PHOTO: 줄 맞춤 타일 (예전 Unite Gallery 모양) */
.justified-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin: 10px 0 30px;
}
.justified-gallery::after { content: ""; flex-grow: 999; }
.justified-gallery a {
  flex: 1 1 auto;
  height: 160px;
  overflow: hidden;
  border: 1px solid #ddd;
}
.justified-gallery img {
  height: 100%;
  width: 100%;
  min-width: 120px;
  object-fit: cover;
  display: block;
  transition: opacity .2s;
}
.justified-gallery a:hover img { opacity: .85; }
@media (max-width: 700px) { .justified-gallery a { height: 110px; } }

/* 라이트박스 (크게 보기) */
@keyframes opacityFadeIn { from { opacity: 0; } to { opacity: 1; } }
.portfolio-view-bg {
  position: fixed; inset: 0;
  display: none;
  justify-content: center; align-items: center;
  background-color: #000000aa;
  z-index: 1000;
}
.portfolio-view-bg.active { display: flex !important; animation: opacityFadeIn .4s ease-in-out; }
.portfolio-view-viewport {
  position: relative;
  display: flex; justify-content: center; align-items: center;
  width: 80%; max-width: 1200px;
}
.portfolio-view-image { position: relative; width: 100%; text-align: center; }
.portfolio-view-image img { max-width: 100%; max-height: 85vh; }
.portfolio-view-control { position: absolute; inset: 0; pointer-events: none; }
.portfolio-view-btn, .portfolio-view-exitbtn { pointer-events: auto; }
.portfolio-view-btn {
  position: absolute; top: 50%;
  display: flex; justify-content: center; align-items: center;
  width: 50px; height: 50px; border-radius: 50%;
  background-color: #999; opacity: .2;
  transform: translateY(-50%); transition: .2s;
}
.portfolio-view-btn:hover { cursor: pointer; opacity: .5; }
.portfolio-view-btn .icon { height: 60%; }
.portfolio-view-btn.right { right: -25px; }
.portfolio-view-btn.left { left: -25px; }
.portfolio-view-exitbtn { position: absolute; top: -40px; right: 0; width: 30px; height: 30px; cursor: pointer; }
.portfolio-view-exitbtn::before, .portfolio-view-exitbtn::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 100%; height: 4px; border-radius: 2px; background-color: #ccc; transition: .2s;
}
.portfolio-view-exitbtn::before { transform: translate(-50%, -50%) rotate(45deg); }
.portfolio-view-exitbtn::after { transform: translate(-50%, -50%) rotate(-45deg); }
.portfolio-view-exitbtn:hover::before, .portfolio-view-exitbtn:hover::after { background-color: #999; }

/* 유튜브 영상이 모바일 화면 밖으로 넘치지 않게 */
.entry-content iframe { max-width: 100%; }
