:root {
    --bg: #f5f4f2;
    --white: #ffffff;
    --black: #000000;
    --text: #272824;
    --muted: rgba(39, 40, 36, 0.64);
    --border: rgba(210, 208, 204, 0.55);
    --lime: #cefe24;
    --lime-hover: #b8e820;
    --lime-text: #272824;
    --tile-radius: 20px;
    --shadow: 0 2px 16px rgba(39, 40, 36, 0.06);
    --max-w: 1120px;
    --sidebar-w: 280px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Manrope', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }

.header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(245, 244, 242, 0.72); backdrop-filter: blur(22px);
    border-bottom: 1px solid rgba(255,255,255,0.42);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.55), 0 8px 32px rgba(39,40,36,0.06);
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 64px; width: min(1600px, 100% - 32px); margin-inline: auto;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.05rem; }
.logo-icon {
    width: 36px; height: 36px; border-radius: 50%; background: var(--black);
    color: var(--lime); display: grid; place-items: center; font-size: 0.72rem;
}
.header-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.header-link { padding: 10px 14px; border-radius: 999px; font-size: 0.875rem; font-weight: 600; }
.header-link:hover { background: rgba(39,40,36,0.06); }
.header-link.is-active { background: rgba(206,254,36,0.35); }

.blog-container { width: min(var(--max-w), 100% - 32px); margin-inline: auto; }

.page-top { padding: 36px 0 28px; }
.breadcrumbs { font-size: 0.82rem; color: var(--muted); margin-bottom: 12px; }
.breadcrumbs a:hover { text-decoration: underline; }
.page-top h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800; letter-spacing: -0.03em; line-height: 1.15;
}
.page-top .lead { color: var(--muted); margin-top: 10px; font-size: 1rem; max-width: 640px; }

.blog-hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 12px; border-radius: 999px; margin-bottom: 14px;
    background: rgba(206,254,36,0.22); font-size: 0.78rem; font-weight: 800;
    letter-spacing: 0.04em; text-transform: uppercase;
}

/* Layout with sidebar */
.blog-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--sidebar-w);
    gap: 28px;
    align-items: start;
    padding-bottom: 72px;
}
@media (max-width: 960px) {
    .blog-layout { grid-template-columns: 1fr; }
}

.blog-main { min-width: 0; }

/* Sidebar */
.blog-sidebar {
    position: sticky;
    top: 84px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
@media (max-width: 960px) {
    .blog-sidebar { position: static; }
}

.blog-sidebar-cta {
    background: var(--black);
    color: #fff;
    border-radius: var(--tile-radius);
    padding: 20px 18px;
}
.blog-sidebar-cta-label {
    font-size: 0.72rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: 0.06em; color: var(--lime); margin-bottom: 8px;
}
.blog-sidebar-cta-text {
    font-size: 0.84rem; line-height: 1.45;
    color: rgba(255,255,255,0.72); margin-bottom: 14px;
}
.blog-sidebar-cta-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 11px 16px; border-radius: 12px;
    background: var(--lime); color: var(--lime-text);
    font-size: 0.84rem; font-weight: 800;
}
.blog-sidebar-cta-btn:hover { background: var(--lime-hover); }

.blog-sidebar-block {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--tile-radius);
    box-shadow: var(--shadow);
    padding: 16px 14px;
}
.blog-sidebar-block--muted .blog-sidebar-note {
    font-size: 0.82rem; color: var(--muted); line-height: 1.5;
}
.blog-sidebar-block--muted a {
    color: var(--text); font-weight: 700; text-decoration: underline;
    text-underline-offset: 2px;
}

.blog-sidebar-title {
    font-size: 0.68rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--muted);
    padding: 0 8px 10px; margin-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

.blog-sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
.blog-sidebar-nav a {
    display: block; padding: 8px 10px; border-radius: 10px;
    font-size: 0.84rem; font-weight: 600; color: var(--muted); line-height: 1.35;
    transition: background 0.15s, color 0.15s;
}
.blog-sidebar-nav a:hover {
    background: var(--bg); color: var(--text);
}
.blog-sidebar-nav a.is-active,
.blog-sidebar-nav--toc a.is-active {
    background: rgba(206,254,36,0.18);
    color: var(--text);
    box-shadow: inset 0 0 0 1px rgba(206,254,36,0.35);
}

.blog-sidebar-post-tag {
    display: block; font-size: 0.68rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--muted); margin-bottom: 2px;
}
.blog-sidebar-nav--posts a.is-active .blog-sidebar-post-tag { color: var(--text); }

