/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #333;
  --secondary-color: #666;
  --accent-color: #2563EB;
  --accent-pastel: #DBEAFE;
  --accent-light: #EFF6FF;
  --highlight-bg: #FEF3C7;
  --highlight-color: #92400E;
  --text-primary: #1D1D1F;
  --text-secondary: #86868B;
  --bg-primary: #FFFFFF;
  --bg-secondary: #F5F5F7;
  --border-color: #E5E5E7;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.08);
  --border-radius: 8px;
  /* LobeHub-style layout */
  --lobehub-radius: 12px;
  --lobehub-radius-sm: 8px;
  --lobehub-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  --lobehub-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.08);
  --doc-max-width: 900px;
  --header-max-width: 960px;
  
  /* 코드 블록 라이트 모드 */
  --code-bg: #F8F9FA;
  --code-border: #E1E4E8;
  --code-text: #24292E;
  --code-header-bg: rgba(0, 0, 0, 0.03);
  --code-header-text: #586069;
  /* 코드 블럭 라인 높이(라인넘버/코드 동기화용) - CodeSandbox 스타일 */
  --code-line-height: 20px;
}

[data-theme="dark"] {
  --text-primary: #F5F5F5;
  --text-secondary: #C0C0C0;
  --bg-primary: #1A1A1A;
  --bg-secondary: #252525;
  --border-color: #3A3A3A;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 2px 12px rgba(0, 0, 0, 0.45);
  
  /* 하이라이트 다크 모드 */
  --highlight-bg: #3B3B1F;
  --highlight-color: #FCD34D;
  
  /* 액센트 다크 모드 */
  --accent-pastel: #1E3A5F;
  --accent-light: #1E293B;
  
  /* 코드 블록 다크 모드 */
  --code-bg: #0D1117;
  --code-border: #30363D;
  --code-text: #C9D1D9;
  --code-header-bg: rgba(255, 255, 255, 0.05);
  --code-header-text: #C9D1D9;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

/* 홈페이지 콘텐츠가 배경 위에 표시되도록 */
body.home-page .page-content {
  position: relative;
  z-index: 1;
  padding-top: 0;
  padding-bottom: 0;
}

/* 테마 전환 시 안개 효과 */
html.theme-fade::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.15), transparent 45%),
              radial-gradient(circle at 70% 60%, rgba(0,0,0,0.12), transparent 40%),
              var(--bg-primary);
  mix-blend-mode: screen;
  filter: blur(6px);
  animation: fogFade 0.45s ease forwards;
}

@keyframes fogFade {
  0% { opacity: 0.45; }
  100% { opacity: 0; }
}

/* Header - 상단 네비게이션 */
.site-header {
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  padding: 0.625rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

/* 홈페이지 헤더는 반투명 배경 */
body.home-page .site-header {
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

[data-theme="dark"] body.home-page .site-header {
  background-color: rgba(26, 26, 26, 0.85);
}

[data-theme="dark"] .site-header {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

.site-header .header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

/* LobeHub-style header */
.layout-lobehub .lobehub-header {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}
.layout-lobehub .lobehub-header .header-inner {
  width: 100%;
}
.layout-lobehub .lobehub-header .site-title {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  flex-shrink: 0;
}

/* 상단 네비 링크 */
.site-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  flex-wrap: wrap;
}
.nav-link {
  padding: 0.4rem 0.65rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.nav-link:hover {
  color: var(--accent-color);
  background: var(--bg-secondary);
}
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
}

/* 메인 화면: 프로필 카드 아래 검색 트리거 */
.nav-search-wrap {
  margin-bottom: 1rem;
  padding: 0 0.25rem;
}
.nav-search-trigger {
  --nav-search-bg: #ffffff;
  --nav-search-color: #171717;
  --nav-search-muted: #f5f5f5;
  --nav-search-muted-fg: #737373;
  --nav-search-border: #e5e5e5;
  position: relative;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  width: 100%;
  max-width: 16rem;
  height: 2rem;
  padding: 0 1rem 0 0.75rem;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--nav-search-muted-fg);
  background: var(--nav-search-bg);
  border: 1px solid var(--nav-search-border);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  text-align: left;
  box-shadow: none;
}
.nav-search-trigger:hover {
  background: var(--nav-search-muted);
  color: var(--nav-search-color);
}
.nav-search-trigger:focus {
  outline: none;
}
.nav-search-trigger:focus-visible {
  box-shadow: 0 0 0 1px var(--nav-search-border);
}
.nav-search-label-sm {
  display: inline-flex;
}
.nav-search-label-lg {
  display: none;
}
@media (min-width: 1024px) {
  .nav-search-label-sm {
    display: none;
  }
  .nav-search-label-lg {
    display: inline-flex;
  }
}
.nav-search-kbd {
  position: absolute;
  right: 0.3rem;
  top: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  height: 1.25rem;
  padding: 0 0.375rem;
  font-family: ui-monospace, monospace;
  font-size: 10px;
  font-weight: 500;
  color: var(--nav-search-muted-fg);
  background: var(--nav-search-muted);
  border: 1px solid var(--nav-search-border);
  border-radius: 0.25rem;
  pointer-events: none;
}
[data-theme="dark"] .nav-search-trigger {
  --nav-search-bg: #0d0d0d;
  --nav-search-color: #ffffff;
  --nav-search-muted: #262626;
  --nav-search-muted-fg: #a3a3a3;
  --nav-search-border: #2e2e2e;
}

.site-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
}

.site-nav .trigger {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-left: 0.5rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--border-color);
}
@media (max-width: 768px) {
  .site-nav .trigger {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
  }
}

/* 로그인 버튼 (더 자연스러운 스타일) */
.login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.login-btn:hover {
  color: var(--text-primary);
  background: var(--bg-secondary);
}

.login-btn:active {
  transform: scale(0.98);
}

.login-btn .github-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.8;
}

.login-btn:hover .github-icon {
  opacity: 1;
}

.login-btn-text {
  display: inline-block;
}

@media (max-width: 480px) {
  .login-btn-text {
    display: none;
  }
  .login-btn {
    padding: 0.375rem;
    width: 32px;
    height: 32px;
  }
}

.write-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 50%;
  transition: all 0.2s;
  position: relative;
  font-size: 1.125rem;
}

.write-btn:hover {
  color: var(--accent-color);
  background: var(--bg-secondary);
  transform: translateY(-1px);
}

.write-btn:active {
  transform: translateY(0);
}

/* 툴팁 (선택사항) */
.write-btn::after {
  content: '글쓰기';
  position: absolute;
  bottom: -2.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-primary);
  color: var(--bg-primary);
  padding: 0.375rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 1000;
}

.write-btn:hover::after {
  opacity: 1;
}

.site-nav .page-link[href="/"],
.site-nav .page-link[href="/blog/"] {
  display: none !important;
}

.page-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.page-link:hover {
  color: var(--text-primary);
}

/* 검색 관련 스타일 제거됨 */

/* 테마 토글 버튼 */
.theme-toggle {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
  margin-left: 0.5rem;
  flex-shrink: 0;
}

.theme-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.theme-toggle .slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #38bdf8;
  transition: 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
  z-index: 0;
  overflow: hidden;
  border-radius: 34px;
  border: 1px solid var(--border-color);
}

.theme-toggle .slider.round .sun-moon {
  border-radius: 50%;
}

