/* 블로그 전용 스타일 (공통 토큰·상단바·카드는 ../style.css) */
.blog-main { min-height: 80vh; padding: 130px 0 90px; outline: none; }
.blog-list-view, .post-view { animation: rise .55s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }

.blog-hero { max-width: 760px; margin-bottom: 36px; }
.blog-hero h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 800; letter-spacing: -0.045em; line-height: 1.15; }

.blog-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.blog-tabs { margin-bottom: 0; }
.blog-tabs .tab { text-decoration: none; transition: color .25s, background .25s; }
.blog-tabs .tab.is-active { background: var(--surface-strong); box-shadow: inset 0 0 0 1px var(--border-strong); }
.count { margin-left: 4px; color: var(--faint); font-size: 12.5px; font-variant-numeric: tabular-nums; }

.search {
  display: flex; align-items: center; gap: 8px; min-width: min(320px, 100%);
  padding: 0 14px; height: 44px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
}
.search:focus-within { border-color: var(--a2); }
.search svg { width: 17px; height: 17px; flex: none; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 15px; outline: none; }
.search input::placeholder { color: var(--faint); }

.result-note { min-height: 1.2em; margin-bottom: 8px; color: var(--muted); font-size: 14px; }

.post-grid { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.post-card { border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); animation: rise .6s var(--ease) both; animation-delay: calc(var(--i) * 60ms); }
.post-card:hover { transform: translateY(-4px); }
.post-card a { display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 26px; color: var(--text); text-decoration: none; border-radius: inherit; }
.post-card time { font-weight: 800; font-variant-numeric: tabular-nums; }
.card-kicker { color: var(--faint); font-size: 13px; font-weight: 700; }
.post-card h2 { font-size: 20px; font-weight: 800; line-height: 1.4; }
.card-summary { flex: 1; color: var(--muted); font-size: 14.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.empty { grid-column: 1 / -1; padding: 48px 20px; border: 1px dashed var(--border-strong); border-radius: var(--r-lg); text-align: center; color: var(--muted); }

/* 글 화면 */
.back-link { display: inline-block; margin-bottom: 26px; color: var(--muted); font-size: 14.5px; font-weight: 700; text-decoration: none; }
.back-link:hover { color: var(--text); }
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 48px; align-items: start; }
.post-main { min-width: 0; max-width: 780px; }
.post-kicker { color: var(--a2); font-size: 14px; font-weight: 800; margin-bottom: 10px; }
.post-head h1 { font-size: clamp(28px, 4vw, 42px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.25; outline: none; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 18px; color: var(--muted); font-size: 14px; }
.post-meta .tag { text-decoration: none; }
.post-meta time { color: var(--text); font-weight: 800; }
.post-meta .chip { padding: 2px 9px; border-radius: 8px; background: var(--surface-strong); border: 1px solid var(--border); font-size: 12.5px; }
.post-memo { margin-top: 14px; color: var(--faint); font-size: 14px; }
.post-head { padding-bottom: 28px; margin-bottom: 30px; border-bottom: 1px solid var(--border); }

.prose { font-size: 16.5px; line-height: 1.85; }
.prose h2 { margin: 44px 0 14px; font-size: 25px; font-weight: 800; scroll-margin-top: 110px; outline: none; }
.prose h3 { margin: 40px 0 12px; font-size: 21px; font-weight: 800; scroll-margin-top: 110px; outline: none; }
.prose h4 { margin: 26px 0 8px; font-size: 17px; font-weight: 800; }
.prose p { margin: 0 0 14px; color: color-mix(in srgb, var(--text) 88%, var(--muted)); }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin-bottom: 4px; }
.prose strong { color: var(--text); }
.prose a { color: var(--a2); }
.prose .lede { margin: -6px 0 24px; color: var(--muted); font-size: 18px; font-weight: 700; line-height: 1.6; }
.prose li.lvl-1 { margin-left: 22px; list-style-type: circle; }
.prose li.lvl-2 { margin-left: 44px; list-style-type: square; }
.prose li.lvl-3 { margin-left: 66px; }
.prose blockquote { margin: 0 0 16px; padding: 10px 18px; border-left: 3px solid var(--a2); border-radius: 0 var(--r-md) var(--r-md) 0; background: var(--surface); }
.prose blockquote p { margin: 0; }
.prose blockquote + blockquote { margin-top: -12px; }
.prose code { padding: 1px 6px; border-radius: 6px; background: var(--surface-strong); border: 1px solid var(--border); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; overflow-wrap: anywhere; }
.prose figure { margin: 8px 0 24px; }
.prose img { display: block; max-width: 100%; height: auto; margin: 0 auto; border-radius: var(--r-md); border: 1px solid var(--border); background: #fff; }
.table-wrap { margin: 0 0 20px; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-md); }
.prose table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.prose th, .prose td { padding: 10px 14px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.prose th { background: var(--surface-strong); font-weight: 800; white-space: nowrap; }

.toc { position: sticky; top: 110px; padding: 20px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); max-height: calc(100vh - 140px); overflow-y: auto; }
.toc[hidden] { display: none; }
.toc-title { margin-bottom: 10px; color: var(--faint); font-size: 12px; font-weight: 800; letter-spacing: .1em; }
.toc ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.toc a { display: block; color: var(--muted); font-size: 13.5px; line-height: 1.45; text-decoration: none; }
.toc a:hover { color: var(--text); }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 56px; padding-top: 26px; border-top: 1px solid var(--border); }
.post-nav a { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); color: var(--text); font-weight: 700; text-decoration: none; transition: border-color .2s; }
.post-nav a:hover { border-color: var(--border-strong); }
.post-nav span { color: var(--faint); font-size: 12.5px; font-weight: 700; }
.nav-newer { text-align: right; }

@media (max-width: 960px) {
  .post-layout { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; max-height: none; order: -1; }
}
@media (max-width: 640px) {
  .blog-main { padding: 104px 0 70px; }
  .post-grid { grid-template-columns: minmax(0, 1fr); }
  .post-card a { padding: 22px 20px; }
  .blog-toolbar { flex-direction: column; align-items: stretch; }
  .post-nav { grid-template-columns: minmax(0, 1fr); }
  .nav-newer { text-align: left; }
}
