/* ==========================================================================
   DevFlow - Tistory Blog Skin
   Based on Toss Tech Blog (toss.tech) actual design specs
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS Custom Properties
   -------------------------------------------------------------------------- */
:root {
  --bg-primary: #fafaf9;
  --bg-card: #f3f2f0;
  --text-title: #1a1a1a;
  --text-section: #2e2e2e;
  --text-body: #64645f;
  --text-meta: #52524e;
  --text-meta-light: #8a8a85;
  --accent: #D97706;
  --accent-hover: #B45309;
  --accent-subtle: rgba(217, 119, 6, 0.08);
  --accent-glow: rgba(217, 119, 6, 0.15);
  --border-list: #e8e6e3;

  --font-sans: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace;

  --header-height: 60px;
  --layout-max: 1120px;
  --layout-gap: 56px;
  --sidebar-width: 260px;
  --post-max: 720px;

  --radius-img: 12px;
  --radius-card: 16px;
  --radius-btn: 8px;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);

  --code-bg: #1e1e2e;
  --code-text: #cdd6f4;
  --scroll-progress: #D97706;
  --header-bg: rgba(250,250,249,0.88);

  /* Terminal dots */
  --dot-red: #ff5f57;
  --dot-yellow: #febc2e;
  --dot-green: #28c840;

  /* Signature features variables */
  --bg-secondary: #f7f6f4;
  --bg-tertiary: #eeedeb;
  --text-primary: #1a1a1a;
  --text-secondary: #64645f;
  --text-tertiary: #8a8a85;
  --text-quaternary: #c5c3bf;
  --border-color: #e8e6e3;
}

[data-theme="dark"] {
  --bg-primary: #111113;
  --bg-card: #1a1a1f;
  --text-title: #e8e6e3;
  --text-section: #ccc9c4;
  --text-body: #8a8a85;
  --text-meta: #9a9a95;
  --text-meta-light: #5a5a55;
  --accent: #F59E0B;
  --accent-hover: #FBBF24;
  --accent-subtle: rgba(245, 158, 11, 0.1);
  --accent-glow: rgba(245, 158, 11, 0.18);
  --border-list: #232328;

  --code-bg: #0d0d12;
  --code-text: #cdd6f4;
  --scroll-progress: #F59E0B;
  --header-bg: rgba(17,17,19,0.88);

  /* Terminal dots */
  --dot-red: #ff5f57;
  --dot-yellow: #febc2e;
  --dot-green: #28c840;

  /* Signature features variables (dark) */
  --bg-secondary: #161619;
  --bg-tertiary: #1f1f24;
  --text-primary: #e8e6e3;
  --text-secondary: #8a8a85;
  --text-tertiary: #5a5a55;
  --text-quaternary: #3a3a3f;
  --border-color: #232328;
}

/* Prism.js theme toggle */
#prism-dark { display: none; }
#prism-light { display: initial; }
[data-theme="dark"] #prism-light { display: none; }
[data-theme="dark"] #prism-dark { display: initial; }

/* --------------------------------------------------------------------------
   2. Reset & Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  /* Custom scrollbar — thin, minimal */
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.15) transparent;
}

/* Webkit scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.15);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0,0,0,0.25);
}
[data-theme="dark"] {
  scrollbar-color: rgba(255,255,255,0.12) transparent;
}
[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.12);
}
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.2);
}

/* Text selection */
::selection {
  background: rgba(217,119,6,0.15);
  color: var(--text-title);
}
[data-theme="dark"] ::selection {
  background: rgba(245,158,11,0.2);
}

