/* ============================================================
   RumiOnFire.com — shared stylesheet
   data/style.css
   © 1999–2026 RumiOnFire.com
   ============================================================

   TABLE OF CONTENTS
   1. Tokens & variables
   2. Reset & base
   3. Typography
   4. Navigation
   5. Page header (inner pages)
   6. Footer (inner pages)
   7. Landing page — hero
   8. Landing page — explore section
   9. Landing page — footer zone
  10. Biography page
  11. Gallery page
  12. Inspired Poetry (wheat) page
  13. Mathnavi index
  14. Mathnavi poem page
  15. Divan-e Shams index
  16. Divan-e Shams ghazal page
  17. Utilities
   ============================================================ */


/* ── 1. Tokens & variables ──────────────────────────────── */

:root {
  --clr-bg:          #faf8f4;
  --clr-surface:     #f3efe8;
  --clr-border:      #ddd8ce;
  --clr-border-soft: #e8e3da;
  --clr-text:        #1e1a14;
  --clr-text-mid:    #5a5044;
  --clr-text-dim:    #9e9080;
  --clr-gold:        #b07d2a;
  --clr-gold-light:  #c9952e;
  --clr-gold-pale:   #f0e4c8;
  --clr-purple-tint: #ede6ff;
  --clr-purple-text: #4a3880;

  --font-sans:   'Palatino Linotype', 'Book Antiqua', Palatino, Georgia, serif;
  --font-serif:  Georgia, 'Times New Roman', serif;
  --font-farsi:  'Noto Naskh Arabic', 'Arabic Typesetting',
                 'Scheherazade New', 'Traditional Arabic', serif;

  --nav-h:       52px;
  --content-w:   900px;
  --banner-w:    100px;
  --banner-h:    139px;

  --gap-xs:  6px;
  --gap-sm:  12px;
  --gap-md:  24px;
  --gap-lg:  40px;

  --r-sm:  4px;
  --r-md:  8px;
  --r-lg:  12px;

  --ease: 0.18s ease;
}


/* ── 2. Reset & base ────────────────────────────────────── */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--clr-bg);
  color: var(--clr-text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  width: 100%;
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0 var(--gap-md);
}

a {
  color: var(--clr-gold);
  text-decoration: none;
  transition: opacity var(--ease);
}
a:hover { opacity: 0.72; }

img { display: block; max-width: 100%; }

button { font-family: inherit; cursor: pointer; }


/* ── 3. Typography ──────────────────────────────────────── */

h1 { font-size: 1.75rem; font-weight: 500; line-height: 1.25; }
h2 { font-size: 1.35rem; font-weight: 500; line-height: 1.3;  }
h3 { font-size: 1.05rem; font-weight: 500; line-height: 1.4;  }

.section-heading {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--clr-text);
  padding-bottom: 7px;
  border-bottom: 0.5px solid var(--clr-border);
  margin-bottom: 12px;
}

.label-small {
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--clr-text-dim);
}

.verse {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  line-height: 2.0;
  color: var(--clr-text);
}

.farsi {
  font-family: var(--font-farsi);
  font-size: 1.1rem;
  line-height: 2.1;
  direction: rtl;
  text-align: right;
  color: var(--clr-text);
}

.credit {
  font-size: 0.78rem;
  color: var(--clr-text-dim);
  font-style: italic;
  margin-top: var(--gap-sm);
}


/* ── 4. Navigation ──────────────────────────────────────── */

.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--clr-bg);
  border-bottom: 0.5px solid var(--clr-border);
}

.site-nav {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gap-md);
  background: var(--clr-bg);
  max-width: var(--content-w);
  margin: 0 auto;
  width: 100%;
}

.nav-logo {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--clr-text);
  text-decoration: none;
  transition: color var(--ease);
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-logo:hover { color: var(--clr-gold); opacity: 1; }

.nav-portrait {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 1.5px solid var(--clr-border);
  flex-shrink: 0;
  display: block;
}

.nav-links {
  display: flex;
  gap: var(--gap-md);
  list-style: none;
}

.nav-links a {
  font-size: 0.78rem;
  color: var(--clr-text-mid);
  text-decoration: none;
  transition: color var(--ease);
  letter-spacing: 0.01em;
}
.nav-links a:hover,
.nav-links a.active { color: var(--clr-text); opacity: 1; }
.nav-links a.active { font-weight: 500; }


