/* =====================================================
   News Magazine Theme — WP-style
   ===================================================== */
:root {
  --bg: #ffffff;
  --bg-soft: #f5f6f8;
  --bg-muted: #ecedf1;
  --bg-dark: #14161c;
  --bg-darker: #0d0f14;
  --surface: #ffffff;
  --border: #e4e6eb;
  --border-strong: #cdd1d9;
  --text: #14161c;
  --text-soft: #3d4148;
  --text-muted: #6b7280;
  --text-on-dark: #e8eaef;
  --primary: #d72027;
  --primary-dark: #a4181d;
  --primary-soft: #fff0f0;
  --accent: #1a73e8;
  --gold: #f1b211;
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #dc2626;
  --radius: 4px;
  --radius-lg: 8px;
  --shadow-sm: 0 1px 2px rgba(20,22,28,.06);
  --shadow: 0 2px 8px rgba(20,22,28,.08);
  --shadow-lg: 0 8px 28px rgba(20,22,28,.12);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Playfair Display', 'Merriweather', Georgia, serif;
  --font-body-serif: 'Lora', Georgia, 'Times New Roman', serif;
  --font-display: 'Oswald', 'Bebas Neue', Impact, sans-serif;
  --container: 1240px;
  --container-narrow: 760px;
}

/* ============== DARK THEME ============== */
[data-theme="dark"] {
  --bg: #0d111c;
  --bg-soft: #14182a;
  --bg-muted: #1a1f35;
  --bg-dark: #050810;
  --bg-darker: #02040a;
  --surface: #14182a;
  --border: #252b44;
  --border-strong: #353d5f;
  --text: #e8eaef;
  --text-soft: #b8bdc7;
  --text-muted: #8a90a0;
  --text-on-dark: #e8eaef;
  --primary: #f0464d;
  --primary-dark: #d72027;
  --primary-soft: rgba(240, 70, 77, .12);
  --accent: #4d8cf5;
  --gold: #f1b211;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 2px 8px rgba(0, 0, 0, .4);
  --shadow-lg: 0 8px 28px rgba(0, 0, 0, .5);
  color-scheme: dark;
}
[data-theme="dark"] body { background: var(--bg); color: var(--text); }
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4 { color: var(--text); }
[data-theme="dark"] a { color: var(--text); }
[data-theme="dark"] a:hover { color: var(--primary); }
[data-theme="dark"] .post-card,
[data-theme="dark"] .widget,
[data-theme="dark"] .post-author,
[data-theme="dark"] .comment-form,
[data-theme="dark"] .author-header,
[data-theme="dark"] .post-nav a,
[data-theme="dark"] .pagination a,
[data-theme="dark"] .pagination span,
[data-theme="dark"] .btn,
[data-theme="dark"] .author-social a,
[data-theme="dark"] .ticker {
  background: var(--surface);
  border-color: var(--border);
}
[data-theme="dark"] .post-card .post-title a { color: var(--text); }
[data-theme="dark"] .post-card .post-title a:hover { color: var(--primary); }
[data-theme="dark"] .post-meta { color: var(--text-muted); }
[data-theme="dark"] .post-meta a { color: var(--text-soft); }
[data-theme="dark"] .post-card { color: var(--text); }
[data-theme="dark"] .post-excerpt { color: var(--text-soft); }
[data-theme="dark"] .ticker-items a { color: var(--text-soft); }
[data-theme="dark"] .ticker-items a:hover { color: var(--primary); }
[data-theme="dark"] .breadcrumb,
[data-theme="dark"] .breadcrumb a { color: var(--text-muted); }
[data-theme="dark"] .breadcrumb a:hover { color: var(--primary); }
[data-theme="dark"] .post-detail .lead { color: var(--text-soft); }
[data-theme="dark"] .post-detail .post-meta { border-color: var(--border); }
[data-theme="dark"] .post-content { color: var(--text); }
[data-theme="dark"] .post-content blockquote {
  background: var(--bg-soft);
  color: var(--text-soft);
}
[data-theme="dark"] .post-content code {
  background: var(--bg-soft);
  color: var(--primary);
}
[data-theme="dark"] .post-content table th { background: var(--bg-soft); }
[data-theme="dark"] .post-content th,
[data-theme="dark"] .post-content td { border-color: var(--border); }
[data-theme="dark"] .post-content hr { border-top-color: var(--border-strong); }
[data-theme="dark"] .post-tags { border-color: var(--border); }
[data-theme="dark"] .tag {
  background: var(--bg-soft);
  color: var(--text-soft);
  border-color: var(--border);
}
[data-theme="dark"] .post-share { border-color: var(--border); }
[data-theme="dark"] .share-btn {
  background: var(--bg-soft);
  color: var(--text-soft);
  border-color: var(--border);
}
[data-theme="dark"] .comments-section { border-color: var(--border-strong); }
[data-theme="dark"] .comment { border-color: var(--border); }
[data-theme="dark"] .comment p { color: var(--text-soft); }
[data-theme="dark"] .comment-form input,
[data-theme="dark"] .comment-form textarea,
[data-theme="dark"] .search-form-large input {
  background: var(--bg-soft);
  color: var(--text);
  border-color: var(--border-strong);
}
[data-theme="dark"] .comment-form input::placeholder,
[data-theme="dark"] .comment-form textarea::placeholder,
[data-theme="dark"] .search-form-large input::placeholder { color: var(--text-muted); }
[data-theme="dark"] .post-list-item { border-color: var(--border); }
[data-theme="dark"] .popular-numbered li { border-color: var(--border); }
[data-theme="dark"] .cat-list li { border-color: var(--border); }
[data-theme="dark"] .cat-list a { color: var(--text-soft); }
[data-theme="dark"] .cat-count { background: var(--bg-soft); color: var(--text-muted); }
[data-theme="dark"] .tag-cloud a {
  background: var(--bg-soft);
  border-color: var(--border);
  color: var(--text-soft);
}
[data-theme="dark"] .widget-ad {
  background: var(--bg-soft);
  border-color: var(--border-strong);
  color: var(--text-muted);
}
[data-theme="dark"] .widget-title {
  border-bottom-color: var(--primary);
}
[data-theme="dark"] .widget-title::after { background: var(--text); }
[data-theme="dark"] .post-author { border-left-color: var(--primary); }
[data-theme="dark"] .post-author p { color: var(--text-soft); }
[data-theme="dark"] .author-header {
  background: linear-gradient(180deg, var(--bg-soft) 0%, var(--surface) 100%);
}
[data-theme="dark"] .avatar-large { border-color: var(--surface); }
[data-theme="dark"] .pagination .current { background: var(--primary); border-color: var(--primary); color: white; }
[data-theme="dark"] .post-nav a { color: var(--text-soft); }
[data-theme="dark"] .post-nav a:hover { background: var(--bg-soft); border-color: var(--primary); }
[data-theme="dark"] .post-nav small { color: var(--text-muted); }
[data-theme="dark"] .post-author h3,
[data-theme="dark"] .post-tags-label,
[data-theme="dark"] .post-share-label { color: var(--text-muted); }
[data-theme="dark"] .post-content blockquote::before { color: var(--primary); opacity: .3; }
[data-theme="dark"] .site-header { box-shadow: 0 2px 12px rgba(0, 0, 0, .4); }
[data-theme="dark"] .masthead { background: var(--surface); border-color: var(--border); }
[data-theme="dark"] .brand { color: var(--text); }
[data-theme="dark"] .brand:hover { color: var(--text); }
[data-theme="dark"] .tagline { color: var(--text-muted); }
[data-theme="dark"] .masthead-ad {
  background: var(--bg-soft);
  border-color: var(--border-strong);
  color: var(--text-muted);
}
[data-theme="dark"] .topbar { background: var(--bg-darker); }
[data-theme="dark"] body { background: var(--bg); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--text); text-decoration: none; transition: color .15s; }
a:hover { color: var(--primary); }
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 800; line-height: 1.22; color: var(--text); margin: 0 0 .55em; letter-spacing: -.01em; }
h1 { font-size: 2.4rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.3rem; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 18px; }

