/* shukair.org — public site design system
   Warm ivory ground, deep charcoal text, muted olive, earth tones, a restrained burgundy accent.
   Layout uses logical properties so the same rules serve Arabic (RTL) and English (LTR). */
:root {
  --ivory: #f7f2e8;
  --paper: #fcfaf5;
  --ink: #26241f;
  --ink-soft: #5a564d;
  --olive: #5b6b3a;
  --olive-deep: #46522c;
  --earth: #7d5a37;
  --sand: #e8dfcd;
  --line: #d9cfbb;
  --burgundy: #7a2e3a;
  --focus: #7a2e3a;
  --radius: 4px;
  --maxw: 70rem;
  --narrow: 44rem;
  --font-ar-body: "Noto Naskh Arabic", "Amiri", "Segoe UI", Tahoma, serif;
  --font-ar-head: "Amiri", "Noto Naskh Arabic", serif;
  --font-en-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --font-en-head: "Cormorant Garamond", Georgia, serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--ivory); color: var(--ink);
  font-family: var(--font-en-body); font-size: 1.0625rem; line-height: 1.7;
}
body.lang-ar { font-family: var(--font-ar-body); font-size: 1.1875rem; line-height: 2; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--olive-deep); text-underline-offset: .18em; }
a:hover { color: var(--burgundy); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; inset-inline-start: .5rem; top: -4rem; background: var(--ink); color: var(--ivory); padding: .6rem 1rem; z-index: 100; }
.skip-link:focus { top: .5rem; }
.container { width: min(100% - 2rem, var(--maxw)); margin-inline: auto; }
.narrow { width: min(100% - 2rem, var(--narrow)); }
.narrow-block { max-width: var(--narrow); margin-block: 2rem; }
main:focus { outline: none; }

/* Headings */
h1, h2, h3, h4 { font-family: var(--font-en-head); font-weight: 600; line-height: 1.25; margin: 0 0 .6em; letter-spacing: .005em; }
body.lang-ar h1, body.lang-ar h2, body.lang-ar h3, body.lang-ar h4 { font-family: var(--font-ar-head); font-weight: 700; line-height: 1.5; letter-spacing: 0; }
h1 { font-size: clamp(2.1rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.1rem); }
h3, .h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
.lead { font-size: 1.2em; color: var(--ink-soft); max-width: 40em; }
.muted { color: var(--ink-soft); }
.meta { font-size: .9rem; color: var(--ink-soft); margin: 0 0 .5em; }
.eyebrow { font-family: var(--font-en-body); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--earth); font-weight: 600; margin: 0 0 .5em; }
body.lang-ar .eyebrow { font-family: var(--font-ar-body); letter-spacing: 0; text-transform: none; font-size: .95rem; }
.eyebrow a { color: inherit; }

/* Header */
.site-header { background: var(--paper); border-block-end: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--ink); }
.brand-mark { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--olive-deep); color: var(--ivory); font-family: var(--font-ar-head); font-size: 1.5rem; line-height: 1; padding-block-end: .15rem; }
.brand-name { font-family: var(--font-en-head); font-size: 1.4rem; font-weight: 600; }
body.lang-ar .brand-name { font-family: var(--font-ar-head); font-size: 1.55rem; }
.site-nav { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.1rem; flex-wrap: wrap; align-items: center; }
.site-nav a { text-decoration: none; color: var(--ink); font-size: .98rem; padding-block: .3rem; border-block-end: 2px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--olive-deep); border-color: var(--olive); }
.lang-switch a { font-size: .9rem; color: var(--earth); }
.nav-search input { font: inherit; font-size: .9rem; padding: .35rem .7rem; border: 1px solid var(--line); border-radius: 999px; background: var(--ivory); width: 9.5rem; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius); width: 2.75rem; height: 2.75rem; cursor: pointer; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 1.3rem; height: 2px; background: var(--ink); margin-inline: auto; content: ""; position: relative; }
.nav-toggle-bars::before { top: -6px; position: absolute; } .nav-toggle-bars::after { top: 6px; position: absolute; }
@media (max-width: 62rem) {
  .js .nav-toggle { display: inline-block; }
  .js .site-nav { display: none; width: 100%; flex-direction: column; align-items: flex-start; padding-block: 1rem; }
  .js .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; align-items: flex-start; gap: .4rem; }
  .nav-search input { width: 100%; }
}

