/* =============================================
   CSS VARIABLES — 여기만 바꾸면 전체 색상 변경
============================================= */
:root {
  --accent:       #F0C400;
  --accent-dim:   rgba(240, 196, 0, 0.15);
  --bg:           rgb(240, 239, 235);
  --bg-dark:      #1a1a1a;
  --panel-bg:     rgb(240, 239, 235);
  --border:       rgba(0,0,0,0.12);
  --text-primary: #111111;
  --text-secondary: #666666;
  --text-muted:   #999999;

  --font-display: 'Bebas Neue', sans-serif;
  --font-mono:    'Space Mono', monospace;
  --font-body:    'Noto Sans KR', sans-serif;

  --nav-h:    56px;
  --left-w:   56px;
  --right-w:  60px;
  --desc-w:   380px;
  --transition: 0.45s cubic-bezier(0.77, 0, 0.175, 1);

  --footer-h:    0px;  /* JS가 실제값으로 덮어씀 */
  --available-h: calc(100vh - var(--nav-h) - var(--footer-h));
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 300;
  overflow-x: hidden;
}

/* =============================================
   NAV
============================================= */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: stretch;
  z-index: 100;
}

.nav-logo {
  width: var(--left-w);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-right: 1px solid var(--border);
  flex-shrink: 0;
  cursor: pointer;
  text-decoration: none;
}

.nav-logo svg {
  width: 36px;
  height: 36px;
}

.nav-menu {
  display: flex;
  flex: 1;
  list-style: none;
  overflow-x: auto;
}

.nav-menu li {
  display: flex;
  align-items: center;
  padding: 0 28px;
  border-right: 1px solid var(--border);
  cursor: pointer;
  position: relative;
  transition: background 0.2s;
  white-space: nowrap;
  text-decoration: none;
}

.nav-menu li:hover { background: rgba(0,0,0,0.04); }

.nav-menu li.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
}

.nav-menu li .nav-bar {
  width: 2px;
  height: 18px;
  background: var(--border);
  margin-right: 12px;
  flex-shrink: 0;
}

.nav-menu li.active .nav-bar { background: var(--accent); }

.nav-menu li span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.nav-menu li.active span { color: var(--text-primary); }

.nav-color-strip {
  width: var(--right-w);
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
  flex-shrink: 0;
}

.nav-color-strip div { flex: 1; }

/* =============================================
   FOOTER
============================================= */
footer {
  background: var(--bg-dark);
  padding: 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  border-top: 3px solid var(--accent);
}

.footer-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.footer-tagline {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  text-align: center;
}

.footer-divider {
  width: 60px;
  height: 1px;
  background: rgba(255,255,255,0.1);
}

.footer-links {
  display: flex;
  gap: 32px;
}

.footer-links a {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--accent); }

/* =============================================
   MAIN LAYOUT (프로젝트 페이지)
============================================= */
.main-wrapper {
  position: fixed;
  top: var(--nav-h);
  bottom: var(--footer-h);
  left: 0;
  right: 0;
  display: flex;
  overflow: hidden;
}

/* LEFT PANEL */
.left-panel {
  flex: 1;
  min-width: 0;
  border-right: 1px solid var(--border);
  padding: 24px 18px;
  height: 100%;
  overflow-y: auto;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.left-accent-box {
  width: 40px;
  height: 40px;
  background: var(--accent);
  position: relative;
  flex-shrink: 0;
}

.left-accent-box::after {
  content: '';
  position: absolute;
  right: -6px; bottom: -6px;
  width: 100%; height: 100%;
  border: 1px solid var(--text-primary);
}

.project-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.project-title-main {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-primary);
}

.progress-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.progress-bar-bg {
  flex: 1;
  height: 3px;
  background: var(--border);
}

.progress-bar-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.8s ease;
}

.progress-label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
  white-space: nowrap;
}

.divider-line {
  width: 100%;
  height: 1px;
  background: var(--border);
  flex-shrink: 0;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.meta-value {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.status-dot {
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

.big-number {
  font-family: var(--font-display);
  font-size: 80px;
  line-height: 1;
  color: rgba(0,0,0,0.07);
  letter-spacing: -2px;
  user-select: none;
}

.left-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.icon-btn:hover { background: var(--text-primary); }
.icon-btn:hover svg { stroke: var(--bg); }
.icon-btn svg { width: 14px; height: 14px; stroke: var(--text-primary); fill: none; stroke-width: 1.5; }

/* =============================================
   CENTER AREA
============================================= */
.center-area {
  width: var(--center-w, 70vw);
  flex-shrink: 0;
  margin-right: var(--right-w);
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}

/* SECTION WRAPPER */
.section-wrapper {
  max-height: var(--available-h);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.section-wrapper.expanded {
  max-height: none;
  overflow: visible;
}

/* GALLERY SECTION */
.gallery-section {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--border);
}

/* 16:9 비율 유지 + 최대 높이 제한 */
.gallery-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: var(--viewport-max-h, 60vh);
  flex-shrink: 0;
  overflow: hidden;
  background: #1a1a1a;
}

.gallery-track {
  display: flex;
  height: 100%;
  transition: transform var(--transition);
}

.gallery-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: absolute;
  inset: 0;
}

/* grid overlay */
.gallery-slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 1;
}

.slide-label {
  position: absolute;
  bottom: 24px;
  left: 28px;
  font-family: var(--font-display);
  font-size: 64px;
  color: rgba(255,255,255,0.12);
  letter-spacing: 4px;
  user-select: none;
  line-height: 1;
  z-index: 2;
}