/* ============== TOPBAR ============== */
.topbar {
  background: var(--bg-darker);
  color: #b9bcc4;
  font-size: .8rem;
  border-bottom: 1px solid #1f232c;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 38px;
  gap: 16px;
  flex-wrap: wrap;
}
.topbar a { color: #c8cbd2; }
.topbar a:hover { color: var(--bg); }
.topbar-date { display: flex; align-items: center; gap: 8px; }
.topbar-date svg { width: 14px; height: 14px; opacity: .7; }
.topbar-links { display: flex; gap: 14px; align-items: center; list-style: none; padding: 0; margin: 0; }
.topbar-social { display: flex; gap: 4px; align-items: center; }
.topbar-social a {
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  color: #c8cbd2;
  transition: all .15s;
}
.topbar-social a svg { width: 13px; height: 13px; }
.topbar-social a:hover { background: var(--primary); color: white; transform: translateY(-1px); }

.theme-toggle {
  background: rgba(255, 255, 255, .06);
  border: none;
  color: #c8cbd2;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  margin-left: 4px;
  padding: 0;
}
.theme-toggle:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-1px);
}
.theme-toggle svg {
  position: absolute;
  transition: transform .35s cubic-bezier(.5, .15, .3, 1.4), opacity .2s;
}
.theme-toggle .icon-sun { transform: scale(0) rotate(180deg); opacity: 0; }
.theme-toggle .icon-moon { transform: scale(1) rotate(0); opacity: 1; }
[data-theme="dark"] .theme-toggle .icon-sun { transform: scale(1) rotate(0); opacity: 1; }
[data-theme="dark"] .theme-toggle .icon-moon { transform: scale(0) rotate(-180deg); opacity: 0; }

/* ============== MASTHEAD / LOGO BANNER ============== */
.masthead {
  background: var(--surface);
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}
.masthead .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-family: var(--font-serif);
  font-size: 2.1rem;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -.02em;
  line-height: 1;
}
.brand:hover { color: var(--text); }
.brand img { max-height: 48px; }
.brand .accent { color: var(--primary); }
.tagline {
  font-family: var(--font-sans);
  font-size: .82rem;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: uppercase;
}
.masthead-ad {
  background: var(--bg-muted);
  border: 1px dashed var(--border-strong);
  color: var(--text-muted);
  font-size: .8rem;
  padding: 14px 28px;
  border-radius: var(--radius);
  text-align: center;
  font-style: italic;
}

/* ============== MAIN NAV ============== */
.site-header {
  background: var(--bg-dark);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
}
.site-nav { display: flex; align-items: center; gap: 8px; flex: 1; }
.nav-list {
  list-style: none;
  display: flex;
  gap: 0;
  padding: 0;
  margin: 0;
  align-items: center;
  flex-wrap: wrap;
}
.nav-list > li { position: relative; }
.nav-list > li > a {
  color: var(--text-on-dark);
  font-weight: 600;
  font-size: .82rem;
  padding: 14px 16px;
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: .04em;
  transition: all .15s;
  border-bottom: 3px solid transparent;
}
.nav-list > li > a:hover,
.nav-list > li.active > a {
  color: white;
  background: rgba(255,255,255,.04);
  border-bottom-color: var(--primary);
}
.nav-list > li:first-child > a { padding-left: 0; }
.nav-sub {
  position: absolute;
  top: 100%; left: 0;
  background: var(--bg-dark);
  border-top: 2px solid var(--primary);
  box-shadow: var(--shadow-lg);
  padding: 6px 0;
  min-width: 200px;
  list-style: none;
  margin: 0;
  display: none;
  z-index: 10;
}
.nav-list > li:hover .nav-sub { display: block; }
.nav-sub a {
  display: block;
  padding: 10px 16px;
  color: var(--text-on-dark);
  font-size: .85rem;
}
.nav-sub a:hover { background: rgba(255,255,255,.08); color: white; }

