/* ============================================================
   blog.css — Blog Home (Dark + Emerald, Figma-inspired layout)
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0 }
html { line-height: 1.15; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

/* ── 1. Custom Properties ─────────────────────────────────── */
:root {
  --bg-dark:       #0a0a0a;
  --bg-surface:    #111111;
  --bg-hover:      #181818;
  --text-main:     #f3f4f6;
  --text-muted:    #9ca3af;
  --text-faint:    #4b5563;
  --accent:        #34d399;
  --accent-dim:    rgba(52, 211, 153, 0.10);
  --accent-border: rgba(52, 211, 153, 0.25);
  --border:        #27272a;
  --border-hover:  #3f3f46;
  --ease-out:      cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── 1b. Light Theme Override ────────────────────────────── */
[data-theme="light"] {
  --bg-dark:       #f8f9fa;
  --bg-surface:    #ffffff;
  --bg-hover:      #f1f3f5;
  --text-main:     #111111;
  --text-muted:    #4b5563;
  --text-faint:    #9ca3af;
  --accent:        #059669;
  --accent-dim:    rgba(5, 150, 105, 0.08);
  --accent-border: rgba(5, 150, 105, 0.22);
  --border:        #e5e7eb;
  --border-hover:  #d1d5db;
}

[data-theme="light"] body { background-color: var(--bg-dark); color: var(--text-main); }
[data-theme="light"] .blog-nav {
  background: rgba(248, 249, 250, 0.92);
  border-color: var(--border);
}

/* ── Light: Hero ── */
[data-theme="light"] .hero { background: var(--bg-surface); }
[data-theme="light"] .hero:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .hero-placeholder {
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 30%, #d1e7dd 60%, #e2e8f0 100%);
}
[data-theme="light"] .hero-placeholder::after {
  background:
    radial-gradient(ellipse 600px 300px at 30% 40%, rgba(5, 150, 105, 0.10) 0%, transparent 70%),
    radial-gradient(ellipse 400px 250px at 70% 60%, rgba(5, 150, 105, 0.08) 0%, transparent 70%);
}
[data-theme="light"] .hero-overlay {
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.6) 50%, var(--bg-surface) 100%);
}

/* ── Light: Cards ── */
[data-theme="light"] .post-card:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .post-card-placeholder {
  background: linear-gradient(135deg, #e2e8f0 0%, #d1d5db 50%, #d1e7dd 100%);
}
[data-theme="light"] .post-card-placeholder::after {
  background: radial-gradient(circle at 50% 50%, rgba(5, 150, 105, 0.08) 0%, transparent 70%);
}

/* ── Light: Magazine Cards ── */
[data-theme="light"] .mag-featured:hover,
[data-theme="light"] .mag-side-card:hover,
[data-theme="light"] .mag-bottom-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

/* ── 2. Base ─────────────────────────────────────────────── */
body {
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, 'Noto Sans KR', sans-serif;
  background: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  word-break: keep-all;
}

a { color: inherit; text-decoration: none; }
li { list-style: none; }
button { font-family: inherit; }

/* ── 3. Top Navigation Bar ───────────────────────────────── */
.blog-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  height: 60px;
  background: rgba(10, 10, 10, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.blog-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.blog-nav-brand .brand-accent {
  color: var(--accent);
}

.blog-nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.blog-nav-links a {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  transition: color 0.2s;
}

.blog-nav-links a:hover { color: var(--accent); }

.blog-nav-cta {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--bg-dark) !important;
  background: var(--accent);
  padding: 7px 18px;
  border-radius: 8px;
  transition: opacity 0.2s;
}

.blog-nav-cta:hover { opacity: 0.85; }

/* ── 4. Container ────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px;
}

/* ── 4b. Three-Column Layout ────────────────────────────── */
.layout-wrap {
  display: grid;
  grid-template-columns: 220px 1fr 260px;
  gap: 32px;
  max-width: 1360px;
  margin: 0 auto;
  padding: 32px 48px 0;
}

.content-center { min-width: 0; }

/* ── Sidebar Shared ─────────────────────────────────────── */
.sidebar-left,
.sidebar-right {
  position: sticky;
  top: 92px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
}

.sidebar-card-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 16px;
}

/* ── Left: Category List ────────────────────────────────── */
.category-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.category-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.category-item:hover {
  background: var(--bg-hover);
}

.category-item.is-active {
  background: var(--accent-dim);
}

.category-item.is-active .category-name {
  color: var(--accent);
  font-weight: 700;
}