/* ── 5. Page header (inner pages) ───────────────────────── */

.page-header {
  display: grid;
  grid-template-columns: 1fr var(--banner-w);
  gap: var(--gap-md);
  align-items: start;
  padding: var(--gap-md) 0;
  border-bottom: 0.5px solid var(--clr-border);
  margin-bottom: var(--gap-md);
}

.page-header-title {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--clr-text);
  line-height: 1.3;
}

.page-banner {
  width: var(--banner-w);
  height: var(--banner-h);
  object-fit: cover;
  border-radius: var(--r-sm);
  border: 0.5px solid var(--clr-border-soft);
}

.page-banner-placeholder {
  width: var(--banner-w);
  height: var(--banner-h);
  background: var(--clr-surface);
  border: 0.5px solid var(--clr-border-soft);
  border-radius: var(--r-sm);
}


/* ── 6. Footer (inner pages) ────────────────────────────── */

.page-footer {
  border-top: 0.5px solid var(--clr-border);
  padding: 10px 0;
  margin-top: var(--gap-lg);
  text-align: right;
}

.page-footer .copyright {
  font-size: 0.68rem;
  color: var(--clr-text-dim);
  line-height: 1.5;
}


/* ── 7. Landing page — hero ─────────────────────────────── */

.hero {
  display: grid;
  grid-template-columns: 1fr 150px;
  gap: var(--gap-lg);
  align-items: start;
  padding: var(--gap-lg) 0 var(--gap-md);
  border-bottom: 0.5px solid var(--clr-border);
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: var(--gap-md);
}

.hero-tribute-small {
  font-size: 0.82rem;
  color: var(--clr-text-dim);
  letter-spacing: 0.03em;
  margin-bottom: 3px;
}

.hero-name {
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--clr-text);
  line-height: 1.35;
}

.quote-block {
  border-left: 2px solid var(--clr-border);
  padding-left: var(--gap-sm);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.quote-en {
  font-family: var(--font-serif);
  font-size: 1.0rem;
  font-style: italic;
  color: var(--clr-text);
  line-height: 1.8;
}

.quote-divider {
  width: 100%;
  height: 0.5px;
  background: var(--clr-border-soft);
}

.quote-fa {
  font-family: var(--font-farsi);
  font-size: 1.25rem;
  color: var(--clr-text-mid);
  line-height: 2.0;
  direction: rtl;
  text-align: right;
}

.hero-portrait {
  width: 150px;
  height: 207px;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--r-sm);
  border: 0.5px solid var(--clr-border-soft);
}


/* ── 8. Landing page — explore section ─────────────────── */

.explore {
  padding: var(--gap-md) 0;
  border-bottom: 0.5px solid var(--clr-border);
}

.explore-label {
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--clr-text-dim);
  margin-bottom: var(--gap-sm);
}

.explore-row-primary {
  display: flex;
  justify-content: center;
  gap: var(--gap-sm);
  margin-bottom: 10px;
}

.explore-row-secondary {
  display: flex;
  justify-content: center;
  gap: 10px;
}