.theme-toggle .sun-moon {
  position: absolute;
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: #facc15;
  transition: 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.theme-toggle input:checked + .slider {
  background-color: #0f172a;
}

.theme-toggle input:focus + .slider {
  box-shadow: 0 0 1px #2196f3;
}

.theme-toggle input:checked + .slider .sun-moon {
  transform: translateX(24px);
  background-color: #e5e7eb;
  animation: rotate-center 0.7s ease-in-out both;
}

.theme-toggle .moon-dot {
  opacity: 0;
  transition: 0.4s;
  fill: #d1d5db;
}

.theme-toggle input:checked + .slider .sun-moon .moon-dot {
  opacity: 1;
}

.theme-toggle .slider.round {
  border-radius: 34px;
}

.theme-toggle .stars {
  transform: translateY(-32px);
  opacity: 0;
  transition: 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.theme-toggle .star {
  fill: white;
  position: absolute;
  transition: 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
  animation-name: star-twinkle;
  animation-duration: 3s;
  animation-iteration-count: infinite;
}

.theme-toggle input:checked + .slider .stars {
  transform: translateY(0);
  opacity: 1;
}

.theme-toggle #moon-dot-1 { left: 10px; top: 3px; position: absolute; width: 6px; height: 6px; z-index: 4; }
.theme-toggle #moon-dot-2 { left: 2px; top: 10px; position: absolute; width: 10px; height: 10px; z-index: 4; }
.theme-toggle #moon-dot-3 { left: 16px; top: 18px; position: absolute; width: 3px; height: 3px; z-index: 4; }
.theme-toggle #light-ray-1 { left: -8px; top: -8px; position: absolute; width: 43px; height: 43px; z-index: -1; fill: white; opacity: 0.1; }
.theme-toggle #light-ray-2 { left: -50%; top: -50%; position: absolute; width: 55px; height: 55px; z-index: -1; fill: white; opacity: 0.1; }
.theme-toggle #light-ray-3 { left: -18px; top: -18px; position: absolute; width: 60px; height: 60px; z-index: -1; fill: white; opacity: 0.1; }
.theme-toggle #cloud-1 { left: 30px; top: 15px; width: 40px; }
.theme-toggle #cloud-2 { left: 44px; top: 10px; width: 20px; }
.theme-toggle #cloud-3 { left: 18px; top: 24px; width: 30px; }
.theme-toggle #cloud-4 { left: 36px; top: 18px; width: 40px; }
.theme-toggle #cloud-5 { left: 48px; top: 14px; width: 20px; }
.theme-toggle #cloud-6 { left: 22px; top: 26px; width: 30px; }
.theme-toggle .cloud-light { position: absolute; fill: #eee; animation: cloud-move 8s infinite; }
.theme-toggle .cloud-dark { position: absolute; fill: #ccc; animation: cloud-move 8s infinite; animation-delay: 1s; }
.theme-toggle #star-1 { width: 20px; top: 2px; left: 3px; animation-delay: 0.3s; }
.theme-toggle #star-2 { width: 6px; top: 16px; left: 3px; }
.theme-toggle #star-3 { width: 12px; top: 20px; left: 10px; animation-delay: 0.6s; }
.theme-toggle #star-4 { width: 18px; top: 0px; left: 18px; animation-delay: 1.3s; }

@keyframes cloud-move {
  0% { transform: translateX(0px); }
  40% { transform: translateX(4px); }
  80% { transform: translateX(-4px); }
  100% { transform: translateX(0px); }
}

@keyframes star-twinkle {
  0% { transform: scale(1); }
  40% { transform: scale(1.2); }
  80% { transform: scale(0.8); }
  100% { transform: scale(1); }
}

@keyframes rotate-center {
  0% { transform: translateX(24px) rotate(0); }
  100% { transform: translateX(24px) rotate(360deg); }
}

/* Main Content */
.page-content {
  min-height: calc(100vh - 200px);
  padding-bottom: 10px;
}

.wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* content-wrapper 직계 자식 블록을 wrapper 폭에 맞춰 100%로 */
.wrapper.content-wrapper {
  width: 100%;
  max-width: 1200px;
  box-sizing: border-box;
}
.wrapper.content-wrapper > * {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Home Page Layout - 게시판 형식 */
.home {
  display: grid;
  grid-template-columns: clamp(260px, 28vw, 320px) minmax(0, 1fr);
  grid-template-areas: "sidebar main";
  gap: 1rem;
  max-width: var(--header-max-width, 1280px);
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 0;
  position: relative;
  z-index: 1;
  align-items: start;
}

/* 메인 화면 단일 컬럼 (사이드바/메인 통합) - 컨테이너 최대 폭 사용 */
.home-single {
  display: flex;
  flex-direction: column;
  grid-template-columns: none;
  grid-template-areas: none;
  max-width: var(--header-max-width, 1280px);
  width: 100%;
  gap: 0;
}

/* 메인 화면: .home-single 아래 모든 블럭을 wrapper 폭에 맞춰 100% */
.home.home-single > *,
.home.home-single .home-header,
.home.home-single .home-nav,
.home.home-single .home-content,
.home.home-single .intro-panel,
.home.home-single .content-section,
.home.home-single .blog-container,
.home.home-single .blog-container-left,
.home.home-single .blog-container-right,
.home.home-single .bottom-sections,
.home.home-single .bottom-sections > .content-section {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* 메인 화면: 블럭 테두리·배경 제거 */
.home-single .home-header .sidebar-section.profile-section,
.home-single .profile-card,
.home-single .sidebar-section.profile-section.profile-card.hero-card {
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 1rem 0;
  margin-bottom: 0;
}
.home-single .intro-panel {
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 1.5rem 0;
}
.home-single .content-section {
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 1rem 0;
  margin-bottom: 1rem;
}
.home-single .content-section:hover {
  box-shadow: none;
}
.home-single .blog-container,
.home-single .bottom-sections {
  min-width: 0;
}
.home-single .blog-container-left,
.home-single .blog-container-right {
  flex: 1;
  min-width: 0;
}
.home-single .bottom-sections > .content-section {
  flex: 1;
  min-width: 0;
}
.home-single .home-popular-section {
  width: 100%;
}
.home-single .all-posts-section {
  border: none;
  box-shadow: none;
}
.layout-lobehub .home-single .content-section,
.layout-lobehub .home-single .intro-panel,
.layout-lobehub .home-single .home-header .sidebar-section {
  box-shadow: none;
}
.home-single .section-header {
  border-bottom: none;
}
.home-single .post-list-item {
  border-bottom: none;
}

/* 히어로: 제목 + 부제 (나의 기술 블로그 / 내가 살아가는 이야기) */
.home-single .hero-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.25rem 0;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.home-single .hero-subtitle,
.home-single .profile-card-subtitle {
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--text-secondary);
  margin: 0 0 0.75rem 0;
  line-height: 1.4;
}
.home-single .hero-avatar,
.home-single .profile-card-avatar {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: var(--bg-secondary);
  box-shadow: none;
}
.home-single .profile-card-avatar img {
  background: transparent;
}

/* 카테고리 탭 바 (LobeHub 스타일: 가로 탭, 선택 시 밑줄) */
/* 카테고리 탭: 라벨 느낌, 배경 없음, 둥근 필 */
.category-tabs {
  margin-bottom: 0;
  padding: 0.5rem 0;
}
.category-tabs-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  min-width: 0;
}
.category-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  margin: 0;
  background: none;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, font-weight 0.2s;
  font-family: inherit;
}
.category-tab:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
}
.category-tab.active {
  color: var(--text-primary);
  font-weight: 600;
  border-color: var(--text-primary);
}
[data-theme="dark"] .category-tab.active {
  border-color: var(--accent-color);
  color: var(--accent-color);
}
.category-tab-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  opacity: 0.85;
}
.category-tab.active .category-tab-icon {
  opacity: 1;
}
[data-theme="dark"] .category-tab .category-tab-icon {
  opacity: 0.9;
}
[data-theme="dark"] .category-tab.active .category-tab-icon {
  opacity: 1;
  color: var(--accent-color);
}

/* 탭 패널: 선택된 것만 표시 */
.tab-panels {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.tab-panel {
  display: none;
  width: 100%;
}
.tab-panel.active {
  display: block;
}
.tab-panel-content {
  padding-top: 1.25rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* 탭 패널: 헤더 + 글 목록만 (카드 없음) */
.tab-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}
.tab-panel-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.tab-panel-icon {
  width: 1.125rem;
  height: 1.125rem;
  color: var(--text-secondary);
}
.tab-panel-icon.icon-daily { color: #f59e0b; }
.tab-panel-icon.icon-dev { color: #2563eb; }
.tab-panel-icon.icon-document { color: #8b5cf6; }
.tab-panel-icon.icon-study { color: #10b981; }
.tab-panel-icon.icon-stock { color: #ef4444; }
.tab-panel-more {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  text-decoration: none;
}
.tab-panel-more:hover {
  color: var(--accent-color);
}
.tab-panel-post-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
/* 포럼형 카드: 아바타·작성자·카테고리 / 제목 / 요약 / 하단 시간 */
.tab-panel-card {
  border-bottom: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 0.5rem;
  background: var(--bg-primary);
}
.tab-panel-card:last-child {
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 0;
}
.tab-panel-card-link {
  display: block;
  padding: 15px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
  border-radius: 8px;
}
.tab-panel-card-link:hover {
  background: var(--bg-secondary);
}
.tab-panel-card-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.4rem;
}
.tab-panel-card-avatar {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--bg-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
}
.tab-panel-card-by {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent-color);
}
.tab-panel-card-cat {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}
.tab-panel-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.35rem 0;
  line-height: 1.35;
  padding-left: 10px;
}
.tab-panel-card-link:hover .tab-panel-card-title {
  color: var(--accent-color);
}
.tab-panel-card-excerpt {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0 0 0.5rem 0;
  padding-left: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tab-panel-card-bottom {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.tab-panel-card-time {
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.tab-panel-post-empty {
  padding: 1rem 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* ========== 개요 탭: 좌 메인 + 우 미니 카드 (테두리/그림자 없음) ========== */
.overview-panel {
  padding-top: 1rem;
}
.overview-layout {
  display: grid;
  gap: 1.25rem;
  width: 100%;
}
@media (min-width: 769px) {
  .overview-layout {
    grid-template-columns: 1fr 220px;
    align-items: start;
  }
}
.overview-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.overview-sidebar {
  min-width: 0;
}
.overview-mini-cards {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* 홈(개요) 첫 로딩: 위→아래 순차 등장 애니메이션 */
@keyframes overviewEntry {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.home-page .home-header {
  opacity: 0;
  animation: overviewEntry 0.5s ease 0s forwards;
}
.home-page .overview-panel .overview-project-card {
  opacity: 0;
  animation: overviewEntry 0.45s ease 0.06s forwards;
}
.home-page .overview-panel .overview-document-section {
  opacity: 0;
  animation: overviewEntry 0.45s ease 0.12s forwards;
}
.home-page .overview-panel .overview-sidebar {
  opacity: 0;
  animation: overviewEntry 0.45s ease 0.18s forwards;
}

/* 글 페이지 로딩: 홈과 동일한 위→아래 순차 등장 애니메이션 */
.content-wrapper-with-hero .post-container-wide > .post {
  opacity: 0;
  animation: overviewEntry 0.5s ease 0s forwards;
}
.content-wrapper-with-hero .post-container-wide > .post-sidebar {
  opacity: 0;
  animation: overviewEntry 0.45s ease 0.08s forwards;
}

/* 카드: 흰색 테두리, 단순 배경 */
.overview-card {
  background: var(--bg-primary);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 1.25rem 1.25rem;
  min-width: 0;
}
[data-theme="dark"] .overview-card {
  background: var(--bg-secondary);
  border-color: rgba(255, 255, 255, 0.1);
}
/* 개발 프로젝트 카드: 배경 #f8f8f8, 호버 시 테두리 */
.overview-project-card {
  display: block;
  position: relative;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  border: 1px solid transparent;
  background: #f8f8f8 !important;
  transition: transform 0.25s ease, border-color 0.35s ease;
}
.overview-project-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 0, 0, 0.12);
}
[data-theme="dark"] .overview-project-card {
  background: #2d3748 !important;
}
[data-theme="dark"] .overview-project-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
}
.overview-project-card .overview-project-label,
.overview-project-card .overview-project-title,
.overview-project-card .overview-project-meta {
  position: relative;
  z-index: 1;
}
.overview-project-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.overview-project-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0.35rem 0 0.25rem 0;
  line-height: 1.35;
}
.overview-project-meta {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

/* 오른쪽 미니 카드 (참고 이미지: 흰 배경, 필, 본문, 하단 메타) */
.overview-mini-card {
  background: var(--bg-primary);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  min-width: 0;
}
[data-theme="dark"] .overview-mini-card {
  background: var(--bg-secondary);
  border-color: rgba(255, 255, 255, 0.1);
}
/* 경제뉴스 정리 카드: 색상·테두리 없음 (기본 카드와 동일) */
.overview-mini-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}
.overview-mini-card-pill {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent-color);
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.overview-mini-card-pill-market {
  background: #6366f1;
}
.overview-mini-card-menu {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1;
  cursor: default;
  letter-spacing: 0.05em;
}
/* 관심종목 카드: 별 + 관심종목 라벨 + 로고/이름 + 최신글 */
.overview-mini-card-header-left {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.overview-mini-card-stock .overview-mini-card-header .overview-stock-info {
  margin-bottom: 0;
}
.overview-stock-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
}
.overview-stock-logo {
  width: 1.1em;
  height: 1.1em;
  min-width: 18px;
  min-height: 18px;
  border-radius: 4px;
  object-fit: contain;
  background: var(--bg-primary);
  vertical-align: middle;
}
.overview-stock-name {
  font-size: 1em;
  font-weight: 600;
  color: var(--text-primary);
}
/* 관심종목 카드: 헤더(로고+이름 | 날짜), 제목, 구분선, 하단 ⋯ */
.overview-mini-card-stock .overview-mini-card-header .overview-mini-card-date,
.overview-mini-card-market .overview-mini-card-header .overview-mini-card-date {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.overview-market-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* 개발문서 카드: 전면 재구성 (레이아웃·테마) */
.lang-doc-card {
  padding: 0;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
[data-theme="dark"] .lang-doc-card {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(30, 41, 59, 0.35);
}
.lang-doc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
[data-theme="dark"] .lang-doc-header {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
.lang-doc-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.02em;
}
.lang-doc-more {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
}
.lang-doc-more:hover {
  color: var(--accent-color);
}
.lang-doc-body {
  padding: 0.9rem 1.15rem 1.1rem;
}
.lang-doc-group {
  margin-bottom: 0.9rem;
}
.lang-doc-group:last-child {
  margin-bottom: 0;
}
.lang-doc-group-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: 0.45rem;
}
.lang-doc-group-label:hover {
  color: var(--text-primary);
  text-decoration: underline;
}
.lang-doc-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.6rem;
}
.lang-doc-link {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  margin: 0 -0.5rem;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.lang-doc-link:hover {
  color: var(--accent-color);
  background: rgba(49, 130, 246, 0.08);
}
[data-theme="dark"] .lang-doc-link:hover {
  background: rgba(49, 130, 246, 0.15);
}
.overview-mini-card-stock .overview-stock-latest,
.overview-mini-card-market .overview-mini-card-body {
  margin-bottom: 0;
  margin-top: 0.5rem;
}
.overview-mini-card-stock .overview-mini-card-text,
.overview-mini-card-market .overview-mini-card-text {
  -webkit-line-clamp: 2;
  line-clamp: 2;
}
.overview-mini-card-stock .overview-mini-card-bottom,
.overview-mini-card-market .overview-mini-card-bottom {
  margin-top: 0;
  padding-top: 0;
  text-align: right;
}

/* 주식 카드: 상단 게시글 2~3개 목록 / 구분선 / 하단 로고·종목명 (글래스 느낌 테두리) */
.stock-job-theme {
  padding: 0;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
[data-theme="dark"] .stock-job-theme {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(30, 41, 59, 0.35);
}
.stock-card-list-section {
  padding: 0.85rem 1.1rem 0.95rem;
}
.stock-card-posts {
  list-style: none;
  padding: 0;
  margin: 0;
}
.stock-card-posts li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
  padding: 0.2rem 0;
}
.stock-card-posts li:last-child {
  margin-bottom: 0;
}
.stock-card-post-link {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
}
.stock-card-post-link:hover {
  color: var(--accent-color);
}
.stock-card-post-date {
  font-size: 0.75rem;
  color: var(--text-secondary);
  flex-shrink: 0;
}
.stock-card-empty {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin: 0;
}
.stock-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 1.1rem 0.9rem;
  border-top: 1px solid rgb(217 217 217 / 40%);
}
[data-theme="dark"] .stock-card-footer {
  border-top-color: rgba(255, 255, 255, 0.1);
}
.stock-card-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex: 1;
}
.stock-card-logo {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  object-fit: contain;
  flex-shrink: 0;
  background: var(--bg-secondary);
}
.stock-card-meta-text {
  font-size: 0.75rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.overview-mini-card-body {
  display: block;
  text-decoration: none;
  color: inherit;
}
.overview-mini-card:not(.overview-mini-card-stock):not(.overview-mini-card-market) .overview-mini-card-body {
  margin-bottom: 0.5rem;
}
.overview-mini-card-body:hover .overview-mini-card-text {
  color: var(--accent-color);
}
.overview-mini-card-text {
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.45;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.overview-mini-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.5rem;
  margin-top: 0.5rem;
}
.overview-mini-card-date {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.overview-mini-card-icon {
  flex-shrink: 0;
  opacity: 0.8;
}
.overview-mini-card-more {
  font-size: 0.75rem;
  color: var(--accent-color);
  text-decoration: none;
}
.overview-mini-card-more:hover {
  text-decoration: underline;
}
.overview-mini-card-empty {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin: 0 0 0.5rem 0;
}
.overview-mini-card-empty + .overview-mini-card-more {
  display: inline-block;
  margin-top: 0.25rem;
}

.overview-dev-section .overview-card,
.overview-document-section .overview-card {
  background: transparent;
  padding: 0;
}
[data-theme="dark"] .overview-dev-section .overview-card,
[data-theme="dark"] .overview-document-section .overview-card {
  background: transparent;
}
.overview-card-single .overview-card-body {
  margin-bottom: 1.25rem;
}
.overview-quick-section {
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  margin-bottom: 1rem;
}
.overview-quick-section .overview-card-title {
  margin-bottom: 0.75rem;
}
.overview-latest-section {
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}
.overview-latest-section .overview-card-head {
  margin-bottom: 0.5rem;
}
.overview-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.01em;
}
.overview-card-body {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
}
.overview-quick-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}
.overview-quick-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}
.overview-quick-link:hover {
  background: var(--bg-primary);
  color: var(--accent-color);
}
.overview-quick-icon {
  width: 1rem;
  height: 1rem;
  color: var(--text-secondary);
}
.overview-quick-link:hover .overview-quick-icon {
  color: var(--accent-color);
}
.overview-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}
.overview-dev-section .overview-card-head {
  margin-bottom: 0.5rem;
}

/* 문서 게시판: 패딩, 섹션 제목과 게시글 구분 */
.overview-document-section {
  padding: 1.25rem 1.35rem;
  padding-top: 0;
  background: transparent;
}
.overview-document-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  margin-left: -1.35rem;
  margin-right: -1.35rem;
  padding: 0.75rem 1.35rem 0.85rem;
  border-top: 1px solid #eee;
  background: linear-gradient(135deg, #fdfdfd 0%, #f9f9f9 80%, #ffffff 100%);
  border-radius: 0 0 22px 10px;
}
[data-theme="dark"] .overview-document-header {
  border-top-color: rgba(255, 255, 255, 0.1);
  background: linear-gradient(135deg, #334155 0%, #475569 50%, #64748b 100%);
}
.overview-document-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.02em;
}
.overview-document-more {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
}
.overview-document-more:hover {
  color: var(--accent-color);
}

/* 문서 섹션: 정렬 선택 */
.overview-document-sort {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.overview-document-sort-label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-right: 0.25rem;
}
.overview-document-sort-select {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.35rem 1.75rem 0.35rem 0.6rem;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  transition: border-color 0.15s;
}
.overview-document-sort-select:hover,
.overview-document-sort-select:focus {
  border-color: var(--accent-color);
  outline: none;
}
[data-theme="dark"] .overview-document-sort-select {
  color: var(--text-primary);
  background-color: var(--bg-secondary);
}
.overview-document-sort-btn {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.overview-document-sort-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-tertiary);
}
.overview-document-sort-btn.is-active {
  color: var(--accent-color);
  border-color: var(--accent-color);
  background: rgba(49, 130, 246, 0.08);
}
[data-theme="dark"] .overview-document-sort-btn.is-active {
  background: rgba(49, 130, 246, 0.15);
}

/* 문서 리스트: 10개 초과분 숨김 */
.overview-document-item-hidden {
  display: none !important;
}

/* 문서 더보기 버튼 */
.overview-document-more-wrap {
  margin-top: 0.75rem;
  text-align: center;
}
.overview-document-more-btn {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent-color);
  background: transparent;
  border: 1px solid var(--accent-color);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.overview-document-more-btn:hover {
  background: rgba(49, 130, 246, 0.1);
  color: var(--accent-color);
}
[data-theme="dark"] .overview-document-more-btn:hover {
  background: rgba(49, 130, 246, 0.2);
}

.overview-document-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
/* 개요 문서 리스트: 카드형 Recent Posts 스타일 */
.overview-document-section .tab-panel-card {
  list-style: none;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: var(--bg-primary);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem 1.5rem;
  margin-bottom: 0.9rem;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.overview-document-section .tab-panel-card:last-child {
  margin-bottom: 0;
}
.overview-document-section .tab-panel-card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(15, 23, 42, 0.16);
  transform: translateY(-1px);
}
[data-theme="dark"] .overview-document-section .tab-panel-card {
  background: var(--bg-secondary);
  border-color: rgba(148, 163, 184, 0.55);
}
[data-theme="dark"] .overview-document-section .tab-panel-card:hover {
  border-color: rgba(226, 232, 240, 0.85);
}

.overview-doc-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  margin-bottom: 0.45rem;
}
.overview-doc-breadcrumb-sep {
  color: #cbd5e1;
}
.overview-doc-breadcrumb-item a {
  color: inherit;
  text-decoration: none;
}
.overview-doc-breadcrumb-item a:hover {
  color: var(--text-primary);
}
.overview-doc-breadcrumb-current {
  font-weight: 600;
  color: var(--text-primary);
}

.overview-doc-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.5rem 0;
  line-height: 1.35;
}
.overview-doc-title-link {
  color: inherit;
  text-decoration: none;
}
.overview-doc-title-link:hover {
  text-decoration: underline;
  text-decoration-color: rgba(148, 163, 184, 0.9);
  text-underline-offset: 0.25em;
}

