/* 프로젝트 상세 페이지 공통 */
.proj-page {
  padding: 0;
  max-width: var(--page-max);
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* HERO */
.proj-page .proj-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.proj-page .proj-hero h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.proj-page .proj-sub {
  margin-top: 6px;
  font-size: 0.98rem;
  color: #444;
  line-height: 1.55;
}

.proj-page .proj-meta {
  margin-top: 6px;
  font-size: 0.8rem;
  color: #888;
}

/* HERO 버튼 */
.proj-page .proj-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.proj-page .proj-hero-actions a {
  text-decoration: none;
}

.proj-page .proj-hero-actions .btn-primary,
.proj-page .proj-hero-actions .btn-secondary,
.proj-page .proj-hero-actions .btn-demo,
.proj-page .proj-hero-actions .btn-ppt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 0.82rem;
  padding: 8px 14px;
  border: none;
  cursor: pointer;
  line-height: 1;
  white-space: nowrap;
}

.proj-page .proj-hero-actions .btn-primary {
  background: #111;
  color: #fff;
}
.proj-page .proj-hero-actions .btn-secondary {
  background: #f4f4f4;
  color: #222;
}
.proj-page .proj-hero-actions .btn-demo {
  background: #0072ff;
  color: #fff;
  transition: background 0.2s;
}
.proj-page .proj-hero-actions .btn-demo:hover { background: #005cd4; }

.proj-page .proj-hero-actions .btn-ppt {
  background: #28a745;
  color: #fff;
  transition: background 0.2s;
}
.proj-page .proj-hero-actions .btn-ppt:hover { background: #1e8a38; }

/* 공통 섹션 */
.proj-page .proj-section h2,
.proj-page .proj-summary h2,
.proj-page .proj-info h2,
.proj-page .proj-stack h2 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.2px;
}

.proj-page .proj-section p,
.proj-page .proj-section li,
.proj-page .proj-summary p,
.proj-page .proj-summary li {
  line-height: 1.75;
  letter-spacing: -0.1px;
}

.proj-page .proj-section p,
.proj-page .proj-summary p {
  margin-bottom: 10px;
  color: #222;
}

.proj-page .lead {
  font-size: 0.98rem;
  color: #222;
  margin-bottom: 12px;
}

.proj-page .subhead {
  font-size: 0.95rem;
  font-weight: 800;
  margin: 2px 0 8px;
}

/* 리스트 */
.proj-page .bullet {
  list-style: disc;
  margin-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.proj-page .bullet li code {
  font-size: 0.85em;
  background: #f4f4f4;
  padding: 2px 6px;
  border-radius: 6px;
}

/* 카드 */
.proj-page .proj-hero,
.proj-page .proj-section,
.proj-page .proj-summary,
.proj-page .proj-info,
.proj-page .proj-stack {
  padding: 20px 22px;
  background: #fff;
  border: 1px solid #efefef;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.04);
}

/* 요약 */
.proj-page .proj-summary .summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.proj-page .proj-summary .summary-item {
  background: #fafafa;
  border-radius: 14px;
  padding: 14px 14px 12px;
}

.proj-page .proj-summary .summary-item h3 {
  margin: 0 0 6px;
  font-size: 0.92rem;
  font-weight: 800;
  color: #111;
}

.proj-page .proj-summary .summary-item p {
  margin: 0;
  font-size: 0.92rem;
  color: #222;
}

.proj-page .mini-list {
  list-style: disc;
  margin: 0 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.92rem;
}

.proj-page .summary-hint {
  margin-top: 12px;
  font-size: 0.85rem;
  color: #777;
}

/* 개요 2열 */
.proj-page .two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 10px;
}

.proj-page .two-col .col {
  background: #fafafa;
  border-radius: 14px;
  padding: 14px;
}

/* 기능 카드 */
.proj-page .arch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.proj-page .arch-card {
  background: #fafafa;
  border-radius: 12px;
  padding: 14px 14px 12px;
}

.proj-page .arch-card h3 {
  margin-bottom: 6px;
  font-size: 0.98rem;
}

/* 화면 그리드 */
.proj-page .screen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.proj-page .screen-box {
  background: #fff;
  border-radius: 12px;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.proj-page .screen-box img.preview-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.15s ease-out;
}
.proj-page .screen-box img.preview-img:hover { transform: scale(1.015); }

.proj-page .caption {
  font-size: 0.72rem;
  color: #777;
  text-align: left;
  width: 100%;
}

/* 기술스택/모듈 */
.proj-page .proj-columns {
  display: flex;
  gap: 18px;
}
.proj-page .proj-info,
.proj-page .proj-stack { flex: 1; }


/* 기술 스택: 라벨/값 겹침 방지 (공통) */
.proj-page .proj-info ul li{
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.7;
  flex-wrap: wrap; /* 화면이 좁으면 자연스럽게 아래로 */
}

.proj-page .proj-info ul li strong{
  flex: 0 0 160px;  /* 라벨 영역 폭 */
  width: auto;      /* 기존 고정 width 제거 */
  display: block;
  white-space: normal;     /* 긴 라벨 줄바꿈 허용 */
  word-break: keep-all;    /* 한글/영문 자연스럽게 */
}

/* 모바일에서는 라벨 폭 조금 줄이기 */
@media (max-width: 520px){
  .proj-page .proj-info ul li strong{
    flex-basis: 120px;
  }
}


/* 배지 */
.proj-page .stack-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.proj-page .stack {
  background: #f2f2f2;
  border-radius: 999px;
  padding: 7px 12px 6px;
  font-size: 0.78rem;
  color: #333;
}

/* 아코디언 */
.proj-page details.accordion { border-radius: 14px; }

.proj-page details.accordion > summary {
  list-style: none;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  padding: 12px 14px;
  border: 1px solid #efefef;
  border-radius: 14px;
  background: #fafafa;

  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
  user-select: none;
}

.proj-page details.accordion > summary::-webkit-details-marker { display: none; }

.proj-page details.accordion > summary .acc-title {
  font-size: 1.02rem;
  font-weight: 800;
  color: #111;
}

.proj-page details.accordion > summary .acc-desc {
  font-size: 0.86rem;
  color: #777;
  margin-left: 10px;
}

.proj-page details.accordion > summary:hover {
  background: #f6f6f6;
  border-color: #e6e6e6;
  transform: translateY(-1px);
}

.proj-page details.accordion > summary::after {
  content: "";
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-right: 2px solid #777;
  border-bottom: 2px solid #777;
  transform: rotate(45deg);
  transition: transform 0.18s ease, border-color 0.18s ease;
  margin-left: 10px;
}

.proj-page details.accordion[open] > summary { background: #fff; border-color: #e9e9e9; }
.proj-page details.accordion[open] > summary::after { transform: rotate(-135deg); border-color: #333; }

.proj-page details.accordion .acc-body {
  margin-top: 10px;
  padding: 12px 4px 0;
  border-top: 1px solid #f0f0f0;
}

/* 고민 섹션 callout */
.proj-page .callout {
  background: #fafafa;
  border: 1px solid #f0f0f0;
  border-radius: 14px;
  padding: 12px 14px;
  margin: 10px 0;
}

.proj-page .callout-title {
  font-weight: 800;
  margin: 0 0 6px;
  color: #111;
  font-size: 0.92rem;
}

.proj-page .mini-note {
  margin-top: 10px;
  font-size: 0.88rem;
  color: #666;
}

/* 모달 */
.proj-page .modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 18px;
}

.proj-page .modal-content {
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  max-width: 90vw;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.proj-page .modal-content img {
  width: auto;
  max-width: 100%;
  max-height: 85vh;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 12px;
  object-fit: contain;
  background: #000;
  transition: transform 0.25s ease;
  cursor: zoom-in;
  transform-origin: center center;
}

.proj-page .modal-close {
  align-self: flex-end;
  background: #111;
  border: none;
  color: #fff;
  padding: 4px 13px 5px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.78rem;
}

.proj-page .modal-caption {
  font-size: 0.78rem;
  color: #555;
}

/* 반응형 */
@media (max-width: 1024px) {
  .proj-page {
    margin-left: 0 !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .proj-page .proj-hero {
    margin-top: 5px;
    flex-direction: column;
    align-items: flex-start;
  }

  .proj-page .proj-columns {
    flex-direction: column;
  }

  .proj-page .proj-summary .summary-grid { grid-template-columns: 1fr; }
  .proj-page .two-col { grid-template-columns: 1fr; }
  .proj-page .modal-content { max-width: 100%; }

  .proj-page .proj-hero,
  .proj-page .proj-section,
  .proj-page .proj-summary,
  .proj-page .proj-info,
  .proj-page .proj-stack {
    padding: 16px 18px !important;
  }
}

/* ==============================
   DARK MODE (Project) - SOFT GRAY
   - project.css 맨 아래 1개만 유지
============================== */

html.dark .proj-page {
  color: var(--dark-text);
}

/* 큰 컨테이너 */
html.dark .proj-page .proj-hero,
html.dark .proj-page .proj-section,
html.dark .proj-page .proj-summary,
html.dark .proj-page .proj-info,
html.dark .proj-page .proj-stack {
  background: var(--dark-surface) !important;
  border: 1px solid var(--dark-border) !important;
  color: var(--dark-text) !important;
}

/* 안쪽 카드/요소 */
html.dark .proj-page .summary-item,
html.dark .proj-page .col,
html.dark .proj-page .arch-card,
html.dark .proj-page .callout,
html.dark .proj-page .screen-box,
html.dark .proj-page details.accordion > summary {
  background: var(--dark-surface) !important;
  border-color: var(--dark-border) !important;
  color: var(--dark-text) !important;
}

/* 본문 텍스트 */
html.dark .proj-page p,
html.dark .proj-page li,
html.dark .proj-page dd,
html.dark .proj-page td,
html.dark .proj-page .lead,
html.dark .proj-page .proj-summary .summary-item p,
html.dark .proj-page details,
html.dark .proj-page summary,
html.dark .proj-page details * {
  color: var(--dark-text) !important;
}

/* 제목/라벨 */
html.dark .proj-page h1,
html.dark .proj-page h2,
html.dark .proj-page h3,
html.dark .proj-page h4,
html.dark .proj-page strong,
html.dark .proj-page dt,
html.dark .proj-page th,
html.dark .proj-page .proj-info li strong,
html.dark .proj-page details.accordion > summary .acc-title {
  color: var(--dark-title) !important;
}

/* 보조 텍스트 */
html.dark .proj-page .proj-sub,
html.dark .proj-page .proj-meta,
html.dark .proj-page .summary-hint,
html.dark .proj-page .mini-note,
html.dark .proj-page .caption,
html.dark .proj-page details.accordion > summary .acc-desc,
html.dark .proj-page .modal-caption {
  color: var(--dark-muted) !important;
}

/* 아코디언 화살표 */
html.dark .proj-page details.accordion > summary::after {
  border-right-color: var(--dark-muted) !important;
  border-bottom-color: var(--dark-muted) !important;
}

/* 버튼 */
html.dark .proj-page .btn-secondary {
  background: transparent !important;
  border: 1px solid var(--dark-text) !important;
  color: var(--dark-text) !important;
}
html.dark .proj-page .btn-primary {
  background: var(--dark-title) !important;
  color: var(--on-light) !important;
}

/* 모달 */
html.dark .proj-page .modal-content {
  background: var(--dark-surface) !important;
  border: 1px solid var(--dark-border) !important;
}

/* 칩(배지) */
html.dark .proj-page .stack {
  background: var(--dark-surface-2) !important;
  border: 1px solid var(--dark-border) !important;
  color: var(--dark-text) !important;
}