/* ── Primary cards (image behind, label bar at bottom) ── */
.sec-card-lg {
  width: 300px;
  height: 145px;
  border: 0.5px solid var(--clr-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.sec-card-lg:hover {
  border-color: var(--clr-gold);
  box-shadow: 0 2px 12px rgba(176,125,42,0.18);
  opacity: 1;
}

/* Image swap for primary — BW default, colour on hover */
.card-img-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.card-img-bw,
.card-img-col {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  transition: opacity 0.3s ease;
}
.card-img-col { opacity: 0; }
.sec-card-lg:hover .card-img-col { opacity: 1; }
.sec-card-lg:hover .card-img-bw  { opacity: 0; }

/* Label bar at bottom of primary card */
.card-label {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 7px 12px 9px;
  background: rgba(250,248,244,0.90);
  backdrop-filter: blur(2px);
  text-align: center;
  border-top: 0.5px solid var(--clr-border-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.sec-card-name-lg {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--clr-text);
  line-height: 1.3;
}

/* ── Secondary cards (image left, text right) ── */
.sec-card-sm {
  width: 210px;
  height: 88px;
  border: 0.5px solid var(--clr-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: row;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.sec-card-sm:hover {
  border-color: var(--clr-gold);
  box-shadow: 0 2px 12px rgba(176,125,42,0.18);
  opacity: 1;
}

/* Image slot — left 88px, BW/colour swap */
.card-img-side {
  width: 88px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  border-right: 0.5px solid var(--clr-border-soft);
}
.card-img-side .card-img-bw,
.card-img-side .card-img-col {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  transition: opacity 0.3s ease;
}
.card-img-side .card-img-col { opacity: 0; }
.sec-card-sm:hover .card-img-side .card-img-col { opacity: 1; }
.sec-card-sm:hover .card-img-side .card-img-bw  { opacity: 0; }

/* Text area — right portion, centred */
.card-text-side {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  text-align: center;
  gap: 3px;
}

.sec-card-name-sm {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--clr-text);
  line-height: 1.25;
}

.sec-card-sub {
  font-size: 0.65rem;
  color: var(--clr-text-dim);
  font-style: italic;
  line-height: 1.3;
}


/* ── 9. Landing page — footer zone ─────────────────────── */

.landing-footer {
  padding: var(--gap-sm) 0 var(--gap-md);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.other-sites-label {
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--clr-text-dim);
  margin-bottom: 5px;
}

.related-row {
  display: flex;
  border: 0.5px solid #d4c8f0;
  border-radius: var(--r-md);
  overflow: hidden;
}

.rel-btn {
  flex: 1;
  padding: 7px 4px;
  font-size: 0.75rem;
  color: var(--clr-purple-text);
  background: var(--clr-purple-tint);
  border: none;
  border-right: 0.5px solid #d4c8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  transition: background var(--ease), color var(--ease);
  white-space: nowrap;
  font-family: inherit;
  text-decoration: none;
}
.rel-btn:last-child { border-right: none; }
.rel-btn:hover {
  background: var(--clr-surface);
  color: var(--clr-text-mid);
  opacity: 1;
}

.meta-strip {
  border-top: 0.5px solid var(--clr-border);
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.collapsible-btn {
  border: 0.5px solid #d4c8f0;
  border-radius: var(--r-md);
  padding: 7px 12px;
  font-size: 0.75rem;
  color: var(--clr-purple-text);
  background: var(--clr-purple-tint);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: background var(--ease), color var(--ease);
  width: 100%;
  text-align: left;
  line-height: 1.4;
  font-family: inherit;
}
.collapsible-btn:hover {
  background: var(--clr-surface);
  color: var(--clr-text-mid);
}

.collapsible-btn .chevron {
  margin-left: auto;
  font-size: 0.64rem;
  transition: transform 0.22s ease;
  display: inline-block;
}
.collapsible-btn.open .chevron { transform: rotate(180deg); }

.collapsible-content {
  display: none;
  font-size: 0.78rem;
  color: var(--clr-text-mid);
  line-height: 1.8;
  margin-top: 3px;
  padding: 10px 14px;
  border: 0.5px solid var(--clr-border);
  border-radius: var(--r-md);
  background: var(--clr-surface);
}
.collapsible-content.open { display: block; }

.credits-btn {
  border: 0.5px solid #d4c8f0;
  border-radius: var(--r-md);
  padding: 7px 12px;
  font-size: 0.75rem;
  color: var(--clr-purple-text);
  background: var(--clr-purple-tint);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: background var(--ease), color var(--ease);
  line-height: 1.4;
  font-family: inherit;
}
.credits-btn:hover {
  background: var(--clr-surface);
  color: var(--clr-text-mid);
}

.bottom-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.copyright {
  font-size: 0.68rem;
  color: var(--clr-text-dim);
  margin-left: auto;
  text-align: right;
  line-height: 1.5;
}

/* Credits modal overlay */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(30, 26, 20, 0.45);
  z-index: 200;
  align-items: center;
  justify-content: center;
}
.overlay.active { display: flex; }

.modal {
  background: var(--clr-bg);
  border: 0.5px solid var(--clr-border);
  border-radius: var(--r-lg);
  padding: 28px 32px;
  max-width: 380px;
  width: 92%;
  position: relative;
}

.modal-title {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--clr-text);
  margin-bottom: 10px;
}

.modal-body {
  font-size: 0.82rem;
  color: var(--clr-text-mid);
  line-height: 1.8;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1rem;
  color: var(--clr-text-dim);
  line-height: 1;
  transition: color var(--ease);
  font-family: inherit;
}
.modal-close:hover { color: var(--clr-text); }


/* ── 10. Biography page ─────────────────────────────────── */

.bio-content { padding-bottom: var(--gap-md); }
.bio-section  { margin-bottom: var(--gap-md); }

.bio-table { width: 100%; border-collapse: collapse; }
.bio-table tr { border-bottom: 0.5px solid var(--clr-border-soft); }
.bio-table tr:last-child { border-bottom: none; }
.bio-table td {
  padding: 8px 0;
  font-size: 0.9rem;
  vertical-align: top;
  line-height: 1.7;
}
.bio-table td:first-child {
  color: var(--clr-text-dim);
  width: 20%;
  padding-left: 14px;
  padding-right: var(--gap-sm);
  font-size: 0.82rem;
}
.bio-table td:last-child { color: var(--clr-text); }

.bio-sources { margin-top: var(--gap-md); }
.bio-source-item {
  font-size: 0.78rem;
  color: var(--clr-text-dim);
  line-height: 1.7;
  padding-left: 10px;
  border-left: 2px solid var(--clr-border);
  margin-bottom: 5px;
}


/* ── 11. Gallery page ───────────────────────────────────── */

.gallery-area { padding: var(--gap-md) 0; }

.gallery-row {
  display: flex;
  justify-content: center;
  gap: var(--gap-sm);
  margin-bottom: var(--gap-sm);
}
.gallery-row:last-child { margin-bottom: 0; }

.thumb {
  width: 128px;
  aspect-ratio: 3 / 4;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 0.5px solid var(--clr-border);
  cursor: pointer;
  background: var(--clr-surface);
  position: relative;
  flex-shrink: 0;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity var(--ease);
}
.thumb:hover img { opacity: 0.82; }

.thumb-zoom {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--ease);
}
.thumb:hover .thumb-zoom { opacity: 1; }
.thumb-zoom svg {
  width: 20px; height: 20px;
  stroke: #fff;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4));
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 12, 8, 0.92);
  z-index: 200;
  align-items: center;
  justify-content: center;
}
.lightbox.active { display: flex; }

.lb-inner {
  position: relative;
  max-width: 88vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap-sm);
}

