/* ============================================
   hyeong™ 포트폴리오 — 공통 스타일시트
   참고: jiyounkim.com 레이아웃 규칙 적용
   모든 폰트 Bold (700) 통일 & 정교한 사이즈 조정
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* --- CSS 변수 --- */
:root {
  --color-bg:   #f3f3f3;           /* 업로드된 시그니처 라이트 쿨그레이 */
  --color-text: #000000;           /* 모두 블랙, 회색 없음 */

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Pretendard', sans-serif;
  --font-weight-bold: 700;         /* 전체 폰트 볼드 */

  /* 컨텐츠 좌우 여백 집중: 14vw로 여백 확장 */
  --pad: 14vw;
  --header-h: 68px;

  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* --- 리셋 --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body, button, input, select, textarea {
  font-family: var(--font);
  font-weight: var(--font-weight-bold);
  font-size: 15px;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
}

/* 텍스트 드래그 시 파란색 선택 효과 */
::selection {
  background-color: #0033ff;
  color: #ffffff;
}

::-moz-selection {
  background-color: #0033ff;
  color: #ffffff;
}



a { color: inherit; text-decoration: none; }
a:hover { opacity: 0.5; }

img { display: block; max-width: 100%; height: auto; }
ul, ol { list-style: none; }

/* ===== 헤더 ===== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  background: var(--color-bg);
  z-index: 1000;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
  /* 선 없음 */
}

/* 스크롤 다운 시 부드럽게 위로 사라지는 모션 */
.site-header.is-hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

/* 좌우 10vw 여백으로 화면 끝 기준 정렬 */
.header-inner {
  width: 100%;
  padding: 0 var(--pad);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo img { height: 28px; width: auto; }

.main-nav { display: flex; gap: 32px; align-items: center; }

.main-nav a {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.2px;
  text-transform: none;
  color: var(--color-text);
  transition: color 0.2s var(--ease), opacity 0.2s var(--ease);
}

.main-nav a.active {
  color: #0033ff !important;
  opacity: 1 !important;
}

/* 모바일 토글 */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 22px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  transition: all 0.3s var(--ease);
  transform-origin: center;
}

.menu-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-active span:nth-child(2) { opacity: 0; }
.menu-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== 메인 콘텐츠 ===== */
.main-content { padding-top: var(--header-h); }

/* 좌우 10vw 여백 래퍼 */
.content-wrapper { width: 100%; padding: 0 var(--pad); }



/* ===== 프로젝트 그리드 (work.html) ===== */
.projects-section { padding: 48px 0 120px; }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 24px;
}

.project-card a {
  display: block;
  position: relative;
  text-decoration: none;
  opacity: 1 !important;
}

.project-card a:hover,
.project-card a:active {
  opacity: 1 !important;
}

.project-card__image-wrap {
  position: relative;
  overflow: hidden;
  background: #eae8e1;
  aspect-ratio: 3 / 4;
  margin-bottom: 14px;
}

.project-card__image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 프로젝트 하단 감각적인 메타 정보 (시안 기반) */
.project-card__info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 2px 0 0 2px;
}

.project-card__meta-line {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--color-text);
  letter-spacing: -0.1px;
}

.project-card__meta-line span {
  font-weight: 500;
  margin-right: 4px;
}

/* ===== 프로젝트 디테일 ===== */
.project-detail { padding-bottom: 120px; }

.project-hero { padding: 72px 0 54px; }

.project-hero__title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.4px;
  text-transform: none;
  margin-bottom: 18px;
}

.project-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin-bottom: 22px;
}

.project-hero__meta-item {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text);
}

.project-hero__meta-item strong {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.2px;
  margin-bottom: 3px;
}

.project-hero__desc {
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.75;
  max-width: 640px;
  color: var(--color-text);
}

.project-images { display: flex; flex-direction: column; gap: 8px; }

.project-images img {
  width: 100%;
  height: auto;
  display: block;
}

/* ===== 시안 기반 정밀 디테일 레이아웃 ===== */
.detail-story-layout {
  padding: 32px 0 120px;
}

/* 좌우 여백을 조율하여 타이트하지도 너무 넓지도 않은 1080px 최적 중간 너비 지정 */
.detail-story-layout .content-wrapper {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 32px;
}

.detail-hero-media {
  margin-bottom: 56px;
}

.detail-hero-media img {
  width: 100%;
  height: auto;
  display: block;
}

.detail-overview {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  margin-bottom: 64px;
  align-items: start;
}

.overview-left {
  display: flex;
  flex-direction: column;
}

.overview-category {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.1px;
  color: #111111;
  margin-bottom: 10px;
}

.overview-title {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #000000;
  margin-bottom: 32px;
  line-height: 1.1;
}

.overview-meta-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.overview-meta-row {
  display: flex;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.5;
  color: #111111;
}

.overview-meta-row .label {
  width: 76px;
  flex-shrink: 0;
}

