/* ============ Design Tokens ============ */
:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f0f1f4;
  --text: #16181d;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-soft: #eef2ff;
  --danger: #dc2626;
  --success: #16a34a;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow: 0 4px 16px rgba(16, 24, 40, 0.08);
  --radius: 14px;
  --radius-sm: 9px;
  --container: 1180px;
}

[data-theme="dark"] {
  --bg: #0f1115;
  --surface: #171a21;
  --surface-2: #1e222b;
  --text: #e6e8ec;
  --text-muted: #9aa1ad;
  --border: #2a2f3a;
  --primary: #6366f1;
  --primary-hover: #818cf8;
  --primary-soft: #23274a;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

/* ============ Reset & Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Vazirmatn', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s ease, color .25s ease;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
h1, h2, h3, h4 { line-height: 1.5; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.site-main { min-height: 60vh; }

.material-symbols-rounded {
  font-family: 'Material Symbols Rounded';
  font-weight: normal; font-style: normal; line-height: 1; vertical-align: middle;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-family: inherit; font-size: .95rem;
  cursor: pointer; transition: all .18s ease;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; color: #fff; }
.btn-sm { padding: 6px 12px; font-size: .85rem; }
.btn-block { width: 100%; justify-content: center; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: none; border-radius: 10px;
  background: transparent; color: var(--text); cursor: pointer; transition: background .15s ease;
}
.icon-btn:hover { background: var(--surface-2); }

/* ============ Header ============ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 66px; }
.brand { font-size: 1.25rem; font-weight: 800; color: var(--text); }
.brand:hover { color: var(--primary); }
.main-nav { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.main-nav > a, .dropdown-toggle {
  display: inline-flex; align-items: center; gap: 4px; padding: 8px 14px;
  border-radius: 8px; border: none; background: none; color: var(--text-muted);
  font-family: inherit; font-size: .95rem; cursor: pointer;
}
.main-nav > a:hover, .dropdown-toggle:hover { color: var(--primary); background: var(--surface-2); }
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: calc(100% + 6px); inset-inline-start: 0; min-width: 200px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow); padding: 6px; display: none; z-index: 60;
}
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--text); }
.dropdown-menu a:hover { background: var(--surface-2); color: var(--primary); }
.header-actions { display: flex; align-items: center; gap: 4px; }
.nav-toggle { display: none; }

/* ============ Search Modal ============ */
.search-modal {
  position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.5);
  display: flex; align-items: flex-start; justify-content: center; padding: 10vh 20px;
}
.search-modal[hidden] { display: none; }
.search-modal-inner {
  width: 100%; max-width: 620px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden;
}
.search-box { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.search-box .material-symbols-rounded { color: var(--text-muted); }
.search-box input { flex: 1; border: none; background: none; outline: none; font-family: inherit; font-size: 1rem; color: var(--text); }
.search-results { max-height: 55vh; overflow-y: auto; }
.search-result-item { display: block; padding: 14px 18px; border-bottom: 1px solid var(--border); color: var(--text); }
.search-result-item:hover { background: var(--surface-2); }
.search-result-item strong { display: block; margin-bottom: 4px; }
.search-result-item p { margin: 0; color: var(--text-muted); font-size: .88rem; }
.search-empty { padding: 24px; text-align: center; color: var(--text-muted); }

/* ============ Hero ============ */
.hero { background: linear-gradient(135deg, var(--primary-soft), var(--surface)); border-bottom: 1px solid var(--border); }
.hero-inner { display: flex; align-items: center; gap: 40px; padding: 60px 20px; }
.hero-text { flex: 1; }
.hero-text h1 { font-size: 2.3rem; font-weight: 900; margin-bottom: 12px; }
.hero-text p { color: var(--text-muted); font-size: 1.1rem; }
.hero-image { flex: 0 0 320px; }
.hero-image img { border-radius: var(--radius); box-shadow: var(--shadow); }

/* ============ Sections ============ */
.section { margin: 40px 0; }
.section-title { font-size: 1.4rem; font-weight: 800; margin-bottom: 20px; padding-inline-start: 12px; border-inline-start: 4px solid var(--primary); }
.category-pills { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 0; }
.pill { padding: 8px 18px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text); font-size: .9rem; }
.pill:hover { border-color: var(--primary); color: var(--primary); }

