:root {
  --ink: #cccccc;
  --paper: #000000;
  --line: rgba(255, 255, 255, 0.12);
  --muted: #888888;
  --gutter: 10px;
  --lightbox-bg: rgba(0, 0, 0, 0.95);
  --sidebar-w: 220px;
  --max-content-width: 1620px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.site-container {
  display: flex;
  width: 100%;
  max-width: var(--max-content-width);
  margin: 0 auto;
  min-height: 100vh;
}

/* PC 헤더 */
.site-header {
  position: sticky;
  top: 0;
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  height: 100vh;
  border-right: 1px solid var(--line);
  background: var(--paper);
  z-index: 20;
  flex-shrink: 0;
}

.site-header-inner {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 100%;
  padding: 48px 36px;
  gap: 32px;
}

.site-header .brand {
  display: block;
  width: 100%;
  max-width: 120px;
  text-decoration: none;
}

.site-header .brand img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  margin-left: 13px; /* 메뉴 로고 이 값을 조절해서 이동 정도 조절 */
}

.nav-toggle {
  display: none;
}

.site-header nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  font-size: 20px;
  margin-top: 0;
  margin-left: 18px; /* 메뉴 좌측여백 이 값을 조절해서 이동 정도 조절 */
}

.site-header nav a {
  color: #888888;
  text-decoration: none;
  opacity: 0.8;
  transition: opacity .2s ease, color .2s ease;
}

.site-header nav a:hover,
.site-header nav a.active {
  color: #ffffff;
  opacity: 1;
}

/* 클릭된 메뉴는 마우스를 떼어도 hover와 같은 색상을 유지 */
.site-header nav a.active {
  font-weight: 400;
}

/* 현재 페이지 제목은 모바일에서만 표시합니다. */
.mobile-page-title {
  display: none;
}

.page-content {
  flex: 1;
  min-width: 0;
  padding-top: 48px;
}

/* 우측 상단 태그 메뉴 */
.tag-nav {
  display: flex;
  gap: 28px;
  font-size: 16px;
  justify-content: left;
  flex-wrap: wrap;
  padding: 0 40px 24px;
}

.tag-nav a {
  color: #888888;
  text-decoration: none;
  opacity: 0.8;
  transition: opacity .2s ease, color .2s ease;
}

.tag-nav a:hover,
.tag-nav a.active {
  color: #ffffff;
  opacity: 1;
}

.gallery {
  width: 100%;
  padding: 0 40px 80px;
  display: flex;
  align-items: flex-start;
  gap: var(--gutter);
}

.gallery-col {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-width: 0;
  gap: var(--gutter);
}

.gallery figure {
  margin: 0;
  width: 100%;
  opacity: 0;
  transition: opacity 1.2s ease;
  will-change: opacity;
}

.gallery figure.is-loaded {
  opacity: 1;
}

.gallery figure a {
  display: block;
  overflow: hidden;
  line-height: 0;
  width: 100%;
  text-decoration: none;
}

.gallery figure img,
.gallery figure video {
  display: block;
  width: 100%;
  height: auto;
  cursor: zoom-in;
  object-fit: cover;
}

/* ---------- 모바일 스타일 수정 ---------- */
@media (max-width: 900px) {
  .site-container {
    flex-direction: column;
  }

  .site-header {
    position: sticky;
    top: 0;
	margin-top: 0px; /* ← 이게 로고(헤더 전체) 위쪽 여백 */
    width: 100%;
    min-width: 100%;
    height: 90px;
    border-right: none;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
    z-index: 100;
  }

  .site-header-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 20px;
    gap: 0;
    position: relative;
  }

  /* 모바일 로고 좌측 배치 */
  .site-header .brand {
    max-width: 70px;
    z-index: 102;
    margin: 0;
  }

  /* 3줄 햄버거 버튼 강제 노출 및 우측 정렬 */
  .nav-toggle {
    display: flex !important;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 16px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 102;
    margin: 0;
  }



  .nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #888888;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease;
  }

  /* 메뉴 열림 상태 - ✕ 버튼 */
  .site-header.is-open .nav-toggle span {
    background-color: #aaaaaa;
  }

  .site-header.is-open .nav-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .site-header.is-open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  .site-header.is-open .nav-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* 풀스크린 메뉴 오버레이 */
  .site-header nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
	margin: 0; /* ← 이 줄 추가: PC용 margin-left: 18px가 모바일에 새어 들어오는 걸 막음 */
    background: #000000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    padding: 0;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    z-index: 101;
  }

  .site-header nav.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .site-header nav a {
    font-size: 32px;
    font-weight: 400;
    letter-spacing: -0.02em;
    color: #888888;
    text-decoration: none;
    opacity: 0.9;
  }

  .site-header nav a:hover,
  .site-header nav a.active {
    color: #ffffff;
  }

  /* 모바일: 기존 위치 그대로 상단 바 중앙에 현재 페이지 표시 */
  .mobile-page-title {
    display: block;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    padding: 0;
    font-size: 16px;
    line-height: 1.2;
    font-weight: 400;
    color: #ffffff;
    letter-spacing: 0.05em;
    pointer-events: none;
    z-index: 102;
  }

  .page-content {
    width: 100%;
    padding-top: 12px;
  }

  /* 태그 버튼 헤더 아래 우측 정렬 */
  .tag-nav {
    justify-content: flex-end;
    gap: 12px;
    padding: 8px 20px 16px;
  }
}

@media (max-width: 640px) {
  .gallery {
    padding: 0 12px 60px;
  }
  :root {
    --gutter: 5px;
  }
}

/* 라이트박스 */
.lightbox {
  position: fixed;
  inset: 0;
  background: var(--lightbox-bg);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.lightbox.open {
  display: flex;
}

.lightbox img,
.lightbox video {
  max-width: 88vw;
  max-height: 84vh;
  object-fit: contain;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
  opacity: 0.75;
  z-index: 1010;
}

.lightbox-close { top: 22px; right: 28px; font-size: 28px; }
.lightbox-prev, .lightbox-next { top: 50%; transform: translateY(-50%); font-size: 34px; padding: 10px 14px; }
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }
.lightbox-counter { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); color: #ffffff; opacity: 0.6; font-size: 12px; }