/* Hero */
.hero { padding-block: clamp(2.5rem, 7vw, 5.5rem); background: linear-gradient(180deg, var(--paper), var(--ivory)); border-block-end: 1px solid var(--line); }
.hero-grid { display: grid; gap: 2.5rem; grid-template-columns: 1.4fr 1fr; align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); margin-block-end: .35em; }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-block-start: 1.5rem; }
.portrait img { border-radius: var(--radius); width: 100%; }
.portrait figcaption { font-size: .85rem; color: var(--ink-soft); margin-block-start: .5rem; }
.portrait-ph { aspect-ratio: 4 / 5; max-width: 22rem; margin-inline: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--sand); display: grid; place-content: center; text-align: center; gap: 1rem; padding: 2rem; position: relative; }
.portrait-ph::before { content: ""; position: absolute; inset: .7rem; border: 1px solid var(--earth); opacity: .45; border-radius: 2px; pointer-events: none; }
.portrait-ph-letter { font-family: var(--font-ar-head); font-size: clamp(7rem, 16vw, 11rem); line-height: 1; color: var(--olive-deep); }
.portrait-ph-meta { font-size: .95rem; letter-spacing: .08em; color: var(--earth); }
@media (max-width: 52rem) { .hero-grid { grid-template-columns: 1fr; } .portrait-ph { aspect-ratio: 16 / 10; } .portrait-ph-letter { font-size: 5.5rem; } }

/* Buttons */
.btn { display: inline-block; background: var(--olive-deep); color: var(--ivory); border: 1px solid var(--olive-deep); padding: .6rem 1.4rem; border-radius: var(--radius); text-decoration: none; font: inherit; font-size: 1rem; cursor: pointer; line-height: 1.5; }
.btn:hover { background: var(--ink); border-color: var(--ink); color: var(--ivory); }
.btn-ghost { background: transparent; color: var(--olive-deep); }
.btn-ghost:hover { background: var(--olive-deep); color: var(--ivory); border-color: var(--olive-deep); }

/* Sections */
.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section-tint { background: var(--paper); border-block: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-block-end: 1.5rem; }
.section-head h2 { margin: 0; }
.more { font-size: .95rem; }
.quote { margin: 0; text-align: center; }
.quote blockquote { margin: 0; font-family: var(--font-en-head); font-size: clamp(1.4rem, 3vw, 2rem); font-style: italic; line-height: 1.6; }
body.lang-ar .quote blockquote { font-family: var(--font-ar-head); font-style: normal; }
.quote figcaption { margin-block-start: .8rem; color: var(--earth); font-size: .95rem; }