.header-tools { display: flex; align-items: center; gap: 6px; }
.search-toggle, .mobile-toggle, .mobile-close {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  color: white;
  padding: 8px;
  width: 38px; height: 38px;
  border-radius: var(--radius);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}
.search-toggle:hover, .mobile-toggle:hover { background: rgba(255,255,255,.12); }
.search-toggle svg, .mobile-toggle svg, .mobile-close svg { width: 20px; height: 20px; }
.search-form {
  display: flex;
  align-items: center;
}
.search-form input {
  padding: 8px 14px 8px 36px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  font-size: .85rem;
  width: 220px;
  background: rgba(255,255,255,.06) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a8acb6' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>") no-repeat 12px center;
  color: white;
  transition: all .15s;
}
.search-form input::placeholder { color: rgba(255,255,255,.45); }
.search-form input:focus {
  outline: none;
  background-color: rgba(255,255,255,.1);
  border-color: var(--primary);
}
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 49;
  opacity: 0;
  transition: opacity .25s;
}
.mobile-only { display: none; }

/* ============== BREAKING NEWS TICKER ============== */
.ticker {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  font-size: .85rem;
}
.ticker .container {
  display: flex;
  align-items: stretch;
  gap: 0;
  height: 42px;
  overflow: hidden;
  padding: 0;
}
.ticker-label {
  background: var(--primary);
  color: white;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .76rem;
  padding: 0 22px 0 18px;
  height: 100%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  position: relative;
  clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%);
  z-index: 2;
}
.ticker-label::before {
  content: '';
  width: 7px; height: 7px;
  background: white;
  border-radius: 50%;
  animation: pulse-dot 1.2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulse-dot { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(.7); } }
.ticker-track {
  flex: 1;
  overflow: hidden;
  padding-left: 18px;
  white-space: nowrap;
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  -webkit-mask-image: linear-gradient(to right, black 0, black calc(100% - 60px), transparent 100%);
          mask-image: linear-gradient(to right, black 0, black calc(100% - 60px), transparent 100%);
}
.ticker-items {
  display: inline-flex;
  gap: 0;
  animation: ticker-scroll 80s linear infinite;
  padding-right: 0;
}
.ticker:hover .ticker-items { animation-play-state: paused; }
.ticker-items a {
  color: var(--text-soft);
  font-weight: 500;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  position: relative;
}
.ticker-items a + a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  background: var(--primary);
  border-radius: 50%;
}
.ticker-items a:hover { color: var(--primary); }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============== BREADCRUMB ============== */
.breadcrumb { padding: 16px 0 4px; font-size: .82rem; color: var(--text-muted); }
.breadcrumb ol { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0; flex-wrap: wrap; align-items: center; }
.breadcrumb li:not(:last-child)::after { content: "›"; padding: 0 8px; color: var(--border-strong); }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }

/* ============== SECTION HEADING ============== */
.section-heading {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 800;
  margin: 32px 0 18px;
  position: relative;
  padding: 0 0 0 14px;
  border-left: 5px solid var(--primary);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  text-transform: uppercase;
  letter-spacing: .01em;
}
.section-heading .more {
  font-family: var(--font-sans);
  font-size: .78rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* ============== HERO ============== */
.hero {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
  margin: 22px 0 12px;
  min-height: 460px;
}
.hero-main, .hero-side-item {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-dark);
  display: block;
  color: white;
}
.hero-main { min-height: 460px; }
.hero-side {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 18px;
}
.hero-side-item { min-height: 220px; }
.hero img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.hero a:hover img { transform: scale(1.04); }
.hero a::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.35) 50%, rgba(0,0,0,.05) 100%);
}
.hero-content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 24px 26px;
  color: white;
  z-index: 2;
}
.hero-side-item .hero-content { padding: 18px 20px; }
.hero-content .post-category {
  background: var(--primary);
  color: white;
  padding: 4px 10px;
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 10px;
  border-radius: 2px;
}
.hero-main .hero-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 10px;
  color: white;
  text-shadow: 0 2px 12px rgba(0,0,0,.4);
}
.hero-side-item .hero-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  color: white;
}
.hero-meta {
  font-size: .8rem;
  color: rgba(255,255,255,.85);
  display: flex;
  gap: 8px;
  align-items: center;
}
.hero-side-item .hero-meta { font-size: .72rem; }

/* ============== MAIN GRID (content + sidebar) ============== */
.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 36px;
  margin: 28px 0;
}
@media (max-width: 980px) { .main-grid { grid-template-columns: 1fr; } }

