/* ── RESET & BASE ── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --cream: #F5F0E8;
    --dark: #1A1714;
    --amber: #C4620A;
    --amber-light: #E07B2A;
    --muted: #8A7F72;
    --border: #DDD5C5;
    --card-bg: #FDFAF5;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--cream);
    color: var(--dark);
    min-height: 100vh;
    animation: fadeIn 0.6s ease forwards;
    opacity: 0;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

a {
    color: var(--amber);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--amber-light);
}

/* ── DARK MODE ── */
.dark {
    --cream: #141210;
    --dark: #F0EBE3;
    --card-bg: #1E1B17;
    --border: #302B26;
    --muted: #948979;
}

.dark .site-nav {
    background: rgba(20, 18, 16, 0.92);
}

.dark .btn-search,
.dark .theme-toggle {
    background: #1E1B17;
    border-color: #302B26;
    color: #948979;
}

.dark .search-shortcut {
    background: #2A2520;
    color: #746A5E;
}

.dark .btn-subscribe {
    background: var(--amber);
    color: white;
}

.dark .btn-coffee {
    background: #FFDD00;
    color: #1A1714;
}

.dark .subscribe-box {
    background: #1E1B17;
    border: 1px solid #302B26;
}

.dark .subscribe-title {
    color: #F0EBE3;
}

.dark .subscribe-desc {
    color: #948979;
}

.dark .subscribe-box input[type="email"] {
    background: #141210;
    border-color: #302B26;
    color: #F0EBE3;
}

.dark .post-featured {
    background: #1E1B17;
}

.dark .post-row:hover {
    background: rgba(196, 98, 10, 0.06);
}

.dark .post-row-num {
    color: #302B26;
}

.dark .filter-tab {
    border-color: #302B26;
    color: #948979;
}

.dark .filter-tab.active {
    background: #F0EBE3;
    color: #141210;
    border-color: #F0EBE3;
}

.dark .filter-tab:hover {
    border-color: var(--amber);
    color: #F0EBE3;
}

.dark .author-card,
.dark .tag-cloud {
    background: #1E1B17;
    border-color: #302B26;
}

.dark .pagination a {
    border-color: #302B26;
    color: #948979;
}

.dark .post-author-block {
    background: #1E1B17;
    border-color: #302B26;
}

/* ── NAV ── */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(245, 240, 232, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--dark);
}

.avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--amber), #8B3A00);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-letter {
    display: block;
    width: 1ch;
    overflow: hidden;
    text-transform: uppercase;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--dark);
    line-height: 1;
}

.brand-sub {
    font-size: 11px;
    color: var(--muted);
    margin-top: 2px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 12px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
    transition: color 0.2s;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--dark);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--amber);
    border-radius: 2px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-search {
    display: flex;
    align-items: center;
    gap: 6px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 13px;
    color: var(--muted);
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
    font-family: 'DM Sans', sans-serif;
}

.btn-search:hover {
    border-color: var(--amber);
    color: var(--dark);
}

.search-shortcut {
    font-size: 10px;
    background: #eee;
    padding: 1px 5px;
    border-radius: 4px;
    color: #888;
}

.theme-toggle {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: border-color 0.2s;
    font-family: inherit;
}

.theme-toggle:hover {
    border-color: var(--amber);
}

.btn-subscribe {
    background: var(--amber);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    font-family: 'DM Sans', sans-serif;
    text-decoration: none;
    display: inline-block;
}

.btn-subscribe:hover {
    background: var(--amber-light);
    transform: translateY(-1px);
    color: white;
}

.btn-coffee:hover {
    transform: translateY(-1px);
    opacity: 0.95;
}

.author-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
}

.author-social a {
    color: var(--muted);
    transition: color 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.author-social a:hover {
    color: var(--amber);
    transform: translateY(-2px);
}

/* ── MAIN LAYOUT ── */
.site-layout {
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 2rem 80px;
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 48px;
    align-items: start;
}

/* ── HOME HEADER ── */
.home-header {
    margin-bottom: 32px;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--amber);
    margin-bottom: 12px;
}

.hero-eyebrow::before {
    content: '';
    width: 20px;
    height: 1px;
    background: var(--amber);
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--dark);
    margin-bottom: 10px;
}

.hero-title em {
    font-style: italic;
    color: var(--amber);
}

.hero-desc {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.7;
    max-width: 60ch;
    margin-bottom: 20px;
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
    font-weight: 500;
}

