/* ===== THE PEOPLE'S RECAP — Dark Editorial Theme ===== */

:root {
    --bg-primary: #0A0A0C;
    --bg-secondary: #111114;
    --bg-tertiary: #1A1A1F;
    --text-primary: #E8E6E1;
    --text-secondary: rgba(232,230,225,0.65);
    --text-muted: rgba(232,230,225,0.4);
    --text-hint: rgba(232,230,225,0.2);
    --border: rgba(232,230,225,0.08);
    --border-hover: rgba(232,230,225,0.15);
    --accent: #E63946;
    --accent-dim: rgba(230,57,70,0.12);
    --font-body: 'Libre Franklin', 'Helvetica Neue', sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;
    --max-width: 1200px;
    --content-gap: 48px;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ===== HEADER ===== */
.site-header {
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 100;
    background: rgba(10,10,12,0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    height: 64px;
    padding: 0 clamp(16px, 4vw, 48px);
}
.site-logo-link { display: flex; align-items: center; gap: 12px; }
.site-logo { height: 32px; }
.site-logo-icon {
    width: 32px; height: 32px; border-radius: 6px;
    background: linear-gradient(135deg, var(--accent), #F4845F);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; font-weight: 900; color: #fff;
}
.site-logo-icon.small { width: 28px; height: 28px; font-size: 14px; border-radius: 5px; }
.site-title-text {
    font-family: var(--font-display);
    font-size: 22px; font-weight: 900;
    letter-spacing: -0.02em;
}
.header-nav { display: flex; gap: 28px; align-items: center; }
.header-nav ul { list-style: none; display: flex; gap: 28px; align-items: center; margin: 0; padding: 0; }
.header-nav li { list-style: none; margin: 0; padding: 0; }
.header-nav a {
    font-size: 13px; font-weight: 500;
    letter-spacing: 0.05em; text-transform: uppercase;
    color: var(--text-muted);
    transition: color 0.2s;
}
.header-nav a:hover, .header-nav a.nav-current { color: var(--accent); }
.btn-subscribe {
    background: var(--accent); color: #fff; border: none;
    padding: 7px 16px; border-radius: 4px;
    font-size: 12px; font-weight: 700;
    letter-spacing: 0.05em; text-transform: uppercase;
    cursor: pointer; transition: opacity 0.2s;
}
.btn-subscribe:hover { opacity: 0.85; }
.member-avatar { width: 32px; height: 32px; border-radius: 50%; }
.member-initial {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--bg-tertiary); display: flex;
    align-items: center; justify-content: center;
    font-size: 14px; font-weight: 600;
}

/* ===== TICKER ===== */
.ticker-bar {
    background: var(--accent-dim);
    border-bottom: 1px solid rgba(230,57,70,0.15);
    padding: 8px clamp(16px, 4vw, 48px);
    overflow: hidden;
}
.ticker-inner {
    max-width: var(--max-width); margin: 0 auto;
    display: flex; align-items: center; gap: 24px;
    font-size: 12px; font-weight: 600; letter-spacing: 0.04em;
}
.ticker-label { color: var(--accent); text-transform: uppercase; white-space: nowrap; flex-shrink: 0; }
.ticker-items { display: flex; gap: 32px; overflow: hidden; }
.ticker-item { white-space: nowrap; color: var(--text-muted); transition: color 0.2s; }
.ticker-item:hover { color: var(--text-primary); }

/* ===== MAIN ===== */
.site-main {
    max-width: var(--max-width); margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 48px);
}

/* ===== FEATURED HERO ===== */
.featured-hero { margin: 40px 0 48px; }
.featured-hero-link {
    display: grid; grid-template-columns: 1fr 1fr;
    border-radius: 12px; overflow: hidden;
    background: var(--bg-secondary);
    min-height: 420px;
    transition: transform 0.3s;
}
.featured-hero-link:hover { transform: translateY(-2px); }
.featured-hero-image {
    background-size: cover; background-position: center;
    position: relative; min-height: 420px;
}
.featured-hero-gradient {
    position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent 60%, var(--bg-secondary) 100%);
}
.featured-hero-content {
    padding: 48px 40px;
    display: flex; flex-direction: column; justify-content: center;
}
.tag-badge {
    display: inline-block; padding: 4px 10px; border-radius: 3px;
    background: var(--accent); color: #fff;
    font-size: 11px; font-weight: 800;
    letter-spacing: 0.08em; text-transform: uppercase;
    margin-bottom: 16px; width: fit-content;
}
.featured-hero-title {
    font-family: var(--font-display);
    font-size: clamp(28px, 3vw, 38px); font-weight: 900;
    line-height: 1.15; letter-spacing: -0.02em;
    margin-bottom: 16px;
}
.featured-hero-excerpt {
    font-size: 16px; line-height: 1.6;
    color: var(--text-secondary); margin-bottom: 24px;
}