.category-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.category-count {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-faint);
  background: var(--bg-hover);
  border-radius: 10px;
  padding: 2px 8px;
  min-width: 24px;
  text-align: center;
}

.category-item.is-active .category-count {
  background: var(--accent-border);
  color: var(--accent);
}

/* ── Right: Stats Grid ──────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 8px;
  background: var(--bg-hover);
  border-radius: 10px;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Right: Recent Posts ────────────────────────────────── */
.recent-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.recent-item a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 8px;
  transition: background 0.15s;
}

.recent-item a:hover {
  background: var(--bg-hover);
}

.recent-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recent-item a:hover .recent-title {
  color: var(--accent);
}

.recent-date {
  font-size: 0.7rem;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

/* ── Right: Tag Cloud ───────────────────────────────────── */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cloud-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 4px 10px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  cursor: default;
}

.cloud-tag:hover {
  color: var(--accent);
  border-color: var(--accent-border);
  background: var(--accent-dim);
}

.cloud-tag-count {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-faint);
}

/* ── 5. Hero / Featured Post ─────────────────────────────── */
/* ── 5a. Hero — Typewriter Identity ─────────────────────── */
.hero-tw {
  border: 1px solid var(--border);
  border-radius: 20px;
  max-width: 1200px;
  margin: 32px auto;
  background: var(--bg-surface);
  padding: 48px 48px 40px;
  text-align: center;
  transition: border-color 0.3s;
}
.hero-tw:hover { border-color: var(--border-hover); }

.hero-tw-brand {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.hero-tw-role {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}
.hero-tw-tagline {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.4;
  letter-spacing: -0.02em;
  min-height: 2.3rem;
  margin-bottom: 28px;
}
.hero-tw-cursor {
  display: inline-block;
  width: 2px;
  height: 1.3em;
  background: var(--accent);
  margin-left: 3px;
  vertical-align: text-bottom;
  animation: twBlink 1s step-end infinite;
}
@keyframes twBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.hero-tw-techs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.hero-tw-tech {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-faint);
  padding: 4px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  transition: all 0.2s;
}
.hero-tw-tech:hover {
  color: var(--accent);
  border-color: var(--accent-border);
}
.hero-tw-links {
  display: flex;
  justify-content: center;
  gap: 16px;
}
.hero-tw-links a {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.15s;
}
.hero-tw-links a:hover { opacity: 0.7; }

/* ── 5b. Hero — Featured Post (legacy) ─────────────────── */
.hero {
  display: block;
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  margin: 32px auto;
  max-width: 1200px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.3s, box-shadow 0.3s var(--ease-out);
}

.hero:hover {
  border-color: var(--border-hover);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.hero-image {
  width: 100%;
  height: 420px;
  object-fit: cover;
  display: block;
}

.hero-placeholder {
  width: 100%;
  height: 420px;
  background: linear-gradient(135deg, #0d1b2a 0%, #1b2838 30%, #162a2e 60%, #0a1a1a 100%);
  position: relative;
}

.hero-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 600px 300px at 30% 40%, rgba(52, 211, 153, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 400px 250px at 70% 60%, rgba(52, 211, 153, 0.05) 0%, transparent 70%);
}

.hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 60px 48px 40px;
  background: linear-gradient(180deg, rgba(10,10,10,0) 0%, rgba(10,10,10,0.75) 50%, var(--bg-surface) 100%);
}

.hero-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  border-radius: 20px;
  padding: 4px 14px;
  margin-bottom: 16px;
}

.hero-title {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--text-main);
  margin-bottom: 12px;
}

.hero:hover .hero-title { color: var(--accent); }