.overview-doc-excerpt {
  margin: 0 0 0.75rem 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.overview-doc-meta-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
}
.overview-doc-meta-dot {
  color: #cbd5e1;
}
.overview-doc-tags {
  margin-left: auto;
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.overview-doc-tag {
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.72rem;
}
[data-theme="dark"] .overview-doc-tag {
  background: #0f172a;
  color: #cbd5f5;
}
.overview-document-item {
  margin: 0;
}
.overview-document-item + .overview-document-item {
  margin-top: 0.15rem;
}
.overview-document-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.6rem;
  margin: 0 -0.6rem;
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}
.overview-document-link:hover {
  background: var(--bg-primary);
}
.overview-document-link-cat {
  font-size: 0.875rem;
  font-weight: bold;
  color: #3182f6;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  text-align: center;
}
.overview-document-link-meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
  flex-shrink: 0;
}
.overview-document-link-title {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-primary);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.overview-card-more {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  text-decoration: none;
}
.overview-card-more:hover {
  color: var(--accent-color);
}
.overview-post-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.overview-post-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}
.overview-post-item:last-child {
  border-bottom: none;
}
.overview-post-item:hover {
  background: var(--bg-primary);
  margin: 0 -1.25rem;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}
.overview-post-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.overview-post-meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.overview-post-empty {
  padding: 1rem 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-align: center;
}

/* PC: 최신글 한 줄 (제목 좌측, 날짜·카테고리 우측) */
@media (min-width: 769px) {
  .overview-post-item {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
  }
  .overview-post-title {
    -webkit-line-clamp: 1;
    line-clamp: 1;
    min-width: 0;
  }
  .overview-post-meta {
    flex-shrink: 0;
    white-space: nowrap;
  }
}

@media (max-width: 640px) {
  .overview-quick-links {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ========== 탭 콘텐츠 카드 (일기/개발/VHDL/문서/학습/주식) ========== */
.tab-content-card {
  background: var(--bg-secondary);
  border-radius: 10px;
  padding: 1.25rem;
  border: 1px solid var(--border-color);
  max-width: 100%;
}
.tab-content-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}
.tab-content-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.tab-content-card-icon {
  width: 1.125rem;
  height: 1.125rem;
  color: var(--text-secondary);
}
.tab-content-card-icon.icon-daily { color: #f59e0b; }
.tab-content-card-icon.icon-dev { color: #2563eb; }
.tab-content-card-icon.icon-document { color: #8b5cf6; }
.tab-content-card-icon.icon-study { color: #10b981; }
.tab-content-card-icon.icon-stock { color: #ef4444; }
.tab-content-card-more {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  text-decoration: none;
}
.tab-content-card-more:hover {
  color: var(--accent-color);
}
.tab-content-subcats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}
.tab-content-subcat-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s;
}
.tab-content-subcat-link:hover {
  color: var(--accent-color);
  border-color: var(--accent-color);
}
.tab-content-subcat-count {
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.tab-content-post-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.tab-content-post-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}
.tab-content-post-item:last-child {
  border-bottom: none;
}
.tab-content-post-item:hover {
  background: var(--bg-primary);
  margin: 0 -1.25rem;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}
.tab-content-post-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tab-content-post-meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.tab-content-post-empty {
  padding: 1rem 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-align: center;
}

.home-header {
  margin-bottom: 0.5rem;
}

.home-nav {
  margin-bottom: 1.25rem;
}

.home-nav-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.home-nav-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.home-nav-pill:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
  background: var(--accent-light);
}

.home-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
}

/* Left Sidebar - 프로필 & 카테고리 (기존 2단 레이아웃용) */
.sidebar {
  grid-area: sidebar;
  position: sticky;
  top: 2rem;
  height: fit-content;
  min-width: 0;
}

.sidebar-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.3s ease;
}

.layout-lobehub .sidebar-section {
  border-radius: var(--lobehub-radius);
  box-shadow: var(--lobehub-shadow);
}

.sidebar-section:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.08);
}

.layout-lobehub .sidebar-section:hover {
  box-shadow: var(--lobehub-shadow-hover);
}

.sidebar-section-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom-width: 0;
  border-bottom-style: none;
  border-bottom-color: transparent;
  border-image: none;
}

/* 프로필 섹션 */
.profile-section {
  text-align: center;
}

/* LobeHub 스타일 프로필 카드 (메인 화면 사이드바) */
.profile-card {
  text-align: left;
  padding: 1.25rem;
}

.profile-card-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.profile-card-left {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  min-width: 0;
  flex: 1;
}

.profile-card-avatar {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1.5rem;
  box-shadow: none;
}

.profile-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: transparent;
}

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

.profile-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.35rem 0;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

