/* ==========================================================================
   Zeeshan Mehdi — Journal
   Readability first. Literata for reading, Inter for interface.
   ========================================================================== */

/* ---------- Fonts (self-hosted, variable, optical sizing) ---------- */
@font-face {
  font-family: "Literata";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/assets/fonts/literata-latin-opsz-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Literata";
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url("/assets/fonts/literata-latin-opsz-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Literata";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/assets/fonts/literata-latin-ext-opsz-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Literata";
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url("/assets/fonts/literata-latin-ext-opsz-italic.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Noto Nastaliq Urdu";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/noto-nastaliq-urdu-arabic-400-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

/* ---------- Design tokens ---------- */
:root {
  /* Warm paper, soft ink. Body text contrast ≈ 15:1, muted text ≥ 5.5:1 */
  --paper: #faf7f2;
  --paper-raised: #f3eee5;
  --ink: #221f1a;
  --ink-soft: #3d3831;
  --muted: #6a6358;
  --rule: #e4dccf;
  --accent: #a8401c;
  --accent-soft: rgba(168, 64, 28, 0.1);
  --highlight: #f7e3b5;
  --code-bg: #f0eadf;
  --selection: #f3d7c3;

  --font-serif: "Literata", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --font-sans: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-urdu: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Urdu Typesetting", "Noto Naskh Arabic", serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  /* Reading size: 18px on phones → 21px on large screens */
  --text-body: clamp(1.125rem, 1.02rem + 0.45vw, 1.3125rem);
  --leading: 1.72;
  --measure: 36rem;          /* ~66–70 characters per line */
  --wide: 46rem;
  --gutter: clamp(1.25rem, 4vw, 2rem);
  --radius: 10px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #171512;
    --paper-raised: #201d19;
    --ink: #ebe5da;
    --ink-soft: #d4cdc1;
    --muted: #a39b8e;
    --rule: #332f29;
    --accent: #eb8d64;
    --accent-soft: rgba(235, 141, 100, 0.13);
    --highlight: #5a4520;
    --code-bg: #24211c;
    --selection: #5b3526;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #171512;
  --paper-raised: #201d19;
  --ink: #ebe5da;
  --ink-soft: #d4cdc1;
  --muted: #a39b8e;
  --rule: #332f29;
  --accent: #eb8d64;
  --accent-soft: rgba(235, 141, 100, 0.13);
  --highlight: #5a4520;
  --code-bg: #24211c;
  --selection: #5b3526;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 5rem;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: var(--text-body);
  line-height: var(--leading);
  font-optical-sizing: auto;
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

main { flex: 1; outline: none; }

::selection { background: var(--selection); color: var(--ink); }

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent);
  text-decoration-thickness: 0.075em;
  text-underline-offset: 0.2em;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
a:hover { color: var(--accent); text-decoration-color: var(--accent); }

:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--paper);
  font: 600 0.9rem/1 var(--font-sans);
  border-radius: 6px;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; color: var(--paper); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
  padding-top: env(safe-area-inset-top);
}
@supports (animation-timeline: scroll()) {
  .site-header { animation: header-rule linear both; animation-timeline: scroll(); animation-range: 0 80px; }
  @keyframes header-rule { to { border-bottom-color: var(--rule); } }
}

.site-header__inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0.85rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.wordmark:hover { color: var(--ink); }
.wordmark__mark {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: 1.05rem;
  font-style: italic;
  font-weight: 500;
  line-height: 1;
  transition: background 0.2s ease, transform 0.3s ease;
}
.wordmark:hover .wordmark__mark { background: var(--accent); transform: rotate(-8deg); }

.site-nav { display: flex; align-items: center; gap: 0.25rem; }
.site-nav ul {
  display: flex;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  display: block;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  font: 500 0.875rem/1.2 var(--font-sans);
  color: var(--muted);
  text-decoration: none;
}
.site-nav a:hover { color: var(--ink); background: var(--paper-raised); }
.site-nav a[aria-current] { color: var(--ink); }

.theme-toggle {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-left: 0.25rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.theme-toggle:hover { color: var(--ink); background: var(--paper-raised); }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
}

@media (max-width: 34rem) {
  .wordmark__name { display: none; }
  .site-nav a { padding: 0.45rem 0.5rem; font-size: 0.85rem; }
}

/* ---------- Reading progress (pure CSS, where supported) ---------- */
.progress { display: none; }
@supports (animation-timeline: scroll()) {
  .progress {
    display: block;
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 20;
    height: 3px;
    background: var(--accent);
    transform-origin: 0 50%;
    transform: scaleX(0);
    animation: progress linear both;
    animation-timeline: scroll(root);
  }
  @keyframes progress { to { transform: scaleX(1); } }
}

/* ---------- Home intro ---------- */
.intro {
  max-width: var(--wide);
  margin: 0 auto;
  padding: clamp(3rem, 9vw, 6.5rem) var(--gutter) clamp(2rem, 5vw, 3.5rem);
}
.intro--center { text-align: center; padding-bottom: clamp(4rem, 12vw, 8rem); }
.intro__eyebrow,
.page-head__eyebrow,
.kicker {
  margin: 0 0 1rem;
  font: 600 0.78rem/1.4 var(--font-sans);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
}
.page-head__eyebrow a { text-decoration: none; }
.intro__title {
  margin: 0;
  font-size: clamp(2.6rem, 1.6rem + 5vw, 4.6rem);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.028em;
  text-wrap: balance;
}
.intro__lede {
  max-width: 34rem;
  margin: 1.5rem 0 0;
  font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.35rem);
  line-height: 1.6;
  color: var(--ink-soft);
  text-wrap: pretty;
}
.intro--center .intro__lede { margin-inline: auto; }

