/*
Theme Name:  Open Talk
Theme URI:   https://opentalk.com
Author:      Open Talk Team
Description: A modern, minimal blog theme with dynamic category sliders, hero sections, and full WordPress REST API integration. Auto-fetches all categories, posts, menus, and taxonomies.
Version:     1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License:     GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: opentalk
Tags: blog, news, magazine, poppins, responsive, custom-menu, featured-images, threaded-comments
*/

/* ===================== RESET & VARS ===================== */
:root {
  --black: #0a0a0a;
  --gray-mid: #555;
  --gray-light: #888;
  --gray-border: #e5e5e5;
  --white: #fff;
  --accent: #e8c97e;
  --font-body: 'Poppins', sans-serif;
  --font-mono: 'DM Mono', monospace;
  --pad: 60px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--black);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
button { font-family: var(--font-body); cursor: pointer; }

/* ===================== TAGS ===================== */
.opentalk-tag {
  display: inline-block;
  font-size: 10px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  padding: 4px 10px; border-radius: 4px;
  margin-bottom: 12px;
  background: var(--accent); color: var(--black);
}

/* ===================== HEADER ===================== */
#site-header {
  background: var(--black);
  color: var(--white);
  position: sticky; top: 0; z-index: 200;
}
.header-top {
  display: flex; align-items: center; gap: 32px;
  padding: 16px var(--pad);
  border-bottom: 1px solid #1e1e1e;
}
.site-logo {
  font-size: 26px; font-weight: 900; letter-spacing: -1px;
  color: var(--white); cursor: pointer; white-space: nowrap; flex-shrink: 0;
}
.site-logo span { color: var(--accent); }

