/*
Theme Name: Byteful A
Theme URI: https://byteful.dev
Author: Byteful
Author URI: https://byteful.dev
Description: Editorial grid theme for the byteful developer blog — warm paper background, IBM Plex Serif headlines, lime accent. Magazine-style: big featured story + category rails + sidebar widgets.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: byteful-a
Tags: blog, news, magazine, two-columns, right-sidebar, custom-menu, featured-images, custom-colors
*/

/* ── Tokens ───────────────────────────────────────────────── */
:root {
  --bg:      #f4f0e8;
  --ink:     #1a1814;
  --accent:  #aee03f;
  --dim:     #6b665e;
  --white:   #ffffff;
  --rule:    #1a1814;
  --subtle:  rgba(26,24,20,0.22);
  --faint:   rgba(26,24,20,0.11);

  --cat-game:    #c5447a;
  --cat-ai:      #5b8def;
  --cat-web:     #e8a13c;
  --cat-data:    #3aa68a;
  --cat-devops:  #8b5cf6;

  --f-sans:  "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --f-serif: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  --f-mono:  "IBM Plex Mono", ui-monospace, "Cascadia Code", monospace;
}

/* ── Reset ────────────────────────────────────────────────── */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: inherit; border: none; }
input, textarea, select { font-family: inherit; }
.admin-bar body { padding-top: 32px; }

/* ── Wordmark ─────────────────────────────────────────────── */
.site-wordmark {
  font-family: var(--f-sans);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -1.2px;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  line-height: 1;
  gap: 2px;
}
.site-wordmark--sm { font-size: 26px; }
.site-wordmark--footer { font-size: 28px; color: var(--bg); }
.site-wordmark__cursor {
  display: inline-block;
  background: var(--accent);
  transform: translateY(2px);
}

/* ── Masthead ─────────────────────────────────────────────── */
.site-header {
  padding: 20px 40px 0;
  border-bottom: 2px solid var(--rule);
}
.site-header__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
}
.site-header__branding { display: flex; align-items: baseline; gap: 16px; }
.site-header__tagline {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--dim);
  letter-spacing: 0.5px;
}
.site-header__actions { display: flex; gap: 14px; align-items: center; }

.search-inline { display: flex; gap: 0; }
.search-inline input[type="search"] {
  background: transparent;
  border: 1px solid var(--ink);
  padding: 6px 10px;
  font-family: var(--f-mono);
  font-size: 11px;
  width: 200px;
  color: var(--ink);
  outline: none;
}
.search-inline input::placeholder { color: var(--dim); }
.search-inline button {
  background: var(--ink);
  color: var(--bg);
  border: 1px solid var(--ink);
  padding: 6px 10px;
  font-family: var(--f-mono);
  font-size: 12px;
}

.btn { display: inline-block; text-decoration: none; cursor: pointer; font-family: var(--f-sans); }
.btn--subscribe {
  background: var(--ink);
  color: var(--bg);
  padding: 7px 14px;
  font-weight: 600;
  font-size: 12px;
}
.btn--subscribe:hover { opacity: 0.85; color: var(--bg); }

/* Main nav */
.main-nav { padding: 18px 0 0; }
.main-nav ul { list-style: none; display: flex; gap: 28px; }
.main-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--dim);
  text-decoration: none;
  padding-bottom: 4px;
  display: block;
}
.main-nav a:hover,
.main-nav .current-menu-item a,
.main-nav .current-cat a { color: var(--ink); border-bottom: 2px solid var(--accent); }

/* ── Ticker ───────────────────────────────────────────────── */
.ticker {
  background: var(--ink);
  color: var(--bg);
  padding: 8px 40px;
  display: flex;
  align-items: center;
  gap: 16px;
  overflow: hidden;
  font-family: var(--f-mono);
  font-size: 12px;
}
.ticker__badge {
  background: var(--accent);
  color: var(--ink);
  padding: 2px 8px;
  font-weight: 700;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}
.ticker__track {
  display: flex;
  gap: 36px;
  white-space: nowrap;
  flex: 1;
  overflow: hidden;
}
.ticker__track--animate { animation: ticker-scroll 45s linear infinite; }
.ticker__track:hover { animation-play-state: paused; }
.ticker__item { opacity: 0.85; flex-shrink: 0; }
.ticker__item::before { content: "▸ "; color: var(--accent); }
@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Site grid ────────────────────────────────────────────── */
.site-body {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 36px;
  padding: 32px 40px;
  align-items: start;
}
.site-main { min-width: 0; }
.site-sidebar { min-width: 0; display: flex; flex-direction: column; gap: 24px; }