.lb-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--r-sm);
}

.lb-controls {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
}

.lb-btn {
  background: rgba(255,255,255,0.1);
  border: 0.5px solid rgba(255,255,255,0.25);
  border-radius: var(--r-md);
  padding: 7px 16px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  gap: 5px;
  transition: background var(--ease);
  font-family: inherit;
}
.lb-btn:hover { background: rgba(255,255,255,0.2); }

.lb-counter {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
  min-width: 100px;
  text-align: center;
}

.lb-close {
  position: absolute;
  top: -36px;
  right: 0;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: rgba(255,255,255,0.6);
  transition: color var(--ease);
  font-family: inherit;
}
.lb-close:hover { color: #fff; }


/* ── 12. Inspired Poetry (wheat) page ───────────────────── */

.intro-verse {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  font-style: italic;
  color: var(--clr-text);
  line-height: 1.8;
  margin: 6px 0 6px 48px;
}

.intro-prose {
  font-size: 0.88rem;
  color: var(--clr-text-mid);
  line-height: 1.7;
}

/* ── Verse stanzas (wheat page) ── */
.stanza {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--clr-text);
  margin: 0;
  padding: 0;
  display: block;
}
.stanza + .stanza { margin-top: 1em; }

/* Accordion */
.poem-item { border-bottom: 0.5px solid var(--clr-border-soft); }
.poem-item:first-child { border-top: 0.5px solid var(--clr-border-soft); }

.poem-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  padding: 14px 8px;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: background var(--ease);
  border-radius: var(--r-sm);
}
.poem-trigger:hover { background: rgba(255,255,255,0.45); }

.poem-num {
  font-size: 0.75rem;
  color: var(--clr-gold);
  font-weight: 500;
  min-width: 24px;
  flex-shrink: 0;
}