/* Image logo */
.site-logo--image {
  display: flex; align-items: center;
  font-size: 0; /* hide any text residue */
}
.site-logo--image .custom-logo-link {
  display: flex; align-items: center;
}
.site-logo--image .custom-logo {
  max-height: 44px; /* overridden by customizer inline CSS */
  width: auto;
  display: block;
  /* Invert dark logos for the black header — remove if your logo is already light */
  filter: brightness(0) invert(1);
}
.search-wrapper { flex: 1; position: relative; }
.search-bar {
  display: flex; align-items: center;
  background: #1a1a1a; border: 1px solid #2e2e2e; border-radius: 8px;
  padding: 10px 16px; gap: 10px; width: 100%;
  transition: border-color .2s;
}
.search-bar:focus-within { border-color: var(--accent); }
.search-bar input {
  background: none; border: none; outline: none;
  color: var(--white); font-family: var(--font-body);
  font-size: 14px; width: 100%;
}
.search-bar input::placeholder { color: #555; }
.search-icon { color: #666; flex-shrink: 0; }

/* Search results */
.search-results {
  display: none; position: absolute;
  top: calc(100% + 6px); left: 0; right: 0;
  background: #111; border: 1px solid #2a2a2a;
  border-radius: 8px; overflow: hidden; z-index: 300;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
}
.search-results.visible { display: block; }
.search-results-header {
  padding: 9px 16px; font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
  color: #444; border-bottom: 1px solid #1e1e1e;
}
.search-result-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 16px; border-bottom: 1px solid #181818;
  cursor: pointer; transition: background .15s;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: #1a1a1a; }
.search-result-thumb {
  width: 42px; height: 42px; border-radius: 6px;
  object-fit: cover; flex-shrink: 0; background: #222;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.search-result-info { flex: 1; min-width: 0; }
.search-result-title {
  font-size: 13px; font-weight: 500; color: #ddd;
  line-height: 1.4; margin-bottom: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.search-result-title mark { background: none; color: var(--accent); font-weight: 700; }
.search-result-meta { font-family: var(--font-mono); font-size: 10px; color: #444; }
.search-no-results { padding: 24px 16px; text-align: center; color: #444; font-size: 13px; }

/* Hamburger */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; padding: 4px; flex-shrink: 0;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: #aaa; border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Desktop nav */
#site-nav {
  padding: 0 var(--pad);
  display: flex; align-items: center;
  overflow-x: auto; scrollbar-width: none;
}
#site-nav::-webkit-scrollbar { display: none; }
#site-nav .nav-item {
  color: #888; font-size: 12px; font-weight: 500;
  letter-spacing: .5px; text-transform: uppercase;
  padding: 12px 16px; display: block;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
  cursor: pointer; white-space: nowrap;
}
#site-nav .nav-item:hover,
#site-nav .nav-item.current { color: var(--white); border-bottom-color: var(--accent); }

/* Mobile nav */
.mobile-nav {
  display: none; flex-direction: column;
  background: #111; border-top: 1px solid #1e1e1e; padding: 8px 0;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  color: #aaa; font-size: 14px; font-weight: 500;
  padding: 14px 24px; border-bottom: 1px solid #1a1a1a;
  transition: color .15s, background .15s;
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a:hover { color: var(--white); background: #1a1a1a; }

/* ===================== HERO ===================== */
.hero-section {
  background: #f5f5f5;
  padding: 52px var(--pad) 60px;
  border-bottom: 1px solid #e8e8e8;
}
.hero-label {
  font-size: 11px; font-weight: 600;
  letter-spacing: 3px; text-transform: uppercase;
  color: #999; margin-bottom: 28px;
  display: flex; align-items: center; gap: 12px;
}
.hero-label::before { content: ''; height: 2px; width: 28px; background: #ddd; display: block; border-radius: 2px; }
.hero-grid { display: grid; grid-template-columns: 70fr 30fr; gap: 28px; align-items: start; }

.hero-main {
  cursor: pointer; background: var(--white); border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,.07), 0 1px 4px rgba(0,0,0,.04);
  transition: box-shadow .3s, transform .3s;
}
.hero-main:hover { box-shadow: 0 12px 40px rgba(0,0,0,.13); transform: translateY(-3px); }
.hero-main-thumb {
  width: 100%; aspect-ratio: 16/9; object-fit: cover;
  display: block; background: #e0e0e0;
  transition: transform .5s ease;
}
.hero-main:hover .hero-main-thumb { transform: scale(1.03); }
.hero-main-content { padding: 24px 28px 28px; }
.hero-main h1 { font-size: 26px; font-weight: 800; color: var(--black); line-height: 1.3; letter-spacing: -.5px; margin-bottom: 10px; }
.hero-main .excerpt { font-size: 13.5px; color: #666; line-height: 1.8; margin-bottom: 18px; }
.article-meta { display: flex; align-items: center; gap: 8px; font-size: 11px; color: #aaa; font-family: var(--font-mono); flex-wrap: wrap; }
.article-meta .author { color: var(--black); font-weight: 700; }
.article-meta .dot { color: #ddd; }
.read-more-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--black); color: var(--white);
  font-size: 12px; font-weight: 600;
  padding: 10px 20px; border-radius: 6px;
  margin-top: 18px; letter-spacing: .3px;
  transition: background .2s, gap .2s;
}
.read-more-btn:hover { background: #222; gap: 12px; }

.hero-sidebar { display: flex; flex-direction: column; gap: 12px; }
.sidebar-post {
  background: var(--white); border-radius: 12px; padding: 16px 18px;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0,0,0,.06), 0 1px 3px rgba(0,0,0,.04);
  transition: box-shadow .25s, transform .25s;
}
.sidebar-post:hover { box-shadow: 0 8px 28px rgba(0,0,0,.11); transform: translateY(-2px); }
.sidebar-post h3 { font-size: 14px; font-weight: 700; color: var(--black); line-height: 1.45; margin-bottom: 10px; transition: color .2s; }
.sidebar-post:hover h3 { color: #333; }
.sidebar-post .article-meta { font-size: 10.5px; }

/* ===================== TICKER ===================== */
.ticker-bar {
  background: var(--black); padding: 10px var(--pad);
  display: flex; align-items: center; gap: 20px;
  overflow: hidden; border-bottom: 1px solid #1a1a1a;
}
.ticker-label {
  font-size: 11px; font-weight: 700; color: var(--accent);
  white-space: nowrap; flex-shrink: 0;
  background: rgba(232,201,126,.12); padding: 4px 10px; border-radius: 20px;
}
.ticker-track-wrap { flex: 1; overflow: hidden; }
.ticker-track {
  display: flex; gap: 40px; width: max-content;
  animation: ticker 32s linear infinite;
}
.ticker-track:hover { animation-play-state: paused; }
.ticker-track a {
  font-size: 12px; font-weight: 500; color: #888;
  white-space: nowrap; transition: color .2s;
}
.ticker-track a:hover { color: var(--white); }
.ticker-track a::before { content: '◆ '; color: #333; font-size: 8px; }
@keyframes ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ===================== SECTION HEADERS ===================== */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; border-bottom: 1px solid #ebebeb; padding-bottom: 14px;
}
.section-title-wrap { display: flex; align-items: center; gap: 12px; }
.cat-pill { font-size: 11px; font-weight: 700; padding: 4px 12px; border-radius: 20px; white-space: nowrap; }
.section-title { font-size: 20px; font-weight: 700; color: var(--black); letter-spacing: -.3px; }
.view-all-link {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; color: var(--gray-mid);
  transition: color .2s; white-space: nowrap;
}
.view-all-link:hover { color: var(--black); }
.view-all-link svg { transition: transform .2s; }
.view-all-link:hover svg { transform: translateX(3px); }

/* ===================== CAROUSELS ===================== */
.carousels-section { background: var(--white); padding: 52px var(--pad); }
.category-section { margin-bottom: 56px; }
.carousel-wrapper { position: relative; padding: 0 20px; }
.carousel-viewport { overflow: hidden; width: 100%; }
.carousel-track {
  display: flex; gap: 22px;
  transition: transform .45s cubic-bezier(.25,.46,.45,.94);
  will-change: transform; cursor: grab; user-select: none;
}
.carousel-track.dragging { transition: none; cursor: grabbing; }

.slider-btn {
  position: absolute; top: 38%; transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--white); border: 1.5px solid var(--gray-border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 10;
  box-shadow: 0 4px 14px rgba(0,0,0,.08);
  transition: background .2s, border-color .2s;
  font-size: 15px; color: var(--black);
}
.slider-btn:hover { background: var(--black); color: var(--white); border-color: var(--black); }
.slider-btn.prev { left: -4px; }
.slider-btn.next { right: -4px; }
.slider-btn.disabled { opacity: .25; pointer-events: none; }
.slider-dots { display: flex; justify-content: center; gap: 6px; margin-top: 18px; }
.slider-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gray-border); cursor: pointer; transition: background .2s, width .25s; border: none; }
.slider-dot.active { background: var(--black); width: 20px; border-radius: 3px; }

/* Post Card (carousel) */
.post-card-carousel {
  cursor: pointer; border-radius: 10px; overflow: hidden;
  background: var(--white); flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  transition: box-shadow .3s, transform .3s;
}
.post-card-carousel:hover { box-shadow: 0 10px 32px rgba(0,0,0,.13); transform: translateY(-4px); }
.card-thumb-wrap { position: relative; overflow: hidden; aspect-ratio: 4/3; background: #f0f0f0; }
.card-thumb { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; display: block; }
.post-card-carousel:hover .card-thumb { transform: scale(1.07); }
.card-thumb-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 36px; }
.card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.65) 0%, transparent 60%);
  display: flex; align-items: flex-end; padding: 14px;
  opacity: 0; transition: opacity .3s;
}
.post-card-carousel:hover .card-overlay { opacity: 1; }
.card-overlay span { font-size: 12px; font-weight: 600; color: #fff; }
.card-body { padding: 14px 14px 16px; }
.card-title { font-size: 14px; font-weight: 700; color: var(--black); line-height: 1.45; margin-bottom: 8px; transition: color .2s; }
.post-card-carousel:hover .card-title { color: #333; }
.card-meta { font-size: 11px; color: #aaa; font-family: var(--font-mono); display: flex; gap: 6px; align-items: center; }

/* ===================== NEWSLETTER ===================== */
.newsletter-banner {
  background: var(--black); border-radius: 16px; padding: 32px 40px;
  margin: 48px 0; display: flex; align-items: center;
  justify-content: space-between; gap: 32px; flex-wrap: wrap;
  position: relative; overflow: hidden;
}
.newsletter-banner::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at top right, rgba(232,201,126,.15) 0%, transparent 60%),
              radial-gradient(ellipse at bottom left, rgba(74,158,255,.1) 0%, transparent 60%);
  pointer-events: none;
}
.newsletter-content { display: flex; align-items: center; gap: 16px; position: relative; }
.newsletter-icon { font-size: 36px; flex-shrink: 0; }
.newsletter-title { font-size: 18px; font-weight: 700; color: var(--white); margin-bottom: 4px; }
.newsletter-sub { font-size: 13px; color: #888; }
.newsletter-form { display: flex; gap: 10px; position: relative; flex-wrap: wrap; }
.newsletter-form input {
  background: #1a1a1a; border: 1px solid #333; border-radius: 8px;
  padding: 11px 16px; font-family: var(--font-body); font-size: 13px;
  color: var(--white); outline: none; width: 240px; transition: border-color .2s;
}
.newsletter-form input:focus { border-color: var(--accent); }
.newsletter-form input::placeholder { color: #555; }
.newsletter-form button {
  background: var(--accent); color: var(--black); border: none;
  border-radius: 8px; padding: 11px 22px; font-size: 13px; font-weight: 700;
  cursor: pointer; white-space: nowrap; transition: opacity .2s, transform .15s;
}
.newsletter-form button:hover { opacity: .88; transform: translateY(-1px); }

/* ===================== MUST READ ===================== */
.must-read-section { margin-bottom: 56px; }
.must-read-badge { font-size: 11px; font-weight: 700; background: #fff8e8; color: #c9960a; padding: 4px 10px; border-radius: 20px; white-space: nowrap; }
.must-read-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: start; }
.must-read-main {
  cursor: pointer; border-radius: 14px; overflow: hidden;
  background: var(--white); box-shadow: 0 4px 20px rgba(0,0,0,.07);
  transition: box-shadow .3s, transform .3s;
}
.must-read-main:hover { box-shadow: 0 12px 40px rgba(0,0,0,.13); transform: translateY(-3px); }
.must-read-thumb { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; transition: transform .45s ease; }
.must-read-main:hover .must-read-thumb { transform: scale(1.04); }
.must-read-body { padding: 22px 24px 24px; }
.must-read-body h3 { font-size: 19px; font-weight: 800; color: var(--black); line-height: 1.3; margin-bottom: 10px; }
.must-read-body p { font-size: 13px; color: #666; line-height: 1.75; margin-bottom: 16px; }
.must-read-meta { display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: #aaa; font-family: var(--font-mono); flex-wrap: wrap; gap: 8px; }
.must-read-author { display: flex; align-items: center; gap: 8px; color: var(--black); font-weight: 600; }
.author-mini-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: #333; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; flex-shrink: 0; }
.must-read-list-col { display: flex; flex-direction: column; gap: 12px; }
.must-read-item {
  background: var(--white); border-radius: 12px; padding: 14px;
  display: flex; gap: 14px; align-items: flex-start; cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,.05); transition: box-shadow .25s, transform .25s;
}
.must-read-item:hover { box-shadow: 0 8px 28px rgba(0,0,0,.1); transform: translateY(-2px); }
.must-read-item-thumb { width: 68px; height: 68px; border-radius: 8px; object-fit: cover; display: block; flex-shrink: 0; background: #f0f0f0; }
.must-read-item-title { font-size: 13px; font-weight: 700; color: var(--black); line-height: 1.4; margin-bottom: 5px; }
.must-read-item-meta { font-size: 11px; color: #aaa; font-family: var(--font-mono); }

/* ===================== EXPLORE TOPICS ===================== */
.explore-topics { margin-top: 56px; padding-top: 48px; border-top: 1px solid #ebebeb; }
.topics-grid { display: grid; grid-template-columns: repeat(6,1fr); gap: 14px; margin-top: 20px; }
.topic-card {
  background: var(--tc, #f5f5f5); border-radius: 12px; padding: 22px 16px 18px;
  text-align: center; cursor: pointer; border: 1px solid transparent;
  transition: border-color .25s, box-shadow .25s, transform .25s;
}
.topic-card:hover { border-color: var(--th); box-shadow: 0 6px 24px rgba(0,0,0,.08); transform: translateY(-3px); }
.topic-icon { display: block; font-size: 30px; margin-bottom: 10px; }
.topic-name { font-size: 13px; font-weight: 700; color: var(--black); margin-bottom: 4px; }
.topic-count { font-size: 11px; color: #aaa; font-family: var(--font-mono); }

/* ===================== CATEGORY PAGE ===================== */
.category-hero-section { background: var(--black); padding: 48px var(--pad); border-bottom: 3px solid var(--accent); }
.category-hero-section h1 { font-size: 48px; font-weight: 900; color: var(--white); letter-spacing: -2px; margin-bottom: 8px; }
.category-hero-section p { color: #666; font-size: 14px; }

.archive-body { display: grid; grid-template-columns: 80fr 20fr; gap: 48px; padding: 48px var(--pad); align-items: start; }
.posts-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 28px; }
.post-card-grid {
  cursor: pointer; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--gray-border); transition: box-shadow .3s, transform .3s;
}
.post-card-grid:hover { box-shadow: 0 12px 36px rgba(0,0,0,.1); transform: translateY(-4px); }
.post-card-grid:hover .grid-thumb { transform: scale(1.05); }
.grid-thumb-wrap { overflow: hidden; aspect-ratio: 16/10; background: #f0f0f0; }
.grid-thumb { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; display: block; }
.post-card-grid-body { padding: 16px; }
.post-card-grid-title { font-size: 15px; font-weight: 700; color: var(--black); line-height: 1.4; margin-bottom: 6px; }
.post-card-grid-excerpt { font-size: 12.5px; color: var(--gray-mid); line-height: 1.65; margin-bottom: 12px; }
.post-card-grid-meta { font-size: 11px; color: var(--gray-light); font-family: var(--font-mono); display: flex; gap: 10px; border-top: 1px solid var(--gray-border); padding-top: 10px; }

/* Category sidebar */
.category-sidebar { position: sticky; top: 80px; }
.sidebar-widget { background: #f5f5f5; border-radius: 12px; overflow: hidden; margin-bottom: 18px; border: 1px solid #ebebeb; box-shadow: 0 4px 18px rgba(0,0,0,.07), 0 1px 4px rgba(0,0,0,.04); transition: box-shadow .25s; }
.sidebar-widget:hover { box-shadow: 0 8px 28px rgba(0,0,0,.1); }
.widget-title { font-size: 10px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; color: #999; padding: 14px 18px 12px; border-bottom: 1px solid #e8e8e8; background: var(--white); }
.cat-list { list-style: none; }
.cat-list li { border-bottom: 1px solid #ebebeb; }
.cat-list li:last-child { border-bottom: none; }
.cat-list a { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; color: #555; font-size: 13px; font-weight: 500; transition: color .2s, background .2s, padding-left .2s; }
.cat-list a:hover { color: var(--black); background: #eee; padding-left: 22px; }
.cat-list a.current-cat { color: var(--black); font-weight: 700; padding-left: 22px; background: #ededed; }
.cat-count-badge { font-family: var(--font-mono); font-size: 10px; color: #888; background: #e0e0e0; padding: 2px 8px; border-radius: 20px; }
.tag-cloud { padding: 14px 16px; display: flex; flex-wrap: wrap; gap: 7px; }
.tag-cloud a { background: #e8e8e8; color: #555; padding: 5px 12px; border-radius: 20px; font-size: 11px; font-weight: 600; transition: background .2s; }
.tag-cloud a:hover { background: #d0d0d0; }

/* Pagination */
.pagination-wrap { display: flex; align-items: center; gap: 6px; margin-top: 44px; flex-wrap: wrap; }
.page-numbers { min-width: 36px; height: 36px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--gray-border); border-radius: 4px; font-size: 13px; font-weight: 600; color: var(--gray-mid); cursor: pointer; background: var(--white); font-family: var(--font-body); transition: background .2s, color .2s, border-color .2s; text-decoration: none; }
.page-numbers:hover, .page-numbers.current { background: var(--black); color: var(--white); border-color: var(--black); }
.page-numbers.next, .page-numbers.prev { padding: 0 14px; }

/* ===================== SINGLE POST ===================== */
.single-post-hero { background: var(--white); padding: 52px var(--pad) 44px; border-bottom: 1px solid var(--gray-border); }
.breadcrumb-nav { font-size: 11px; font-weight: 500; color: #bbb; margin-bottom: 20px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.breadcrumb-nav a { color: var(--gray-mid); transition: color .2s; }
.breadcrumb-nav a:hover { color: var(--black); text-decoration: underline; }
.breadcrumb-nav span { color: #ddd; }
.single-post-hero h1 { font-size: 42px; font-weight: 800; color: var(--black); line-height: 1.18; letter-spacing: -1.2px; max-width: 820px; margin-bottom: 20px; }
.post-hero-meta { display: flex; align-items: center; gap: 14px; font-size: 12px; color: #aaa; flex-wrap: wrap; }
.author-chip { display: flex; align-items: center; gap: 8px; color: var(--black); font-weight: 600; font-size: 13px; }
.author-chip img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.author-chip-initial { width: 34px; height: 34px; border-radius: 50%; background: var(--black); color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.post-hero-meta .sep { color: #ddd; }
.post-hero-img { width: 100%; 
/* 	aspect-ratio: 21/8; */
	object-fit: cover; border-radius: 10px; margin-top: 32px; display: block; }
.post-hero-img-placeholder { width: 100%; aspect-ratio: 21/8; background: linear-gradient(135deg,#e8f0fe,#d6e4ff,#c7d7fa); border-radius: 10px; margin-top: 32px; display: flex; align-items: center; justify-content: center; font-size: 80px; border: 1px solid #dce8ff; }

.single-post-body { display: grid; grid-template-columns: 80fr 20fr; gap: 52px; padding: 48px var(--pad) 56px; align-items: start; }

/* Article content */
.entry-content { font-family: var(--font-body); }
.entry-content h2 { font-size: 24px; font-weight: 700; color: var(--black); margin: 40px 0 14px; letter-spacing: -.4px; line-height: 1.35; }
.entry-content h3 { font-size: 19px; font-weight: 600; color: #222; margin: 30px 0 10px; }
.entry-content p { font-size: 15.5px; line-height: 1.9; color: #3a3a3a; margin-bottom: 20px; }
.entry-content ul, .entry-content ol { margin: 12px 0 20px 20px; }
.entry-content li { font-size: 15px; line-height: 1.85; color: #3a3a3a; margin-bottom: 6px; }
.entry-content blockquote { background: #f5f6f8; padding: 26px 32px 26px 28px; border-radius: 8px; margin: 32px 0; position: relative; border-left: 4px solid var(--black); }
.entry-content blockquote::before { content: '"'; font-size: 64px; color: #ddd; position: absolute; top: 6px; left: 16px; line-height: 1; }
.entry-content blockquote p { color: #222; font-size: 17px; font-style: italic; font-weight: 500; margin: 0; padding-top: 14px; line-height: 1.7; }
.entry-content img { border-radius: 8px; margin: 28px 0; }
.entry-content a { color: var(--black); text-decoration: underline; text-underline-offset: 3px; }
.entry-content a:hover { color: var(--gray-mid); }
.entry-content code { font-family: var(--font-mono); font-size: 13px; background: #f0f0f0; padding: 2px 6px; border-radius: 3px; }
.entry-content pre { background: #1e2030; border-radius: 8px; padding: 20px 22px; margin: 20px 0; overflow-x: auto; border: 1px solid #2a2e45; }
.entry-content pre code { background: none; padding: 0; color: #a8ff78; line-height: 1.75; font-size: 13px; }

/* Post footer */
.post-footer { margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--gray-border); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.post-tags { display: flex; gap: 7px; flex-wrap: wrap; }
.post-tag { border: 1px solid #e0e0e0; padding: 5px 13px; border-radius: 20px; font-size: 11.5px; font-weight: 500; color: #666; transition: background .2s, color .2s, border-color .2s; }
.post-tag:hover { background: var(--black); color: var(--white); border-color: var(--black); }
.share-btns { display: flex; gap: 8px; }
.share-btn { width: 34px; height: 34px; border-radius: 50%; background: #f2f2f2; color: var(--black); display: flex; align-items: center; justify-content: center; font-size: 12px; cursor: pointer; border: 1px solid #e5e5e5; transition: background .2s, color .2s; }
.share-btn:hover { background: var(--black); color: var(--white); border-color: var(--black); }

/* Single sidebar */
.single-sidebar { position: sticky; top: 84px; font-family: var(--font-body); }
.single-sidebar .sidebar-widget { background: var(--white); color: var(--black); border-radius: 10px; overflow: hidden; margin-bottom: 20px; border: 1px solid #ebebeb; box-shadow: 0 2px 12px rgba(0,0,0,.04); }
.single-sidebar .widget-title { font-size: 10px; letter-spacing: 2.5px; text-transform: uppercase; color: #aaa; padding: 14px 16px 10px; border-bottom: 1px solid #f0f0f0; font-weight: 600; background: #fafafa; }
.most-read-list { list-style: none; }
.most-read-item { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid #f5f5f5; cursor: pointer; align-items: flex-start; transition: background .15s; }
.most-read-item:last-child { border-bottom: none; }
.most-read-item:hover { background: #fafafa; }
.most-read-num { font-size: 20px; font-weight: 800; color: #ebebeb; line-height: 1; flex-shrink: 0; width: 26px; transition: color .2s; }
.most-read-item:hover .most-read-num { color: var(--black); }
.most-read-title { font-size: 12px; font-weight: 500; color: #444; line-height: 1.55; }

/* TOC */
.toc-list { list-style: none; padding: 4px 16px 14px; }
.toc-list li { padding: 7px 0; border-bottom: 1px solid #f5f5f5; }
.toc-list li:last-child { border-bottom: none; }
.toc-list a { font-size: 12.5px; font-weight: 500; color: #666; display: block; transition: color .2s, padding-left .2s; }
.toc-list a:hover { color: var(--black); padding-left: 5px; }
.toc-sub { padding-left: 12px; }
.toc-sub a { font-size: 11.5px; font-weight: 400; color: #aaa; }

/* Related posts */
.related-section { background: #f7f7f9; padding: 52px var(--pad); border-top: 1px solid var(--gray-border); }
.related-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; margin-top: 24px; }
.related-card { background: var(--white); border-radius: 8px; overflow: hidden; border: 1px solid var(--gray-border); cursor: pointer; transition: box-shadow .3s, transform .3s; }
.related-card:hover { box-shadow: 0 10px 30px rgba(0,0,0,.09); transform: translateY(-3px); }
.related-card:hover .related-thumb { transform: scale(1.05); }
.related-thumb-wrap { overflow: hidden; aspect-ratio: 16/9; background: #f0f0f0; }
.related-thumb { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; display: block; }
.related-card-body { padding: 14px; }
.related-card-title { font-size: 14px; font-weight: 700; color: var(--black); line-height: 1.4; margin-bottom: 6px; }
.related-card-meta { font-family: var(--font-mono); font-size: 10px; color: var(--gray-light); }

/* ===================== FOOTER ===================== */
#site-footer { background: var(--black); color: #555; padding: 18px var(--pad); text-align: center; font-family: var(--font-mono); font-size: 11px; letter-spacing: .5px; border-top: 1px solid #1a1a1a; }

/* ===================== LOADING SKELETON ===================== */
.skeleton { background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 6px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ===================== RESPONSIVE ===================== */
@media (max-width:1024px) {
  :root { --pad: 36px; }
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-sidebar { flex-direction: row; flex-wrap: wrap; gap: 12px; }
  .sidebar-post { flex: 1 1 calc(50% - 6px); min-width: 0; }
  .archive-body { grid-template-columns: 1fr; gap: 32px; }
  .category-sidebar { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .posts-grid { grid-template-columns: repeat(2,1fr); }
  .single-post-body { grid-template-columns: 1fr; gap: 0; }
  .single-sidebar { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 40px; }
  .single-sidebar .sidebar-widget:last-child { grid-column: 1/-1; }
  .related-grid { grid-template-columns: repeat(2,1fr); }
  .single-post-hero h1 { font-size: 34px; }
  .category-hero-section h1 { font-size: 38px; }
  .must-read-grid { grid-template-columns: 1fr; }
  .topics-grid { grid-template-columns: repeat(3,1fr); }
  .newsletter-banner { flex-direction: column; align-items: flex-start; }
  .newsletter-form input { width: 200px; }
}
@media (max-width:768px) {
  :root { --pad: 20px; }
  .header-top { gap: 14px; padding: 12px var(--pad); }
  .site-logo { font-size: 22px; }
  .hamburger { display: flex; }
  #site-nav { display: none; }
  .hero-section { padding: 32px var(--pad) 40px; }
  .hero-main h1 { font-size: 22px; }
  .hero-sidebar { flex-direction: column; gap: 10px; }
  .sidebar-post { flex: 1 1 100%; }
  .carousels-section { padding: 40px var(--pad); }
  .carousel-wrapper { padding: 0 8px; }
  .slider-btn { display: none; }
  .category-hero-section { padding: 32px var(--pad); }
  .category-hero-section h1 { font-size: 30px; letter-spacing: -1px; }
  .archive-body { padding: 28px var(--pad); gap: 24px; }
  .posts-grid { grid-template-columns: 1fr; }
  .category-sidebar { display: block; }
  .category-sidebar .sidebar-widget:last-child { display: none; }
  .single-post-hero { padding: 28px var(--pad) 24px; }
  .single-post-hero h1 { font-size: 26px; letter-spacing: -.5px; }
  .single-post-body { padding: 28px var(--pad) 36px; }
  .single-sidebar { display: block; margin-top: 32px; }
  .single-sidebar .sidebar-widget { margin-bottom: 16px; }
  .related-section { padding: 36px var(--pad); }
  .related-grid { grid-template-columns: 1fr; }
  .topics-grid { grid-template-columns: repeat(3,1fr); gap: 10px; }
  .topic-card { padding: 16px 10px 14px; }
  .topic-icon { font-size: 24px; }
  .newsletter-form { width: 100%; }
  .newsletter-form input { flex: 1; width: auto; min-width: 0; }
  .newsletter-banner { padding: 24px 20px; }
  .ticker-bar { padding: 9px var(--pad); }
}
@media (max-width:480px) {
  :root { --pad: 16px; }
  .hero-main h1 { font-size: 20px; }
  .single-post-hero h1 { font-size: 21px; }
  .category-hero-section h1 { font-size: 26px; }
  .posts-grid { gap: 14px; }
  .related-grid { gap: 14px; }
  .topics-grid { grid-template-columns: repeat(2,1fr); }
  .must-read-grid { gap: 14px; }
}

/* ===================== ENGAGEMENT TOOLS ===================== */

/* Reading Progress Bar */
.reading-progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 3px; z-index: 9999; background: transparent;
}
.reading-progress-bar {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--accent), #e8a87e);
  transition: width .1s linear;
  border-radius: 0 2px 2px 0;
}

/* Floating Share Bar */
.floating-share {
  position: fixed; left: 20px; top: 50%;
  transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 8px;
  z-index: 100; opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.floating-share.visible { opacity: 1; pointer-events: all; }
.floating-share-btn {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--white); border: 1.5px solid var(--gray-border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,.1);
  transition: background .2s, border-color .2s, transform .2s;
  font-family: var(--font-body);
}
.floating-share-btn:hover { background: var(--black); color: var(--white); border-color: var(--black); transform: scale(1.1); }
.floating-share-btn.copied { background: #2ecc71; color: var(--white); border-color: #2ecc71; }

/* Back to Top */
.back-to-top {
  position: fixed; right: 24px; bottom: 30px; z-index: 100;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--black); color: var(--white); border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 18px;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .2s;
  font-family: var(--font-body);
}
.back-to-top.visible { opacity: 1; pointer-events: all; }
.back-to-top:hover { transform: translateY(-3px); }

/* Read Time Banner (inside single hero) */
.read-time-banner {
  display: inline-flex; align-items: center; gap: 8px;
  background: #f5f5f5; border-radius: 20px;
  padding: 6px 14px; font-size: 12px; font-weight: 500;
  color: var(--gray-mid); margin-bottom: 18px;
}
.read-time-banner svg { color: var(--accent); }

/* Newsletter inline (inside single post) */
.inline-newsletter {
  background: var(--black); border-radius: 12px;
  padding: 28px 32px; margin: 40px 0;
  position: relative; overflow: hidden;
}
.inline-newsletter::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at top right, rgba(232,201,126,.15), transparent 60%);
  pointer-events: none;
}
.inline-newsletter h4 {
  font-size: 18px; font-weight: 700; color: var(--white);
  margin-bottom: 6px; position: relative;
}
.inline-newsletter p {
  font-size: 13px; color: #888; margin-bottom: 16px;
  line-height: 1.6; position: relative;
}
.inline-newsletter-form {
  display: flex; gap: 8px; flex-wrap: wrap; position: relative;
}
.inline-newsletter-form input {
  flex: 1; min-width: 180px; background: #1a1a1a;
  border: 1px solid #333; border-radius: 6px;
  padding: 10px 14px; font-family: var(--font-body);
  font-size: 13px; color: var(--white); outline: none;
  transition: border-color .2s;
}
.inline-newsletter-form input:focus { border-color: var(--accent); }
.inline-newsletter-form input::placeholder { color: #555; }
.inline-newsletter-form button {
  background: var(--accent); color: var(--black);
  border: none; border-radius: 6px; padding: 10px 20px;
  font-size: 13px; font-weight: 700; cursor: pointer;
  white-space: nowrap; transition: opacity .2s;
}
.inline-newsletter-form button:hover { opacity: .88; }

/* Quiz / Poll Widget */
.engagement-poll {
  background: #f9f9fb; border: 1px solid var(--gray-border);
  border-radius: 12px; padding: 24px 28px; margin: 40px 0;
}
.engagement-poll h4 {
  font-size: 16px; font-weight: 700; color: var(--black);
  margin-bottom: 16px;
}
.poll-options { display: flex; flex-direction: column; gap: 10px; }
.poll-option {
  position: relative; border: 1.5px solid var(--gray-border);
  border-radius: 8px; padding: 12px 16px; cursor: pointer;
  font-size: 14px; font-weight: 500; color: var(--black);
  background: var(--white); overflow: hidden;
  transition: border-color .2s;
}
.poll-option:hover { border-color: var(--black); }
.poll-option.selected { border-color: var(--black); background: #f0f0f0; }
.poll-bar {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: rgba(232,201,126,.25); border-radius: 6px;
  transition: width .6s ease; width: 0;
}
.poll-option-text { position: relative; z-index: 1; }
.poll-pct { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 12px; color: #888; font-family: var(--font-mono); z-index: 1; }

@media (max-width: 768px) {
  .floating-share { display: none; }
  .inline-newsletter { padding: 20px; }
  .inline-newsletter-form { flex-direction: column; }
  .inline-newsletter-form input { width: 100%; }
}

@keyframes spin { to { transform: rotate(360deg); } }

.advertisement {
    display: flex;
    justify-content: space-between;
    margin-bottom: -20px;
}
p.advertisement-headline, p.cta-text {
    color: #000;
    text-transform: uppercase;
    font-size: 11px;
    opacity: 0.5;
}