.bp-page { max-width: 72rem; margin: 0 auto; padding: 2rem 1.5rem 4rem; }

/* ── Hero ─────────────────────────── */
.bp-hero { background: var(--surface); border-radius: 1rem; padding: 1.5rem; margin-bottom: 1.5rem; position: relative; overflow: hidden; text-align: center; }
.bp-hero::before { content: ""; position: absolute; inset: 0; border: 1px solid var(--border); border-radius: 1rem; pointer-events: none; }
.bp-site-logo { height: 5rem; width: auto; position: absolute; top: 1rem; left: 1rem; z-index: 1; }
.bp-site-logo-link { display: contents; }
.bp-hero h1 { margin: 0 0 0.35rem; font-size: 1.5rem; color: var(--text-bright); line-height: 1.3; }
.bp-hero-sub { font-size: 0.9rem; color: #9ca3af; margin-bottom: 0.5rem; }
.bp-hero-cta { display: inline-block; background: var(--accent); color: #000; font-weight: 700; font-size: 0.95rem; padding: 0.6rem 1.8rem; border-radius: 0.6rem; text-decoration: none; font-family: var(--font); margin-top: 0.75rem; transition: transform 0.15s, box-shadow 0.15s; box-shadow: 0 4px 14px rgba(249,166,29,0.3); }
.bp-hero-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(249,166,29,0.4); }

/* ── Tags ─────────────────────────── */
.bp-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; padding: 0 0 1.5rem; }
.bp-tag { background: var(--surface); border: 1px solid var(--border); color: var(--text); padding: 0.4rem 1rem; border-radius: 2rem; cursor: pointer; font-size: 0.875rem; font-weight: 600; font-family: var(--font); transition: all 0.2s ease; }
.bp-tag:hover { background: #374151; border-color: #4b5563; color: var(--text-bright); }
.bp-tag--active { background: var(--accent); border-color: var(--accent); color: #141415; }
.bp-tag--active:hover { background: #e8950c; border-color: #e8950c; color: #141415; }

/* ── Card grid ────────────────────── */
.bp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 1.5rem; padding-bottom: 3rem; }

.bc { background: var(--surface); border-radius: 1rem; overflow: hidden; cursor: pointer; transition: transform 0.25s ease, box-shadow 0.25s ease; border: 1px solid var(--border); }
.bc:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.4); border-color: #4b5563; }
.bc-link { display: block; text-decoration: none; color: inherit; -webkit-tap-highlight-color: transparent; }

.bc-img-wrap { position: relative; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface); }
.bc-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease, opacity 0.4s ease; display: block; opacity: 0; }
.bc-img.loaded { opacity: 1; }
.bc:hover .bc-img { transform: scale(1.05); }