.hero-excerpt {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 600px;
  margin-bottom: 16px;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-date {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.hero-read-more {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ── 6. Section Header ───────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 56px 0 28px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.section-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 20px;
  background: var(--accent);
  border-radius: 2px;
  margin-right: 12px;
  vertical-align: middle;
}

/* ── 7. Tag Filter ───────────────────────────────────────── */
.tag-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.tag-filter-btn {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 16px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.tag-filter-btn:hover {
  color: var(--accent);
  border-color: var(--accent-border);
  background: var(--accent-dim);
}

.tag-filter-btn.is-active {
  color: var(--accent);
  background: var(--accent-dim);
  border-color: var(--accent-border);
}

/* ── 8. Post Grid ────────────────────────────────────────── */
.post-grid {
  padding-bottom: 16px;
  transition: opacity 0.2s, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Magazine Hybrid Layout ── */
.mag-top {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.mag-featured {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.mag-featured::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #60a5fa);
}

.mag-featured:hover {
  border-color: var(--accent-border);
  background: var(--accent-dim);
}

.mag-featured:hover .post-title { color: var(--accent); }
.mag-featured .post-title { font-size: 1.25rem; }
.mag-featured .post-excerpt { -webkit-line-clamp: 3; }

.mag-label {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}

.mag-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.mag-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mag-side-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
}

.mag-side-card:hover {
  border-color: var(--accent-border);
  background: var(--accent-dim);
}

.mag-side-card:hover .post-title { color: var(--accent); }
.mag-side-card .post-title { font-size: 0.9rem; }
.mag-side-card .post-excerpt { font-size: 0.78rem; -webkit-line-clamp: 2; }

.mag-bottom {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.mag-bottom-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
}

.mag-bottom-card:hover {
  border-color: var(--accent-border);
  background: var(--accent-dim);
}

.mag-bottom-card:hover .post-title { color: var(--accent); }
.mag-bottom-card .post-title { font-size: 0.88rem; }
.mag-bottom-card .post-excerpt { font-size: 0.76rem; -webkit-line-clamp: 2; }

.read-more {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s var(--ease-out);
}

.mag-featured:hover .read-more { gap: 8px; }

/* Magazine shared text styles */
.post-grid .post-title,
.mag-layout .post-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.4;
  transition: color 0.2s;
}

.post-grid .post-excerpt,
.mag-layout .post-excerpt {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-grid .post-meta,
.mag-layout .post-meta {
  font-size: 0.72rem;
  color: var(--text-faint);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 다음 페이지 (좌로 슬라이드) */
.post-grid.slide-left-out,
.mag-layout.slide-left-out  { opacity: 0; transform: translateX(-40px); }
.post-grid.slide-left-in,
.mag-layout.slide-left-in   { animation: slideFromRight 0.3s cubic-bezier(0.16, 1, 0.3, 1); }

/* 이전 페이지 (우로 슬라이드) */
.post-grid.slide-right-out,
.mag-layout.slide-right-out { opacity: 0; transform: translateX(40px); }
.post-grid.slide-right-in,
.mag-layout.slide-right-in  { animation: slideFromLeft 0.3s cubic-bezier(0.16, 1, 0.3, 1); }

/* ── Magazine Hybrid Layout ──────────────────────────────── */
.mag-layout {
  transition: opacity 0.2s, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding-bottom: 16px;
}

.mag-top {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
.mag-top--solo { grid-template-columns: 1fr; }

/* Featured Card */
.mag-featured {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}
.mag-featured::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #60a5fa);
}
.mag-featured:hover {
  border-color: var(--accent-border);
  background: var(--accent-dim);
}
.mag-featured:hover .post-title { color: var(--accent); }

.mag-label {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.mag-tags { display: flex; gap: 6px; flex-wrap: wrap; }

.mag-featured .post-title { font-size: 1.25rem; }
.mag-featured .post-excerpt { -webkit-line-clamp: 3; }

.mag-meta {
  font-size: 0.72rem;
  color: var(--text-faint);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}
.mag-dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--text-faint);
}

.mag-layout .read-more {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s var(--ease-out);
}
.mag-featured:hover .read-more { gap: 8px; }

/* Side Cards */
.mag-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mag-side-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  text-decoration: none;
  color: inherit;
}
.mag-side-card:hover {
  border-color: var(--accent-border);
  background: var(--accent-dim);
}
.mag-side-card:hover .post-title { color: var(--accent); }
.mag-side-card .post-title { font-size: 0.9rem; }
.mag-side-card .post-excerpt { font-size: 0.78rem; -webkit-line-clamp: 2; }

/* Bottom Row */
.mag-bottom {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.mag-bottom-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  text-decoration: none;
  color: inherit;
}
.mag-bottom-card:hover {
  border-color: var(--accent-border);
  background: var(--accent-dim);
}
.mag-bottom-card:hover .post-title { color: var(--accent); }
.mag-bottom-card .post-title { font-size: 0.88rem; }
.mag-bottom-card .post-excerpt { font-size: 0.76rem; -webkit-line-clamp: 2; }

@keyframes slideFromRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideFromLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s var(--ease-out), border-color 0.2s, box-shadow 0.3s var(--ease-out);
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

/* Card Image */
.post-card-image {
  width: 100%;
  height: 160px;
  overflow: hidden;
  position: relative;
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease-out);
}

.post-card:hover .post-card-image img {
  transform: scale(1.05);
}

.post-card-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #111827 0%, #1a2332 50%, #162a2e 100%);
  position: relative;
}

.post-card-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(52, 211, 153, 0.06) 0%, transparent 70%);
}

