/*
Theme Name: Read By Human Blog
Theme URI: https://readbyhuman.com/blog
Author: READ BY HUMAN
Author URI: https://readbyhuman.com
Description: Blog theme for readbyhuman.com/blog, built to match the main site exactly: cream background, charcoal text, burgundy brand, Playfair Display headings and Inter body. Header and footer mirror the main site so the blog never looks like a different website.
Version: 1.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: Private — for readbyhuman.com use.
Text Domain: readbyhuman-blog
*/

/* ============ Design tokens (copied from the main site stylesheet) ============ */
:root {
  --cream: #F7F3EC;
  --charcoal: #171717;
  --burgundy: #7D1717;
  --burgundy-muted: #9B3434;
  --warm-gray: #6E6A65;
  --beige: #ECE5DA;
  --white: #FFFFFF;
  --border: #D5CEBF;
  --border-light: #E5DFD3;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--charcoal);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--burgundy); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--burgundy-muted); }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.2; margin: 0 0 0.6em; }
h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 600; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 600; }
h3 { font-size: 1.35rem; font-weight: 600; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 1000px; margin: 0 auto; padding: 0 24px; }
.prose { max-width: 800px; margin: 0 auto; padding: 0 24px; }
.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--burgundy); margin-bottom: 12px;
}
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 3px;
  font-size: 14px; font-weight: 600; text-decoration: none; border: 1px solid transparent;
}
.btn-primary { background: var(--burgundy); color: var(--cream); }
.btn-primary:hover { background: var(--burgundy-muted); color: var(--cream); }
.btn-secondary { background: transparent; color: var(--charcoal); border-color: var(--charcoal); }
.btn-secondary:hover { color: var(--burgundy); border-color: var(--burgundy); }

/* ============ Header (mirrors the main site) ============ */
.site-header { background: var(--cream); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px 24px; max-width: 1280px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 34px; height: 37px; object-fit: contain; }
.brand-wordmark { font-family: var(--serif); font-size: 20px; font-weight: 600; letter-spacing: 0.02em; color: var(--charcoal); }
.brand-wordmark span { color: var(--burgundy); }
.brand-tagline { display: block; font-family: var(--sans); font-size: 10px; letter-spacing: 0.14em; color: var(--warm-gray); font-weight: 600; }
.main-nav ul { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; align-items: center; }
.main-nav a { color: var(--charcoal); text-decoration: none; font-size: 15px; font-weight: 500; }
.main-nav a:hover, .main-nav .current-menu-item a { color: var(--burgundy); }
.nav-cta { background: var(--burgundy); color: var(--cream) !important; padding: 9px 16px; border-radius: 3px; font-weight: 600 !important; }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: 3px; padding: 8px 12px; font-size: 15px; cursor: pointer; color: var(--charcoal); }

/* ============ Blog home ============ */
.blog-hero { padding: 56px 0 32px; }
.blog-hero p { color: var(--warm-gray); font-size: 18px; max-width: 720px; }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; padding-bottom: 64px; }
.post-card { background: var(--white); border: 1px solid var(--border-light); border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; }
.post-card-thumb { aspect-ratio: 16 / 9; background: var(--beige); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card-thumb span { font-family: var(--serif); font-size: 20px; color: var(--burgundy); padding: 16px; text-align: center; }
.post-card-body { padding: 22px 22px 26px; display: flex; flex-direction: column; flex: 1; }
.post-card-cat { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--burgundy); margin-bottom: 8px; }
.post-card-body h2 { font-size: 1.35rem; margin-bottom: 8px; }
.post-card-body h2 a { color: var(--charcoal); text-decoration: none; }
.post-card-body h2 a:hover { color: var(--burgundy); }
.post-card-excerpt { color: var(--warm-gray); font-size: 15px; flex: 1; }
.post-meta { font-size: 13px; color: var(--warm-gray); margin-top: 16px; }
.post-meta a { color: var(--warm-gray); text-decoration: none; }
.cat-list { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0 0 32px; padding: 0; }
.cat-list a { display: inline-block; padding: 7px 14px; border: 1px solid var(--border); border-radius: 999px; color: var(--charcoal); text-decoration: none; font-size: 14px; font-weight: 500; }
.cat-list a:hover, .cat-list .current-cat a { border-color: var(--burgundy); color: var(--burgundy); }

/* ============ Single post / page ============ */
.single-hero { padding: 56px 0 8px; text-align: left; }
.single-hero h1 { max-width: 800px; }
.single-meta { color: var(--warm-gray); font-size: 14px; margin: 12px 0 32px; }
.single-meta a { color: var(--warm-gray); text-decoration: none; }
.entry-content { font-size: 18px; }
.entry-content p { margin: 0 0 1.4em; }
.entry-content h2, .entry-content h3 { margin-top: 1.6em; }
.entry-content ul, .entry-content ol { margin: 0 0 1.4em; padding-left: 1.4em; }
.entry-content li { margin-bottom: 0.5em; }
.entry-content blockquote { border-left: 3px solid var(--burgundy); margin: 1.6em 0; padding: 4px 0 4px 20px; font-family: var(--serif); font-size: 21px; font-style: italic; color: var(--charcoal); }
.entry-content figure { margin: 1.6em 0; }
.entry-content figcaption { font-size: 13px; color: var(--warm-gray); text-align: center; margin-top: 8px; }
.post-nav { display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--border); margin: 56px 0 64px; padding-top: 24px; }
.post-nav a { text-decoration: none; font-weight: 600; font-size: 15px; }
.back-to-blog { display: inline-block; margin-bottom: 24px; text-decoration: none; font-weight: 600; font-size: 14px; }

/* ============ Footer (mirrors the main site) ============ */
.site-footer { background: var(--charcoal); color: var(--cream); margin-top: 0; }
.footer-inner { padding: 56px 24px 32px; max-width: 1280px; margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand p { color: #C9C2B8; font-size: 14px; max-width: 320px; }
.footer-brand .brand-wordmark { color: var(--cream); }
.footer-brand .brand-wordmark span { color: #D98C8C; }
.site-footer h4 { font-family: var(--sans); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: #C9C2B8; margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: var(--cream); text-decoration: none; font-size: 15px; }
.site-footer a:hover { text-decoration: underline; }
.footer-legal { border-top: 1px solid #3A3835; margin-top: 40px; padding-top: 20px; font-size: 13px; color: #C9C2B8; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

/* ============ Pagination, search, 404 ============ */
.pagination { display: flex; gap: 10px; justify-content: center; padding-bottom: 64px; }
.pagination .page-numbers { padding: 9px 15px; border: 1px solid var(--border); border-radius: 3px; text-decoration: none; color: var(--charcoal); font-weight: 600; font-size: 14px; }
.pagination .page-numbers.current, .pagination .page-numbers:hover { background: var(--burgundy); border-color: var(--burgundy); color: var(--cream); }
.not-found { padding: 80px 0; text-align: center; }

/* ============ Responsive (same breakpoints as the main site) ============ */
@media (max-width: 860px) {
  .post-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--cream); border-bottom: 1px solid var(--border); padding: 12px 24px 20px; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: flex-start; gap: 14px; }
  .site-header { position: relative; }
  .nav-toggle { display: block; }
  .blog-hero, .single-hero { padding-top: 36px; }
}
@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; }
  .brand-tagline { display: none; }
  body { font-size: 16px; }
  .entry-content { font-size: 17px; }
}
@media (max-width: 560px) {
  .btn { width: 100%; text-align: center; }
  .post-nav { flex-direction: column; }
}
