/* ============================================
   서퍼블리셔 디자인 시스템 v4.0
   프리미엄 다크 테마 + 글래스모피즘
   ============================================ */

/* -- CSS 변수 (다크 테마) -- */
:root,
[data-theme="dark"] {
  --bg-primary: #0a0b0f;
  --bg-secondary: #12131a;
  --bg-card: #1a1b25;
  --bg-card-hover: #22232f;
  --bg-glass: rgba(26, 27, 37, 0.7);
  --text-primary: #e8e9ed;
  --text-secondary: #9ca0b0;
  --text-muted: #6b6f82;
  --accent: #6c5ce7;
  --accent-light: #a29bfe;
  --accent-glow: rgba(108, 92, 231, 0.3);
  --green: #00b894;
  --blue: #0984e3;
  --orange: #fdcb6e;
  --red: #e17055;
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.5);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --header-h: 64px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Noto Sans KR', 'Inter', -apple-system, sans-serif;
}

[data-theme="light"] {
  --bg-primary: #f5f6fa;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f0f1f5;
  --bg-glass: rgba(255, 255, 255, 0.8);
  --text-primary: #1a1b25;
  --text-secondary: #5a5e72;
  --text-muted: #9ca0b0;
  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.15);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.12);
}

/* -- 리셋/기본 -- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-light);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul,
ol {
  list-style: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

/* -- 스크롤 프로그레스 -- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  z-index: 9999;
  transition: width 0.1s;
}

/* -- 헤더 -- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-h);
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-primary);
}

.logo-icon {
  font-size: 1.5rem;
}

.main-nav {
  display: flex;
  gap: 4px;
}

.nav-link {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
  background: var(--bg-card);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: var(--accent);
  border-radius: 3px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-toggle,
.theme-toggle,
.mobile-menu-toggle {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.search-toggle:hover,
.theme-toggle:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

[data-theme="dark"] .sun-icon {
  display: none;
}

[data-theme="light"] .moon-icon {
  display: none;
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
}

.mobile-menu-toggle span {
  width: 18px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all var(--transition);
}

/* -- 검색 오버레이 -- */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 20vh;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.search-overlay.active {
  opacity: 1;
  visibility: visible;
}

.search-overlay-inner {
  width: 90%;
  max-width: 600px;
  position: relative;
}

.search-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
}

.search-input-overlay {
  width: 100%;
  padding: 16px 24px;
  font-size: 1.2rem;
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: var(--font);
  outline: none;
}

.search-submit-overlay {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  padding: 8px 20px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
}

/* -- 히어로 배너 -- */
.hero-banner {
  padding: 80px 0 40px;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 50%, rgba(108, 92, 231, 0.05) 100%);
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.hero-greeting {
  display: block;
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.hero-main {
  display: block;
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.3;
}

.hero-main em {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  margin-top: 12px;
  font-size: 1.05rem;
  color: var(--text-secondary);
}

.hero-search {
  margin-top: 24px;
  position: relative;
  max-width: 500px;
}

.hero-search-input {
  width: 100%;
  padding: 14px 50px 14px 20px;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: var(--font);
  outline: none;
  transition: border var(--transition);
}

.hero-search-input:focus {
  border-color: var(--accent);
}

.hero-search-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-stats {
  display: flex;
  gap: 32px;
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-light);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* -- 카테고리 칩 -- */
.category-filter-section {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.category-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.category-chip {
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all var(--transition);
  background: transparent;
}

.category-chip:hover {
  border-color: var(--chip-color, var(--accent));
  color: var(--text-primary);
}

.category-chip.active {
  background: var(--chip-color, var(--accent));
  color: #fff;
  border-color: transparent;
}

.chip-count {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 8px;
  border-radius: 50px;
  margin-left: 4px;
}

/* -- 글 카드 그리드 -- */
.articles-section {
  padding: 40px 0 80px;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.article-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-lg);
}

.card-link {
  display: block;
  color: inherit;
}

.card-image {
  height: 200px;
  overflow: hidden;
  background: var(--bg-secondary);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.article-card:hover .card-image img {
  transform: scale(1.05);
}

.card-placeholder {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card));
}

