/* === variables.css === */
/* ==========================================================================
   DESIGN SYSTEM & CUSTOM PROPERTIES (HSL Tailored Colors)
   ========================================================================== */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.css');

:root {
  /* Fonts */
  --font-sans: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;

  /* HSL Tailored Colors (Premium Slate / Teal / Neon Amber Theme) */
  --hue-primary: 200; /* Teal/Blue */
  --hue-accent: 38;   /* Neon Amber/Gold */
  
  /* Light Mode Variables */
  --bg-base: hsl(var(--hue-primary), 20%, 98%);
  --bg-surface: hsl(var(--hue-primary), 20%, 100%);
  --bg-surface-glass: hsla(var(--hue-primary), 20%, 100%, 0.8);
  --border-color: hsl(var(--hue-primary), 15%, 90%);
  --border-color-glow: hsla(var(--hue-primary), 90%, 50%, 0.2);
  
  --text-main: hsl(var(--hue-primary), 30%, 15%);
  --text-muted: hsl(var(--hue-primary), 15%, 45%);
  --text-inverse: hsl(var(--hue-primary), 20%, 98%);
  
  --primary-color: hsl(var(--hue-primary), 85%, 45%);
  --primary-hover: hsl(var(--hue-primary), 90%, 38%);
  --primary-glow: hsla(var(--hue-primary), 85%, 45%, 0.15);
  
  --accent-color: hsl(var(--hue-accent), 95%, 50%);
  --accent-hover: hsl(var(--hue-accent), 100%, 45%);
  --accent-glow: hsla(var(--hue-accent), 95%, 50%, 0.2);
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.12);
  --glass-blur: 16px;
  
  /* Spacing System */
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  
  /* Layout Options */
  --max-width-content: 800px;
  --max-width-container: 1200px;
  --header-height: 70px;
  --mobile-nav-height: 60px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  
  /* Animations */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === layout.css === */
/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  padding-bottom: calc(var(--mobile-nav-height) + 20px); /* For mobile nav space */
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-md);
}

ul, ol {
  list-style: none;
}

button, input {
  font: inherit;
  background: none;
  border: none;
  outline: none;
}

/* Glassmorphism utility */
.glass {
  background: var(--bg-surface-glass);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border-color);
}

/* Container */
.container {
  width: 100%;
  max-width: var(--max-width-container);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

/* === components.css === */
/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.logo span {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-desktop {
  display: none; /* Mobile first */
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.icon-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-main);
  background-color: var(--border-color);
  cursor: pointer;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.icon-btn:hover {
  background-color: var(--primary-glow);
  color: var(--primary-color);
  transform: scale(1.05);
}

/* Menu Toggle for Mobile */
.menu-toggle {
  display: flex;
}

/* Mobile Top Category Bar */
.category-bar-wrapper {
  overflow-x: auto;
  white-space: nowrap;
  padding: var(--space-sm) var(--space-md);
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  scrollbar-width: none; /* Firefox */
}

.category-bar-wrapper::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.category-bar {
  display: inline-flex;
  gap: var(--space-xs);
}

.category-chip {
  display: inline-block;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  font-weight: 600;
  background-color: var(--bg-base);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
}

.category-chip.active, .category-chip:hover {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px var(--primary-glow);
}

/* ==========================================================================
   MOBILE BOTTOM NAVIGATION (한 손 조작 최적화)
   ========================================================================== */
.mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--mobile-nav-height);
  z-index: 99;
  display: flex;
  justify-content: space-around;
  align-items: center;
  border-top: 1px solid var(--border-color);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 600;
  flex: 1;
  height: 100%;
}

.mobile-nav-item svg {
  width: 22px;
  height: 22px;
  transition: transform var(--transition-fast);
}

.mobile-nav-item:hover svg, .mobile-nav-item.active svg {
  color: var(--primary-color);
  transform: translateY(-2px);
}