body {
  font-family: var(--font-sans);
  line-height: 1.6;
  color: var(--text-title);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

/* --------------------------------------------------------------------------
   3. Accessibility
   -------------------------------------------------------------------------- */
.skip-nav {
  position: absolute;
  top: -100%;
  left: 0;
  z-index: 9999;
  padding: 0.75rem 1.5rem;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  border-radius: 0 0 var(--radius-btn) 0;
}

.skip-nav:focus {
  top: 0;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   4. Scroll Progress Bar
   -------------------------------------------------------------------------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  z-index: 1001;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px rgba(217, 119, 6, 0.3);
}

/* --------------------------------------------------------------------------
   5. Header (60px, clean, no border)
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  background: var(--header-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: background-color var(--transition), border-color 0.3s ease;
}

.site-header.scrolled {
  border-bottom-color: var(--border-list);
}

.header-inner {
  width: 100%;
  max-width: var(--layout-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 24px;
}

.site-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-title);
  letter-spacing: -0.02em;
  white-space: nowrap;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.site-title::before {
  content: '>_';
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  margin-right: 8px;
  letter-spacing: -0.02em;
  opacity: 0.9;
}

/* Terminal cursor blink on header */
.site-title::after {
  content: '';
  display: inline-block;
  width: 1.5px;
  height: 16px;
  background: var(--accent);
  margin-left: 3px;
  vertical-align: middle;
  animation: cursor-blink 1.2s step-end infinite;
  border-radius: 1px;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.site-title:hover {
  color: var(--text-title);
}

/* Header Nav — Category dropdown navigation */
.header-nav {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
  justify-content: center;
}

/* Home link */
.nav-home {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-body);
  padding: 8px 14px;
  border-radius: var(--radius-btn);
  transition: color var(--transition), background-color var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.nav-home:hover {
  color: var(--text-title);
  background: var(--bg-secondary);
}

/* Category navigation container */
.nav-categories {
  display: flex;
  align-items: center;
  gap: 0;
  position: relative;
}

/* Hide all images (N icon, etc.) */
.nav-categories img {
  display: none !important;
}

/* ── "분류 전체보기" 완전 숨김 ──
   Tistory [##_category_list_##] outputs:
     ul > li > a["분류 전체보기 (N)"]
          > li > ul  ← 실제 대분류 목록
   display:contents makes the wrapper ul/li invisible in layout
   while promoting children. The top-level <a> is hidden. */
.nav-categories > ul {
  display: contents;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-categories > ul > li {
  display: contents;
}

/* "분류 전체보기" link — force hidden */
.nav-categories > ul > li > a {
  display: none !important;
  visibility: hidden;
  width: 0;
  height: 0;
  overflow: hidden;
  position: absolute;
  pointer-events: none;
}

/* Tistory class-based hiding (fallback) */
.nav-categories .link_tit {
  display: none !important;
}

/* ── 1st-level: 대분류 가로 배치 ── */
.nav-categories > ul > li > ul {
  display: flex;
  list-style: none;
  gap: 2px;
  padding: 0;
  margin: 0;
  align-items: center;
}

/* Each major category item */
.nav-categories > ul > li > ul > li {
  position: relative;
}

/* 대분류 링크 스타일 */
.nav-categories > ul > li > ul > li > a {
  display: flex;
  align-items: center;
  padding: 6px 14px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-body);
  text-decoration: none;
  border-radius: 6px;
  transition: color 0.2s ease, background-color 0.2s ease;
  white-space: nowrap;
  letter-spacing: -0.01em;
  position: relative;
}

/* Hover: 대분류 */
.nav-categories > ul > li > ul > li > a:hover,
.nav-categories > ul > li > ul > li:hover > a {
  color: var(--text-title);
  background: var(--accent-subtle);
}

/* Active indicator underline on hover */
.nav-categories > ul > li > ul > li > a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  transition: width 0.25s ease, left 0.25s ease;
}

.nav-categories > ul > li > ul > li:hover > a::after {
  width: 60%;
  left: 20%;
}

/* ── Hide original subcategory lists (moved to mega panel by JS) ── */
.nav-categories > ul > li > ul > li > ul {
  display: none !important;
}

/* ── Mega Panel ── */
.nav-mega-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  min-width: 520px;
  max-width: 720px;
  background: var(--bg-primary);
  border: 1px solid var(--border-list);
  border-radius: 14px;
  padding: 20px 28px;
  z-index: 1100;
  box-shadow: 0 8px 32px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

[data-theme="dark"] .nav-mega-panel {
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 2px 8px rgba(0,0,0,0.2);
}

/* Show mega panel when hovering the nav-categories area */
.nav-categories:hover .nav-mega-panel {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* 3-column grid inside mega panel */
.nav-mega-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px 28px;
}

/* Each category column */
.nav-mega-col {
  min-width: 0;
}

/* Major category heading */
.nav-mega-col-title {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-title);
  text-decoration: none;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border-list);
  transition: color 0.15s ease;
}

.nav-mega-col-title:hover {
  color: var(--accent);
}

/* Subcategory list */
.nav-mega-col-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Subcategory item */
.nav-mega-col-list li a {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-body);
  text-decoration: none;
  padding: 3px 0;
  transition: color 0.15s ease;
}

.nav-mega-col-list li a:hover {
  color: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Search */
.search-wrap {
  position: relative;
}

.search-wrap form {
  display: flex;
  align-items: center;
}

.search-input {
  width: 0;
  padding: 0;
  font-size: 14px;
  font-family: var(--font-sans);
  background: transparent;
  color: var(--text-title);
  border: none;
  outline: none;
  transition: width 0.3s ease, padding 0.3s ease;
}

.search-wrap:focus-within .search-input {
  width: 160px;
  padding: 6px 10px;
  background: var(--bg-card);
  border-radius: var(--radius-btn);
}

.search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  color: var(--text-body);
  cursor: pointer;
  border-radius: var(--radius-btn);
  transition: color var(--transition), background-color var(--transition);
}

.search-btn:hover {
  color: var(--text-title);
  background: var(--bg-card);
}

/* Theme Toggle — iOS-style pill track */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 52px;
  height: 28px;
  padding: 0 7px;
  background: var(--bg-card);
  border: 1px solid var(--border-list);
  border-radius: 14px;
  cursor: pointer;
  position: relative;
  transition: background-color var(--transition), border-color var(--transition);
}

