/* ============================================
   포트폴리오 페이지 스타일
   ============================================ */

/* 페이지 기본 설정 */
.portfolio-page {
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ============================================
   헤더 섹션
   ============================================ */
.portfolio-header {
  padding: 120px 0 60px;
  text-align: center;
  position: relative;
}

.portfolio-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
  pointer-events: none;
  animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; transform: translateX(-50%) scale(1); }
  50% { opacity: 0.8; transform: translateX(-50%) scale(1.1); }
}

.header-content {
  position: relative;
  z-index: 1;
}

.portfolio-badge {
  display: inline-block;
  padding: 8px 20px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 50px;
  color: #818cf8;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.portfolio-title {
  font-size: 3.5rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 20px;
  line-height: 1.2;
}

.gradient-text {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.portfolio-subtitle {
  font-size: 1.125rem;
  color: #94a3b8;
  line-height: 1.8;
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================
   3D 갤러리 섹션
   ============================================ */
.portfolio-gallery-section {
  padding: 60px 0 200px;
  position: relative;
}

.gallery-container {
  position: relative;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  perspective: 2000px;
}

.gallery-3d {
  position: relative;
  width: 100%;
  height: 600px;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: grab;
}

.gallery-3d:active {
  cursor: grabbing;
}

.portfolio-item {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 400px;
  height: 500px;
  margin-left: -200px;
  margin-top: -250px;
  transform-style: preserve-3d;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-card {
  width: 100%;
  height: 100%;
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

.portfolio-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 30px 80px rgba(99, 102, 241, 0.3);
  border-color: rgba(99, 102, 241, 0.3);
}

.card-image {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.portfolio-card:hover .card-image img {
  transform: scale(1.1);
}

.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.9) 100%);
  display: flex;
  align-items: flex-end;
  padding: 30px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.portfolio-card:hover .card-overlay {
  opacity: 1;
}

.overlay-content {
  width: 100%;
}

.category-badge {
  display: inline-block;
  padding: 6px 12px;
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: 20px;
  color: #818cf8;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.overlay-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 15px;
}

.view-details-btn {
  padding: 10px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 25px;
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.view-details-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
}

/* ============================================
   갤러리 컨트롤
   ============================================ */
.gallery-controls {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  pointer-events: none;
  z-index: 10;
}

.control-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.3s ease;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.control-btn:hover {
  background: rgba(99, 102, 241, 0.3);
  border-color: rgba(99, 102, 241, 0.5);
  transform: scale(1.1);
}


/* ============================================
   인디케이터
   ============================================ */
.gallery-indicators {
  position: absolute;
  bottom: -120px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}

.indicator:hover {
  background: rgba(255, 255, 255, 0.5);
  transform: scale(1.2);
}

.indicator.active {
  width: 24px;
  border-radius: 4px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* ============================================
   상세정보 패널
   ============================================ */
.details-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 20px;
}

.details-panel.active {
  opacity: 1;
  visibility: visible;
}

.details-content {
  position: relative;
  max-width: 1200px;
  width: 100%;
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.95) 0%, rgba(22, 33, 62, 0.95) 100%);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 40px;
  transform: translateY(50px);
  transition: transform 0.3s ease;
}

.details-panel.active .details-content {
  transform: translateY(0);
}

.close-details-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.close-details-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: rgba(239, 68, 68, 0.5);
  transform: rotate(90deg);
}

.details-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.details-image {
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.details-image img {
  width: 100%;
  height: auto;
  display: block;
}

.details-info {
  color: #ffffff;
}

.details-category {
  display: inline-block;
  padding: 8px 16px;
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: 20px;
  color: #818cf8;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 15px;
}

.details-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #ffffff 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.details-description {
  font-size: 1.125rem;
  line-height: 1.8;
  color: #cbd5e1;
  margin-bottom: 30px;
}

.details-tech h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 15px;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}

.tech-tag {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  color: #e2e8f0;
  font-size: 0.875rem;
  font-weight: 500;
}

.details-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 30px;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.details-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

/* ============================================
   CTA 섹션
   ============================================ */
.portfolio-cta {
  padding: 80px 0;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.cta-content h2 {
  font-size: 2.5rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 20px;
  line-height: 1.3;
}

.cta-content p {
  font-size: 1.125rem;
  color: #94a3b8;
  margin-bottom: 30px;
}

.btn-primary-solid {
  display: inline-block;
  padding: 16px 40px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 30px;
  color: #ffffff;
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.btn-primary-solid:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(99, 102, 241, 0.5);
}

/* 포트폴리오 페이지 푸터 마진 제거 */
.portfolio-page + .footer-custom,
.portfolio-page ~ .footer-custom {
  margin-top: 0 !important;
}

/* ============================================
   반응형 디자인
   ============================================ */
@media (max-width: 1024px) {
  .portfolio-title {
    font-size: 2.5rem;
  }

  .gallery-3d {
    height: 500px;
  }

  .portfolio-item {
    width: 320px;
    height: 400px;
    margin-left: -160px;
    margin-top: -200px;
  }

  .details-inner {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .portfolio-header {
    padding: 100px 0 40px;
  }

  .portfolio-title {
    font-size: 2rem;
  }

  .portfolio-subtitle {
    font-size: 1rem;
  }

  .gallery-3d {
    height: 400px;
  }

  .portfolio-item {
    width: 280px;
    height: 350px;
    margin-left: -140px;
    margin-top: -175px;
  }

  .gallery-controls {
    padding: 0 10px;
  }

  .control-btn {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .details-content {
    padding: 30px 20px;
  }

  .details-title {
    font-size: 1.75rem;
  }

  .details-description {
    font-size: 1rem;
  }

  .cta-content h2 {
    font-size: 1.75rem;
  }

  .cta-content p {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .portfolio-title {
    font-size: 1.5rem;
  }

  .gallery-3d {
    height: 350px;
  }

  .portfolio-item {
    width: 240px;
    height: 300px;
    margin-left: -120px;
    margin-top: -150px;
  }

  .overlay-content h3 {
    font-size: 1.25rem;
  }

  .details-title {
    font-size: 1.5rem;
  }

  .cta-content h2 {
    font-size: 1.5rem;
  }
}