/* ---------- Page heads (archive, topics) ---------- */
.page-head {
  max-width: var(--wide);
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 5rem) var(--gutter) 1rem;
}
.page-head__title {
  margin: 0;
  font-size: clamp(2.2rem, 1.6rem + 3vw, 3.4rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.025em;
}
.page-head__dek {
  margin: 0.75rem 0 0;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--muted);
}

/* ---------- Entry list ---------- */
.list-wrap {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(3rem, 8vw, 6rem);
}
.year { margin-top: 2.5rem; }
.year__label {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 0 0.5rem;
  font: 600 0.8rem/1 var(--font-sans);
  letter-spacing: 0.12em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.year__label::after { content: ""; flex: 1; height: 1px; background: var(--rule); }

.entries { margin: 0; padding: 0; list-style: none; }
.entry-card {
  position: relative;
  display: grid;
  grid-template-columns: 4.75rem 1fr;
  gap: 1.25rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--rule);
}
.entry-card:last-child { border-bottom: 0; }
.entry-card__date {
  padding-top: 0.45rem;
  font: 500 0.85rem/1.3 var(--font-sans);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.entry-card__title {
  margin: 0;
  font-size: clamp(1.3rem, 1.15rem + 0.6vw, 1.6rem);
  font-weight: 560;
  line-height: 1.25;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.entry-card__title a { text-decoration: none; }
/* Whole card is clickable, while keeping one accessible link */
.entry-card__title a::after { content: ""; position: absolute; inset: 0; }
.entry-card:hover .entry-card__title a { color: var(--accent); }
.entry-card__excerpt {
  margin: 0.5rem 0 0;
  color: var(--ink-soft);
  font-size: 1.02rem;
  line-height: 1.62;
  text-wrap: pretty;
}
.entry-card__meta {
  margin: 0.6rem 0 0;
  font: 400 0.82rem/1.4 var(--font-sans);
  color: var(--muted);
}

.list-wrap--compact .entry-card { padding: 1rem 0; align-items: baseline; }
.list-wrap--compact .entry-card__date { padding-top: 0; }
.list-wrap--compact .entry-card__title { font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.3rem); }
.list-wrap--compact .entry-card__meta { margin-top: 0.3rem; }

@media (max-width: 34rem) {
  .entry-card { grid-template-columns: 1fr; gap: 0.35rem; }
  .entry-card__date { padding-top: 0; }
}

.more-link { margin-top: 2rem; font-family: var(--font-sans); font-size: 0.95rem; }
.empty { color: var(--muted); font-style: italic; }

.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
  background: var(--accent-soft);
  color: var(--accent);
  font: 600 0.7rem/1.4 var(--font-sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: middle;
}

/* ---------- Topic index ---------- */
.topic-index {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}
.topic-index a {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.6rem 0.55rem 1rem;
  border: 1px solid var(--rule);
  border-radius: 99px;
  font-size: 1.05rem;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.topic-index a:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.topic-index__count {
  min-width: 1.6rem;
  padding: 0.1rem 0.45rem;
  border-radius: 99px;
  background: var(--paper-raised);
  font: 600 0.75rem/1.5 var(--font-sans);
  text-align: center;
  color: var(--muted);
}

/* ---------- Article ---------- */
.entry {
  padding: clamp(2.5rem, 7vw, 5rem) var(--gutter) 0;
}
.entry__header,
.entry__footer {
  max-width: var(--measure);
  margin: 0 auto;
}
.kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 0 0.5rem; margin-bottom: 1.1rem; }
.kicker__sep { color: var(--muted); }
.kicker__place { color: var(--muted); }
.entry__title {
  margin: 0;
  font-size: clamp(2.2rem, 1.5rem + 3.4vw, 3.5rem);
  font-weight: 560;
  line-height: 1.08;
  letter-spacing: -0.028em;
  text-wrap: balance;
}
.entry__dek {
  margin: 1.1rem 0 0;
  font-size: clamp(1.2rem, 1.1rem + 0.45vw, 1.4rem);
  font-style: italic;
  font-weight: 380;
  line-height: 1.5;
  color: var(--ink-soft);
  text-wrap: pretty;
}
.entry__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
  margin: 1.5rem 0 0;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
  font: 400 0.85rem/1.4 var(--font-sans);
  color: var(--muted);
}
.entry__cover {
  max-width: var(--wide);
  margin: 2.5rem auto 0;
}
.entry__cover img { display: block; width: 100%; border-radius: var(--radius); }
.entry__cover figcaption,
.prose figcaption {
  margin-top: 0.75rem;
  font: 400 0.85rem/1.5 var(--font-sans);
  color: var(--muted);
  text-align: center;
}

