/* ------------------------------
   기본
------------------------------ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Pretendard", sans-serif;
}

html {
  scrollbar-gutter: stable !important;
  overflow-y: scroll;
}

body {
  display: flex;
  min-height: 100vh;
  background: #fafafa;
  color: #222;
  line-height: 1.5;
}

/* ------------------------------
   공통 컨테이너(페이지 폭/여백 통일)
------------------------------ */
:root {
  --page-max: 1480px;
  --page-pad-x: 26px;
  --page-pad-x-m: 20px;
  --sidebar-w: 280px;
}

/* ------------------------------
   사이드바
------------------------------ */
.sidebar {
  width: var(--sidebar-w);
  background: #fff;
  border-right: 1px solid #e5e7eb;
  position: fixed;
  inset: 0 auto 0 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  z-index: 10;
}

.sidebar-header {
  text-align: center;
  margin-bottom: 25px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e5e7eb;
}

.sidebar-title {
  text-decoration: none;
  color: #000;
  font-weight: 700;
  font-size: 1.2rem;
}

.sidebar-menu {
  list-style: none;
  margin: 30px 0 0;
  padding: 0;
}

.sidebar-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #9ca3af;
  margin-bottom: 10px;
  padding: 0 5px;
}

/* 전체 링크 공통 */
.sidebar-menu a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: #444;
  transition: background 0.15s;
}

.sidebar-menu a:hover {
  background: #f0f0f0;
}

/* 프로젝트 전용: 1줄 = 이름+날짜, 2줄 = 설명 */
.sidebar-project {
  display: block;
}

.sidebar-project-top {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.sidebar-project-name {
  font-size: 0.95rem;
}

.sidebar-project-date {
  font-size: 0.75rem;
  color: #9ca3af;
}

.sidebar-project-desc {
  display: block;
  font-size: 0.7rem;
  color: #9ca3af;
  margin-top: 2px;
}

.sidebar-footer {
    margin-top: auto;
    text-align: center;
    padding: 20px 0;
}

.sidebar-footer p {
    font-size: 0.7rem;
    color: #bbb;
    letter-spacing: 0.05rem;
    margin: 0;
    font-weight: 400;
}

.theme-toggle {
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 999px;
  padding: 4px 11px 5px;
  margin-bottom: 12px;
  cursor: pointer;
}

/* ------------------------------
   본문 컨테이너 (데스크톱 공통)
------------------------------ */
.content {
  margin-left: var(--sidebar-w);
  padding: 38px 40px 60px;
  flex: 1;
  min-height: 100vh;
}

/* ------------------------------
   모바일
------------------------------ */
.mobile-header { display: none; }
.mobile-sidebar-toggle { display: none; }

@media (max-width: 1024px) {
  .mobile-header {
    display: flex;
    align-items: center;
    padding: 0 20px;
    height: 60px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: #fafafa;
    border-bottom: 1px solid #e5e7eb;
    box-sizing: border-box;
    transform: translateZ(0);
    will-change: transform;
    justify-content: flex-end;
  }

  .mobile-header h2 {
    margin: 0;
    padding: 0;
    font-size: 1.1rem;
    font-weight: 700;
    -webkit-font-smoothing: antialiased;
    display: flex;
    align-items: center;
  }

  .mobile-portfolio-link{
    color: inherit;
    text-decoration: none;
    font: inherit;
    display: inline-block;
  }

  .mobile-sidebar-toggle {
    position: fixed;
    top: 8px;
    left: 12px;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.12);
    background: rgba(255,255,255,0.85);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
    backdrop-filter: blur(6px);
    color: #111;
    z-index: 10003;
    cursor: pointer;
    transition: left 0.2s ease;
  }

  .content {
    margin-left: 0 !important;
    padding-top: 85px !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }
  .proj-page {
    margin-left: 0 !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    width: 100% !important;
  }


  html.dark .mobile-header {
    background: var(--dark-bg);
    border-bottom: 1px solid var(--dark-border);
  }

  html.dark .mobile-sidebar-toggle {
    background: rgba(20,20,20,0.6);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.14);
  }

  body.menu-open .mobile-sidebar-toggle {
    left: 262px;
  }

  .sidebar {
    z-index: 10002 !important;
    transform: translateX(-100%) !important;
    transition: transform 0.2s ease-out !important;
  }

  .sidebar.active,
  #sidebar.active .sidebar {
    transform: translateX(0) !important;
  }

  .sidebar-overlay{
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 10001 !important;
  }
  .sidebar-overlay.active{
    pointer-events: auto;
    opacity: 1;
  }

  body.no-scroll {
    overflow: hidden !important;
    width: 100% !important;
    position: relative !important;
  }
}

/* ==============================
   DARK MODE (Global) - SOFT GRAY
   - style.css 맨 아래
============================== */

