/* ==========================================================================
   호구마 블로그 (Hoguma Blog) - 모던 미니멀 디자인 시스템
   - 왼쪽 고정 바: 연회색 (Light Gray)
   - 중앙 콘텐츠: 흰색 (White)
   ========================================================================== */

:root {
  /* 배경 색상 팔레트 */
  --bg-page: #f1f3f6;            /* 전체 기본 연회색 배경 */
  --bg-sidebar: #f7f8fa;         /* 왼쪽 고정 바 연회색 */
  --bg-sidebar-hover: #eef1f5;   /* 사이드바 메뉴 호버 배경 */
  --bg-sidebar-active: #e5e9f0;  /* 사이드바 메뉴 활성 배경 */
  --bg-content: #ffffff;         /* 중앙 콘텐츠 영역 흰색 */
  --bg-card: #ffffff;            /* 카드 컴포넌트 흰색 */
  --bg-tag: #edf0f5;             /* 태그 및 뱃지 연회색 */
  --bg-tag-hover: #e2e6ee;       /* 태그 호버 배경 */

  /* 텍스트 색상 */
  --text-main: #191c21;          /* 주요 텍스트 (짙은 차콜) */
  --text-body: #333942;          /* 본문 텍스트 */
  --text-muted: #6e7683;         /* 설명 및 보조 텍스트 */
  --text-subtle: #98a1af;        /* 날짜 및 미세 정보 */
  --text-primary: #1e293b;       /* 액센트 텍스트 */

  /* 경계선 및 그림자 */
  --border-sidebar: #e5e8ee;     /* 사이드바 구분선 */
  --border-light: #eaedf2;       /* 일반 구분선 */
  --border-card: #e8ecf1;        /* 콘텐츠 카드 테두리 */
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.08);

  /* 사이드바 규격 */
  --sidebar-width: 250px;
  --header-height: 56px;
  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 기본 초기화 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: auto;
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
}

body.site-body {
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  color: var(--text-body);
  background-color: var(--bg-page);
  overflow-x: hidden;
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   레이아웃 시스템 (Site Layout)
   ========================================================================== */

.site-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* ==========================================================================
   왼쪽 고정 바 (Sidebar - 연회색)
   ========================================================================== */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-sidebar);
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform var(--transition-normal);
}

/* 사이드바 스크롤바 커스텀 */
.sidebar::-webkit-scrollbar {
  width: 4px;
}
.sidebar::-webkit-scrollbar-thumb {
  background: #dce1e9;
  border-radius: 4px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
  background: #c3cbd7;
}

.sidebar__inner {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 40px 24px 28px;
}

/* 구분선 */
.sidebar__divider {
  height: 1px;
  background-color: var(--border-sidebar);
  margin: 24px 0;
}

/* 1. 프로필 영역 (Profile) */
.sidebar__profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 4px 0 6px;
}

.sidebar__avatar-link {
  display: inline-block;
  margin-bottom: 14px;
  position: relative;
}

.sidebar__avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  transition: none;
}

.sidebar__avatar-link:hover .sidebar__avatar {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.sidebar__avatar--placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e4e8ef, #cfd7e3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: var(--text-muted);
  border: 3px solid #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.sidebar__profile-text {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sidebar__name {
  font-size: 19px;
  font-weight: 750;
  color: var(--text-main);
  letter-spacing: -0.03em;
  line-height: 1.3;
  margin-bottom: 6px;
}

.sidebar__name:hover {
  color: #000000;
}

.sidebar__email {
  color: var(--text-subtle);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.01em;
  transition: color var(--transition-fast);
}

.sidebar__email:hover {
  color: var(--text-main);
}

/* 글 검색 */
.sidebar__search {
  position: relative;
  margin-bottom: 14px;
}

.sidebar__search-label {
  display: block;
  margin: 0 8px 10px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.sidebar__search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border: 1px solid var(--border-sidebar);
  border-radius: 9px;
  background: #ffffff;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.sidebar__search-box:focus-within {
  border-color: #aeb8c8;
  box-shadow: 0 0 0 3px rgba(174, 184, 200, 0.2);
}

.sidebar__search-icon {
  flex-shrink: 0;
  color: var(--text-muted);
}

.sidebar__search-box input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text-main);
  font: inherit;
  font-size: 13px;
}

.sidebar__search-box input::placeholder {
  color: var(--text-subtle);
}

.sidebar__search-box input::-webkit-search-cancel-button {
  cursor: pointer;
}

.site-search-panel {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
}

.content-area.is-searching > :not(.site-search-panel) {
  display: none;
}

.site-search-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidebar__search-item a {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--border-card);
  border-radius: 9px;
  color: var(--text-body);
  font-size: 14px;
  line-height: 1.5;
  text-decoration: none;
}

