/* ===========================================
   Blog post shared layout — 3-column structure
   =========================================== */

:root {
  --left-w: 230px;
  --right-w: 190px;
}

/* ===== Left sidebar: other blog posts ===== */
.blog-left {
  position: fixed;
  top: 48px;
  left: 0;
  width: var(--left-w);
  height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 34px 20px 48px 28px;
  border-right: 1px solid var(--rule);
  background: var(--cream-deep, #f3efe3);
  z-index: 50;
  font-family: "Inter", "Noto Sans KR", sans-serif;
  box-sizing: border-box;
}
.blog-left::-webkit-scrollbar { width: 4px; }
.blog-left::-webkit-scrollbar-thumb { background: rgba(43, 32, 24, 0.2); border-radius: 2px; }

.blog-left-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 18px;
}
.blog-left-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.blog-left-list li {
  position: relative;
  padding: 12px 0 12px 12px;
  border-bottom: 1px solid var(--rule);
}
.blog-left-list li:first-child { border-top: 1px solid var(--rule); }
.blog-left-list a {
  display: block;
  text-decoration: none;
  color: inherit;
}
.blog-left-list .li-date {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: var(--ink-mute);
  letter-spacing: 0.03em;
  margin-bottom: 4px;
}
.blog-left-list .li-category {
  display: inline-block;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--clay);
  margin-left: 6px;
}
.blog-left-list .li-title {
  display: block;
  font-family: "Fraunces", "Noto Serif KR", serif;
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.42;
  color: var(--ink-soft);
  transition: color 0.2s;
}
.blog-left-list a:hover .li-title { color: var(--clay-deep); }
.blog-left-list li.current::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: var(--clay);
}
.blog-left-list li.current .li-title {
  color: var(--clay-deep);
  font-weight: 500;
}

/* ===== Right sidebar: TOC for current article ===== */
.blog-right {
  position: fixed;
  top: 48px;
  right: 0;
  width: var(--right-w);
  height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 34px 22px 48px 18px;
  font-family: "Inter", "Noto Sans KR", sans-serif;
  z-index: 50;
  box-sizing: border-box;
}
.blog-right::-webkit-scrollbar { width: 4px; }
.blog-right::-webkit-scrollbar-thumb { background: rgba(43, 32, 24, 0.15); border-radius: 2px; }

.blog-right-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 14px;
}
.blog-toc {
  list-style: none;
  padding: 0;
  margin: 0;
}
.blog-toc li {
  padding: 7px 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-mute);
  border-left: 2px solid transparent;
  padding-left: 10px;
  transition: all 0.2s;
}
.blog-toc a {
  text-decoration: none;
  color: inherit;
  display: block;
}
.blog-toc li:hover { color: var(--clay-deep); }
.blog-toc li.active {
  color: var(--clay-deep);
  border-left-color: var(--clay);
  font-weight: 500;
}

/* ===== Hamburger toggle for mobile sidebar ===== */
.blog-hamburger {
  display: none;
  position: fixed;
  top: 56px;
  left: 14px;
  z-index: 90;
  background: var(--cream-deep, #f3efe3);
  border: 1px solid var(--rule);
  border-radius: 6px;
  width: 38px;
  height: 38px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  padding: 0;
}
.blog-hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink-soft);
  border-radius: 1px;
}
.blog-overlay {
  display: none;
  position: fixed;
  inset: 48px 0 0 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 49;
}
.blog-overlay.open { display: block; }

/* ===== Content area offset on desktop ===== */
/* Full 3-column when width can fit left(230) + content(620) + right(190) + gutters */
@media (min-width: 1120px) {
  .wrap {
    max-width: 640px !important;
    margin-left: calc(var(--left-w) + max(32px, (100vw - var(--left-w) - var(--right-w) - 640px - 60px) / 2)) !important;
    margin-right: 0 !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
  }
}
/* Left sidebar only (wide enough for left + content, but not right TOC) */
@media (max-width: 1119px) and (min-width: 901px) {
  .blog-right { display: none; }
  .wrap {
    max-width: 640px !important;
    margin-left: calc(var(--left-w) + 32px) !important;
    margin-right: auto !important;
  }
}
@media (max-width: 900px) {
  .blog-left {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  .blog-left.open {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
  }
  .blog-right { display: none; }
  .blog-hamburger { display: flex; }
  /* wrap goes back to centered 680px (unchanged from original) */
}