/* Card Body */
.post-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 16px 18px 18px;
}

.post-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.post-tag {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  border-radius: 20px;
  padding: 3px 10px;
}

.post-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.4;
  margin-bottom: 8px;
  transition: color 0.2s;
}

.post-card:hover .post-card-title { color: var(--accent); }

.post-card-excerpt {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.post-card-date {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.post-card-link {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s var(--ease-out);
}

.post-card:hover .post-card-link { gap: 8px; }

/* ── 9. Empty State ──────────────────────────────────────── */
/* Post Paging */
.post-paging {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 8px 0 32px;
}

.pp-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  font-family: inherit;
}

.pp-btn:hover {
  color: var(--accent);
  border-color: var(--accent-border);
  background: var(--accent-dim);
}

.pp-btn.is-active {
  color: var(--bg-dark);
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 700;
}

.post-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-faint);
  font-size: 0.9rem;
  grid-column: 1 / -1;
}

/* ── 9b. All Posts — Card Decks ───────────────────────── */
.all-posts-section {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 48px 24px;
}

.all-posts-inner {
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

/* Deck Grid — 4-column */
.deck-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* Single Deck (category) */
.deck {
  cursor: pointer;
}

.deck-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.deck-cat {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.deck-count {
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--text-faint);
  background: var(--bg-hover);
  border-radius: 10px;
  padding: 2px 8px;
  min-width: 22px;
  text-align: center;
}

/* All Posts — flat grid (no stacking) */
.deck-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.deck-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  transition: transform 0.2s;
}

.deck-card:hover {
  transform: translateY(-4px);
}

.deck-card:hover .post-title {
  color: var(--accent);
}

/* Deck card uses shared classes from demo:
   .post-img   — 180px, border-radius:12px, object-fit:cover
   .post-tags  — flex, gap:6px
   .post-tag   — accent pill
   .post-title — 1rem, 700
   .post-excerpt — 0.82rem, 3-line clamp
   .post-meta  — 0.72rem, faint, dot separator
*/
.deck-card .post-img {
  width: 100%;
  height: 180px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--bg-surface);
  display: block;
  flex-shrink: 0;
}

.deck-banner {
  width: 100%;
  height: 120px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  transition: filter 0.3s;
}

.deck-banner-icon {
  position: absolute;
  right: 16px;
  bottom: 12px;
  font-size: 1.4rem;
  font-family: 'Cascadia Code', 'Fira Code', monospace;
  color: #fff;
  opacity: 0.15;
}

.deck-banner-tag {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  opacity: 0.5;
}

.deck-card:hover .deck-banner {
  filter: brightness(1.2);
}

[data-theme="light"] .deck-banner {
  opacity: 0.7;
}

.deck-card .post-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.deck-card .post-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.4;
  transition: color 0.2s;
}