.mobile-nav-item.active {
  color: var(--primary-color);
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-xs);
  margin: var(--space-xl) 0 var(--space-2xl);
}

.page-btn {
  min-width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-weight: 600;
  transition: all var(--transition-fast);
}

.page-btn.active, .page-btn:hover:not(.disabled) {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px var(--primary-glow);
}

.page-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* SNS Share Widget */
.share-box {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin: var(--space-xl) 0;
  padding: var(--space-md);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-color);
}

.share-title {
  font-weight: 700;
  font-size: 0.95rem;
}

.share-buttons {
  display: flex;
  gap: var(--space-xs);
}

.share-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background-color: var(--bg-base);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.share-btn:hover {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

/* ==========================================================================
   GOOGLE ADSENSE AD PLACEHOLDERS (CLS 방지 및 구글 최적화)
   ========================================================================== */
.adsense-slot {
  display: block;
  width: 100%;
  background-color: transparent;
  margin: var(--space-lg) 0;
  overflow: hidden;
  position: relative;
}

.adsense-slot ins.adsbygoogle {
  display: block !important;
  width: 100% !important;
}

/* 높이 선예약으로 Layout Shift(CLS) 방지 */
.adsense-top {
  min-height: 100px; /* 모바일형 가로 배너 */
}

.adsense-middle-placeholder {
  min-height: 250px; /* 모바일 사각형 광고 */
  margin: var(--space-lg) 0;
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.adsense-bottom {
  min-height: 100px;
}

.adsense-sidebar {
  min-height: 250px;
}

/* 모바일 하단 고정 앵커/CTA (디자인이 세련된 Glassmorphism 형태) */
.mobile-sticky-cta {
  position: fixed;
  bottom: calc(var(--mobile-nav-height) + 12px);
  left: var(--space-md);
  right: var(--space-md);
  z-index: 98;
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: transform var(--transition-normal);
}

.mobile-sticky-cta-content {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.mobile-sticky-cta-text {
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.3;
}

.mobile-sticky-cta-btn {
  background-color: var(--accent-color);
  color: var(--text-inverse);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 4px 10px var(--accent-glow);
}

.mobile-sticky-cta-btn:hover {
  background-color: var(--accent-hover);
}

.mobile-sticky-cta-close {
  color: var(--text-muted);
  padding: 4px;
  cursor: pointer;
}

/* ==========================================================================
   SEARCH PAGE (search.html)
   ========================================================================== */
.search-wrapper {
  margin: var(--space-xl) 0;
}

.search-input-box {
  display: flex;
  gap: var(--space-xs);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 4px 8px;
  background-color: var(--bg-surface);
  transition: border-color var(--transition-fast);
}

.search-input-box:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-input-box input {
  flex-grow: 1;
  padding: var(--space-sm);
  color: var(--text-main);
}

.search-input-box button {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary-color);
  color: white;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.search-input-box button:hover {
  background-color: var(--primary-hover);
}

.search-results-info {
  margin: var(--space-md) 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* === article.css === */
/* ==========================================================================
   HERO / BANNER SECTION
   ========================================================================== */
.hero {
  padding: var(--space-2xl) 0 var(--space-xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translate(-50%, 0);
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}

.hero h1 {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: var(--space-md);
  letter-spacing: -1px;
}

.hero h1 span {
  background: linear-gradient(135deg, var(--primary-color) 30%, var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--space-xl);
}

/* ==========================================================================
   POST CARD LIST
   ========================================================================== */
.posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.card {
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-color-glow);
}

.card-image-link {
  display: block;
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background-color: var(--border-color);
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.card:hover .card-image {
  transform: scale(1.03);
}

.card-badge {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  background-color: var(--primary-color);
  color: white;
  padding: var(--space-2xs) var(--space-xs);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  z-index: 2;
}

.card-content {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-meta {
  display: flex;
  gap: var(--space-sm);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
}

.card-title {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: var(--space-xs);
}

.card-title a {
  color: var(--text-main);
}

.card-title a:hover {
  color: var(--primary-color);
}

.card-summary {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: var(--space-md);
}

.card-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-tags {
  display: flex;
  gap: var(--space-2xs);
  flex-wrap: wrap;
}

/* ==========================================================================
   DETAIL PAGE (post.html)
   ========================================================================== */
.post-layout {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  padding: var(--space-xl) 0 var(--space-2xl);
}

.post-header {
  margin-bottom: var(--space-md);
}

.post-breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.post-breadcrumb a {
  color: var(--text-muted);
}

.post-breadcrumb a:hover {
  color: var(--primary-color);
}

.post-title {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: var(--space-sm);
}

.post-meta-details {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  font-size: 0.9rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: var(--space-md);
}

.post-featured-image {
  width: 100%;
  height: auto;
  max-height: none;
  margin-bottom: var(--space-lg);
  box-shadow: var(--shadow-md);
}

/* TOC (Table of Contents) */
.post-sidebar {
  display: none; /* 모바일에서 사이드바 기본 숨김 */
}

.toc-mobile {
  display: block;
}

@media (min-width: 1024px) {
  .toc-mobile {
    display: none !important;
  }
}

.toc-box {
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-xl);
}

.toc-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.toc-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.toc-item {
  font-size: 0.95rem;
}

.toc-item.level-3 {
  padding-left: var(--space-md);
  font-size: 0.875rem;
}

.toc-link {
  color: var(--text-muted);
  border-left: 2px solid transparent;
  padding-left: var(--space-xs);
  transition: all var(--transition-fast);
}

.toc-link.active, .toc-link:hover {
  color: var(--primary-color);
  border-left-color: var(--primary-color);
}

/* Body Content Styling */
.post-body {
  font-size: 1.0625rem; /* 17px */
  line-height: 1.8;
  color: var(--text-main);
}

.post-body p {
  margin-bottom: var(--space-md);
}

.post-body h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
  border-bottom: 2px solid var(--border-color);
  padding-bottom: var(--space-xs);
  position: relative;
}

.post-body h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-xs);
}

.post-body ul, .post-body ol {
  margin-left: var(--space-lg);
  margin-bottom: var(--space-md);
  list-style: initial;
}

.post-body blockquote {
  border-left: 4px solid var(--primary-color);
  padding-left: var(--space-md);
  font-style: italic;
  color: var(--text-muted);
  margin: var(--space-md) 0;
  background-color: var(--primary-glow);
  padding-top: var(--space-xs);
  padding-bottom: var(--space-xs);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-md) 0 var(--space-xl);
  font-size: 0.95rem;
}

.post-body th, .post-body td {
  border: 1px solid var(--border-color);
  padding: var(--space-sm);
  text-align: left;
}

.post-body th {
  background-color: var(--border-color);
  font-weight: 700;
}

.post-body tr:nth-child(even) {
  background-color: var(--bg-base);
}

.post-body pre {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: var(--space-md);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin-bottom: var(--space-md);
  font-size: 0.9rem;
}

.post-body code {
  font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;
  background-color: var(--border-color);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--primary-color);
}