.poem-title {
  font-size: 1.0rem;
  color: var(--clr-text-mid);
  flex: 1;
  transition: color var(--ease);
  font-weight: 400;
}
.poem-title.open {
  color: var(--clr-text);
  font-weight: 600;
}

.poem-chevron {
  font-size: 0.72rem;
  color: var(--clr-text-dim);
  flex-shrink: 0;
  transition: transform 0.22s ease;
  display: inline-block;
}
.poem-chevron.open { transform: rotate(180deg); }

.poem-body {
  display: none;
  padding: 0 0 20px 34px;
}
.poem-body.open {
  display: block;
  background: rgba(255, 255, 255, 0.75);
  border-radius: 0 0 var(--r-md) var(--r-md);
  padding: 14px 16px 20px 34px;
  margin-bottom: 3px;
}


/* ── 13. Mathnavi index ─────────────────────────────────── */

.mathnavi-intro {
  padding: var(--gap-md) 0;
  border-bottom: 0.5px solid var(--clr-border);
  margin-bottom: var(--gap-md);
}

.mathnavi-intro-verse {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-style: italic;
  color: var(--clr-text);
  line-height: 1.9;
  margin: var(--gap-sm) 0 var(--gap-sm) 36px;
}

.mathnavi-book { margin-bottom: var(--gap-lg); }

/* Book headings — prominent gold */
.mathnavi-book-heading {
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--clr-gold);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--clr-border);
}

/* Section subheadings on poem pages */
.section-subheading {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--clr-gold);
  letter-spacing: 0.02em;
  margin: 1.5rem 0 0.75rem;
  padding-bottom: 5px;
  border-bottom: 0.5px solid var(--clr-border-soft);
}

.mathnavi-list {
  list-style: none;
  display: flex;
  flex-direction: column;
}

/* Selection list items — larger, clearly separated */
.mathnavi-list-item a {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 13px 0;
  border-bottom: 0.5px solid var(--clr-border-soft);
  color: var(--clr-text-mid);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color var(--ease);
}
.mathnavi-list-item a:hover {
  color: var(--clr-text);
  opacity: 1;
}
.mathnavi-list-item:last-child a { border-bottom: none; }

/* Reference column — gold, wider */
.mathnavi-ref {
  font-size: 0.75rem;
  color: var(--clr-gold);
  min-width: 72px;
  flex-shrink: 0;
}

/* Mathnavi poem page nav */
.poem-nav {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-top: 0.5px solid var(--clr-border);
  margin-top: 1.5rem;
}
.poem-nav a {
  font-size: 0.78rem;
  color: var(--clr-text-mid);
  display: flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
}
.poem-nav a:hover { color: var(--clr-text); }

.mathnavi-forthcoming {
  font-size: 0.82rem;
  color: var(--clr-text-dim);
  font-style: italic;
  padding: 9px 0;
}


/* ── 14. Mathnavi poem page ─────────────────────────────── */

.mathnavi-poem-header {
  padding: var(--gap-md) 0 var(--gap-sm);
  border-bottom: 0.5px solid var(--clr-border);
  margin-bottom: var(--gap-md);
}

.mathnavi-poem-ref {
  font-size: 0.75rem;
  color: var(--clr-text-dim);
  margin-bottom: 4px;
}

/* Couplet table: verse# | EN | FA */
.couplet-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--gap-md);
}
.couplet-table tr { border-bottom: 0.5px solid var(--clr-border-soft); }
.couplet-table tr:last-child { border-bottom: none; }

.couplet-num {
  font-size: 0.7rem;
  color: var(--clr-text-dim);
  vertical-align: top;
  padding: 11px 14px 11px 0;
  width: 48px;
  white-space: nowrap;
}

.couplet-en {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  line-height: 1.9;
  color: var(--clr-text);
  vertical-align: top;
  padding: 11px var(--gap-sm) 11px 0;
  width: 52%;
}

.couplet-fa {
  font-family: var(--font-farsi);
  font-size: 1.1rem;
  line-height: 2.1;
  color: var(--clr-text-mid);
  direction: rtl;
  text-align: right;
  vertical-align: top;
  padding: 11px 0;
}

.poem-nav {
  display: flex;
  justify-content: space-between;
  padding: var(--gap-sm) 0;
  border-top: 0.5px solid var(--clr-border);
  margin-top: var(--gap-md);
}
.poem-nav a {
  font-size: 0.82rem;
  color: var(--clr-text-mid);
  display: flex;
  align-items: center;
  gap: 5px;
}
.poem-nav a:hover { color: var(--clr-text); opacity: 1; }