/* ============ Post Cards ============ */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-grid.post-list { grid-template-columns: 1fr; }
.post-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: transform .18s ease, box-shadow .18s ease; display: flex; flex-direction: column;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.post-list .post-card { flex-direction: row; }
.post-thumb { display: block; aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.post-list .post-thumb { aspect-ratio: auto; flex: 0 0 240px; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.post-card:hover .post-thumb img { transform: scale(1.04); }
.thumb-placeholder { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: var(--text-muted); }
.thumb-placeholder .material-symbols-rounded { font-size: 48px; }
.post-card-body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-meta { display: flex; align-items: center; gap: 10px; font-size: .8rem; color: var(--text-muted); }
.post-cat { background: var(--primary-soft); color: var(--primary); padding: 2px 10px; border-radius: 999px; font-size: .75rem; }
.post-card-title { font-size: 1.12rem; font-weight: 700; margin: 0; }
.post-card-title a { color: var(--text); }
.post-card-title a:hover { color: var(--primary); }
.post-card-excerpt { color: var(--text-muted); font-size: .9rem; margin: 0; flex: 1; }
.post-card-foot { display: flex; justify-content: space-between; color: var(--text-muted); font-size: .82rem; }
.post-card-foot span { display: inline-flex; align-items: center; gap: 4px; }
.post-card-foot .material-symbols-rounded { font-size: 16px; }

/* ============ Trending ============ */
.trending-list { display: flex; flex-direction: column; gap: 10px; }
.trending-item {
  display: flex; align-items: center; gap: 14px; padding: 12px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text);
}
.trending-item:hover { border-color: var(--primary); }
.trending-item .rank { font-size: 1.3rem; font-weight: 900; color: var(--primary); min-width: 34px; text-align: center; }
.trending-item .trending-title { flex: 1; }
.trending-item .trending-views { color: var(--text-muted); font-size: .85rem; }

/* ============ Banner ============ */
.banner {
  display: flex; align-items: center; gap: 24px; margin: 40px 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.banner img { width: 200px; height: 140px; object-fit: cover; }
.banner-text { padding: 16px; }
.banner-text h3 { margin: 0 0 6px; }
.banner-text p { color: var(--text-muted); margin: 0 0 12px; }

/* ============ Single Post ============ */
.single-container { padding-top: 24px; padding-bottom: 40px; max-width: 860px; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .85rem; color: var(--text-muted); margin-bottom: 20px; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { color: var(--text-muted); }
.breadcrumb .current { color: var(--text); }
.single-header h1 { font-size: 2rem; font-weight: 900; margin-bottom: 16px; }
.single-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; color: var(--text-muted); font-size: .88rem; margin-bottom: 20px; }
.single-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.single-meta .material-symbols-rounded { font-size: 18px; }
.author-badge { color: var(--primary); font-weight: 600; }
.single-feature img { border-radius: var(--radius); width: 100%; }

.video-wrap { position: relative; padding-top: 56.25%; margin: 20px 0; border-radius: var(--radius); overflow: hidden; background: #000; }
.video-wrap video, .video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.single-body { display: grid; grid-template-columns: 240px 1fr; gap: 32px; margin-top: 24px; align-items: start; }
.toc { position: sticky; top: 90px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; }
.toc-title { font-weight: 700; margin-bottom: 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 6px 0; font-size: .88rem; }
.toc li.toc-sub { padding-inline-start: 14px; }
.toc a { color: var(--text-muted); }
.toc a:hover { color: var(--primary); }

.single-content { font-size: 1.05rem; }
.single-content h2 { font-size: 1.5rem; margin-top: 1.6em; padding-bottom: .3em; border-bottom: 1px solid var(--border); }
.single-content h3 { font-size: 1.25rem; margin-top: 1.4em; }
.single-content img { border-radius: var(--radius-sm); margin: 16px 0; }
.single-content a { text-decoration: underline; }
.single-content blockquote { border-inline-start: 4px solid var(--primary); margin: 16px 0; padding: 8px 16px; background: var(--surface-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.single-content code { background: var(--surface-2); padding: 2px 6px; border-radius: 4px; font-size: .9em; direction: ltr; }
.single-content pre { background: var(--surface-2); padding: 16px; border-radius: var(--radius-sm); overflow-x: auto; direction: ltr; }
.single-content pre code { background: none; padding: 0; }

/* Share bar */
.share-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 28px 0; padding: 14px 0; border-block: 1px solid var(--border); }
.share { padding: 6px 14px; border-radius: 999px; font-size: .85rem; color: #fff; border: none; cursor: pointer; font-family: inherit; }
.share.telegram { background: #229ed9; }
.share.x { background: #111; }
.share.whatsapp { background: #25d366; }
.share.copy { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }

/* Post nav */
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 24px 0; }
.post-nav a { display: block; padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.post-nav a:hover { border-color: var(--primary); }
.post-nav span { display: block; color: var(--text-muted); font-size: .8rem; margin-bottom: 4px; }
.post-nav strong { color: var(--text); font-size: .95rem; }

/* ============ Comments ============ */
.comments { margin-top: 40px; }
.comments h2 { font-size: 1.3rem; }
.comment-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 24px; }
.comment-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.comment-form input, .comment-form textarea {
  width: 100%; padding: 10px 14px; margin-bottom: 12px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font-family: inherit; font-size: .95rem;
}
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--primary); }
.comment-form .hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; }
.comment-list { margin-top: 8px; }
.comment-tree { list-style: none; margin: 0; padding: 0; }
.comment-tree .comment-tree { padding-inline-start: 28px; }
.comment-item { margin-bottom: 8px; }
.comment-item.replying > .comment { border-color: var(--primary); }
.comment { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; }
.comment-head { display: flex; align-items: center; gap: 10px; font-size: .85rem; color: var(--text-muted); margin-bottom: 6px; }
.comment-head strong { color: var(--text); }
.comment-text { margin: 0 0 8px; }
.reply-btn { background: none; border: none; color: var(--primary); cursor: pointer; font-family: inherit; font-size: .82rem; padding: 0; }

/* ============ Footer ============ */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); margin-top: 40px; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; padding: 32px 20px; }
.footer-brand p { margin: 4px 0 0; color: var(--text-muted); font-size: .9rem; }
.footer-nav { display: flex; gap: 16px; margin-inline-start: auto; }
.footer-nav a { color: var(--text-muted); }
.footer-nav a:hover { color: var(--primary); }
.copyright { width: 100%; color: var(--text-muted); font-size: .82rem; margin: 0; }

/* ============ Archive / Search ============ */
.archive-header { padding: 40px 0 8px; }
.archive-header h1 { font-size: 1.8rem; font-weight: 900; }
.archive-header p { color: var(--text-muted); }
.archive-count { display: inline-block; background: var(--surface-2); color: var(--text-muted); padding: 4px 14px; border-radius: 999px; font-size: .85rem; margin-bottom: 20px; }
.empty { color: var(--text-muted); text-align: center; padding: 40px 0; }

/* ============ Flash ============ */
.flash { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: .95rem; }
.flash-success { background: color-mix(in srgb, var(--success) 12%, transparent); color: var(--success); border: 1px solid color-mix(in srgb, var(--success) 30%, transparent); }
.flash-error { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent); }

/* ============ Pagination ============ */
.pagination { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 28px 0; }
.page-link { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.page-link:hover { border-color: var(--primary); color: var(--primary); }
.page-link.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ============ 404 ============ */
.notfound { display: flex; justify-content: center; align-items: center; min-height: 50vh; }
.notfound-inner { text-align: center; }
.notfound-icon { font-size: 80px; color: var(--text-muted); }
.notfound h1 { font-size: 4rem; font-weight: 900; margin: 8px 0; }

/* ============ Responsive ============ */
@media (max-width: 992px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { flex-direction: column; text-align: center; }
  .hero-image { flex: none; width: 100%; max-width: 420px; }
  .single-body { grid-template-columns: 1fr; }
  .toc { position: static; }
}
@media (max-width: 640px) {
  .post-grid { grid-template-columns: 1fr; }
  .nav-toggle { display: inline-flex; }
  .main-nav {
    display: none; position: absolute; top: 66px; inset-inline: 0;
    flex-direction: column; align-items: stretch; background: var(--surface);
    border-bottom: 1px solid var(--border); padding: 12px; gap: 4px;
  }
  .main-nav.open { display: flex; }
  .dropdown-menu { position: static; box-shadow: none; border: none; }
  .post-list .post-card { flex-direction: column; }
  .post-list .post-thumb { flex: none; aspect-ratio: 16 / 9; }
  .post-nav { grid-template-columns: 1fr; }
  .comment-form .form-row { grid-template-columns: 1fr; }
  .hero-inner { padding: 40px 20px; }
  .hero-text h1 { font-size: 1.7rem; }
}





/* ============ Static pages (About / Contact) ============ */
.static-page { max-width: 860px; }
.static-content { font-size: 1.05rem; line-height: 2; }
.static-content h2 { margin-top: 1.5em; padding-bottom: .3em; border-bottom: 1px solid var(--border); }
.static-content img { border-radius: var(--radius-sm); margin: 16px 0; }

.contact-section { max-width: 720px; margin: 24px 0 48px; }
.contact-section h2 { margin-bottom: 16px; }
.contact-form {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px;
}
.contact-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form .form-group { margin-bottom: 16px; }
.contact-form label { display: block; margin-bottom: 6px; font-weight: 600; font-size: .9rem; color: var(--text-muted); }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font-family: inherit; font-size: .95rem;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--primary); }
.contact-form .hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; }
@media (max-width: 640px) {
  .contact-form .form-row { grid-template-columns: 1fr; }
}