/* ── Category tag pill ────────────────────────────────────── */
.cat-tag {
  display: inline-block;
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--ink);
  border: 1px solid var(--ink);
  padding: 2px 6px;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
}
.cat-tag--filled { border-color: transparent; }
.cat-tags { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Thumbnail / placeholder ──────────────────────────────── */
.post-thumb {
  overflow: hidden;
  position: relative;
  background: repeating-linear-gradient(135deg, #e8e4dc 0 6px, rgba(0,0,0,.10) 6px 7px);
}
.post-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-thumb--ratio-4-3 { aspect-ratio: 4/3; }
.post-thumb--ratio-16-9 { aspect-ratio: 16/9; }
.post-thumb--ratio-16-10 { aspect-ratio: 16/10; }
.post-thumb--h140 { height: 140px; }
.post-thumb--h160 { height: 160px; }
.post-thumb--h170 { height: 170px; }

/* ── Avatar ───────────────────────────────────────────────── */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--ink);
  font-family: var(--f-sans);
  font-weight: 600;
  flex-shrink: 0;
  text-transform: uppercase;
}
.avatar--sm  { width: 18px; height: 18px; font-size: 7px; }
.avatar--md  { width: 28px; height: 28px; font-size: 11px; }
.avatar--lg  { width: 44px; height: 44px; font-size: 17px; }
.avatar--xl  { width: 64px; height: 64px; font-size: 25px; }
.avatar--xxl { width: 180px; height: 180px; font-size: 64px; }
.avatar--muted { background: #d9d3c7; }

/* ── Byline ───────────────────────────────────────────────── */
.byline {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--dim);
}
.byline--sm { font-size: 11px; }
.byline__author { color: var(--ink); font-weight: 600; }
.byline__sep { color: var(--dim); }