.theme-toggle:hover {
  border-color: var(--text-meta-light);
}

/* Show both icons always, small and muted */
.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  display: block !important;
  width: 14px;
  height: 14px;
  position: relative;
  z-index: 1;
  opacity: 0.4;
  transition: opacity 0.3s ease;
  flex-shrink: 0;
}

[data-theme="light"] .theme-toggle .icon-sun { opacity: 1; color: #f59e0b; }
[data-theme="dark"] .theme-toggle .icon-moon { opacity: 1; color: #a5b4fc; }

/* Sliding thumb */
.theme-toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] .theme-toggle::after {
  transform: translateX(24px);
  background: #2d2d3a;
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

/* Mobile Search Toggle (visible only on mobile) */
.mobile-search-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  color: var(--text-body);
  cursor: pointer;
  border-radius: var(--radius-btn);
  transition: color var(--transition);
}

.mobile-search-toggle:hover {
  color: var(--text-title);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  color: var(--text-body);
  cursor: pointer;
  border-radius: var(--radius-btn);
}

/* --------------------------------------------------------------------------
   6. Layout (Toss: 1024px max, flex, gap 72px)
   -------------------------------------------------------------------------- */
.layout {
  max-width: var(--layout-max);
  margin: 0 auto;
  padding: 36px 28px;
  display: flex;
  gap: var(--layout-gap);
  position: relative;
}

.main-content {
  flex: 1;
  min-width: 0;
}

/* --------------------------------------------------------------------------
   7. Sidebar (300px fixed, Toss style)
   -------------------------------------------------------------------------- */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: calc(var(--header-height) + 24px);
  align-self: flex-start;
}

.sidebar-card {
  background: transparent;
  border-radius: 0;
  padding-bottom: 16px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--border-list);
}

.sidebar-card-title {
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-meta);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
  padding-bottom: 0;
  border-bottom: none;
}

.sidebar-card-title::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
  opacity: 0.7;
}

/* Profile — clean, no background */
.sidebar-profile {
  text-align: left;
  padding: 0;
  padding-bottom: 16px;
  background: none;
  border-radius: 0;
}

/* Remove trailing margin from last child inside each card to prevent collapse */
.sidebar-card > *:last-child {
  margin-bottom: 0;
}

/* Last sidebar-card should not have border */
.sidebar-card:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.profile-link {
  display: flex;
  align-items: center;
  flex-direction: row;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.profile-link:hover .profile-name {
  color: var(--text-title);
}

.profile-image {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px var(--bg-primary), 0 0 0 3px var(--border-list);
  transition: box-shadow 0.3s ease;
}

.profile-link:hover .profile-image {
  box-shadow: 0 0 0 2px var(--bg-primary), 0 0 0 3px var(--accent);
}

.profile-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-title);
  letter-spacing: -0.01em;
  margin: 0;
}

.profile-desc {
  font-size: 13px;
  color: var(--text-body);
  line-height: 1.7;
  margin-top: 10px;
  white-space: pre-line;
}

/* Categories — hierarchical display */
.sidebar-categories ul {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Top-level category list (tt_category) */
.sidebar-categories > ul,
.sidebar-categories .tt_category {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* All category links base style */
.sidebar-categories li a,
.sidebar-categories .link_item {
  display: block;
  font-size: 14px;
  color: var(--text-body);
  padding: 6px 8px;
  border-radius: 8px;
  transition: color var(--transition), background-color var(--transition);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-categories li a:hover,
.sidebar-categories .link_item:hover {
  color: var(--text-title);
  background: rgba(0,0,0,0.04);
}

[data-theme="dark"] .sidebar-categories li a:hover,
[data-theme="dark"] .sidebar-categories .link_item:hover {
  background: rgba(255,255,255,0.06);
}

/* Top-level (parent) categories — prominent but refined */
.sidebar-categories > ul > li > a,
.sidebar-categories .tt_category > li > a,
.sidebar-categories .link_tit {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-title);
  padding: 8px 8px;
  border-left: 2px solid transparent;
  transition: color var(--transition), background-color var(--transition), border-color var(--transition);
}

.sidebar-categories > ul > li > a:hover,
.sidebar-categories .tt_category > li > a:hover,
.sidebar-categories .link_tit:hover {
  border-left-color: var(--accent);
}

/* Sub-category list — indent only (no tree lines) */
.sidebar-categories ul ul,
.sidebar-categories .sub_category_list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-left: 0;
  padding-left: 16px;
}

/* Sub-category items — lighter, smaller, with accent dot */
.sidebar-categories ul ul li a,
.sidebar-categories .link_sub_item,
.sidebar-categories .sub_category_list a {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-meta);
  padding: 4px 8px;
  display: flex;
  align-items: center;
}