.bc-tags-row { position: absolute; top: 0.75rem; right: 0.75rem; display: flex; gap: 0.4rem; }
.bc-tag { background: rgba(249,166,29,0.9); color: #141415; padding: 0.2rem 0.65rem; border-radius: 1rem; font-size: 0.85rem; font-weight: 700; backdrop-filter: blur(4px); }
.bc-reading-time { position: absolute; top: 0.75rem; left: 0.75rem; background: rgba(0,0,0,0.65); color: #e5e7eb; padding: 0.2rem 0.6rem; border-radius: 1rem; font-size: 0.75rem; font-weight: 600; backdrop-filter: blur(4px); display: inline-flex; align-items: center; gap: 0.3rem; }

.bc-body { padding: 1rem 1.25rem 1.25rem; }
.bc-author { display: flex; align-items: center; gap: 0.2rem; margin-bottom: 0.5rem; }
.bc-author-icon { width: 16px; height: 16px; border-radius: 50%; object-fit: cover; }
.bc-author-name { font-size: 0.75rem; color: #9ca3af; font-weight: 500; }

.bc-reviewer { display: flex; align-items: center; flex-wrap: wrap; row-gap: 0.15rem; column-gap: 0; margin-bottom: 0.4rem; margin-top: 0.5rem; font-size: 0.78rem; color: #9ca3af; line-height: 1.4; }
.bc-reviewer-pic { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 1.5px solid var(--accent); margin-left: 0.3rem; }
.bc-reviewer-label { color: var(--accent); font-weight: 700; margin-left: 0.25rem; }
.bc-reviewer-name { font-weight: 700; color: var(--text); }

.bc-title { font-size: 1.2rem; font-weight: 800; margin: 0; line-height: 1.5; color: #f1f5f9; }
.bc-desc { font-size: 0.85rem; color: #9ca3af; margin: 0.4rem 0 0; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ── Featured card ────────────────── */
.bc--featured { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; border: 1.5px solid var(--accent); background: linear-gradient(135deg, #1a2535 0%, #1f2937 100%); }
.bc--featured .bc-link { display: contents; }
.bc--featured .bc-img-wrap { aspect-ratio: 16 / 10; min-height: 260px; }
.bc--featured .bc-body { display: flex; flex-direction: column; justify-content: center; padding: 1.75rem 2rem; }
.bc--featured .bc-title { font-size: 1.85rem; line-height: 1.4; }
.bc--featured .bc-desc { font-size: 1.1rem; -webkit-line-clamp: 4; line-height: 1.7; }
.bc--featured .bc-author-name { font-size: 0.95rem; }

/* ── CTA callout ──────────────────── */
.bp-callout { background: linear-gradient(135deg, #1a2535 0%, #1f2937 100%); border: 1.5px solid var(--accent); border-radius: 1rem; padding: 1.5rem 1.75rem; display: flex; gap: 1rem; align-items: flex-start; max-width: 40rem; margin: 0 auto 2rem; }
.bp-callout-icon { font-size: 2rem; line-height: 1; flex-shrink: 0; }
.bp-callout p { margin: 0 0 0.4rem; color: var(--text-bright); font-size: 0.95rem; line-height: 1.6; }
.bp-callout p:last-child { margin-bottom: 0; }
.bp-callout a { color: var(--accent); text-decoration: underline; font-weight: 600; }
.bp-callout a:hover { opacity: 0.85; }

/* ── Back to top ──────────────────── */
.back-to-top { display: block; text-align: center; color: #9ca3af; font-size: 0.8rem; margin-top: 1.25rem; text-decoration: none; }
.back-to-top:hover { color: var(--accent); }

/* ── Footer ───────────────────────── */
.bp-footer { text-align: center; padding: 1.5rem 0; color: #6b7280; font-size: 0.8rem; border-top: 1px solid var(--surface); }

/* ── Mobile ───────────────────────── */
@media (max-width: 600px) {
    .bp-page { padding: 1.5rem 1rem 3rem; }
    .bp-hero { padding: 1.25rem 1rem; }
    .bp-site-logo-link { display: block; }
    .bp-site-logo { position: static; height: 6rem; }
    .bp-hero h1 { font-size: 1.25rem; }
    .bp-grid { grid-template-columns: 1fr; gap: 1rem; }
    .bp-tags { padding: 0 0 1rem; }
    .bp-callout { flex-direction: column; gap: 0.5rem; }
    .bc--featured { grid-template-columns: 1fr; }
    .bc--featured .bc-body { padding: 1rem 1.25rem 1.25rem; }
    .bc--featured .bc-title { font-size: 1.2rem; }
    .bc--featured .bc-desc { font-size: 0.85rem; line-height: 1.55; }
    .bc--featured .bc-author-name { font-size: 0.78rem; }
}
/* ── Menu toggle button (matches .menu-icon-btn from React) ── */
.menu-toggle {
    background: transparent;
    border: none;
    border-radius: 50%;
    padding: 0;
    cursor: pointer;
    color: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(14px, 3.5vw, 16px);
    width: 2.34em;
    height: 2.34em;
    -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) {
    .menu-toggle:hover { background: #222325; }
}
.menu-toggle:active { background: #292c31; }
.menu-toggle-bars {
    display: flex;
    flex-direction: column;
    gap: 0.4em;
}
.menu-toggle .bar {
    width: 1.25em;
    height: 0.125em;
    background-color: #f9fafb;
    border-radius: 1px;
}

/* ── Side menu panel ───────────────── */
/* em units used inside panel so sizes are relative to this
   element's font-size (matching React's rem-based layout). */
.side-menu {
    position: fixed;
    top: 0;
    right: -21em;
    width: 21em;
    height: 100dvh;
    background-color: #1f2937;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
    transition: right 0.3s ease-in-out;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    padding: 1em 1.25em 0;
    font-size: clamp(14px, 3.5vw, 16px);
    line-height: normal;
    direction: ltr;
}
.side-menu.open { right: 0; }

.side-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #374151;
    padding-bottom: 0.375em;
}
.side-menu-title {
    margin: 0;
    text-align: right;
    font-weight: 800;
    color: #f9fafb;
    font-size: 1.25em;
}
.menu-close-btn {
    background: transparent;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) {
    .menu-close-btn:hover { background: #374151; }
}
.menu-close-btn:active { background: #292c31; }

.side-menu-body {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 0.5em;
    flex: 1;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.side-menu-body::-webkit-scrollbar { display: none; }

.side-menu-item {
    background: none;
    border: none;
    padding: 0.57em 0.715em;
    text-align: right;
    cursor: pointer;
    border-radius: 8px;
    font-size: 1.05em;
    font-weight: 700;
    transition: background-color 0.2s ease;
    color: #f9a61d;
    text-decoration: none;
    display: block;
    font-family: inherit;
}
.side-menu-item:hover { background-color: #374151; }

.side-menu-divider {
    border-top: 1px solid #374151;
    margin: 0.667em 0.715em 0;
    width: 50%;
    align-self: flex-end;
}
.side-menu-section-title {
    font-size: 1.05em;
    font-weight: 700;
    color: #d1d5db;
    padding: 0.475em 0.715em 0.285em;
    margin-top: 0.38em;
    text-align: right;
    letter-spacing: 0.03em;
}

.side-menu-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15em;
    padding: 0.5em 0.75em;
    border-top: 1px solid #374151;
}
.side-menu-footer-row {
    display: flex;
    align-items: center;
    gap: 0.4em;
}
.side-menu-footer-item {
    background: none;
    border: none;
    padding: 0.2em 0;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 400;
    transition: color 0.2s ease;
    color: #9ca3af;
    text-decoration: none;
    font-family: inherit;
}
.side-menu-footer-item:hover { color: #f9fafb; }
.side-menu-footer-sep { color: #4b5563; }

.side-menu-promo {
    display: block;
    margin: 0.5em 0.715em;
    padding: 0.6em 0.715em;
    background: rgba(167,139,250,0.08);
    border: 1px dashed rgba(167,139,250,0.5);
    border-radius: 8px;
    font-size: 0.9em;
    color: #d1d5db;
    text-align: center;
    text-decoration: none;
}
.side-menu-promo span { color: #f9a61d; font-weight: 700; }
.side-menu-promo:hover { background: rgba(167,139,250,0.14); }

/* ── Overlay ───────────────────────── */
.side-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
}
.side-menu-overlay.open { display: block; }
/* ── Toolbar ──────────────────────── */
.toolbar {
    margin-top: -1.2rem;
    margin-bottom: 0;
    margin-right: -0.1em;
    display: flex;
    flex-direction: column;
    padding-bottom: 1rem;
}
.toolbar-row {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}
.toolbar .breadcrumb {
    display: block;
    font-size: 0.8rem;
    color: #9ca3af;
    margin: 0;
    min-width: 0;
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.toolbar .breadcrumb a, .toolbar .breadcrumb span { unicode-bidi: isolate; }
.toolbar .breadcrumb a { color: var(--link); text-decoration: none; }
.toolbar .breadcrumb a:hover { text-decoration: underline; }
.toolbar .breadcrumb .bc-sep { color: #9ca3af; margin: 0 0.2rem; }
.hero-updated {
    display: block;
    font-size: 0.75rem;
    color: #a1aabd;
    background: rgba(107,114,128,0.1);
    padding: 0.15rem 0.55rem;
    border-radius: 0.3rem;
    white-space: nowrap;
    text-align: end;
    margin-top: 0;
    width: fit-content;
    align-self: flex-end;
}