/* ============== POST GRID / CARDS ============== */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 24px;
}
.post-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 600px) { .post-grid-2 { grid-template-columns: 1fr; } }

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
  display: flex;
  flex-direction: column;
  position: relative;
}
.post-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.post-thumb { display: block; overflow: hidden; background: var(--bg-muted); position: relative; }
.post-thumb img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  width: 100%;
  transition: transform .4s ease;
}
.post-card:hover .post-thumb img { transform: scale(1.05); }
.post-thumb-badge {
  position: absolute;
  bottom: 10px; left: 10px;
  background: var(--primary);
  color: white;
  padding: 4px 10px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  border-radius: 2px;
  z-index: 1;
}
.post-card-body { padding: 16px 18px 18px; flex: 1; display: flex; flex-direction: column; }
.post-category {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}
.post-card .post-title {
  font-family: var(--font-serif);
  font-size: 1.12rem;
  margin: 6px 0 8px;
  line-height: 1.32;
  font-weight: 800;
}
.post-card .post-title a { color: var(--text); }
.post-card .post-title a:hover { color: var(--primary); }
.post-excerpt {
  font-size: .9rem;
  color: var(--text-soft);
  margin: 0 0 12px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-meta {
  font-size: .77rem;
  color: var(--text-muted);
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 8px;
}
.post-meta a { color: var(--text-soft); font-weight: 500; }
.post-meta a:hover { color: var(--primary); }
.post-meta .dot { color: var(--border-strong); }

/* List style cards (for sidebar/popular) */
.post-list-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.post-list-item:last-child { border-bottom: none; }
.post-list-item .post-thumb img { aspect-ratio: 1; border-radius: var(--radius); }
.post-list-item .post-title {
  font-family: var(--font-serif);
  font-size: .95rem;
  line-height: 1.3;
  margin: 2px 0 6px;
  font-weight: 700;
}
.post-list-item .post-title a { color: var(--text); }
.post-list-item .post-title a:hover { color: var(--primary); }
.post-list-item .post-meta { font-size: .72rem; padding-top: 0; }

/* Numbered popular widget */
.popular-numbered { padding: 0; margin: 0; counter-reset: pop; list-style: none; }
.popular-numbered li {
  counter-increment: pop;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.popular-numbered li:last-child { border-bottom: none; }
.popular-numbered li::before {
  content: counter(pop, decimal-leading-zero);
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  opacity: .35;
  line-height: 1;
}
.popular-numbered .post-title {
  font-family: var(--font-serif);
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.32;
  margin: 0 0 4px;
}
.popular-numbered .post-title a { color: var(--text); }
.popular-numbered .post-title a:hover { color: var(--primary); }
.popular-numbered .post-meta { font-size: .72rem; padding: 0; }

/* ============== SIDEBAR ============== */
.sidebar { display: flex; flex-direction: column; gap: 24px; }
.widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px 20px;
}
.widget-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0 0 14px;
  padding: 0 0 10px;
  border-bottom: 2px solid var(--primary);
  text-transform: uppercase;
  letter-spacing: .02em;
  position: relative;
}
.widget-title::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 60px; height: 2px;
  background: var(--text);
}
.widget-newsletter {
  background: linear-gradient(135deg, var(--bg-dark), var(--bg-darker));
  color: var(--text-on-dark);
  border-color: transparent;
}
.widget-newsletter .widget-title { color: white; border-bottom-color: var(--primary); }
.widget-newsletter .widget-title::after { background: white; }
.widget-newsletter p { font-size: .85rem; color: rgba(255,255,255,.78); margin: 0 0 12px; }
.widget-newsletter input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius);
  background: rgba(255,255,255,.06);
  color: white;
  font-size: .9rem;
  margin-bottom: 8px;
}
.widget-newsletter input::placeholder { color: rgba(255,255,255,.5); }
.widget-newsletter button {
  width: 100%;
  padding: 10px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  cursor: pointer;
  transition: background .15s;
}
.widget-newsletter button:hover { background: var(--primary-dark); }

.cat-list { padding: 0; margin: 0; list-style: none; }
.cat-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: .9rem;
}
.cat-list li:last-child { border-bottom: none; }
.cat-list a { color: var(--text-soft); font-weight: 500; }
.cat-list a:hover { color: var(--primary); }
.cat-count {
  background: var(--bg-muted);
  color: var(--text-muted);
  padding: 2px 9px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
}

.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-cloud a {
  background: var(--bg-soft);
  padding: 5px 11px;
  font-size: .78rem;
  color: var(--text-soft);
  border-radius: var(--radius);
  transition: all .15s;
  border: 1px solid var(--border);
}
.tag-cloud a:hover { background: var(--primary); color: white; border-color: var(--primary); }

.widget-ad {
  background: var(--bg-muted);
  border: 1px dashed var(--border-strong);
  color: var(--text-muted);
  font-size: .8rem;
  padding: 60px 16px;
  text-align: center;
  font-style: italic;
  border-radius: var(--radius-lg);
}

/* ============== READING PROGRESS BAR ============== */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  z-index: 60;
  pointer-events: none;
}
.reading-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--primary), #ff8a3d);
  transition: width .08s linear;
  box-shadow: 0 0 12px rgba(215, 32, 39, .4);
}

/* ============== TABLE OF CONTENTS ============== */
.widget-toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: toc;
}
.widget-toc li {
  counter-increment: toc;
  margin: 0;
  position: relative;
}
.widget-toc li.toc-sub { padding-left: 16px; }
.widget-toc a {
  display: block;
  padding: 8px 12px;
  font-size: .88rem;
  color: var(--text-soft);
  border-left: 2px solid var(--border);
  transition: all .15s;
  line-height: 1.4;
}
.widget-toc a:hover {
  color: var(--primary);
  border-left-color: var(--primary);
  background: var(--bg-soft);
}
.widget-toc a.active {
  color: var(--primary);
  border-left-color: var(--primary);
  background: var(--bg-soft);
  font-weight: 600;
}
.widget-toc li.toc-sub a {
  font-size: .82rem;
  padding: 6px 10px;
  color: var(--text-muted);
}

/* ============== COOKIE CONSENT BANNER ============== */
.cookie-consent {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  z-index: 70;
  max-width: 760px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 18px 20px;
  display: flex;
  transform: translateY(120%);
  opacity: 0;
  transition: transform .35s cubic-bezier(.16, 1, .3, 1), opacity .25s;
}
.cookie-consent.is-open {
  transform: translateY(0);
  opacity: 1;
}
.cookie-consent-inner {
  display: flex;
  gap: 18px;
  align-items: center;
  width: 100%;
  flex-wrap: wrap;
}
.cookie-consent-text { flex: 1 1 280px; min-width: 0; }
.cookie-consent-text strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.cookie-consent-text p {
  margin: 0;
  font-size: .85rem;
  color: var(--text-soft);
  line-height: 1.5;
}
.cookie-consent-text a { color: var(--primary); text-decoration: underline; }
.cookie-consent-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.btn-cookie-reject { background: var(--bg-soft); border-color: var(--border); color: var(--text-soft); }
@media (max-width: 600px) {
  .cookie-consent { left: 8px; right: 8px; bottom: 8px; padding: 14px 16px; }
  .cookie-consent-actions { width: 100%; justify-content: flex-end; }
}