.deck-card .post-excerpt {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.deck-card .post-meta {
  font-size: 0.72rem;
  color: var(--text-faint);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.deck-card .post-meta .dot {
  display: inline-block;
  width: 3px;
  height: 3px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--text-faint);
}


/* ── 9c. Post Side Panel ──────────────────────────────── */
.panel-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.panel-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.post-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 420px;
  height: 100vh;
  background: var(--bg-surface);
  border-left: 1px solid var(--border);
  z-index: 1000;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.post-panel.is-open {
  transform: translateX(0);
}

/* Drag resize handle */
.panel-resize {
  position: absolute;
  left: -16px;
  top: 0;
  width: 32px;
  height: 100%;
  cursor: col-resize;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 세로 줄 */
.panel-resize::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  width: 2px;
  height: 100%;
  background: var(--border);
  border-radius: 1px;
  transition: background 0.2s, width 0.2s;
}

/* 그립 핸들 */
.panel-resize::after {
  content: '';
  position: relative;
  z-index: 1;
  width: 12px;
  height: 64px;
  border-radius: 6px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-hover);
  box-shadow:
    inset 0 0 0 0 var(--accent-dim),
    0 2px 6px rgba(0, 0, 0, 0.15);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 그립 내부 줄무늬 (box-shadow로 표현) */
.panel-resize::after {
  background-image:
    linear-gradient(var(--text-faint) 1px, transparent 1px);
  background-size: 100% 5px;
  background-position: center;
  background-repeat: repeat-y;
  background-clip: padding-box;
}

/* Hover */
.panel-resize:hover::before,
.post-panel.is-dragging .panel-resize::before {
  background: var(--accent);
  width: 2px;
}

.panel-resize:hover::after,
.post-panel.is-dragging .panel-resize::after {
  width: 14px;
  height: 80px;
  border-color: var(--accent);
  background-color: var(--accent-dim);
  background-image:
    linear-gradient(var(--accent) 1px, transparent 1px);
  box-shadow:
    inset 0 0 0 0 var(--accent-dim),
    0 0 12px var(--accent-dim),
    0 2px 8px rgba(0, 0, 0, 0.2);
}

.post-panel.is-dragging {
  transition: none;
  user-select: none;
}

/* Panel body — master-detail flex */
.panel-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.panel-master {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 280px;
  max-width: 380px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  overflow: hidden;
}

/* Detail pane — 숨김 기본, 패널이 넓어지면 표시 */
.panel-detail {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  display: none;
}

.panel-detail.is-visible {
  display: block;
}

.panel-detail-empty {
  color: var(--text-faint);
  font-size: 0.88rem;
  text-align: center;
  padding: 60px 20px;
}

/* 좁을 때 master가 전체 폭 차지 */
.panel-detail:not(.is-visible) ~ .panel-master,
.panel-body:not(:has(.panel-detail.is-visible)) .panel-master {
  max-width: none;
}

/* Panel header */
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.panel-cat-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
}

.panel-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background 0.2s, border-color 0.2s, transform 0.2s;
}

.panel-close-btn:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.2);
  transform: rotate(90deg);
}

.panel-close-btn:active {
  transform: rotate(90deg) scale(0.9);
}

/* Panel list view */
.panel-list-view {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.panel-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.panel-card:hover {
  border-color: var(--accent-border);
  background: var(--accent-dim);
}

.panel-card-date {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.panel-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  transition: color 0.2s;
}

.panel-card:hover .panel-card-title {
  color: var(--accent);
}

.panel-card.is-selected {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.panel-card.is-selected .panel-card-title {
  color: var(--accent);
}

.panel-card-excerpt {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.panel-post-content {
  padding: 32px 28px 48px;
}

/* 패널 내부에서 포스트 스타일 재사용 */
.panel-post-content .post-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.panel-post-content .post-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-faint);
}

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

.panel-post-content h1 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.25;
  color: var(--text-main);
  margin: 0 0 12px;
}

.panel-post-content .post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.panel-post-content .post-meta span + span::before {
  content: '·';
  margin-right: 10px;
  color: var(--text-faint);
}

.panel-post-content .post-summary {
  margin: 16px 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.panel-post-content .post-content h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 40px 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.panel-post-content .post-content h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 28px 0 10px;
}

.panel-post-content .post-content p {
  font-size: 0.9rem;
  color: var(--text-main);
  line-height: 1.8;
  margin: 0 0 16px;
}

.panel-post-content .post-content ul,
.panel-post-content .post-content ol {
  margin: 0 0 16px;
  padding-left: 20px;
}

.panel-post-content .post-content li {
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 8px;
  list-style: disc;
}

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

.panel-post-content .post-content code {
  font-family: 'JetBrains Mono', 'Consolas', monospace;
  font-size: 0.82rem;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--accent);
}

.panel-post-content .post-callout {
  position: relative;
  padding: 16px 20px 16px 44px;
  border-radius: 10px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  font-size: 0.88rem;
  line-height: 1.7;
  margin: 20px 0;
  color: var(--text-main);
}

.panel-post-content .post-callout::before {
  content: '💡';
  position: absolute;
  left: 16px;
  top: 16px;
}

.panel-post-content .post-tags-footer,
.panel-post-content .post-footer-nav {
  display: none;
}

/* 넓어지면 콘텐츠 중앙 정렬 */
@media screen and (min-width: 900px) {
  .post-panel .panel-post-content {
    max-width: 800px;
    margin: 0 auto;
  }
}

/* ── 9d. Side Projects Section ─────────────────────────── */
.side-projects-section {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 48px 48px;
}

.side-projects-inner {
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.sp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0;
}

.sp-nav {
  display: flex;
  gap: 8px;
}

.sp-nav-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.sp-nav-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.sp-nav-btn:disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

/* Slide Track */
.side-projects-track-wrap {
  overflow: hidden;
  margin: 0 -8px;
  padding: 8px;
}