.post-body pre code {
  background-color: transparent;
  padding: 0;
  border-radius: 0;
  color: inherit;
}

/* FAQ Accordion */
.faq-section {
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border-color);
}

.faq-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: var(--space-lg);
}

.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.faq-item {
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: all var(--transition-fast);
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: var(--space-md);
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  background-color: var(--bg-surface);
  color: var(--text-main);
  transition: background-color var(--transition-fast);
}

.faq-question:hover {
  background-color: var(--border-color);
}

.faq-question-icon {
  width: 20px;
  height: 20px;
  transition: transform var(--transition-normal);
}

.faq-item.open .faq-question-icon {
  transform: rotate(180deg);
  color: var(--primary-color);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal) ease-out, padding var(--transition-normal);
  background-color: var(--bg-surface);
  color: var(--text-muted);
  font-size: 0.975rem;
  line-height: 1.6;
}

.faq-item.open .faq-answer {
  max-height: 500px;
  padding: 0 var(--space-md) var(--space-md);
  border-top: 1px solid transparent;
}

/* Related Posts */
.related-posts-section {
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border-color);
}

.related-posts-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: var(--space-lg);
}

.related-posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

/* === mobile.css === */
/* ==========================================================================
   RESPONSIVE DESIGN (Tablet & Desktop Overrides)
   ========================================================================== */