.sidebar__search-item a:hover {
  background: var(--bg-sidebar-hover);
  color: var(--text-main);
  border-color: #cbd5e1;
}

.sidebar__search-item-title {
  display: block;
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar__search-item-description {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--text-subtle);
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 섹션 타이틀 공통 */
.sidebar__section-header {
  margin-bottom: 10px;
  padding: 0 8px;
}

.sidebar__section-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* 2. 블로그 메뉴 (Menu) */
.sidebar__menu-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar__menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 9px;
  font-size: 14.5px;
  font-weight: 550;
  color: var(--text-body);
  transition: all var(--transition-fast);
}

.sidebar__icon {
  color: var(--text-muted);
  flex-shrink: 0;
  transition: color var(--transition-fast);
}

.sidebar__badge {
  margin-left: auto;
  font-size: 13px;
  font-weight: 650;
  padding: 2px 7px;
  border-radius: 20px;
  background-color: #e5e9f0;
  color: var(--text-muted);
}

.sidebar__menu-item:hover {
  background-color: var(--bg-sidebar-hover);
  color: var(--text-main);
}

.sidebar__menu-item:hover .sidebar__icon {
  color: var(--text-main);
}

.sidebar__menu-item.is-active {
  background-color: var(--bg-sidebar-active);
  color: var(--text-main);
  font-weight: 700;
}

.sidebar__menu-item.is-active .sidebar__icon {
  color: var(--text-main);
  stroke-width: 2.4;
}

.sidebar__menu-item.is-active .sidebar__badge {
  background-color: #ffffff;
  color: var(--text-main);
}

/* 3. 카테고리 (Categories) */
.sidebar__category-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sidebar__category-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--text-body);
  transition: all var(--transition-fast);
}

.sidebar__guestbook-link {
  margin-bottom: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.sidebar__guestbook-content {
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
}

.sidebar__guestbook-icon {
  flex: 0 0 auto;
  display: block;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.sidebar__guestbook-link:hover .sidebar__guestbook-icon,
.sidebar__guestbook-link.is-active .sidebar__guestbook-icon {
  color: var(--text-main);
}

.sidebar__guestbook-content .sidebar__category-name {
  line-height: 1.4;
}

.sidebar__categories {
  padding-top: 20px;
  border-top: 1px solid var(--border-sidebar);
}

.sidebar__category-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar__count {
  font-size: 13px;
  color: var(--text-subtle);
  font-weight: 600;
  background-color: #e8ecf2;
  padding: 1px 6px;
  border-radius: 12px;
  transition: all var(--transition-fast);
}

.sidebar__category-item:hover {
  background-color: var(--bg-sidebar-hover);
  color: var(--text-main);
}

.sidebar__category-item:hover .sidebar__count {
  background-color: #dbe1eb;
  color: var(--text-main);
}

.sidebar__category-item.is-active {
  background-color: var(--bg-sidebar-active);
  font-weight: 700;
  color: var(--text-main);
}

.sidebar__category-item.is-active .sidebar__count {
  background-color: #ffffff;
  color: var(--text-main);
}

.sidebar__empty-category {
  padding: 8px 14px;
  font-size: 13px;
  color: var(--text-subtle);
}

/* ========================================================================== 
   중앙 콘텐츠 영역 (Center Content Area - 흰색)
   ========================================================================== */

.content-area {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-width: 0;
  min-height: 100vh;
  padding: 44px 40px 64px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.content-container {
  width: 100%;
  max-width: 860px;
  min-width: 0;
  background-color: var(--bg-content);
  border-radius: 14px;
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-card);
  padding: 48px 52px 56px;
  transition: box-shadow var(--transition-normal);
}

.post-body {
  padding-bottom: 24px;
}

/* 페이지 상·하단 이동 버튼 */
.scroll-controls {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.scroll-controls__button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--text-muted);
  background-color: var(--bg-content);
  border: 1px solid var(--border-card);
  border-radius: 50%;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: opacity var(--transition-fast), color var(--transition-fast), background-color var(--transition-fast);
}

.scroll-controls__button:hover {
  color: var(--text-main);
  background-color: var(--bg-sidebar);
}

.content-page {
  width: 100%;
  max-width: 860px;
  min-width: 0;
}

.content-page > .content-header,
.post-header {
  margin-bottom: 28px;
  padding: 4px 6px 8px;
  border-bottom: none;
  min-height: 0;
  height: auto;
}

/* 콘텐츠 공통 헤더 */
.content-header {
  padding-bottom: 24px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border-light);
}

.content-header__eyebrow {
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.12em;
  color: var(--text-subtle);
  margin-bottom: 6px;
}