html.dark {
  --dark-bg: #121212;
  --dark-sidebar: #171717;
  --dark-surface: #1e1e1e;
  --dark-surface-2: #242424;
  --dark-border: #2f2f2f;

  --dark-text: #e6e6e6;
  --dark-title: #f4f4f5;
  --dark-muted: #a8a8a8;
  --on-light: #111827;

  color-scheme: dark;
}

/* 페이지 기본 배경/글자 */
html.dark body {
  background: var(--dark-bg);
  color: var(--dark-text);
}

/* 사이드바 */
html.dark .sidebar {
  background: var(--dark-bg);
  border-right: 1px solid var(--dark-border);
  color: var(--dark-text);
}

html.dark .sidebar-title { color: var(--dark-title); }

html.dark .mobile-header h2 { color: var(--dark-title); }

html.dark .sidebar-menu a { color: var(--dark-text); }
html.dark .sidebar-menu a:hover { background: var(--dark-surface); }

html.dark .sidebar-label,
html.dark .sidebar-project-date,
html.dark .sidebar-project-desc,
html.dark .sidebar-footer {
  color: var(--dark-muted);
}

html.dark .theme-toggle {
  background: transparent;
  border: 1px solid var(--dark-border);
  color: var(--dark-text);
}

/* 카드 공통 */
html.dark .card {
  background: var(--dark-surface);
  border: 1px solid var(--dark-border);
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
  color: var(--dark-text);
}

/* 타이틀 */
html.dark .section-title,
html.dark .profile-left h1 {
  color: var(--dark-title);
}

/* 본문/보조 */
html.dark .profile-left p { color: var(--dark-text); }

html.dark .project-meta,
html.dark .project-date,
html.dark .cert-meta,
html.dark .skills-note {
  color: var(--dark-muted);
}

/* 프로젝트 링크 카드(인덱스) */
html.dark .project-links a {
  background: var(--dark-surface);
  border: 1px solid var(--dark-border);
  color: var(--dark-text);
}
html.dark .project-links a:hover { background: var(--dark-surface-2); }

/* 자격증/스킬 박스 */
html.dark .cert-item,
html.dark .skills-category {
  background: var(--dark-surface);
  border: 1px solid var(--dark-border);
  color: var(--dark-text);
}

/* 스킬 버튼 */
html.dark .skill-btn {
  background: var(--dark-surface);
  border-color: var(--dark-border);
  color: var(--dark-text);
}
html.dark .skill-btn:hover {
  background: var(--dark-surface-2);
  border-color: var(--dark-muted);
}

/* Contact 링크 */
html.dark .contact-card a { color: var(--dark-text); }

/* 아이콘 밝기 */
html.dark i[class^="devicon-"],
html.dark i[class*=" devicon-"] {
  filter: brightness(1.25);
}

/*

color 모드 변경 값
dark-bg : 페이지 배경 (soft navy-gray)
dark-surface : 카드/박스 배경
dark-surface-2 : hover/칩
dark-border : 테두리
dark-text : 기본 글자
dark-title : 제목
dark-muted : 보조 텍스트
on-light : 밝은(화이트 계열) 배경 위 글자


네이비

html.dark {
  --dark-bg: #0f172a;
  --dark-surface: #111827;
  --dark-surface-2: #0b1220;
  --dark-border: #243041;
  --dark-text: #e5e7eb;
  --dark-title: #f8fafc;
  --dark-muted: #a3adc2;
  --on-light: #111827;

  color-scheme: dark;
}


챠콜

html.dark {
  --dark-bg: #121212;
  --dark-sidebar: #171717;
  --dark-surface: #1e1e1e;
  --dark-surface-2: #242424;
  --dark-border: #2f2f2f;

  --dark-text: #e6e6e6;
  --dark-title: #f4f4f5;
  --dark-muted: #a8a8a8;
  --on-light: #111827;

  color-scheme: dark;
}

조금 더 밝은 챠콜

html.dark {
  --dark-bg: #161616;
  --dark-sidebar: #1c1c1c;
  --dark-surface: #232323;
  --dark-surface-2: #2a2a2a;
  --dark-border: #383838;

  --dark-text: #e9e9e9;
  --dark-title: #ffffff;
  --dark-muted: #b2b2b2;
  --on-light: #111827;

  color-scheme: dark;
}


더 진한 챠콜

html.dark {
  --dark-bg: #0f0f10;
  --dark-sidebar: #141416;
  --dark-surface: #19191b;
  --dark-surface-2: #202023;
  --dark-border: #2a2a2e;

  --dark-text: #e5e7eb;
  --dark-title: #fafafa;
  --dark-muted: #9ca3af;
  --on-light: #111827;

  color-scheme: dark;
}

*/