.sidebar-categories ul ul li a::before,
.sidebar-categories .link_sub_item::before,
.sidebar-categories .sub_category_list a::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 8px;
  flex-shrink: 0;
  opacity: 0.5;
  transition: opacity var(--transition);
}

.sidebar-categories ul ul li a:hover::before,
.sidebar-categories .link_sub_item:hover::before,
.sidebar-categories .sub_category_list a:hover::before {
  opacity: 1;
}

/* Third-level nesting */
.sidebar-categories ul ul ul {
  margin-left: 0;
  padding-left: 12px;
}

.sidebar-categories ul ul ul li a {
  font-size: 12px;
  color: var(--text-meta-light);
  padding: 3px 8px;
}

.sidebar-categories ul ul ul li a::before {
  width: 3px;
  height: 3px;
  opacity: 0.35;
}

/* Post count badge */
.sidebar-categories .c_cnt {
  font-size: 11px;
  color: var(--text-meta-light);
  opacity: 0.6;
  margin-left: 4px;
  font-weight: 400;
}

/* Stats — clean without card background */
.sidebar-stats {
  padding-top: 0;
}

.stats-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stats-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stats-label {
  font-size: 13px;
  color: var(--text-body);
}

.stats-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  opacity: 0.85;
}

/* Sidebar Links */
.sidebar-links {
  display: flex;
  gap: 12px;
  padding: 0 4px;
}

.sidebar-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-meta-light);
  transition: color var(--transition);
}

.sidebar-link:hover {
  color: var(--text-title);
}

/* --------------------------------------------------------------------------
   8. Article List Items (text left + thumbnail right)
   -------------------------------------------------------------------------- */
.article-item {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  padding: 24px 16px;
  margin: 0 -16px;
  border-radius: 10px;
  transition: background-color var(--transition), box-shadow var(--transition);
  position: relative;
  border-left: 2px solid transparent;
  cursor: pointer;
}

.article-item:hover {
  background: var(--accent-subtle);
  border-left-color: var(--accent);
}

[data-theme="dark"] .article-item:hover {
  background: var(--accent-subtle);
  border-left-color: var(--accent);
}

.article-item:first-child {
  padding-top: 20px;
}

.article-item + .article-item {
  border-top: 1px solid rgba(0,0,0,0.08);
}

[data-theme="dark"] .article-item + .article-item {
  border-top-color: rgba(255,255,255,0.08);
}

.article-text {
  flex: 1;
  min-width: 0;
}

.article-category {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--accent);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  opacity: 0.75;
  transition: opacity var(--transition);
}

.article-item:hover .article-category {
  opacity: 1;
}

.article-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.4;
  color: var(--text-title);
  margin-bottom: 4px;
}

.article-title a:hover {
  color: var(--text-title);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--text-title) 35%, transparent);
  text-underline-offset: 3px;
}

.article-desc {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-meta);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
}

.article-date {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-meta-light);
  font-family: var(--font-mono);
  letter-spacing: 0.01em;
}

.article-thumb {
  flex-shrink: 0;
  display: block;
  overflow: hidden;
  border-radius: 8px;
}

.article-thumb img {
  width: 148px;
  height: 96px;
  object-fit: cover;
  border-radius: 10px;
  transition: transform 0.3s ease, opacity var(--transition);
}

.article-thumb:hover img {
  transform: scale(1.03);
  opacity: 1;
}

/* All articles uniform — no editorial differentiation */

/* --------------------------------------------------------------------------
   9. List Container (Category / Search / Tag pages)
   -------------------------------------------------------------------------- */

/* Prevent duplicate content:
   - On home page: hide s_list (show s_article_rep thumbnails)
   - On category/tag/search: hide s_article_rep (show s_list)
   - On guestbook: hide both article sections */
#tt-body-index .list-container,
#tt-body-index .list-header {
  display: none;
}

#tt-body-category .article-item,
#tt-body-tag .article-item,
#tt-body-search .article-item {
  display: none;
}

/* Ensure s_list items show as article-items on category pages */
#tt-body-category .list-container .article-item,
#tt-body-tag .list-container .article-item,
#tt-body-search .list-container .article-item {
  display: flex;
}

.list-container .article-item {
  padding: 20px 0;
}

.list-container .article-item:first-child {
  padding-top: 0;
}

.list-container .article-item + .article-item {
  border-top: 1px solid rgba(0,0,0,0.08);
}

[data-theme="dark"] .list-container .article-item + .article-item {
  border-top-color: rgba(255,255,255,0.08);
}

.list-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 24px;
}

.section-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-section);
  line-height: 1.3;
}

/* Terminal prompt on sub-page titles */
#tt-body-category .list-header .section-title::before {
  content: '$ ls ';
  font-family: var(--font-mono);
  font-size: 0.65em;
  font-weight: 500;
  color: var(--accent);
  opacity: 0.7;
}