/* ===== POST META ===== */
.post-meta { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--text-muted); }
.post-meta .post-author { font-weight: 600; color: var(--text-secondary); }
.post-meta.small { font-size: 12px; gap: 8px; }
.meta-sep { opacity: 0.5; }

/* ===== CATEGORY FILTER ===== */
.category-filter {
    display: flex; gap: 8px; margin-bottom: 36px;
    border-bottom: 1px solid var(--border); padding-bottom: 16px;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.filter-btn {
    background: rgba(232,230,225,0.05); color: var(--text-muted);
    border: none; border-radius: 20px;
    padding: 8px 20px; font-size: 13px; font-weight: 600;
    cursor: pointer; white-space: nowrap;
    transition: all 0.2s; letter-spacing: 0.02em;
    font-family: var(--font-body);
}
.filter-btn:hover, .filter-btn.active { background: var(--accent); color: #fff; }

/* ===== CONTENT LAYOUT (main + sidebar) ===== */
.content-layout {
    display: grid; grid-template-columns: 1fr 340px;
    gap: var(--content-gap); padding-bottom: 80px;
}
.content-layout.post-layout { gap: 60px; }

/* ===== SECTION LABEL ===== */
.section-label {
    font-size: 13px; font-weight: 700;
    letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--text-hint); margin: 0 0 24px;
}

/* ===== POST CARDS ===== */
.post-card { border-bottom: 1px solid var(--border); }
.post-card-link {
    display: grid; grid-template-columns: 220px 1fr;
    gap: 24px; padding: 20px 0;
    transition: transform 0.2s;
}
.post-card-link:hover { transform: translateX(4px); }
.post-card-link:hover .post-card-title { color: var(--accent); }
.post-card-image { border-radius: 8px; overflow: hidden; height: 140px; }
.post-card-image img { width: 100%; height: 100%; object-fit: cover; }
.post-card-content { display: flex; flex-direction: column; justify-content: center; }
.post-card-meta-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.tag-pill {
    padding: 2px 8px; border-radius: 3px;
    font-size: 10px; font-weight: 800;
    letter-spacing: 0.08em; text-transform: uppercase;
}
.post-card-title {
    font-family: var(--font-display);
    font-size: 20px; font-weight: 700;
    line-height: 1.3; margin-bottom: 8px;
    transition: color 0.2s;
}
.post-card-excerpt {
    font-size: 14px; line-height: 1.5;
    color: var(--text-muted);
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}

/* ===== SIDEBAR ===== */
.sidebar-widget { margin-bottom: 32px; }
.sidebar-heading {
    font-size: 13px; font-weight: 700;
    letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--text-hint); margin-bottom: 20px;
}