.side-projects-grid {
  display: flex;
  gap: 20px;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.side-projects-grid.is-dragging {
  cursor: grabbing;
  transition: none;
}

.sp-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px;
  min-width: calc(25% - 15px);
  max-width: calc(25% - 15px);
  flex-shrink: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: border-color 0.2s, box-shadow 0.3s var(--ease-out);
  cursor: pointer;
  overflow: hidden;
}

.sp-card:hover {
  border-color: var(--accent-border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .sp-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.sp-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.sp-year {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  border-radius: 10px;
  padding: 2px 10px;
}

/* Star / Fork Stats */
.sp-stats {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sp-stat {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-faint);
}

.sp-stat svg {
  opacity: 0.6;
}

.sp-stat-num {
  font-variant-numeric: tabular-nums;
}

/* GitHub Corner */
.sp-corner {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  z-index: 2;
}

.sp-corner-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 50%, var(--accent) 50%);
  opacity: 0.12;
  transition: opacity 0.25s;
  border-bottom-right-radius: 13px;
}

.sp-card:hover .sp-corner-bg {
  opacity: 0.3;
}

.sp-corner-content {
  position: relative;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 6px 8px;
  color: var(--accent);
  transition: color 0.2s, transform 0.2s;
}

.sp-card:hover .sp-corner-content {
  color: var(--text-main);
  transform: translate(-1px, -1px);
}

.sp-corner-label {
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sp-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
  line-height: 1.3;
  transition: color 0.2s;
}

.sp-card:hover .sp-title {
  color: var(--accent);
}

.sp-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 16px;
}

.sp-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.sp-stack-tag {
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--text-faint);
  background: var(--bg-hover);
  border-radius: 8px;
  padding: 3px 8px;
}

/* ── 10. Footer ──────────────────────────────────────────── */
.blog-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 20px;
}

.blog-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.blog-footer-copy {
  font-size: 0.75rem;
  color: var(--text-faint);
}

.blog-footer-links {
  display: flex;
  gap: 24px;
}

.blog-footer-links a {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-faint);
  transition: color 0.2s;
}

.blog-footer-links a:hover { color: var(--accent); }

/* ── 11. Theme Toggle Button ─────────────────────────────── */
.theme-toggle {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 100;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-hover);
  background: var(--bg-surface);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.theme-toggle .icon-moon { display: block; }
.theme-toggle .icon-sun  { display: none; }

[data-theme="light"] .theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun  { display: block; }

/* ── 12. Reading Progress Bar ───────────────────────────── */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--accent);
  z-index: 200;
  transition: width 0.1s linear;
}

/* ── 13. Post Page — Layout ─────────────────────────────── */
.post-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 48px;
  align-items: start;
}

.post-main {
  min-width: 0;
  padding: 48px 0 80px;
}

/* ── 13a. Post Header ───────────────────────────────────── */
.post-header {
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

/* Breadcrumb (inside header) */
.post-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-faint);
}

.post-breadcrumb a {
  color: var(--accent);
  transition: opacity 0.2s;
}

.post-breadcrumb a:hover {
  opacity: 0.75;
}

.post-breadcrumb .breadcrumb-sep {
  font-size: 0.65rem;
  color: var(--text-faint);
}

.post-breadcrumb .breadcrumb-current {
  color: var(--text-muted);
}

.post-main h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--text-main);
  margin: 0 0 16px;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.post-meta span + span::before {
  content: '·';
  margin-right: 12px;
  color: var(--text-faint);
}

.post-meta .reading-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.post-meta .reading-time svg {
  width: 14px;
  height: 14px;
  stroke: var(--text-faint);
}

.post-summary {
  margin: 20px 0 0;
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.8;
}

/* ── 13c. Post Content (Prose) ──────────────────────────── */
.post-content {
  line-height: 1.85;
}

.post-content h2 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin: 56px 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 80px;
}

.post-content h2:first-child {
  margin-top: 0;
}

.post-content h3 {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 36px 0 12px;
  scroll-margin-top: 80px;
}

.post-content p {
  margin: 0 0 20px;
  color: var(--text-main);
  font-size: 0.95rem;
  line-height: 1.85;
}

.post-content ul,
.post-content ol {
  margin: 0 0 20px;
  padding-left: 24px;
}

.post-content li {
  margin-bottom: 10px;
  font-size: 0.95rem;
  line-height: 1.75;
  list-style: disc;
}

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

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