/* ============== LIVEBLOG ============== */
.liveblog {
  margin: 28px 0;
  padding: 22px;
  border: 2px solid var(--primary);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(215, 32, 39, .04), transparent);
}
.liveblog-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.liveblog-head h2 {
  margin: 0;
  font-size: 1.3rem;
  flex: 1;
}
.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 0 rgba(215, 32, 39, .5);
  animation: live-pulse 1.6s ease-in-out infinite;
}
@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(215, 32, 39, .5); }
  70% { box-shadow: 0 0 0 10px rgba(215, 32, 39, 0); }
  100% { box-shadow: 0 0 0 0 rgba(215, 32, 39, 0); }
}
.liveblog-count {
  font-size: .82rem;
  color: var(--text-muted);
  font-weight: 600;
}
.liveblog-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.liveblog-entry {
  position: relative;
  padding: 14px 18px 14px 70px;
  border-left: 2px solid var(--border-strong);
  margin-left: 50px;
}
.liveblog-entry::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 22px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--bg);
}
.liveblog-entry.pinned { background: rgba(241, 178, 17, .06); border-radius: var(--radius); }
.liveblog-entry.pinned::before { background: var(--gold); }
.liveblog-entry header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .8rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.liveblog-entry time {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  position: absolute;
  left: -56px;
  top: 16px;
  width: 56px;
  text-align: right;
  letter-spacing: .02em;
}
.lb-date { font-size: .72rem; opacity: .7; }
.lb-pinned {
  background: var(--gold);
  color: white;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
}
.liveblog-entry h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  margin: 4px 0 8px;
  font-weight: 700;
}
.lb-body { font-size: .95rem; line-height: 1.6; }
.lb-body p:last-child { margin-bottom: 0; }
.liveblog-entry footer { margin-top: 8px; color: var(--text-muted); font-size: .76rem; }
.liveblog-entry.new {
  animation: lb-flash 1.2s ease-out;
}
@keyframes lb-flash {
  0%   { background: rgba(241, 178, 17, .25); transform: translateX(8px); }
  100% { background: transparent; transform: translateX(0); }
}
@media (max-width: 600px) {
  .liveblog { padding: 16px 12px; }
  .liveblog-entry { padding-left: 14px; margin-left: 0; border-left-width: 3px; }
  .liveblog-entry::before { display: none; }
  .liveblog-entry time {
    position: static;
    text-align: left;
    width: auto;
    font-size: 1rem;
  }
}

/* ============== POST DETAIL ============== */
.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 40px;
  margin: 24px 0;
}
@media (max-width: 980px) { .post-layout { grid-template-columns: 1fr; } }
.post-detail {
  font-size: 1.05rem;
  min-width: 0;
}
.post-detail .post-category {
  font-size: .78rem;
  margin-bottom: 12px;
  display: inline-block;
}
.post-detail .post-title {
  font-size: 2.5rem;
  line-height: 1.18;
  margin: 6px 0 14px;
  letter-spacing: -.015em;
  font-weight: 900;
}
.post-detail .lead {
  font-size: 1.16rem;
  color: var(--text-soft);
  line-height: 1.6;
  margin: 0 0 18px;
  font-weight: 400;
  font-style: italic;
}
.post-detail .post-meta {
  font-size: .85rem;
  margin: 14px 0 22px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.post-author-mini { display: flex; align-items: center; gap: 10px; }
.post-author-mini img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.post-author-mini .avatar-initial,
.avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), #ff8a3d);
  color: white;
  font-weight: 700;
  text-transform: uppercase;
}
.post-author-mini .avatar-initial {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: .82rem;
  flex-shrink: 0;
}
.avatar-large.avatar-fallback {
  font-size: 2.6rem;
}
.post-featured { margin: 22px 0 26px; }
.post-featured img { border-radius: var(--radius-lg); width: 100%; }
.post-featured figcaption {
  font-size: .82rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
  font-style: italic;
}
.post-content {
  font-family: var(--font-body-serif);
  font-size: 1.08rem;
  line-height: 1.8;
  color: var(--text);
  font-weight: 400;
}
.post-content > p:first-of-type::first-letter {
  font-family: var(--font-serif);
  font-size: 4.4rem;
  font-weight: 900;
  float: left;
  line-height: 1;
  padding: 6px 12px 0 0;
  color: var(--primary);
}
.post-content > *:first-child { margin-top: 0; }
.post-content p { margin: 0 0 1.2em; }
.post-content h2 { font-size: 1.7rem; margin: 1.6em 0 .55em; }
.post-content h3 { font-size: 1.35rem; margin: 1.4em 0 .5em; }
.post-content h4 { font-size: 1.15rem; margin: 1.2em 0 .4em; }
.post-content a { color: var(--primary); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.post-content a:hover { color: var(--primary-dark); }
.post-content img { margin: 22px auto; border-radius: var(--radius); box-shadow: var(--shadow); }
.post-content blockquote {
  border-left: 5px solid var(--primary);
  margin: 22px 0;
  padding: 16px 22px;
  color: var(--text-soft);
  background: var(--bg-soft);
  font-style: italic;
  font-size: 1.18rem;
  line-height: 1.55;
  position: relative;
}
.post-content blockquote::before {
  content: '"';
  position: absolute;
  top: -10px; left: 12px;
  font-size: 4rem;
  color: var(--primary);
  opacity: .2;
  font-family: var(--font-serif);
  line-height: 1;
}
.post-content blockquote p:last-child { margin-bottom: 0; }
.post-content pre {
  background: var(--bg-darker);
  color: #e2e8f0;
  padding: 18px 20px;
  overflow-x: auto;
  border-radius: var(--radius);
  font-family: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
  font-size: .9rem;
  line-height: 1.6;
  margin: 20px 0;
}
.post-content code {
  background: var(--bg-muted);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.92em;
  font-family: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
  color: var(--primary);
}
.post-content pre code { background: none; padding: 0; color: inherit; }
.post-content ul, .post-content ol { padding-left: 1.6em; margin: 0 0 1.2em; }
.post-content li { margin: .4em 0; }
.post-content hr { border: none; border-top: 2px dotted var(--border-strong); margin: 32px auto; width: 60%; }
.post-content table { width: 100%; border-collapse: collapse; margin: 1.2em 0; }
.post-content th, .post-content td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); }
.post-content th { background: var(--bg-soft); font-weight: 700; }