.hero-stats {
    color: var(--amber);
}

/* ── FILTER TABS ── */
.filter-bar {
    display: flex;
    gap: 6px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--border);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
    color: var(--muted);
    font-family: 'DM Sans', sans-serif;
}

.filter-tab:hover {
    border-color: var(--amber);
    color: var(--dark);
}

.filter-tab.active {
    background: var(--dark);
    color: white;
    border-color: var(--dark);
}

/* ── FEATURED POST ── */
.post-featured {
    display: grid;
    grid-template-columns: 1fr 280px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 16px;
    transition: box-shadow 0.25s, transform 0.25s;
    animation: slideUp 0.5s ease both;
    animation-delay: 0.1s;
    position: relative;
}

.post-featured:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.post-featured-content {
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.post-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--amber);
    margin-bottom: 12px;
}

.icon-star {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

.theme-toggle svg {
    display: block;
}

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

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

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

.post-featured h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    line-height: 1.3;
    color: var(--dark);
    margin-bottom: 12px;
}

.post-featured h2 a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

.post-featured h2 a::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
}

.post-featured h2 a:hover {
    color: var(--amber);
}

.post-featured .post-tag,
.post-featured .post-meta a {
    position: relative;
    z-index: 2;
}

.post-excerpt {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 16px;
}

.post-read-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--amber);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: relative;
    z-index: 2;
    transition: color 0.2s;
}

.post-featured:hover .post-read-more {
    color: var(--amber-light);
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--muted);
    flex-wrap: wrap;
    margin-top: 24px;
}

.post-meta .dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--border);
    flex-shrink: 0;
}

.post-meta .read-time {
    color: var(--amber);
    font-weight: 500;
}

.post-featured-img {
    overflow: hidden;
    position: relative;
    height: 100%;
    min-height: 320px;
}

.post-featured-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.post-featured:hover .post-featured-img img {
    transform: scale(1.04);
}

/* ── POST LIST ── */
.posts-list {
    display: flex;
    flex-direction: column;
}

.post-row {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 20px 8px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.15s;
    border-radius: 8px;
    animation: slideUp 0.5s ease both;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.post-row:hover {
    background: rgba(196, 98, 10, 0.04);
}

.post-row-num {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--border);
    font-weight: 700;
    text-align: center;
    line-height: 1;
}

.post-row-body h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 4px;
    line-height: 1.3;
}

.post-row-body h3 a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

.post-row-body h3 a::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
}

.post-row-body h3 a:hover {
    color: var(--amber);
}

.post-row-body p {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-row-date {
    text-align: right;
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
}

.post-row-date .read-time {
    display: block;
    color: var(--amber);
    font-weight: 500;
    margin-top: 2px;
}

/* ── SIDEBAR ── */
.sidebar {
    position: sticky;
    top: 84px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Author card */
.author-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
    text-align: center;
}

.author-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--amber), #8B3A00);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    font-weight: 700;
    margin: 0 auto 12px;
    overflow: hidden;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.author-card p {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 16px;
}

.btn-coffee {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: #FFDD00;
    color: #1A1714;
    border: none;
    border-radius: 8px;
    padding: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.1s;
    font-family: 'DM Sans', sans-serif;
}

.btn-coffee svg {
    flex-shrink: 0;
}

.btn-coffee:hover {
    opacity: 0.85;
    transform: translateY(-1px);
    color: #1A1714;
}

/* Tag cloud */
.tag-cloud {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
}

.tag-cloud h4 {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 12px;
}

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

.tag {
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 12px;
    color: var(--muted);
    text-decoration: none;
    transition: all 0.2s;
    display: inline-block;
}

.tag:hover {
    border-color: var(--amber);
    color: var(--amber);
}

.tags-empty {
    font-size: 12px;
    color: var(--muted);
    font-style: italic;
}

.subscribe-alt {
    font-size: 12px;
    color: var(--muted);
    margin-top: 12px;
}