.content-header__info {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.content-header__info--centered-title {
  position: relative;
  display: block;
  text-align: center;
}

.content-header__info--centered-title .content-header__count {
  position: static;
  display: block;
  margin-top: 8px;
  transform: none;
}

.content-header__title,
.post-header__title {
  font-size: 27px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.04em;
  line-height: 1.25;
  text-align: center;
}

.post-header__program-image {
  display: block;
  width: 112px;
  height: 112px;
  object-fit: contain;
  margin: 0 auto 18px;
  border-radius: 22px;
  box-shadow: none;
}

.content-header__count,
.post-header time,
.post-header__date-category,
.post-header__date-separator {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 550;
  background: transparent;
  padding: 0;
  border-radius: 0;
}

/* ==========================================================================
   포스트 목록 (Post List & Card)
   ========================================================================== */

.post-list {
  display: flex;
  flex-direction: column;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
}

.pagination__link {
  display: inline-flex;
  min-width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.pagination__link:hover,
.pagination__link.is-current {
  border-color: var(--text-main);
  color: var(--text-main);
  background: var(--bg-sidebar-active);
}

.post-card {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 28px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border-light);
  transition: opacity var(--transition-fast);
}

.post-card:hover {
  opacity: 0.75;
}

.post-card:first-child {
  padding-top: 4px;
}

.post-card:last-child {
  border-bottom: none;
  padding-bottom: 8px;
}

.post-card__content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.post-card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  margin-bottom: 0;
  flex-wrap: wrap;
}

.post-card__categories {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.post-card__category {
  font-size: 13px;
  font-weight: 600;
  color: #3b4554;
  background-color: var(--bg-tag);
  padding: 2px 9px;
  border-radius: 6px;
  transition: all var(--transition-fast);
}

.post-card__category:hover {
  background-color: var(--bg-tag-hover);
  color: var(--text-main);
}

.post-card__date {
  font-size: 13px;
  color: var(--text-subtle);
}

.post-card__date-separator,
.post-card__date-category {
  font-size: 13px;
  color: var(--text-subtle);
}

.post-card__date-category:hover {
  color: var(--text-muted);
}

.post-card__title {
  font-size: 21px;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.38;
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-card__title a {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-main);
}

.post-card__title a:hover {
  color: #000000;
}

.post-card--home .post-card__home-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.post-card--home {
  padding-top: 12px;
  padding-bottom: 12px;
}

.post-card--home:first-child {
  padding-top: 4px;
}

.post-card--home:last-child {
  padding-bottom: 8px;
}

.post-card--home .post-card__title {
  margin: 0;
  min-width: 0;
  font-size: 18px;
  font-weight: 400;
}

.post-card__home-category {
  flex: 0 0 auto;
  color: var(--text-subtle);
  font-size: 13px;
  white-space: nowrap;
}

.post-card__home-category:hover {
  color: var(--text-main);
}

.post-card--home .post-card__date {
  flex: 0 0 auto;
  margin-left: auto;
  white-space: nowrap;
}

.post-card__summary {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.62;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card__summary a {
  color: inherit;
}

.post-card__thumb {
  flex-shrink: 0;
  width: 140px;
  height: 100px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-light);
  background-color: var(--bg-page);
  align-self: center;
}

.post-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.empty-state {
  padding: 56px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 15px;
}

/* ==========================================================================
   카테고리 그리드 (Category Grid - /categories/)
   ========================================================================== */

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  padding: 8px 0;
}

.category-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background-color: var(--bg-sidebar);
  border: 1px solid var(--border-sidebar);
  border-radius: 10px;
  transition: all var(--transition-fast);
}

.category-card:hover {
  background-color: #ffffff;
  border-color: #cfd6e0;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
}

