/*
Theme Name: Jineftin
Theme URI: https://jineftin.krd
Author: Syntax Company
Author URI: https://syntax.krd
Description: A modern editorial RTL theme for the Jineftin literary magazine - articles, opinions, poetry and PDF books. Full right-to-left Central Kurdish (Sorani) layout with light and dark modes, built on a single typeface and the amber brand colour.
Version: 2.6.4
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: jineftin
Tags: blog, news, rtl-language-support, custom-colors, dark-mode, two-columns, featured-images, threaded-comments
*/

/* =================================================================
   JINEFTIN — Design System
   Brand color extracted from logo: amber #F0A030
   Font: IBM Plex Sans Arabic
   ================================================================= */

/* The site uses a single typeface for CKB — IBM Plex Sans Arabic — across
   both body and display. Literary character comes from weight, scale,
   spacing and ornament rather than a second font. */
@import url('https://fonts.bunny.net/css?family=ibm-plex-sans-arabic:100,200,300,400,500,600,700');

:root {
  /* Brand (from logo) */
  --brand: #f0a030;
  --brand-600: #e08a1c;
  --brand-700: #c5740f;
  --brand-400: #f6b85c;
  --brand-300: #f9cd8a;
  --brand-soft: #fff4e1;

  /* Light theme (warm neutrals) */
  --bg: #fbfaf7;
  --bg-alt: #f4f1ea;
  --surface: #ffffff;
  --surface-2: #faf7f1;
  --text: #1b1813;
  --text-soft: #4d473e;
  --muted: #7a7164;
  --border: #ece6da;
  --border-strong: #ddd5c6;
  --shadow: 0 1px 2px rgba(27,24,19,.04), 0 8px 24px -12px rgba(27,24,19,.12);
  --shadow-lg: 0 4px 12px rgba(27,24,19,.06), 0 24px 48px -16px rgba(27,24,19,.18);
  --ring: rgba(240,160,48,.35);

  --radius: 8px;
  --radius-sm: 5px;
  --radius-lg: 12px;
  --maxw: 1200px;
  --gap: clamp(1rem, 2vw, 1.75rem);
  --header-h: 88px;

  --font: 'IBM Plex Sans Arabic', system-ui, sans-serif;
  /* Display = same family; hierarchy is built from weight & scale, not a serif. */
  --font-display: var(--font);

  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #14110b;
  --bg-alt: #1a160f;
  --surface: #1e1a12;
  --surface-2: #241f16;
  --text: #f3efe6;
  --text-soft: #ccc5b6;
  --muted: #9c9281;
  --border: #2e281d;
  --border-strong: #3a3327;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 28px -14px rgba(0,0,0,.6);
  --shadow-lg: 0 8px 20px rgba(0,0,0,.35), 0 28px 56px -18px rgba(0,0,0,.7);
  --ring: rgba(246,184,92,.4);
  --brand-soft: #2a2114;
  color-scheme: dark;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  /* clip (not hidden) so it doesn't become a scroll container and break sticky header */
  overflow-x: clip;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  text-align: right;
  line-height: 1.75;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  transition: background-color .35s ease, color .35s ease;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--brand-600); }

h1, h2, h3, h4, h5 { line-height: 1.35; font-weight: 700; color: var(--text); letter-spacing: -.01em; }

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

ul, ol { padding-inline-start: 1.4rem; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

::selection { background: var(--brand); color: #1b1813; }

/* ---------- Layout helpers ---------- */
.container { width: min(100% - 2.4rem, var(--maxw)); margin-inline: auto; }
.container-wide { width: min(100% - 2.4rem, 1380px); margin-inline: auto; }
.section { padding-block: clamp(2.5rem, 5vw, 4.5rem); }
.stack > * + * { margin-top: 1rem; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .82rem; font-weight: 600; color: var(--brand-700);
  letter-spacing: .02em;
}
html[data-theme="dark"] .eyebrow { color: var(--brand-400); }

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.8rem; flex-wrap: wrap;
}
.section-head h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  position: relative; padding-bottom: .55rem;
}
.section-head h2::after {
  content: ""; position: absolute; bottom: 0; right: 0;
  width: 52px; height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, var(--brand), var(--brand-300));
}
.section-link {
  font-size: .9rem; font-weight: 600; color: var(--brand-700);
  display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap;
}
html[data-theme="dark"] .section-link { color: var(--brand-400); }
.section-link svg { width: 16px; height: 16px; transition: transform .2s ease; }
.section-link:hover svg { transform: translateX(4px); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .7rem 1.4rem; border-radius: 999px; font-weight: 600; font-size: .95rem;
  background: var(--brand); color: #1b1813; transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  box-shadow: 0 6px 18px -8px rgba(240,160,48,.7);
}
.btn:hover { color: #1b1813; transform: translateY(-2px); background: var(--brand-400); }
.btn-outline {
  background: transparent; color: var(--text); border: 1.5px solid var(--border-strong); box-shadow: none;
}
.btn-outline:hover { color: var(--text); border-color: var(--brand); background: var(--brand-soft); transform: translateY(-2px); }
.btn svg { width: 18px; height: 18px; }

/* =================================================================
   HEADER
   ================================================================= */
/* Header, footer and drawer always use the warm dark palette so the
   amber logo and controls stay high-contrast in both light & dark mode. */
.site-header,
.site-footer,
.mobile-drawer .panel {
  --bg: #14110b;
  --bg-alt: #1c1810;
  --surface: #211c13;
  --surface-2: #271f16;
  --text: #f3efe6;
  --text-soft: #d2cabc;
  --muted: #a99f8e;
  --border: #312b20;
  --border-strong: #423a2c;
  --brand-soft: #2a2114;
  color: var(--text);
}
/* keep active nav + brand bright on the dark bar */
.site-header .primary-nav .current-menu-item > a,
.site-header .primary-nav .current-menu-parent > a,
.site-header .primary-nav .current_page_item > a { color: var(--brand); }
.site-header .brand-text { color: var(--brand); }

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  transition: background .3s ease, box-shadow .3s ease;
}
/* refined amber hairline at the foot of the header */
.site-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--brand) 55%, transparent) 18%,
    color-mix(in srgb, var(--brand) 55%, transparent) 82%, transparent);
}
.site-header.is-scrolled { box-shadow: var(--shadow); }
/* keep the sticky header below the WordPress admin bar when logged in */
.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
.header-inner {
  display: flex; align-items: center; gap: 1.2rem;
  height: var(--header-h);
}
.brand { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; }
.brand img { height: 80px; width: auto; }
.brand .logo-dark { display: none; }
html[data-theme="dark"] .brand .logo-light { display: none; }
html[data-theme="dark"] .brand .logo-dark { display: block; }
.brand-text { font-size: 1.35rem; font-weight: 700; color: var(--brand-600); }
html[data-theme="dark"] .brand-text { color: var(--brand); }

.primary-nav { margin-inline-start: auto; }
.primary-nav ul { display: flex; align-items: center; gap: .15rem; list-style: none; padding: 0; margin: 0; }
.primary-nav > ul > li > a {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .55rem .9rem; font-weight: 500; font-size: 1rem; letter-spacing: .01em;
  color: var(--text-soft); position: relative;
}
/* center-out underline on hover/active */
.primary-nav > ul > li > a::before {
  content: ""; position: absolute; bottom: .35rem; left: 50%; right: 50%; height: 2px;
  border-radius: 2px; background: var(--brand);
  transition: left .25s ease, right .25s ease, opacity .25s ease; opacity: 0;
}
.primary-nav > ul > li > a:hover { color: var(--text); }
.primary-nav > ul > li > a:hover::before { left: .9rem; right: .9rem; opacity: 1; }
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a,
.primary-nav .current-menu-parent > a { color: var(--brand); }
.primary-nav .current-menu-item > a::before,
.primary-nav .current_page_item > a::before,
.primary-nav .current-menu-parent > a::before { left: .9rem; right: .9rem; opacity: 1; }