.post-content strong {
  font-weight: 700;
  color: var(--text-main);
}

.post-content a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent-border);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.2s;
}

.post-content a:hover {
  text-decoration-color: var(--accent);
}

.post-content blockquote {
  margin: 24px 0;
  padding: 16px 20px;
  border-left: 3px solid var(--accent);
  background: var(--accent-dim);
  border-radius: 0 8px 8px 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.75;
}

.post-content blockquote p {
  margin: 0;
  color: var(--text-muted);
}

.post-content hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 48px 0;
}

.post-content img {
  max-width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin: 24px 0;
}

/* Inline Code */
.post-content code {
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.84rem;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 2px 6px;
  color: var(--accent);
}

/* Code Block */
.post-content pre {
  margin: 24px 0;
  padding: 20px 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow-x: auto;
  line-height: 1.6;
}

.post-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.84rem;
  color: var(--text-main);
}

/* ── 13d. Callout Variants ──────────────────────────────── */
.post-callout {
  position: relative;
  padding: 20px 24px 20px 52px;
  border-radius: 12px;
  font-size: 0.92rem;
  line-height: 1.75;
  margin: 24px 0;
  color: var(--text-main);
}

.post-callout::before {
  position: absolute;
  left: 20px;
  top: 20px;
  font-size: 1.1rem;
  line-height: 1;
}

/* Default / Info */
.post-callout {
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
}

.post-callout::before {
  content: '💡';
}

/* Tip */
.post-callout.callout-tip {
  background: rgba(52, 211, 153, 0.08);
  border-color: rgba(52, 211, 153, 0.25);
}

.post-callout.callout-tip::before {
  content: '✅';
}

/* Warning */
.post-callout.callout-warning {
  background: rgba(251, 191, 36, 0.08);
  border-color: rgba(251, 191, 36, 0.25);
}

.post-callout.callout-warning::before {
  content: '⚠️';
}

/* Error / Danger */
.post-callout.callout-danger {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.25);
}

.post-callout.callout-danger::before {
  content: '🚨';
}

/* ── 13e. Table ─────────────────────────────────────────── */
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.88rem;
}

.post-content th,
.post-content td {
  padding: 10px 14px;
  border: 1px solid var(--border);
  text-align: left;
}

.post-content th {
  background: var(--bg-hover);
  font-weight: 700;
  color: var(--text-main);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.post-content td {
  color: var(--text-main);
}

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

/* ── 14. TOC Sidebar ────────────────────────────────────── */
.post-toc {
  position: sticky;
  top: 80px;
  align-self: start;
  padding: 32px 0 48px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  scrollbar-width: none;
}

.post-toc::-webkit-scrollbar { display: none; }

.post-toc-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 16px;
}

.post-toc-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-left: 2px solid var(--border);
  padding-left: 0;
}

.post-toc-item {
  list-style: none;
}

.post-toc-link {
  display: block;
  padding: 5px 16px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-faint);
  line-height: 1.4;
  border-left: 2px solid transparent;
  margin-left: -2px;
  transition: color 0.2s, border-color 0.2s;
}

.post-toc-link:hover {
  color: var(--text-muted);
}

.post-toc-link.is-active {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 600;
}

.post-toc-link[data-depth="3"] {
  padding-left: 28px;
  font-size: 0.74rem;
}

/* ── 15. Post Footer Navigation ─────────────────────────── */
.post-footer-nav {
  display: flex;
  gap: 16px;
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.post-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.2s, background 0.2s;
}

.post-nav-item:hover {
  border-color: var(--accent-border);
  background: var(--accent-dim);
}

.post-nav-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.post-nav-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.4;
}

.post-nav-item:hover .post-nav-title {
  color: var(--accent);
}

.post-nav-item.nav-next {
  text-align: right;
}

/* ── 16. Post Tags Footer ───────────────────────────────── */
.post-tags-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.post-tags-footer .post-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 5px 12px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.post-tags-footer .post-tag:hover {
  color: var(--accent);
  border-color: var(--accent-border);
  background: var(--accent-dim);
}