.category-card__icon {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-card:hover .category-card__icon {
  color: var(--text-main);
}

.category-card__name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.category-card__count {
  font-size: 13px;
  color: var(--text-muted);
}

/* ==========================================================================
   상세 포스트 본문 (Single Post) & 오른쪽 팝업 목차 (Popup TOC)
   ========================================================================== */

/* 오른쪽 끝 팝업 목차 (TOC Popup: 포스트 상단 라인과 시작점 일치, 우측 여백 적용) */
.toc-popup {
  position: fixed;
  right: 20px;
  top: 20px;
  z-index: 85;
}

/* 팝업 트리거 버튼 (기본 접힘 상태: 우측 여백을 둔 깔끔한 버튼) */
.toc-popup__trigger {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background-color: #ffffff;
  color: var(--text-main);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.07);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.toc-popup__trigger:hover {
  background-color: var(--bg-sidebar-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  border-color: #cbd5e1;
}

.toc-popup.is-collapsed .toc-popup__trigger {
  display: inline-flex;
}

.toc-popup.is-collapsed .toc-popup__card {
  display: none;
}

/* 팝업 카드 본체 (클릭하여 열렸을 때) */
.toc-popup__card {
  position: fixed;
  right: 20px;
  top: 20px;
  width: 250px;
  max-height: calc(100vh - 88px);
  background-color: var(--bg-sidebar);
  border: 1px solid var(--border-sidebar);
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: tocPopIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes tocPopIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.toc-popup__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-sidebar);
  background-color: rgba(247, 248, 250, 0.96);
  backdrop-filter: blur(8px);
}

.toc-popup__title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toc-popup__icon {
  color: var(--text-muted);
}

.toc-popup__title {
  font-size: 13px;
  font-weight: 750;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.toc-popup__close {
  background: none;
  border: none;
  padding: 4px;
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.toc-popup__close:hover {
  color: var(--text-main);
  background-color: var(--bg-sidebar-hover);
}

.toc-popup__body {
  padding: 14px 16px 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  max-height: calc(100vh - 210px);
}

.toc-popup__body::-webkit-scrollbar {
  width: 3px;
}
.toc-popup__body::-webkit-scrollbar-thumb {
  background: #dce1e9;
  border-radius: 3px;
}

.toc-popup__body #TableOfContents ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toc-popup__body #TableOfContents ul ul {
  padding-left: 12px;
  margin-top: 2px;
  margin-bottom: 2px;
  gap: 2px;
}

.toc-popup__body #TableOfContents li {
  margin: 0;
}

.toc-popup__body #TableOfContents a {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  padding: 5px 8px;
  border-radius: 6px;
  line-height: 1.45;
  text-decoration: none;
  transition: all var(--transition-fast);
  word-break: break-word;
}

.toc-popup__body #TableOfContents a:hover {
  color: var(--text-main);
  background-color: var(--bg-sidebar-hover);
}

.toc-popup__body #TableOfContents a.is-active {
  color: var(--text-main);
  font-weight: 700;
  background-color: var(--bg-sidebar-active);
  border-left: 2px solid var(--text-main);
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

/* 포스트 전체 레이아웃 (제목 영역 + 본문 카드) */
.post-wrapper {
  width: 100%;
  max-width: 860px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* 제목 영역: 하얀 박스 없이 분리된 헤더 */
.post-header__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.post-header__categories {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.post-header__category {
  font-size: 13px;
  font-weight: 650;
  color: #3b4554;
  background-color: #ffffff;
  border: 1px solid var(--border-sidebar);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  padding: 3px 10px;
  border-radius: 6px;
  transition: all var(--transition-fast);
}

.post-header__category:hover {
  background-color: var(--bg-tag-hover);
  color: var(--text-main);
  border-color: #cbd5e1;
}

.post-header__date {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  margin-top: 8px;
}

.post-header__date-category {
  font-size: 14px;
  font-weight: 550;
  color: var(--text-muted);
  background: none;
  border: 0;
  box-shadow: none;
  padding: 0;
  border-radius: 0;
}

.post-header__date-separator {
  font-size: 14px;
  font-weight: 550;
  color: var(--text-muted);
  background: none;
  border: 0;
  box-shadow: none;
}

.post-header__date-category:hover {
  color: var(--text-muted);
  background: none;
  border-color: transparent;
}

/* 본문 스타일링 */
.post-content {
  font-size: 16px;
  line-height: 1.8;
  color: #272c33;
  min-width: 0;
}

.post-content > *:first-child {
  margin-top: 0;
}

.post-content p {
  margin-bottom: 22px;
}

.post-content h2 {
  font-size: 23px;
  font-weight: 750;
  letter-spacing: -0.035em;
  color: var(--text-main);
  margin: 44px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
  scroll-margin-top: 36px;
}

.post-content h3 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-main);
  margin: 32px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
  scroll-margin-top: 36px;
}

.post-content blockquote {
  margin: 20px 0;
  padding: 12px 22px;
  background-color: #f7f9fb;
  border-left: 3px solid #6b7280;
  border-radius: 0 8px 8px 0;
  color: #4b5563;
  font-style: normal;
}

.post-content blockquote p {
  margin: 0;
}

.post-content strong {
  font-weight: 700;
  color: var(--text-main);
}

.post-content ul, .post-content ol {
  margin: 16px 0 22px 20px;
}

.post-content ul {
  list-style: disc;
}

.post-content ol {
  counter-reset: ordered-item;
  list-style: none;
  margin-left: 0;
  padding-left: 0;
}

.post-content li {
  margin-bottom: 6px;
}

.post-content ol > li {
  position: relative;
  counter-increment: ordered-item;
  padding-left: 34px;
  margin-bottom: 10px;
}

.post-content ol > li::before {
  content: counter(ordered-item);
  display: inline-flex;
  position: absolute;
  top: 0.27em;
  left: 0;
  width: 24px;
  height: 24px;
  margin: 0;
  align-items: center;
  justify-content: center;
  border: 1px solid #d7dde5;
  border-radius: 50%;
  background: #f3f5f7;
  color: #4b5563;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.post-content code:not(pre code) {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  background-color: #edf0f5;
  padding: 2px 6px;
  border-radius: 4px;
  color: #b91c1c;
}