.breaking {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 5px 12px;
  border-radius: 2px;
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 12px;
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .6; }
}

.post-tags { margin: 28px 0; padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.post-tags-label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-right: 4px; }
.tag {
  display: inline-block;
  background: var(--bg-soft);
  padding: 5px 12px;
  border-radius: var(--radius);
  font-size: .8rem;
  color: var(--text-soft);
  border: 1px solid var(--border);
  transition: all .15s;
}
.tag:hover { background: var(--primary); color: white; border-color: var(--primary); }

/* Share buttons */
.post-share {
  display: flex;
  gap: 8px;
  margin: 22px 0;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.post-share-label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-right: 6px; }
.share-btn {
  width: 38px; height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--text-soft);
  border: 1px solid var(--border);
  transition: all .15s;
  cursor: pointer;
  text-decoration: none;
  padding: 0;
}
.share-btn svg { width: 16px; height: 16px; }
.share-btn:hover { transform: translateY(-2px); }
.share-fb:hover { background: #1877f2; color: white; border-color: #1877f2; }
.share-tw:hover { background: #000; color: white; border-color: #000; }
.share-wa:hover { background: #25d366; color: white; border-color: #25d366; }
.share-tg:hover { background: #0088cc; color: white; border-color: #0088cc; }
.share-email:hover { background: var(--text); color: white; border-color: var(--text); }
.share-link:hover { background: var(--text); color: white; border-color: var(--text); }
.share-link.copied { background: var(--success); color: white; border-color: var(--success); }
.share-link.copied::after { content: 'Disalin!'; position: absolute; transform: translate(0, -34px); background: var(--text); color: white; padding: 4px 8px; font-size: .72rem; border-radius: 4px; white-space: nowrap; }

/* Author box */
.post-author {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin: 32px 0;
  padding: 22px;
  background: var(--bg-soft);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--primary);
}
.post-author h3 {
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin: 0 0 8px;
  font-family: var(--font-sans);
  font-weight: 700;
  width: 100%;
}
.post-author .avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid white;
  box-shadow: var(--shadow);
}
.post-author p { margin: 4px 0 0; color: var(--text-soft); font-size: .92rem; }

/* Post nav */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 28px 0;
}
.post-nav a {
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  font-size: .9rem;
  color: var(--text);
  transition: all .15s;
  display: block;
}
.post-nav a:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.post-nav small {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 4px;
  font-weight: 700;
}
.post-nav .next { text-align: right; }

.related-posts { margin: 40px 0; }
.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.related-grid .post-card { font-size: .9rem; }
.related-grid .post-thumb img { aspect-ratio: 16 / 10; }
.related-grid .post-card-body { padding: 12px 14px 14px; }
.related-grid .post-card .post-title { font-size: .98rem; line-height: 1.3; margin: 4px 0 6px; }
.related-grid .post-excerpt { display: none; }
.related-grid .post-meta { font-size: .72rem; }
@media (max-width: 600px) { .related-grid { grid-template-columns: 1fr; } }

/* Sticky sidebar wrap */
.post-sidebar { display: flex; flex-direction: column; gap: 22px; }
.sticky-widget { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 22px; }

/* ============== COMMENTS ============== */
.comments-section { margin: 40px 0; padding-top: 24px; border-top: 2px solid var(--border-strong); }
.comments-section h3 { margin-bottom: 18px; }
.comment-list { margin-bottom: 28px; }
.comment {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.comment:last-of-type { border-bottom: none; }
.comment.is-reply {
  margin-left: 32px;
  padding: 14px 0 14px 16px;
  border-left: 3px solid var(--border);
  border-bottom: none;
  position: relative;
}
.comment.is-reply::before {
  content: '';
  position: absolute;
  left: -3px;
  top: 24px;
  width: 12px;
  height: 3px;
  background: var(--border);
}
.comment-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), #ff8a3d);
  color: white;
  font-weight: 700;
  font-size: .82rem;
  text-transform: uppercase;
  flex-shrink: 0;
}
.comment-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  flex: 1;
  min-width: 0;
}
.comment-author {
  font-size: .92rem;
  color: var(--text);
  font-weight: 700;
}
.comment-author a { color: inherit; }
.comment-author a:hover { color: var(--primary); }
.comment-time { color: var(--text-muted); font-size: .75rem; }
.comment-body {
  margin: 6px 0 10px;
  color: var(--text-soft);
  line-height: 1.6;
  font-size: .94rem;
  white-space: pre-wrap;
}
.comment-reply-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: .76rem;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  transition: all .15s;
}
.comment-reply-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--bg-soft);
}
.comment-replies { margin-top: 10px; }

