/**
 * Blog styles — Dispatches (list) + Article (single)
 */

/* ----------------------------------------------------------------
   Root + Reset
----------------------------------------------------------------- */
:root {
  --bg: #FAFAF7;
  --bg-alt: #F4F4F0;
  --text: #0A0A0A;
  --text-body: #1A1A1A;
  --text-dim: #737373;
  --text-light: #A3A3A3;
  --border: #E5E5E0;
  --border-dark: #D4D4D0;
  --accent: #FF3D00;
  --accent-soft: rgba(255, 61, 0, 0.06);
  --white: #FFFFFF;
}

.blog-list-wrap, .blog-single-wrap { background: var(--bg); }

/* ----------------------------------------------------------------
   Page Hero (Blog listing)
----------------------------------------------------------------- */
.page-hero { padding: 160px 0 80px; border-bottom: 1px solid var(--border); }
.page-hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: flex-end; }
.page-label { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--accent); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 24px; display: flex; align-items: center; gap: 8px; }
.page-label::before { content: ''; width: 20px; height: 1px; background: var(--accent); }
.page-hero h1 { font-size: clamp(3rem, 7vw, 6rem); font-weight: 500; line-height: 0.9; letter-spacing: -0.04em; }
.page-hero h1 .serif { color: var(--accent); }
.page-hero-meta { font-size: 17px; color: var(--text-dim); max-width: 400px; padding-bottom: 12px; }
.page-hero-meta strong { color: var(--text); font-weight: 500; }

/* ----------------------------------------------------------------
   Filter Bar
----------------------------------------------------------------- */
.filter-bar { padding: 32px 0; border-bottom: 1px solid var(--border); position: sticky; top: 63px; background: rgba(250, 250, 247, 0.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); z-index: 100; }
.filter-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.filter-categories { display: flex; gap: 24px; flex-wrap: wrap; }
.filter-cat { font-size: 13px; color: var(--text-dim); font-weight: 500; padding: 4px 0; border-bottom: 1px solid transparent; transition: all 0.2s; cursor: pointer; background: none; border-left: none; border-right: none; border-top: none; font-family: inherit; }
.filter-cat:hover { color: var(--text); }
.filter-cat.active { color: var(--text); border-bottom-color: var(--accent); }
.search-box { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--border-dark); padding-bottom: 4px; }
.search-box i { color: var(--text-light); font-size: 12px; }
.search-box input, .search-box .search-field { background: transparent; border: none; outline: none; font-family: 'Inter', sans-serif; font-size: 13px; color: var(--text); width: 160px; }
.search-box input::placeholder, .search-box .search-field::placeholder { color: var(--text-light); }
.search-form-inline { display: flex; align-items: center; gap: 8px; width: 100%; }
.search-form-inline .search-field { flex: 1; }

/* ----------------------------------------------------------------
   Featured Post
----------------------------------------------------------------- */
.featured-section { padding: 80px 0; border-bottom: 1px solid var(--border); }
.featured-layout { display: grid; grid-template-columns: 1.3fr 1fr; gap: 60px; align-items: center; }
.featured-img-wrap { position: relative; overflow: hidden; border-radius: 4px; aspect-ratio: 4/3; background: var(--bg-alt); }
.featured-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.featured-post:hover .featured-img-wrap img { transform: scale(1.03); }
.featured-tag { position: absolute; top: 20px; left: 20px; background: var(--bg); color: var(--text); padding: 6px 12px; font-family: 'JetBrains Mono', monospace; font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; border-radius: 4px; }

.post-meta { display: flex; align-items: center; gap: 12px; font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 24px; }
.post-meta .cat { color: var(--accent); }
.post-meta .dot { width: 3px; height: 3px; background: var(--text-light); border-radius: 50%; }

.featured-content h2 { font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 500; margin-bottom: 24px; letter-spacing: -0.03em; line-height: 1.05; }
.featured-content h2 .serif { font-size: 1.05em; }
.featured-content p { font-size: 16px; color: var(--text-dim); margin-bottom: 32px; line-height: 1.7; }

.read-link { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; border-bottom: 1px solid var(--text); padding-bottom: 4px; transition: all 0.2s; }
.read-link:hover { color: var(--accent); border-color: var(--accent); gap: 12px; }