.overview-meta-row .value {
  color: #333333;
}

.overview-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 2px;
}

.overview-desc-p {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.75;
  color: #111111;
  letter-spacing: -0.01em;
  word-break: keep-all;
  overflow-wrap: break-word;
  text-wrap: pretty;
  max-width: 680px;
}

.detail-story-flow {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* 이미지 카드 블록 — 이미지 배경색(#f7f7f7)과 동일하게 채우고 적정 크기로 중앙 배치 */
.story-block {
  width: 100%;
  background-color: #f7f7f7;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 24px;
  box-sizing: border-box;
}

.story-block img {
  width: auto;
  max-width: 740px;
  max-height: 80vh;
  height: auto;
  object-fit: contain;
  display: block;
}

/* 꽉 찬 정사각형 스토리 블록 */
.story-block--square {
  aspect-ratio: 1 / 1;
  padding: 0;
  overflow: hidden;
}

.story-block--square img {
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
}

/* 꽉 찬 이미지 블록 (여백 없이 가득 채움) */
.story-block--full {
  padding: 0;
  overflow: hidden;
}

.story-block--full img {
  width: 100%;
  max-width: 100%;
  max-height: none;
  height: auto;
  display: block;
}

/* 2열 분할 세로형 배경 카드 그리드 (4, 5, 6, 7번 전용) */
.story-grid-2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  width: 100%;
}

.story-card {
  background-color: #f7f7f7;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  box-sizing: border-box;
}

.story-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 1:1 정사각형 2열 카드 */
.story-card--square {
  aspect-ratio: 1 / 1;
}

@media (max-width: 768px) {
  .story-grid-2col {
    grid-template-columns: 1fr;
  }
}

/* Grip 프로모션 비디오 블록 */
.detail-video-block {
  width: 100%;
  margin-top: 14px;
  overflow: hidden;
  background-color: #000000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.detail-video-block video {
  width: 100%;
  height: auto;
  display: block;
  outline: none;
}

/* 흑백 처리 영상 */
.video-grayscale {
  filter: grayscale(100%);
}

/* 프로토타입 섹션 (상단 스토리 흐름과 자연스럽게 연결) */
.prototype-section {
  margin-top: 14px;
}

.prototype-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.prototype-item {
  background-color: #ececec;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  overflow: hidden;
  box-sizing: border-box;
}

/* 첫 번째 프로토타입 이미지는 가로 2칸 확장 */
.prototype-item:first-child {
  grid-column: span 2;
}

.prototype-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 768px) {
  .story-block {
    padding: 24px 12px;
  }
  .story-block img {
    max-height: 68vh;
  }
  .prototype-grid {
    grid-template-columns: 1fr;
  }
  .prototype-item:first-child {
    grid-column: span 1;
  }
}

@media (max-width: 900px) {
  .detail-overview {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* 프로젝트 prev/next */
.project-nav {
  margin-top: 72px;
  padding-top: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.project-nav a, .project-nav__back {
  font-size: 13px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: -0.1px;
  color: var(--color-text);
}

/* ===== 푸터 ===== */
.site-footer {
  padding: 40px 0;
  position: relative;
  z-index: 10;
  background: var(--color-bg);
}

.footer-inner {
  width: 100%;
  padding: 0 var(--pad);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copyright {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
  text-transform: none;
  color: var(--color-text);
}

.footer-links {
  display: flex;
  gap: 28px;
  align-items: center;
}

.footer-links a {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
  text-transform: none;
  color: var(--color-text);
  cursor: pointer;
  padding: 4px 0;
  display: inline-block;
  transition: opacity 0.2s var(--ease);
}

.footer-links a:hover {
  opacity: 0.4;
}

/* ===== 유틸리티 ===== */
.fade-in { opacity: 0; transform: translateY(18px); transition: opacity 0.55s ease, transform 0.55s ease; }
.fade-in.is-visible { opacity: 1; transform: translateY(0); }

/* ===== 반응형 (태블릿) ===== */
@media (max-width: 900px) {
  :root { --pad: 8vw; }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== 반응형 (모바일) ===== */
@media (max-width: 640px) {
  :root { --header-h: 56px; --pad: 6vw; }

  body { font-size: 14px; }

  .menu-toggle { display: flex; }

  .main-nav {
    position: fixed;
    inset: 0;
    background: var(--color-bg);
    flex-direction: column;
    justify-content: center;
    gap: 32px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
  }

  .main-nav.is-open { opacity: 1; visibility: visible; }
  .main-nav a { font-size: 16px; }

  .projects-grid { grid-template-columns: 1fr; gap: 14px; }
  .projects-section { padding: 32px 0 72px; }
  .project-hero { padding: 36px 0 24px; }
  .project-hero__title { font-size: 24px; }
  .footer-inner { flex-direction: column; gap: 12px; text-align: center; }
}
