/* =============================================
   munji.kr portfolio — style.css
   ============================================= */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #ffffff;
  --bg-sub:      #f7f7f6;
  --bg-hover:    #f0f0ef;
  --text:        #1a1a1a;
  --text-muted:  #6b6b6b;
  --text-hint:   #aaa;
  --border:      rgba(0,0,0,0.1);
  --border-md:   rgba(0,0,0,0.18);
  --accent:      #534AB7;
  --sidebar-w:   240px;
  --radius:      10px;
  --radius-sm:   6px;
  --font:        'Pretendard', -apple-system, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:         #1a1a1a;
    --bg-sub:     #222222;
    --bg-hover:   #2a2a2a;
    --text:       #ececec;
    --text-muted: #999;
    --text-hint:  #555;
    --border:     rgba(255,255,255,0.1);
    --border-md:  rgba(255,255,255,0.18);
    --accent:     #8B84E0;
  }
}

html, body {
  height: 100%;
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* --- Layout --- */
.layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* --- Sidebar --- */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--bg-sub);
  border-right: 0.5px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transition: transform 0.25s ease;
  z-index: 100;
}

.sidebar-inner { padding: 16px 0 32px; }

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px 14px;
  border-bottom: 0.5px solid var(--border);
  margin-bottom: 8px;
}

.avatar {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: #534AB7;
  color: #EEEDFE;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.site-name  { font-size: 14px; font-weight: 600; color: var(--text); }
.site-sub   { font-size: 11px; color: var(--text-hint); margin-top: 1px; }

/* --- Nav --- */
.nav { padding: 0 8px; }

.nav-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-hint);
  padding: 12px 8px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  margin-bottom: 1px;
}

.nav-item i { font-size: 15px; flex-shrink: 0; }

.nav-item:hover  { background: var(--bg-hover); color: var(--text); }
.nav-item.active { background: var(--bg); color: var(--text); font-weight: 500; }

.badge {
  margin-left: auto;
  font-size: 10px;
  background: #EEEDFE;
  color: #534AB7;
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 500;
}

@media (prefers-color-scheme: dark) {
  .badge { background: #26215C; color: #AFA9EC; }
}

/* --- Main wrapper --- */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}

.mobile-topbar {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 0.5px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 50;
}

.menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: var(--text);
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: var(--radius-sm);
}
.menu-btn:hover { background: var(--bg-hover); }

.mobile-title { font-size: 15px; font-weight: 600; color: var(--text); }

.main {
  flex: 1;
  padding: 32px 36px 60px;
  max-width: 840px;
  overflow-y: auto;
scrollbar-width: thin;
scrollbar-color: rgba(126, 126, 126, 0.15) transparent;
}
/* Chrome, Edge, Safari */
.main::-webkit-scrollbar {
    width: 4px;
}

.main::-webkit-scrollbar-track {
    background: transparent;
}

.main::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,.12);
    border-radius: 999px;
}

.main::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,.2);
}

/* --- Page header --- */
.page-header { margin-bottom: 32px; }

.page-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.3;
}

.page-desc { font-size: 14px; color: var(--text-muted); line-height: 1.7; }

.hero-links {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.wave { margin-left: 5px; display: inline-block; animation: wave 2s infinite; transform-origin: 70% 70%; }
@keyframes wave {
  0%,60%,100% { transform: rotate(0deg); }
  10%,30%      { transform: rotate(14deg); }
  20%           { transform: rotate(-8deg); }
  40%           { transform: rotate(-4deg); }
  50%           { transform: rotate(10deg); }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s, opacity 0.12s;
  border: 0.5px solid var(--border-md);
  font-family: var(--font);
}

.btn i { font-size: 15px; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}
.btn-primary:hover { opacity: 0.88; }

.btn-ghost {
  background: var(--bg);
  color: var(--text-muted);
}
.btn-ghost:hover { background: var(--bg-hover); color: var(--text); }

.btn--sm { padding: 5px 12px; font-size: 12px; }

/* --- Sections --- */
.section { margin-bottom: 36px; }

.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-hint);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 14px;
}
.section-label i { font-size: 13px; }

