/*
Theme Name: OddVora Blog
Theme URI: https://www.oddvora.com/blog/
Author: OddVora Analytics Team
Author URI: https://www.oddvora.com/
Description: Custom blog theme for OddVora. Matches the OddVora predictions-site design system with dark/light mode and a slide-out mobile menu. No author byline, no featured image on single posts, comments disabled site-wide.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: oddvora-blog
*/

/* ─────────────────────────────────────
   TOKENS
───────────────────────────────────── */
:root {
  --f: 'Inter', system-ui, sans-serif;
  --fm: 'JetBrains Mono', monospace;
  --red: #dc2626;
  --grn: #16a34a;
  --amb: #d97706;
  --blu: #2563eb;
  --pur: #7c3aed;
  --r8: 8px;
  --ease: cubic-bezier(.4,0,.2,1);
}

[data-theme="dark"] {
  --bg:   #0c0c0c;
  --bg1:  #111;
  --bg2:  #171717;
  --bg3:  #1f1f1f;
  --card: #141414;
  --hov:  #1a1a1a;
  --b1:   #252525;
  --b2:   #383838;
  --tx:   #f1f1f1;
  --tx2:  #888;
  --tx3:  #4a4a4a;
  --rlt:  rgba(220,38,38,.1);
  --rbd:  rgba(220,38,38,.3);
  --glt:  rgba(22,163,74,.1);
  --gbd:  rgba(22,163,74,.3);
  --alt:  rgba(217,119,6,.1);
  --abd:  rgba(217,119,6,.3);
  --blt:  rgba(37,99,235,.1);
  --bbd:  rgba(37,99,235,.3);
  --plt:  rgba(124,58,237,.1);
  --pbd:  rgba(124,58,237,.3);
}

[data-theme="light"] {
  --bg:   #f4f4f4;
  --bg1:  #fff;
  --bg2:  #f0f0f0;
  --bg3:  #e8e8e8;
  --card: #fff;
  --hov:  #f8f8f8;
  --b1:   #e0e0e0;
  --b2:   #c4c4c4;
  --tx:   #111;
  --tx2:  #666;
  --tx3:  #aaa;
  --rlt:  rgba(220,38,38,.08);
  --rbd:  rgba(220,38,38,.22);
  --glt:  rgba(22,163,74,.08);
  --gbd:  rgba(22,163,74,.22);
  --alt:  rgba(217,119,6,.1);
  --abd:  rgba(217,119,6,.25);
  --blt:  rgba(37,99,235,.08);
  --bbd:  rgba(37,99,235,.22);
  --plt:  rgba(124,58,237,.08);
  --pbd:  rgba(124,58,237,.22);
}