/* Grid + cards */
.grid { display: grid; gap: 1.6rem; }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 12.5rem), 1fr)); }
.stack { display: grid; gap: 1.2rem; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card-body { padding: 1.1rem 1.2rem 1.3rem; }
.card h3, .card h2 { margin-block-end: .35em; font-size: 1.2rem; }
.card h3 a, .card h2 a { text-decoration: none; color: var(--ink); }
.card h3 a:hover, .card h2 a:hover { color: var(--burgundy); text-decoration: underline; }
.card-img img, .card-cover img { width: 100%; }
.award-card { border-inline-start: 4px solid var(--olive); }
.book-card .card-cover { background: var(--sand); display: block; }
.cover-img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.cover-ph { display: grid; place-items: center; aspect-ratio: 2 / 3; background: var(--olive-deep); color: var(--ivory); padding: 1rem; text-align: center; position: relative; }
.cover-ph::before { content: ""; position: absolute; inset: .55rem; border: 1px solid rgba(247, 242, 232, .45); pointer-events: none; }
.cover-ph-title { font-family: var(--font-ar-head); font-size: 1.15rem; line-height: 1.5; }
.card-img .cover-ph { aspect-ratio: 16 / 10; }
.cover-ph-lg { width: 100%; max-width: 20rem; }
.cover-ph-lg .cover-ph-title { font-size: 1.6rem; }

/* Book detail */
.book-grid { display: grid; grid-template-columns: minmax(12rem, 20rem) 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; margin-block-end: 2rem; }
.book-cover .cover-img { box-shadow: 0 1px 0 var(--line); border: 1px solid var(--line); }
@media (max-width: 46rem) { .book-grid { grid-template-columns: 1fr; } .book-cover { max-width: 16rem; } }
.facts { display: grid; gap: .35rem; margin: 1.2rem 0; }
.facts div { display: flex; gap: 1rem; border-block-end: 1px solid var(--line); padding-block: .45rem; }
.facts dt { min-width: 8rem; color: var(--ink-soft); font-size: .95rem; }
.facts dd { margin: 0; font-weight: 600; }
.tags { list-style: none; display: flex; gap: .5rem; flex-wrap: wrap; padding: 0; margin: 1rem 0; }
.tags li { background: var(--sand); border-radius: 999px; padding: .15rem .8rem; font-size: .88rem; }
.notice { background: var(--sand); border-inline-start: 4px solid var(--earth); padding: .7rem 1rem; font-size: .95rem; border-radius: 2px; }
.refs ul, .link-list { padding-inline-start: 1.2rem; }
.related { margin-block-start: 3rem; padding-block-start: 2rem; border-block-start: 1px solid var(--line); }

/* Prose */
.prose { max-width: var(--narrow); }
.prose h2 { margin-block-start: 1.8em; }
.prose blockquote { margin-inline: 0; padding-inline-start: 1.2rem; border-inline-start: 3px solid var(--olive); color: var(--ink-soft); }
.prose table { border-collapse: collapse; width: 100%; } .prose th, .prose td { border: 1px solid var(--line); padding: .4rem .6rem; }
.page-article { padding-block: 1.5rem 3rem; }
.article-figure { margin: 0 0 1.5rem; }
.source-line { font-size: .95rem; color: var(--ink-soft); border-block-start: 1px solid var(--line); padding-block-start: 1rem; }

/* Breadcrumbs */
.crumbs { padding-block: 1rem .5rem; font-size: .9rem; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: 0; }
.crumbs li + li::before { content: "›"; margin-inline-end: .4rem; color: var(--earth); }
[dir="rtl"] .crumbs li + li::before { content: "‹"; }
.crumbs a { color: var(--ink-soft); }

/* Timeline */
.timeline { list-style: none; margin: 2rem 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 5.4rem; width: 2px; background: var(--line); }
.tl-item { display: grid; grid-template-columns: 5rem 1fr; gap: 1.6rem; padding-block: .8rem; position: relative; }
.tl-year { font-family: var(--font-en-head); font-size: 1.3rem; font-weight: 600; color: var(--olive-deep); text-align: end; font-variant-numeric: lining-nums; }
.tl-item::after { content: ""; position: absolute; inset-inline-start: 5.4rem; top: 1.45rem; width: .8rem; height: .8rem; border-radius: 50%; background: var(--olive); transform: translateX(-50%); border: 2px solid var(--ivory); }
[dir="rtl"] .tl-item::after { transform: translateX(50%); }
.tl-body h2 { margin: 0 0 .2em; }
.timeline-compact { margin: 0; } .timeline-compact::before, .timeline-compact li::after { display: none; }
.timeline-compact li { display: flex; gap: 1.2rem; padding-block: .5rem; border-block-end: 1px solid var(--line); }
.timeline-compact .tl-year { min-width: 5.5rem; text-align: start; }

/* Forms */
.filters { display: flex; flex-wrap: wrap; gap: 1rem; align-items: end; background: var(--paper); border: 1px solid var(--line); padding: 1rem; border-radius: var(--radius); margin-block: 1.5rem; }
.field { display: grid; gap: .3rem; }
.field label { font-size: .92rem; color: var(--ink-soft); }
input, select, textarea { font: inherit; font-size: 1rem; padding: .55rem .75rem; border: 1px solid #b9ad94; border-radius: var(--radius); background: #fff; color: var(--ink); max-width: 100%; }
textarea { width: 100%; }
.form .field { margin-block-end: 1.1rem; }
.form input:not([type=checkbox]), .form textarea { width: 100%; }
.error { color: var(--burgundy); font-size: .92rem; margin: .1rem 0 0; }
[aria-invalid="true"] { border-color: var(--burgundy); }
.alert { padding: .8rem 1rem; border-radius: var(--radius); }
.alert-ok { background: #e6ecd6; border: 1px solid var(--olive); } .alert-err { background: #f4dde0; border: 1px solid var(--burgundy); }
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.empty { padding: 2rem; text-align: center; color: var(--ink-soft); border: 1px dashed var(--line); border-radius: var(--radius); }
.pagination { display: flex; gap: 1.2rem; justify-content: center; align-items: center; margin-block: 2.5rem; }

/* Gallery + lightbox */
.photo-grid { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); }
.photo-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); }
.photo-cap { font-size: .85rem; color: var(--ink-soft); margin: .35rem 0 0; }
.lb { border: 0; padding: 0; background: rgba(20, 18, 14, .94); color: #f7f2e8; max-width: 100vw; max-height: 100vh; width: 100%; height: 100%; }
.lb::backdrop { background: rgba(20, 18, 14, .85); }
.lb-inner { display: grid; grid-template-rows: 1fr auto; height: 100%; padding: 1rem; gap: .6rem; }
.lb-stage { display: flex; align-items: center; justify-content: center; min-height: 0; gap: .6rem; }
.lb-stage img { max-height: calc(100vh - 8rem); max-width: 100%; width: auto; object-fit: contain; }
.lb-cap { text-align: center; font-size: .95rem; min-height: 1.5em; }
.lb button { background: rgba(247, 242, 232, .14); color: #f7f2e8; border: 1px solid rgba(247, 242, 232, .5); border-radius: var(--radius); font-size: 1.4rem; min-width: 2.75rem; min-height: 2.75rem; cursor: pointer; }
.lb button:hover { background: rgba(247, 242, 232, .3); }
.lb-close { position: absolute; inset-block-start: 1rem; inset-inline-end: 1rem; }

/* Media / embeds */
.embed { position: relative; margin-block: 1rem; background: var(--sand); border-radius: var(--radius); padding: 1rem; text-align: center; }
.embed iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; display: block; }
audio { width: 100%; }

/* Footer */
.site-footer { background: var(--ink); color: #e9e3d4; margin-block-start: 4rem; padding-block: 2.5rem 1.2rem; }
.site-footer a { color: #e9e3d4; } .site-footer a:hover { color: #fff; }
.site-footer .muted { color: #bdb6a5; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1.5fr 1fr; }
.footer-name { font-family: var(--font-en-head); font-size: 1.5rem; margin: 0 0 .3rem; } body.lang-ar .footer-name { font-family: var(--font-ar-head); }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .3rem; }
.footer-bottom { border-block-start: 1px solid rgba(233, 227, 212, .2); margin-block-start: 1.5rem; padding-block-start: 1rem; color: #bdb6a5; }
@media (max-width: 40rem) { .footer-grid { grid-template-columns: 1fr; } }

.error-page { padding-block: 4rem; text-align: center; }
.debug { text-align: start; direction: ltr; background: var(--sand); padding: 1rem; overflow: auto; font-size: .85rem; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }
@media print { .site-header, .site-footer, .filters, .skip-link { display: none; } body { background: #fff; } a { color: inherit; } }

/* Print: clean reading copy of an article, book or biography page. */
@media print {
  :root { --paper: #fff; }
  body { background: #fff !important; color: #000 !important; font-size: 12pt; line-height: 1.5; }
  .skip-link, header[role=banner] nav, .site-nav, .nav-toggle, .lang-switch, .site-footer nav, form, .lightbox, dialog, video, iframe, .embed, button { display: none !important; }
  a { color: inherit; text-decoration: underline; }
  main a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; word-break: break-all; }
  h1, h2, h3 { break-after: avoid; }
  img, figure, blockquote { break-inside: avoid; max-width: 100% !important; }
  .site-footer { border: 0; font-size: 9pt; }
}

/* =====================================================================
   Motion & polish — literary, calm. Everything here is decoration:
   content is fully visible without JS, and prefers-reduced-motion turns all motion off.
   ===================================================================== */
:root { --ease: cubic-bezier(.22, .61, .36, 1); --shadow-soft: 0 10px 30px -14px rgba(38, 36, 31, .35); --shadow-lift: 0 22px 40px -18px rgba(38, 36, 31, .45); }
::selection { background: rgba(91, 107, 58, .28); }
main { animation: page-in .7s var(--ease) both; }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Header: frosted, shrinks a little once the page scrolls */
.site-header { background: rgba(252, 250, 245, .88); -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px); transition: box-shadow .35s var(--ease), background .35s var(--ease); }
.site-header.is-scrolled { box-shadow: 0 8px 24px -16px rgba(38, 36, 31, .5); background: rgba(252, 250, 245, .96); }
.brand { padding-block: .35rem; }
.brand-logo { height: 3.1rem; width: auto; transition: height .35s var(--ease), transform .35s var(--ease); }
.site-header.is-scrolled .brand-logo { height: 2.5rem; }
.brand:hover .brand-logo { transform: translateY(-1px) scale(1.015); }
.site-nav a { background: linear-gradient(var(--burgundy), var(--burgundy)) center bottom / 0 2px no-repeat; border-block-end: 0; padding-block: .4rem; transition: background-size .35s var(--ease), color .2s; }
.site-nav a:hover, .site-nav a[aria-current="page"] { background-size: 100% 2px; color: var(--olive-deep); border: 0; }
.site-nav a[aria-current="page"] { background-image: linear-gradient(var(--olive), var(--olive)); }
.nav-search input { transition: width .35s var(--ease), box-shadow .25s, border-color .25s; }
.nav-search input:focus { width: 13rem; border-color: var(--olive); box-shadow: 0 0 0 3px rgba(91, 107, 58, .18); outline: none; }
@media (max-width: 62rem) { .nav-search input:focus { width: 100%; } .brand-logo { height: 2.6rem; } .site-header.is-scrolled .brand-logo { height: 2.2rem; } }

/* Hero: soft light, an ink stroke that draws itself, staggered entrance */
.hero { position: relative; overflow: hidden; isolation: isolate;
  background: radial-gradient(60rem 28rem at 85% -10%, rgba(91, 107, 58, .13), transparent 60%),
              radial-gradient(40rem 24rem at 5% 110%, rgba(122, 46, 58, .08), transparent 60%),
              linear-gradient(180deg, var(--paper), var(--ivory)); }
.hero::before { content: ""; position: absolute; inset: auto 0 -1rem 0; height: 40%; z-index: -1; background: url(/assets/img/hero-ink.svg) center bottom / cover no-repeat; opacity: .28; transform: translate3d(0, var(--py, 0px), 0); will-change: transform; }
[dir="rtl"] .hero::before { transform: scaleX(-1) translate3d(0, var(--py, 0px), 0); }
.hero-text > * { animation: rise .9s var(--ease) both; }
.hero-text > :nth-child(1) { animation-delay: .1s; } .hero-text > :nth-child(2) { animation-delay: .25s; }
.hero-text > :nth-child(3) { animation-delay: .4s; } .hero-text > :nth-child(4) { animation-delay: .55s; }
.hero-portrait { animation: rise 1.1s var(--ease) .3s both; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.eyebrow::before { content: ""; display: inline-block; width: 2rem; height: 2px; background: var(--burgundy); vertical-align: middle; margin-inline-end: .7rem; border-radius: 2px; transform-origin: left center; animation: grow 1s var(--ease) .5s both; }
[dir="rtl"] .eyebrow::before { transform-origin: right center; }
.eyebrow a::before, .card .eyebrow::before, .section-head .eyebrow::before { display: none; }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.portrait-ph { animation: float 7s ease-in-out infinite; box-shadow: var(--shadow-soft); background: linear-gradient(160deg, var(--sand), #efe6d3); }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
.portrait img { box-shadow: var(--shadow-lift); }

/* Buttons */
.btn { transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s, color .2s, border-color .2s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 20px -10px rgba(38, 36, 31, .55); }
.btn:active { transform: translateY(0); box-shadow: none; }

/* Section headings: a short ink stroke under each */
.section-head h2::after { content: ""; display: block; width: 3.4rem; height: 4px; margin-block-start: .5rem; border-radius: 4px; background: linear-gradient(90deg, var(--burgundy), rgba(122, 46, 58, 0)); transform-origin: left center; transition: width .6s var(--ease); }
[dir="rtl"] .section-head h2::after { background: linear-gradient(270deg, var(--burgundy), rgba(122, 46, 58, 0)); transform-origin: right center; }
.section-head:hover h2::after { width: 5.5rem; }
.more { text-decoration: none; border-block-end: 1px solid currentColor; padding-block-end: 1px; transition: letter-spacing .25s var(--ease), color .2s; }
.more::after { content: " →"; } [dir="rtl"] .more::after { content: " ←"; }
.more:hover { letter-spacing: .02em; }

/* Cards */
.card { transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .3s; }
.card:hover, .card:focus-within { transform: translateY(-6px); box-shadow: var(--shadow-lift); border-color: #c4b799; }
.card-cover, .card-img { overflow: hidden; position: relative; }
.card-cover img, .card-img img, .card-cover .cover-ph, .card-img .cover-ph { transition: transform .8s var(--ease); }
.card:hover .card-cover img, .card:hover .card-img img, .card:hover .card-cover .cover-ph, .card:hover .card-img .cover-ph { transform: scale(1.05); }
.card-cover::after, .card-img::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .28) 50%, transparent 65%); transform: translateX(-120%); transition: transform .9s var(--ease); }
[dir="rtl"] .card-cover::after, [dir="rtl"] .card-img::after { transform: translateX(120%); }
.card:hover .card-cover::after, .card:hover .card-img::after { transform: translateX(0); }
.award-card { transition-property: transform, box-shadow, border-color, border-width; } .award-card:hover { border-inline-start-color: var(--burgundy); }
.cover-img { box-shadow: 0 14px 26px -16px rgba(38, 36, 31, .6); }
.book-cover .cover-img { transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.book-cover .cover-img:hover { transform: translateY(-4px) rotate(-.6deg); box-shadow: var(--shadow-lift); }

/* Quote */
.section-quote { position: relative; background: radial-gradient(40rem 14rem at 50% 50%, rgba(232, 223, 205, .5), transparent 70%); }
.quote { position: relative; padding-block: 2.4rem 0; }
.quote::before { content: "\201D"; position: absolute; inset-block-start: -1.6rem; inset-inline-start: 50%; transform: translateX(-50%); font-family: var(--font-en-head); font-size: 9rem; line-height: 1; color: var(--burgundy); opacity: .16; pointer-events: none; }
body.lang-ar .quote::before { content: "\201C"; }

/* Timeline: dots breathe, years glow in */
.tl-item::after { transition: transform .4s var(--ease), background .3s; }
.tl-item:hover::after { background: var(--burgundy); transform: translateX(-50%) scale(1.35); }
[dir="rtl"] .tl-item:hover::after { transform: translateX(50%) scale(1.35); }
.timeline-compact li { transition: padding-inline-start .3s var(--ease), background .3s; border-radius: 2px; }
.timeline-compact li:hover { padding-inline-start: .6rem; background: rgba(232, 223, 205, .5); }

/* Scroll reveal (only armed when JS has run) */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--rd, 0s); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* Reading progress on long pages */
.read-progress { position: fixed; inset-block-start: 0; inset-inline: 0; height: 3px; z-index: 60; background: linear-gradient(90deg, var(--olive), var(--burgundy)); transform: scaleX(0); transform-origin: left center; pointer-events: none; }
[dir="rtl"] .read-progress { transform-origin: right center; }

/* Footer */
.site-footer { position: relative; background: radial-gradient(50rem 18rem at 85% 0, rgba(91, 107, 58, .25), transparent 60%), var(--ink); }
.site-footer::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--olive), var(--burgundy), var(--earth)); }
.footer-logo { width: min(100%, 15rem); height: auto; margin-block-end: .6rem; opacity: .95; }
.footer-links a { text-decoration: none; background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat; transition: background-size .3s var(--ease); padding-block-end: 2px; }
[dir="rtl"] .footer-links a { background-position: right bottom; }
.footer-links a:hover { background-size: 100% 1px; }

/* Book pages: natural cover proportions, a hint of a spine, and a readable "about" panel */
.book-cover { position: relative; }
.book-cover .cover-img { aspect-ratio: auto; height: auto; background: #fff; padding: 6px; border-radius: 3px; }
.book-cover::after { content: ""; position: absolute; inset-block: 7px; inset-inline-start: 7px; width: 16px; pointer-events: none; background: linear-gradient(90deg, rgba(38, 36, 31, .22), rgba(38, 36, 31, .05) 55%, transparent); }
[dir="rtl"] .book-cover::after { background: linear-gradient(270deg, rgba(38, 36, 31, .22), rgba(38, 36, 31, .05) 55%, transparent); }
.book-info h1 { margin-block-end: .2em; }
.book-info .lead { color: var(--earth); }
.book-detail .prose.narrow-block { max-width: 52rem; margin-inline: auto; margin-block: 2.5rem; padding: clamp(1.4rem, 4vw, 2.6rem); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-soft); position: relative; }
.book-detail .prose.narrow-block::before { content: ""; position: absolute; inset-block-start: 0; inset-inline: 2rem; height: 3px; background: linear-gradient(90deg, var(--olive), var(--burgundy)); border-radius: 0 0 3px 3px; }
.book-detail .prose h2 { margin-block-start: 0; }
.book-detail .prose p { line-height: 2; }
.book-detail .prose > p:first-of-type { font-size: 1.12em; color: var(--ink); }
.book-detail .prose blockquote { background: rgba(232, 223, 205, .35); padding: 1rem 1.2rem; border-radius: 2px; margin-block: 1.4rem; }
.book-detail .prose > p:last-child em { font-size: .85rem; color: var(--ink-soft); }
.book-card .cover-img { background: var(--sand); }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; }
  .hero-text > *, .hero-portrait, main { animation: none !important; }
  .hero::before { transform: none !important; }
  [dir="rtl"] .hero::before { transform: scaleX(-1) !important; }
}