/* gallery nav bar */
.gallery-nav {
  height: 40px;
  background: var(--bg);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.gallery-counter {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
}

.gallery-arrow {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  color: var(--text-primary);
}

.gallery-arrow:hover { background: var(--accent); color: white; }
.gallery-arrow svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; }

/* slide indicators */
.slide-indicator {
  width: 24px;
  height: 3px;
  background: var(--border);
  cursor: pointer;
  transition: background 0.2s, width 0.2s;
}

.slide-indicator.active {
  background: var(--text-primary);
  width: 32px;
}

/* section divider */
.section-divider {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
}

.section-divider-num {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--accent);
  letter-spacing: 2px;
}

.section-divider-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.section-divider-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* expand button */
.section-expand-btn {
  width: 24px;
  height: 24px;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
  position: relative;
}

.section-expand-btn:hover { background: var(--accent); border-color: var(--accent); }

.section-expand-btn .plus-h,
.section-expand-btn .plus-v {
  position: absolute;
  background: var(--text-primary);
  transition: transform 0.35s cubic-bezier(0.77,0,0.175,1), opacity 0.25s;
}

.section-expand-btn .plus-h { width: 10px; height: 1px; }
.section-expand-btn .plus-v { width: 1px; height: 10px; }

.section-expand-btn.open .plus-v { transform: rotate(90deg); opacity: 0; }
.section-expand-btn.open .plus-h { transform: rotate(45deg) scaleX(1.3); }
.section-expand-btn.open { background: var(--accent); border-color: var(--accent); }

/* expand panel */
.section-expand-panel {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.55s cubic-bezier(0.77,0,0.175,1);
  background: var(--panel-bg);
  border-bottom: 1px solid transparent;
}

.section-expand-panel.open {
  border-bottom-color: var(--border);
}

.section-expand-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 28px;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.3s 0.15s, transform 0.3s 0.15s;
}

.section-expand-panel.open .section-expand-inner {
  opacity: 1;
  transform: translateY(0);
}

.expand-col {
  padding: 0 20px;
  border-right: 1px solid var(--border);
}

.expand-col:first-child { padding-left: 0; }
.expand-col:last-child  { border-right: none; padding-right: 0; }

.expand-col-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.expand-col-label::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 1px;
  background: var(--accent);
}

.expand-col-title {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 2px;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.1;
}

.expand-col-text {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 300;
  line-height: 1.85;
  color: var(--text-secondary);
}

.expand-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 14px;
}

/* tags */
.tag {
  padding: 4px 10px;
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.tag.accent {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--text-primary);
}

/* =============================================
   RIGHT PANEL — DESCRIPTION TOGGLE
============================================= */
.right-trigger {
  position: fixed;
  right: 0;
  top: var(--nav-h);
  width: var(--right-w);
  bottom: var(--footer-h);
  border-left: 1px solid var(--border);
  background: var(--panel-bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  transition: background 0.2s;
}

.right-trigger:hover { background: var(--accent); color: white; }

.right-trigger-text {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-secondary);
  writing-mode: vertical-rl;
}

.right-crosshair {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
}

.right-crosshair svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-muted);
  fill: none;
  stroke-width: 1;
}

/* description drawer */
.desc-drawer {
  position: fixed;
  right: var(--right-w);
  top: var(--nav-h);
  width: var(--desc-w);
  bottom: var(--footer-h);
  background: var(--bg);
  border-left: 1px solid var(--border);
  transform: translateX(calc(var(--desc-w) + var(--right-w)));
  transition: transform var(--transition);
  z-index: 49;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.desc-drawer.open { transform: translateX(0); }

.desc-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 1;
}

.desc-header-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.desc-close {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.desc-close:hover { background: var(--text-primary); }
.desc-close:hover svg { stroke: white; }
.desc-close svg { width: 12px; height: 12px; stroke: var(--text-primary); fill: none; stroke-width: 2; }

.desc-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.desc-slide-title {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 2px;
  line-height: 1.1;
  color: var(--text-primary);
}

.desc-text {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 300;
  line-height: 1.9;
  color: var(--text-secondary);
}

.desc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.desc-spec-table {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
}

.spec-row {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.spec-row:last-child { border-bottom: none; }

.spec-key {
  width: 100px;
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-right: 1px solid var(--border);
  background: var(--panel-bg);
  flex-shrink: 0;
}

.spec-val {
  flex: 1;
  padding: 10px 12px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 400;
  color: var(--text-primary);
}

/* =============================================
   DECORATIONS
============================================= */
.crosshair {
  width: 20px;
  height: 20px;
  position: relative;
  flex-shrink: 0;
}

.crosshair::before,
.crosshair::after {
  content: '';
  position: absolute;
  background: var(--text-muted);
}

.crosshair::before { width: 1px; height: 100%; left: 50%; top: 0; transform: translateX(-50%); }
.crosshair::after  { height: 1px; width: 100%; top: 50%; left: 0; transform: translateY(-50%); }

.corner-deco {
  position: absolute;
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.corner-deco.tl { top: 8px; left: 8px;   border-top: 1px dashed var(--border); border-left:  1px dashed var(--border); }
.corner-deco.tr { top: 8px; right: 8px;  border-top: 1px dashed var(--border); border-right: 1px dashed var(--border); }
.corner-deco.bl { bottom: 8px; left: 8px;  border-bottom: 1px dashed var(--border); border-left:  1px dashed var(--border); }
.corner-deco.br { bottom: 8px; right: 8px; border-bottom: 1px dashed var(--border); border-right: 1px dashed var(--border); }