#tt-body-tag .tag-cloud-container .section-title::before {
  content: '$ grep -r ';
  font-family: var(--font-mono);
  font-size: 0.65em;
  font-weight: 500;
  color: var(--accent);
  opacity: 0.7;
}

#tt-body-search .list-header .section-title::before {
  content: '$ find ';
  font-family: var(--font-mono);
  font-size: 0.65em;
  font-weight: 500;
  color: var(--accent);
  opacity: 0.7;
}

#tt-body-guestbook .guestbook .section-title::before {
  content: '$ echo ';
  font-family: var(--font-mono);
  font-size: 0.65em;
  font-weight: 500;
  color: var(--accent);
  opacity: 0.7;
}

.list-count {
  font-size: 14px;
  color: var(--text-meta-light);
}

/* --------------------------------------------------------------------------
   10. Pagination
   -------------------------------------------------------------------------- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
  padding: 16px 0;
}

.page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-body);
  border-radius: 8px;
  transition: color var(--transition), background-color var(--transition);
}

.page-link:hover {
  color: var(--text-title);
  background: var(--bg-card);
}

.page-link.selected {
  color: #fff;
  background: var(--accent);
  font-weight: 700;
}

[data-theme="dark"] .page-link.selected {
  color: #1a1a1a;
}


/* --------------------------------------------------------------------------
   19. Back to Top
   -------------------------------------------------------------------------- */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--bg-card);
  color: var(--text-body);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: opacity var(--transition), visibility var(--transition), background-color var(--transition), color var(--transition), box-shadow var(--transition);
  z-index: 100;
}

[data-theme="dark"] .back-to-top {
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
}

.back-to-top:hover .progress-ring-circle {
  stroke: #fff;
}

/* Progress ring around back-to-top button */
.progress-ring {
  position: absolute;
  top: 0;
  left: 0;
  transform: rotate(-90deg);
  pointer-events: none;
}

.progress-ring-circle {
  stroke-dasharray: 125.66;
  stroke-dashoffset: 125.66;
  transition: stroke-dashoffset 0.15s linear, stroke 0.2s ease;
}

.back-to-top-icon {
  position: relative;
  z-index: 1;
}

/* --------------------------------------------------------------------------
   20. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  margin-top: 64px;
  padding: 32px 24px;
  text-align: center;
  border-top: none;
}

.site-footer::before {
  content: '';
  display: block;
  width: 32px;
  height: 2px;
  background: var(--accent);
  opacity: 0.3;
  margin: 0 auto 32px;
  border-radius: 1px;
}

.footer-inner {
  max-width: var(--layout-max);
  margin: 0 auto;
}

.footer-inner p {
  font-size: 13px;
  color: var(--text-meta-light);
  line-height: 1.8;
}

.footer-inner a {
  color: var(--text-body);
}

.footer-inner a:hover {
  color: var(--text-title);
}

.footer-inner p + p {
  letter-spacing: 0.02em;
}

/* --------------------------------------------------------------------------
   21. Sidebar Overlay (Mobile)
   -------------------------------------------------------------------------- */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 998;
}

.sidebar-overlay.active {
  display: block;
}

/* --------------------------------------------------------------------------
   22. Responsive
   -------------------------------------------------------------------------- */

/* Wide desktop: TOC as fixed sidebar */
@media (min-width: 1441px) {
  #tt-body-page .toc.active {
    position: fixed;
    top: calc(var(--header-height) + 48px);
    right: calc((100vw - var(--post-max)) / 2 - 260px);
    width: 220px;
    padding: 0;
    background: transparent;
    border-radius: 0;
    margin-bottom: 0;
  }

  #tt-body-page .toc.active .toc-list {
    opacity: 0.7;
    transition: opacity 0.25s ease;
  }

  #tt-body-page .toc.active:hover .toc-list {
    opacity: 1;
  }
}

/* Tablet: stack layout */
@media (max-width: 960px) {
  .layout {
    flex-direction: column;
    gap: 32px;
    padding: 24px 20px;
  }

  .sidebar {
    width: 100%;
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
  }

  .sidebar-card {
    flex: 1;
    min-width: 200px;
  }

  .sidebar-profile {
    flex: 1 1 100%;
  }

  /* On tablet, add subtle borders back for sidebar separation */
  .sidebar-card + .sidebar-card {
    border-top: 1px solid var(--bg-card);
    padding-top: 16px;
  }

  .header-nav {
    display: none;
  }
}