/* ============ Header nav spacing fix ============ */
.header-inner { gap: 14px; }
.main-nav { display: flex; align-items: center; gap: 6px; margin-inline-start: 10px; flex: 1; }
.header-actions { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; flex-shrink: 0; }
.main-nav > a, .dropdown-toggle { white-space: nowrap; }

/* ============ Author badge (single post) ============ */
.author-badge { display: inline-flex; align-items: center; gap: 8px; }
.author-badge a { color: var(--primary); font-weight: 700; }
.author-badge-avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.author-badge-avatar-fallback { display: inline-flex; align-items: center; justify-content: center; background: var(--primary-soft); color: var(--primary); }
.author-badge-avatar-fallback .material-symbols-rounded { font-size: 17px; }

/* ============ Author box (single post) ============ */
.author-box {
  display: flex; gap: 18px; align-items: flex-start; margin: 28px 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px;
}
.author-box-avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 2px solid var(--primary); }
.author-box-avatar-fallback { display: flex; align-items: center; justify-content: center; background: var(--primary-soft); color: var(--primary); }
.author-box-avatar-fallback .material-symbols-rounded { font-size: 36px; }
.author-box-info { flex: 1; }
.author-box-label { font-size: .78rem; color: var(--text-muted); display: block; margin-bottom: 2px; }
.author-box-name { font-size: 1.1rem; font-weight: 800; margin-bottom: 6px; display: inline-block; }
.author-box-info p { color: var(--text-muted); font-size: .92rem; margin: 0 0 10px; }