/* ----------------------------------------------------------------
   Post Grid
----------------------------------------------------------------- */
.posts-section { border-bottom: 1px solid var(--border); }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 60px 40px; padding: 80px 0; }
.post-item { display: flex; flex-direction: column; cursor: pointer; }
.post-item-img { aspect-ratio: 4/3; overflow: hidden; border-radius: 4px; margin-bottom: 24px; background: var(--bg-alt); }
.post-item-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
.post-item:hover .post-item-img img { transform: scale(1.05); }
.post-item h3 { font-size: 22px; font-weight: 500; margin-bottom: 12px; line-height: 1.2; transition: color 0.2s; }
.post-item:hover h3 { color: var(--accent); }
.post-item h3 .serif { font-size: 1.05em; }
.post-item p { font-size: 14px; color: var(--text-dim); margin-bottom: 20px; line-height: 1.6; flex-grow: 1; }

/* No results */
.no-results { padding: 120px 0; text-align: center; }
.no-results h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 500; margin-bottom: 16px; }
.no-results p { color: var(--text-dim); margin-bottom: 32px; }

/* ----------------------------------------------------------------
   Pagination
----------------------------------------------------------------- */
.pagination { display: flex; justify-content: center; align-items: center; gap: 16px; padding-bottom: 80px; }
.pagination .page-btn, .pagination .page-numbers { min-width: 36px; height: 36px; padding: 0 10px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border-dark); border-radius: 50%; font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--text); transition: all 0.2s; text-decoration: none; }
.pagination .page-numbers.current { background: var(--accent); color: #fff; border-color: var(--accent); }
.pagination .page-numbers:hover:not(.current):not(.dots) { background: var(--text); color: var(--bg); border-color: var(--text); }
.pagination .page-numbers.dots { border: none; }

/* ----------------------------------------------------------------
   Newsletter CTA
----------------------------------------------------------------- */
.newsletter { padding: 100px 0; border-top: 1px solid var(--border); background: var(--text); color: var(--bg); text-align: center; }
.newsletter-label { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--accent); text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 24px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.newsletter-label .dot { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; }
.newsletter h2 { font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 500; margin-bottom: 20px; letter-spacing: -0.035em; line-height: 1; }
.newsletter h2 .serif { color: var(--accent); }
.newsletter p { font-size: 16px; color: rgba(255,255,255,0.6); max-width: 440px; margin: 0 auto 40px; }
.newsletter-form { display: flex; max-width: 480px; margin: 0 auto; border-bottom: 1px solid rgba(255,255,255,0.2); padding-bottom: 4px; transition: border-color 0.2s; }
.newsletter-form:focus-within { border-color: var(--accent); }
.newsletter-form input { flex: 1; background: transparent; border: none; outline: none; color: var(--bg); font-family: 'Inter', sans-serif; font-size: 15px; padding: 12px 0; }
.newsletter-form input::placeholder { color: rgba(255,255,255,0.4); }
.newsletter-form button { color: var(--bg); font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 8px; padding: 12px 0; transition: color 0.2s; background: none; border: none; cursor: pointer; font-family: inherit; }
.newsletter-form button:hover { color: var(--accent); }

/* ====================================================================
   ARTICLE (SINGLE POST)
==================================================================== */
.container-read { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 32px; }

.article-hero { padding: 160px 0 60px; border-bottom: 1px solid var(--border); }
.article-meta-top { display: flex; align-items: center; gap: 12px; font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 32px; flex-wrap: wrap; }
.article-meta-top .cat { color: var(--accent); }
.article-meta-top .dot { width: 3px; height: 3px; background: var(--text-light); border-radius: 50%; }

.article-hero h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 500; line-height: 1; letter-spacing: -0.035em; margin-bottom: 32px; max-width: 900px; }
.article-hero h1 .serif { font-size: 1.05em; color: var(--accent); }

.article-lead { font-size: 20px; color: var(--text-dim); max-width: 680px; margin-bottom: 48px; line-height: 1.5; font-weight: 400; }

.article-author-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; padding-top: 32px; border-top: 1px solid var(--border); }
.author-info { display: flex; align-items: center; gap: 16px; }
.author-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--bg-alt); overflow: hidden; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-family: 'JetBrains Mono', monospace; font-weight: 500; font-size: 14px; color: var(--text-dim); }
.author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-text div:first-child { font-size: 14px; font-weight: 500; }
.author-text div:last-child { font-size: 12px; color: var(--text-light); font-family: 'JetBrains Mono', monospace; }
.share-icons { display: flex; gap: 12px; }
.share-icons a { width: 36px; height: 36px; border: 1px solid var(--border-dark); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--text-dim); transition: all 0.2s; }
.share-icons a:hover { border-color: var(--accent); color: var(--accent); }

/* Featured Image */
.featured-image-wrap { padding: 60px 0; border-bottom: 1px solid var(--border); }
.featured-image { width: 100%; aspect-ratio: 16/9; overflow: hidden; border-radius: 6px; background: var(--bg-alt); }
.featured-image img { width: 100%; height: 100%; object-fit: cover; }