.subscribe-alt a {
    color: var(--amber);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Subscribe box */
.subscribe-box {
    background: var(--dark);
    border-radius: 14px;
    padding: 24px;
    text-align: center;
}

.subscribe-title {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    color: white;
    margin-bottom: 8px;
}

.subscribe-desc {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 16px;
    line-height: 1.6;
}

.subscribe-box input[type="email"] {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    color: white;
    font-size: 13px;
    font-family: 'DM Sans', sans-serif;
    margin-bottom: 8px;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}

.subscribe-box input[type="email"]:focus {
    border-color: var(--amber);
    background: rgba(255, 255, 255, 0.12);
}

.subscribe-box .btn-subscribe {
    width: 100%;
    padding: 10px;
    display: block;
}

.form-success {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #7EC8A4;
    font-size: 13px;
    margin-top: 8px;
}

.form-error {
    color: #E07B7B;
    font-size: 13px;
    margin-top: 8px;
}

.subscribe-box .btn-subscribe {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* ── SINGLE POST ── */
.post-single {
    max-width: 100%;
}

.post-header {
    margin-bottom: 32px;
}

.post-meta-top {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 16px;
}

.post-meta-top .post-tag {
    font-size: 11px;
}

.post-meta-top .read-time {
    color: var(--amber);
    font-weight: 500;
}

.post-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--dark);
    margin-bottom: 12px;
}

.post-subtitle {
    font-size: 1.1rem;
    color: var(--muted);
    line-height: 1.6;
}

.post-feature-image {
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 32px;
}

.post-feature-image img {
    width: 100%;
    height: auto;
    display: block;
}

.post-feature-image figcaption {
    text-align: center;
    font-size: 12px;
    color: var(--muted);
    padding: 8px 0;
}

.post-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--dark);
}

.post-content h2,
.post-content h3 {
    font-family: 'Playfair Display', serif;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content a {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2rem 0;
}

.post-content blockquote {
    border-left: 3px solid var(--amber);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--muted);
}

.post-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 2rem 0;
}

.post-author-block {
    margin: 3rem 0;
    padding: 32px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.author-block {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.author-block .author-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    background: linear-gradient(135deg, var(--amber), #8B3A00);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    font-weight: 700;
}

.author-block .author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-info {
    flex: 1;
}

.author-info h4 {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.2;
}

.author-info h4 a {
    color: var(--dark);
    text-decoration: none;
    transition: color 0.2s;
}

.author-info h4 a:hover {
    color: var(--amber);
}

.author-info p {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.6;
    margin: 0;
}

.author-block .author-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--amber);
    text-decoration: none;
    transition: gap 0.2s;
}

.author-block .author-link:hover {
    gap: 8px;
}

.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.post-nav-link {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 20px;
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
}

.post-nav-link:hover {
    border-color: var(--amber);
    background: var(--card-bg);
}

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

.post-nav-label {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.post-nav-title {
    font-family: 'Playfair Display', serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── PAGINATION ── */
.pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    padding: 40px 0 20px;
}

.pagination a {
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    color: var(--muted);
    transition: all 0.2s;
}

.pagination a:hover {
    border-color: var(--amber);
    color: var(--dark);
}

/* ── KOENIG EDITOR ── */
.kg-width-wide {
    position: relative;
    width: 85vw;
    min-width: 100%;
    margin-left: calc(50% - 42.5vw);
    margin-right: calc(50% - 42.5vw);
}

.kg-width-full {
    position: relative;
    width: 100vw;
    min-width: 100%;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.kg-bookmark-card {
    width: 100%;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border);
    margin: 2rem 0;
}

.kg-bookmark-container {
    display: flex;
    color: var(--dark);
    text-decoration: none;
    min-height: 140px;
}

.kg-bookmark-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.5rem;
    flex: 1 1 auto;
}

.kg-bookmark-title {
    font-size: 1rem;
    font-weight: 600;
}

.kg-bookmark-description {
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 0.5rem;
    line-height: 1.5;
}

.kg-bookmark-metadata {
    display: flex;
    align-items: center;
    margin-top: 1rem;
    font-size: 0.8rem;
}

.kg-bookmark-icon {
    width: 22px;
    height: 22px;
    margin-right: 8px;
}

.kg-bookmark-author,
.kg-bookmark-publisher {
    color: var(--muted);
}

.kg-bookmark-thumbnail {
    flex: 0 0 30%;
    position: relative;
}

.kg-bookmark-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0 12px 12px 0;
    margin: 0;
}

.kg-gallery-container {
    display: flex;
    flex-direction: column;
    margin: 2rem 0;
}

.kg-gallery-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
}

.kg-gallery-image img {
    display: block;
    margin: 0;
    width: 100%;
    height: 100%;
}

.kg-gallery-row:not(:first-of-type) {
    margin-top: 0.5rem;
}

.kg-gallery-image:not(:first-of-type) {
    margin-left: 0.5rem;
}