/* ---------- Prose: the reading experience ---------- */
.prose {
  max-width: var(--measure);
  margin: 2.25rem auto 0;
  font-variant-numeric: oldstyle-nums proportional-nums;
  hanging-punctuation: first allow-end last;
  overflow-wrap: break-word;
}
.prose > * { margin-top: 0; margin-bottom: 0; }
.prose > * + * { margin-top: 1.4em; }

.prose p { text-wrap: pretty; }

/* Gently larger opening paragraph */
.is-post .prose > p:first-child {
  font-size: 1.08em;
  line-height: 1.65;
}

.prose h2,
.prose h3,
.prose h4 {
  font-variant-numeric: lining-nums;
  text-wrap: balance;
  letter-spacing: -0.015em;
  scroll-margin-top: 5rem;
}
.prose h2 {
  margin-top: 2.4em;
  font-size: 1.55em;
  font-weight: 600;
  line-height: 1.22;
}
.prose h3 {
  margin-top: 2em;
  font-size: 1.22em;
  font-weight: 600;
  line-height: 1.3;
}
.prose h4 {
  margin-top: 1.8em;
  font: 650 0.8em/1.4 var(--font-sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: 0.7em; }
.prose .header-anchor { text-decoration: none; }
.prose .header-anchor:hover { color: inherit; }

.prose strong { font-weight: 640; }
.prose em { font-style: italic; }
.prose mark {
  padding: 0.05em 0.2em;
  border-radius: 3px;
  background: var(--highlight);
  color: inherit;
}
.prose abbr[title] { text-decoration: underline dotted; cursor: help; }
.prose small { font-size: 0.85em; }

.prose ul,
.prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: 0.45em; }
.prose li > ul, .prose li > ol { margin-top: 0.45em; }
.prose ul li::marker { color: var(--accent); }
.prose ol li::marker {
  color: var(--muted);
  font: 500 0.85em var(--font-sans);
  font-variant-numeric: tabular-nums;
}

.prose blockquote {
  margin-inline: 0;
  padding: 0.1em 0 0.1em 1.4em;
  border-left: 3px solid var(--accent);
  font-style: italic;
  color: var(--ink-soft);
}
.prose blockquote > * + * { margin-top: 1em; }
.prose blockquote p { margin: 0; }
.prose blockquote cite,
.prose blockquote footer {
  display: block;
  margin-top: 0.8em;
  font: normal 400 0.85rem/1.4 var(--font-sans);
  color: var(--muted);
}