/* ── 17. Responsive — Tablet ─────────────────────────────── */
@media screen and (max-width: 1024px) {
  .container { padding: 0 32px; }
  .blog-nav  { padding: 0 32px; }
  .hero-tw { margin: 24px 32px; padding: 40px 36px 32px; }
  .hero-tw-tagline { font-size: 1.4rem; }
  .hero { margin: 24px 32px; }
  .hero-overlay { padding: 48px 36px 32px; }
  .hero-title { font-size: 2rem; }
  .hero-placeholder,
  .hero-image { height: 340px; }
  .layout-wrap {
    grid-template-columns: 1fr;
    padding: 24px 32px 0;
  }
  .sidebar-left,
  .sidebar-right {
    position: static;
  }
  .sidebar-left {
    order: -1;
  }
  .sidebar-left .sidebar-card {
    padding: 16px;
  }
  .category-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }
  .category-item {
    padding: 6px 12px;
  }
  .sidebar-right {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
  }
  .sidebar-right .sidebar-card {
    flex: 1;
    min-width: 200px;
  }
  .mag-bottom { grid-template-columns: repeat(2, 1fr); }
  .all-posts-section { padding: 0 32px 20px; }
  .deck-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .side-projects-section { padding: 0 32px 40px; }
  .sp-card { min-width: calc(50% - 10px); max-width: calc(50% - 10px); }
  .blog-footer-inner { padding: 0 32px; }

  /* Post page tablet */
  .post-layout {
    grid-template-columns: 1fr;
    padding: 0 32px;
    gap: 0;
  }
  .post-main { padding: 32px 0 60px; }
  .post-toc {
    position: static;
    padding: 0 0 24px;
    max-height: none;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
  }
  .post-toc-list {
    flex-direction: row;
    flex-wrap: wrap;
    border-left: none;
    gap: 4px;
  }
  .post-toc-link {
    border-left: none;
    margin-left: 0;
    padding: 4px 12px;
    border-radius: 14px;
    border: 1px solid var(--border);
    font-size: 0.72rem;
  }
  .post-toc-link.is-active {
    border-color: var(--accent-border);
    background: var(--accent-dim);
  }
  .post-toc-link[data-depth="3"] {
    padding-left: 12px;
  }
}

/* ── 18. Responsive — Mobile ─────────────────────────────── */
@media screen and (max-width: 640px) {
  .blog-nav {
    padding: 0 20px;
    height: 52px;
  }

  .blog-nav-links { gap: 16px; }
  .blog-nav-links a { font-size: 0.75rem; }
  .blog-nav-cta { display: none; }

  .container { padding: 0 20px; }

  .layout-wrap {
    padding: 16px 20px 0;
  }

  .hero-tw {
    margin: 20px;
    border-radius: 16px;
    padding: 32px 24px 28px;
  }
  .hero-tw-tagline { font-size: 1.2rem; min-height: 1.8rem; margin-bottom: 20px; }
  .hero-tw-role { margin-bottom: 20px; }

  .hero {
    margin: 20px;
    border-radius: 16px;
  }

  .hero-placeholder,
  .hero-image { height: 260px; }

  .hero-overlay { padding: 32px 24px 24px; }
  .hero-title { font-size: 1.5rem; }
  .hero-excerpt { font-size: 0.85rem; }

  .section-header { margin: 36px 0 20px; }
  .section-title { font-size: 1.2rem; }

  .sidebar-right {
    flex-direction: column;
  }
  .sidebar-right .sidebar-card {
    min-width: 0;
  }

  .post-grid {
    padding-bottom: 60px;
  }

  .mag-top { grid-template-columns: 1fr; }
  .mag-bottom { grid-template-columns: 1fr; }

  .post-card-image { height: 180px; }
  .post-card-body { padding: 16px 20px 20px; }

  .all-posts-section { padding: 0 20px 16px; }
  .deck-grid { grid-template-columns: 1fr; gap: 20px; }
  .side-projects-section { padding: 0 20px 32px; }
  .sp-card { min-width: calc(80% - 10px); max-width: calc(80% - 10px); }

  .blog-footer-inner {
    padding: 0 20px;
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  /* Post page mobile */
  .post-layout { padding: 0 20px; }
  .post-main { padding: 24px 0 60px; }
  .post-main h1 { font-size: 1.6rem; }
  .post-content h2 { font-size: 1.2rem; margin-top: 36px; }
  .post-content h3 { font-size: 1rem; margin-top: 28px; }
  .post-footer-nav {
    flex-direction: column;
    gap: 12px;
  }
  .post-nav-item.nav-next { text-align: left; }

  /* Side panel mobile — 전체 화면 */
  .post-panel {
    width: 100% !important;
  }
  .post-panel .panel-resize {
    display: none;
  }
  .post-panel .panel-master {
    max-width: none;
  }
  .post-panel .panel-detail {
    display: none !important;
  }
}