/* --- Project cards --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.card-grid--full {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.project-card {
  background: var(--bg);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  display: block;
  transition: border-color 0.15s, background 0.15s;
}

.project-card:hover { border-color: var(--border-md); background: var(--bg-sub); }

.project-card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 12px;
}

.project-card-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 5px; }
.project-card-desc  { font-size: 12px; color: var(--text-muted); line-height: 1.55; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; text-overflow: ellipsis;}
.project-card-meta  { font-size: 11px; color: var(--text-hint); margin-top: 6px; }

.project-card-tags  { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 5px; }

/* --- Color variants for icons --- */
.color-purple .project-card-icon { background: #EEEDFE; color: #534AB7; }
.color-amber  .project-card-icon { background: #FAEEDA; color: #854F0B; }
.color-teal   .project-card-icon { background: #E1F5EE; color: #0F6E56; }
.color-coral  .project-card-icon { background: #FAECE7; color: #993C1D; }
.color-blue   .project-card-icon { background: #E6F1FB; color: #185FA5; }
.color-green  .project-card-icon { background: #EAF3DE; color: #3B6D11; }
.color-red .project-card-icon { background: #FDECEC; color: #C0392B; }
.color-indigo .project-card-icon { background: #EAEAFE; color: #4338CA; }
.color-orange .project-card-icon { background: #FFF0E5; color: #C2410C; }
.color-pink .project-card-icon { background: #FDEBF5; color: #BE185D; }
.color-cyan .project-card-icon { background: #E6FAFC; color: #0E7490; }
.color-brown .project-card-icon { background: #F3ECE7; color: #7C4A2D; }
.color-slate .project-card-icon { background: #EEF2F6; color: #475569; }

@media (prefers-color-scheme: dark) {
  .color-purple .project-card-icon { background: #26215C; color: #AFA9EC; }
  .color-amber  .project-card-icon { background: #412402; color: #FAC775; }
  .color-teal   .project-card-icon { background: #04342C; color: #5DCAA5; }
  .color-coral  .project-card-icon { background: #4A1B0C; color: #F0997B; }
  .color-blue   .project-card-icon { background: #042C53; color: #85B7EB; }
  .color-green  .project-card-icon { background: #173404; color: #97C459; }
  .color-red .project-card-icon { background: #4A1612; color: #F29C96; }
  .color-indigo .project-card-icon { background: #23235A; color: #A5B4FC; }
  .color-orange .project-card-icon { background: #4A2307; color: #FDBA74; }
  .color-pink .project-card-icon { background: #4A1230; color: #F9A8D4; }
  .color-cyan .project-card-icon { background: #083344; color: #67E8F9; }
  .color-brown .project-card-icon { background: #3D2618; color: #D6A67A; }
  .color-slate .project-card-icon { background: #1E293B; color: #CBD5E1; }
}

/* --- List items --- */
.list-items { display: flex; flex-direction: column; gap: 6px; }

.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 0.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.12s;
}
.list-item:hover { background: var(--bg-sub); }

.list-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.color-purple .list-icon,
.list-icon.color-purple { background: #EEEDFE; color: #534AB7; }
.color-amber  .list-icon,
.list-icon.color-amber  { background: #FAEEDA; color: #854F0B; }
.color-teal   .list-icon,
.list-icon.color-teal   { background: #E1F5EE; color: #0F6E56; }
.color-coral  .list-icon,
.list-icon.color-coral  { background: #FAECE7; color: #993C1D; }
.color-blue   .list-icon,
.list-icon.color-blue   { background: #E6F1FB; color: #185FA5; }
.color-green   .list-icon,
.list-icon.color-green   { background: #EAF3DE; color: #3B6D11; }
.color-red .list-icon,
.list-icon.color-red { background: #FDECEC; color: #C0392B; }

.color-indigo .list-icon,
.list-icon.color-indigo { background: #EAEAFE; color: #4338CA; }

.color-orange .list-icon,
.list-icon.color-orange { background: #FFF0E5; color: #C2410C; }

.color-pink .list-icon,
.list-icon.color-pink { background: #FDEBF5; color: #BE185D; }

.color-cyan .list-icon,
.list-icon.color-cyan { background: #E6FAFC; color: #0E7490; }

.color-brown .list-icon,
.list-icon.color-brown { background: #F3ECE7; color: #7C4A2D; }

.color-slate .list-icon,
.list-icon.color-slate { background: #EEF2F6; color: #475569; }

@media (prefers-color-scheme: dark) {
  .color-purple .list-icon,
  .list-icon.color-purple { background: #26215C; color: #AFA9EC; }
  .color-amber  .list-icon,
  .list-icon.color-amber  { background: #412402; color: #FAC775; }
  .color-teal   .list-icon,
  .list-icon.color-teal   { background: #04342C; color: #5DCAA5; }
  .color-coral  .list-icon,
  .list-icon.color-coral  { background: #4A1B0C; color: #F0997B; }
  .color-blue   .list-icon,
  .list-icon.color-blue   { background: #042C53; color: #85B7EB; }
  .color-green   .list-icon,
  .list-icon.color-green   { background: #173404; color: #97C459; }
  .color-red .list-icon,
  .list-icon.color-red { background: #4A1612; color: #F29C96; }

  .color-indigo .list-icon,
  .list-icon.color-indigo { background: #23235A; color: #A5B4FC; }

  .color-orange .list-icon,
  .list-icon.color-orange { background: #4A2307; color: #FDBA74; }

  .color-pink .list-icon,
  .list-icon.color-pink { background: #4A1230; color: #F9A8D4; }

  .color-cyan .list-icon,
  .list-icon.color-cyan { background: #083344; color: #67E8F9; }

  .color-brown .list-icon,
  .list-icon.color-brown { background: #3D2618; color: #D6A67A; }

  .color-slate .list-icon,
  .list-icon.color-slate { background: #1E293B; color: #CBD5E1; }
}

.list-info  { flex: 1; min-width: 0; }
.list-title { font-size: 13px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-meta  { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.list-arrow { color: var(--text-hint); font-size: 14px; flex-shrink: 0; }

/* --- Tags --- */
.tag {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 500;
}
.tag--md { font-size: 12px; padding: 4px 12px; }

/* --- Filter row --- */
.filter-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.filter-btn {
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  border: 0.5px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.filter-btn:hover  { background: var(--bg-hover); color: var(--text); }
.filter-btn.active { background: var(--accent); color: #fff; border-color: transparent; }

/* --- Detail page --- */
.detail-back { margin-bottom: 20px; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--text-muted);
  transition: color 0.12s;
}
.back-link:hover { color: var(--text); }

.detail-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.detail-icon {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.color-purple.detail-icon { background: #EEEDFE; color: #534AB7; }
.color-amber.detail-icon  { background: #FAEEDA; color: #854F0B; }
.color-teal.detail-icon   { background: #E1F5EE; color: #0F6E56; }
.color-coral.detail-icon  { background: #FAECE7; color: #993C1D; }
.color-blue.detail-icon   { background: #E6F1FB; color: #185FA5; }

@media (prefers-color-scheme: dark) {
  .color-purple.detail-icon { background: #26215C; color: #AFA9EC; }
  .color-amber.detail-icon  { background: #412402; color: #FAC775; }
  .color-teal.detail-icon   { background: #04342C; color: #5DCAA5; }
  .color-coral.detail-icon  { background: #4A1B0C; color: #F0997B; }
  .color-blue.detail-icon   { background: #042C53; color: #85B7EB; }
}

.detail-title { font-size: 22px; font-weight: 600; color: var(--text); line-height: 1.3; }
.detail-meta  { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 28px;
}

.detail-body {
  border-top: 0.5px solid var(--border);
  padding-top: 24px;
  margin-bottom: 40px;
}

/* --- Prose (detail body) --- */
.prose p  { margin-bottom: 14px; font-size: 14px; color: var(--text-muted); line-height: 1.75; }
.prose h3 { font-size: 15px; font-weight: 600; color: var(--text); margin: 24px 0 10px; }
.prose ul { padding-left: 20px; }
.prose ul li { font-size: 14px; color: var(--text-muted); margin-bottom: 5px; line-height: 1.65; }

.other-projects { border-top: 0.5px solid var(--border); padding-top: 28px; margin-top: 24px;}

/* --- Stack page --- */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

.stack-card {
  background: var(--bg-sub);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  transition: background 0.12s;
}
.stack-card:hover { background: var(--bg-hover); }

.stack-name { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.stack-desc { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

/* --- Contact page --- */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.contact-card {
  background: var(--bg);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  transition: background 0.12s, border-color 0.12s;
}
.contact-card:hover { background: var(--bg-sub); border-color: var(--border-md); }

.contact-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.contact-icon.color-purple { background: #EEEDFE; color: #534AB7; }
.contact-icon.color-teal   { background: #E1F5EE; color: #0F6E56; }
.contact-icon.color-amber  { background: #FAEEDA; color: #854F0B; }

@media (prefers-color-scheme: dark) {
  .contact-icon.color-purple { background: #26215C; color: #AFA9EC; }
  .contact-icon.color-teal   { background: #04342C; color: #5DCAA5; }
  .contact-icon.color-amber  { background: #412402; color: #FAC775; }
}

.contact-label { font-size: 11px; color: var(--text-hint); font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }
.contact-value { font-size: 13px; color: var(--text); font-weight: 500; word-break: break-all; }

/* --- Breadcrumb --- */
.breadcrumb-back { color: var(--text-muted); }
.breadcrumb-back:hover { color: var(--text); }

/* --- Overlay --- */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 90;
}

/* --- Mobile responsive --- */
@media (max-width: 720px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    transform: translateX(-100%);
  }
  .sidebar.open { transform: translateX(0); }
  .overlay.open { display: block; }
  .mobile-topbar { display: flex; }
  .main { padding: 20px 18px 48px; }
  .card-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 420px) {
  .card-grid { grid-template-columns: 1fr; }
  .contact-cards { grid-template-columns: 1fr 1fr; }
}
/* 대표 이미지 */
.detail-thumb {
  border-radius: var(--radius);
  overflow: hidden;
  border: 0.5px solid var(--border);
  margin-bottom: 24px;
}
.detail-thumb img {
  width: 100%;
  display: block;
  max-height: 300px;
  object-fit: contain;   /* ← cover → contain으로 변경 */
  background: var(--bg-sub);  /* 여백 부분 배경색 */
  cursor: zoom-in;
}

/* 갤러리 그리드 */
.detail-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 24px;
}
.detail-gallery img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 0.5px solid var(--border);
  cursor: zoom-in;
  transition: opacity 0.15s;
}
.detail-gallery img:hover { opacity: 0.85; }

/* 라이트박스 */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 999;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: var(--radius);
  object-fit: contain;
}
.lightbox-close {
  position: absolute;
  top: 20px; right: 24px;
  font-size: 28px;
  color: #fff;
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
}
.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  transition: opacity 0.15s;
  border: none;
}
.btn-link i { font-size: 15px; }
.btn-link:hover { opacity: 0.82; }

.btn-link--site {
  background: #E6F1FB;
  color: #185FA5;
}
.btn-link--github {
  background: #1a1a1a;
  color: #ffffff;
}

@media (prefers-color-scheme: dark) {
  .btn-link--site   { background: #042C53; color: #85B7EB; }
  .btn-link--github { background: #333; color: #fff; }
}

/* --- Profile section --- */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.profile-block {
  background: var(--bg-sub);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 18px 12px;
}

.profile-block-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-hint);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 16px;
}
.profile-block-title i { font-size: 13px; }

/* 타임라인 */
.timeline { display: flex; flex-direction: column; gap: 0; }

.timeline-item {
  display: flex;
  gap: 12px;
  padding-bottom: 16px;
  position: relative;
}

/* 세로 연결선 */
.timeline-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 14px;
  bottom: 0;
  width: 1px;
  background: var(--border);
}

.timeline-dot {
  width: 11px;
  height: 11px;
  min-width: 11px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  margin-top: 3px;
  position: relative;
  z-index: 1;
}

.timeline-content { flex: 1; }

.timeline-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.timeline-role {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.timeline-desc {
  font-size: 11px;
  color: var(--text-hint);
  margin-bottom: 4px;
  line-height: 1.5;
}

.timeline-period {
  display: inline-block;
  font-size: 11px;
  color: var(--accent);
  background: #EEEDFE;
  padding: 1px 8px;
  border-radius: 10px;
  font-weight: 500;
}

@media (prefers-color-scheme: dark) {
  .timeline-period { background: #26215C; color: #AFA9EC; }
}

/* 자격증 */
.cert-list { display: flex; flex-direction: column; gap: 10px; }

.cert-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  background: var(--bg);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-sm);
}

.cert-badge {
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: var(--radius-sm);
  background: #FAEEDA;
  color: #854F0B;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

@media (prefers-color-scheme: dark) {
  .cert-badge { background: #412402; color: #FAC775; }
}

.cert-name { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.cert-meta { font-size: 11px; color: var(--text-muted); }

@media (max-width: 720px) {
  .profile-grid { grid-template-columns: 1fr; }
}


/* --- Hero Bento --- */
.hero {
  padding: 4px 0 36px;
  border-bottom: 0.5px solid var(--border);
  margin-bottom: 36px;
}

.hero-bento {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 10px;
}

.bento {
  background: var(--bg);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
}

.bento-main   { grid-column: 1/2; grid-row: 1/3; display: flex; flex-direction: column; justify-content: space-between; min-height: 210px; }
.bento-status { grid-column: 2/3; grid-row: 1/2; }
.bento-stack  { grid-column: 2/3; grid-row: 2/3; }

/* 메인 카드 */
.bento-main-name {
  font-size: 26px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}
.bento-main-name em {
  font-style: normal;
  color: var(--accent);
}

.bento-main-sub {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 18px;
}

.bento-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.bento-typing {
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-hint);
}

.bento-typing-val {
  color: var(--accent);
  font-weight: 500;
}

.hero-cursor {
  color: var(--accent);
  animation: blink 0.9s step-end infinite;
}

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

/* 공통 */
.bento-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-hint);
  margin-bottom: 12px;
}

/* 상태 카드 */
.status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #28C840;
  flex-shrink: 0;
  animation: pulse 2s infinite;
}

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

.status-text { font-size: 15px; font-weight: 600; color: var(--text); }
.status-sub  { font-size: 12px; color: var(--text-muted); line-height: 1.6; }

/* 스택 카드 */
.stack-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 20px;
}

.chip-php    { background: #EEEDFE; color: #3C3489; }
.chip-spring { background: #EAF3DE; color: #27500A; }
.chip-mysql  { background: #E1F5EE; color: #085041; }
.chip-js     { background: #FAEEDA; color: #633806; }
.chip-linux  { background: #F1EFE8; color: #444441; }

@media (prefers-color-scheme: dark) {
  .chip-php    { background: #26215C; color: #AFA9EC; }
  .chip-spring { background: #173404; color: #97C459; }
  .chip-mysql  { background: #04342C; color: #5DCAA5; }
  .chip-js     { background: #412402; color: #FAC775; }
  .chip-linux  { background: #2C2C2A; color: #B4B2A9; }
}

.chip-purple { background: #EEEDFE; color: #3C3489; }
.chip-blue   { background: #E6F1FB; color: #0C447C; }
.chip-green  { background: #EAF3DE; color: #27500A; }
.chip-coral  { background: #FAECE7; color: #993C1D; }

@media (prefers-color-scheme: dark) {
  .chip-purple { background: #26215C; color: #AFA9EC; }
  .chip-blue   { background: #042C53; color: #85B7EB; }
  .chip-green  { background: #173404; color: #97C459; }
  .chip-coral  { background: #4A1B0C; color: #F0997B; }
}

/* 장식 번호 */
.deco-num {
  position: absolute;
  bottom: 12px;
  right: 16px;
  font-size: 40px;
  font-weight: 700;
  color: var(--border);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

/* 모바일 */
@media (max-width: 720px) {
  .hero-bento { grid-template-columns: 1fr; }
  .bento-main   { grid-column: 1; grid-row: auto; min-height: unset; }
  .bento-status { grid-column: 1; grid-row: auto; }
  .bento-stack  { grid-column: 1; grid-row: auto; }
}

/* --- KPI 바 --- */
.kpi-bar {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 16px;
  background: var(--bg-sub);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 20px;
  flex-wrap: wrap;
}

.kpi-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 80px;
}

.kpi-num {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.kpi-label {
  font-size: 11px;
  color: var(--text-hint);
  text-align: center;
}

.kpi-divider {
  width: 0.5px;
  height: 32px;
  background: var(--border);
  flex-shrink: 0;
}

@media (max-width: 720px) {
  .kpi-bar    { gap: 12px; justify-content: center; }
  .kpi-divider { display: none; }
}

/* --- Live 뱃지 --- */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  color: #0F6E56;
  background: #E1F5EE;
  padding: 2px 8px;
  border-radius: 10px;
  margin-bottom: 10px;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #28C840;
  animation: pulse 2s infinite;
}

@media (prefers-color-scheme: dark) {
  .live-badge { background: #04342C; color: #5DCAA5; }
}

/* --- 카드 hover 미리보기 --- */
.project-card {
  position: relative;
  overflow: hidden;
}

.card-hover-preview {
  position: absolute;
  inset: 0;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.project-card:hover .card-hover-preview {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.card-hover-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-hint);
}

.card-hover-list {
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.card-hover-list li {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.card-hover-more {
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  margin-top: 4px;
}

/* --- 카드 hover 올라오는 효과 --- */
.project-card {
  transition: border-color 0.15s, transform 0.18s ease, box-shadow 0.18s ease;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  border-color: var(--border-md);
}

@media (prefers-color-scheme: dark) {
  .project-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
  }
}

/* --- 사이드바 프로필 --- */
.sidebar-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.sidebar-status-dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #28C840;
  border: 2px solid var(--bg-sub);
}

.sidebar-profile { flex: 1; min-width: 0; }

.sidebar-available {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 500;
  color: #0F6E56;
  margin-top: 3px;
}

.sidebar-avail-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #28C840;
  animation: pulse 2s infinite;
}

@media (prefers-color-scheme: dark) {
  .sidebar-available { color: #5DCAA5; }
}

/* --- 프로젝트 카드 desc 3줄 --- */
.project-card-desc {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- prose 간격 --- */
.prose h3 { margin: 28px 0 10px; }
.prose ul  { margin-bottom: 16px; }

/* --- 역할 기여도 바 --- */
.role-section { margin-bottom: 36px; }

.role-bars { display: flex; flex-direction: column; gap: 12px; }

.role-item { display: flex; flex-direction: column; gap: 5px; }

.role-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.role-name { font-size: 13px; font-weight: 500; color: var(--text); }
.role-pct  { font-size: 12px; color: var(--text-hint); }

.role-track {
  height: 6px;
  background: var(--bg-sub);
  border-radius: 10px;
  overflow: hidden;
  border: 0.5px solid var(--border);
}

.role-fill {
  height: 100%;
  width: 0;
  border-radius: 10px;
  background: var(--accent);
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
/* --- 스택 레벨 범례 --- */
.stack-level-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding: 12px 16px;
  background: var(--bg-sub);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-sm);
}

.legend-item  { display: flex; align-items: center; gap: 6px; }
.legend-dots  { display: flex; gap: 3px; }
.legend-label { font-size: 11px; color: var(--text-muted); }

/* 스택 카드 */
.stack-card {
  background: var(--bg-sub);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  transition: background 0.12s;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.stack-card:hover { background: var(--bg-hover); }

.stack-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.stack-name  { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.stack-desc  { font-size: 11px; color: var(--text-muted); line-height: 1.4; }

.stack-level-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* 도트 */
.stack-dots { display: flex; gap: 4px; }

.stack-dot, .legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.stack-dot.off, .legend-dot.off { background: var(--border); }

/* 컬러별 도트 & 뱃지 */
.stack-dot.on-purple, .legend-dot.on-purple { background: #534AB7; }
.stack-dot.on-teal,   .legend-dot.on-teal   { background: #0F6E56; }
.stack-dot.on-blue,   .legend-dot.on-blue   { background: #185FA5; }
.stack-dot.on-amber,  .legend-dot.on-amber  { background: #854F0B; }
.stack-dot.on-coral,  .legend-dot.on-coral  { background: #993C1D; }

.badge-purple { background: #EEEDFE; color: #3C3489; }
.badge-teal   { background: #E1F5EE; color: #085041; }
.badge-blue   { background: #E6F1FB; color: #0C447C; }
.badge-amber  { background: #FAEEDA; color: #633806; }
.badge-coral  { background: #FAECE7; color: #993C1D; }

@media (prefers-color-scheme: dark) {
  .stack-dot.on-purple, .legend-dot.on-purple { background: #AFA9EC; }
  .stack-dot.on-teal,   .legend-dot.on-teal   { background: #5DCAA5; }
  .stack-dot.on-blue,   .legend-dot.on-blue   { background: #85B7EB; }
  .stack-dot.on-amber,  .legend-dot.on-amber  { background: #FAC775; }
  .stack-dot.on-coral,  .legend-dot.on-coral  { background: #F0997B; }
  .badge-purple { background: #26215C; color: #AFA9EC; }
  .badge-teal   { background: #04342C; color: #5DCAA5; }
  .badge-blue   { background: #042C53; color: #85B7EB; }
  .badge-amber  { background: #412402; color: #FAC775; }
  .badge-coral  { background: #4A1B0C; color: #F0997B; }
}

/* --- 카드 상단 컬러 바 --- */
.project-card::before {
  content: '';
  display: block;
  height: 3px;
  border-radius: 2px 2px 0 0;
  margin: -16px -16px 14px;
  background: transparent;
  transition: background 0.15s;
}

.project-card.cat-purple::before { background: #534AB7; }
.project-card.cat-blue::before   { background: #185FA5; }
.project-card.cat-teal::before   { background: #0F6E56; }
.project-card.cat-amber::before  { background: #854F0B; }
.project-card.cat-coral::before  { background: #993C1D; }

/* --- 스크롤 진행 바 --- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--accent);
  z-index: 9999;
  transition: width 0.1s linear;
}