/* dropdown */
.primary-nav .menu-item-has-children { position: relative; }
.primary-nav .sub-menu {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 220px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); padding: .5rem; list-style: none; margin: 0;
  display: flex; flex-direction: column; gap: 2px;
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: all .2s ease; z-index: 50;
}
.primary-nav .menu-item-has-children:hover > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.primary-nav .sub-menu a { padding: .55rem .8rem; border-radius: 8px; font-size: .92rem; white-space: nowrap; }
.primary-nav .menu-item-has-children > a::after {
  content: ""; width: 6px; height: 6px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); opacity: .55; margin-top: -3px;
  transition: transform .2s ease;
}
.primary-nav .menu-item-has-children:hover > a::after { transform: rotate(-135deg); margin-top: 2px; }

.header-actions { display: flex; align-items: center; gap: .4rem; flex-shrink: 0; }
.header-actions::before { content: ""; width: 1px; height: 26px; background: var(--border); margin-inline-end: .5rem; }
@media (max-width: 768px) { .header-actions::before { display: none; } }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-soft); background: transparent; transition: background .18s ease, color .18s ease, transform .15s ease;
}
.icon-btn:hover { background: var(--bg-alt); color: var(--brand-600); }
.icon-btn:active { transform: scale(.92); }
.icon-btn svg { width: 21px; height: 21px; }

.theme-toggle .moon { display: none; }
html[data-theme="dark"] .theme-toggle .sun { display: none; }
html[data-theme="dark"] .theme-toggle .moon { display: block; }

.nav-toggle { display: none; }

/* Search overlay */
.search-overlay {
  position: fixed; inset: 0; z-index: 200; background: color-mix(in srgb, var(--bg) 92%, #000);
  backdrop-filter: blur(8px); display: flex; align-items: flex-start; justify-content: center;
  padding-top: 18vh; opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s ease;
}
.search-overlay.open { opacity: 1; visibility: visible; }
.search-overlay .search-box { width: min(92%, 620px); }
.search-overlay form { display: flex; align-items: center; gap: .6rem; background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 999px; padding: .5rem .5rem .5rem 1.2rem; box-shadow: var(--shadow-lg); }
.search-overlay input { flex: 1; border: none; background: none; outline: none; font-family: inherit; font-size: 1.15rem; color: var(--text); }
.search-overlay .search-hint { text-align: center; color: var(--muted); margin-top: 1rem; font-size: .9rem; }
.search-close { position: absolute; top: 2rem; left: 2rem; }

/* live AJAX results */
.live-search { display: none; margin-top: .9rem; max-height: min(62vh, 520px); overflow-y: auto; }
.live-search.is-open { display: block; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: .5rem; }
.live-search.is-loading { opacity: .7; }
.live-search .sr-item { display: flex; align-items: center; gap: .85rem; padding: .55rem .65rem; border-radius: var(--radius-sm); }
.live-search .sr-item:hover { background: var(--bg-alt); }
.live-search .sr-thumb { position: relative; width: 54px; height: 54px; border-radius: 10px; overflow: hidden; flex-shrink: 0; background: var(--bg-alt); }
.live-search .sr-thumb img { width: 100%; height: 100%; object-fit: cover; }
.live-search .sr-ph { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, var(--brand-soft), var(--bg-alt)); }
.live-search .sr-pdf { position: absolute; bottom: 3px; inset-inline-start: 3px; background: var(--brand); color: #1b1813;
  font-size: .56rem; font-weight: 700; padding: 0 .28rem; border-radius: 4px; }