.card-body {
  padding: 20px;
}

.article-category {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 50px;
  background: rgba(108, 92, 231, 0.12);
  color: var(--cat-color, var(--accent-light));
  margin-bottom: 8px;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-excerpt {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.meta-sep {
  opacity: 0.5;
}

/* -- Featured 대형 카드 -- */
.featured-article {
  margin-bottom: 32px;
}

.featured-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all var(--transition);
  color: inherit;
}

.featured-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-glow);
}

.featured-image {
  height: 320px;
  overflow: hidden;
  position: relative;
}

.featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.4), transparent);
}

.featured-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 4px 14px;
  background: var(--accent);
  color: #fff;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
}

.featured-content {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-title {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.3;
  margin: 12px 0;
}

.featured-excerpt {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

.featured-placeholder {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  background: linear-gradient(135deg, var(--bg-secondary), rgba(108, 92, 231, 0.1));
}

/* -- 페이지네이션 -- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 48px;
}

.page-btn {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.page-btn:hover {
  border-color: var(--accent);
  color: var(--accent-light);
}

.page-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* -- 빈 상태 -- */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  grid-column: 1/-1;
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-secondary);
}

/* -- 버튼 -- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-primary:hover {
  background: var(--accent-light);
  color: #fff;
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent-light);
}

/* -- 푸터 -- */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
  margin-top: 80px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}

.footer-logo {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
  display: block;
}

.footer-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.footer-links h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--accent-light);
}

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* -- Back to Top -- */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition);
  box-shadow: 0 4px 16px var(--accent-glow);
  z-index: 900;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* -- 에러 페이지 -- */
.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
}

.error-code {
  font-size: 8rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}

.error-title {
  font-size: 1.5rem;
  margin: 16px 0 8px;
}