/* profile-card-head: 2열 레이아웃, 우측에 CONTRIBUTION ACTIVITY (헤더 높이만큼) */
.profile-card-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem 1.25rem;
  align-items: stretch;
  margin-bottom: 0.5rem;
}
.profile-card-head-col1 {
  min-width: 0;
}
.profile-card-head-col2 {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  min-height: 0;
}
.profile-head-right-row {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0.5rem;
  flex: 1;
  min-height: 4rem;
  width: 100%;
  justify-content: flex-end;
}
.profile-card-head-col2 .profile-contributions-link.profile-contributions-head {
  flex: 0 1 auto;
  min-width: 11rem;
  width: 11rem;
  min-height: 4rem;
  align-self: stretch;
  display: flex;
}
.profile-card-head-col2 .profile-contributions-head .profile-contributions-chart {
  width: auto;
  min-width: 100%;
  height: 100%;
  min-height: 4rem;
  object-fit: cover;
  object-position: right center;
}
.profile-card-head-col2 .profile-card-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.profile-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.6rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

.profile-version {
  color: var(--text-primary);
  font-weight: 500;
}

.profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.5rem;
  background: #dcfce7;
  color: #166534;
  border-radius: 999px;
  font-weight: 500;
}

[data-theme="dark"] .profile-badge {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
}

.profile-badge-icon {
  flex-shrink: 0;
}

.profile-publisher {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 500;
}

.profile-publisher:hover {
  text-decoration: underline;
}

.profile-meta-sep {
  opacity: 0.7;
}

.profile-date {
  color: var(--text-secondary);
}

/* GitHub Contributions: profile-card-head 2열 우측, 헤더 높이만큼 */
.profile-card-head-col2 .profile-contributions-link {
  display: block;
  line-height: 0;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}
.profile-contributions-link {
  display: block;
  line-height: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}
.profile-contributions-chart {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}
.profile-contributions-chart[src=""],
.profile-contributions-chart:not([src]) {
  min-height: 80px;
  background: var(--bg-secondary);
}
.profile-contributions-block {
  margin-bottom: 0.75rem;
  width: 100%;
  max-width: 320px;
}

.profile-meta-bottom {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

/* 프로필 소개글 (기술 키워드 글) */
.profile-intro-text {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0;
}
[data-theme="dark"] .profile-intro-text {
  color: var(--text-secondary);
}

/* 방문자 수: profile-meta-row 마지막, 총만 아이콘 / 어제·오늘은 아이콘 없이 */
.profile-stats-row {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-left: 0.25rem;
}
.profile-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.profile-stat .profile-stat-icon {
  flex-shrink: 0;
}
.profile-stat-icon-person {
  flex-shrink: 0;
  vertical-align: middle;
}
.profile-stat-no-icon {
  padding-left: 0;
}
.profile-stat-no-icon::before {
  content: "·";
  margin-right: 0.5rem;
  opacity: 0.6;
}

/* 레거시: 프로필 키워드 칩 (미사용 시 유지 가능) */
.profile-keywords {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}
.profile-keyword {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
}
[data-theme="dark"] .profile-keyword {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-color);
}

.profile-developer-skills-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-primary);
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.profile-developer-skills-btn:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
  background: var(--accent-light);
}

.profile-tech {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.profile-tech-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3178c6;
}

.profile-license {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.profile-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.profile-card-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.profile-link-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: var(--text-secondary);
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.profile-link-icon:hover {
  color: var(--accent-color);
  border-color: var(--accent-color);
  background: var(--accent-light);
}

/* Mobile/Tablet top profile bar (home only) */
.mobile-profile-bar {
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 10px 12px;
  margin: 0 0 12px 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
}

.mobile-category-slider {
  display: none;
  padding: 10px 12px;
  margin: 0 0 14px 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}

.mobile-category-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  padding: 2px;
}

.mobile-category-track::-webkit-scrollbar {
  display: none;
}

.mobile-category-pill {
  flex: 0 0 auto;
  scroll-snap-align: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.mobile-category-pill:hover {
  color: var(--accent-color);
  border-color: var(--accent-color);
  background: var(--accent-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.12);
}

/* 모바일 카테고리 아이콘 래퍼 */
.mobile-category-icon-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.mobile-category-icon {
  width: 1.125rem;
  height: 1.125rem;
  stroke-width: 2;
  transition: transform 0.2s ease;
}

/* 모바일 카테고리별 아이콘 색상 */
.mobile-category-icon-wrapper.icon-daily .mobile-category-icon {
  color: #f59e0b; /* 주황색 */
}

.mobile-category-icon-wrapper.icon-dev .mobile-category-icon {
  color: #2563eb; /* 파란색 */
}

.mobile-category-icon-wrapper.icon-document .mobile-category-icon {
  color: #8b5cf6; /* 보라색 */
}

.mobile-category-icon-wrapper.icon-study .mobile-category-icon {
  color: #10b981; /* 초록색 */
}

.mobile-category-pill:hover .mobile-category-icon {
  transform: scale(1.05);
  opacity: 0.8;
}

.mobile-category-text {
  white-space: nowrap;
}
.mobile-profile-top,
.mobile-profile-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.mobile-profile-top-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.mobile-profile-status {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.mobile-profile-avatar,
.mobile-profile-avatar-fallback {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-weight: 700;
  overflow: hidden;
}

.mobile-profile-avatar {
  object-fit: cover;
  background: transparent;
}

.mobile-profile-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.mobile-profile-top-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.mobile-profile-visitors {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  font-size: 0.82rem;
  white-space: nowrap;
  flex: 0 0 auto;
}

.mobile-profile-visitors-value {
  color: var(--text-secondary);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.mobile-profile-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.2s ease;
}

.mobile-profile-icon:hover {
  color: var(--accent-color);
  border-color: var(--accent-color);
  background: var(--accent-light);
}

.sidebar-section-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

/* 사이드바 검색 관련 스타일 제거됨 */

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  margin: 15px auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
  font-weight: 700;
  overflow: hidden;
  box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.15);
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

#profile-avatar-img {
  display: flex;
  flex-wrap: wrap;
}

/* 프로필 섹션 글쓰기 버튼 */
.profile-write-btn {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  background: var(--accent-color);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.profile-write-btn:hover {
  background: var(--accent-color-hover, var(--accent-color));
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.profile-write-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.profile-write-btn i {
  font-size: 1rem;
}

.profile-name {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.profile-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.profile-bio {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  white-space: pre-line;
  line-height: 1.5;
}

.profile-social {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 0;
  padding-top: 0;
  padding-bottom: 5px;
  border-top-width: 0;
  border-top-style: none;
  border-top-color: transparent;
  border-image: none;
}

.social-link {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s, transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.social-link:hover {
  color: var(--accent-color);
  transform: scale(1.1);
}

.profile-stats {
  display: flex;
  justify-content: space-around;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 1.25rem;
  font-weight: 700;
  display: block;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* 카테고리 섹션 */
.category-list {
  list-style: none;
}

.category-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.15s ease;
}

.category-item:hover {
  background-color: rgba(0, 0, 0, 0.02);
  margin: 0 -1.25rem;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.category-item:last-child {
  border-bottom: none;
}

.category-link {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.875rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color 0.2s ease;
  line-height: 1.4;
  cursor: pointer;
  user-select: none;
  gap: 0.5rem;
}

.category-title {
  flex: 1;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* 사이드바 카테고리 아이콘 래퍼 */
.sidebar-category-icon-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.sidebar-category-icon {
  width: 0.75rem;
  height: 0.75rem;
  stroke-width: 2;
  transition: transform 0.2s ease;
}

/* 사이드바 카테고리별 아이콘 색상 */
.sidebar-category-icon-wrapper.icon-daily .sidebar-category-icon {
  color: #f59e0b; /* 주황색 */
}

.sidebar-category-icon-wrapper.icon-dev .sidebar-category-icon {
  color: #2563eb; /* 파란색 */
}

.sidebar-category-icon-wrapper.icon-document .sidebar-category-icon {
  color: #8b5cf6; /* 보라색 */
}

.sidebar-category-icon-wrapper.icon-study .sidebar-category-icon {
  color: #10b981; /* 초록색 */
}

.sidebar-category-icon-wrapper.icon-stock .sidebar-category-icon {
  color: #ef4444; /* 빨간색 */
}

.sidebar-category-icon-wrapper:hover .sidebar-category-icon {
  transform: scale(1.05);
  opacity: 0.8;
}

.category-link:hover {
  color: var(--accent-color);
}

.category-item.active .category-link {
  color: var(--text-primary);
}

.category-item.active .category-title {
  font-weight: 600;
}

.category-item.active {
  background-color: transparent;
}

.category-item.active:hover {
  background-color: transparent;
}

.category-arrow {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s ease;
  flex-shrink: 0;
  transform-origin: center;
}

.category-item.active .category-arrow {
  transform: rotate(90deg);
  color: var(--accent-color);
}

.category-link:hover .category-arrow {
  color: var(--accent-color);
}

.category-count {
  display: none;
  font-weight: 100;
}


.sub-category-list {
  list-style: none;
  margin-top: 0;
  padding-left: 20px;
  padding-top: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  border-left: none;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
              opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              margin-top 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-item.active .sub-category-list {
  max-height: 500px;
  opacity: 1;
  margin-top: 0.25rem;
  padding-top: 0;
}

.sub-category-item {
  padding: 0;
  padding-top: 2px;
  padding-bottom: 2px;
  margin-top: 5px;
  margin-bottom: 5px;
  position: relative;
}

.sub-category-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.8125rem;
  transition: color 0.2s ease;
  line-height: 1.4;
  display: flex;
  align-items: center;
  padding: 0;
  padding-top: 0px;
  padding-bottom: 0px;
  padding-left: 0px;
  padding-right: 0px;
  gap: 0.5rem;
}

.sub-category-link svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.sub-category-item:hover .sub-category-link {
  color: var(--accent-color);
}

.sub-category-item:hover .sub-category-link svg {
  color: var(--accent-color);
}

/* 3단계 카테고리 (sub-sub-category) */
.sub-category-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--text-secondary);
  transition: color 0.2s ease;
  margin-right: 0.5rem;
}

.sub-category-arrow {
  width: 12px;
  height: 12px;
  margin-left: auto;
  color: var(--text-secondary);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s ease;
  flex-shrink: 0;
}

.sub-category-item.active .sub-category-arrow {
  transform: rotate(90deg);
  color: var(--accent-color);
}

.sub-sub-category-list {
  list-style: none;
  margin-top: 0;
  padding-left: 1.5rem;
  padding-top: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
              opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              padding-top 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sub-category-item.active .sub-sub-category-list {
  max-height: 500px;
  opacity: 1;
  margin-top: 0.25rem;
  padding-top: 0.25rem;
}

.sub-sub-category-item {
  padding: 0;
  padding-top: 2px;
  padding-bottom: 2px;
  margin-top: 3px;
  margin-bottom: 3px;
}

.sub-sub-category-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.75rem;
  transition: color 0.2s ease;
  line-height: 1.4;
  display: flex;
  align-items: center;
  padding: 0;
}

.sub-sub-category-icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  color: var(--text-secondary);
  transition: color 0.2s ease;
  margin-right: 0.5rem;
}

.sub-sub-category-item:hover .sub-sub-category-link {
  color: var(--accent-color);
}

.sub-sub-category-item:hover .sub-sub-category-icon {
  color: var(--accent-color);
}

/* 소개글 패널 - LobeHub 히어로 스타일 */
.intro-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--lobehub-radius, 12px);
  padding: 2rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--lobehub-shadow, 0 2px 12px rgba(0, 0, 0, 0.06));
  text-align: center;
}
.layout-lobehub .intro-panel {
  padding: 2.5rem 1.5rem;
}

.intro-content {
  max-width: 640px;
  margin: 0 auto;
}