/* Mobile */
@media (max-width: 768px) {
  :root {
    --header-height: 56px;
  }

  .site-header {
    padding: 0 16px;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .mobile-search-toggle {
    display: flex;
  }

  .search-wrap {
    display: none;
  }

  .layout {
    padding: 24px 16px;
  }

  /* Mobile sidebar: slide-in drawer */
  .sidebar {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100vh;
    height: 100dvh;
    background: var(--bg-primary);
    z-index: 999;
    padding: 24px 20px;
    gap: 16px;
    overflow-y: auto;
    transition: right 0.3s ease;
  }

  .sidebar.open {
    right: 0;
  }

  .sidebar-card {
    min-width: 0;
  }

  /* Mobile: restore padding for sidebar cards inside drawer */
  .sidebar-card + .sidebar-card {
    border-top: 1px solid var(--bg-card);
    padding-top: 16px;
  }

  /* Post detail responsive */
  .post-title {
    font-size: 26px;
    line-height: 1.35;
  }

  .post-meta {
    gap: 8px;
  }

  .post-author {
    font-size: 15px;
  }

  /* Article items: stack on mobile */
  .article-item {
    flex-direction: column-reverse;
    gap: 12px;
    padding: 18px 0;
  }

  .article-thumb img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .article-title {
    font-size: 17px;
    line-height: 1.4;
  }

  .article-desc {
    font-size: 14px;
    line-height: 1.6;
  }

  /* Post nav: single column */
  .post-nav {
    grid-template-columns: 1fr;
  }

  .post-nav-next {
    text-align: left;
  }

  /* Pagination */
  .pagination {
    margin-top: 32px;
  }

  .section-title {
    font-size: 24px;
  }

  /* TOC inline (mobile, inside post) */
  #tt-body-page .toc.active {
    display: block;
    position: static;
    width: 100%;
    margin-bottom: 32px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: 12px;
  }

  #tt-body-page .toc.active .toc-title {
    cursor: pointer;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .layout {
    padding: 16px 12px;
  }

  .post-title {
    font-size: 24px;
    line-height: 1.3;
  }

  .post-content {
    font-size: 16px;
    line-height: 1.8;
  }

  .post-content h2 {
    font-size: 22px;
    margin-top: 44px;
  }

  .post-content h3 {
    font-size: 19px;
    margin-top: 32px;
  }

  .post-content h4 {
    font-size: 17px;
    margin-top: 24px;
  }

  .post-content pre {
    padding: 16px;
    margin: 24px -12px;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .post-content blockquote {
    padding: 16px 20px;
  }

  .post-content hr {
    margin: 40px auto;
  }
}

/* --------------------------------------------------------------------------
   23. Tistory Override (blog_menu, category_list compatibility)
   -------------------------------------------------------------------------- */

/* Tistory category_list compatibility in header nav */
.nav-categories .link_tit {
  display: none !important;
}

/* Tistory category list in sidebar — hierarchical */
.sidebar-categories .tt_category {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Tistory "N" badge (new posts indicator) */
.sidebar-categories img[alt="N"],
.sidebar-categories .c_new {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 4px;
  vertical-align: middle;
}

/* Tistory comment area styling for all pages */
.tt_comment_area {
  margin-top: 48px;
  font-family: var(--font-sans);
}

.tt_comment_area .tt-comment-cont {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-body);
}

/* Tistory 접힌글 (folded text) */
.post-content .tt_block_tit,
.post-content .btn-toggle-moreless {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  padding: 8px 16px;
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  border-radius: 8px;
  transition: background-color var(--transition);
}

.post-content .tt_block_tit:hover,
.post-content .btn-toggle-moreless:hover {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.post-content .moreless-content {
  padding: 20px;
  background: var(--bg-card);
  border-radius: 8px;
  border-left: 3px solid var(--text-meta-light);
  margin: 8px 0 28px;
}

/* 게시글 내 프로필 카드 */
.post-author-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-card);
  border-radius: 10px;
  border: 1px solid var(--border-list);
  margin-bottom: 32px;
}

.post-author-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.post-author-link:hover .post-author-name {
  color: var(--text-title);
}

.post-author-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.post-author-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-title);
}

.post-author-desc {
  font-size: 12px;
  color: var(--text-meta);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.desc-sep {
  margin: 0 8px;
  color: var(--text-meta);
  opacity: 0.4;
  font-weight: 300;
}

.desc-link {
  color: var(--text-body);
  text-decoration: underline;
  text-decoration-color: var(--text-meta);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.15s;
}

.desc-link:hover {
  text-decoration-color: var(--text-body);
}

/* --------------------------------------------------------------------------
   24. Tag Cloud Page
   -------------------------------------------------------------------------- */
.tag_cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.tag_cloud a,
.tag_cloud li a {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-body);
  padding: 8px 16px;
  background: var(--bg-card);
  border-radius: 20px;
  transition: color var(--transition), background-color var(--transition);
  text-decoration: none;
  line-height: 1.4;
}

.tag_cloud a:hover,
.tag_cloud li a:hover {
  color: var(--text-title);
  background: rgba(0,0,0,0.06);
}

[data-theme="dark"] .tag_cloud a:hover,
[data-theme="dark"] .tag_cloud li a:hover {
  background: rgba(255,255,255,0.08);
}

/* Override Tistory inline font-size on tag cloud items for consistency */
.tag_cloud a[style],
.tag_cloud li a[style] {
  font-size: 14px !important;
}