.reply-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
  padding: 8px 14px;
  background: var(--bg-soft);
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: .85rem;
  color: var(--text-soft);
}
.reply-banner strong { color: var(--text); }
.reply-cancel {
  margin-left: auto;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 6px;
}
.reply-cancel:hover { color: var(--primary); }

@media (max-width: 600px) {
  .comment.is-reply { margin-left: 16px; padding-left: 12px; }
}

.comment-form {
  margin-top: 24px;
  padding: 22px;
  background: var(--bg-soft);
  border-radius: var(--radius-lg);
}
.comment-form h4 { margin: 0 0 14px; font-family: var(--font-sans); font-size: 1.05rem; }
.comment-form .row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 10px 0; }
.comment-form input, .comment-form textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  font-size: .92rem;
  font-family: inherit;
  background: var(--surface);
  transition: all .15s;
}
.comment-form input:focus, .comment-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(215,32,39,.12);
}
.comment-form textarea { resize: vertical; min-height: 120px; }

/* ============== AUTHOR PAGE ============== */
.author-header {
  text-align: center;
  margin: 28px 0;
  padding: 36px 24px;
  background: linear-gradient(180deg, var(--bg-soft) 0%, var(--surface) 100%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.avatar-large {
  width: 110px; height: 110px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 14px;
  border: 4px solid var(--surface);
  box-shadow: var(--shadow);
}
.author-social { display: flex; justify-content: center; gap: 10px; padding: 0; list-style: none; margin: 14px 0 0; }
.author-social a {
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-soft);
  transition: all .15s;
}
.author-social a:hover { background: var(--primary); color: white; border-color: var(--primary); }

/* ============== PAGINATION ============== */
.pagination { display: flex; justify-content: center; gap: 6px; align-items: center; margin: 32px 0; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 38px;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-soft);
  font-size: .88rem;
  font-weight: 600;
  text-align: center;
  transition: all .15s;
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .current { background: var(--primary); color: white; border-color: var(--primary); }
.pagination .disabled { opacity: .4; pointer-events: none; }

/* ============== FOOTER ============== */
.site-footer {
  margin-top: 48px;
  background: var(--bg-darker);
  color: #b9bcc4;
  padding: 48px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 32px;
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-col h4 {
  font-family: var(--font-sans);
  color: white;
  font-size: .95rem;
  font-weight: 700;
  margin: 0 0 16px;
  text-transform: uppercase;
  letter-spacing: .04em;
  position: relative;
  padding-bottom: 10px;
}
.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 32px; height: 2px;
  background: var(--primary);
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin: 8px 0; font-size: .88rem; }
.footer-col a { color: #b9bcc4; }
.footer-col a:hover { color: white; }
.footer-brand .brand { color: white; font-size: 1.6rem; }
.footer-brand p { margin: 12px 0; font-size: .88rem; line-height: 1.6; max-width: 360px; }
.footer-social { display: flex; gap: 8px; margin-top: 14px; }
.footer-social a {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  color: #b9bcc4;
  transition: all .15s;
}
.footer-social a svg { width: 15px; height: 15px; }
.footer-social a:hover { background: var(--primary); color: white; transform: translateY(-2px); }
.footer-bottom {
  border-top: 1px solid #1f232c;
  padding: 18px 0;
  text-align: center;
  font-size: .82rem;
  color: var(--text-muted);
}
.footer-bottom a { color: #b9bcc4; }

/* ============== BUTTONS ============== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  cursor: pointer;
  font-size: .9rem;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  background: var(--surface);
  color: var(--text);
  transition: all .15s;
}
.btn:hover { border-color: var(--text-soft); }
.btn-primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: white;
}

/* ============== SEARCH ============== */
.search-form-large {
  display: flex;
  gap: 8px;
  max-width: 560px;
  margin: 24px auto;
}
.search-form-large input {
  flex: 1;
  padding: 12px 18px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
}
.search-form-large input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(215,32,39,.12);
}

/* ============== ERROR PAGES ============== */
.error-page { text-align: center; padding: 72px 16px; }
.error-page h1 {
  font-family: var(--font-serif);
  font-size: 6rem;
  margin: 0;
  letter-spacing: -.04em;
  color: var(--primary);
  font-weight: 900;
}
.error-page p { color: var(--text-muted); font-size: 1.1rem; margin: 12px 0 24px; }

/* ============== RESPONSIVE ============== */

/* Tablet */
@media (max-width: 1024px) {
  :root { --container: 100%; }
  .main-grid, .post-layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 28px; }
  .nav-list > li > a { padding: 14px 12px; font-size: .78rem; }
  .search-form input { width: 180px; }
  .masthead-ad { padding: 10px 18px; font-size: .76rem; }
  .post-detail .post-title { font-size: 2.1rem; }
  .post-content { font-size: 1.05rem; }
}

/* Tablet portrait — collapse sidebar */
@media (max-width: 980px) {
  .main-grid, .post-layout { grid-template-columns: 1fr; gap: 32px; }
  .sticky-widget { position: static; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-main { min-height: 360px; }
  .hero-side { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
  .hero-side-item { min-height: 200px; }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; gap: 28px; }
  .footer-brand { grid-column: 1 / -1; }
}

/* Mobile breakpoint — switch nav to hamburger */
@media (max-width: 900px) {
  .mobile-toggle, .search-toggle { display: inline-flex; }
  .mobile-only { display: block; }
  .site-header .container { padding: 10px 16px; }
  .site-nav {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 80%;
    max-width: 320px;
    background: var(--bg-dark);
    z-index: 100;
    transform: translateX(-100%);
    transition: transform .3s cubic-bezier(.16, 1, .3, 1);
    flex-direction: column;
    align-items: stretch;
    padding: 70px 0 24px;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0,0,0,.3);
  }
  .site-nav.is-open { transform: translateX(0); }
  body.nav-open { overflow: hidden; }
  body.nav-open .mobile-overlay { display: block; opacity: 1; }
  .mobile-close {
    display: flex;
    position: absolute;
    top: 16px; right: 16px;
  }
  .nav-list {
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    width: 100%;
    gap: 0;
  }
  .nav-list > li {
    width: 100%;
    border-bottom: 1px solid rgba(255,255,255,.05);
  }
  .nav-list > li > a {
    padding: 16px 24px;
    font-size: .9rem;
    border-bottom: none;
    display: block;
  }
  .nav-list > li > a:hover {
    background: rgba(255,255,255,.06);
    border-bottom: none;
  }
  .nav-list > li:first-child > a { padding-left: 24px; }
  .nav-sub {
    position: static;
    display: block !important;
    background: rgba(0,0,0,.25);
    box-shadow: none;
    border-top: none;
    padding: 0;
    min-width: 0;
  }
  .nav-sub a { padding: 12px 40px; font-size: .82rem; }
  .mobile-search { padding: 18px 24px; }
  .search-form-mobile {
    display: flex;
    gap: 6px;
  }
  .search-form-mobile input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: var(--radius);
    background: rgba(255,255,255,.06);
    color: white;
    font-size: .88rem;
  }
  .search-form-mobile input::placeholder { color: rgba(255,255,255,.4); }
  .search-form-mobile button {
    background: var(--primary);
    border: none;
    color: white;
    padding: 0 14px;
    border-radius: var(--radius);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .search-form-mobile button svg { width: 18px; height: 18px; }

  .search-form {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--bg-dark);
    padding: 12px 16px;
    border-top: 1px solid rgba(255,255,255,.08);
    display: none;
    z-index: 9;
  }
  .search-form.is-open { display: block; }
  .search-form input { width: 100%; }

  /* Topbar collapsing */
  .topbar .container { padding: 8px 16px; height: auto; gap: 8px; }
  .topbar-links li:not(.topbar-social):not(.topbar-toggle-item) { display: none; }
  .topbar-date { font-size: .76rem; }

  /* Masthead */
  .masthead { padding: 14px 0; }
  .masthead .container { justify-content: center; }
  .brand { font-size: 1.5rem; }
  .masthead-ad { display: none; }

  /* Ticker */
  .ticker .container { height: 38px; }
  .ticker-label { font-size: .68rem; padding: 0 12px; }
}

