:root {
    --bg: #fbf6ec;
    --bg-soft: #f3eadb;
    --card: #fffaf1;
    --card-strong: #efe1ca;
    --text: #241b14;
    --muted: #745f4f;
    --line: #e1d1ba;
    --gold: #b88738;
    --gold-dark: #7b5520;
    --green: #5f7254;
    --sepia: #9f6f47;
    --shadow: 0 24px 70px rgba(70, 45, 24, 0.11);
    --shadow-soft: 0 14px 38px rgba(70, 45, 24, 0.09);
    --radius: 8px;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --gh-font-heading: var(--font-sans);
    --gh-font-body: var(--font-sans);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background:
        linear-gradient(180deg, rgba(255, 250, 241, 0.72), rgba(251, 246, 236, 0) 340px),
        radial-gradient(circle at 10% 0%, rgba(184, 135, 56, 0.12), transparent 28%),
        var(--bg);
    color: var(--text);
    font-family: var(--gh-font-body);
    font-size: 18px;
    line-height: 1.7;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
a:hover { color: var(--gold-dark); }
img { display: block; max-width: 100%; height: auto; }
button, input, textarea { font: inherit; }

.container { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.narrow { width: min(720px, calc(100% - 40px)); }
.site-shell { min-height: 100vh; display: flex; flex-direction: column; }
.site-main { flex: 1; }
.skip-link {
    position: fixed;
    left: 16px;
    top: 16px;
    z-index: 100;
    transform: translateY(-150%);
    background: var(--text);
    color: #fff;
    padding: 10px 14px;
    border-radius: var(--radius);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(251, 246, 236, 0.88);
    border-bottom: 1px solid rgba(126, 91, 53, 0.14);
    backdrop-filter: blur(16px);
}
.header-inner { min-height: 76px; display: flex; align-items: center; gap: 24px; }
.site-brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 760; text-decoration: none; white-space: nowrap; }
.brand-mark {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 248, 233, 0.42);
    border-radius: 50%;
    background:
        linear-gradient(145deg, rgba(255, 248, 233, 0.18), transparent 42%),
        linear-gradient(145deg, #d8b77a, #8b5d23);
    color: #fff8e9;
    font-size: 13px;
    letter-spacing: 0;
    box-shadow: inset 0 0 0 1px rgba(36, 27, 20, 0.09), 0 8px 22px rgba(70, 45, 24, 0.13);
}
.site-logo { width: auto; max-height: 42px; }
.brand-text { font-size: 20px; }
.site-nav { margin-left: auto; }
.nav { display: flex; align-items: center; gap: 22px; margin: 0; padding: 0; list-style: none; font-size: 15px; font-weight: 650; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover, .nav-current a { color: var(--text); }
.header-cta, .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 720;
    text-decoration: none;
}
.header-cta, .button-primary { background: var(--text); color: #fff8e9; box-shadow: 0 12px 24px rgba(36, 27, 20, 0.16); }
.header-cta:hover, .button-primary:hover { color: #fff; background: #3a2a1e; }
.button-secondary { border: 1px solid rgba(126, 91, 53, 0.24); background: rgba(255, 250, 241, 0.72); color: var(--text); }
.nav-toggle { display: none; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 9px; }
.nav-toggle span { display: block; height: 2px; margin: 5px 0; background: var(--text); border-radius: 2px; }

.blog-hero { padding: 52px 0 42px; }
.hero-panel {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(184, 135, 56, 0.25);
    border-radius: 8px;
    background:
        radial-gradient(circle at 12% 16%, rgba(184, 135, 56, 0.18), transparent 28%),
        linear-gradient(135deg, #fff8ed 0%, #f4e6d0 54%, #e7d5bb 100%);
    box-shadow: var(--shadow);
    padding: clamp(42px, 7vw, 92px);
    min-height: 520px;
    display: flex;
    align-items: center;
}
.hero-panel::before,
.hero-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.hero-panel::before {
    background-image:
        linear-gradient(90deg, rgba(95, 114, 84, 0.12) 1px, transparent 1px),
        linear-gradient(rgba(95, 114, 84, 0.10) 1px, transparent 1px);
    background-size: 68px 68px;
    mask-image: linear-gradient(90deg, transparent, #000 45%, transparent);
}
.hero-panel::after {
    width: 48%;
    left: auto;
    background:
        linear-gradient(rgba(95, 114, 84, 0.20), rgba(95, 114, 84, 0.20)) 28% 50% / 1px 76% no-repeat,
        linear-gradient(90deg, rgba(95, 114, 84, 0.20), rgba(95, 114, 84, 0.20)) 28% 23% / 42% 1px no-repeat,
        linear-gradient(90deg, rgba(95, 114, 84, 0.20), rgba(95, 114, 84, 0.20)) 28% 50% / 56% 1px no-repeat,
        linear-gradient(90deg, rgba(95, 114, 84, 0.20), rgba(95, 114, 84, 0.20)) 28% 77% / 36% 1px no-repeat;
    opacity: 0.9;
}
.hero-copy { position: relative; z-index: 2; max-width: 690px; }
.eyebrow { margin: 0 0 12px; color: var(--gold-dark); font-size: 13px; font-weight: 780; letter-spacing: 0.06em; text-transform: uppercase; }
h1, h2, h3, h4 { margin: 0; color: var(--text); line-height: 1.14; letter-spacing: 0; }
.article-content .kg-width-wide {
    width: min(1040px, calc(100vw - 40px));
    max-width: none;
    margin-left: 50%;
    transform: translateX(-50%);
}
.article-content .kg-width-full {
    width: 100vw;
    max-width: none;
    margin-left: 50%;
    transform: translateX(-50%);
}
.hero-copy h1 { font-size: clamp(42px, 7vw, 76px); max-width: 820px; }
.hero-copy p:not(.eyebrow) { max-width: 640px; margin: 22px 0 0; color: var(--muted); font-size: 21px; line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-archive {
    position: absolute;
    right: clamp(30px, 6vw, 78px);
    bottom: clamp(28px, 5vw, 64px);
    z-index: 1;
    width: min(330px, 32vw);
    height: 330px;
    pointer-events: none;
}
.archive-photo,
.archive-note {
    position: absolute;
    display: block;
    border: 1px solid rgba(126, 91, 53, 0.22);
    border-radius: 6px;
    background: #fffaf1;
    box-shadow: 0 18px 42px rgba(70, 45, 24, 0.13);
}
.archive-photo::before {
    content: "";
    position: absolute;
    inset: 14px;
    border-radius: 4px;
    background:
        linear-gradient(135deg, rgba(95, 114, 84, 0.24), rgba(184, 135, 56, 0.13)),
        linear-gradient(90deg, transparent 48%, rgba(36, 27, 20, 0.11) 49%, rgba(36, 27, 20, 0.11) 51%, transparent 52%),
        radial-gradient(circle at 52% 36%, rgba(36, 27, 20, 0.18) 0 12px, transparent 13px),
        radial-gradient(ellipse at 50% 76%, rgba(36, 27, 20, 0.16) 0 42px, transparent 43px);
}
.archive-photo-one {
    top: 18px;
    right: 42px;
    width: 172px;
    height: 214px;
    transform: rotate(4deg);
}
.archive-photo-two {
    left: 6px;
    bottom: 34px;
    width: 152px;
    height: 184px;
    transform: rotate(-7deg);
}
.archive-note {
    right: 0;
    bottom: 10px;
    padding: 18px 20px;
    color: #7c6047;
    font-size: 15px;
    font-weight: 760;
    line-height: 1.5;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.section { padding: 58px 0; }
.section-heading { max-width: 720px; margin-bottom: 28px; }
.section-heading h2 { max-width: 620px; font-size: clamp(28px, 4vw, 44px); }
.post-grid, .featured-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.featured-grid .post-card:first-child { grid-column: span 2; }
.featured-grid .post-card:first-child .post-card-image-link { aspect-ratio: 16 / 9; }
.featured-grid .post-card:first-child .post-card-title { font-size: clamp(28px, 4vw, 42px); }
.featured-grid .post-card:first-child .post-card-content { padding: 28px; }
.post-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(126, 91, 53, 0.16);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow-soft);
    transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}
.post-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), rgba(95, 114, 84, 0.58), transparent);
    opacity: 0;
    transition: opacity 220ms ease;
}
.post-card:hover {
    transform: translateY(-3px);
    border-color: rgba(126, 91, 53, 0.28);
    box-shadow: 0 22px 52px rgba(70, 45, 24, 0.13);
}
.post-card:hover::before { opacity: 1; }
.post-card-image-link { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--card-strong); text-decoration: none; }
.post-card-image { width: 100%; height: 100%; object-fit: cover; transition: transform 300ms ease; }
.post-card:hover .post-card-image { transform: scale(1.035); }
.post-card-placeholder {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(120deg, rgba(184, 135, 56, 0.18), rgba(95, 114, 84, 0.18)),
        radial-gradient(circle at 34% 32%, rgba(36, 27, 20, 0.12) 0 22px, transparent 23px),
        radial-gradient(ellipse at 50% 72%, rgba(36, 27, 20, 0.10) 0 72px, transparent 73px),
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.22) 0 8px, transparent 8px 16px);
}
.post-card-placeholder::before {
    content: "";
    position: absolute;
    inset: 22px;
    border: 1px solid rgba(126, 91, 53, 0.20);
    border-radius: 6px;
}
.post-card-placeholder span {
    position: relative;
    z-index: 1;
    padding: 8px 12px;
    border: 1px solid rgba(126, 91, 53, 0.22);
    border-radius: 999px;
    background: rgba(255, 250, 241, 0.74);
    color: #7b5520;
    font-size: 13px;
    font-weight: 780;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.post-card-content { padding: 22px; }
.post-card-tag, .article-tag {
    display: inline-flex;
    margin-bottom: 12px;
    color: var(--gold-dark);
    font-size: 13px;
    font-weight: 780;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.post-card-title { font-size: 24px; line-height: 1.22; }
.post-card-title a { text-decoration: none; }
.post-card-excerpt { margin: 12px 0 0; color: var(--muted); font-size: 16px; line-height: 1.65; }
.post-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(126, 91, 53, 0.13);
    color: #876f5b;
    font-size: 14px;
}

.topic-section {
    background:
        linear-gradient(180deg, rgba(255, 250, 241, 0.45), rgba(246, 237, 220, 0.92)),
        #f6eddc;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.topic-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.topic-card {
    position: relative;
    min-height: 156px;
    padding: 22px;
    border: 1px solid rgba(126, 91, 53, 0.16);
    border-radius: var(--radius);
    background: rgba(255, 250, 241, 0.78);
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(70, 45, 24, 0.05);
    transition: transform 200ms ease, border-color 200ms ease, background 200ms ease;
}
.topic-card:hover {
    transform: translateY(-2px);
    border-color: rgba(126, 91, 53, 0.28);
    background: #fffaf1;
}
.topic-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-bottom: 18px;
    border-radius: 50%;
    background: #efe1ca;
    color: var(--gold-dark);
    font-size: 12px;
    font-weight: 820;
    letter-spacing: 0.04em;
}
.topic-card strong { display: block; font-size: 20px; font-weight: 780; line-height: 1.25; }
.topic-card small { display: block; margin-top: 12px; color: var(--muted); font-size: 15px; line-height: 1.6; }