/* 표 */
.post-content table {
  width: 100%;
  table-layout: fixed;
  margin: 20px 0;
  border: 1px solid var(--border-card);
  border-radius: 10px;
  border-spacing: 0;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
  font-size: 14px;
  line-height: 1.55;
}

.post-content table th,
.post-content table td {
  min-width: 130px;
  padding: 13px 16px;
  border-right: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  text-align: left;
  white-space: normal;
}

.post-content table th:last-child,
.post-content table td:last-child {
  border-right: 0;
}

.post-content table tr:last-child td {
  border-bottom: 0;
}

.post-content table thead th {
  background: #f3f6fa;
  color: var(--text-main);
  font-weight: 750;
  white-space: nowrap;
}

.post-content table tbody tr:nth-child(even) td {
  background: #fafbfd;
}

/* 코드블럭 */
.post-content pre {
  margin: 20px 0;
  padding: 0;
  overflow-x: auto;
  border: 1px solid #d5dbe3;
  border-radius: 10px;
  background: #eef1f4;
  color: #111827;
  line-height: 1.7;
  tab-size: 2;
}

.post-content pre code {
  display: block;
  padding: 20px 22px;
  background: transparent;
  color: inherit;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13.5px;
  white-space: pre;
}

.code-block__toolbar {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  width: 100%;
  box-sizing: border-box;
  padding: 0 10px 0 16px;
  border-bottom: 1px solid #d5dbe3;
  background: #e4e8ed;
  color: #6b7280;
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.code-block__label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.code-block__label::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9ca3af;
  content: "";
}

.code-copy-button {
  padding: 5px 9px;
  border: 1px solid #cbd2dc;
  border-radius: 6px;
  background: #ffffff;
  color: #374151;
  font: inherit;
  font-size: 12px;
  line-height: 1.3;
  cursor: pointer;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.code-copy-button:hover {
  border-color: #9aa5b5;
  background: #f8fafc;
  color: #111827;
}

.code-copy-button.is-copied {
  border-color: #9ca3af;
  background: #e5e7eb;
  color: #111827;
}

/* 본문 이미지 */
.post-content > img,
.post-content > p > img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 20px auto;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  box-shadow: 0 0 12px rgba(31, 41, 55, 0.10);
}

.image-figure {
  margin: 20px 0;
}

.image-figure img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  box-shadow: 0 0 12px rgba(31, 41, 55, 0.10);
}

.image-figure figcaption {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

.image-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  margin: 20px 0;
  align-items: stretch;
}

.image-row--3 { display: flex; }

.image-row .image-figure {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  min-width: 0;
  margin: 0;
}

.image-row .image-figure img {
  display: block;
  flex: 0 0 auto;
  width: auto !important;
  max-width: none;
  height: auto;
  object-fit: contain;
  align-self: flex-start;
}

.image-row__caption,
.image-row > figcaption {
  flex: 0 0 100%;
  margin: -6px 0 0;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
}

@media (max-width: 640px) {
  .image-row, .image-row--3 {
    gap: 8px;
    flex-wrap: nowrap;
  }

  .image-row .image-figure img {
    max-width: none;
    height: auto;
    object-fit: contain;
  }
}

/* 포스트 상세 하단 */
.post-footer {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--border-light);
}

.post-footer__nav {
  display: flex;
  justify-content: flex-start;
}

.post-footer__back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background-color: var(--bg-sidebar);
  border: 1px solid var(--border-sidebar);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  transition: all var(--transition-fast);
}

.post-footer__back-btn:hover {
  background-color: #ffffff;
  border-color: #cfd6e0;
  transform: translateX(-3px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

/* ==========================================================================
   쇼트코드 (Details, Linkcard)
   ========================================================================== */

/* Details Shortcode */
.details-box {
  margin: 20px 0;
  overflow: hidden;
  border: 1px solid var(--border-card);
  border-radius: 9px;
  background-color: #fbfcfd;
}

.details-box summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  color: #3b4554;
  font-size: 14.5px;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background-color var(--transition-fast);
}

.details-box summary:hover {
  background-color: #f5f7fa;
}

.details-box summary::-webkit-details-marker {
  display: none;
}

.details-box summary::before {
  content: "+";
  color: var(--text-muted);
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
}

.details-box[open] summary {
  border-bottom: 1px solid var(--border-light);
  background-color: #f6f8fb;
}

.details-box[open] summary::before {
  content: "−";
}

.details-box__label--open {
  display: none;
}
.details-box[open] .details-box__label--closed {
  display: none;
}
.details-box[open] .details-box__label--open {
  display: inline;
}

.details-box__content {
  padding: 18px 20px;
  color: #4b5563;
  font-size: 14.5px;
  line-height: 1.7;
}

.details-box__content > :first-child {
  margin-top: 0;
}
.details-box__content > :last-child {
  margin-bottom: 0;
}

/* Link Card Shortcode */
.link-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  height: 160px;
  margin: 20px 0;
  overflow: hidden;
  color: var(--text-main);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  background: #fbfcfd;
  text-decoration: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.link-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}