/* Article Body */
.article-body { padding: 80px 0; }
.article-content { font-size: 18px; line-height: 1.75; color: var(--text-body); }
.article-content > * + * { margin-top: 1.5em; }

.article-content h2 { font-size: 32px; margin-top: 2.5em; margin-bottom: 0.8em; letter-spacing: -0.02em; }
.article-content h2 .serif { color: var(--accent); }
.article-content h3 { font-size: 22px; margin-top: 2em; margin-bottom: 0.6em; letter-spacing: -0.015em; }

.article-content p { margin-bottom: 1.3em; }
.article-content strong { font-weight: 600; color: var(--text); }
.article-content a { color: var(--accent); border-bottom: 1px solid var(--accent-soft); transition: border-color 0.2s; }
.article-content a:hover { border-color: var(--accent); }

/* Drop Cap */
.article-content > p:first-of-type::first-letter { font-family: 'Instrument Serif', serif; font-style: italic; font-size: 5.5rem; line-height: 0.8; float: left; padding: 8px 12px 0 0; color: var(--accent); }

/* Blockquote */
.article-content blockquote { border-left: 2px solid var(--accent); padding: 0.5em 0 0.5em 32px; margin: 2em 0; font-family: 'Instrument Serif', serif; font-style: italic; font-size: 28px; line-height: 1.3; color: var(--text); }
.article-content blockquote p { margin-bottom: 0; }

/* Inline Code & Pre */
.article-content code { font-family: 'JetBrains Mono', monospace; font-size: 0.85em; background: var(--bg-alt); padding: 3px 6px; border-radius: 4px; color: var(--accent); }
.article-content pre { background: #0A0A0A; color: #F4F4F0; padding: 24px; border-radius: 8px; overflow-x: auto; margin: 2em 0; font-size: 14px; line-height: 1.6; }
.article-content pre code { background: transparent; padding: 0; color: inherit; }

/* List */
.article-content ul, .article-content ol { padding-left: 0; margin: 1.5em 0; }
.article-content ul { list-style: none; }
.article-content ul li { position: relative; padding-left: 24px; margin-bottom: 0.8em; }
.article-content ul li::before { content: ''; position: absolute; left: 0; top: 0.7em; width: 8px; height: 1px; background: var(--accent); }
.article-content ol { counter-reset: olc; list-style: none; }
.article-content ol li { counter-increment: olc; position: relative; padding-left: 32px; margin-bottom: 0.8em; }
.article-content ol li::before { content: counter(olc, decimal-leading-zero); position: absolute; left: 0; top: 0; font-family: 'JetBrains Mono', monospace; font-size: 0.75em; color: var(--accent); font-weight: 500; }

/* Image inside content */
.article-content figure { margin: 2.5em 0; }
.article-content figure img { width: 100%; border-radius: 6px; }
.article-content figcaption { font-size: 13px; color: var(--text-light); text-align: center; margin-top: 12px; font-family: 'JetBrains Mono', monospace; }
.article-content img { max-width: 100%; height: auto; border-radius: 6px; }

/* Article Footer / CTA */
.article-footer { padding: 60px 0 100px; border-top: 1px solid var(--border); }
.tags-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 60px; }
.tag { font-family: 'JetBrains Mono', monospace; font-size: 11px; padding: 6px 12px; border: 1px solid var(--border-dark); border-radius: 100px; color: var(--text-dim); transition: all 0.2s; text-decoration: none; }
.tag:hover { border-color: var(--accent); color: var(--accent); }

.author-bio { display: grid; grid-template-columns: auto 1fr auto; gap: 32px; align-items: center; padding: 40px; background: var(--bg-alt); border-radius: 8px; border: 1px solid var(--border); }
.author-bio-avatar { width: 72px; height: 72px; border-radius: 50%; background: var(--white); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-family: 'Syne', 'Inter', sans-serif; font-weight: 700; font-size: 24px; color: var(--accent); overflow: hidden; }
.author-bio-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-bio-info h4 { font-size: 20px; margin-bottom: 6px; }
.author-bio-info p { font-size: 14px; color: var(--text-dim); line-height: 1.5; max-width: 400px; }
.author-bio-cta { font-size: 13px; font-weight: 500; border-bottom: 1px solid var(--text); padding-bottom: 4px; transition: all 0.2s; white-space: nowrap; }
.author-bio-cta:hover { color: var(--accent); border-color: var(--accent); }