/* Blog grid (listing) */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.blog-card {
    display: flex; flex-direction: column;
    background: var(--white); border-radius: var(--tile-radius);
    border: 1px solid var(--border); box-shadow: var(--shadow);
    overflow: hidden; transition: transform 0.2s, box-shadow 0.2s;
}
.blog-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(39,40,36,0.1);
}
.blog-card-cover {
    position: relative; aspect-ratio: 16 / 9; overflow: hidden;
    background: #1a1a18;
}
.blog-card-cover img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.35s ease;
}
.blog-card:hover .blog-card-cover img { transform: scale(1.04); }
.blog-card-cover::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.45) 0%, transparent 55%);
    pointer-events: none;
}
.blog-card-cover-tag {
    position: absolute; top: 14px; left: 14px; z-index: 1;
    padding: 5px 10px; border-radius: 999px;
    background: rgba(255,255,255,0.18); backdrop-filter: blur(8px);
    color: #fff; font-size: 0.72rem; font-weight: 700;
}
.blog-card-body { padding: 22px 22px 24px; flex: 1; display: flex; flex-direction: column; }
.blog-card-meta {
    display: flex; flex-wrap: wrap; gap: 10px 16px;
    font-size: 0.78rem; color: var(--muted); margin-bottom: 10px;
}
.blog-card-title {
    font-size: 1.12rem; font-weight: 800; letter-spacing: -0.02em;
    line-height: 1.35; margin-bottom: 10px;
}
.blog-card-excerpt {
    font-size: 0.9rem; color: var(--muted); flex: 1; margin-bottom: 16px;
}
.blog-card-link {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.88rem; font-weight: 800; color: var(--text);
}
.blog-card-link svg { transition: transform 0.2s; }
.blog-card:hover .blog-card-link svg { transform: translateX(3px); }

/* Article */
.article-wrap .page-top { padding-bottom: 20px; }
.article-meta {
    display: flex; flex-wrap: wrap; gap: 10px 18px;
    font-size: 0.82rem; color: var(--muted); margin-top: 12px;
}

.article-hero {
    margin: 0 0 20px; border-radius: var(--tile-radius);
    overflow: hidden; border: 1px solid var(--border);
    box-shadow: var(--shadow); aspect-ratio: 21 / 9;
    background: #1a1a18;
}
.article-hero img {
    width: 100%; height: 100%; object-fit: cover;
}
.article-hero figcaption {
    padding: 10px 16px; font-size: 0.78rem; color: var(--muted);
    background: var(--white); border-top: 1px solid var(--border);
}

.article-content {
    background: var(--white); border-radius: var(--tile-radius);
    border: 1px solid var(--border); box-shadow: var(--shadow);
    padding: 36px 32px;
}
.article-content h2 {
    font-size: 1.15rem; font-weight: 800; margin: 28px 0 12px;
    letter-spacing: -0.02em; scroll-margin-top: 96px;
}
.article-content h2:first-child { margin-top: 0; }
.article-content p { color: var(--muted); margin-bottom: 14px; }
.article-content ul, .article-content ol {
    margin: 0 0 16px 22px; color: var(--muted);
}
.article-content li { margin-bottom: 8px; }
.article-content strong { color: var(--text); font-weight: 700; }
.article-content a { color: var(--text); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.article-content a:hover { color: var(--black); }

.article-figure {
    margin: 20px 0 24px; border-radius: 16px;
    overflow: hidden; border: 1px solid var(--border);
}
.article-figure img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.article-figure figcaption {
    padding: 10px 14px; font-size: 0.78rem; color: var(--muted);
    background: var(--bg); border-top: 1px solid var(--border);
}

.article-tip {
    margin: 24px 0; padding: 18px 20px; border-radius: 16px;
    background: rgba(206,254,36,0.14); border: 1px dashed rgba(39,40,36,0.14);
    font-size: 0.9rem; color: var(--muted);
}
.article-tip strong { display: block; color: var(--text); margin-bottom: 6px; }

.article-cta {
    margin-top: 28px; padding: 24px; border-radius: 18px;
    background: var(--black); color: #fff; text-align: center;
}
.article-cta h3 { font-size: 1.05rem; font-weight: 800; margin-bottom: 8px; }
.article-cta p { color: rgba(255,255,255,0.72); font-size: 0.9rem; margin-bottom: 16px; }
.article-cta-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 22px; border-radius: 14px;
    background: var(--lime); color: var(--lime-text);
    font-weight: 800; font-size: 0.92rem;
}
.article-cta-btn:hover { background: var(--lime-hover); }

.article-nav {
    display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
    margin-top: 24px;
}
.article-nav a {
    font-size: 0.88rem; font-weight: 700; color: var(--muted);
}
.article-nav a:hover { color: var(--text); }

@media (max-width: 640px) {
    .article-content { padding: 24px 20px; }
    .blog-grid { grid-template-columns: 1fr; }
    .article-hero { aspect-ratio: 16 / 10; }
}