/* ── ACCESSIBILITY ── */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 999;
    background: var(--amber);
    color: white;
    padding: 8px 16px;
    border-radius: 0 0 8px 8px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 0;
}

/* ── READING PROGRESS ── */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 200;
    background: transparent;
}

.reading-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--amber), var(--amber-light));
    transition: width 0.1s linear;
    border-radius: 0 2px 2px 0;
}

/* ── FOOTER ── */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 24px 2rem;
    text-align: center;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
    flex-wrap: wrap;
}

.footer-inner a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-inner a:hover {
    color: var(--amber);
}

.footer-sep {
    color: var(--border);
}

/* ── ERROR PAGE ── */
.error-page {
    text-align: center;
    padding: 80px 0;
}

.error-code {
    font-family: 'Playfair Display', serif;
    font-size: clamp(4rem, 10vw, 8rem);
    font-weight: 700;
    color: var(--border);
    line-height: 1;
    margin-bottom: 8px;
}

.error-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 12px;
}

.error-desc {
    font-size: 15px;
    color: var(--muted);
    margin-bottom: 24px;
    line-height: 1.6;
}

/* ── ARCHIVE HEADERS (tag.hbs, author.hbs) ── */
.archive-header {
    margin-bottom: 32px;
}

/* ── CUSTOM LOG TIMELINE ── */
.log-header {
    text-align: center;
    margin-bottom: 48px;
}

.log-timeline {
    position: relative;
    max-width: 680px;
    margin: 48px auto 0;
}

.log-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 24px;
    width: 2px;
    background: var(--border);
    z-index: 0;
}

.log-entry {
    position: relative;
    padding-left: 64px;
    margin-bottom: 40px;
    z-index: 1;
}

.log-entry::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 19px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--amber);
    box-shadow: 0 0 0 4px var(--bg);
}

.log-date {
    font-size: 12px;
    color: var(--muted);
    font-weight: 500;
    margin-bottom: 8px;
    font-family: 'DM Sans', sans-serif;
}

.log-body {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
}

.log-body p:last-child {
    margin-bottom: 0;
}

.log-empty {
    text-align: center;
    color: var(--muted);
    font-style: italic;
}

.archive-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--amber);
    margin-bottom: 12px;
}

.archive-eyebrow::before {
    content: '';
    width: 20px;
    height: 1px;
    background: var(--amber);
}

.archive-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}

.archive-desc {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.7;
    max-width: 50ch;
}

.archive-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 12px;
}

/* ── GH-CONTENT (Koenig rich formatting) ── */
.gh-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.gh-content h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.gh-content h4,
.gh-content h5,
.gh-content h6 {
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.gh-content p {
    margin-bottom: 1.5rem;
}

.gh-content a {
    color: var(--amber);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

.gh-content a:hover {
    color: var(--amber-light);
}

.gh-content strong {
    font-weight: 600;
}

.gh-content ul,
.gh-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.gh-content li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.gh-content li::marker {
    color: var(--amber);
}

.gh-content blockquote {
    border-left: 3px solid var(--amber);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--muted);
    font-size: 1.1rem;
    line-height: 1.7;
}

.gh-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2rem 0;
}

.gh-content figcaption {
    text-align: center;
    font-size: 12px;
    color: var(--muted);
    margin-top: -1rem;
    margin-bottom: 2rem;
    padding: 0 1rem;
}

.gh-content hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 3rem 0;
}

.gh-content pre {
    background: #1E1B17;
    color: #F0EBE3;
    padding: 1.25rem;
    border-radius: 12px;
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 2rem 0;
    border: 1px solid #302B26;
}

.gh-content code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.88em;
}

.gh-content p code,
.gh-content li code {
    background: rgba(196, 98, 10, 0.08);
    color: var(--amber);
    padding: 2px 6px;
    border-radius: 4px;
}

.gh-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.9rem;
}

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

.gh-content th {
    background: var(--card-bg);
    font-weight: 600;
}

.gh-content iframe {
    width: 100%;
    border-radius: 12px;
    margin: 2rem 0;
}