/* --------------------------------------------------------------------------
   25. Tistory Comment Area (comprehensive styling)
   -------------------------------------------------------------------------- */
.tt_comment_area .tt-box-textarea,
.tt_comment_area textarea {
  width: 100%;
  min-height: 100px;
  padding: 16px;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-title);
  background: var(--bg-card);
  border: 1px solid transparent;
  border-radius: var(--radius-btn);
  resize: vertical;
  transition: border-color var(--transition), background-color var(--transition);
}

.tt_comment_area .tt-box-textarea:focus,
.tt_comment_area textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-primary);
}

.tt_comment_area input[type="text"],
.tt_comment_area input[type="password"] {
  padding: 10px 14px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-title);
  background: var(--bg-card);
  border: 1px solid transparent;
  border-radius: var(--radius-btn);
  transition: border-color var(--transition), background-color var(--transition);
}

.tt_comment_area input[type="text"]:focus,
.tt_comment_area input[type="password"]:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-primary);
}

.tt_comment_area .tt-btn-submit,
.tt_comment_area .tt-btn_register,
.tt_comment_area button[type="submit"],
.tt_comment_area .tt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: background-color var(--transition);
}

.tt_comment_area .tt-btn-submit:hover,
.tt_comment_area .tt-btn_register:hover,
.tt_comment_area button[type="submit"]:hover,
.tt_comment_area .tt-btn:hover {
  background: var(--accent-hover);
}

/* Comment list items */
.tt_comment_area .tt-comment-cont {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-body);
}

.tt_comment_area .tt-comment-writer,
.tt_comment_area .tt-nickname {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-title);
}

.tt_comment_area .tt-comment-date,
.tt_comment_area .tt-date {
  font-size: 12px;
  color: var(--text-meta-light);
}

.tt_comment_area .tt-comment-reply-btn,
.tt_comment_area .tt-wrap-btn a {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-meta);
  transition: color var(--transition);
}

.tt_comment_area .tt-comment-reply-btn:hover,
.tt_comment_area .tt-wrap-btn a:hover {
  color: var(--text-title);
}

/* Comment separator lines */
.tt_comment_area .tt-comment-item,
.tt_comment_area li {
  padding: 20px 0;
  border-bottom: 1px solid var(--bg-card);
}

.tt_comment_area .tt-comment-item:last-child,
.tt_comment_area li:last-child {
  border-bottom: none;
}

/* --------------------------------------------------------------------------
   26. Tistory another_category (Related posts by category widget)
   -------------------------------------------------------------------------- */
.another_category {
  margin-top: 48px;
}

.another_category table {
  width: 100%;
  border-collapse: collapse;
  border: none;
  background: transparent;
}

.another_category h4,
.another_category .tit_category {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-title);
  padding: 0 0 16px 0;
  margin: 0;
  border: none;
  background: transparent;
}

/* Category title links (e.g. "인프라 > KVM") must stay inline */
.another_category h4 a,
.another_category .tit_category a {
  display: inline;
  padding: 0;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}

.another_category th,
.another_category td {
  padding: 8px 0;
  border: none;
  background: transparent;
  font-weight: normal;
}

.another_category a {
  display: block;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-body);
  padding: 8px 0;
  text-decoration: none;
  transition: color var(--transition);
}

/* Post list: title link + comment count on same line */
.another_category th a,
.another_category td a {
  display: inline;
  padding: 0;
}

.another_category th span,
.another_category td span {
  font-size: 13px;
  color: var(--text-meta-light);
}

.another_category a:hover {
  color: var(--text-title);
}

/* Currently viewing article highlight */
.another_category .on a,
.another_category a.on {
  font-weight: 600;
  color: var(--text-title);
}

/* Remove all Tistory default grey borders and backgrounds */
.another_category,
.another_category table,
.another_category th,
.another_category td,
.another_category tr {
  border: none !important;
  background: transparent !important;
}

/* --------------------------------------------------------------------------
   27. Tistory Namecard Widget (글쓴이 정보) — 푸터에 이미 프로필 있으므로 숨김
   -------------------------------------------------------------------------- */
.post-detail [data-tistory-react-app="Namecard"] {
  display: none !important;
}

/* --------------------------------------------------------------------------
   28. Tistory Protected Post (password page)
   -------------------------------------------------------------------------- */
.tt-body-protect .main-content {
  min-height: 300px;
}

.tt-body-protect input[type="password"] {
  padding: 10px 14px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-title);
  background: var(--bg-card);
  border: 1px solid transparent;
  border-radius: var(--radius-btn);
  transition: border-color var(--transition);
}

.tt-body-protect input[type="password"]:focus {
  outline: none;
  border-color: var(--accent);
}

/* --------------------------------------------------------------------------
   28. Tistory Admin Toolbar Override
   -------------------------------------------------------------------------- */
#tistorytoolbar,
.tistory_toolbar,
.tt-toolbar {
  font-family: var(--font-sans);
}