.article-header {
    position: relative;
    padding: 66px 0 28px;
    text-align: center;
}
.article-header::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 260px;
    background:
        radial-gradient(circle at 50% 0%, rgba(184, 135, 56, 0.15), transparent 34%),
        linear-gradient(180deg, rgba(243, 234, 219, 0.72), transparent);
    pointer-events: none;
}
.article-header > * { position: relative; z-index: 1; }
.article-header h1 { font-size: clamp(38px, 6vw, 68px); }
.article-excerpt { margin: 20px auto 0; color: var(--muted); font-size: 22px; line-height: 1.65; }
.article-meta {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    padding: 9px 14px;
    border: 1px solid rgba(126, 91, 53, 0.16);
    border-radius: 999px;
    background: rgba(255, 250, 241, 0.70);
    color: #806956;
    font-size: 15px;
}
.article-meta a { font-weight: 680; text-decoration: none; }
.article-image { margin-top: 36px; }
.article-image img { width: 100%; max-height: 680px; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.article-image figcaption, .kg-card figcaption { margin-top: 10px; color: #876f5b; font-size: 14px; text-align: center; }
.article-content {
    width: min(720px, calc(100% - 40px));
    margin: 42px auto 0;
    color: #31251b;
    font-size: 20px;
    line-height: 1.85;
}
.article-content > * { margin-top: 0; margin-bottom: 28px; }
.article-content h2 { margin-top: 48px; font-size: 34px; }
.article-content h3 { margin-top: 38px; font-size: 26px; }
.article-content p, .article-content li { color: #382a20; }
.article-content a { color: var(--gold-dark); font-weight: 650; }
.article-content blockquote {
    margin: 38px 0;
    padding: 28px 30px;
    border-left: 4px solid var(--gold);
    background: #f6eddc;
    border-radius: 0 var(--radius) var(--radius) 0;
    color: #4b3828;
    font-size: 22px;
    line-height: 1.65;
    box-shadow: 0 12px 32px rgba(70, 45, 24, 0.06);
}
.article-content table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; font-size: 16px; }
.article-content th, .article-content td { padding: 12px 14px; border: 1px solid var(--line); text-align: left; }
.article-content th { background: #efe1ca; }
.article-content .kg-image-card img, .article-content .kg-gallery-image img { border-radius: var(--radius); }
.article-content .kg-callout-card { border-radius: var(--radius); }
.article-footer { padding: 18px 0 24px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-list a {
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--card);
    color: var(--muted);
    font-size: 14px;
    text-decoration: none;
}
.post-navigation { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 28px 0 48px; }
.post-nav-card { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); text-decoration: none; }
.post-nav-card small { display: block; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; }
.post-nav-card span { display: block; margin-top: 6px; font-weight: 760; line-height: 1.35; }
.next { text-align: right; }
.archive-header { padding: 64px 0 18px; text-align: center; }
.archive-header h1 { font-size: clamp(38px, 6vw, 64px); }
.archive-header p:not(.eyebrow) { margin: 18px auto 0; color: var(--muted); font-size: 20px; }
.author-avatar { width: 92px; height: 92px; margin: 0 auto 18px; border-radius: 50%; object-fit: cover; }
.pagination { display: flex; justify-content: center; gap: 14px; margin-top: 34px; color: var(--muted); font-size: 15px; }
.pagination a { font-weight: 720; text-decoration: none; }

.site-footer {
    position: relative;
    overflow: hidden;
    padding: 64px 0 30px;
    background:
        linear-gradient(135deg, rgba(184, 135, 56, 0.10), transparent 34%),
        #241b14;
    color: #f8ead7;
}
.site-footer::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(90deg, rgba(248, 234, 215, 0.05) 1px, transparent 1px),
        linear-gradient(rgba(248, 234, 215, 0.04) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: linear-gradient(90deg, transparent, #000 40%, transparent);
    pointer-events: none;
}
.site-footer > * { position: relative; z-index: 1; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 36px; }
.site-footer h2 { color: #fff8e9; font-size: 20px; }
.site-footer p, .footer-list { color: #d8c4ab; font-size: 15px; }
.footer-list { margin: 14px 0 0; padding: 0; list-style: none; }
.footer-list li + li { margin-top: 8px; }
.site-footer a { color: #f8ead7; text-decoration: none; }
.footer-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.footer-actions a { padding: 8px 12px; border: 1px solid rgba(248, 234, 215, 0.25); border-radius: var(--radius); }
.footer-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(248, 234, 215, 0.16); }
.footer-bottom p { margin: 0; }

@media (max-width: 980px) {
    .header-inner { gap: 14px; }
    .nav-toggle { display: inline-block; margin-left: auto; }
    .site-nav {
        position: absolute;
        top: 76px;
        left: 20px;
        right: 20px;
        display: none;
        margin: 0;
        padding: 18px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--card);
        box-shadow: var(--shadow);
    }
    .site-nav.is-open { display: block; }
    .nav { display: grid; gap: 12px; }
    .header-cta { display: none; }
    .post-grid, .featured-grid, .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .featured-grid .post-card:first-child { grid-column: span 2; }
    .hero-panel { min-height: auto; }
    .hero-panel::after { opacity: 0.24; }
    .hero-archive { opacity: 0.38; right: 20px; width: 260px; height: 260px; }
}

@media (max-width: 680px) {
    body { font-size: 17px; }
    .container, .narrow, .article-content { width: min(100% - 28px, 720px); }
    .header-inner { min-height: 68px; }
    .brand-text { font-size: 18px; }
    .site-nav { top: 68px; left: 14px; right: 14px; }
    .blog-hero { padding-top: 24px; }
    .hero-panel { padding: 32px 22px; }
    .hero-archive { display: none; }
    .hero-copy h1 { font-size: 38px; }
    .hero-copy p:not(.eyebrow) { font-size: 18px; }
    .section { padding: 36px 0; }
    .section-heading { display: block; }
    .post-grid, .featured-grid, .topic-grid, .post-navigation, .footer-grid { grid-template-columns: 1fr; }
    .featured-grid .post-card:first-child { grid-column: auto; }
    .article-header { padding-top: 38px; }
    .article-excerpt { font-size: 19px; }
    .article-content { font-size: 18px; line-height: 1.82; }
    .article-content h2 { font-size: 28px; }
    .next { text-align: left; }
}