/* ─────────────────────────────────────
   RESET
───────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: hidden; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--f);
  background: var(--bg);
  color: var(--tx);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
button { font-family: var(--f); cursor: pointer; border: none; background: none; }
img { max-width: 100%; height: auto; display: block; }

.skip-link {
  position: absolute; top: -100px; left: 20px; z-index: 9999;
  padding: 10px 18px; background: var(--red); color: #fff;
  font-size: 13px; font-weight: 700; border-radius: 0 0 6px 6px; transition: top .15s;
}
.skip-link:focus { top: 0; outline: 3px solid #fff; outline-offset: 2px; }

/* ─────────────────────────────────────
   HEADER / NAV
───────────────────────────────────── */
.header {
  background: var(--bg1);
  border-bottom: 1px solid var(--b1);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.logo { display: flex; align-items: baseline; gap: 8px; flex-shrink: 0; }
.logo-text { font-size: 24px; font-weight: 900; letter-spacing: -1px; color: var(--tx); line-height: 1; }
.logo-text em { color: var(--red); font-style: normal; }
.logo-sub, .mob-logo-sub, .ft-brand-sub {
  font-family: var(--fm); font-size: 11px; font-weight: 600; color: var(--tx2);
  text-transform: uppercase; letter-spacing: .08em;
}

.nav-main { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.nav-a {
  display: flex; align-items: center; padding: 0 14px; height: 40px;
  font-size: 13.5px; font-weight: 600; color: var(--tx2);
  border-bottom: 2px solid transparent; transition: color .12s, border-color .12s;
}
.nav-a:hover { color: var(--tx); }
.nav-a.act { color: var(--red); border-bottom-color: var(--red); }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.hbtn {
  height: 36px; width: 36px; border-radius: 6px; border: 1px solid var(--b1);
  background: var(--bg2); color: var(--tx2); display: grid; place-items: center;
  transition: border-color .15s, color .15s;
}
.hbtn:hover { border-color: var(--b2); color: var(--tx); }

.ham-btn {
  display: none; width: 36px; height: 36px; border-radius: 6px; border: 1px solid var(--b1);
  background: var(--bg2); flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.ham-btn span { display: block; width: 16px; height: 1.5px; background: var(--tx2); border-radius: 1px; transition: transform .2s, opacity .15s; }
.ham-btn.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.ham-btn.open span:nth-child(2) { opacity: 0; }
.ham-btn.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ─────────────────────────────────────
   MOBILE DRAWER
───────────────────────────────────── */
.mob-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 300;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.mob-overlay.open { opacity: 1; pointer-events: all; }
.mob-drawer {
  position: fixed; top: 0; right: -100%; width: min(300px, 100vw); height: 100%;
  background: var(--bg1); border-left: 1px solid var(--b1); z-index: 400;
  display: flex; flex-direction: column; transition: right .28s var(--ease); overflow: hidden;
}
.mob-drawer.open { right: 0; }
.mob-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 14px; border-bottom: 1px solid var(--b1); flex-shrink: 0;
}
.mob-logo { font-size: 20px; font-weight: 900; letter-spacing: -1px; color: var(--tx); display: flex; align-items: baseline; gap: 6px; }
.mob-logo em { color: var(--red); font-style: normal; }
.mob-x {
  width: 32px; height: 32px; border-radius: 6px; border: 1px solid var(--b1);
  background: var(--bg2); color: var(--tx2); font-size: 18px; display: grid; place-items: center; line-height: 1;
}
.mob-x:hover { color: var(--tx); }
.mob-body { flex: 1; overflow-y: auto; padding: 10px 14px 20px; }
.mob-link {
  display: flex; align-items: center; justify-content: space-between; padding: 12px 10px;
  border-radius: 6px; font-size: 14px; font-weight: 600; color: var(--tx2); transition: background .1s, color .1s;
}
.mob-link:hover, .mob-link.act { background: var(--bg3); color: var(--tx); }
.mob-link.act { color: var(--red); }
.mob-foot { padding: 14px 20px; border-top: 1px solid var(--b1); flex-shrink: 0; }
.mob-disc { font-size: 11.5px; color: var(--tx3); line-height: 1.7; }

/* ─────────────────────────────────────
   PAGE LAYOUT
───────────────────────────────────── */
.page { max-width: 900px; margin: 0 auto; padding: 28px 20px 60px; width: 100%; box-sizing: border-box; }
.blog-main { display: block; min-width: 0; }

.page-h1 {
  font-size: 24px; font-weight: 900; color: var(--tx); letter-spacing: -.4px; line-height: 1.3;
  margin-bottom: 20px; padding: 16px 20px; background: var(--card); border: 1px solid var(--b1);
  border-left: 4px solid var(--red); border-radius: 0 var(--r8) var(--r8) 0;
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
}
.page-h1-date { font-size: 12.5px; font-weight: 600; color: var(--tx3); font-family: var(--fm); }

.sec-hdr { display: flex; align-items: center; justify-content: space-between; margin: 28px 0 14px; }
.sec-title { font-size: 16px; font-weight: 800; color: var(--tx); letter-spacing: -.3px; }

/* ─────────────────────────────────────
   FEATURED POST
───────────────────────────────────── */
.feat {
  display: grid; grid-template-columns: 280px 1fr; border: 1px solid var(--b1);
  border-radius: var(--r8); overflow: hidden; background: var(--card); transition: border-color .15s;
}
.feat:hover { border-color: var(--b2); }
.feat-img {
  background: linear-gradient(135deg, #1a0000, #2a0000, #0a0a0a);
  display: flex; align-items: flex-end; padding: 24px; min-height: 200px; overflow: hidden;
}
.feat-img img { width: 100%; height: 100%; object-fit: cover; }
.feat-num { font-size: 72px; font-weight: 900; color: rgba(255,255,255,.08); letter-spacing: -3px; line-height: 1; }
.feat-body { padding: 24px; display: flex; flex-direction: column; justify-content: center; }
.feat-cat { font-family: var(--fm); font-size: 10px; font-weight: 700; color: var(--red); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 8px; }
.feat-title { font-size: 20px; font-weight: 800; color: var(--tx); letter-spacing: -.3px; line-height: 1.3; margin-bottom: 10px; }
.feat:hover .feat-title { color: var(--red); }
.feat-excerpt { font-size: 13px; color: var(--tx2); line-height: 1.75; margin-bottom: 14px; }
.feat-meta { font-family: var(--fm); font-size: 10.5px; color: var(--tx3); display: flex; gap: 12px; flex-wrap: wrap; }
.feat-more { display: inline-flex; margin-top: 12px; font-family: var(--fm); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--red); }

/* ─────────────────────────────────────
   ARTICLE GRID
───────────────────────────────────── */
.art-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.art-card { background: var(--card); border: 1px solid var(--b1); border-radius: var(--r8); overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s, transform .18s; }
.art-card:hover { border-color: var(--b2); transform: translateY(-2px); }
.art-stripe { height: 2px; }
.art-stripe.r { background: var(--red); } .art-stripe.g { background: var(--grn); }
.art-stripe.b { background: var(--blu); } .art-stripe.a { background: var(--amb); } .art-stripe.p { background: var(--pur); }
.art-body { padding: 16px 16px 18px; flex: 1; display: flex; flex-direction: column; }
.art-cat { font-family: var(--fm); font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 7px; }
.art-cat.r { color: var(--red); } .art-cat.g { color: var(--grn); }
.art-cat.b { color: var(--blu); } .art-cat.a { color: var(--amb); } .art-cat.p { color: var(--pur); }
.art-title { font-size: 15px; font-weight: 800; color: var(--tx); letter-spacing: -.2px; line-height: 1.3; margin-bottom: 8px; }
.art-title a:hover { color: var(--red); }
.art-excerpt { font-size: 12.5px; color: var(--tx2); line-height: 1.7; flex: 1; margin-bottom: 10px; }
.art-meta { font-family: var(--fm); font-size: 10px; color: var(--tx3); display: flex; gap: 10px; border-top: 1px solid var(--b1); padding-top: 10px; margin-top: auto; }

.blog-pagination { display: flex; justify-content: center; gap: 6px; margin-top: 28px; flex-wrap: wrap; }
.blog-pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px;
  padding: 0 10px; border-radius: 6px; border: 1px solid var(--b1); background: var(--card);
  color: var(--tx2); font-family: var(--fm); font-size: 12.5px; font-weight: 600; transition: border-color .12s, color .12s;
}
.blog-pagination .page-numbers:hover { border-color: var(--b2); color: var(--tx); }
.blog-pagination .page-numbers.current { background: var(--red); border-color: var(--red); color: #fff; }

.sb-empty { color: var(--tx2); font-size: 14px; padding: 20px 0; }

/* ─────────────────────────────────────
   SINGLE POST — no image, no byline
───────────────────────────────────── */
.ed-wrap-single { width: 100%; }
.ed-card { background: var(--card); border: 1px solid var(--b1); border-radius: var(--r8); overflow: hidden; }
.ed-hero { padding: 28px 30px 20px; background: var(--bg2); border-bottom: 1px solid var(--b1); }
.ed-tag {
  display: inline-flex; padding: 3px 9px; background: var(--rlt); border: 1px solid var(--rbd);
  border-radius: 3px; font-family: var(--fm); font-size: 9.5px; font-weight: 700; color: var(--red);
  text-transform: uppercase; letter-spacing: .07em; margin-bottom: 12px;
}
.ed-h1 { font-size: 26px; font-weight: 900; color: var(--tx); letter-spacing: -.5px; line-height: 1.25; margin-bottom: 12px; }
.ed-meta { display: flex; gap: 14px; font-family: var(--fm); font-size: 11px; color: var(--tx3); flex-wrap: wrap; }

.ed-body { padding: 26px 30px 34px; font-size: 15px; color: var(--tx2); line-height: 1.85; }
.ed-body p { margin-bottom: 18px; }
.ed-body h2 { font-size: 19px; font-weight: 800; color: var(--tx); letter-spacing: -.3px; margin: 30px 0 14px; }
.ed-body h3 { font-size: 16px; font-weight: 700; color: var(--tx); margin: 24px 0 12px; }
.ed-body ul, .ed-body ol { margin: 0 0 18px 22px; }
.ed-body li { margin-bottom: 8px; }
.ed-body a { color: var(--red); text-decoration: underline; text-underline-offset: 2px; }
.ed-body blockquote {
  margin: 20px 0; padding: 14px 18px; border-left: 3px solid var(--red);
  background: var(--bg2); color: var(--tx2); font-style: italic;
}
.ed-body img { border-radius: var(--r8); margin: 20px 0; }
.ed-body pre, .ed-body code { font-family: var(--fm); background: var(--bg2); border-radius: 4px; }
.ed-body pre { padding: 14px; overflow-x: auto; margin-bottom: 18px; }
.ed-body code { padding: 2px 6px; font-size: 13px; }
.ed-body pre code { padding: 0; background: none; }

.single-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; }
.single-nav-link {
  flex: 1; padding: 14px 16px; background: var(--card); border: 1px solid var(--b1); border-radius: var(--r8);
  font-size: 13px; font-weight: 600; color: var(--tx2); transition: border-color .12s, color .12s;
}
.single-nav-link:hover { border-color: var(--b2); color: var(--tx); }
.single-nav-link.next { text-align: right; }

/* ─────────────────────────────────────
   FOOTER
───────────────────────────────────── */
.footer { background: var(--bg1); border-top: 1px solid var(--b1); padding: 36px 20px 24px; margin-top: 20px; }
.ft-in { max-width: 900px; margin: 0 auto; }
.ft-brand-name { font-size: 20px; font-weight: 900; color: var(--tx); letter-spacing: -.8px; margin-bottom: 4px; display: flex; align-items: baseline; gap: 8px; }
.ft-brand-name em { color: var(--red); font-style: normal; }
.ft-brand-p { font-size: 12.5px; color: var(--tx2); line-height: 1.8; max-width: 440px; margin-bottom: 20px; }
.ft-bot { padding-top: 16px; border-top: 1px solid var(--b1); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ft-copy { font-family: var(--fm); font-size: 11px; color: var(--tx3); }
.ft-mainsite { font-size: 12.5px; font-weight: 700; color: var(--red); }

/* ─────────────────────────────────────
   RESPONSIVE
───────────────────────────────────── */
@media (max-width: 700px) {
  .header-inner { height: 56px; padding: 0 16px; gap: 12px; }
  .logo-text { font-size: 21px; }
  .nav-main { display: none; }
  .ham-btn { display: flex; }

  .page { padding: 16px 14px 48px; }
  .page-h1 { font-size: 18px; padding: 12px 14px; }

  .feat { grid-template-columns: 1fr; }
  .feat-img { min-height: 120px; }
  .feat-body { padding: 18px; }
  .feat-title { font-size: 17px; }

  .art-grid { grid-template-columns: 1fr; }

  .ed-hero { padding: 20px 18px 16px; }
  .ed-h1 { font-size: 21px; }
  .ed-body { padding: 20px 18px 26px; font-size: 14.5px; }

  .footer { padding: 26px 14px 20px; }
  .ft-bot { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* Focus & tap targets */
a:focus-visible, button:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; border-radius: 3px; }
.nav-a, .mob-link { min-height: 40px; }

@media print {
  .header, .mob-overlay, .mob-drawer, .footer { display: none !important; }
  body { background: #fff; color: #000; }
}