.link-card__body {
  display: flex;
  min-width: 0;
  padding: 20px 22px;
  flex-direction: column;
  justify-content: center;
}

.link-card__site {
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.link-card__title {
  display: block;
  overflow: hidden;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-card__excerpt {
  display: -webkit-box;
  margin-top: 6px;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.link-card__url {
  margin-top: 10px;
  overflow: hidden;
  color: var(--text-subtle);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-card__thumbnail {
  position: relative;
  display: block;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--bg-page);
}

.link-card__thumbnail--brand {
  display: grid;
  place-items: center;
  color: #64748b;
  background: linear-gradient(145deg, #f0f3f6, #dce2e8);
}

.link-card__thumbnail--brand svg {
  width: 38px;
  height: 38px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.link-card__thumbnail--favicon {
  background: linear-gradient(145deg, #f7f8fa, #e8ebef);
}

.link-card__thumbnail.link-card__thumbnail--favicon img {
  inset: 22%;
  width: 56%;
  height: 56%;
  object-fit: contain;
}

.link-card__thumbnail--onedrive {
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #eef7ff, #dbeeff);
}

.link-card__thumbnail--onedrive svg {
  width: 54px;
  height: 54px;
  fill: #1677d2;
}

.link-card__thumbnail img {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}

.link-card:hover .link-card__thumbnail img {
  transform: scale(1.03);
}

/* ==========================================================================
   모바일 헤더 및 반응형 (Mobile Responsive)
   ========================================================================== */

.mobile-header {
  display: none;
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background-color: rgba(247, 248, 250, 0.78);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(229, 232, 238, 0.8);
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
  z-index: 90;
}

.mobile-menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: -8px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: background-color var(--transition-fast);
}

.mobile-menu-btn:hover {
  background-color: var(--bg-sidebar-hover);
}

.mobile-menu-btn .icon-close {
  display: none;
}

.mobile-title {
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.03em;
  color: var(--text-main);
}

.mobile-spacer {
  width: 38px;
}

/* 사이드바 백드롭 (모바일 오버레이) */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(2px);
  z-index: 95;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

/* 모바일 메뉴 열림 상태 */
body.sidebar-open {
  overflow: hidden;
}

body.sidebar-open .sidebar-backdrop {
  opacity: 1;
  pointer-events: auto;
}

body.sidebar-open .mobile-menu-btn .icon-menu {
  display: none;
}

body.sidebar-open .mobile-menu-btn .icon-close {
  display: block;
}

/* 반응형 브레이크포인트 (태블릿 / 모바일) */
@media (max-width: 900px) {
  .mobile-header {
    display: flex;
  }

  .toc-popup {
    display: block;
    top: calc(var(--header-height) + 12px);
    bottom: auto;
    right: 20px;
  }

  .toc-popup__card {
    top: calc(var(--header-height) + 12px);
    width: min(300px, calc(100vw - 40px));
    max-height: calc(100vh - var(--header-height) - 36px);
  }

  .sidebar-backdrop {
    display: block;
  }

  .site-layout {
    flex-direction: column;
  }

  .sidebar {
    transform: translateX(-100%);
    box-shadow: none;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
  }

  .content-area {
    margin-left: 0;
    padding: 20px 0 40px;
  }

  .content-container {
    padding: 32px 24px 36px;
    border-radius: 12px;
  }

  .post-body {
    padding-bottom: 24px;
  }

  .content-page > .content-header,
  .post-header {
    margin-bottom: 20px;
    padding: 16px 24px 6px;
    min-height: 95px;
  }

  .post-card {
    gap: 16px;
  }

  .post-card__thumb {
    width: 100px;
    height: 75px;
  }

  .post-card__title {
    font-size: 18px;
  }

  .post-header {
    margin-bottom: 20px;
    padding: 16px 4px 6px;
    min-height: 95px;
  }

  .content-header__title,
  .post-header__title {
    font-size: 26px;
  }

  .link-card {
    grid-template-columns: minmax(0, 1fr) 110px;
    height: 135px;
  }

  .link-card__body {
    padding: 14px 16px;
  }

  .link-card__url {
    display: none;
  }
}

@media (max-width: 540px) {
  .scroll-controls {
    right: 16px;
    bottom: 16px;
  }

  .post-header {
    margin-bottom: 16px;
    padding: 16px;
    min-height: 99px;
  }

  .content-header__title,
  .post-header__title {
    font-size: 22px;
  }

  .post-card--has-image {
    flex-direction: column-reverse;
    gap: 14px;
  }

  .post-card__thumb {
    width: 100%;
    height: 160px;
    align-self: stretch;
  }

  .content-container {
    padding: 24px 16px 28px;
    border-radius: 8px;
  }

  .post-body {
    padding-bottom: 20px;
  }

  .content-page > .content-header {
    margin-bottom: 16px;
    padding: 16px;
    min-height: 99px;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }
}


/* GitHub syntax highlighting (Hugo Chroma) */
.bg { background-color: #f7f7f7; }
.chroma { background-color: #f7f7f7; -webkit-text-size-adjust: none; }
.chroma .err { color: #f6f8fa; background-color: #82071e; }
.chroma .hl { background-color: #dedede; }
.chroma .lnt, .chroma .ln { color: #7f7f7f; }
.chroma .line { display: flex; }
.chroma .k, .chroma .kc, .chroma .kd, .chroma .kn, .chroma .kp, .chroma .kr, .chroma .kt { color: #cf222e; }
.chroma .na, .chroma .nc, .chroma .nx, .chroma .p, .chroma .ge, .chroma .go { color: #1f2328; }
.chroma .no, .chroma .nd, .chroma .nt, .chroma .m, .chroma .mb, .chroma .mf, .chroma .mh, .chroma .mi, .chroma .il, .chroma .mo, .chroma .o, .chroma .ow, .chroma .or { color: #0550ae; }
.chroma .ni, .chroma .nb, .chroma .nf, .chroma .fm { color: #6639ba; }
.chroma .nl { color: #900; font-weight: bold; }
.chroma .nn { color: #24292e; }
.chroma .bp { color: #6a737d; }
.chroma .nv, .chroma .vc, .chroma .vg, .chroma .vi, .chroma .vm { color: #953800; }
.chroma .s, .chroma .sa, .chroma .sb, .chroma .sc, .chroma .dl, .chroma .sd, .chroma .s2, .chroma .se, .chroma .sh, .chroma .si, .chroma .sx, .chroma .sr, .chroma .s1 { color: #0a3069; }
.chroma .ss { color: #032f62; }
.chroma .c, .chroma .ch, .chroma .cm, .chroma .c1, .chroma .cs, .chroma .cp, .chroma .cpf { color: #57606a; }
.chroma .gd { color: #82071e; background-color: #ffebe9; }
.chroma .gi { color: #116329; background-color: #dafbe1; }
.chroma .gl { text-decoration: underline; }

/* Image lightbox */
body.lightbox-open {
  overflow: hidden;
}

.post-content img.is-zoomable {
  cursor: pointer;
}

.comments {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid #e5e7eb;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: visible;
}

.comments .giscus {
  display: block;
  width: 100% !important;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.comments .giscus-frame,
.comments iframe {
  display: block;
  width: 100% !important;
  max-width: 100%;
  min-width: 0;
  padding-right: 0;
  border: 0;
  box-sizing: border-box;
}

.related-posts {
  margin-top: 52px;
  padding: 24px 30px 15px;
  border: none;
  border-radius: 12px;
  background: #f1f3f5;
}

.related-posts__title {
  margin: 0 0 12px;
  color: #374151;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}

.related-posts__title a {
  color: inherit;
  text-decoration: none;
}

.related-posts__title a:hover {
  text-decoration: underline;
}

.related-posts__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.related-posts__item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  min-width: 0;
}

.related-posts__item[hidden] {
  display: none;
}

.related-posts__link {
  min-width: 0;
  overflow: hidden;
  color: #374151;
  font-size: 15px;
  line-height: 1.5;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.related-posts__link:hover {
  color: var(--text-main);
  text-decoration: underline;
}

.related-posts__date {
  flex: 0 0 auto;
  color: #4b5563;
  font-size: 14px;
  white-space: nowrap;
}

.related-posts__pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 10px 0 0;
}

.related-posts__page {
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #6b7280;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.related-posts__page:hover {
  background: #e2e6ea;
  color: #374151;
}

.related-posts__page.is-active {
  background: #d9dee4;
  color: #1f2937;
  font-weight: 700;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.image-lightbox.is-open {
  display: flex;
}

.image-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 20, 0.78);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.image-lightbox__dialog {
  position: relative;
  z-index: 1;
  display: flex;
  max-width: 98vw;
  max-height: 96vh;
  flex-direction: column;
  align-items: center;
}

.image-lightbox__image {
  display: block;
  max-width: 100%;
  max-height: calc(96vh - 48px);
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.image-lightbox__caption {
  display: none;
}

.image-lightbox__close {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 1002;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.5);
  font-family: inherit;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
}

.image-lightbox__close:hover {
  background: #000;
}

@media (max-width: 600px) {
  .related-posts {
    margin-top: 36px;
    padding: 20px 16px 15px;
  }

  .related-posts__item {
    align-items: baseline;
    flex-direction: row;
    gap: 12px;
  }

  .related-posts__link {
    flex: 1 1 auto;
    white-space: nowrap;
  }

  .related-posts__date {
    font-size: 13px;
  }
}

/* ==========================================================================
   홈 화면 최신글 카드 캐러셀 (Home Showcase Carousel)
   - 레퍼런스 스타일: 깔끔한 화이트 박스, 가로 슬라이더, 둥근 썸네일, 원형 버튼, 알약 인디케이터
   ========================================================================== */

.home-showcase-container {
  padding: 28px 40px 32px;
}

.home-showcase-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.home-showcase-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-main);
  line-height: 1.2;
}

.home-showcase-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all var(--transition-fast);
}

.home-showcase-more svg {
  transition: transform var(--transition-fast);
}

.home-showcase-more:hover {
  color: var(--text-main);
  background-color: var(--bg-sidebar);
}

.home-showcase-more:hover svg {
  transform: translateX(2px);
}

/* 캐러셀 래퍼 */
.home-carousel {
  position: relative;
  width: 100%;
}

.home-carousel__viewport {
  position: relative;
  width: 100%;
}

.home-carousel__track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 2px 2px 4px;
  -webkit-overflow-scrolling: touch;
}

.home-carousel__track::-webkit-scrollbar {
  display: none;
}

/* 개별 카드 */
.home-card {
  flex: 0 0 calc((100% - 44px) / 3.25);
  min-width: 220px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
}

.home-card__thumb-link {
  display: block;
  width: 100%;
  text-decoration: none;
  border-radius: 12px;
  overflow: hidden;
  background-color: var(--bg-page);
  border: 1px solid var(--border-light);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.home-card__thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9.5;
  border-radius: 11px;
  overflow: hidden;
  background-color: #f1f3f6;
}

.home-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.home-card:hover .home-card__thumb img {
  transform: scale(1.05);
}

.home-card__thumb--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #edf0f5 0%, #f7f9fb 100%);
  color: #94a1b2;
}

.home-card__body {
  display: flex;
  flex-direction: column;
  padding-top: 10px;
  flex: 1;
}

.home-card__title {
  font-size: 16px;
  font-weight: 750;
  line-height: 1.38;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 44px;
}

.home-card__title a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.home-card__title a:hover {
  color: #000000;
}

.home-card__summary {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-card__summary a {
  color: inherit;
  text-decoration: none;
}

.home-card__date {
  font-size: 12.5px;
  color: var(--text-subtle);
  font-weight: 400;
  margin-top: auto;
  font-variant-numeric: tabular-nums;
}

/* 네비게이션 화살표 버튼 */
.home-carousel__btn {
  position: absolute;
  top: 36%;
  transform: translateY(-50%);
  z-index: 10;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(30, 35, 45, 0.88);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
}

.home-carousel__btn:hover {
  background: #111827;
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.home-carousel__btn:active {
  transform: translateY(-50%) scale(0.95);
}

.home-carousel__btn--prev {
  left: -14px;
}

.home-carousel__btn--next {
  right: -14px;
}

/* 하단 페이지 인디케이터 (Pill + Dots) */
.home-carousel__pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 14px;
}

.home-carousel__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #cbd5e1;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.home-carousel__dot:hover {
  background: #94a3b8;
}

.home-carousel__dot.is-active {
  width: 26px;
  height: 7px;
  border-radius: 4px;
  background: #ff8a00;
  cursor: default;
}

/* 본문 하단 최신 글 메뉴 */
.home-showcase--embedded {
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid var(--border-light);
}

.home-showcase--embedded .home-showcase-title {
  font-size: 18px;
}

.home-showcase--embedded .home-showcase-header {
  margin-bottom: 16px;
}

.home-showcase--embedded .home-carousel__pagination {
  margin-bottom: 4px;
}

.home-category-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
}

.home-category-section .home-showcase-header {
  margin-bottom: 16px;
}

.home-category-section .home-showcase-title {
  font-size: 18px;
}

/* 반응형 미디어 쿼리 */
@media (max-width: 900px) {
  .home-card {
    flex: 0 0 calc((100% - 20px) / 2.3);
  }
}

@media (max-width: 640px) {
  .home-showcase-container {
    padding: 20px 20px 22px;
  }

  .home-showcase-title {
    font-size: 18px;
  }

  .home-carousel__track {
    gap: 14px;
  }

  .home-card {
    flex: 0 0 50%;
    min-width: 180px;
  }

  .home-carousel__btn--prev {
    left: 4px;
  }

  .home-carousel__btn--next {
    right: 4px;
  }
}