.live-search .sr-body { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.live-search .sr-title { font-weight: 600; color: var(--text); font-size: .98rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-search .sr-cat { font-size: .78rem; color: var(--brand-700); }
html[data-theme="dark"] .live-search .sr-cat { color: var(--brand-400); }
.live-search .sr-empty { padding: 1.2rem; text-align: center; color: var(--muted); font-size: .92rem; }
.live-search .sr-all { display: flex; align-items: center; justify-content: center; gap: .4rem; padding: .75rem;
  font-weight: 600; color: var(--brand-700); border-top: 1px solid var(--border); margin-top: .35rem; }
html[data-theme="dark"] .live-search .sr-all { color: var(--brand-400); }
.live-search .sr-all:hover { color: var(--brand-600); }

/* =================================================================
   CARDS
   ================================================================= */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; height: 100%;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.card-thumb { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-alt); display: block; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-thumb img { transform: scale(1.06); }
.card-thumb .placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: var(--brand-300);
  background: linear-gradient(135deg, var(--brand-soft), var(--bg-alt)); }
.card-thumb .placeholder svg { width: 46px; height: 46px; opacity: .6; }
.cat-chip {
  position: absolute; top: .8rem; inset-inline-start: .8rem; z-index: 2;
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(6px);
  color: var(--brand-700); font-size: .76rem; font-weight: 600; padding: .28rem .7rem; border-radius: 999px;
  border: 1px solid var(--border);
}
html[data-theme="dark"] .cat-chip { color: var(--brand); }
.card-body { padding: 1.1rem 1.15rem 1.25rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.card-title { font-size: 1.08rem; line-height: 1.5; font-weight: 600; }
.card-title a:hover { color: var(--brand-600); }
.card-excerpt { color: var(--muted); font-size: .92rem; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { margin-top: auto; display: flex; align-items: center; gap: .6rem; font-size: .82rem; color: var(--muted); padding-top: .35rem; }
.card-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .5; }
.card-meta .author { color: var(--text-soft); font-weight: 500; }

/* compact list card */
.card-row { display: flex; gap: .9rem; align-items: flex-start; padding: .65rem 0; border-bottom: 1px solid var(--border); }
.card-row:last-child { border-bottom: none; }
.card-row .num { font-size: 1.6rem; font-weight: 700; color: var(--border-strong); line-height: 1; flex-shrink: 0; min-width: 1.6rem; }
.card-row .card-row-body { display: flex; flex-direction: column; gap: .25rem; }
.card-row .card-title { font-size: 1rem; }
.card-row .card-meta { padding-top: 0; }

/* =================================================================
   GRIDS
   ================================================================= */
.grid { display: grid; gap: var(--gap); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.card { min-width: 0; }

/* =================================================================
   ART-DIRECTED HOMEPAGE
   Each section is its OWN module — a magazine art-directs, it does not
   stamp one card grid six times. Cover · ink poem band · asymmetric
   feature · book shelf · typographic index · visual gallery · amber CTA.
   One typeface, amber + warm neutrals, RTL.
   ================================================================= */

/* full-bleed bands flip to the warm-dark / tinted palettes */
.band-ink {
  --bg:#14110b; --bg-alt:#1c1810; --surface:#211c13; --surface-2:#271f16;
  --text:#f3efe6; --text-soft:#d2cabc; --muted:#a99f8e; --border:#332c20; --border-strong:#473d2d;
  background:#14110b; color:var(--text);
}
.band-soft { background: var(--bg-alt); }
/* keep the ink band visibly distinct even in dark mode */
html[data-theme="dark"] .band-ink { background: #1d1810; border-block: 1px solid #2c2417; }

/* shared module header: a numbered ink rule, adapts to any band */
.mod { padding-block: clamp(2.6rem, 6vw, 4.6rem); }
.mod-head { display:flex; align-items:flex-end; justify-content:space-between; gap:1rem; flex-wrap:wrap;
  border-bottom:1px solid var(--border); padding-bottom:.75rem; margin-bottom: clamp(1.6rem, 3vw, 2.4rem); }
.mod-head .ttl { display:flex; align-items:baseline; gap:.7rem; }
.mod-head .ttl .num { font-size:.95rem; font-weight:700; color:var(--brand); direction:ltr; font-variant-numeric:tabular-nums; }
.mod-head h2 { font-size: clamp(1.4rem, 3vw, 2rem); line-height:1.1; }
.mod-head .all { display:inline-flex; align-items:center; gap:.35rem; font-size:.9rem; font-weight:700; color:var(--brand-700); }
html[data-theme="dark"] .mod-head .all,
.band-ink .mod-head .all { color:var(--brand); }
.mod-head .all svg { width:16px; height:16px; transition:transform .2s ease; }
.mod-head .all:hover svg { transform:translateX(4px); }

/* shared numbered headline list (used by the feature) */
.hl-list { list-style:none; margin:0; padding:0; counter-reset:hl; }
.hl-list li { counter-increment:hl; border-bottom:1px solid var(--border); }
.hl-list li:last-child { border-bottom:none; }
.headline { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:0 .9rem; align-items:center; padding:.85rem 0; }
.hl-num { font-size:.8rem; font-weight:700; color:var(--brand); direction:ltr; font-variant-numeric:tabular-nums; }
.hl-thumb, .ix-thumb { flex-shrink:0; border-radius:var(--radius-sm); overflow:hidden; background:var(--bg-alt); }
.hl-thumb { width:66px; height:66px; }
.ix-thumb { display:block; width:60px; height:60px; }
.hl-thumb img, .hl-thumb .hl-av, .ix-thumb img, .ix-thumb .hl-av { display:block; width:100%; height:100%; object-fit:cover; transition:transform .5s cubic-bezier(.2,.7,.2,1); }
.headline:hover .hl-thumb img, .index-item:hover .ix-thumb img { transform:scale(1.05); }
.hl-thumb .avatar-fallback, .ix-thumb .avatar-fallback { display:grid; place-items:center; background:var(--brand-soft); color:var(--brand-700); font-weight:700; font-size:1.4rem; }
html[data-theme="dark"] .hl-thumb .avatar-fallback, html[data-theme="dark"] .ix-thumb .avatar-fallback { color:var(--brand); }
.hl-thumb .placeholder, .ix-thumb .placeholder { width:100%; height:100%; display:grid; place-items:center; color:var(--brand-300); background:linear-gradient(135deg,var(--brand-soft),var(--bg-alt)); }
.hl-num::before { content: counter(hl, decimal-leading-zero); }
.hl-body { min-width:0; }
.hl-cat { font-size:.72rem; font-weight:600; color:var(--brand-700); }
html[data-theme="dark"] .hl-cat { color:var(--brand-400); }
.hl-title { display:block; font-size:1.04rem; font-weight:600; line-height:1.45; margin-top:.15rem; color:var(--text); transition:color .18s ease; }
.headline:hover .hl-title { color:var(--brand-700); }
html[data-theme="dark"] .headline:hover .hl-title { color:var(--brand-400); }
.hl-date { display:block; margin-top:.3rem; font-size:.76rem; color:var(--muted); }

/* ===== 1 · COVER ============================================== */
.cover { padding-block: clamp(1.6rem,4vw,3rem) clamp(2.6rem,6vw,4.5rem); }

/* overlay mosaic — featured + latest as image cards with text on the photo */
.mosaic {
  display:grid; grid-template-columns:1.35fr 1.35fr 1fr; grid-template-rows:1fr 1fr;
  gap:clamp(.8rem,1.6vw,1.2rem); min-height:clamp(380px, 50vw, 560px);
}
.mtile { position:relative; display:block; overflow:hidden; border-radius:var(--radius); background:var(--bg-alt); min-height:0; }
.mtile:nth-child(1) { grid-column:1; grid-row:1 / span 2; }
.mtile:nth-child(2) { grid-column:2; grid-row:1 / span 2; }
.mtile:nth-child(3) { grid-column:3; grid-row:1; }
.mtile:nth-child(4) { grid-column:3; grid-row:2; }
.mtile > img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; transition:transform .7s cubic-bezier(.2,.7,.2,1); }
.mtile:hover > img { transform:scale(1.05); }
.mtile .m-ph { position:absolute; inset:0; display:grid; place-items:center; color:var(--brand-300); background:linear-gradient(135deg, var(--brand-soft), var(--bg-alt)); }
.mtile .scrim { position:absolute; inset:0; background:linear-gradient(to top, rgba(15,12,8,.92) 0%, rgba(15,12,8,.4) 42%, rgba(15,12,8,0) 72%); }
.mtile .body { position:absolute; inset:auto 0 0 0; z-index:2; padding:clamp(1rem,2vw,1.7rem); }
.mtile .k { display:inline-flex; align-items:center; gap:.45rem; color:#fff; font-size:.74rem; font-weight:700; }
.mtile .k::before { content:""; width:7px; height:7px; border-radius:50%; background:var(--brand); }
.mtile h3 { color:#fff; font-weight:700; line-height:1.22; margin-top:.45rem; font-size:clamp(1.02rem,1.5vw,1.25rem); }
.mtile:nth-child(1) h3, .mtile:nth-child(2) h3 { font-size:clamp(1.35rem,2.3vw,2.05rem); }
.mtile .m-meta { display:flex; align-items:center; gap:.55rem; margin-top:.85rem; color:rgba(255,255,255,.85); font-size:.82rem; }
.mtile .m-by { color:#fff; font-weight:700; }
.mtile .m-sep { width:3px; height:3px; border-radius:50%; background:rgba(255,255,255,.5); flex-shrink:0; }
.mtile .m-meta > .m-btn + .m-by { margin-inline-start:.15rem; }
.mtile .m-btn { width:38px; height:38px; border-radius:50%; background:var(--brand); color:#1b1813; display:grid; place-items:center; flex-shrink:0; transition:transform .2s ease; }
.mtile:hover .m-btn { transform:scale(1.08); }
.mtile .m-btn svg { width:16px; height:16px; }
.mtile .feat { position:absolute; top:1rem; inset-inline-start:1rem; z-index:3; display:inline-flex; align-items:center; gap:.4rem;
  background:var(--brand); color:#1b1813; font-size:.72rem; font-weight:700; padding:.35rem .8rem; border-radius:999px; }
.mtile .feat svg { width:14px; height:14px; }

.coverlines { margin-top:clamp(2rem,4.5vw,3rem); border-top:1px solid var(--border-strong); padding-top:clamp(1.4rem,3vw,2rem); display:grid; grid-template-columns:repeat(4,1fr); gap:clamp(.8rem,1.6vw,1.1rem); counter-reset:cl; }
.coverline { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:.85rem;
  padding:.65rem; background:var(--surface-2); border:1px solid var(--border); border-radius:18px;
  counter-increment:cl; transition:border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.coverline:hover { border-color:color-mix(in srgb, var(--brand) 40%, var(--border)); box-shadow:var(--shadow); transform:translateY(-2px); }
.cl-thumb { position:relative; width:62px; height:62px; flex-shrink:0; }
.cl-img { display:block; width:100%; height:100%; border-radius:50%; overflow:hidden; background:var(--bg-alt); }
.cl-img img { width:100%; height:100%; object-fit:cover; transition:transform .5s cubic-bezier(.2,.7,.2,1); }
.coverline:hover .cl-img img { transform:scale(1.06); }
.cl-img .placeholder { width:100%; height:100%; display:grid; place-items:center; color:var(--brand-300); background:linear-gradient(135deg, var(--brand-soft), var(--bg-alt)); }
.cl-body { min-width:0; padding-inline-end:.35rem; }
.coverline .t { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
  font-size:.95rem; font-weight:700; line-height:1.35; color:var(--text); }
.coverline:hover .t { color:var(--brand-700); }
html[data-theme="dark"] .coverline:hover .t { color:var(--brand-400); }
.cl-meta { display:block; margin-top:.3rem; font-size:.74rem; color:var(--muted); }
.cl-by { font-weight:600; color:var(--text-soft); }
.coverline:hover .t { color:var(--brand-700); }
html[data-theme="dark"] .coverline:hover .t { color:var(--brand-400); }

/* ===== 2 · POEM BAND (ink, full-bleed) ======================== */
.poem-band { padding-block:clamp(3rem,7vw,5.5rem); text-align:center; }
.poem-band .mark { display:flex; justify-content:center; color:var(--brand); margin-bottom:1rem; }
.poem-band .label { font-size:.8rem; font-weight:700; color:var(--brand); }
.poem-band .q { font-size:clamp(1.7rem,4vw,3rem); font-weight:300; line-height:1.5; max-width:24ch; margin:1rem auto 0; color:var(--text); }
.poem-band .q a:hover { color:var(--brand); }
.poem-band .by { margin-top:1.5rem; color:var(--brand); font-weight:600; }
.poem-band .more-row { margin-top:2.4rem; padding-top:1.5rem; border-top:1px solid var(--border); display:flex; gap:1.4rem 2.4rem; justify-content:center; flex-wrap:wrap; }
.poem-band .more-row a { color:var(--text-soft); font-weight:500; font-size:.95rem; }
.poem-band .more-row a:hover { color:var(--brand); }

/* ===== 3 · ARTICLES FEATURE (asymmetric) ====================== */
.feature-grid { display:grid; grid-template-columns:minmax(0,1.45fr) minmax(0,1fr); gap:clamp(1.6rem,4vw,3rem); align-items:start; }
.feature-lead { min-width:0; }
.feature-lead .img { display:block; aspect-ratio:16/10; overflow:hidden; border-radius:var(--radius); background:var(--bg-alt); margin-bottom:1.1rem; }
.feature-lead .img img { width:100%; height:100%; object-fit:cover; transition:transform .6s cubic-bezier(.2,.7,.2,1); }
.feature-lead:hover .img img { transform:scale(1.04); }
.feature-lead .img .placeholder { width:100%; height:100%; display:grid; place-items:center; color:var(--brand-300); background:linear-gradient(135deg, var(--brand-soft), var(--bg-alt)); }
.feature-lead .k { font-size:.74rem; font-weight:700; color:var(--brand-700); }
html[data-theme="dark"] .feature-lead .k { color:var(--brand-400); }
.feature-lead h3 { font-size:clamp(1.5rem,2.8vw,2.2rem); line-height:1.18; font-weight:700; letter-spacing:-.01em; margin-top:.4rem; }
.feature-lead h3 a:hover { color:var(--brand-700); }
html[data-theme="dark"] .feature-lead h3 a:hover { color:var(--brand-400); }
.feature-lead p { color:var(--text-soft); margin-top:.7rem; max-width:54ch; line-height:1.8; }

/* ===== 4 · BOOK SHELF (tinted band) =========================== */
.shelf-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:clamp(1rem,2.5vw,1.8rem); }

/* ===== 5 · STORIES INDEX (typographic, no images) ============= */
.index-grid { display:grid; grid-template-columns:1fr 1fr; gap:0 clamp(2rem,5vw,4rem); counter-reset:idx; }
.index-item { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:1.1rem; align-items:center; padding:1.15rem 0; border-bottom:1px solid var(--border); counter-increment:idx; }
.index-item .n { font-size:2rem; font-weight:200; color:var(--brand); direction:ltr; line-height:1; font-variant-numeric:tabular-nums; }
.index-item .n::before { content: counter(idx, decimal-leading-zero); }
.index-item h3 { font-size:1.18rem; font-weight:700; line-height:1.35; }
.index-item h3 a:hover { color:var(--brand-700); }
html[data-theme="dark"] .index-item h3 a:hover { color:var(--brand-400); }
.index-item .meta { font-size:.8rem; color:var(--muted); margin-top:.35rem; }

/* ===== 6 · ART GALLERY (visual, asymmetric) =================== */
.art-grid { display:grid; grid-template-columns:repeat(4,1fr); grid-auto-rows:1fr; gap:clamp(.8rem,2vw,1.4rem); }
.art-tile { position:relative; display:block; overflow:hidden; border-radius:var(--radius); background:var(--bg-alt); aspect-ratio:1; }
.art-tile:first-child { grid-column:span 2; grid-row:span 2; }
.art-tile img { width:100%; height:100%; object-fit:cover; transition:transform .6s cubic-bezier(.2,.7,.2,1); }
.art-tile:hover img { transform:scale(1.05); }
.art-tile .placeholder { width:100%; height:100%; display:grid; place-items:center; color:var(--brand-300); background:linear-gradient(135deg, var(--brand-soft), var(--bg-alt)); }
.art-tile .cap { position:absolute; inset:auto 0 0 0; padding:1rem 1.1rem; background:linear-gradient(to top, rgba(15,12,8,.9), rgba(15,12,8,0)); }
.art-tile .cap .k { color:var(--brand); font-size:.7rem; font-weight:700; }
.art-tile .cap h3 { color:#fff; font-size:1rem; font-weight:700; line-height:1.3; margin-top:.2rem; }
.art-tile:first-child .cap h3 { font-size:clamp(1.1rem,2vw,1.5rem); }

/* ===== 7 · CTA (amber, full-bleed) ============================ */
.cta-band { background:var(--brand); color:#1b1813; text-align:center; padding-block:clamp(3rem,7vw,5.5rem); }
.cta-band h2 { color:#1b1813; font-size:clamp(1.7rem,4vw,3rem); line-height:1.15; max-width:20ch; margin-inline:auto; }
.cta-band p { color:#3a2c10; max-width:52ch; margin:1rem auto 1.9rem; font-size:1.1rem; }
.cta-band .btn { background:#1b1813; color:#fff; box-shadow:none; }
.cta-band .btn:hover { background:#000; color:#fff; transform:translateY(-2px); }

/* ---- homepage responsive ---- */
@media (max-width: 960px) {
  .mosaic { grid-template-columns:1fr 1fr; grid-template-rows:none; min-height:0; }
  .mtile { aspect-ratio:1; }
  .mtile:nth-child(1) { grid-column:1 / span 2; grid-row:auto; aspect-ratio:16/10; }
  .mtile:nth-child(2), .mtile:nth-child(3), .mtile:nth-child(4) { grid-column:auto; grid-row:auto; }
  .feature-grid { grid-template-columns:1fr; }
  .index-grid { grid-template-columns:1fr; }
  .shelf-grid { grid-template-columns:repeat(3,1fr); }
  .art-grid { grid-template-columns:repeat(2,1fr); }
  .art-tile:first-child { grid-column:span 2; grid-row:span 1; aspect-ratio:16/9; }
  .coverlines { grid-template-columns:repeat(2,1fr); }
}
/* hero mosaic → horizontal swipe slider on mobile */
@media (max-width: 768px) {
  .mosaic {
    grid-template-columns:none; grid-template-rows:none; min-height:0;
    grid-auto-flow:column; grid-auto-columns:82%; gap:1rem;
    overflow-x:auto; scroll-snap-type:x mandatory; -webkit-overflow-scrolling:touch;
    scrollbar-width:none; padding-bottom:.5rem;
  }
  .mosaic::-webkit-scrollbar { display:none; }
  .mtile,
  .mtile:nth-child(1), .mtile:nth-child(2), .mtile:nth-child(3), .mtile:nth-child(4) {
    grid-column:auto; grid-row:auto; aspect-ratio:4/5; scroll-snap-align:start;
  }
}
@media (max-width: 560px) {
  .mtile, .mtile:nth-child(1) { aspect-ratio:4/5; }
  .shelf-grid { grid-template-columns:repeat(2,1fr); }
  .coverlines { grid-template-columns:1fr; }
  .art-grid { grid-template-columns:1fr; }
  .art-tile, .art-tile:first-child { aspect-ratio:16/10; grid-column:auto; }
}

/* =================================================================
   MOBILE SLIDERS (horizontal scroll-snap)
   ================================================================= */
.slider {
  display: grid; grid-auto-flow: column; gap: 1rem;
  overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
  padding-bottom: .5rem;
}
.slider::-webkit-scrollbar { display: none; }
.slider > * { scroll-snap-align: start; }

/* =================================================================
   BOOKS / PDF cards
   ================================================================= */
.book-card { text-align: center; }
.book-cover {
  aspect-ratio: 2 / 3; border-radius: var(--radius-sm); overflow: hidden; position: relative;
  box-shadow: var(--shadow-lg); background: linear-gradient(135deg, var(--brand-soft), var(--bg-alt));
  margin-bottom: .8rem; transition: transform .3s ease;
}
.book-card:hover .book-cover { transform: translateY(-6px) rotate(-1deg); }
.book-cover img { width: 100%; height: 100%; object-fit: cover; }
.book-cover .placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: var(--brand); }
.book-cover .pdf-badge { position: absolute; top: .6rem; inset-inline-start: .6rem; background: var(--brand);
  color: #1b1813; font-size: .68rem; font-weight: 700; padding: .2rem .55rem; border-radius: 6px; }
.book-card .card-title { font-size: 1rem; }
.book-card .book-author { font-size: .85rem; color: var(--muted); }

/* =================================================================
   SINGLE POST
   ================================================================= */
.single-hero { padding-block: clamp(1.5rem, 4vw, 3rem) 1rem; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: .85rem; color: var(--muted); margin-bottom: 1.2rem; }
.breadcrumb a:hover { color: var(--brand-600); }
.breadcrumb .sep { opacity: .5; }
.article { width: min(100% - 2.4rem, 760px); margin-inline: auto; }
.article-header { text-align: center; margin-bottom: 1.8rem; }
.article-cats { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1rem; }
.article-cats a { background: var(--brand-soft); color: var(--brand-700); font-size: .82rem; font-weight: 600; padding: .3rem .85rem; border-radius: 999px; }
html[data-theme="dark"] .article-cats a { color: var(--brand); }
.article-title { font-size: clamp(1.8rem, 4.5vw, 3rem); line-height: 1.25; }
.article-subtitle { font-size: clamp(1.05rem, 2.4vw, 1.4rem); color: var(--muted); font-weight: 400; margin-top: .7rem; }
.article-meta { display: flex; align-items: center; justify-content: center; gap: .9rem; flex-wrap: wrap;
  color: var(--muted); font-size: .9rem; margin-top: 1.3rem; }
.article-meta > span { display: inline-flex; align-items: center; gap: .4rem; }
.article-meta svg { flex-shrink: 0; }
.article-meta .dot { display: none; }
.article-meta .author-mini { display: inline-flex; align-items: center; gap: .5rem; color: var(--text-soft); font-weight: 600; }
.article-meta .author-mini img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.featured-wrap { width: min(100% - 2.4rem, 980px); margin: 0 auto clamp(1.5rem, 4vw, 2.5rem); text-align: center; }
/* landscape covers fill the width; tall (portrait book) covers are capped + centered */
.featured-wrap img { display: block; margin-inline: auto; width: auto; height: auto; max-width: 100%; max-height: 660px; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.featured-wrap figcaption { text-align: center; color: var(--muted); font-size: .85rem; margin-top: .6rem; }

/* PDF / translator info box */
.book-meta-box {
  display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.1rem 1.3rem; margin-bottom: 1.8rem;
}
.book-meta-box .meta-items { display: flex; flex-wrap: wrap; gap: 1.4rem; }
.book-meta-box .meta-item { display: flex; flex-direction: column; gap: .1rem; }
.book-meta-box .meta-item .label { font-size: .78rem; color: var(--muted); }
.book-meta-box .meta-item .value { font-weight: 600; color: var(--text); }
.pdf-download {
  display: inline-flex; align-items: center; gap: .6rem; background: var(--brand); color: #1b1813;
  font-weight: 700; padding: .8rem 1.5rem; border-radius: 999px; box-shadow: 0 8px 20px -8px rgba(240,160,48,.7);
  transition: transform .15s ease, background .2s ease;
}
.pdf-download:hover { color: #1b1813; transform: translateY(-2px); background: var(--brand-400); }
.pdf-download svg { width: 20px; height: 20px; }

/* content typography */
.entry-content { font-size: 1.12rem; line-height: 2.05; color: var(--text-soft); }
.entry-content > * + * { margin-top: 1.4rem; }
.entry-content p { margin: 0; }
.entry-content h2 { font-size: 1.6rem; margin-top: 2.4rem; color: var(--text); }
.entry-content h3 { font-size: 1.3rem; margin-top: 2rem; color: var(--text); }
.entry-content a { color: var(--brand-700); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--brand-300); }
html[data-theme="dark"] .entry-content a { color: var(--brand-400); }
.entry-content img { border-radius: var(--radius); margin-inline: auto; box-shadow: var(--shadow); }
.entry-content blockquote {
  border-inline-start: 4px solid var(--brand); background: var(--surface-2);
  padding: 1rem 1.4rem; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 1.25rem; line-height: 1.9; color: var(--text); font-weight: 500;
}
.entry-content blockquote p { margin: 0; }
.entry-content ul, .entry-content ol { padding-inline-start: 1.6rem; }
.entry-content li + li { margin-top: .5rem; }
.entry-content figure { margin-inline: auto; }
/* poetry friendly */
.entry-content .poem, .entry-content pre { white-space: pre-wrap; font-family: var(--font); text-align: center; font-size: 1.2rem; line-height: 2.2; }

/* gallery */
.post-gallery { width: min(100% - 2.4rem, 980px); margin: 2.5rem auto; }
/* carousel */
.gallery-carousel { position: relative; }
.gal-track { display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: .4rem; scroll-behavior: smooth; }
.gal-track::-webkit-scrollbar { display: none; }
.gal-item { flex: 0 0 auto; width: clamp(220px, 32%, 320px); aspect-ratio: 1; border: none; padding: 0;
  border-radius: var(--radius-sm); overflow: hidden; scroll-snap-align: start; cursor: zoom-in;
  background: var(--bg-alt); position: relative; }
.gal-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.gal-item:hover img { transform: scale(1.07); }
.gal-zoom { position: absolute; inset: 0; display: grid; place-items: center; color: #fff;
  background: rgba(15,12,8,.32); opacity: 0; transition: opacity .25s ease; }
.gal-item:hover .gal-zoom { opacity: 1; }
.gal-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 44px; height: 44px; border-radius: 50%; background: var(--surface); color: var(--text-soft);
  border: 1px solid var(--border); box-shadow: var(--shadow); display: grid; place-items: center; transition: all .18s ease; }
.gal-nav:hover { background: var(--brand); color: #1b1813; border-color: var(--brand); }
.gal-prev { right: -8px; }
.gal-next { left: -8px; }
.gal-next svg { transform: rotate(180deg); }
@media (max-width: 600px) { .gal-item { width: 78%; } .gal-nav { display: none; } }

/* lightbox */
.lightbox { position: fixed; inset: 0; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 400;
  background: rgba(10,8,5,.95); display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s ease; }
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox .lb-stage { margin: 0; max-width: 92vw; max-height: 86vh; display: flex; }
.lightbox .lb-stage img { max-width: 92vw; max-height: 86vh; width: auto; height: auto;
  border-radius: 10px; box-shadow: 0 24px 70px rgba(0,0,0,.6); }
.lightbox .lb-btn { position: absolute; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18);
  color: #fff; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  backdrop-filter: blur(6px); transition: background .18s ease; }
.lightbox .lb-btn:hover { background: var(--brand); color: #1b1813; border-color: var(--brand); }
.lightbox .lb-close { top: 1.4rem; left: 1.4rem; }
.lightbox .lb-prev { right: 1.4rem; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { left: 1.4rem; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next svg { transform: rotate(180deg); }
.lightbox .lb-counter { position: absolute; bottom: 1.4rem; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.8); font-size: .9rem; letter-spacing: .03em; direction: ltr; }
@media (max-width: 600px) { .lightbox .lb-btn { width: 44px; height: 44px; } .lightbox .lb-prev { right: .6rem; } .lightbox .lb-next { left: .6rem; } }

/* downloads repeater */
.downloads-box { width: min(100% - 2.4rem, 760px); margin: 2.5rem auto; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; }
.downloads-box h3 { display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.download-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--border); }
.download-row:last-child { border-bottom: none; }
.download-row .dl-name { display: flex; align-items: center; gap: .6rem; font-weight: 500; }
.download-row .dl-name svg { width: 22px; height: 22px; color: var(--brand); flex-shrink: 0; }
.download-row .dl-btn { color: var(--brand-700); font-weight: 600; font-size: .9rem; display: inline-flex; gap: .35rem; align-items: center; white-space: nowrap; }

/* author box */
.author-box { width: min(100% - 2.4rem, 760px); margin: 2.8rem auto; display: flex; gap: 1.2rem; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.author-box .avatar { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 3px solid var(--brand-soft); }
.author-box .avatar-fallback { display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-700); font-size: 1.8rem; font-weight: 700; }
.author-box .ab-body { flex: 1; }
.author-box .ab-role { font-size: .8rem; color: var(--brand-700); font-weight: 600; }
html[data-theme="dark"] .author-box .ab-role { color: var(--brand); }
.author-box .ab-name { font-size: 1.25rem; font-weight: 700; }
.author-box .ab-bio { color: var(--muted); font-size: .95rem; margin-top: .4rem; }
.author-box .ab-link { margin-top: .7rem; display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; color: var(--brand-700); font-size: .9rem; }

/* share */
.share-row { width: min(100% - 2.4rem, 760px); margin: 2rem auto 0; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.share-row .label { font-weight: 600; color: var(--muted); font-size: .9rem; }
.share-row a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-soft); }
.share-row a:hover { background: var(--brand); color: #1b1813; border-color: var(--brand); }
.share-row svg { width: 18px; height: 18px; }

/* tags */
.post-tags { width: min(100% - 2.4rem, 760px); margin: 1.6rem auto 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.post-tags a { font-size: .82rem; color: var(--text-soft); background: var(--bg-alt); padding: .3rem .8rem; border-radius: 999px; }
.post-tags a:hover { background: var(--brand-soft); color: var(--brand-700); }

/* related */
.related { background: var(--bg-alt); }

/* =================================================================
   ARCHIVE / CATEGORY / AUTHOR HEADERS
   ================================================================= */
.page-hero { background: var(--bg-alt); border-bottom: 1px solid var(--border); padding-block: clamp(2.2rem, 5vw, 3.6rem); text-align: center; }
.page-hero .eyebrow { justify-content: center; }
.page-hero h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); margin-top: .4rem; }
.page-hero .desc { color: var(--muted); max-width: 600px; margin: .8rem auto 0; }
.page-hero .count-pill { display: inline-block; margin-top: 1rem; background: var(--surface); border: 1px solid var(--border);
  padding: .35rem 1rem; border-radius: 999px; font-size: .85rem; color: var(--text-soft); }

/* author profile header */
.author-hero { display: flex; gap: 1.5rem; align-items: center; justify-content: center; text-align: center; flex-direction: column; }
.author-hero .big-avatar { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; border: 4px solid var(--surface); box-shadow: var(--shadow-lg); }
.author-hero .big-avatar.avatar-fallback { display: grid; place-items: center; background: var(--brand); color: #1b1813; font-size: 2.6rem; font-weight: 700; }
.author-hero .social { display: flex; gap: .5rem; justify-content: center; margin-top: .4rem; }
.author-hero .social a { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); }
.author-hero .social a:hover { background: var(--brand); color: #1b1813; }
.author-hero .social svg { width: 17px; height: 17px; }

/* category pills row */
.term-pills { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-top: 1.2rem; }
.term-pills a { background: var(--surface); border: 1px solid var(--border); padding: .4rem 1rem; border-radius: 999px; font-size: .88rem; color: var(--text-soft); font-weight: 500; }
.term-pills a:hover, .term-pills a.active { background: var(--brand); color: #1b1813; border-color: var(--brand); }

/* =================================================================
   PAGINATION
   ================================================================= */
.pagination { display: flex; justify-content: center; gap: .4rem; margin-top: 3rem; flex-wrap: wrap; }
.pagination .page-numbers {
  min-width: 44px; height: 44px; padding: 0 .8rem; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border); font-weight: 600; color: var(--text-soft);
}
.pagination .page-numbers:hover { border-color: var(--brand); color: var(--brand-700); }
.pagination .page-numbers.current { background: var(--brand); color: #1b1813; border-color: var(--brand); }
.pagination .dots { border: none; background: none; }

/* =================================================================
   CONTACT / ABOUT
   ================================================================= */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.contact-info .info-item { display: flex; gap: .9rem; align-items: flex-start; padding: 1rem 0; border-bottom: 1px solid var(--border); }
.contact-info .info-item:last-child { border-bottom: none; }
.contact-info .ic { width: 46px; height: 46px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-700); display: grid; place-items: center; flex-shrink: 0; }
html[data-theme="dark"] .contact-info .ic { color: var(--brand); }
.contact-info .ic svg { width: 22px; height: 22px; }
.contact-info .it-label { font-size: .82rem; color: var(--muted); }
.contact-info .it-value { font-weight: 600; display: block; }
.contact-info a.it-value:hover { color: var(--brand-700); }
html[data-theme="dark"] .contact-info a.it-value:hover { color: var(--brand); }
.contact-info a.it-value + a.it-value { margin-top: .2rem; }
.contact-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(1.4rem, 3vw, 2.2rem); box-shadow: var(--shadow); }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .45rem; }
.field input, .field textarea, .field select {
  width: 100%; padding: .85rem 1rem; border-radius: var(--radius-sm); border: 1.5px solid var(--border-strong);
  background: var(--bg); color: var(--text); font-family: inherit; font-size: 1rem; transition: border-color .18s ease, box-shadow .18s ease;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring); }
/* custom, fully-localised file control (native button text isn't translatable) */
.file-input { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.file-input .file-native { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.file-btn {
  display: inline-flex; align-items: center; gap: .5rem; flex-shrink: 0;
  font-family: inherit; font-weight: 600; font-size: .9rem; cursor: pointer;
  padding: .6rem 1.1rem; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-strong); background: var(--bg-alt); color: var(--text);
  transition: border-color .18s ease, color .18s ease, background .18s ease;
}
.file-btn:hover { border-color: var(--brand); color: var(--brand-700); background: var(--brand-soft); }
.file-btn svg { width: 16px; height: 16px; }
.file-name { color: var(--muted); font-size: .9rem; min-width: 0; }
.file-input.has-files .file-name { color: var(--text); font-weight: 600; }
.field-hint { font-size: .8rem; color: var(--muted); margin-top: .45rem; }
/* contact status note */
.form-note { padding: 1rem 1.2rem; border-radius: var(--radius-sm); margin-bottom: 1.4rem; font-weight: 600; }
.form-note.is-ok { background: var(--brand-soft); border: 1px solid var(--brand-300); color: var(--brand-700); }
.form-note.is-err { background: #fde8e8; border: 1px solid #f5b5b5; color: #b42318; }
/* honeypot — off-screen, hidden from everyone but bots */
.jin-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* about */
.about-lead { font-size: clamp(1.15rem, 2.6vw, 1.5rem); line-height: 1.8; color: var(--text); font-weight: 400; }
.value-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--gap); margin-top: 2rem; }
.value-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.6rem; }
.value-card .vc-ic { width: 52px; height: 52px; border-radius: 14px; background: var(--brand-soft); color: var(--brand-700); display: grid; place-items: center; margin-bottom: 1rem; }
html[data-theme="dark"] .value-card .vc-ic { color: var(--brand); }
.value-card .vc-ic svg { width: 26px; height: 26px; }
.value-card h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.value-card p { color: var(--muted); font-size: .95rem; }
.stats-row { display: grid; grid-template-columns: repeat(4,1fr); gap: var(--gap); text-align: center; }
.stat .num { font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; color: var(--brand-600); line-height: 1; }
html[data-theme="dark"] .stat .num { color: var(--brand); }
.stat .lbl { color: var(--muted); margin-top: .4rem; font-size: .92rem; }

/* =================================================================
   SIDEBAR widgets (generic)
   ================================================================= */
.layout-with-side { display: grid; grid-template-columns: 1fr 320px; gap: clamp(1.5rem,4vw,3rem); align-items: start; }
.widget { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem; margin-bottom: 1.4rem; }
.widget .widget-title { font-size: 1.05rem; margin-bottom: 1rem; position: relative; padding-bottom: .5rem; }
.widget .widget-title::after { content:""; position:absolute; bottom:0; right:0; width:36px; height:3px; border-radius:3px; background: var(--brand); }
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget ul li { padding: .5rem 0; border-bottom: 1px dashed var(--border); }
.widget ul li:last-child { border-bottom: none; }
.widget ul li a { display: flex; justify-content: space-between; gap: .5rem; color: var(--text-soft); }
.widget ul li a:hover { color: var(--brand-700); }
.widget .badge { background: var(--bg-alt); color: var(--muted); font-size: .75rem; padding: .1rem .5rem; border-radius: 999px; flex-shrink: 0; }

/* =================================================================
   FOOTER
   ================================================================= */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--border); margin-top: 4rem; }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: 2rem; padding-block: clamp(2.5rem,5vw,3.5rem); }
.footer-brand img { height: 66px; margin-bottom: 1rem; }
.footer-brand .logo-dark { display: none; }
html[data-theme="dark"] .footer-brand .logo-light { display: none; }
html[data-theme="dark"] .footer-brand .logo-dark { display: block; }
.footer-brand p { color: var(--muted); font-size: .95rem; max-width: 320px; }
.footer-col h4 { font-size: 1rem; margin-bottom: 1rem; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .6rem; }
.footer-col a { color: var(--text-soft); font-size: .95rem; }
.footer-col a:hover { color: var(--brand-700); }
.footer-social { display: flex; gap: .6rem; margin-top: 1.2rem; }
.footer-social a { width: 42px; height: 42px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); display: grid; place-items: center; color: var(--text-soft); }
.footer-social a:hover { background: var(--brand); color: #1b1813; border-color: var(--brand); }
.footer-social svg { width: 19px; height: 19px; }
.footer-news { display: flex; gap: .5rem; margin-top: 1rem; }
.footer-news input { flex: 1; padding: .7rem .9rem; border-radius: 999px; border: 1.5px solid var(--border-strong); background: var(--surface); color: var(--text); font-family: inherit; }
.footer-news button { flex-shrink: 0; }
.footer-bottom { border-top: 1px solid var(--border); padding-block: 1.3rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; color: var(--muted); font-size: .88rem; }
.footer-bottom .heart { color: var(--brand); }
.footer-credit { display: inline-flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.footer-credit a { color: var(--text-soft); font-weight: 600; }
.footer-credit a:hover { color: var(--brand-700); }
html[data-theme="dark"] .footer-credit a:hover { color: var(--brand); }
.footer-credit .credit-sep { color: var(--border-strong); font-size: .8rem; user-select: none; }
.footer-credit .wp-thanks { font-size: .62rem; font-weight: 500; color: var(--muted); opacity: .7; }
.footer-credit .wp-thanks:hover { opacity: 1; color: var(--brand-700); }

/* =================================================================
   404 / no results
   ================================================================= */
.empty-state { text-align: center; padding-block: clamp(3rem,8vw,6rem); }
.empty-state .big { font-size: clamp(4rem, 14vw, 9rem); font-weight: 700; color: var(--brand); line-height: 1; }
.empty-state h1 { font-size: clamp(1.5rem,3.5vw,2.2rem); margin: 1rem 0 .6rem; }
.empty-state p { color: var(--muted); max-width: 460px; margin: 0 auto 1.6rem; }

/* =================================================================
   COMMENTS
   ================================================================= */
.comments-area { width: min(100% - 2.4rem, 760px); margin: 3rem auto 0; }
.comments-area .comments-title { font-size: 1.4rem; margin-bottom: 1.5rem; }
.comment-list { list-style: none; padding: 0; }
.comment-list .comment { padding: 1.2rem 0; border-bottom: 1px solid var(--border); }
.comment-list .children { list-style: none; padding-inline-start: 2rem; }
.comment-author { display: flex; align-items: center; gap: .7rem; margin-bottom: .5rem; }
.comment-author img { width: 42px; height: 42px; border-radius: 50%; }
.comment-author .fn { font-weight: 600; font-style: normal; }
.comment-meta { color: var(--muted); font-size: .82rem; }

/* skip link */
.skip-link { position: absolute; right: -9999px; top: 0; background: var(--brand); color: #1b1813; padding: .6rem 1rem; z-index: 999; border-radius: 0 0 8px 0; }
.skip-link:focus { right: 0; }

/* utility */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.hide-mobile { }
.show-mobile { display: none; }

/* =================================================================
   EDITORIAL SYSTEM
   Identity = ink rules, numbered sections, a confident type scale and
   precise amber accents. One typeface (IBM Plex Sans Arabic), RTL,
   both themes. No decorative washes, grain or hover gimmicks.
   ================================================================= */

/* ---- Type: large, tight display; calm, readable body ---- */
.brand-text { font-size: 1.5rem; font-weight: 700; letter-spacing: 0; }
.article-title { font-size: clamp(2rem, 5.5vw, 3.6rem); line-height: 1.12; letter-spacing: -.015em; font-weight: 700; }
.article-subtitle { font-size: clamp(1.15rem, 2.6vw, 1.55rem); color: var(--text-soft); font-weight: 300; line-height: 1.55; }
.page-hero h1 { letter-spacing: -.01em; }

/* ---- Section header: an ink rule carrying a numbered label ---- */
.section-head {
  align-items: flex-end; gap: 1rem;
  border-bottom: 1px solid var(--border); padding-bottom: .75rem;
  margin-bottom: clamp(1.6rem, 3vw, 2.2rem);
}
.section-head > div { display: flex; flex-direction: column; gap: .15rem; }
.section-head h2 { font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.15; padding-bottom: 0; }
.section-head h2::after { display: none; }
.section-head .eyebrow { color: var(--brand-700); }
html[data-theme="dark"] .section-head .eyebrow { color: var(--brand-400); }
.section-head .section-link { margin-bottom: .2rem; }
/* number the homepage sections like a table of contents */
.home main { counter-reset: sec; }
.home .section .section-head h2 { display: flex; align-items: baseline; gap: .7rem; }
.home .section .section-head h2::before {
  counter-increment: sec; content: counter(sec, decimal-leading-zero);
  font-size: .52em; font-weight: 700; color: var(--brand);
  direction: ltr; font-variant-numeric: tabular-nums;
}

/* ---- Cards: editorial entries — no chrome, image then a clean caption -- */
.grid { gap: clamp(1.5rem, 3vw, 2.6rem); }
.card { background: none; border: none; border-radius: 0; box-shadow: none; overflow: visible; }
.card:hover { transform: none; box-shadow: none; border: none; }
.card-thumb {
  aspect-ratio: 3 / 2; border-radius: var(--radius); overflow: hidden;
  margin-bottom: .85rem; background: var(--bg-alt);
}
.card-thumb img { transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.card:hover .card-thumb img { transform: scale(1.04); }
.card-thumb .placeholder { background: linear-gradient(135deg, var(--brand-soft), var(--bg-alt)); }
.card-body { padding: 0; gap: .4rem; }
.card-kicker { font-size: .73rem; font-weight: 700; color: var(--brand-700); }
html[data-theme="dark"] .card-kicker { color: var(--brand-400); }
.card-title { font-size: 1.18rem; line-height: 1.4; font-weight: 700; letter-spacing: -.005em; }
.card-title a:hover { color: var(--brand-700); }
html[data-theme="dark"] .card-title a:hover { color: var(--brand-400); }
.card-excerpt { font-size: .92rem; }
.card-meta { font-size: .8rem; padding-top: .3rem; }

/* ---- Book cards ---- */
.book-cover { border-radius: var(--radius-sm); box-shadow: var(--shadow); margin-bottom: .9rem; }
.book-card:hover .book-cover { transform: translateY(-6px); }
.book-card .card-title { font-size: 1.04rem; }

/* ---- Article body: pull-quote, opener, verse ---- */
.entry-content blockquote {
  border: none; border-inline-start: 3px solid var(--brand); background: none; border-radius: 0;
  padding-block: .1rem; padding-inline-start: 1.4rem; padding-inline-end: 0; margin-block: 2rem;
  font-size: clamp(1.2rem, 2.4vw, 1.5rem); line-height: 1.7; color: var(--text); font-weight: 500;
}
.entry-content blockquote p { margin: 0; }
.single-article .entry-content > p:first-of-type { font-size: 1.28rem; line-height: 1.9; color: var(--text); }
.entry-content .poem, .entry-content pre { font-size: 1.3rem; line-height: 2.3; text-align: center; }

@media (max-width: 768px) {
  .single-article .entry-content > p:first-of-type { font-size: 1.15rem; }
}

/* =================================================================
   RESPONSIVE
   ================================================================= */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .layout-with-side { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --header-h: 74px; }
  .brand img { height: 48px; }
  .primary-nav { display: none; }
  /* nav is hidden on mobile, so push the icon group to the far end */
  .header-actions { margin-inline-start: auto; }
  .nav-toggle { display: inline-flex; }
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .value-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: repeat(2,1fr); }
  .brand-text { display: none; }

  /* convert key grids to sliders on mobile */
  .to-slider {
    display: grid; grid-auto-flow: column; gap: 1rem; overflow-x: auto;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; padding-bottom: .6rem;
    grid-auto-columns: 78%; grid-template-columns: none !important;
  }
  .to-slider::-webkit-scrollbar { display: none; }
  .to-slider > * { scroll-snap-align: start; }
  .to-slider.cols-sm { grid-auto-columns: 62%; }
  .to-slider.cols-book { grid-auto-columns: 44%; }

  .slider-hint { display: flex; }
}

@media (max-width: 480px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .to-slider { grid-auto-columns: 82%; }
  .to-slider.cols-book { grid-auto-columns: 52%; }
  .article-meta { font-size: .82rem; }
  .show-mobile { display: block; }
}

/* slider hint label */
.slider-hint { display: none; align-items: center; gap: .35rem; font-size: .8rem; color: var(--muted); margin-top: .2rem; }
.slider-hint svg { width: 15px; height: 15px; }

/* mobile drawer */
.mobile-drawer {
  position: fixed; inset: 0; z-index: 300; visibility: hidden; pointer-events: none;
}
.mobile-drawer .backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.5); opacity: 0; transition: opacity .3s ease; }
.mobile-drawer .panel { position: absolute; top: 0; bottom: 0; right: 0; width: min(86%, 340px); background: var(--surface);
  transform: translateX(100%); transition: transform .3s ease; padding: 1.4rem; overflow-y: auto; box-shadow: var(--shadow-lg); }
.mobile-drawer.open { visibility: visible; pointer-events: auto; }
.mobile-drawer.open .backdrop { opacity: 1; }
.mobile-drawer.open .panel { transform: translateX(0); }
.mobile-drawer .drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.2rem; }
.mobile-drawer .drawer-head img { height: 48px; }
.mobile-drawer .logo-dark { display: none; }
html[data-theme="dark"] .mobile-drawer .logo-light { display: none; }
html[data-theme="dark"] .mobile-drawer .logo-dark { display: block; }
.mobile-nav { list-style: none; padding: 0; margin: 0; }
.mobile-nav li { border-bottom: 1px solid var(--border); }
.mobile-nav a { display: block; padding: .85rem .2rem; font-weight: 500; font-size: 1.05rem; }
.mobile-nav .sub-menu { list-style: none; padding-inline-start: 1rem; }
.mobile-nav .sub-menu a { font-size: .95rem; color: var(--muted); padding: .6rem .2rem; }

/* reveal on scroll */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
[data-reveal].in-view { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
