/* =========================================
   포트폴리오 슬라이더 스타일시트 (style.css)
   ========================================= */

:root {
  --bg-main: #0c0f17;
  --bg-card: rgba(23, 27, 38, 0.85);
  --bg-card-hover: rgba(33, 39, 56, 0.95);
  --accent-color: #6366f1;
  --accent-light: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.35);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.6);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.45);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slide: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

/* 리셋 & 기본 설정 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Pretendard", sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at 50% 10%, #1e1b4b 0%, var(--bg-main) 60%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* 커스텀 스크롤바 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-color);
}

/* 링크 기본 */
a {
  color: inherit;
  text-decoration: none;
}

/* =========================================
   헤더
   ========================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(12, 15, 23, 0.75);
  border-bottom: 1px solid var(--border-color);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--text-main);
}

.logo span {
  color: var(--accent-light);
}

.nav-menu {
  display: flex;
  gap: 28px;
}

.nav-menu a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition-smooth);
  position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--text-main);
}

.nav-menu a.active::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-color);
  border-radius: 2px;
}

/* =========================================
   메인 레이아웃 & 공통
   ========================================= */
main {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.section-header {
  text-align: center;
  margin-bottom: 36px;
}

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-light);
  background: rgba(99, 102, 241, 0.12);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
  border: 1px solid rgba(99, 102, 241, 0.25);
}

.section-title {
  font-size: 2.3rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #ffffff 40%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* =========================================
   슬라이더 섹션
   ========================================= */
.slider-section {
  position: relative;
  margin-bottom: 60px;
}

.slider-wrapper {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
  user-select: none;
}

.slider-container {
  width: 100%;
  height: 560px;
  position: relative;
  overflow: hidden;
  cursor: grab;
}

.slider-container:active {
  cursor: grabbing;
}

.slider-track {
  display: flex;
  height: 100%;
  width: 100%;
  transition: var(--transition-slide);
  will-change: transform;
}

/* 슬라이드 개별 아이템 */
.slide-item {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #05070c;
  overflow: hidden;
}

/* 이미지 배경 블러 효과 (화면 여백을 자연스럽게 채움) */
.slide-bg-blur {
  position: absolute;
  top: -15%;
  left: -15%;
  width: 130%;
  height: 130%;
  background-size: cover;
  background-position: center;
  filter: blur(35px) brightness(0.35);
  opacity: 0.7;
  pointer-events: none;
  transform: scale(1.1);
}

/* 메인 이미지 */
.slide-img {
  position: relative;
  max-width: 94%;
  max-height: 94%;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  z-index: 2;
  transition: transform 0.4s ease;
  cursor: zoom-in;
}

.slide-img:hover {
  transform: scale(1.015);
}

/* =========================================
   좌우 내비게이션 버튼
   ========================================= */
.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition-smooth);
}

.nav-btn:hover {
  background: var(--accent-color);
  color: #fff;
  border-color: var(--accent-light);
  box-shadow: 0 0 20px var(--accent-glow);
  transform: translateY(-50%) scale(1.08);
}

.prev-btn {
  left: 18px;
}

.next-btn {
  right: 18px;
}

/* =========================================
   컨트롤 바 (상단 우측/하단)
   ========================================= */
.slider-controls {
  position: absolute;
  top: 18px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 10;
}

.slide-counter {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.slide-counter .current-index {
  color: var(--accent-light);
}

.slide-counter .divider {
  color: var(--text-dim);
}

.slide-counter .total-count {
  color: var(--text-muted);
}

.control-actions {
  display: flex;
  gap: 8px;
}

.action-btn {
  width: 36px;
  height: 36px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.25);
}

/* =========================================
   인디케이터 점(Dots)
   ========================================= */
.dots-container {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: var(--transition-smooth);
  border: none;
  outline: none;
}

.dot:hover {
  background: rgba(255, 255, 255, 0.7);
}

.dot.active {
  width: 26px;
  border-radius: 6px;
  background: var(--accent-light);
  box-shadow: 0 0 10px var(--accent-glow);
}

/* =========================================
   작업 정보 카드
   ========================================= */
