/* ============================================================
   블로그 — 목록과 글

   홈·체인지로그와 같은 집이 되도록 site.css 의 토큰 위에 쓴다.
   예전에는 style.css 안에서 Libre Baskerville 세리프 제목과 Georgia
   본문에 색을 전부 하드코딩(#000·#666·#e0e0e0·#326891)했다. 헤더만
   같고 안으로 들어오면 다른 사이트였다.

   **읽는 글은 본문 폭이 생명이다.** 목록은 카드 격자로, 글은 한 단으로
   둔다 — 글줄이 68자를 넘으면 눈이 다음 줄 첫머리를 잃는다.
   ============================================================ */

/* ------------------------------------------------------------
   목록 머리
   ------------------------------------------------------------ */
.blog-header {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: calc(var(--header-h) + var(--s-6)) var(--s-4) var(--s-5);
}

.blog-header-title {
    font-size: clamp(1.9rem, 4vw, 2.9rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin: 0 0 var(--s-2);
    text-wrap: balance;
}

.blog-header-description {
    font-size: var(--fs-md);
    color: var(--ink-55);
    margin: 0;
    max-width: 60ch;
    line-height: 1.6;
}

/* ------------------------------------------------------------
   거르개 — 칩. 홈의 카테고리 칩과 같은 문법이다.
   ------------------------------------------------------------ */
.blog-filters {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 var(--s-4) var(--s-5);
}

.blog-category-tabs,
.blog-tag-filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-2);
    padding: 0;
    margin: 0 0 var(--s-3);
    list-style: none;
}

.blog-category-tab,
.blog-tag-filter {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.8rem;
    border-radius: 16px;
    border: 1px solid var(--hairline);
    background: transparent;
    color: var(--ink-70);
    font: inherit;
    font-size: var(--fs-sm);
    cursor: pointer;
    transition: border-color 140ms ease, color 140ms ease;
}

.blog-category-tab:hover,
.blog-tag-filter:hover {
    border-color: var(--gold-fill);
    color: var(--ink);
}

.blog-category-tab:focus-visible,
.blog-tag-filter:focus-visible {
    outline: 2px solid var(--gold-fill);
    outline-offset: 2px;
}

/* 고른 것은 금색으로 찬다 — 홈 레일의 지나온 눈금과 같은 뜻이다 */
.blog-category-tab.active,
.blog-tag-filter.active {
    background: var(--gold-fill);
    border-color: var(--gold-fill);
    color: #1C1400;
    font-weight: 500;
}

/* ------------------------------------------------------------
   카드 격자
   ------------------------------------------------------------ */
.blog-posts-grid {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 var(--s-4) var(--s-8);
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr));
    gap: var(--s-5);
}

.blog-card {
    display: flex;
    flex-direction: column;
    background: #FFFFFF;
    border: 1px solid var(--hairline);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 160ms ease, transform 160ms ease;
}

.blog-card:hover {
    border-color: var(--gold-fill);
    transform: translateY(-2px);
}

.blog-card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    background: var(--paper-deep);
}

.blog-card-content {
    padding: var(--s-4);
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
    flex: 1;
}

/* 갈래 표시는 색 알약이 아니라 금색 눈썹이다 — 카드마다 다른 색
   배지를 두면 격자가 소란스럽고, 그 색들은 뜻도 없었다. */
.blog-card-category {
    font-size: var(--fs-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gold);
}

.blog-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
    letter-spacing: -0.01em;
    text-wrap: pretty;
}

.blog-card-title a {
    color: var(--ink);
    text-decoration: none;
}

.blog-card-title a:hover { color: var(--gold); }

.blog-card-summary {
    font-size: var(--fs-sm);
    color: var(--ink-70);
    line-height: 1.6;
    margin: 0;
    text-wrap: pretty;
}

.blog-card-meta {
    margin-top: auto;
    padding-top: var(--s-3);
    border-top: 1px solid var(--hairline);
    display: flex;
    gap: var(--s-3);
    font-size: var(--fs-xs);
    color: var(--ink-35);
    font-variant-numeric: tabular-nums;
}

.blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.blog-tag {
    font-size: var(--fs-xs);
    color: var(--ink-35);
}

.blog-tag::before { content: "#"; }

/* ------------------------------------------------------------
   글

   본문은 한 단으로 좁게. 읽는 자리에서 폭은 장식이 아니라 기능이다.
   ------------------------------------------------------------ */
.blog-post-article {
    max-width: var(--wrap-narrow);
    margin: 0 auto;
    padding: calc(var(--header-h) + var(--s-6)) var(--s-4) var(--s-8);
}

.blog-post-header {
    margin-bottom: var(--s-6);
    padding-bottom: var(--s-4);
    border-bottom: 1px solid var(--hairline);
}

