:root {
    --bg: #f4efe7;
    --bg-accent: #e7f3ed;
    --surface: rgba(255, 255, 255, 0.94);
    --surface-strong: #ffffff;
    --line: rgba(28, 42, 36, 0.12);
    --text: #1e2a25;
    --muted: #5d6b64;
    --brand: #1f7a5a;
    --brand-dark: #165640;
    --shadow: 0 18px 48px rgba(24, 39, 33, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.blog-view-body {
    margin: 0;
    font-family: 'Pretendard', 'Malgun Gothic', Arial, sans-serif;
    color: var(--text);
    line-height: 1.7;
    background:
        radial-gradient(circle at top left, rgba(31, 122, 90, 0.14), transparent 30%),
        linear-gradient(180deg, #fbf8f2 0%, var(--bg) 100%);
}

a {
    color: inherit;
}

.page-shell {
    min-height: 100vh;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(12px);
    background: rgba(251, 248, 242, 0.9);
    border-bottom: 1px solid rgba(28, 42, 36, 0.08);
}

.site-header__inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 18px 24px;
    display: flex;
    gap: 24px;
    align-items: center;
    justify-content: space-between;
}

.brand-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--brand-dark);
    text-decoration: none;
}

.brand-copy {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.site-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    text-decoration: none;
    color: var(--muted);
    background: rgba(31, 122, 90, 0.08);
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
    background: rgba(31, 122, 90, 0.16);
    color: var(--brand-dark);
    transform: translateY(-1px);
}

.detail-main {
    max-width: 1180px;
    margin: 0 auto;
    padding: 40px 24px 56px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    align-items: start;
}

.article-card,
.related-card {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.article-card {
    overflow: hidden;
}

.article-hero {
    padding: 34px 38px 28px;
    background:
        linear-gradient(135deg, rgba(231, 243, 237, 0.92), rgba(255, 255, 255, 0.96)),
        linear-gradient(180deg, rgba(31, 122, 90, 0.08), rgba(31, 122, 90, 0));
    border-bottom: 1px solid var(--line);
}

.article-hero__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}

.back-link,
.copy-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 16px;
    border-radius: 999px;
    border: 1px solid rgba(31, 122, 90, 0.18);
    background: rgba(255, 255, 255, 0.78);
    color: var(--brand-dark);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
}

.copy-link-btn {
    cursor: pointer;
    font-family: inherit;
}

.back-link:hover,
.back-link:focus-visible,
.copy-link-btn:hover,
.copy-link-btn:focus-visible {
    background: rgba(31, 122, 90, 0.12);
}

.article-kicker,
.related-kicker {
    margin: 0 0 12px;
    color: var(--brand);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.article-hero h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.15;
    letter-spacing: -0.045em;
}

.article-summary {
    max-width: 780px;
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 1.08rem;
}

.article-meta {
    margin-top: 22px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(31, 122, 90, 0.12);
    color: var(--muted);
    font-size: 0.94rem;
}

.article-content {
    padding: 34px 38px 44px;
    font-size: 1.08rem;
    line-height: 1.9;
    background: var(--surface-strong);
}

.article-content > :first-child {
    margin-top: 0;
}

.article-content > :last-child {
    margin-bottom: 0;
}

.article-content h2,
.article-content h3,
.article-content h4 {
    margin: 2.2em 0 0.75em;
    line-height: 1.3;
    letter-spacing: -0.03em;
    color: #17342a;
}

.article-content h2 {
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(31, 122, 90, 0.18);
    font-size: 1.75rem;
}

.article-content h3 {
    padding-left: 14px;
    border-left: 4px solid rgba(31, 122, 90, 0.7);
    font-size: 1.35rem;
}

.article-content p,
.article-content ul,
.article-content ol,
.article-content blockquote,
.article-content pre,
.article-content table {
    margin: 0 0 1.15em;
}

.article-content ul,
.article-content ol {
    padding-left: 1.4em;
}

.article-content li + li {
    margin-top: 0.35em;
}

.article-content a {
    color: var(--brand-dark);
    text-decoration-thickness: 1.5px;
    text-underline-offset: 3px;
    word-break: break-word;
}

.article-content a:hover,
.article-content a:focus-visible {
    color: var(--brand);
}

.article-content pre {
    overflow-x: auto;
    padding: 18px 20px;
    border-radius: 20px;
    background: #18231f;
    color: #eef6f2;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.article-content pre code {
    padding: 0;
    background: transparent;
    color: inherit;
}

.article-content code {
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(31, 122, 90, 0.08);
    color: #205f49;
    font-size: 0.95em;
}

.article-content blockquote {
    padding: 18px 20px;
    border-left: 4px solid rgba(31, 122, 90, 0.7);
    border-radius: 0 18px 18px 0;
    background: var(--bg-accent);
    color: #294137;
}

.article-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 24px auto;
    border-radius: 18px;
    box-shadow: 0 14px 30px rgba(25, 42, 35, 0.14);
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: 14px;
    border-style: hidden;
    box-shadow: 0 0 0 1px rgba(28, 42, 36, 0.12);
}

.article-content th,
.article-content td {
    padding: 12px 14px;
    border: 1px solid rgba(28, 42, 36, 0.08);
    text-align: left;
}

.article-content th {
    background: rgba(31, 122, 90, 0.08);
}

.related-card {
    position: sticky;
    top: 106px;
    padding: 28px 24px;
}

.related-card__header h2 {
    margin: 0;
    font-size: 1.45rem;
    letter-spacing: -0.03em;
}

.related-card__header p {
    margin: 10px 0 0;
    color: var(--muted);
}

.related-list {
    list-style: none;
    padding: 0;
    margin: 26px 0 0;
    display: grid;
    gap: 12px;
}

.related-link {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 18px;
    border-radius: 20px;
    text-decoration: none;
    color: inherit;
    background: rgba(31, 122, 90, 0.05);
    border: 1px solid rgba(31, 122, 90, 0.08);
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.related-link:hover,
.related-link:focus-visible {
    background: rgba(31, 122, 90, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 12px 22px rgba(25, 42, 35, 0.08);
}

.related-link__title {
    font-weight: 700;
    line-height: 1.4;
}

.related-link__date,
.related-empty {
    color: var(--muted);
    font-size: 0.92rem;
}

.site-footer {
    padding: 0 24px 36px;
    text-align: center;
    color: var(--muted);
}

.copy-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%) translateY(10px);
    padding: 12px 16px;
    border-radius: 999px;
    background: rgba(23, 52, 42, 0.92);
    color: #fff;
    font-size: 0.92rem;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.copy-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 980px) {
    .site-header {
        position: static;
    }

    .site-header__inner {
        flex-direction: column;
        align-items: flex-start;
        padding-bottom: 20px;
    }

    .detail-main {
        grid-template-columns: 1fr;
        padding-top: 28px;
    }

    .related-card {
        position: static;
    }
}

@media (max-width: 720px) {
    .site-header__inner,
    .detail-main,
    .site-footer {
        padding-left: 16px;
        padding-right: 16px;
    }

    .article-hero,
    .article-content,
    .related-card {
        padding: 22px 18px;
    }

    .article-hero__top {
        flex-direction: column;
        align-items: stretch;
    }

    .back-link,
    .copy-link-btn {
        justify-content: center;
    }

    .article-summary {
        font-size: 1rem;
    }

    .article-content {
        font-size: 1rem;
    }

    .site-nav {
        width: 100%;
    }
}