.work-info-card {
  margin-top: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px 30px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.work-category {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent-light);
  margin-bottom: 6px;
  display: inline-block;
}

.work-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.work-desc {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* =========================================
   썸네일 퀵 바
   ========================================= */
.thumbnail-wrapper {
  margin-top: 36px;
}

.thumbnail-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}

.thumbnail-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.thumbnail-hint {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.thumbnail-list {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 8px 4px 16px;
  scroll-behavior: smooth;
}

.thumbnail-item {
  flex: 0 0 160px;
  height: 110px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  border: 2px solid transparent;
  background: #000;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-sm);
}

.thumbnail-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease, filter 0.3s ease;
  filter: brightness(0.75);
}

.thumbnail-item:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.5);
}

.thumbnail-item:hover img {
  filter: brightness(0.95);
  transform: scale(1.05);
}

.thumbnail-item.active {
  border-color: var(--accent-color);
  box-shadow: 0 0 16px var(--accent-glow);
  transform: translateY(-2px);
}

.thumbnail-item.active img {
  filter: brightness(1);
}

/* =========================================
   About & Contact 섹션
   ========================================= */
.about-section,
.contact-section {
  margin-top: 80px;
}

.about-card,
.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 44px;
  backdrop-filter: blur(12px);
}

.sub-heading,
.contact-card h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.about-card > p,
.contact-card > p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 800px;
  margin-bottom: 32px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.feature-item {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: var(--transition-smooth);
}

.feature-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-focus);
  transform: translateY(-3px);
}

.feature-icon {
  font-size: 1.8rem;
  display: inline-block;
  margin-bottom: 12px;
}

.feature-item h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
  color: var(--text-main);
}

.feature-item p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.contact-card {
  text-align: center;
}

.contact-card > p {
  margin-left: auto;
  margin-right: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  transition: var(--transition-smooth);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-color) 0%, #4f46e5 100%);
  color: #fff;
  box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(99, 102, 241, 0.5);
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent-color) 100%);
}

/* =========================================
   라이트박스 모달 (Lightbox Modal)
   ========================================= */
.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(6, 8, 14, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.lightbox-content {
  position: relative;
  z-index: 10;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.2, 1, 0.3, 1);
}

.lightbox-modal.active .lightbox-content {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: -48px;
  right: 0;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.lightbox-close:hover {
  background: #ef4444;
  border-color: #ef4444;
  transform: rotate(90deg);
}

.lightbox-image-wrapper {
  max-width: 85vw;
  max-height: 75vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
}

.lightbox-image-wrapper img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.lightbox-caption {
  margin-top: 16px;
  text-align: center;
}

.lightbox-caption h3 {
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 4px;
}

.lightbox-caption p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* =========================================
   푸터
   ========================================= */
.site-footer {
  text-align: center;
  padding: 36px 20px;
  border-top: 1px solid var(--border-color);
  font-size: 0.9rem;
  color: var(--text-dim);
  background: rgba(12, 15, 23, 0.9);
}

/* =========================================
   반응형 미디어 쿼리 (Responsive)
   ========================================= */
@media (max-width: 900px) {
  .slider-container {
    height: 440px;
  }
  .section-title {
    font-size: 1.9rem;
  }
}

@media (max-width: 640px) {
  main {
    padding: 24px 16px 60px;
  }
  .header-container {
    padding: 14px 16px;
  }
  .slider-container {
    height: 320px;
  }
  .nav-btn {
    width: 42px;
    height: 42px;
  }
  .prev-btn {
    left: 8px;
  }
  .next-btn {
    right: 8px;
  }
  .section-title {
    font-size: 1.5rem;
  }
  .work-info-card {
    padding: 18px 20px;
  }
  .work-title {
    font-size: 1.3rem;
  }
  .thumbnail-item {
    flex: 0 0 120px;
    height: 85px;
  }
  .about-card,
  .contact-card {
    padding: 28px 20px;
  }
  .lightbox-close {
    top: -42px;
    right: 4px;
    width: 34px;
    height: 34px;
  }
}