/* A pull quote: <p class="pullquote">…</p> */
.prose .pullquote {
  margin-block: 2em;
  padding: 0;
  font-size: 1.45em;
  font-weight: 450;
  font-style: italic;
  line-height: 1.38;
  letter-spacing: -0.01em;
  text-align: center;
  color: var(--ink);
  text-wrap: balance;
}
.prose .pullquote::before,
.prose .pullquote::after {
  content: "";
  display: block;
  width: 3rem;
  height: 1px;
  margin: 0 auto 1em;
  background: var(--accent);
}
.prose .pullquote::after { margin: 1em auto 0; }

.prose hr {
  margin-block: 2.6em;
  height: auto;
  border: 0;
  text-align: center;
  overflow: visible;
}
.prose hr::before {
  content: "⁂";
  font-size: 1.1em;
  letter-spacing: 0.3em;
  color: var(--muted);
}

.prose img,
.prose video {
  display: block;
  border-radius: var(--radius);
}
.prose figure { margin-inline: 0; }
/* Wide figures break out of the text column on larger screens */
@media (min-width: 52rem) {
  .prose figure.wide,
  .prose .wide {
    width: min(var(--wide), calc(100vw - 2 * var(--gutter)));
    margin-left: 50%;
    transform: translateX(-50%);
  }
}

.prose code {
  padding: 0.12em 0.35em;
  border-radius: 5px;
  background: var(--code-bg);
  font-family: var(--font-mono);
  font-size: 0.84em;
  font-variant-numeric: normal;
}
.prose pre {
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius);
  background: var(--code-bg);
  overflow-x: auto;
  font-size: 0.82em;
  line-height: 1.6;
  tab-size: 2;
}
.prose pre code { padding: 0; background: none; font-size: inherit; }

.prose table {
  width: 100%;
  border-collapse: collapse;
  font: 400 0.92rem/1.5 var(--font-sans);
  font-variant-numeric: tabular-nums;
}
.prose th,
.prose td { padding: 0.6rem 0.75rem 0.6rem 0; border-bottom: 1px solid var(--rule); text-align: left; }
.prose th { font-weight: 600; color: var(--muted); font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase; }
.table-scroll { overflow-x: auto; }

.prose kbd {
  padding: 0.1em 0.4em;
  border: 1px solid var(--rule);
  border-bottom-width: 2px;
  border-radius: 4px;
  font: 500 0.8em var(--font-sans);
}

/* Footnotes */
.prose .footnote-ref a {
  padding: 0 0.1em;
  font: 600 0.7em var(--font-sans);
  text-decoration: none;
  color: var(--accent);
}
.prose .footnotes-sep { margin-top: 3em; }
.prose .footnotes {
  font-size: 0.88em;
  line-height: 1.6;
  color: var(--ink-soft);
}
.prose .footnotes-list { padding-left: 1.2em; }
.prose .footnote-backref { text-decoration: none; }

/* Urdu couplets (sher):
   <figure class="sher">
     <blockquote lang="ur" dir="rtl">line one<br>line two</blockquote>
     <figcaption><span class="sher__tr">English line one<br>English line two</span>
     <span class="sher__poet">Poet</span></figcaption>
   </figure> */
.prose [lang="ur"] { font-family: var(--font-urdu); font-style: normal; }
.prose .sher {
  margin-block: 2.2em;
  margin-inline: 0;
  padding: 1.6em 1.25em 1.3em;
  border-radius: var(--radius);
  background: var(--paper-raised);
  text-align: center;
}
.prose .sher blockquote {
  margin: 0;
  padding: 0;
  border: 0;
  font-family: var(--font-urdu);
  font-size: 1.28em;
  font-style: normal;
  line-height: 2.35;
  color: var(--ink);
  text-wrap: balance;
}
.prose .sher figcaption {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  margin-top: 0.9em;
  font-family: var(--font-serif);
  font-size: 1rem;
  text-align: center;
}
.prose .sher__tr {
  font-size: 0.95em;
  font-style: italic;
  line-height: 1.55;
  color: var(--ink-soft);
}
.prose .sher__poet {
  font: 600 0.72rem/1.4 var(--font-sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.prose .sher__poet cite { font-style: normal; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--muted); }
@media (max-width: 34rem) {
  .prose .sher { padding-inline: 0.9em; }
  .prose .sher blockquote { font-size: 1.15em; }
}

/* ---------- Article footer ---------- */
.entry__footer { padding-top: 1rem; }
.fin {
  margin: 2.5rem 0 2rem;
  text-align: center;
  font-size: 1.4rem;
  color: var(--accent);
}
.tag-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tag {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--rule);
  border-radius: 99px;
  font: 500 0.82rem/1.3 var(--font-sans);
  color: var(--ink-soft);
  text-decoration: none;
}
.tag:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.entry__updated {
  margin: 1.5rem 0 0;
  text-align: center;
  font: 400 0.82rem/1.4 var(--font-sans);
  color: var(--muted);
}