/* ============ Post card author link ============ */
.post-author { display: inline-flex; align-items: center; gap: 4px; color: var(--text-muted); }
.post-author:hover { color: var(--primary); }
.post-author .material-symbols-rounded { font-size: 16px; }

/* ============ Post card thumbnail placeholder ============ */
.thumb-placeholder {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--surface-2), var(--primary-soft)); color: var(--text-muted);
}
.thumb-placeholder .material-symbols-rounded { font-size: 52px; opacity: .55; }

/* ============ Author hero (profile page) ============ */
.author-hero {
  display: flex; gap: 28px; align-items: center; margin: 32px 0; padding: 28px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.author-hero-avatar { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 3px solid var(--primary); }
.author-hero-avatar-fallback { display: flex; align-items: center; justify-content: center; background: var(--primary-soft); color: var(--primary); }
.author-hero-avatar-fallback .material-symbols-rounded { font-size: 54px; }
.author-hero-info h1 { font-size: 1.7rem; font-weight: 900; margin: 0; }
.author-hero-username { color: var(--text-muted); font-size: .92rem; display: block; margin-bottom: 4px; }
.author-hero-role { display: inline-block; background: var(--primary-soft); color: var(--primary); padding: 2px 14px; border-radius: 999px; font-size: .8rem; margin-bottom: 10px; }
.author-hero-bio { color: var(--text-muted); margin: 8px 0; }
.author-hero-since { color: var(--text-muted); font-size: .82rem; }

/* ============ Authors hub ============ */
.authors-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin: 24px 0 48px; }
.author-card {
  display: flex; align-items: center; gap: 16px; padding: 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.author-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--primary); color: var(--text); }
.author-card-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.author-card-avatar-fallback { display: inline-flex; align-items: center; justify-content: center; background: var(--primary-soft); color: var(--primary); }
.author-card-avatar-fallback .material-symbols-rounded { font-size: 32px; }
.author-card-info { flex: 1; min-width: 0; }
.author-card-info strong { display: block; font-size: 1.02rem; }
.author-card-info p { color: var(--text-muted); font-size: .85rem; margin: 6px 0 0; }
.author-card-arrow { color: var(--text-muted); }
.author-card:hover .author-card-arrow { color: var(--primary); }

@media (max-width: 768px) {
  .author-hero { flex-direction: column; text-align: center; }
  .authors-grid { grid-template-columns: 1fr; }
  .author-box { flex-direction: column; align-items: center; text-align: center; }
}

/* ============ Fixes ============ */
/* [hidden] must always win over display rules set on classes */
[hidden] { display: none !important; }

/* Restore mobile nav toggle (the desktop spacing rule above
   was overriding the mobile display:none) */
@media (max-width: 640px) {
  .main-nav { display: none !important; flex: 0; }
  .main-nav.open { display: flex !important; }
  .header-inner { flex-wrap: nowrap; }
}