/* Related Posts */
.related-section { padding: 100px 0; border-top: 1px solid var(--border); background: var(--bg-alt); }
.related-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 60px; }
.related-head h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 500; }
.related-head h2 .serif { color: var(--accent); }
.related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.related-item { display: flex; flex-direction: column; cursor: pointer; }
.related-item-img { aspect-ratio: 16/10; overflow: hidden; border-radius: 6px; margin-bottom: 20px; background: var(--bg); }
.related-item-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
.related-item:hover .related-item-img img { transform: scale(1.04); }
.related-item h3 { font-size: 22px; font-weight: 500; margin-bottom: 10px; transition: color 0.2s; }
.related-item:hover h3 { color: var(--accent); }
.related-item h3 .serif { font-size: 1.05em; }
.related-meta { display: flex; gap: 12px; font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 16px; }
.related-meta .cat { color: var(--accent); }
.related-meta .dot { width: 3px; height: 3px; background: var(--text-light); border-radius: 50%; align-self: center; }

/* ----------------------------------------------------------------
   Comments
----------------------------------------------------------------- */
.comments-area { margin-top: 60px; }
.comments-section { padding: 100px 0; border-top: 1px solid var(--border); }
.comments-section .comments-area { margin-top: 0; }
.comments-title { font-size: 24px; font-weight: 500; margin-bottom: 32px; letter-spacing: -0.015em; }
.comment-list { list-style: none; padding: 0; margin: 0 0 40px; }
.comment-list .comment, .comment-list .pingback { padding: 24px 0; border-bottom: 1px solid var(--border); }
.comment-list .children { list-style: none; padding-left: 32px; margin: 0; }
.comment-body .comment-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.comment-body .comment-author { font-size: 14px; font-weight: 500; }
.comment-body .comment-author .fn a { color: var(--text); }
.comment-body .comment-metadata { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text-light); }
.comment-body .comment-content { font-size: 15px; color: var(--text-dim); line-height: 1.6; }
.comment-body .reply { margin-top: 8px; }
.comment-body .reply a { font-size: 13px; font-weight: 500; color: var(--accent); }
.comment-body .avatar { border-radius: 50%; border: 1px solid var(--border); }
.comment-respond { padding-top: 16px; }
.comment-respond .comment-reply-title { font-size: 22px; font-weight: 500; margin-bottom: 20px; }
.comment-respond .comment-form p { margin-bottom: 16px; }
.comment-respond .comment-form label { display: block; font-size: 12px; font-family: 'JetBrains Mono', monospace; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-light); margin-bottom: 6px; }
.comment-respond .comment-form input[type="text"], .comment-respond .comment-form input[type="email"], .comment-respond .comment-form input[type="url"], .comment-respond .comment-form textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--border-dark); border-radius: 6px; background: var(--white); font-family: 'Inter', sans-serif; font-size: 14px; color: var(--text); transition: border-color 0.2s; }
.comment-respond .comment-form input:focus, .comment-respond .comment-form textarea:focus { outline: none; border-color: var(--accent); }
.comment-respond .comment-form textarea { resize: vertical; min-height: 120px; }
.comment-respond .comment-form .btn-accent { padding: 11px 22px; font-size: 13px; }
.comment-form-cookies-consent { display: flex; align-items: center; gap: 8px; }
.comment-form-cookies-consent input { margin-top: 0; }

/* Page links (multi-page posts) */
.page-links { clear: both; margin: 2em 0; font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--text-light); display: flex; gap: 8px; align-items: center; }
.page-links .page-links-label { text-transform: uppercase; letter-spacing: 0.08em; }
.page-links .page-link { min-width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border-dark); border-radius: 4px; color: var(--text); }
.page-links .page-link a { color: inherit; }

/* ----------------------------------------------------------------
   Responsive
----------------------------------------------------------------- */
@media (max-width: 968px) {
  .page-hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .page-hero { padding: 130px 0 60px; }
  .filter-bar { top: 63px; padding: 20px 0; }
  .filter-inner { flex-direction: column; align-items: flex-start; }
  .featured-layout { grid-template-columns: 1fr; gap: 40px; }
  .post-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .article-hero { padding: 130px 0 40px; }
  .author-bio { grid-template-columns: auto 1fr; }
  .author-bio-cta { grid-column: 1 / -1; justify-self: start; margin-top: 16px; }
  .related-grid { grid-template-columns: 1fr; gap: 32px; }
  .article-content { font-size: 17px; }
  .article-content blockquote { font-size: 22px; padding-left: 20px; }
}
@media (max-width: 640px) {
  .post-grid { grid-template-columns: 1fr; }
  .article-author-row { flex-direction: column; align-items: flex-start; }
  .author-bio { padding: 24px; }
  .article-content > p:first-of-type::first-letter { font-size: 4rem; }
  .filter-categories { gap: 16px; overflow-x: auto; width: 100%; flex-wrap: nowrap; padding-bottom: 4px; }
  .filter-cat { white-space: nowrap; }
}