/* ── Section rail header ──────────────────────────────────── */
.section-rail {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 18px;
}
.section-rail__left { display: flex; align-items: center; gap: 12px; }
.section-rail__dot { width: 10px; height: 10px; flex-shrink: 0; }
.section-rail__title {
  font-family: var(--f-serif);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.4px;
}
.section-rail__count { font-family: var(--f-mono); font-size: 11px; color: #888; }
.section-rail__link {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--ink);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.section-rail__link:hover { text-decoration: underline; }

.section-block { padding-top: 28px; margin-top: 0; padding-bottom: 28px; border-bottom: 1px solid var(--ink); margin-bottom: 28px; }
.section-block:last-child { border-bottom: none; }

/* ── Featured article (homepage) ─────────────────────────── */
.featured-article { padding-bottom: 28px; border-bottom: 1px solid var(--ink); margin-bottom: 28px; }
.featured-article__grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 28px;
  align-items: flex-start;
}
.featured-article__title {
  font-family: var(--f-serif);
  font-size: 44px;
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -1px;
  margin: 0 0 16px;
  text-wrap: balance;
}
.featured-article__title a { text-decoration: none; color: var(--ink); }
.featured-article__title a:hover { text-decoration: underline; }
.featured-article__excerpt { font-size: 17px; line-height: 1.5; color: #3a342c; margin: 0 0 20px; }

/* ── Post card (Latest grid) ──────────────────────────────── */
.post-cards { display: grid; grid-template-columns: 1fr; gap: 24px; }
.post-card { display: flex; flex-direction: column; }
.post-card .cat-tags { margin: 12px 0 8px; }
.post-card__title {
  font-family: var(--f-serif);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 8px;
  letter-spacing: -0.2px;
}
.post-card__title a { text-decoration: none; color: var(--ink); }
.post-card__title a:hover { text-decoration: underline; }
.post-card__excerpt { font-size: 13px; color: #4a443c; line-height: 1.45; margin: 0 0 10px; flex: 1; }

/* ── Feature small (category section) ────────────────────── */
.feature-small { display: flex; flex-direction: column; }
.feature-small .cat-tags { margin: 12px 0 8px; }
.feature-small__title {
  font-family: var(--f-serif);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 8px;
  letter-spacing: -0.3px;
}
.feature-small__title a { text-decoration: none; color: var(--ink); }
.feature-small__title a:hover { text-decoration: underline; }
.feature-small__excerpt { font-size: 13px; color: #4a443c; line-height: 1.45; }

/* ── Sidebar widgets ──────────────────────────────────────── */
.widget { }
.widget__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 6px;
}
.widget__dot { width: 10px; height: 10px; flex-shrink: 0; }
.widget__title { font-family: var(--f-serif); font-size: 18px; font-weight: 600; }
.widget__label {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Popular posts */
.popular-post { display: flex; gap: 12px; padding: 10px 0; }
.popular-post + .popular-post { border-top: 1px dashed rgba(26,24,20,.2); }
.popular-post__num {
  font-family: var(--f-mono);
  font-size: 22px;
  font-weight: 700;
  color: rgba(26,24,20,.33);
  line-height: 1;
  font-feature-settings: "tnum";
  width: 32px;
  flex-shrink: 0;
}
.popular-post__num--first { color: var(--accent); }
.popular-post__title { font-size: 13px; font-weight: 500; line-height: 1.3; }
.popular-post__title a { text-decoration: none; color: var(--ink); }
.popular-post__title a:hover { text-decoration: underline; }
.popular-post__meta { font-family: var(--f-mono); font-size: 10px; color: var(--dim); margin-top: 4px; }

/* Newsletter widget */
.widget-newsletter { background: var(--ink); color: var(--bg); padding: 20px; }
.widget-newsletter__label { font-family: var(--f-mono); font-size: 10px; letter-spacing: 1px; color: var(--accent); margin-bottom: 8px; }
.widget-newsletter h3 { font-family: var(--f-serif); font-size: 22px; font-weight: 600; margin: 0 0 8px; line-height: 1.1; letter-spacing: -0.3px; }
.widget-newsletter p { font-size: 12px; opacity: 0.75; margin: 0 0 14px; line-height: 1.45; }
.widget-newsletter input[type="email"] {
  width: 100%; background: transparent; border: 1px solid var(--bg);
  padding: 8px 10px; color: var(--bg); font-family: var(--f-mono); font-size: 12px;
  box-sizing: border-box; margin-bottom: 8px; outline: none;
}
.widget-newsletter input::placeholder { color: rgba(244,240,232,.5); }
.btn-newsletter {
  width: 100%; background: var(--accent); color: var(--ink); border: none;
  padding: 10px; font-weight: 700; font-size: 13px; font-family: var(--f-sans); letter-spacing: 0.3px;
}

/* Category list */
.cat-list { list-style: none; }
.cat-list li a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 0; border-bottom: 1px dashed rgba(26,24,20,.2);
  text-decoration: none; color: var(--ink);
}
.cat-list li a:hover .cat-list__name { text-decoration: underline; }
.cat-list__left { display: flex; align-items: center; gap: 10px; }
.cat-list__dot { width: 8px; height: 8px; flex-shrink: 0; }
.cat-list__name { font-size: 14px; font-weight: 500; }
.cat-list__count { font-family: var(--f-mono); font-size: 11px; color: var(--dim); }

/* Author spotlight widget */
.widget-author { border: 1px solid var(--ink); padding: 18px; }
.widget-author__inner { display: flex; gap: 12px; align-items: flex-start; }
.widget-author h4 { font-family: var(--f-serif); font-size: 16px; font-weight: 600; margin: 0 0 2px; }
.widget-author__role { font-family: var(--f-mono); font-size: 11px; color: var(--dim); margin-bottom: 8px; }
.widget-author p { font-size: 12px; line-height: 1.45; color: #4a443c; }

/* Tag cloud */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-cloud a {
  font-family: var(--f-mono); font-size: 11px; color: var(--ink);
  border: 1px solid rgba(26,24,20,.25); padding: 3px 7px; text-decoration: none;
}
.tag-cloud a:hover { background: var(--ink); color: var(--bg); }

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  background: var(--ink);
  color: var(--bg);
  padding: 32px 40px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 32px;
  font-size: 13px;
  margin-top: 40px;
}
.footer-about p { margin-top: 12px; opacity: 0.7; line-height: 1.5; font-size: 13px; }
.footer-col__title {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 1px;
  margin: 0 0 12px; color: var(--accent); text-transform: uppercase;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col ul a { color: var(--bg); text-decoration: none; opacity: 0.85; }
.footer-col ul a:hover { opacity: 1; text-decoration: underline; }
.site-footer-bar {
  background: var(--ink);
  padding: 12px 40px;
  border-top: 1px solid rgba(255,255,255,.1);
  font-family: var(--f-mono);
  font-size: 11px;
  color: rgba(244,240,232,.4);
  display: flex;
  justify-content: space-between;
}

/* ── Single post ──────────────────────────────────────────── */
.reading-progress { height: 3px; background: rgba(26,24,20,.1); position: sticky; top: 0; z-index: 200; }
.reading-progress__fill { height: 100%; width: 0; background: var(--accent); transition: width .1s linear; }

.entry-wrap { max-width: 760px; margin: 0 auto; padding: 48px 32px 0; }

.entry-breadcrumb {
  font-family: var(--f-mono); font-size: 11px; color: var(--dim);
  margin-bottom: 28px; letter-spacing: 0.5px;
}
.entry-breadcrumb a { color: var(--dim); text-decoration: none; text-transform: uppercase; }
.entry-breadcrumb a:hover { text-decoration: underline; }

.entry-title {
  font-family: var(--f-serif);
  font-size: 52px; font-weight: 600; line-height: 1.05;
  letter-spacing: -1.4px; margin: 20px 0 18px; text-wrap: balance;
}
.entry-deck {
  font-family: var(--f-serif); font-size: 22px; font-style: italic;
  color: #3a342c; line-height: 1.5; margin: 0 0 28px;
}

.entry-byline {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 0;
  border-top: 1px solid var(--subtle);
  border-bottom: 1px solid var(--subtle);
  margin-bottom: 32px;
}
.entry-byline__info { flex: 1; }
.entry-byline__name { font-weight: 600; font-size: 14px; }
.entry-byline__role { font-family: var(--f-mono); font-size: 11px; color: var(--dim); margin-top: 2px; }
.entry-byline__meta { font-family: var(--f-mono); font-size: 11px; color: var(--dim); text-align: right; line-height: 1.6; }

.entry-hero { max-width: 760px; margin: 0 auto; padding: 0 32px; }
.entry-hero-caption { font-family: var(--f-mono); font-size: 11px; color: var(--dim); margin-top: 8px; margin-bottom: 28px; text-align: center; }

.entry-content {
  max-width: 760px; margin: 0 auto; padding: 0 32px 32px;
  font-family: var(--f-serif); font-size: 18px; line-height: 1.65; color: var(--ink);
}
.entry-content p { margin: 0 0 20px; }
.entry-content h2 { font-family: var(--f-serif); font-size: 30px; font-weight: 600; line-height: 1.2; letter-spacing: -0.4px; margin: 32px 0 16px; }
.entry-content h3 { font-family: var(--f-serif); font-size: 24px; font-weight: 600; margin: 24px 0 12px; }
.entry-content pre {
  background: var(--ink); color: #e8e6e0; font-family: var(--f-mono);
  font-size: 13px; padding: 20px; line-height: 1.6; overflow: auto;
  margin: 20px 0; border-left: 4px solid var(--accent);
}
.entry-content code { font-family: var(--f-mono); font-size: 15px; background: var(--faint); padding: 1px 6px; }
.entry-content pre code { background: transparent; font-size: 13px; padding: 0; }
.entry-content blockquote {
  border-left: 4px solid var(--accent); padding: 8px 0 8px 24px; margin: 32px 0;
  font-family: var(--f-serif); font-size: 26px; font-weight: 500; line-height: 1.3;
  letter-spacing: -0.3px; font-style: italic;
}
.entry-content ul, .entry-content ol { padding-left: 1.5em; margin: 0 0 20px; }
.entry-content li { margin-bottom: 8px; }
.entry-content a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.entry-content img { max-width: 100%; }
.entry-content .drop-cap::first-letter { font-size: 4em; float: left; line-height: 0.85; margin-right: 8px; margin-top: 4px; font-weight: 700; }

.entry-tags { max-width: 760px; margin: 0 auto; padding: 20px 32px; display: flex; flex-wrap: wrap; gap: 6px; }
.entry-tags a { font-family: var(--f-mono); font-size: 11px; color: var(--ink); border: 1px solid rgba(26,24,20,.25); padding: 4px 8px; text-decoration: none; }
.entry-tags a:hover { background: var(--ink); color: var(--bg); }

.entry-share-bar {
  max-width: 760px; margin: 0 auto; padding: 0 32px;
  border-top: 1px solid var(--subtle); border-bottom: 1px solid var(--subtle);
}
.entry-share-inner { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; }
.entry-reactions { display: flex; gap: 16px; font-size: 13px; color: var(--dim); }
.entry-share-btns { display: flex; gap: 8px; }
.btn-share { background: transparent; border: 1px solid var(--ink); padding: 5px 11px; font-size: 12px; color: var(--ink); }
.btn-share:hover { background: var(--ink); color: var(--bg); }

.entry-author-bio { max-width: 760px; margin: 32px auto 0; padding: 0 32px; }
.author-bio-card { padding: 24px; background: var(--white); border: 1px solid var(--subtle); display: flex; gap: 18px; }
.author-bio-card__info { flex: 1; }
.author-bio-card__label { font-family: var(--f-mono); font-size: 10px; letter-spacing: 1px; color: var(--dim); margin-bottom: 6px; }
.author-bio-card__name { font-family: var(--f-serif); font-size: 22px; font-weight: 600; margin: 0 0 6px; }
.author-bio-card__desc { font-size: 13px; color: #3a342c; line-height: 1.55; margin: 0 0 10px; }
.author-bio-card__links { display: flex; gap: 14px; font-family: var(--f-mono); font-size: 11px; color: var(--ink); }
.author-bio-card__links a { color: var(--ink); text-decoration: none; }
.author-bio-card__links a:hover { text-decoration: underline; }

.entry-related { max-width: 760px; margin: 48px auto 0; padding: 0 32px; }
.entry-related__title { font-family: var(--f-serif); font-size: 26px; font-weight: 600; margin: 0 0 18px; letter-spacing: -0.4px; }
.related-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.related-post { border-top: 2px solid var(--ink); padding-top: 12px; }
.related-post h4 { font-family: var(--f-serif); font-size: 16px; font-weight: 600; line-height: 1.25; margin: 8px 0 6px; }
.related-post h4 a { text-decoration: none; color: var(--ink); }
.related-post h4 a:hover { text-decoration: underline; }
.related-post__meta { font-family: var(--f-mono); font-size: 10px; color: var(--dim); }

/* ── Comments ─────────────────────────────────────────────── */
.entry-comments { max-width: 760px; margin: 48px auto 0; padding: 0 32px 48px; }
.comments-title { font-family: var(--f-serif); font-size: 26px; font-weight: 600; margin: 0 0 18px; letter-spacing: -0.4px; }
.comment-form textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--ink); padding: 14px; font-family: var(--f-sans); font-size: 14px; min-height: 80px; background: var(--white); color: var(--ink); resize: vertical; }
.comment-form textarea::placeholder { color: var(--dim); }
.btn-comment { margin-top: 10px; background: var(--ink); color: var(--bg); border: none; padding: 8px 16px; font-size: 13px; font-weight: 600; }
.comment-list { list-style: none; margin-top: 32px; }
.comment-item { display: flex; gap: 12px; padding: 18px 0; border-bottom: 1px solid var(--subtle); }
.comment-item__body { flex: 1; }
.comment-item__header { display: flex; justify-content: space-between; margin-bottom: 6px; }
.comment-item__name { font-weight: 600; font-size: 13px; }
.comment-item__time { font-family: var(--f-mono); font-size: 11px; color: var(--dim); }
.comment-item__text { font-size: 13.5px; line-height: 1.5; color: #3a342c; }
.comment-item__actions { font-family: var(--f-mono); font-size: 11px; color: var(--dim); margin-top: 6px; display: flex; gap: 10px; }
.comment-item__actions a { color: var(--dim); text-decoration: none; }
.comment-item__actions a:hover { color: var(--ink); }

/* ── Category / Archive page ──────────────────────────────── */
.archive-hero { padding: 56px 40px 40px; border-bottom: 1px solid var(--ink); }
.archive-hero__meta { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.archive-hero__dot { width: 28px; height: 28px; display: block; flex-shrink: 0; }
.archive-hero__label { font-family: var(--f-mono); font-size: 12px; letter-spacing: 1.5px; color: var(--dim); text-transform: uppercase; }
.archive-hero__title { font-family: var(--f-serif); font-size: 88px; font-weight: 700; letter-spacing: -3px; margin: 0 0 18px; line-height: 0.95; }
.archive-hero__desc { font-size: 18px; color: #3a342c; line-height: 1.5; max-width: 680px; }

.filter-bar { display: flex; gap: 8px; margin-top: 32px; align-items: center; flex-wrap: wrap; }
.filter-bar__label { font-family: var(--f-mono); font-size: 11px; color: var(--dim); margin-right: 6px; }
.btn-filter { background: transparent; color: var(--ink); border: 1px solid var(--ink); padding: 5px 12px; font-size: 12px; font-family: var(--f-sans); }
.btn-filter.active { background: var(--ink); color: var(--bg); font-weight: 600; }
.sort-select { background: transparent; border: 1px solid var(--ink); padding: 5px 8px; font-size: 12px; color: var(--ink); }

.archive-featured-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; padding-bottom: 28px; border-bottom: 1px solid var(--ink); margin-bottom: 24px; }
.archive-featured h2 { font-family: var(--f-serif); font-size: 32px; font-weight: 600; line-height: 1.1; letter-spacing: -0.6px; margin: 12px 0 10px; }
.archive-featured h2 a { text-decoration: none; color: var(--ink); }
.archive-featured h2 a:hover { text-decoration: underline; }
.archive-featured__meta { font-family: var(--f-mono); font-size: 11px; color: var(--dim); }
.archive-featured__excerpt { font-size: 14px; color: #3a342c; line-height: 1.55; margin: 0 0 10px; }

.archive-aside-list { display: flex; flex-direction: column; gap: 16px; }
.archive-aside-item { display: flex; gap: 12px; }
.archive-aside-item__thumb { width: 100px; flex-shrink: 0; }
.archive-aside-item h3 { font-family: var(--f-serif); font-size: 16px; font-weight: 600; line-height: 1.25; margin: 6px 0 6px; }
.archive-aside-item h3 a { text-decoration: none; color: var(--ink); }
.archive-aside-item h3 a:hover { text-decoration: underline; }
.archive-aside-item__meta { font-family: var(--f-mono); font-size: 10px; color: var(--dim); }

.archive-list { border-top: 2px solid var(--ink); }
.archive-list-item {
  display: grid;
  grid-template-columns: 60px 1fr 100px 60px;
  gap: 16px; padding: 18px 0;
  border-bottom: 1px solid rgba(26,24,20,.15);
  align-items: center;
}
.archive-item__num { font-family: var(--f-mono); font-size: 11px; color: var(--dim); font-feature-settings: "tnum"; }
.archive-item__title { font-family: var(--f-serif); font-size: 18px; font-weight: 600; line-height: 1.25; margin: 6px 0 4px; }
.archive-item__title a { text-decoration: none; color: var(--ink); }
.archive-item__title a:hover { text-decoration: underline; }
.archive-item__excerpt { font-size: 12px; color: var(--dim); line-height: 1.4; }
.archive-item__author { font-family: var(--f-mono); font-size: 11px; color: var(--dim); }
.archive-item__read { font-family: var(--f-mono); font-size: 11px; color: var(--dim); text-align: right; }

.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 32px; }
.page-numbers {
  background: transparent; color: var(--ink); border: 1px solid var(--ink);
  width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-family: var(--f-mono); text-decoration: none;
}
.page-numbers.current { background: var(--ink); color: var(--bg); font-weight: 700; }
.page-numbers:hover:not(.current) { background: rgba(26,24,20,.1); }

/* ── Author page ──────────────────────────────────────────── */
.author-hero { padding: 48px 40px 32px; border-bottom: 1px solid var(--ink); }
.author-hero__grid { display: grid; grid-template-columns: 200px 1fr 240px; gap: 36px; align-items: flex-start; }
.author-label { font-family: var(--f-mono); font-size: 11px; letter-spacing: 1px; color: var(--dim); margin-bottom: 8px; }
.author-name { font-family: var(--f-serif); font-size: 64px; font-weight: 700; letter-spacing: -1.8px; margin: 0 0 16px; line-height: 1; }
.author-bio-text { font-size: 17px; color: #3a342c; line-height: 1.55; margin: 0 0 20px; max-width: 640px; }
.author-links { display: flex; gap: 14px; font-family: var(--f-mono); font-size: 12px; color: var(--ink); align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.author-links a { color: var(--ink); text-decoration: none; }
.author-links a:hover { text-decoration: underline; }
.author-links__sep { color: var(--dim); }
.author-cta { display: flex; gap: 8px; }
.btn-follow { background: var(--ink); color: var(--bg); border: none; padding: 10px 18px; font-weight: 600; font-size: 13px; }
.btn-sub-posts { background: transparent; border: 1px solid var(--ink); padding: 10px 18px; font-weight: 600; font-size: 13px; color: var(--ink); }

.author-stats { border-left: 1px solid var(--subtle); padding-left: 28px; }
.author-stat { padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px dashed rgba(26,24,20,.2); }
.author-stat:last-child { border-bottom: none; }
.author-stat__value { font-family: var(--f-serif); font-size: 28px; font-weight: 700; letter-spacing: -0.6px; line-height: 1; }
.author-stat__key { font-family: var(--f-mono); font-size: 10px; letter-spacing: 1px; color: var(--dim); margin-top: 4px; text-transform: uppercase; }

.author-tabs { padding: 0 40px; border-bottom: 1px solid var(--subtle); display: flex; gap: 32px; }
.author-tab { color: var(--ink); text-decoration: none; padding: 14px 0; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.author-tab.active { font-weight: 700; border-bottom: 2px solid var(--accent); }
.author-tab__count { font-family: var(--f-mono); font-size: 10px; color: var(--dim); }

.pinned-label { font-family: var(--f-mono); font-size: 11px; letter-spacing: 1px; color: var(--accent); margin-bottom: 10px; }
.pinned-article { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 20px; background: var(--white); border: 1px solid var(--subtle); margin-bottom: 32px; }
.pinned-article h2 { font-family: var(--f-serif); font-size: 26px; font-weight: 600; line-height: 1.15; margin: 12px 0 10px; letter-spacing: -0.4px; }
.pinned-article h2 a { text-decoration: none; color: var(--ink); }
.pinned-article h2 a:hover { text-decoration: underline; }
.pinned-article__excerpt { font-size: 13px; color: #3a342c; line-height: 1.5; margin: 0 0 12px; }
.pinned-article__meta { font-family: var(--f-mono); font-size: 11px; color: var(--dim); }

.author-recent-title { font-family: var(--f-serif); font-size: 22px; font-weight: 600; margin: 0 0 16px; padding-bottom: 8px; border-bottom: 2px solid var(--ink); }
.author-posts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.author-post h4 { font-family: var(--f-serif); font-size: 18px; font-weight: 600; line-height: 1.2; margin: 8px 0 6px; }
.author-post h4 a { text-decoration: none; color: var(--ink); }
.author-post h4 a:hover { text-decoration: underline; }
.author-post .cat-tags { margin: 12px 0 8px; }
.author-post__excerpt { font-size: 12.5px; color: #3a342c; line-height: 1.5; margin: 0 0 8px; }
.author-post__meta { font-family: var(--f-mono); font-size: 10px; color: var(--dim); }

.activity-item { padding: 10px 0; border-bottom: 1px dashed rgba(26,24,20,.2); font-size: 12px; }
.activity-type { font-family: var(--f-mono); font-size: 10px; color: var(--accent); font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; }
.activity-what { margin-top: 4px; color: var(--ink); }
.activity-when { font-family: var(--f-mono); font-size: 10px; color: var(--dim); margin-top: 2px; }

.more-author-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px dashed rgba(26,24,20,.2); }
.more-author-item__name { font-size: 13px; font-weight: 500; }
.more-author-item__role { font-family: var(--f-mono); font-size: 10px; color: var(--dim); }
.btn-follow-sm { background: transparent; border: 1px solid var(--ink); padding: 4px 10px; font-size: 11px; color: var(--ink); margin-left: auto; flex-shrink: 0; }
.btn-follow-sm:hover { background: var(--ink); color: var(--bg); }

/* ── Search page ──────────────────────────────────────────── */
.search-hero { padding: 40px 40px 28px; border-bottom: 1px solid var(--ink); }
.search-hero__meta { font-family: var(--f-mono); font-size: 11px; letter-spacing: 1px; color: var(--dim); margin-bottom: 14px; }
.search-input-group { display: flex; align-items: stretch; max-width: 720px; }
.search-input-group__icon { background: var(--ink); color: var(--accent); padding: 0 16px; display: flex; align-items: center; font-family: var(--f-mono); font-size: 16px; flex-shrink: 0; }
.search-input-group input[type="search"] {
  flex: 1; background: var(--white); border: 1px solid var(--ink); border-left: none;
  padding: 14px 18px; font-family: var(--f-serif); font-size: 26px; font-weight: 600; color: var(--ink); outline: none;
}
.btn-search { background: var(--accent); color: var(--ink); border: none; padding: 0 24px; font-weight: 700; font-size: 13px; font-family: var(--f-sans); flex-shrink: 0; }

.search-chips { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; align-items: center; }
.btn-chip { background: transparent; color: var(--ink); border: 1px solid var(--ink); padding: 6px 14px; font-size: 12px; display: flex; gap: 6px; align-items: center; }
.btn-chip.active { background: var(--ink); color: var(--bg); font-weight: 600; }
.chip-count { font-family: var(--f-mono); font-size: 10px; opacity: 0.7; }

.search-top-hit { background: var(--white); border: 2px solid var(--accent); padding: 24px; margin-bottom: 24px; position: relative; }
.top-hit-badge { position: absolute; top: -1px; left: -1px; background: var(--accent); color: var(--ink); font-family: var(--f-mono); font-size: 10px; font-weight: 700; padding: 3px 10px; letter-spacing: 1px; }
.top-hit-body { margin-top: 14px; }
.top-hit-title { font-family: var(--f-serif); font-size: 28px; font-weight: 600; line-height: 1.15; margin: 10px 0 12px; letter-spacing: -0.4px; }
.top-hit-title a { text-decoration: none; color: var(--ink); }
.top-hit-title a:hover { text-decoration: underline; }
.top-hit-excerpt { font-size: 14px; color: #3a342c; line-height: 1.55; margin: 0 0 12px; }
.top-hit-url { font-family: var(--f-mono); font-size: 11px; color: var(--dim); }

.search-result { padding: 18px 0; border-bottom: 1px solid rgba(26,24,20,.15); display: grid; grid-template-columns: 30px 1fr; gap: 14px; align-items: flex-start; }
.search-result__num { font-family: var(--f-mono); font-size: 11px; color: var(--dim); font-feature-settings: "tnum"; margin-top: 2px; }
.search-result__url { font-family: var(--f-mono); font-size: 11px; color: var(--dim); margin-bottom: 4px; }
.search-result__title { font-family: var(--f-serif); font-size: 19px; font-weight: 600; line-height: 1.25; margin: 0 0 6px; letter-spacing: -0.2px; }
.search-result__title a { text-decoration: none; color: #1c4ba0; }
.search-result__title a:hover { text-decoration: underline; }
.search-result__excerpt { font-size: 13px; color: #3a342c; line-height: 1.5; margin: 0 0 6px; }
.search-result__meta { font-family: var(--f-mono); font-size: 10px; color: var(--dim); display: flex; gap: 10px; flex-wrap: wrap; }
mark { background: var(--accent); color: var(--ink); padding: 0 3px; }

.refine-widget { font-family: var(--f-mono); font-size: 11px; }
.refine-widget__title { font-family: var(--f-serif); font-size: 16px; font-weight: 600; margin: 0 0 10px; border-bottom: 2px solid var(--ink); padding-bottom: 6px; }
.refine-section { margin-bottom: 16px; }
.refine-label { color: var(--dim); margin-bottom: 6px; letter-spacing: 0.5px; text-transform: uppercase; }
.refine-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; color: var(--ink); cursor: pointer; }
.refine-row__dot { width: 8px; height: 8px; flex-shrink: 0; }
.refine-row__label { flex: 1; }
.refine-row__count { color: var(--dim); }

.did-you-mean { background: var(--white); border: 1px solid var(--subtle); padding: 16px; margin-bottom: 24px; }
.did-you-mean__label { font-family: var(--f-mono); font-size: 10px; letter-spacing: 1px; color: var(--accent); font-weight: 700; margin-bottom: 10px; }
.did-you-mean__term { font-family: var(--f-serif); font-size: 16px; margin-bottom: 4px; }
.did-you-mean__count { font-family: var(--f-mono); font-size: 11px; color: var(--dim); }

.trending-item { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed rgba(26,24,20,.15); text-decoration: none; color: var(--ink); font-size: 13px; }
.trending-item:hover { text-decoration: underline; }
.trending-item__arrow { color: var(--dim); font-family: var(--f-mono); font-size: 10px; }

/* ── 404 ──────────────────────────────────────────────────── */
.error-404 { max-width: 640px; margin: 80px auto; padding: 0 40px; text-align: center; }
.error-404__code { font-family: var(--f-mono); font-size: 120px; font-weight: 700; letter-spacing: -4px; line-height: 1; color: var(--accent); }
.error-404__title { font-family: var(--f-serif); font-size: 36px; font-weight: 600; margin: 16px 0 12px; letter-spacing: -0.6px; }
.error-404__desc { color: var(--dim); font-size: 17px; line-height: 1.5; margin-bottom: 32px; }
.error-404__search { max-width: 400px; margin: 0 auto; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1100px) {
  .site-body { grid-template-columns: 1fr 280px; padding: 24px; }
  .site-header { padding: 16px 24px 0; }
  .ticker { padding: 8px 24px; }
  .site-footer { padding: 32px 24px; grid-template-columns: 1fr 1fr; }
  .site-footer-bar { padding: 12px 24px; }
  .archive-hero, .author-hero { padding-left: 24px; padding-right: 24px; }
  .author-tabs { padding: 0 24px; }
  .filter-bar { margin-top: 20px; }
}
@media (max-width: 900px) {
  .site-body { grid-template-columns: 1fr; }
  .site-sidebar { display: none; }
  .featured-article__grid { grid-template-columns: 1fr; }
  .archive-hero__title { font-size: 56px; }
  .author-hero__grid { grid-template-columns: 1fr; }
  .author-hero__grid > :first-child { display: none; }
  .author-stats { border-left: none; padding-left: 0; border-top: 1px solid var(--subtle); padding-top: 16px; }
  .archive-featured-grid { grid-template-columns: 1fr; }
  .archive-list-item { grid-template-columns: 40px 1fr 80px; }
  .archive-item__read { display: none; }
  .related-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .site-header { padding: 12px 16px 0; }
  .ticker { padding: 6px 16px; }
  .site-body { padding: 16px; }
  .main-nav ul { gap: 16px; overflow-x: auto; padding-bottom: 4px; }
  .entry-wrap, .entry-hero, .entry-content, .entry-tags, .entry-share-bar, .entry-author-bio, .entry-related, .entry-comments { padding-left: 16px; padding-right: 16px; }
  .entry-title { font-size: 36px; }
  .related-grid { grid-template-columns: 1fr; }
  .archive-hero { padding: 32px 16px; }
  .archive-hero__title { font-size: 40px; letter-spacing: -1px; }
  .author-hero { padding: 24px 16px; }
  .author-name { font-size: 40px; }
  .author-tabs { padding: 0 16px; }
  .search-hero { padding: 24px 16px; }
  .site-footer { grid-template-columns: 1fr; padding: 24px 16px; }
  .site-footer-bar { padding: 12px 16px; }
  .pinned-article { grid-template-columns: 1fr; }
  .author-posts-grid { grid-template-columns: 1fr; }
}