.blog-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-3);
    font-size: var(--fs-xs);
    color: var(--ink-35);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: var(--s-3);
    font-variant-numeric: tabular-nums;
}

.blog-post-title {
    font-size: clamp(1.8rem, 3.6vw, 2.6rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin: 0 0 var(--s-3);
    text-wrap: balance;
}

.blog-post-summary {
    font-size: var(--fs-lg);
    line-height: 1.55;
    color: var(--ink-55);
    margin: 0;
    text-wrap: pretty;
}

.blog-post-content {
    font-size: var(--fs-md);
    line-height: 1.75;
    color: var(--ink-70);
}

.blog-post-content p {
    margin: 0 0 var(--s-4);
    text-wrap: pretty;
}

.blog-post-content h2 {
    font-size: clamp(1.35rem, 2.2vw, 1.65rem);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin: var(--s-6) 0 var(--s-3);
    text-wrap: balance;
}

.blog-post-content h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ink);
    margin: var(--s-5) 0 var(--s-2);
}

.blog-post-content ul,
.blog-post-content ol {
    margin: 0 0 var(--s-4);
    padding-left: var(--s-4);
}

.blog-post-content li { margin-bottom: var(--s-2); }

.blog-post-content strong {
    color: var(--ink);
    font-weight: 500;
}

.blog-post-content a {
    color: var(--gold);
    text-underline-offset: 3px;
}

/* 인용은 금색 세로선 — 홈 레일의 척추와 같은 색이다 */
.blog-post-content blockquote {
    margin: var(--s-5) 0;
    padding: 0 0 0 var(--s-4);
    border-left: 2px solid var(--gold-fill);
    color: var(--ink-55);
    font-size: var(--fs-lg);
    line-height: 1.6;
}

.blog-post-content blockquote p:last-child { margin-bottom: 0; }

.blog-post-content img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    margin: var(--s-5) 0;
}

/* ------------------------------------------------------------
   글 사이 이동
   ------------------------------------------------------------ */
.blog-post-navigation {
    display: flex;
    justify-content: space-between;
    gap: var(--s-4);
    margin-top: var(--s-7);
    padding-top: var(--s-5);
    border-top: 1px solid var(--hairline);
}

.blog-nav-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    text-decoration: none;
    max-width: 46%;
}

.blog-nav-item.next {
    margin-left: auto;
    text-align: right;
}

.blog-nav-label {
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gold);
    font-weight: 700;
}

.blog-nav-title {
    font-size: var(--fs-sm);
    color: var(--ink);
    line-height: 1.4;
}

.blog-nav-item:hover .blog-nav-title { color: var(--gold); }

@media (max-width: 640px) {
    .blog-post-navigation { flex-direction: column; }

    .blog-nav-item,
    .blog-nav-item.next {
        max-width: 100%;
        text-align: left;
        margin-left: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .blog-card,
    .blog-category-tab,
    .blog-tag-filter { transition: none; }

    .blog-card:hover { transform: none; }
}

/* ------------------------------------------------------------
   약관·개인정보 — 읽는 문서

   `.policy-content` 는 style.css 에 규칙이 아예 없었다. 스타일 없이
   브라우저 기본값으로 떠 있었다는 뜻이다. 글과 같은 자리이므로 같은
   폭·같은 위계를 준다.
   ------------------------------------------------------------ */
.policy-content {
    max-width: var(--wrap-narrow);
    margin: 0 auto;
    padding: calc(var(--header-h) + var(--s-6)) var(--s-4) var(--s-8);
    font-size: var(--fs-md);
    line-height: 1.75;
    color: var(--ink-70);
}

.policy-content h1 {
    font-size: clamp(1.8rem, 3.6vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin: 0 0 var(--s-4);
    padding-bottom: var(--s-3);
    border-bottom: 1px solid var(--hairline);
    text-wrap: balance;
}

.policy-content h2 {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    font-weight: 700;
    color: var(--ink);
    margin: var(--s-6) 0 var(--s-3);
    text-wrap: balance;
}

.policy-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ink);
    margin: var(--s-5) 0 var(--s-2);
}

.policy-content p { margin: 0 0 var(--s-4); text-wrap: pretty; }

.policy-content ul,
.policy-content ol {
    margin: 0 0 var(--s-4);
    padding-left: var(--s-4);
}

.policy-content li { margin-bottom: var(--s-2); }

.policy-content strong { color: var(--ink); font-weight: 500; }

.policy-content a {
    color: var(--gold);
    text-underline-offset: 3px;
}

.policy-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 var(--s-4);
    font-size: var(--fs-sm);
}

.policy-content th,
.policy-content td {
    text-align: left;
    padding: var(--s-2) var(--s-3);
    border-bottom: 1px solid var(--hairline);
}

.policy-content th { color: var(--ink); font-weight: 500; }