/* ── 15. Divan-e Shams index ────────────────────────────── */

.shams-index-banner {
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  border-radius: var(--r-sm);
  margin-bottom: var(--gap-md);
}

.ghazal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-sm);
  padding: var(--gap-sm) 0 var(--gap-md);
}

.ghazal-card {
  border: 0.5px solid var(--clr-border);
  border-radius: var(--r-md);
  padding: 12px 14px;
  text-decoration: none;
  color: inherit;
  transition: background var(--ease), border-color var(--ease);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ghazal-card:hover {
  background: var(--clr-surface);
  border-color: var(--clr-border);
  opacity: 1;
}

.ghazal-card-ref {
  font-size: 0.68rem;
  color: var(--clr-gold);
}

.ghazal-card-first-line {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  color: var(--clr-text);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shams-notes {
  border-top: 0.5px solid var(--clr-border);
  padding-top: var(--gap-sm);
  margin-top: var(--gap-sm);
}


/* ── 16. Divan-e Shams ghazal page ─────────────────────── */

.ghazal-header {
  padding: var(--gap-md) 0 var(--gap-sm);
  border-bottom: 0.5px solid var(--clr-border);
  margin-bottom: var(--gap-md);
}

.ghazal-std-ref {
  font-size: 0.72rem;
  color: var(--clr-text-dim);
  margin-bottom: 4px;
}

.ghazal-picture {
  max-width: 320px;
  margin: var(--gap-sm) 0;
  border-radius: var(--r-sm);
  border: 0.5px solid var(--clr-border-soft);
}

.version-block { margin-bottom: var(--gap-lg); }

.version-label {
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--clr-gold);
  margin-bottom: var(--gap-sm);
  padding-bottom: 6px;
  border-bottom: 0.5px solid var(--clr-border-soft);
}

.calligraphy-gif {
  display: block;
  max-width: 100%;
  margin: var(--gap-md) auto;
  border-radius: var(--r-sm);
}

.ghazal-couplets {
  display: flex;
  flex-direction: column;
  gap: var(--gap-sm);
}

.ghazal-couplet {
  display: grid;
  grid-template-columns: 28px 1fr 1fr;
  gap: var(--gap-md);
  align-items: start;
  padding: 11px 0;
  border-bottom: 0.5px solid var(--clr-border-soft);
}
.ghazal-couplet:last-child { border-bottom: none; }

.ghazal-couplet-num {
  font-size: 0.68rem;
  color: var(--clr-text-dim);
  padding-top: 4px;
}

.ghazal-couplet-en {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  line-height: 1.9;
  color: var(--clr-text);
}

.ghazal-couplet-fa {
  font-family: var(--font-farsi);
  font-size: 1.1rem;
  line-height: 2.1;
  color: var(--clr-text-mid);
  direction: rtl;
  text-align: right;
}


/* ── 17. Utilities ──────────────────────────────────────── */

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.divider {
  border: none;
  border-top: 0.5px solid var(--clr-border);
  margin: var(--gap-md) 0;
}

.note {
  font-size: 0.78rem;
  color: var(--clr-text-dim);
  font-style: italic;
}

/* Responsive */
@media (max-width: 640px) {
  .site-nav    { padding: 0 var(--gap-sm); }
  .nav-links   { gap: var(--gap-sm); }
  .nav-links a { font-size: 0.7rem; }

  .hero { grid-template-columns: 1fr 120px; gap: var(--gap-md); }
  .hero-portrait { width: 120px; height: 166px; }

  .explore-row-primary   { flex-direction: column; align-items: center; }
  .explore-row-secondary { flex-wrap: wrap; }
  .sec-card-lg { width: 100%; max-width: 340px; }
  .sec-card-sm { width: 100%; max-width: 340px; flex-direction: row; }

  .ghazal-grid { grid-template-columns: repeat(2, 1fr); }

  .ghazal-couplet { grid-template-columns: 24px 1fr; }
  .ghazal-couplet-fa { grid-column: 2; }

  .couplet-table .couplet-fa { display: none; }

  main { padding: 0 var(--gap-sm); }
}