/* --------------------------------------------------------------------------
   29. Global link color consistency
   -------------------------------------------------------------------------- */
.main-content a:not(.article-title a):not(.post-nav-item):not(.tag-item):not(.post-category):not(.page-link) {
  transition: color var(--transition);
}

/* Ensure consistent border colors across all pages */
.article-item + .article-item,
.list-container .article-item + .article-item {
  border-top-color: rgba(0,0,0,0.05);
}

[data-theme="dark"] .article-item + .article-item,
[data-theme="dark"] .list-container .article-item + .article-item {
  border-top-color: rgba(255,255,255,0.05);
}

/* --------------------------------------------------------------------------
   30. Tag Cloud Container (skin HTML s_tag)
   -------------------------------------------------------------------------- */

/* Hide article list on tag cloud page (tt-body-tag already hides .article-item,
   but also hide the s_article_rep wrapper so no blank space remains) */
#tt-body-tag .post-detail,
#tt-body-guestbook .post-detail,
#tt-body-guestbook .article-item,
#tt-body-guestbook .list-container {
  display: none;
}

.tag-cloud-container {
  padding: 0;
  display: block !important;
}

.tag-cloud-container .section-title {
  margin-bottom: 24px;
  font-size: 24px;
}

.tag-cloud-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-cloud-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-body);
  padding: 8px 16px;
  background: var(--bg-card);
  border-radius: 20px;
  transition: color var(--transition), background-color var(--transition), transform var(--transition);
}

.tag-cloud-item:hover {
  color: var(--text-title);
  background: rgba(0,0,0,0.06);
  transform: translateY(-1px);
}

[data-theme="dark"] .tag-cloud-item:hover {
  background: rgba(255,255,255,0.08);
}

.tag-cloud-name {
  white-space: nowrap;
}

.tag-cloud-name::before {
  content: '#';
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 600;
  margin-right: 2px;
  opacity: 0.7;
}

.tag-cloud-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-meta);
  background: rgba(0,0,0,0.05);
  padding: 2px 7px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

[data-theme="dark"] .tag-cloud-count {
  background: rgba(255,255,255,0.08);
}

/* --------------------------------------------------------------------------
   31. Tistory Action Buttons (공감/공유/구독)
   -------------------------------------------------------------------------- */
.container_postbtn {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--bg-card);
}

.container_postbtn .btn_post,
.container_postbtn button {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-body);
  background: var(--bg-card);
  border: none;
  border-radius: var(--radius-btn);
  padding: 8px 16px;
  cursor: pointer;
  transition: color var(--transition), background-color var(--transition);
}

.container_postbtn .btn_post:hover,
.container_postbtn button:hover {
  color: var(--text-title);
  background: rgba(0,0,0,0.06);
}

[data-theme="dark"] .container_postbtn .btn_post:hover,
[data-theme="dark"] .container_postbtn button:hover {
  background: rgba(255,255,255,0.08);
}

/* Tistory like button */
.container_postbtn .btn_like,
.container_postbtn .like_on {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Tistory subscribe button in post */
.container_postbtn .btn_subscription {
  font-weight: 700;
  color: var(--text-title);
}

/* --------------------------------------------------------------------------
   32. Tistory Link Card (og embed preview)
   -------------------------------------------------------------------------- */
.post-content figure.og-card,
.post-content .tt_article_useless_p_tag figure {
  margin: 28px 0;
}

.post-content figure a[data-url] {
  display: flex;
  flex-direction: column;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-list);
  border-radius: 10px;
  transition: background-color var(--transition), box-shadow var(--transition);
  text-decoration: none;
}

.post-content figure a[data-url]:hover {
  background: rgba(0,0,0,0.02);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  text-decoration: none;
}

[data-theme="dark"] .post-content figure a[data-url]:hover {
  background: rgba(255,255,255,0.04);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* OG card internal text styling */
.post-content figure a[data-url] p:first-child {
  font-weight: 600;
  color: var(--text-title);
  font-size: 15px;
  margin-bottom: 4px;
}

.post-content figure a[data-url] p:nth-child(2) {
  font-size: 14px;
  color: var(--text-body);
  margin-bottom: 4px;
}

.post-content figure a[data-url] p:last-child {
  font-size: 12px;
  color: var(--text-meta-light);
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   33. Empty state for tag/guestbook pages
   -------------------------------------------------------------------------- */
#tt-body-tag .tag-cloud-list:empty::after {
  content: '태그가 아직 없습니다.';
  display: block;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-meta-light);
  padding: 40px 0;
  text-align: center;
}

#tt-body-guestbook .guestbook .tt_comment_area:empty::after,
#tt-body-guestbook .guestbook .tt-comment-area:empty::after {
  content: '아직 방명록이 없습니다. 첫 번째 메시지를 남겨주세요!';
  display: block;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-meta-light);
  padding: 40px 0;
  text-align: center;
}

