/* ...existing code... */
/* Dark mode + New Yorker-like fonts and header sizes */

/* Google fonts: Playfair Display for headings, Merriweather for body, Markazi Text + Amiri for Arabic */

:lang(ar), [dir="rtl"] {
  /* use Amiri for body text and Markazi Text for headings (set below) */
  font-family: "Amiri", "Markazi Text", "Merriweather", Georgia, serif;
}

/* Arabic headings use a display/print face */
:lang(ar) h1,
:lang(ar) h2,
[dir="rtl"] h1,
[dir="rtl"] h2 {
  font-family: "Markazi Text", "Playfair Display", serif;
}

/* Arabic body copy tuning */
:lang(ar) p,
[dir="rtl"] p,
:lang(ar) li,
[dir="rtl"] li {
  font-family: "Amiri", serif;
  line-height: 1.75;
  font-size: 18px; /* adjust for your taste */
}

:root{
  --bg: #0b0b0b;
  --surface: #0f1113;
  --muted-surface: #131516;
  --text: #e9e5de;
  --muted: #bdb6ab;
  --accent: #c9a86a; /* subtle gold */
  --border: rgba(255,255,255,0.04);
}

/* Base */
body {
  margin: 0;
  color: var(--text);
  background: radial-gradient(ellipse at top left, #0d0d0d 0%, var(--bg) 60%);
  font-family: "Merriweather", Georgia, "Times New Roman", serif;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Links */
a {
  color: var(--accent);
  text-decoration: none;
  transition: color .15s ease;
}
a:hover {
  color: #ffdca5;
  text-decoration: underline;
}

/* Layout */
.wrap {
  width: min(760px, calc(100% - 2rem));
  margin: 0 auto;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
  color: var(--text);
}
.site-header .wrap {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1.5rem 0;
}

/* Title & nav */
.site-title {
  color: var(--text);
  text-decoration: none;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.site-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.95rem;
}
.site-nav a { color: var(--muted); }

/* Intros & headers */
.page-intro {
  margin: 2.75rem 0 2rem;
}
.page-intro h1,
.article-header h1,
.listing h2 {
  margin-bottom: 0.35rem;
  line-height: 1.15;
  font-family: "Playfair Display", Georgia, serif;
  color: var(--text);
}

/* Heading scales */
.page-intro h1, .article-header h1 {
  font-size: 2.6rem; /* larger, editorial feel */
  font-weight: 600;
  letter-spacing: -0.02em;
}
.listing h2 {
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--text);
}
h3 { font-size: 1.15rem; font-weight: 500; color: var(--text); }

/* Articles & listing cards */
.listing,
.article {
  padding: 0 0 2.25rem;
  margin: 0 0 2rem;
  border-bottom: 1px solid var(--border);
}
.meta,
.meta-inline,
.eyebrow {
  color: var(--muted);
  font-size: 0.95rem;
}
.eyebrow {
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Article body */
.article-body {
  color: var(--text);
  font-size: 1.05rem;
}
.article-body > :first-child { margin-top: 0; }
.article-body p { margin: 0 0 1.15rem; }

/* Pagination & series */
.pagination {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 3rem;
}
.pagination a:only-child:last-child { margin-left: auto; }
.series-link { margin-top: 2rem; }

/* Small screens */
@media (max-width: 640px) {
  .site-header .wrap {
    flex-direction: column;
    align-items: flex-start;
  }
  .page-intro h1, .article-header h1 {
    font-size: 2rem;
  }
  .wrap { width: calc(100% - 2rem); }
}

/* Accessibility: increase contrast for code/pre/strong */
strong, b { color: var(--text); font-weight: 700; }
pre, code {
  background: var(--muted-surface);
  color: var(--text);
  padding: 0.25rem 0.4rem;
  border-radius: 4px;
  font-family: SFMono-Regular, Menlo, Monaco, "Roboto Mono", monospace;
  font-size: 0.95rem;
}

.profile-img {
display: block;
max-width: 100%;
height: auto;
width: 200px; /* default displayed size on wide screens */
height: 200px;
object-fit: cover; /* crop to fit */
border-radius: 50%;
aspect-ratio: 1/1; /* reserves layout, prevents CLS */
}
@media (max-width:640px){
.profile-img { width: 50vw; height: 50vw; }
}

/* ...existing code... */