/* ── COMMENTS ── */
.post-comments {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

/* ── RESPONSIVE: TABLET ── */
@media (max-width: 900px) {
    .site-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .sidebar {
        position: static;
    }

    .post-featured {
        grid-template-columns: 1fr;
    }

    .post-featured-img {
        min-height: 200px;
    }

    .post-nav {
        grid-template-columns: 1fr;
    }
}

/* ── RESPONSIVE: MOBILE ── */
@media (max-width: 640px) {

    /* Navbar */
    .site-nav {
        padding: 0 12px;
        height: 56px;
        gap: 8px;
    }

    .nav-brand {
        gap: 8px;
        min-width: 0;
        flex: 1;
    }

    .avatar {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }

    .avatar svg {
        width: 16px;
        height: 16px;
    }

    .brand-name {
        font-size: 13px;
    }

    .brand-sub {
        display: none;
    }

    .nav-links {
        display: none;
    }

    .nav-right {
        gap: 8px;
        flex-shrink: 0;
    }

    .btn-search {
        padding: 5px 8px;
        font-size: 0;
        gap: 0;
    }

    .btn-search svg {
        width: 15px;
        height: 15px;
    }

    .search-shortcut {
        display: none;
    }

    .theme-toggle {
        width: 30px;
        height: 30px;
    }

    .btn-subscribe {
        padding: 6px 12px;
        font-size: 12px;
    }

    /* Layout */
    .site-layout {
        padding: 20px 16px 48px;
        gap: 32px;
    }

    /* Hero */
    .home-header {
        margin-bottom: 20px;
    }

    .hero-eyebrow {
        font-size: 10px;
        margin-bottom: 8px;
    }

    .hero-title {
        font-size: 1.6rem;
        margin-bottom: 6px;
    }

    .hero-desc {
        font-size: 14px;
    }

    /* Filter tabs */
    .filter-bar {
        margin-bottom: 16px;
        gap: 5px;
    }

    .filter-tab {
        padding: 5px 12px;
        font-size: 12px;
    }

    /* Featured post */
    .post-featured {
        border-radius: 12px;
        margin-bottom: 12px;
    }

    .post-featured-content {
        padding: 20px 16px;
    }

    .post-featured h2 {
        font-size: 1.2rem;
        margin-bottom: 8px;
    }

    .post-excerpt {
        font-size: 13px;
        margin-bottom: 16px;
    }

    .post-meta {
        font-size: 11px;
        gap: 6px;
    }

    .post-featured-img {
        min-height: 180px;
    }

    .post-featured-img img {
        min-height: 180px;
    }

    /* Post list */
    .post-row {
        grid-template-columns: 36px 1fr;
        gap: 10px;
        padding: 14px 4px;
    }

    .post-row-num {
        font-size: 1.4rem;
    }

    .post-row-body h3 {
        font-size: 0.9rem;
    }

    .post-row-date {
        display: none;
    }

    /* Single post */
    .post-title {
        font-size: 1.5rem;
    }

    .post-subtitle {
        font-size: 0.95rem;
    }

    .post-feature-image {
        border-radius: 10px;
        margin-bottom: 24px;
    }

    .post-content {
        font-size: 0.95rem;
    }

    /* Author block */
    .post-author-block {
        padding: 20px 16px;
        border-radius: 12px;
        margin: 2rem 0;
    }

    .author-block {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
    }

    .author-block .author-avatar {
        width: 48px;
        height: 48px;
        font-size: 18px;
    }

    .author-info h4 {
        font-size: 1rem;
    }

    .author-info p {
        font-size: 13px;
    }

    .author-block .author-link {
        justify-content: center;
    }

    /* Post nav */
    .post-nav {
        gap: 10px;
    }

    .post-nav-link {
        padding: 12px 14px;
        border-radius: 10px;
    }

    .post-nav-title {
        font-size: 0.85rem;
    }

    /* Sidebar cards */
    .author-card,
    .tag-cloud,
    .subscribe-box {
        border-radius: 12px;
        padding: 20px 16px;
    }

    .author-avatar {
        width: 52px;
        height: 52px;
        font-size: 20px;
    }

    .tags {
        gap: 5px;
    }

    .tag {
        font-size: 11px;
        padding: 3px 8px;
    }

    /* Pagination */
    .pagination {
        padding: 24px 0 16px;
    }

    .pagination a {
        padding: 6px 12px;
        font-size: 12px;
    }

    /* Archive */
    .archive-title {
        font-size: 1.4rem;
    }

    .archive-avatar {
        width: 56px;
        height: 56px;
    }

    /* Error page */
    .error-page {
        padding: 48px 0;
    }

    .error-code {
        font-size: 4rem;
    }

    /* Footer */
    .site-footer {
        padding: 16px 1rem;
    }

    .footer-inner {
        font-size: 12px;
    }
}