/* Tablet & Smaller Desktop (768px 이상) */
@media (min-width: 768px) {
  body {
    padding-bottom: 0; /* Remove mobile nav bottom padding */
  }
  
  .mobile-nav {
    display: none; /* Hide mobile nav */
  }

  .nav-desktop {
    display: flex;
    align-items: center;
    gap: var(--space-md);
  }

  .nav-link {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color var(--transition-fast);
    padding: var(--space-xs) 0;
    position: relative;
  }

  .nav-link:hover, .nav-link.active {
    color: var(--primary-color);
  }
  
  .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--transition-fast);
  }
  
  .nav-link:hover::after, .nav-link.active::after {
    width: 100%;
  }

  .menu-toggle {
    display: none; /* Hide hamburger menu toggle */
  }

  .hero h1 {
    font-size: 3rem;
  }

  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .related-posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .mobile-sticky-cta {
    bottom: var(--space-md);
    left: auto;
    right: var(--space-md);
    width: 360px; /* Floating banner in bottom right for tablet/desktop */
  }
}

/* Large Desktop (1024px 이상) */
@media (min-width: 1024px) {
  .hero h1 {
    font-size: 3.5rem;
  }

  .posts-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* 2 Column layout for post detail page */
  .post-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    align-items: start;
  }

  .post-main {
    min-width: 0; /* Flexbox / Grid child overflow bug prevent */
  }

  .post-sidebar {
    display: flex;
    position: sticky;
    top: calc(var(--header-height) + 20px);
    flex-direction: column;
    gap: var(--space-lg);
  }

  .sidebar-widget {
    border-radius: var(--radius-md);
    padding: var(--space-md);
  }

  .sidebar-widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: var(--space-2xs);
  }
  
  .sidebar-post-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
  }
  
  .sidebar-post-item {
    display: flex;
    gap: var(--space-xs);
    align-items: center;
  }
  
  .sidebar-post-thumb {
    width: 60px;
    height: 45px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
  }
  
  .sidebar-post-title {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  
  .sidebar-post-title a {
    color: var(--text-main);
  }
  
  .sidebar-post-title a:hover {
    color: var(--primary-color);
  }
}

/* === dark.css === */
/* Dark Mode Overrides */
[data-theme="dark"] {
  --bg-base: hsl(var(--hue-primary), 25%, 8%);
  --bg-surface: hsl(var(--hue-primary), 20%, 12%);
  --bg-surface-glass: hsla(var(--hue-primary), 20%, 12%, 0.75);
  --border-color: hsl(var(--hue-primary), 15%, 18%);
  --border-color-glow: hsla(var(--hue-primary), 90%, 50%, 0.3);
  
  --text-main: hsl(var(--hue-primary), 15%, 88%);
  --text-muted: hsl(var(--hue-primary), 10%, 60%);
  --text-inverse: hsl(var(--hue-primary), 20%, 10%);
  
  --primary-color: hsl(var(--hue-primary), 80%, 55%);
  --primary-hover: hsl(var(--hue-primary), 85%, 65%);
  --primary-glow: hsla(var(--hue-primary), 80%, 55%, 0.25);
  
  --accent-color: hsl(var(--hue-accent), 95%, 55%);
  --accent-hover: hsl(var(--hue-accent), 100%, 65%);
  --accent-glow: hsla(var(--hue-accent), 95%, 55%, 0.3);
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
}