/* Trending */
.trending-widget {
    background: rgba(232,230,225,0.03);
    border-radius: 12px; padding: 24px;
    border: 1px solid var(--border);
}
.trending-item {
    display: flex; gap: 14px; align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.trending-item:last-child { border-bottom: none; }
.trending-item:hover .trending-title { color: var(--accent); }
.trending-num {
    font-family: var(--font-display);
    font-size: 28px; font-weight: 900;
    color: rgba(230,57,70,0.25);
    line-height: 1; min-width: 36px;
}
.trending-title { font-size: 15px; font-weight: 600; line-height: 1.3; transition: color 0.2s; display: block; }
.trending-meta { font-size: 12px; color: var(--text-muted); display: block; margin-top: 2px; }

/* Newsletter */
.newsletter-widget {
    background: linear-gradient(145deg, var(--accent-dim), rgba(244,132,95,0.08));
    border-radius: 12px; padding: 28px;
    border: 1px solid rgba(230,57,70,0.15);
}
.newsletter-heading { font-family: var(--font-display); font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.newsletter-desc { font-size: 14px; line-height: 1.6; color: var(--text-secondary); margin-bottom: 20px; }
.newsletter-form { display: flex; flex-direction: column; gap: 10px; }
.newsletter-input {
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(232,230,225,0.1);
    border-radius: 6px; padding: 10px 14px;
    color: var(--text-primary); font-size: 14px;
    font-family: var(--font-body); outline: none;
    transition: border-color 0.2s;
}
.newsletter-input:focus { border-color: var(--accent); }
.newsletter-btn {
    background: var(--accent); color: #fff;
    border: none; border-radius: 6px;
    padding: 10px 14px; font-size: 14px; font-weight: 700;
    cursor: pointer; letter-spacing: 0.02em;
    font-family: var(--font-body);
    transition: opacity 0.2s;
}
.newsletter-btn:hover { opacity: 0.85; }
.newsletter-btn .loading-text,
.newsletter-btn .success-text { display: none; }
.newsletter-form.loading .newsletter-btn .default-text { display: none; }
.newsletter-form.loading .newsletter-btn .loading-text { display: inline; }
.newsletter-form.success .newsletter-btn .default-text { display: none; }
.newsletter-form.success .newsletter-btn .success-text { display: inline; }
.newsletter-form.success .newsletter-btn { background: #2D6A4F; }
.newsletter-note { font-size: 11px; color: var(--text-hint); margin-top: 6px; display: block; }

/* Ad Slot */
.ad-widget {
    background: rgba(232,230,225,0.02);
    border-radius: 12px; padding: 40px;
    border: 1px dashed rgba(232,230,225,0.08);
    text-align: center;
}
.ad-label { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-hint); display: block; }
.ad-size { font-size: 13px; color: var(--text-hint); display: block; margin-top: 8px; }

/* ===== POST FULL (single article) ===== */
.post-full { padding-top: 48px; }
.post-full-header { max-width: 720px; margin: 0 auto 40px; text-align: center; }
.post-full-meta { margin-bottom: 16px; }
.post-full-title {
    font-family: var(--font-display);
    font-size: clamp(32px, 4vw, 48px); font-weight: 900;
    line-height: 1.1; letter-spacing: -0.02em;
    margin-bottom: 16px;
}
.post-full-excerpt { font-size: 18px; line-height: 1.6; color: var(--text-secondary); margin-bottom: 24px; }
.post-meta.byline { justify-content: center; }
.author-card { display: flex; align-items: center; gap: 12px; }
.author-avatar { width: 40px; height: 40px; border-radius: 50%; }
.author-avatar-placeholder {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--bg-tertiary);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 16px;
}
.author-name { font-weight: 600; font-size: 14px; }
.author-name:hover { color: var(--accent); }
.post-date-line { font-size: 13px; color: var(--text-muted); display: flex; gap: 8px; }

.post-full-image { margin: 0 auto 48px; max-width: 1000px; border-radius: 12px; overflow: hidden; }
.post-full-image figcaption { font-size: 13px; color: var(--text-muted); text-align: center; margin-top: 12px; }

/* Ghost Content Styles */
.post-content { max-width: 720px; font-size: 18px; line-height: 1.8; color: var(--text-secondary); }
.post-content h2 { font-family: var(--font-display); font-size: 28px; color: var(--text-primary); margin: 48px 0 16px; }
.post-content h3 { font-size: 22px; color: var(--text-primary); margin: 36px 0 12px; font-weight: 700; }
.post-content p { margin-bottom: 24px; }
.post-content a { color: var(--accent); border-bottom: 1px solid rgba(230,57,70,0.3); }
.post-content a:hover { border-bottom-color: var(--accent); }
.post-content blockquote {
    border-left: 3px solid var(--accent);
    padding-left: 20px; margin: 32px 0;
    font-style: italic; font-size: 20px;
    color: var(--text-primary);
}
.post-content img { border-radius: 8px; margin: 32px 0; }
.post-content ul, .post-content ol { padding-left: 24px; margin-bottom: 24px; }
.post-content li { margin-bottom: 8px; }
.post-content pre { background: var(--bg-tertiary); border-radius: 8px; padding: 20px; overflow-x: auto; margin: 32px 0; }
.post-content code { font-family: 'JetBrains Mono', monospace; font-size: 14px; }
.post-content figcaption { font-size: 14px; color: var(--text-muted); text-align: center; margin-top: 8px; }

/* Ghost specific cards */
.kg-image-card, .kg-gallery-card { margin: 32px 0; }
.kg-width-wide { max-width: 1000px; margin-left: auto; margin-right: auto; }
.kg-width-full { max-width: none; width: 100vw; position: relative; left: 50%; transform: translateX(-50%); }
.kg-bookmark-card { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin: 32px 0; }
.kg-bookmark-container { display: flex; }
.kg-bookmark-content { padding: 20px; flex: 1; }
.kg-bookmark-title { font-weight: 700; font-size: 16px; margin-bottom: 8px; }
.kg-bookmark-description { font-size: 14px; color: var(--text-muted); }
.kg-bookmark-thumbnail { width: 200px; }
.kg-bookmark-thumbnail img { width: 100%; height: 100%; object-fit: cover; }

/* Post Tags */
.post-tags { max-width: 720px; margin: 48px auto; padding-top: 24px; border-top: 1px solid var(--border); display: flex; gap: 8px; flex-wrap: wrap; }
.post-tag { padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 500; background: var(--bg-tertiary); color: var(--text-muted); transition: all 0.2s; }
.post-tag:hover { background: var(--accent); color: #fff; }

/* Related Posts */
.related-posts { padding: 48px clamp(16px, 4vw, 48px) 80px; max-width: var(--max-width); margin: 0 auto; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.related-card { border-radius: 8px; overflow: hidden; background: var(--bg-secondary); transition: transform 0.2s; }
.related-card:hover { transform: translateY(-4px); }
.related-card:hover .related-card-title { color: var(--accent); }
.related-card-image { height: 180px; overflow: hidden; }
.related-card-image img { width: 100%; height: 100%; object-fit: cover; }
.related-card-content { padding: 16px; }
.related-card-title { font-family: var(--font-display); font-size: 17px; font-weight: 700; line-height: 1.3; margin: 8px 0; transition: color 0.2s; }

/* ===== TAG & AUTHOR HEADERS ===== */
.tag-header, .author-header { padding: 48px 0 32px; text-align: center; }
.tag-title, .author-header-name { font-family: var(--font-display); font-size: 36px; font-weight: 900; margin-bottom: 8px; }
.tag-description, .author-header-bio { font-size: 16px; color: var(--text-secondary); max-width: 480px; margin: 0 auto 12px; }
.tag-count { font-size: 13px; color: var(--text-muted); }
.author-header-inner { display: flex; align-items: center; gap: 24px; justify-content: center; }
.author-header-avatar { width: 80px; height: 80px; border-radius: 50%; }
.author-header-avatar.placeholder {
    background: var(--bg-tertiary); display: flex;
    align-items: center; justify-content: center;
    font-size: 32px; font-weight: 700;
}
.author-header-info { text-align: left; }

/* ===== PAGINATION ===== */
.pagination { display: flex; align-items: center; justify-content: center; gap: 24px; padding: 48px 0; }
.pagination-btn { font-size: 14px; font-weight: 600; color: var(--accent); transition: opacity 0.2s; }
.pagination-btn:hover { opacity: 0.7; }
.pagination-info { font-size: 13px; color: var(--text-muted); }

/* ===== FOOTER ===== */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 48px clamp(16px, 4vw, 48px);
    background: rgba(0,0,0,0.3);
}
.footer-inner {
    max-width: var(--max-width); margin: 0 auto;
    display: grid; grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
}
.footer-logo-link { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.footer-logo { height: 28px; }
.footer-title { font-family: var(--font-display); font-size: 18px; font-weight: 900; }
.footer-description { font-size: 14px; line-height: 1.7; color: var(--text-muted); max-width: 280px; }
.footer-heading { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-hint); margin-bottom: 16px; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; }
.footer-nav li { margin: 0; padding: 0; }
.footer-nav a { display: block; font-size: 14px; color: var(--text-muted); margin-bottom: 10px; transition: color 0.2s; }
.footer-nav a:hover { color: var(--accent); }
.footer-bottom {
    max-width: var(--max-width); margin: 32px auto 0;
    padding-top: 24px; border-top: 1px solid var(--border);
    display: flex; justify-content: space-between;
    font-size: 12px; color: var(--text-hint);
}
.footer-bottom a { color: var(--accent); }

/* ===== RESPONSIVE ===== */
@media (max-width: 968px) {
    .content-layout { grid-template-columns: 1fr; }
    .sidebar { order: 2; }
    .featured-hero-link { grid-template-columns: 1fr; }
    .featured-hero-image { min-height: 260px; }
    .featured-hero-gradient { background: linear-gradient(180deg, transparent 40%, var(--bg-secondary) 100%); }
    .featured-hero-content { padding: 24px; }
    .footer-inner { grid-template-columns: 1fr; gap: 32px; }
    .related-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .post-card-link { grid-template-columns: 100px 1fr; gap: 16px; }
    .post-card-image { height: 80px; }
    .post-card-title { font-size: 16px; }
    .post-card-excerpt { display: none; }
    .header-nav { display: none; }
    .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
    .ticker-bar { display: none; }
}