/* ---------- Prev / next ---------- */
.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  max-width: var(--wide);
  margin: clamp(3rem, 8vw, 5rem) auto 0;
  padding: 0 var(--gutter) clamp(3rem, 8vw, 5rem);
}
.pager__link {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.25rem 1.4rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.2s ease, background 0.15s ease;
}
.pager__link:hover { border-color: var(--accent); background: var(--paper-raised); color: var(--ink); }
@media (prefers-reduced-motion: no-preference) {
  .pager__link:hover { transform: translateY(-2px); }
}
.pager__link--newer { grid-column: 2; text-align: right; }
.pager__label {
  font: 600 0.75rem/1.3 var(--font-sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.pager__title {
  font-size: 1.12rem;
  font-weight: 560;
  line-height: 1.3;
  text-wrap: balance;
}
@media (max-width: 34rem) {
  .pager { grid-template-columns: 1fr; }
  .pager__link--newer { grid-column: auto; grid-row: 1; }
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--rule);
  padding-bottom: env(safe-area-inset-bottom);
}
.is-post .site-footer { margin-top: 0; }
.site-footer__inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 2.25rem var(--gutter) 2.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  font: 400 0.85rem/1.5 var(--font-sans);
  color: var(--muted);
}
.site-footer__sign {
  flex-basis: 100%;
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--ink-soft);
}
.fleuron { color: var(--accent); font-style: normal; margin-right: 0.35rem; }
.site-footer__links { display: flex; gap: 1.25rem; margin: 0; padding: 0; list-style: none; }
.site-footer__links a { text-decoration: none; }
.site-footer__copy { margin: 0; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .intro, .page-head, .entry__header {
    animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  .list-wrap, .prose, .entry__cover {
    animation: rise 0.6s 0.08s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  @keyframes rise {
    from { opacity: 0; transform: translateY(10px); }
  }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .pager, .progress, .skip-link { display: none !important; }
  body { background: #fff; color: #000; font-size: 11.5pt; }
  .prose a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; }
}

/* ---------- Newsletter sign-up ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.subscribe-wrap {
  max-width: var(--measure);
  margin: clamp(2.5rem, 6vw, 3.5rem) auto 0;
  padding: 0 var(--gutter);
  box-sizing: content-box;
}
.list-wrap .subscribe { margin-top: 3rem; }
.subscribe {
  padding: clamp(1.5rem, 4vw, 2.1rem);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--paper-raised);
}
.subscribe__title {
  margin: 0;
  font-size: clamp(1.3rem, 1.15rem + 0.6vw, 1.55rem);
  font-weight: 560;
  line-height: 1.25;
  letter-spacing: -0.015em;
}
.subscribe__text {
  margin: 0.5rem 0 0;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-soft);
}
.subscribe__form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.25rem;
}
.subscribe__input {
  flex: 1 1 14rem;
  min-width: 0;
  padding: 0.8rem 1rem;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.3 var(--font-sans);
}
.subscribe__input::placeholder { color: var(--muted); }
.subscribe__input:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.subscribe__button {
  flex: 0 0 auto;
  padding: 0.8rem 1.35rem;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font: 600 0.95rem/1.3 var(--font-sans);
  cursor: pointer;
  transition: background 0.15s ease;
}
.subscribe__button:hover { background: var(--accent); }
.subscribe__alt {
  margin: 0.9rem 0 0;
  font: 400 0.82rem/1.5 var(--font-sans);
  color: var(--muted);
}
@media (max-width: 34rem) {
  .subscribe__button { flex: 1 1 100%; }
}