.intro-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.02em;
}
.layout-lobehub .intro-title {
  font-size: 1.75rem;
}

.intro-text {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

/* 방문자 통계 */
.visitor-stats-simple {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  border-right: none;
  border-bottom: none;
  border-left: none;
  border-style: solid;
  border-width: 1px 0 0 0;
  border-color: var(--border-color) transparent transparent transparent;
}

.profile-visitors {
  margin-top: 1rem;
  text-align: center;
}

.visitor-stats-title {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-align: center;
  margin-bottom: 0.25rem;
}

.visitor-stats-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 500;
  padding-top: 0;
  border: none;
  border-width: 0;
  border-style: none;
  border-color: transparent;
  border-image: none;
}

.visitor-stat-value {
  color: var(--text-secondary);
  min-width: 1.5rem;
  text-align: center;
}

.visitor-stat-value span {
  color: var(--text-primary);
}

#total-visitors {
  color: var(--code-text);
}

.visitor-stats-separator {
  color: var(--text-secondary);
  font-weight: 400;
}

/* Main Content Area - 게시판 */
.main-content {
  grid-area: main;
  min-height: 600px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Dev 카테고리 페이지 스타일 */
.dev-category-page,
.dev-main-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.dev-category-title,
.dev-main-title {
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dev-category-description,
.dev-main-description {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* Dev 카테고리 그리드 (2열 레이아웃) */
.dev-categories-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  width: 100%;
}

/* Dev 페이지의 content-section 내 post-list 최대 5개만 표시 */
.dev-categories-grid .content-section .post-list {
  max-height: calc(5 * 3.5rem); /* 대략 5개 아이템 높이 */
  overflow: hidden;
}

/* 5개 초과 아이템 숨기기 */
.dev-categories-grid .content-section .post-list .post-list-item:nth-child(n+6) {
  display: none;
}

@media (max-width: 768px) {
  .dev-categories-grid {
    grid-template-columns: 1fr;
  }
}

.content-section {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: none;
  transition: box-shadow 0.3s ease;
}

.layout-lobehub .content-section {
  border-radius: var(--lobehub-radius);
  box-shadow: var(--lobehub-shadow);
}

.content-section:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.08);
}

.layout-lobehub .content-section:hover {
  box-shadow: var(--lobehub-shadow-hover);
}

/* 블로그 컨테이너 (첫 번째 행) */
.blog-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  width: 100%;
  height: fit-content;
  align-items: start;
}

.blog-container-left {
  display: flex;
  flex-direction: column;
}

.blog-container-right {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* 하단 섹션 (두 번째 행) */
.bottom-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  width: 100%;
}

/* Dev 하위 카테고리 */
.dev-subcategories {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dev-subcategory-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.dev-subcategory-link:hover {
  color: var(--accent-color);
  background: var(--bg-secondary);
  transform: translateX(2px);
}

/* Dev 하위 카테고리 아이콘 래퍼 */
.dev-subcategory-icon-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.dev-subcategory-icon {
  width: 0.625rem;
  height: 0.625rem;
  stroke-width: 2;
  color: #2563eb; /* 파란색 */
  transition: transform 0.2s ease;
}

.dev-subcategory-link:hover .dev-subcategory-icon {
  transform: scale(1.05);
  opacity: 0.8;
}

.dev-subcategory-title {
  flex: 1;
  font-weight: 500;
  color: var(--text-primary);
}

.dev-subcategory-link:hover .dev-subcategory-title {
  color: var(--accent-color);
}

.dev-subcategory-count {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  padding: 0.125rem 0.375rem;
  border-radius: 3px;
  min-width: 1.5rem;
  text-align: center;
}

/* 메인 상단 전체 글 리스트 섹션 */
.all-posts-section {
  border-color: var(--border-color);
  border-image: none;
  box-shadow: none;
  margin-bottom: 1.25rem;
}

.all-posts-section .section-title {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.section-subtitle {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent-color);
}

.all-posts-list .post-list-item {
  border-bottom-color: rgba(37, 99, 235, 0.08);
}

.all-posts-list .post-list-item:hover {
  background-color: var(--accent-light);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* 카테고리 아이콘 래퍼 */
.category-icon-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.category-icon {
  width: 1.125rem;
  height: 1.125rem;
  stroke-width: 2;
  transition: transform 0.2s ease;
}

/* 카테고리별 아이콘 색상 */
.icon-latest .category-icon {
  color: #3b82f6; /* 파란색 */
}

.icon-daily .category-icon {
  color: #f59e0b; /* 주황색 */
}

.icon-document .category-icon {
  color: #8b5cf6; /* 보라색 */
}

.icon-dev .category-icon {
  color: #2563eb; /* 파란색 */
}

.icon-stock .category-icon {
  color: #ef4444; /* 빨간색 */
}

.icon-study .category-icon {
  color: #10b981; /* 초록색 */
}

/* 절제된 호버 효과 */
.category-icon-wrapper:hover .category-icon {
  transform: scale(1.05);
  opacity: 0.8;
}

.section-more {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s;
  border-radius: 4px;
}

.section-more:hover {
  color: var(--accent-color);
  background-color: var(--bg-secondary);
  transform: rotate(90deg);
}

.section-more svg {
  width: 16px;
  height: 16px;
}

/* 티스토리 스타일 게시판 리스트 */
.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.post-list-item {
  display: flex;
  flex-direction: column;
  padding: 0.375rem 0.5rem;
  margin: 0 -0.5rem;
  border-bottom: 1px solid #F5F5F5;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.post-list-item:last-child {
  border-bottom: none;
}

.post-list-item:hover {
  background-color: var(--bg-secondary);
  padding-left: 0.75rem;
  transform: translateX(2px);
}

.post-list-item.empty {
  padding: 1.5rem 0;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.post-list-item.empty:hover {
  padding-left: 0;
}

/* 카테고리 페이지 */
.category-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.category-page-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 2rem 0;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border-color);
}

/* 블로그 페이지 */
.blog-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.blog-page-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 2rem 0;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border-color);
}

/* 페이지네이션 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.pagination-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  color: var(--text-primary);
  text-decoration: none;
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  transition: all 0.2s ease;
  font-size: 0.875rem;
}

.pagination-link:hover {
  background-color: var(--bg-secondary);
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.pagination-info {
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding: 0 1rem;
}

.post-list-title-wrapper {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.375rem;
  margin-bottom: 0.125rem;
  max-width: 100%;
}

.post-list-title {
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
  max-width: 100%;
}

.post-new-badge {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--accent-color);
  background: unset;
  width: 1rem;
  height: 1rem;
  border-radius: 3px;
  margin-left: 0.375rem;
  vertical-align: middle;
  line-height: 1;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0;
  margin-top: 0;
  margin-bottom: 0;
}

.post-list-date {
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  font-weight: 400;
  margin-top: 0.125rem;
  line-height: 1.2;
}

.post-list-category {
  font-size: 12px;
  color: var(--text-secondary);
}

.post-list-category-path {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
}

.post-list-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.125rem;
  line-height: 1.2;
}

.post-list-views {
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  font-weight: 400;
}

/* Footer - 다른 페이지에서만 표시 */
.site-footer {
  background-color: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  margin-top: 4rem;
  text-align: center;
}

.site-footer .wrapper {
  max-width: 1200px;
}