/* Phone */
@media (max-width: 640px) {
  body { font-size: 15px; }
  .container { padding: 0 14px; }
  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.4rem; }
  h3 { font-size: 1.15rem; }

  .section-heading {
    font-size: 1.1rem;
    margin: 24px 0 14px;
    padding-left: 10px;
    border-left-width: 4px;
  }
  .section-heading .more { font-size: .72rem; }

  /* Hero — single column stack */
  .hero { gap: 12px; }
  .hero-main { min-height: 300px; }
  .hero-side { grid-template-columns: 1fr; gap: 12px; }
  .hero-side-item { min-height: 180px; }
  .hero-content { padding: 16px 18px; }
  .hero-main .hero-title { font-size: 1.4rem; }
  .hero-side-item .hero-title { font-size: 1rem; }
  .hero-meta { font-size: .72rem; }

  /* Post grid — single column */
  .post-grid, .post-grid-2 { grid-template-columns: 1fr; gap: 16px; }
  .related-grid { grid-template-columns: 1fr; }

  /* Post detail */
  .post-detail .post-title { font-size: 1.5rem; line-height: 1.25; }
  .post-detail .lead { font-size: 1rem; }
  .post-detail .post-meta {
    flex-wrap: wrap;
    gap: 4px 8px;
    font-size: .78rem;
  }
  .post-detail .post-meta .dot:nth-of-type(2),
  .post-detail .post-meta .dot:nth-of-type(3) { display: none; }
  .post-content { font-size: 1rem; line-height: 1.7; }
  .post-content > p:first-of-type::first-letter { font-size: 3rem; }
  .post-content h2 { font-size: 1.35rem; }
  .post-content h3 { font-size: 1.15rem; }
  .post-content blockquote { font-size: 1.05rem; padding: 12px 16px; }
  .post-content pre { padding: 12px 14px; font-size: .85rem; }

  /* Share buttons */
  .post-share { gap: 6px; flex-wrap: wrap; }
  .post-share-label {
    width: 100%;
    margin-bottom: 6px;
  }
  .share-btn { width: 36px; height: 36px; }

  /* Author box */
  .post-author { padding: 18px; gap: 14px; }
  .post-author .avatar { width: 56px; height: 56px; }

  /* Post nav */
  .post-nav { grid-template-columns: 1fr; }
  .post-nav .next { text-align: left; }

  /* Comments */
  .comment-form { padding: 16px; }
  .comment-form .row { grid-template-columns: 1fr; }

  /* Author archive */
  .author-header { padding: 24px 16px; }
  .avatar-large { width: 90px; height: 90px; }

  /* Footer */
  .site-footer { padding: 36px 0 0; margin-top: 36px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; padding-bottom: 24px; }
  .footer-col h4 { margin-bottom: 12px; padding-bottom: 8px; }

  /* Pagination */
  .pagination a, .pagination span { min-width: 34px; padding: 7px 10px; font-size: .82rem; }

  /* Widget */
  .widget { padding: 16px; }
  .widget-newsletter { padding: 18px; }

  /* Error page */
  .error-page h1 { font-size: 4rem; }
}

/* Small phone */
@media (max-width: 380px) {
  .post-detail .post-title { font-size: 1.35rem; }
  .hero-main .hero-title { font-size: 1.15rem; }
  .topbar-date { font-size: .7rem; }
  .topbar-social a { width: 24px; height: 24px; }
  .topbar-social a svg { width: 11px; height: 11px; }
}