.error-desc {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.error-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* -- 카테고리 페이지 -- */
.category-page {
  padding: 40px 0 80px;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
  padding: 24px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.category-icon-large {
  font-size: 3rem;
}

.category-title {
  font-size: 1.8rem;
  font-weight: 800;
}

.category-desc {
  color: var(--text-secondary);
  margin-top: 4px;
}

.sort-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  font-size: 0.9rem;
}

.sort-label {
  color: var(--text-muted);
}

.sort-option {
  color: var(--text-secondary);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
}

.sort-option.active {
  background: var(--accent);
  color: #fff;
}

.list-article-card {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.list-article-card:hover {
  background: var(--bg-card);
}

.list-card-link {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  color: inherit;
}

.list-card-image {
  width: 200px;
  min-width: 200px;
  height: 140px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.list-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.list-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  background: linear-gradient(135deg, var(--bg-secondary), rgba(108, 92, 231, 0.08));
  border-radius: var(--radius-sm);
}

.list-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.list-card-excerpt {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* -- 검색 페이지 -- */
.search-page {
  padding: 60px 0 80px;
}

.search-header {
  margin-bottom: 32px;
}

.search-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.8rem;
}

.search-info {
  color: var(--text-secondary);
  margin-top: 8px;
}

.search-form-page {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
}

.search-input-page {
  flex: 1;
  padding: 12px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: var(--font);
  outline: none;
}

.search-input-page:focus {
  border-color: var(--accent);
}

.search-result-card {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.search-result-card a {
  color: inherit;
}

.result-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.result-title:hover {
  color: var(--accent-light);
}

.result-excerpt {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* -- 글 상세 -- */
.article-page {
  padding-top: 20px;
}

.article-header {
  margin-bottom: 40px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--accent-light);
}

.breadcrumb-current {
  color: var(--text-secondary);
}

.article-category-badge {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  background: rgba(108, 92, 231, 0.15);
  color: var(--cat-color, var(--accent-light));
  margin-bottom: 12px;
}

.article-title {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 20px;
}

.article-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.author-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.author-name {
  font-weight: 600;
  display: block;
}

.author-detail time {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.meta-right {
  display: flex;
  gap: 16px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.article-hero-image {
  margin-top: 24px;
  border-radius: var(--radius);
  overflow: hidden;
  max-height: 480px;
}

.article-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* -- 본문 콘텐츠 -- */
.article-content {
  padding: 40px 0;
  font-size: 1.05rem;
  line-height: 1.85;
}

.article-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 48px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}

.article-content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 32px 0 12px;
}

.article-content p {
  margin-bottom: 20px;
}

.article-content ul,
.article-content ol {
  margin: 16px 0;
  padding-left: 24px;
}

.article-content li {
  margin-bottom: 8px;
  list-style: disc;
}

.article-content ol li {
  list-style: decimal;
}

.article-content blockquote {
  margin: 24px 0;
  padding: 16px 24px;
  border-left: 4px solid var(--accent);
  background: var(--bg-card);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-secondary);
}

.article-content code {
  background: var(--bg-card);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.9em;
}

.article-content pre {
  background: var(--bg-card);
  padding: 20px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 24px 0;
  border: 1px solid var(--border);
}

.article-content pre code {
  background: none;
  padding: 0;
}

.article-content img {
  border-radius: var(--radius-sm);
  margin: 24px auto;
}

.article-content a {
  color: var(--accent-light);
  border-bottom: 1px solid transparent;
}

.article-content a:hover {
  border-bottom-color: var(--accent-light);
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
}

.article-content th,
.article-content td {
  padding: 12px 16px;
  border: 1px solid var(--border);
  text-align: left;
}

.article-content th {
  background: var(--bg-card);
  font-weight: 600;
}

/* -- 태그 -- */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
}

.tag {
  padding: 4px 14px;
  border-radius: 50px;
  font-size: 0.85rem;
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.tag:hover {
  border-color: var(--accent);
  color: var(--accent-light);
}

/* -- 액션 바 -- */
.article-actions {
  display: flex;
  gap: 12px;
  padding: 20px 0;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.9rem;
  transition: all var(--transition);
}

.action-btn:hover {
  border-color: var(--accent);
  color: var(--accent-light);
}

.like-btn.liked {
  background: rgba(231, 92, 92, 0.1);
  border-color: var(--red);
  color: var(--red);
}

.like-btn.liked svg {
  fill: var(--red);
}

/* -- 관련 글 -- */
.related-section {
  padding: 48px 0;
  background: var(--bg-secondary);
}

.section-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.related-card {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: inherit;
  transition: all var(--transition);
}

.related-card:hover {
  border-color: var(--accent-glow);
}

.related-image {
  width: 80px;
  min-width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.related-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  font-size: 1.5rem;
}

.related-category {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.related-info h4 {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 4px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-info time {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* -- 댓글 섹션 -- */
.comments-section {
  padding: 48px 0;
}

.comment-count {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 400;
}

.comment-form-wrapper {
  margin-bottom: 32px;
}

.comment-form {
  background: var(--bg-card);
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.form-row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.form-input {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.9rem;
  outline: none;
}

.form-input:focus {
  border-color: var(--accent);
}

.form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.9rem;
  resize: vertical;
  outline: none;
}

.form-textarea:focus {
  border-color: var(--accent);
}

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* -- 반응형 -- */
@media (max-width: 768px) {
  .hero-main {
    font-size: 1.6rem;
  }

  .hero-inner {
    flex-direction: column;
    text-align: center;
  }

  .hero-search {
    max-width: 100%;
  }

  .hero-stats {
    justify-content: center;
  }

  .main-nav {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .featured-card {
    grid-template-columns: 1fr;
  }

  .featured-image {
    height: 200px;
  }

  .articles-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .article-title {
    font-size: 1.6rem;
  }

  .article-meta-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .list-card-link {
    flex-direction: column;
  }

  .list-card-image {
    width: 100%;
    height: 180px;
  }

  .form-row {
    flex-direction: column;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .search-form-page {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .hero-main {
    font-size: 1.3rem;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .container,
  .container-narrow {
    padding: 0 16px;
  }
}