.site-footer p {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.site-footer a {
  color: var(--accent-color);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* Post Page */
.post-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  grid-template-areas: "post toc";
  gap: 2rem;
  align-items: start;
}

/* 개발 글은 더 넓은 레이아웃 - 목차 제거 */
/* 메인화면(히어로+개요) 아래 글 본문 여백 */
.content-wrapper-with-hero .post-container {
  margin-top: 0;
}
.post-container-wide {
  max-width: 1152px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  grid-template-areas: "post sidebar";
  gap: 2rem;
  align-items: start;
}
.post-container-wide > .post {
  grid-area: post;
  min-width: 0;
}
.post-container-wide > .post-sidebar {
  grid-area: sidebar;
  position: sticky;
  top: 100px;
  padding-left: 1rem;
}
.post-container-wide > .post-sidebar .post-toc {
  display: block;
  margin-bottom: 0;
}

/* 사이드바: GitHub Star 버튼 */
.sidebar-github-star {
  margin-bottom: 1.25rem;
}
.github-star-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  max-width: 13rem;
  height: 2.25rem;
  padding: 0.5rem 1rem;
  overflow: hidden;
  font-size: 0.875rem;
  font-weight: 500;
  color: #fff;
  background: #000;
  border: none;
  border-radius: 0.375rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.3s ease-out;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.github-star-btn:hover {
  background: rgba(0, 0, 0, 0.9);
  box-shadow: 0 0 0 2px #000;
  outline: none;
}
.github-star-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #000;
}
.github-star-btn-shine {
  position: absolute;
  right: 0;
  top: -3rem;
  width: 2rem;
  height: 8rem;
  background: #fff;
  opacity: 0.1;
  transform: translateX(3rem) rotate(12deg);
  transition: transform 1s ease-out;
  pointer-events: none;
}
.github-star-btn:hover .github-star-btn-shine {
  transform: translateX(-10rem) rotate(12deg);
}
.github-star-btn-inner {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.github-star-icon {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
  flex-shrink: 0;
}
.github-star-text {
  color: #fff;
  white-space: nowrap;
}
.github-star-count-wrap {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 0.5rem;
  padding-left: 0.5rem;
  border-left: 1px solid rgba(255, 255, 255, 0.25);
}
.github-star-star-icon {
  width: 1rem;
  height: 1rem;
  color: #6b7280;
  transition: color 0.3s;
}
.github-star-btn:hover .github-star-star-icon {
  color: #facc15;
}
.github-star-count {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
  font-weight: 500;
  color: #fff;
}

[data-theme="dark"] .github-star-btn {
  background: #000;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
[data-theme="dark"] .github-star-btn:hover {
  background: rgba(0, 0, 0, 0.9);
}

/* 사이드바 상단: 태그 모음 바 */
.sidebar-tags-bar {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}
.sidebar-tags {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}
.sidebar-tag {
  font-weight: 500;
}

/* 글 하단 태그 모음 */
.post-tags-bottom {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 0.5rem;
  align-items: center;
}
.post-tags-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-right: 0.25rem;
}
.post-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.post-tag-pill {
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  font-size: 0.78rem;
  color: var(--text-secondary);
  background: var(--bg-secondary);
}
[data-theme="dark"] .post-tag-pill {
  background: #020617;
  border-color: #1e293b;
}

/* 사이드바 하단: 이전글/다음글 한 줄 (← 이전글 | 다음글 →) */
.post-sidebar .sidebar-nav.post-navigation {
  margin-top: 1.25rem;
  margin-bottom: 0;
  padding: 0.75rem 0;
  border: none;
  border-top: 1px solid var(--border-color);
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.post-sidebar .sidebar-nav.post-navigation a.sidebar-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.4rem 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  flex: 1;
  min-width: 0;
}
.post-sidebar .sidebar-nav.post-navigation a.sidebar-nav-btn:hover {
  color: var(--accent-color);
  border-color: var(--accent-color);
  background: var(--accent-light);
}
.post-sidebar .sidebar-nav.post-navigation .prev-post {
  justify-content: flex-start;
}
.post-sidebar .sidebar-nav.post-navigation .next-post {
  justify-content: flex-end;
}
.post-sidebar .sidebar-nav.post-navigation .sidebar-nav-icon {
  flex-shrink: 0;
  font-size: 0.875rem;
  line-height: 1;
}
.post-sidebar .sidebar-nav.post-navigation .sidebar-nav-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.post-sidebar .sidebar-nav.post-navigation a:only-child {
  flex: none;
  max-width: 100%;
}

.post-container > .post {
  grid-area: post;
  min-width: 0;
}
.post-container > .post-toc {
  display: none; /* 목차 숨김 */
}

/* Long tokens (URLs/paths) should not cause horizontal scrolling */
.post-content,
.post-list-title {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.post-container-wide .post {
  padding: 0;
}

/* .post-container-wide .post-content는 기본 .post-content 스타일을 상속 */

.post-container-wide .post-content h2 {
  font-size: 1.875rem;
  margin-top: 3rem;
  margin-bottom: 1.25rem;
}

.post-container-wide .post-content h3 {
  font-size: 1.625rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.post-container-wide .post-content h4 {
  font-size: 1.375rem;
  margin-top: 2rem;
  margin-bottom: 0.875rem;
}


.post-container-wide .post-content pre {
  margin-bottom: 2.5rem;
  /* Keep shared code-block toolbar spacing (do not override) */
}

.post-container-wide .post-content pre code {
  padding: 1.25rem 1.5rem;
  font-size: 0.95rem;
  line-height: 1.7;
}

.post-container-wide .post-content ul,
.post-container-wide .post-content ol {
  margin-left: 2rem;
  margin-bottom: 2rem;
  padding-left: 0.75rem;
}


.post {
  background: var(--bg-primary);
  padding: 3rem 2.5rem;
}

.post-toc {
  position: sticky;
  top: 100px;
}

.post-header {
  margin: 0;
  margin-bottom: 24px;
  padding-bottom: 4px;
  position: relative;
}

/* LobeHub 문서 스타일: 제목·메타를 단조롭게 + 하단 그림자 */
.layout-lobehub .post-container .post-header {
  border-bottom: none;
  padding: 10px 10px 0.75rem;
  margin-bottom: 1.5rem;
  box-shadow: 0px 3px 10px 1px rgb(28 50 103 / 6%);
  border-radius: 10px;
}
.layout-lobehub .post-container .post-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.35rem;
  color: #0f172a;
}
[data-theme="dark"] .layout-lobehub .post-container .post-title {
  color: #e5e7eb;
}
.doc-meta-row {
  margin-top: 0.4rem;
  padding-top: 0.25rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.doc-meta-row .doc-badge {
  display: inline;
  padding: 0;
  margin-right: 0.6rem;
  background: transparent;
  border: none;
  border-radius: 0;
  font-weight: 400;
}
.doc-meta-row .doc-badge-muted {
  opacity: 0.8;
}
.doc-meta-row a.doc-badge {
  color: var(--text-secondary);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 0.16em;
}
.doc-meta-row a.doc-badge:hover {
  color: var(--text-primary);
}
.post-header-tags {
  margin-top: 0.45rem;
  margin-bottom: 0.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.post-header-tag {
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
[data-theme="dark"] .post-header-tag {
  background: #0f172a;
  color: #e0f2fe;
}
.layout-lobehub .post-header .post-meta.post-meta-fallback {
  display: none;
}
.layout-lobehub .content-wrapper .post-container {
  max-width: 100%;
  padding-top: 30px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  box-sizing: border-box;
  padding-left: 30px;
}
.layout-lobehub .content-wrapper.wrapper {
  padding-left: 16px;
  padding-right: 16px;
}
/* lobehub 글 페이지: 본문 폭 확대, 목차 우측으로 밀어붙임 */
.layout-lobehub .content-wrapper .post-container .post-container-wide {
  max-width: 100%;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) 200px;
}
.layout-lobehub .content-wrapper .post-container .post-sidebar {
  padding-left: 0.75rem;
  padding-right: 0;
}
.layout-lobehub .content-wrapper .post-header {
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
}
.layout-lobehub .content-wrapper .post-content {
  margin-top: 1rem;
  margin-bottom: 2.5rem;
  padding: 10px;
}
.layout-lobehub .content-wrapper .post-container-wide .post-content h2 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}
.layout-lobehub .content-wrapper .post-container-wide .post-content h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}
.layout-lobehub .content-wrapper .post-container-wide .post-content h4 {
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}
.layout-lobehub .content-wrapper .post-container-wide .post-content ul,
.layout-lobehub .content-wrapper .post-container-wide .post-content ol {
  margin-bottom: 1.25rem;
}
.layout-lobehub .content-wrapper .post-container-wide .post-content pre {
  margin-bottom: 1.5rem;
}

.post-breadcrumb {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.layout-lobehub .post-breadcrumb {
  margin-bottom: 0.75rem;
}

.post-breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.post-breadcrumb a:hover {
  color: var(--accent-color);
}

.breadcrumb-separator {
  color: var(--text-secondary);
  opacity: 0.5;
}

.post-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0; /* margin 제거 */
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.02em;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.post-header .post-meta {
  display: flex;
  justify-content: center; /* center로 변경 */
  align-items: center;
  margin: 15px 0 5px;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
  gap: 1rem;
}

.post-header .post-meta .author {
  margin: 0; /* margin 제거 */
}

.post-header .post-meta time {
  color: var(--text-secondary);
  font-weight: 500;
  margin: 0; /* margin 제거 */
}

.post-header .post-meta time::before {
  content: '📅 ';
  margin-right: 0.25rem;
}

.post-views {
  display: inline-flex;
  align-items: center;
}

/* 포스트 하단 정보 컨테이너 */
.post-footer-info {
  margin-top: 15px;
  padding-top: 0px;
  border-style: none;
  border-width: 0px;
  border-color: rgba(0, 0, 0, 0);
  border-image: none;
}

.post-footer-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.post-tags-section {
  margin-bottom: 15px;
  margin-top: 15px;
}

.post-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.post-tags .tag {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 400;
  border: none;
  border-bottom: 0px;
  border-bottom-color: rgba(0, 0, 0, 0);
  transition: all 0.2s ease;
  text-decoration: none;
}

.post-tags .tag:hover {
  background: transparent;
  color: var(--accent-color);
  border-bottom-color: var(--accent-color);
  transform: translateY(-1px);
}

/* -----------------------------------------------------------
   Toss Tech Style Markdown Theme
   Font: Pretendard (Toss Design System)
   Colors: Based on TDS Palette
----------------------------------------------------------- */
.post-content {
  font-family: "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
  font-size: 1.05rem;
  line-height: 1.85;
  color: #333d4b;    /* 토스 다크 그레이 */
  letter-spacing: -0.01em; /* 촘촘한 자간 */
  word-break: keep-all;    /* 한글 단어 끊김 방지 */
  background-color: #ffffff;
  font-weight: 400;
  max-width: 900px; /* 폭 제한 */
  margin-left: 0;
  margin-right: 0;
  margin-top: 30px;
  margin-bottom: 80px;
}

/* 헤딩 (Headings) - 강한 볼드, 좁은 자간 */
.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
  font-weight: 700;
  color: #191f28; /* 거의 블랙에 가까운 그레이 */
  margin-top: 32px;
  margin-bottom: 12px;
  line-height: 1.4;
  letter-spacing: -0.02em;
}

.post-content h1 { 
  font-size: 32px; 
  letter-spacing: -0.02em; 
}

.post-content h2 { 
  font-size: 19px;  /* 기존 h3 수준으로 한 단계 축소 */
  border-bottom: none; /* 밑줄 제거 */
}

.post-content h3 { 
  font-size: 17px;  /* h2보다 한 단계 작은 소제목 */
}

.post-content h4 { 
  font-size: 18px; 
}

/* 본문 및 리스트 */
.post-content p {
  margin-top: 0;
  margin-bottom: 10px;
  color: #4e5968; /* 본문은 조금 더 부드러운 그레이 */
}

.post-content ul, 
.post-content ol {
  padding-left: 24px;
  margin-top: 0;
  margin-bottom: 16px;
  color: #4e5968;
}

.post-content ul {
  list-style-type: disc;
}

.post-content ol {
  list-style-type: decimal;
}

.post-content li {
  margin-bottom: 10px;
  line-height: 1.6;
  color: #4e5968;
}

.post-content li::marker {
  color: var(--accent-color);
}

/* 인라인 코드 */
.post-content code {
  background-color: #f2f4f6;
  color: #e94e58; /* 포인트 레드 */
  padding: 2px 6px;
  border-radius: 4px;
  font-family: "Menlo", "Monaco", "Courier New", monospace;
  font-size: 0.9em;
  border: none;
  font-weight: 400;
}

/* 인라인 코드에서 language 클래스가 있는 경우 border 제거 */
.post-content :not(pre) > code[class*="language-"] {
  border: none;
}

.post-content pre code {
  background-color: transparent;
  color: #24292e; /* 다크 텍스트 (라이트 테마) */
  padding: 0;
  font-size: 14px;
  line-height: 1.5;
  border: none;
  box-shadow: none;
}

/* Code block wrapper + header (DOM-based, avoids overlap) - 라이트 테마 */
.code-block {
  margin-bottom: 5px;
  height: fit-content;
  border: 1px solid #e5e8eb; /* 연한 테두리 */
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff; /* 라이트 배경 */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  max-width: 100%; /* width 제한 */
}

[data-theme="dark"] .code-block {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.post-content .language-vhdl {
  height: fit-content;
}

.post-content .highlight {
  height: fit-content;
}

.code-block-header {
  display: none; /* 헤더 숨김 */
}

.code-block-dots {
  width: 36px;
  height: 10px;
  flex: 0 0 auto;
  background:
    radial-gradient(circle at 5px 5px, #ff5f56 4px, transparent 5px),
    radial-gradient(circle at 18px 5px, #ffbd2e 4px, transparent 5px),
    radial-gradient(circle at 31px 5px, #27c93f 4px, transparent 5px);
  opacity: 0.95;
}

.code-block-lang {
  flex: 1 1 auto;
  text-align: left;
  color: #586069; /* 회색 텍스트 */
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.code-block-actions {
  width: 24px;
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  background: unset;
  border: none;
  color: #586069; /* 회색 텍스트 */
}

.code-block-header .code-expand-btn {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: none;
  background: none;
  color: #586069; /* 회색 텍스트 */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
  position: relative;
}

.code-block-header .code-expand-btn:hover {
  background: var(--bg-secondary);
  border-color: var(--accent-color);
  color: var(--accent-color);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.code-block-header .code-expand-btn::after {
  content: '전체 코드 보기';
  position: absolute;
  top: 32px;
  right: 0;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 4px 8px;
  font-size: 11px;
  border-radius: 4px;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  z-index: 10;
}

.code-block-header .code-expand-btn:hover::after {
  opacity: 1;
  transform: translateY(0);
}

/* 블록 코드 - 라이트 테마 (CodeSandbox 스타일) */
.post-content pre {
  background-color: #ffffff; /* 라이트 배경 */
  border: 1px solid #e5e8eb; /* 연한 테두리 */
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
  overflow-x: auto;
  /* Wrapped by .code-block, so keep pre itself minimal */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  position: relative; /* line-numbers rows positioning */
  min-height: 100px;
  max-height: 380px;
  overflow-y: auto;
  outline: none;
  font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', monospace;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

/* 라인 넘버 관련 스타일 제거 - .code-block-content 구조 사용 */

.post-content pre:focus {
  outline: none;
  border-color: #58A6FF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24), 0 0 0 3px rgba(88, 166, 255, 0.1);
}

.post-content pre.highlight {
  padding: 0;
  margin-top: 0;
  margin-bottom: 0;
  padding-left: 0px;
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  border-width: 0px;
  border-color: transparent;
  border-style: none;
  border-image: none;
  background-color: unset;
  background: unset;
  height: 100%;
}

/* Code block content wrapper (replaces pre.highlight) - 라이트 테마 */
.post-content .code-block-content {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  max-height: 380px;
  /* Scroll the wrapper so line numbers move with code */
  overflow-y: auto;
  overflow-x: auto;
  position: relative;
  font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', monospace;
  font-size: 14px;
  line-height: 20px; /* CodeSandbox 스타일: 20px 고정 */
}

/* 코드 영역 - 라인 넘버와 정확히 맞춤 */
.post-content .code-block-content > code {
  display: block;
  flex: 1;
  padding: 5px 0;
  margin: 0;
  background: transparent;
  font-size: 12px;
  line-height: 20px; /* 라인 넘버와 정확히 일치 */
  overflow-x: auto;
  overflow-y: visible;
  color: #24292e; /* 다크 텍스트 (라이트 테마) */
  white-space: pre;
  tab-size: 4;
  -moz-tab-size: 4;
}

/* Prism.js 토큰이 색상을 제어하도록 기본 색상은 토큰이 없을 때만 적용 */
.post-content .code-block-content > code {
  color: #24292e; /* 다크 텍스트 (라이트 테마) */
}

/* Prism.js 토큰이 있으면 토큰 색상 사용 */
.post-content .code-block-content > code .token {
  color: inherit;
}

/* 라인 넘버 영역 - CodeSandbox 스타일 */
.post-content .code-block-content > .line-numbers {
  flex-shrink: 0;
  width: 48px; /* 고정 너비 */
  padding: 5px 0;
  padding-right: 16px;
  margin: 0; /* margin 제거 */
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', monospace;
  font-size: 12px;
  line-height: 20px; /* 코드와 정확히 일치 */
  color: #6a737d; /* 연한 회색 */
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  margin-right: 16px;
}

/* 라인 넘버 각 줄 */
.post-content .code-block-content > .line-numbers > span {
  display: block;
  width: 100%;
  height: 20px; /* 코드 라인 높이와 정확히 일치 */
  line-height: 20px;
  padding: 0;
  margin: 0;
  text-align: right;
  color: #6a737d;
  opacity: 1;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  box-sizing: border-box;
}

.post-content pre code {
  display: block;
  padding: 0.75rem 1rem;
  background: transparent;
  color: var(--code-text);
  font-size: 0.875rem;
  line-height: 1.6;
  overflow-x: auto;
  transition: color 0.2s ease;
}

.post-content pre.highlight code {
  padding-top: 4px;
  padding-bottom: 5px;
  padding-left: 0;
  line-height: var(--code-line-height);
}

.post-content code.language-vhdl {
  height: fit-content;
}

.post-content pre::-webkit-scrollbar,
.post-content .code-block-content::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.post-content pre::-webkit-scrollbar-track,
.post-content .code-block-content::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 0;
}

.post-content pre::-webkit-scrollbar-thumb,
.post-content .code-block-content::-webkit-scrollbar-thumb {
  background: var(--code-border);
  border-radius: 5px;
  border: 2px solid var(--code-bg);
}

.post-content pre::-webkit-scrollbar-thumb:hover,
.post-content .code-block-content::-webkit-scrollbar-thumb:hover {
  background: var(--accent-color);
}

.post-content pre.code-expandable,
.post-content .code-block-content.code-expandable {
  max-height: 320px;
  cursor: pointer;
  transition: max-height 0.25s ease;
  /* Keep vertical scroll enabled; line numbers should scroll together */
  overflow-y: auto;
}

.post-content pre.code-expanded,
.post-content .code-block-content.code-expanded {
  max-height: none;
  overflow-y: auto;
}

/* 코드 팝업 모달 */
.code-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10000;
  padding: 2rem;
  overflow-y: auto;
  backdrop-filter: blur(4px);
}

.code-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.code-modal-content {
  background: var(--code-bg);
  border-radius: 8px;
  border: 1px solid var(--code-border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  width: min(960px, 92vw);
  max-height: 80vh;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
  transform: scale(0.97);
  opacity: 0;
}

.code-modal.active .code-modal-content {
  transform: scale(1);
  opacity: 1;
}

.code-modal-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--code-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-secondary);
  border-radius: 8px 8px 0 0;
  min-height: 40px;
}

.code-modal-title {
  color: var(--code-text);
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 0;
}

.code-modal-close {
  background: transparent;
  border: 1px solid var(--code-border);
  color: var(--code-text);
  padding: 0.375rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8125rem;
  transition: all 0.2s ease;
}

.code-modal-close:hover {
  background: var(--bg-secondary);
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.code-modal-body {
  padding: 1rem;
  overflow: auto;
  flex: 1;
}

.code-modal-body pre {
  margin: 0;
  max-height: none;
  min-height: auto;
  background: var(--code-bg);
}

.code-modal-body pre code {
  padding: 0.75rem 1rem;
  display: block;
  color: var(--code-text);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* 문서 더보기 모달 */
.document-more-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  padding: 2rem;
  overflow-y: auto;
  align-items: center;
  justify-content: center;
}
.document-more-modal.is-open {
  display: flex;
}
.document-more-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}
.document-more-modal-content {
  position: relative;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  width: min(640px, 92vw);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.document-more-modal-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
}
.document-more-modal-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
  flex: 1;
  min-width: 0;
}
.document-more-modal-sort {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.document-more-modal-sort .overview-document-sort-select {
  padding: 0.3rem 1.5rem 0.3rem 0.5rem;
  font-size: 0.75rem;
}
.document-more-modal-close {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.document-more-modal-close:hover {
  color: var(--text-primary);
  border-color: var(--text-tertiary);
}
.document-more-modal-body {
  padding: 0.5rem 0;
  overflow-y: auto;
  flex: 1;
  min-height: 200px;
}
.document-more-modal-body .overview-document-list {
  padding: 0 1rem 1rem;
}
.document-more-modal-body .tab-panel-card {
  border-bottom: 1px solid var(--border-color);
  border-radius: 0;
  margin-bottom: 0;
  background: transparent;
}
.document-more-modal-body .tab-panel-card:last-child {
  border-bottom: none;
}
.document-more-modal-body .overview-document-item-hidden {
  display: block !important;
  white-space: pre;
}

.post-content pre:not(.highlight) code {
  background: transparent;
  padding: 0.75rem 1rem;
  color: #24292e; /* 다크 텍스트 (라이트 테마) */
  font-weight: 400;
  font-size: 0.875rem;
  line-height: 1.6;
  display: block;
}

/* Code syntax highlighting colors - GitHub style */
.post-content pre code .keyword,
.post-content .code-block-content > code .keyword { color: #FF7B72; }
.post-content pre code .string,
.post-content .code-block-content > code .string { color: #A5D6FF; }
.post-content pre code .function,
.post-content .code-block-content > code .function { color: #D2A8FF; }
.post-content pre code .number,
.post-content .code-block-content > code .number { color: #79C0FF; }
.post-content pre code .comment,
.post-content .code-block-content > code .comment { color: #8B949E; }
.post-content pre code .variable,
.post-content .code-block-content > code .variable { color: #FFA657; }
.post-content pre code .operator,
.post-content .code-block-content > code .operator { color: #C9D1D9; }
.post-content pre code .class,
.post-content .code-block-content > code .class { color: #FFA657; }
.post-content pre code .property,
.post-content .code-block-content > code .property { color: #79C0FF; }
.post-content pre code .tag,
.post-content .code-block-content > code .tag { color: #7EE787; }

/* 인용구 (Blockquote) */
.post-content blockquote {
  margin: 16px 0;
  padding: 16px 20px;
  background-color: #f2f4f6; /* 연한 회색 배경 */
  border: none; /* border 제거 */
  border-radius: 8px;
  color: #4e5968;
  font-style: normal;
  box-shadow: none;
}

.post-content blockquote p {
  margin-bottom: 0;
}

/* 강조 및 링크 */
.post-content a {
  color: #3182f6; /* 토스 블루 (Toss Blue) */
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s;
  border-bottom: none;
  background: none;
  padding: 0;
  margin: 0;
}

.post-content a:hover {
  text-decoration: underline;
  opacity: 0.8;
}

.post-content strong {
  font-weight: 700;
  color: #191f28;
  background: none;
  padding: 0;
}

.post-content em {
  font-style: normal;
  background: none; /* background 제거 */
  color: var(--highlight-color);
  padding: 0;
  border-radius: 0;
  font-weight: 500;
}

/* 구분선 (HR) */
.post-content hr {
  height: 1px;
  background-color: #e5e8eb; /* 아주 연한 그레이 */
  border: none;
  margin: 24px 0;
  position: relative;
}

.post-content hr::after {
  content: '';
  display: none;
}

/* 이미지 (Image) */
.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px; /* 둥근 모서리 */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05); /* 부드러운 그림자 */
  margin: 16px 0;
  display: block;
  border: none;
}

/* 테이블 (Table) */
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 0 1px #e5e8eb; /* 테두리 대신 그림자로 처리 */
}

.post-content table th {
  background-color: #f9fafb;
  font-weight: 600;
  color: #333d4b;
  padding: 12px 16px;
  text-align: left;
  border-bottom: none;
}

.post-content table th:first-child {
  border-top-left-radius: 8px;
}

.post-content table th:last-child {
  border-top-right-radius: 8px;
}

.post-content table td {
  padding: 12px 16px;
  border-top: 1px solid #e5e8eb;
  color: #4e5968;
}

.post-content table tr:last-child td {
  border-bottom: none;
}

.post-content table tr:last-child td:first-child {
  border-bottom-left-radius: 8px;
}

.post-content table tr:last-child td:last-child {
  border-bottom-right-radius: 8px;
}

.post-content table tr:hover {
  background: var(--bg-secondary);
}

/* 각주 (Footnotes) 스타일 - 레퍼런스 섹션으로 병합되므로 완전히 숨김 */
.post-content .footnote,
.post-content div.footnote,
.post-content section.footnotes,
div.footnotes,
div[role="doc-endnotes"],
.footnote,
section.footnotes,
div.footnote,
#footnotes,
.footnotes,
[class*="footnote"],
[class*="footnotes"],
div#post-content > div.footnote,
div#post-content > div.footnotes,
div#post-content > section.footnotes,
div#post-content > div[role="doc-endnotes"],
article .footnote,
article div.footnote,
article section.footnotes,
article div.footnotes,
article div[role="doc-endnotes"] {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  width: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  position: absolute !important;
  left: -9999px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  font-size: 0 !important;
  line-height: 0 !important;
  border: none !important;
  background: transparent !important;
}

.post-content .footnote ol,
.post-content div.footnote ol,
.post-content section.footnotes ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

.post-content .footnote li,
.post-content div.footnote li,
.post-content section.footnotes li {
  margin-bottom: 48px;
  padding-bottom: 5px;
  border-bottom-width: 0px;
  border-bottom-color: rgba(0, 0, 0, 0);
  border-bottom-style: none;
}

.post-content .footnote li p,
.post-content div.footnote li p,
.post-content section.footnotes li p {
  margin-bottom: 48px;
  padding-bottom: 5px;
  padding-top: 0px;
  font-size: 13px;
  font-weight: 100;
  border-top-width: 0px;
  border-top-color: rgba(0, 0, 0, 0);
  border-top-style: none;
  border-bottom-width: 0px;
  border-bottom-color: rgba(0, 0, 0, 0);
  border-bottom-style: none;
  border-image: none;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 15px;
}

/* 포스트 하단 정보 컨테이너 */
.post-footer-info {
  margin-top: 15px;
  padding-top: 0px;
  border-style: none;
  border-width: 0px;
  border-color: rgba(0, 0, 0, 0);
  border-image: none;
}

.post-footer-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.post-tags-section {
  margin-bottom: 30px;
  margin-top: 15px;
}

.post-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.post-references-section {
  margin-bottom: 2rem;
}

.post-references {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: reference-counter;
}

.post-reference-item {
  counter-increment: reference-counter;
  padding: 0;
  padding-left: 1.75rem;
  position: relative;
  line-height: 1.6;
  margin-bottom: 0;
}

.post-reference-item::before {
  content: "[" counter(reference-counter) "]";
  position: absolute;
  left: 0;
  color: var(--accent-color);
  font-weight: 600;
  font-size: 0.875rem;
}

.post-reference-link {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.2s ease;
  font-weight: 400;
  font-size: 0.9375rem;
}

.post-reference-link .bi {
  font-size: 0.8rem;
  vertical-align: text-top;
  margin-right: 0.25rem;
}

.post-reference-link:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

.post-reference-text {
  color: var(--text-primary);
  font-size: 0.9375rem;
}

.post-reference-author {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
  font-style: italic;
}

.post-actions {
  margin-top: 0;
  margin-bottom: 30px;
  padding-bottom: 0px;
  padding-top: 0;
  border-bottom: none;
  border-image: none;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 15px;
  width: 100%;
}

.post-like-btn {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.375rem;
  padding: 0.5rem 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.post-like-btn:hover {
  background: var(--accent-pastel);
  border-color: var(--accent-color);
  color: var(--accent-color);
  transform: translateY(-1px);
}

.post-like-btn svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.post-like-btn:hover svg {
  transform: scale(1.1);
}

.post-like-btn.liked {
  background: var(--accent-pastel);
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.post-like-btn.liked svg {
  fill: currentColor;
}

.post-like-count {
  font-weight: 600;
}

.post-navigation {
  margin-top: 2rem;
  margin-bottom: 2rem;
  padding: 1rem 1.5rem;
  border: 1px solid #e5e8eb; /* 코드블럭과 동일한 테두리 */
  border-radius: 8px; /* 코드블럭과 동일한 모서리 */
  background: #ffffff; /* 코드블럭과 동일한 배경 */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); /* 코드블럭과 동일한 그림자 */
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.post-navigation a {
  color: #3182f6; /* 토스 블루 */
  text-decoration: none;
  font-weight: 500;
  padding: 0.75rem 1rem;
  background: transparent;
  border-radius: 6px;
  transition: all 0.2s ease;
  border: none;
  flex: 0 1 auto;
  max-width: calc(50% - 0.5rem);
  text-align: center;
  position: relative;
}

.post-navigation a:hover {
  background: #f2f4f6; /* 연한 회색 배경 */
  color: #3182f6;
}

.post-navigation .prev-post {
  text-align: left;
  margin-right: auto;
  font-size: 0.9375rem;
}

.post-navigation .next-post {
  text-align: right;
  margin-left: auto;
  font-size: 0.9375rem;
}

.post-navigation a:only-child {
  max-width: 100%;
  margin: 0 auto;
}

/* 목차 (TOC) - 미니멀 스타일: 굵은 제목, 계층별 들여쓰기 */
.post-toc {
  background: transparent;
  border: none;
  padding: 0;
  margin-bottom: 2rem;
  position: sticky;
  top: 100px;
}

.post-toc-top {
  position: static;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
}

.toc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  padding-bottom: 0;
  border-bottom: none;
}

.toc-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #191f28;
  margin: 0;
  letter-spacing: -0.02em;
}
[data-theme="dark"] .toc-title {
  color: var(--text-primary);
}

.toc-toggle {
  display: none;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border: none;
  position: relative;
}

.toc-list li {
  margin-top: 0;
  margin-bottom: 0.5rem;
  position: relative;
}

.toc-list a {
  color: #4e5968;
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 400;
  transition: color 0.2s ease;
  display: block;
  padding: 0;
  line-height: 1.5;
  position: relative;
}
[data-theme="dark"] .toc-list a {
  color: var(--text-secondary);
}

.toc-list a:hover {
  color: var(--accent-color);
}

.toc-list a.active {
  color: var(--accent-color);
  font-weight: 600;
}

.toc-list .toc-level-1 {
  padding-left: 0;
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.toc-list .toc-level-1 a {
  padding-left: 0;
}

.toc-list .toc-level-2 {
  padding-left: 0;
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.toc-list .toc-level-2 a {
  padding-left: 1rem;
}

.toc-list .toc-level-3 {
  padding-left: 0;
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.toc-list .toc-level-3 a {
  padding-left: 0;
}

.toc-list .toc-level-4 {
  padding-left: 0;
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.toc-list .toc-level-4 a {
  padding-left: 2.5rem;
}

.toc-list .toc-level-5 {
  padding-left: 0;
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.toc-list .toc-level-5 a {
  padding-left: 3.25rem;
}

.toc-list .toc-level-6 {
  padding-left: 0;
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.toc-list .toc-level-6 a {
  padding-left: 4rem;
}

/* 공유 버튼 */
.share-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.share-btn:hover {
  background: var(--accent-pastel);
  border-color: var(--accent-color);
  color: var(--accent-color);
  transform: translateY(-1px);
}

.share-btn svg {
  width: 16px;
  height: 16px;
}

/* 댓글 */
.post-comments {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border-color);
}

.post-comments .utterances {
  max-width: 100%;
}

/* 업데이트 날짜 */
.last-modified {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-left: 0.5rem;
}

/* Responsive */
/* Narrow screens + mobile "desktop mode" (coarse pointer): stack layout */
@media (max-width: 1100px), (pointer: coarse) {
  .home {
    grid-template-columns: 1fr;
    grid-template-areas:
      "main"
      "sidebar";
    padding: 1rem 16px;
  }

  .sidebar {
    position: static;
    top: auto;
  }

  .sidebar-section {
    margin-bottom: 1rem;
  }

  .blog-container,
  .bottom-sections {
    grid-template-columns: 1fr;
  }

  /* Home (기존 2단): 모바일에서 컴팩트 프로필/카테고리 표시 */
  .home:not(.home-single) .mobile-profile-bar {
    display: flex;
  }

  .home:not(.home-single) .mobile-category-slider {
    display: block;
  }

  .home:not(.home-single) .profile-section {
    display: none;
  }

  .home-single .profile-section {
    display: block;
  }

  /* Home (기존 2단): 사이드바 카테고리 숨김 */
  .sidebar-categories {
    display: none;
  }

  .post-container {
    grid-template-columns: 1fr;
    grid-template-areas:
      "toc"
      "post";
  }

  .post-container-wide {
    grid-template-columns: 1fr;
    grid-template-areas: "post";
  }
  .post-container-wide > .post-sidebar {
    display: none;
  }

  .post-toc {
    position: static;
    top: auto;
    margin-bottom: 2rem;
  }
}

/* 모바일 및 태블릿 (1024px 이하) */
@media (max-width: 1024px) {
  .wrapper {
    padding: 0 16px;
  }
  
  .home {
    padding: 1rem 16px;
  }
  
  /* 모바일/태블릿에서 본문 폭이 너무 좁아지지 않도록 패딩을 축소 */
  .post {
    padding: 1.75rem 1.25rem;
  }
  /* dev 글은 .post-container-wide .post가 더 높은 우선순위라 별도 오버라이드 필요 */
  .post-container-wide .post {
    padding: 1.75rem 1.25rem;
  }
  .post-container {
    gap: 1.5rem;
  }
  
  /* 모바일/태블릿에서 목차 사이드바 숨기기 */
  .post-sidebar,
  .post-toc,
  #postTOC {
    display: none !important;
  }
  
  /* 모바일/태블릿에서 page-content 패딩 제거 */
  .page-content {
    padding-top: 0;
    padding-bottom: 0;
  }
}

/* 모바일 (768px 이하) - 추가 스타일 */
@media (max-width: 768px) {
  .wrapper {
    padding: 0 14px;
  }

  .post {
    padding: 1.5rem 1rem;
  }
  .post-container-wide .post {
    padding: 1.5rem 1rem;
  }

  /* 모바일에서 제목 과대 표시 완화 + 폭에 맞춘 자연스러운 줄바꿈 */
  .post-title {
    font-size: 1.7rem;
    line-height: 1.25;
    margin-bottom: 0.9rem;
    letter-spacing: -0.015em;
  }
  
  .post-item {
    padding: 1rem;
  }
  
  .post-header {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .post-date {
    align-self: flex-start;
  }
  
  .search-modal-content {
    width: 95vw;
    margin-top: 5vh;
  }
}

/* Mobile Responsive - Toss Tech Style */
@media screen and (max-width: 768px) {
  .post-content {
    font-size: 16px; /* 모바일에서 폰트 사이즈 조정 */
  }
  .post-content h1 { font-size: 26px; }
  .post-content h2 { font-size: 20px; } /* 모바일에서도 한 단계 축소 */
  .post-content h3 { font-size: 18px; }
}

@media (max-width: 480px) {
  .wrapper {
    padding: 0 12px;
  }
  .home {
    padding: 1rem 14px;
  }

  .post {
    padding: 1.25rem 0.9rem;
  }
  .post-container-wide .post {
    padding: 1.25rem 0.9rem;
  }

  .post-title {
    font-size: 1.55rem;
    line-height: 1.25;
    margin-bottom: 0.85rem;
  }
}

/* Dev Explorer Sidebar (홈 개발문서 카테고리) */
.dev-explorer-nav {
  background: var(--bg-primary);
  border-radius: var(--lobehub-radius);
  border: 1px solid var(--border-color);
  padding: 1.15rem 1.1rem 1.2rem;
  box-shadow: var(--lobehub-shadow);
}

.dev-explorer-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.7rem;
  padding-left: 0.25rem;
}

.dev-explorer-root {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dev-explorer-group {
  border-radius: 0.75rem;
  padding: 0.1rem 0;
}

.dev-explorer-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 0.45rem 0.55rem;
  border-radius: 0.5rem;
  color: var(--text-primary);
  list-style: none;
}

.dev-explorer-summary:hover {
  background: var(--bg-secondary);
}

.dev-explorer-summary-left {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.dev-explorer-summary-icon {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  background: var(--bg-secondary);
}

.dev-explorer-summary-label {
  font-size: 0.8rem;
  font-weight: 600;
}

.dev-explorer-chevron {
  display: inline-block;
  font-size: 0.7rem;
  color: var(--text-secondary);
  transform: translateY(1px);
  transition: transform 0.15s ease;
}

.dev-explorer-group[open] > .dev-explorer-summary .dev-explorer-chevron,
.dev-explorer-subgroup[open] > .dev-explorer-subsummary .dev-explorer-chevron {
  transform: rotate(90deg) translateY(0);
}

.dev-explorer-children {
  list-style: none;
  margin: 0.1rem 0 0;
  padding: 0.1rem 0 0.15rem 0.75rem;
  border-left: 1px solid var(--border-color);
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.25s ease;
}
.dev-explorer-group:not([open]) .dev-explorer-children {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  padding-top: 0;
  padding-bottom: 0;
}
.dev-explorer-group[open] .dev-explorer-children {
  max-height: 1200px;
  opacity: 1;
}

.dev-explorer-subgroup {
  margin-top: 0.15rem;
}

.dev-explorer-subsummary {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  padding: 0.3rem 0.2rem;
  border-radius: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.dev-explorer-subsummary:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.dev-explorer-leaf-list {
  list-style: none;
  margin: 0.1rem 0 0.15rem 0.95rem;
  padding: 0;
  overflow: hidden;
  transition: max-height 0.25s ease, opacity 0.2s ease;
}
.dev-explorer-subgroup:not([open]) .dev-explorer-leaf-list {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  margin-bottom: 0;
}
.dev-explorer-subgroup[open] .dev-explorer-leaf-list {
  max-height: 600px;
  opacity: 1;
}

.dev-explorer-leaf-link {
  display: block;
  padding: 0.18rem 0.35rem;
  border-radius: 0.35rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.dev-explorer-leaf-link:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.dev-explorer-group + .dev-explorer-group {
  margin-top: 0.15rem;
}
