/* =====================================================================
   مدونة صلاح — Public stylesheet
   Extracted verbatim from index.html + article.html mockups.
   Do not modify tokens, spacing, or animations without updating both.
   ===================================================================== */

/* ============ Design Tokens ============ */
:root {
  --bg: #fafaf7;
  --bg-elev: #ffffff;
  --bg-soft: #f4f2ec;
  --ink: #1a1a1a;
  --ink-soft: #3d3d3d;
  --muted: #6b6b6b;
  --line: #e6e2d8;
  --accent: #8b6f3f;
  --accent-soft: #c9b48a;
  --highlight: #fff8e7;
  --shadow-sm: 0 1px 2px rgba(26,26,26,0.04);
  --shadow-md: 0 6px 24px rgba(26,26,26,0.06);
  --shadow-lg: 0 20px 60px rgba(26,26,26,0.08);
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;
  --serif: 'IBM Plex Sans Arabic', -apple-system, sans-serif;
  --sans: 'IBM Plex Sans Arabic', -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --transition: cubic-bezier(.2,.7,.2,1);
}
[data-theme="dark"] {
  --bg: #111110;
  --bg-elev: #181816;
  --bg-soft: #1f1e1b;
  --ink: #ececea;
  --ink-soft: #c9c9c4;
  --muted: #8a8a83;
  --line: #2a2924;
  --accent: #d9b97a;
  --accent-soft: #8b6f3f;
  --highlight: #2a2519;
  --shadow-md: 0 6px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.5);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  /* intentionally no transition on bg/color — theme toggle must be instant */
}
a { color: inherit; text-decoration: none; transition: color 0.2s var(--transition); }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
.narrow { max-width: 720px; margin: 0 auto; padding: 0 28px; }

/* ============ Reading Progress ============ */
.progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 3px; background: transparent; z-index: 1000;
}
.progress__bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  transition: width 0.1s linear;
}

/* ============ Header ============ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--transition);
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  font-weight: 600; font-size: 19px;
  letter-spacing: -0.01em;
}
.brand__logo {
  height: 44px;
  width: auto;
  display: block;
  transition: filter 0.3s var(--transition);
}
[data-theme="dark"] .brand__logo { filter: invert(1) brightness(1.1); }

.nav { display: flex; gap: 4px; align-items: center; }
.nav a {
  padding: 8px 14px; border-radius: var(--radius-sm);
  color: var(--ink-soft); font-size: 15px; font-weight: 500;
  transition: all 0.2s var(--transition);
  position: relative;
}
.nav a:hover { color: var(--ink); background: var(--bg-soft); }
.nav a.active { color: var(--accent); }
.nav a.active::after {
  content: ''; position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; background: var(--accent); border-radius: 50%;
}

/* ============ Header Filters ============ */
.header-filters {
  display: flex; gap: 4px; align-items: center;
  padding: 5px;
  background: var(--bg-soft);
  border-radius: 999px;
}
.header-filters .filter {
  padding: 8px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 500; color: var(--muted);
  transition: color 0.15s var(--transition), background-color 0.15s var(--transition), box-shadow 0.15s var(--transition);
  white-space: nowrap;
  border: 0; background: none; cursor: pointer;
  font-family: inherit;
  text-decoration: none;
}
.header-filters .filter:hover { color: var(--ink); }
.header-filters .filter.active {
  background: var(--bg-elev); color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.header-filters .filter--link { text-decoration: none; }
.filter-divider {
  width: 1px; height: 20px;
  background: var(--line);
  margin: 0 4px;
  display: inline-block;
}

.header-actions { display: flex; gap: 6px; align-items: center; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; color: var(--ink-soft);
  transition: all 0.2s var(--transition);
}
.icon-btn:hover { background: var(--bg-soft); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }

.mobile-toggle { display: none; }

/* ============ Mobile Drawer ============ */
.menu-btn { display: none; }
.drawer {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s var(--transition);
  z-index: 200;
}
.drawer.open { opacity: 1; pointer-events: auto; }
.drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(82%, 320px);
  background: var(--bg-elev);
  padding: 24px 24px 40px;
  transform: translateX(100%);
  transition: transform 0.3s var(--transition);
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
}
.drawer.open .drawer__panel { transform: translateX(0); }
.drawer__header {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}
.drawer__title {
  font-size: 13px; font-weight: 600; color: var(--muted);
  letter-spacing: 0;
}
.drawer__close {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; color: var(--ink-soft);
  transition: all 0.2s; background: none; border: 0; cursor: pointer;
}
.drawer__close:hover { background: var(--bg-soft); color: var(--ink); }
.drawer__close svg { width: 18px; height: 18px; }
.drawer__links { display: flex; flex-direction: column; gap: 2px; }
.drawer__link {
  padding: 14px 16px; border-radius: var(--radius-sm);
  font-size: 16px; font-weight: 500; color: var(--ink);
  display: flex; align-items: center; justify-content: space-between;
  transition: all 0.2s;
  border: 0; background: none; cursor: pointer; text-align: right;
  font-family: inherit; width: 100%;
  text-decoration: none;
}
.drawer__link:hover { background: var(--bg-soft); color: var(--accent); }
.drawer__link.active {
  background: var(--bg-soft); color: var(--accent); font-weight: 600;
}
.drawer__link svg { width: 16px; height: 16px; opacity: 0.6; }
.drawer__divider { height: 1px; background: var(--line); margin: 16px 0; }
body.drawer-open { overflow: hidden; }

/* ============ Hero ============ */
.hero {
  padding: 90px 0 70px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute;
  top: -100px; left: -100px; width: 400px; height: 400px;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 70%);
  opacity: 0.15; border-radius: 50%;
  filter: blur(40px); pointer-events: none;
}
.hero-inner { max-width: 760px; }
.hero__kicker {
  font-size: 13px;
  /* Arabic is cursive — letter-spacing breaks the connecting strokes.
     Keep it at 0 so glyphs stay joined. */
  letter-spacing: 0;
  color: var(--accent); margin-bottom: 24px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 10px;
}
.hero__kicker::before {
  content: ''; width: 28px; height: 1px; background: var(--accent);
}
.hero__title {
  font-family: var(--serif);
  font-size: clamp(32px, 4.8vw, 56px);
  line-height: 1.15; font-weight: 700;
  margin: 0 0 24px; letter-spacing: -0.02em;
}
.hero__title em {
  font-style: italic; color: var(--accent); font-weight: 400;
}
.hero__lede {
  font-size: clamp(17px, 1.8vw, 20px);
  color: var(--ink-soft); max-width: 580px;
  line-height: 1.75;
}

/* ============ Shared utilities ============ */
.dot { width: 3px; height: 3px; background: var(--muted); border-radius: 50%; }

/* ============ Section ============ */
.section { padding: 40px 0 80px; }
.section-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 48px; gap: 24px; flex-wrap: wrap;
  padding-bottom: 28px; border-bottom: 1px solid var(--line);
}
.section-title {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 700; margin: 0;
  letter-spacing: -0.01em;
}
.section-count { color: var(--muted); font-size: 14px; margin-top: 6px; }

/* ============ Mobile Filter Bar (≤860px) ============ */
.mobile-filters { display: none; }
@media (max-width: 860px) {
  #articles .section-header { display: none; }
  .mobile-filters {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 5px;
    background: var(--bg-soft);
    border-radius: 999px;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 0 28px;
    width: max-content;
    max-width: 100%;
  }
  .mobile-filters::-webkit-scrollbar { display: none; }
  .mobile-filters .filter {
    padding: 8px 16px; border-radius: 999px;
    font-size: 13px; font-weight: 500; color: var(--muted);
    transition: color 0.15s var(--transition), background-color 0.15s var(--transition), box-shadow 0.15s var(--transition);
    white-space: nowrap;
    border: 0; background: none; cursor: pointer;
    font-family: inherit;
    text-decoration: none;
  }
  .mobile-filters .filter:hover { color: var(--ink); }
  .mobile-filters .filter.active {
    background: var(--bg-elev); color: var(--ink);
    box-shadow: var(--shadow-sm);
  }
  .mobile-filters .filter-divider {
    width: 1px; height: 18px;
    background: var(--line);
    margin: 0 4px;
    flex-shrink: 0;
  }
}

/* ============ Articles List — Typographic ============ */
.articles { display: flex; flex-direction: column; }
.article {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "cat   date"
    "title title"
    "ex    ex";
  column-gap: 18px;
  row-gap: 10px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  align-items: baseline;
}
.article:last-child { border-bottom: 0; }
.article__num,
.article__read { display: none; }
.article__category {
  grid-area: cat;
  /* IBM Plex Mono doesn't ship Arabic glyphs — falls back to a generic
     monospace that breaks cursive joins. Use Plex Sans Arabic instead.
     letter-spacing kept at 0 for the same cursive reason. */
  font-family: var(--sans);
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}
.article__title {
  grid-area: title;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(20px, 2.2vw, 26px);
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin: 0;
  text-wrap: balance;
  transition: color 0.2s var(--transition);
}
.article:hover .article__title { color: var(--accent); }
.article__date { grid-area: date; }
.article__read { grid-area: read; }
.article__date,
.article__read {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0;
  white-space: nowrap;
}
.article__excerpt {
  grid-area: ex;
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
  max-width: 70ch;
}

/* ============ Pagination ============ */
.pagination {
  display: flex; justify-content: center; gap: 8px;
  margin-top: 60px;
}
.pagination button,
.pagination a,
.pagination span.dots {
  width: 44px; height: 44px; border-radius: 50%;
  font-size: 14px; font-weight: 500;
  color: var(--ink-soft);
  transition: all 0.2s var(--transition);
  display: inline-grid; place-items: center;
  font-family: inherit;
  text-decoration: none;
  background: none;
  border: 0;
  cursor: pointer;
}
.pagination a:hover,
.pagination button:hover:not(.active):not(:disabled) {
  background: var(--bg-soft); color: var(--ink);
}
.pagination .active,
.pagination button.active,
.pagination a.active {
  background: var(--ink); color: var(--bg);
}
.pagination button:disabled {
  opacity: 0.3; cursor: default;
}
[data-theme="dark"] .pagination .active,
[data-theme="dark"] .pagination button.active,
[data-theme="dark"] .pagination a.active {
  background: var(--accent); color: var(--bg);
}

/* ============ Breadcrumb ============ */
.breadcrumb {
  padding: 40px 0 0;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
}
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb svg { width: 12px; height: 12px; }

/* ============ Article Header ============ */
.article-header { padding: 40px 0 50px; }
.article-header__tag {
  display: inline-block; padding: 6px 14px;
  background: var(--highlight); color: var(--accent);
  font-size: 13px; font-weight: 600;
  border-radius: 999px; letter-spacing: 0;
  margin-bottom: 24px;
}
.article-header__title {
  font-family: var(--serif);
  font-size: clamp(36px, 5.5vw, 62px);
  line-height: 1.15; font-weight: 700;
  margin: 0 0 28px; letter-spacing: -0.02em;
  color: var(--ink);
}
.article-header__lede {
  font-family: var(--serif);
  font-size: clamp(20px, 2.2vw, 24px);
  line-height: 1.6; font-style: italic;
  color: var(--ink-soft);
  margin: 0 0 40px;
  font-weight: 400;
}
.article-header__meta {
  display: flex; align-items: center; gap: 18px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.author { display: flex; align-items: center; gap: 12px; }
.author__avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 18px; font-weight: 700;
  overflow: hidden;
}
.author__avatar img { width: 100%; height: 100%; object-fit: cover; }
.author__info { display: flex; flex-direction: column; line-height: 1.3; }
.author__name { font-size: 14px; font-weight: 600; color: var(--ink); }
.author__role { font-size: 12px; color: var(--muted); }
.meta-dot { width: 3px; height: 3px; background: var(--muted); border-radius: 50%; }
.article-header__meta-text {
  font-size: 14px; color: var(--muted);
  display: flex; align-items: center; gap: 14px;
}

/* ============ Hero Image (article page) ============ */
.hero-image {
  margin: 0 0 60px;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.hero-image img {
  width: 100%; height: 100%; object-fit: cover;
}
.hero-image__caption {
  max-width: 720px;
  margin: 16px auto 0;
  padding: 0 28px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  font-style: italic;
}

/* ============ Article Body ============ */
.article-body {
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.95;
  color: var(--ink-soft);
  font-weight: 400;
}
.article-body > * + * { margin-top: 1.4em; }
.article-body p { margin: 0 0 1.4em; }
.article-body h2 {
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.3; font-weight: 700;
  margin: 2em 0 0.7em;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.article-body h3 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  margin: 1.8em 0 0.6em;
  color: var(--ink);
}
.article-body blockquote {
  margin: 2em -20px;
  padding: 24px 40px;
  border-right: 3px solid var(--accent);
  background: var(--bg-soft);
  border-radius: var(--radius);
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.7;
  font-style: italic;
  color: var(--ink);
}
.article-body blockquote p { margin: 0; }
.article-body blockquote cite {
  display: block;
  margin-top: 12px;
  font-size: 14px;
  font-family: var(--sans);
  font-style: normal;
  color: var(--muted);
}
.article-body a {
  color: var(--accent);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  transition: all 0.2s;
}
.article-body a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}
.article-body strong { color: var(--ink); font-weight: 600; }
.article-body em { font-style: italic; }
.article-body ul, .article-body ol {
  margin: 1.4em 0;
  padding-right: 24px;
}
.article-body li { margin-bottom: 8px; }
.article-body figure {
  margin: 2.5em -40px;
}
.article-body figure img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.article-body figure figcaption {
  margin-top: 14px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
}
.article-body hr {
  border: 0;
  margin: 3em auto;
  width: 80px;
  height: 1px;
  background: var(--line);
  position: relative;
}
.article-body hr::before {
  content: '§';
  position: absolute;
  top: -12px; left: 50%;
  transform: translateX(-50%);
  background: var(--bg);
  padding: 0 10px;
  font-family: var(--serif);
  color: var(--accent);
  font-size: 18px;
}

/* ============ Article Body — YouTube / Video Embed ============ */
.article-body .video-embed {
  margin: 2.5em -40px;
}
.article-body .video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.article-body .video-wrapper iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* ============ Article Footer ============ */
.article-footer {
  margin-top: 60px;
  padding: 40px 0 0;
  border-top: 1px solid var(--line);
}
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 32px; }
.tag {
  padding: 6px 14px; border-radius: 999px;
  background: var(--bg-soft); color: var(--ink-soft);
  font-size: 13px;
  transition: all 0.2s;
}
.tag:hover { background: var(--accent); color: #fff; }
.share {
  display: flex; align-items: center; gap: 14px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 40px;
}
.share__label {
  font-size: 13px; color: var(--muted); margin-left: auto;
}
.share__btns { display: flex; gap: 8px; }
.share__btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg-soft); display: grid; place-items: center;
  color: var(--ink-soft); transition: all 0.2s;
  border: 0; cursor: pointer; font-family: inherit;
}
.share__btn:hover { background: var(--accent); color: #fff; transform: translateY(-2px); }
.share__btn svg { width: 15px; height: 15px; }

/* ============ Author Card ============ */
.author-card {
  display: flex; gap: 24px; align-items: flex-start;
  padding: 32px; background: var(--bg-soft);
  border-radius: var(--radius-lg);
  margin-bottom: 60px;
}
.author-card__avatar {
  flex-shrink: 0;
  width: 80px; height: 80px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-soft), var(--accent));
  color: #fff;
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 32px; font-weight: 700;
  overflow: hidden;
}
.author-card__avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-card__info h3 {
  font-family: var(--serif);
  font-size: 22px; margin: 0 0 4px;
  font-weight: 700;
}
.author-card__role {
  font-size: 13px; color: var(--muted);
  margin: 0 0 12px;
}
.author-card__bio {
  color: var(--ink-soft); font-size: 15px;
  line-height: 1.75; margin: 0;
}

/* ============ Related Articles ============ */
.related {
  padding: 80px 0;
  background: var(--bg-soft);
  margin-top: 80px;
}
.related-header {
  margin-bottom: 40px;
  display: flex; justify-content: space-between; align-items: baseline;
  flex-wrap: wrap; gap: 16px;
}
.related-title {
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 700; margin: 0;
}
.related-link {
  color: var(--accent); font-weight: 500;
  font-size: 14px;
  display: inline-flex; align-items: center; gap: 6px;
}
.related-link:hover { color: var(--ink); }
.related-link svg { width: 14px; height: 14px; }
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
  max-width: 960px;
  margin: 0 auto;
}
.related-card {
  background: var(--bg-elev);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s var(--transition);
}
.related-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.related-card__image {
  aspect-ratio: 16/10;
  overflow: hidden;
}
.related-card__image img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(100%);
  transition: filter 0.5s var(--transition);
}
.related-card:hover .related-card__image img { filter: grayscale(0%); }
.related-card__body { padding: 16px 18px 18px; }
.related-card__category {
  font-size: 11px; font-weight: 600;
  color: var(--accent); letter-spacing: 0;
  margin-bottom: 8px;
}
.related-card__title {
  font-family: var(--serif);
  font-size: 16px; line-height: 1.4;
  font-weight: 700; margin: 0;
}
.related-card:hover .related-card__title { color: var(--accent); }
.related-card__meta {
  font-size: 12px; color: var(--muted);
  display: flex; align-items: center; gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

/* ============ Prev/Next ============ */
.nav-articles {
  padding: 60px 0;
  border-top: 1px solid var(--line);
}
.nav-articles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.nav-article {
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  transition: all 0.3s var(--transition);
}
.nav-article:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.nav-article__label {
  font-size: 13px; color: var(--muted);
  letter-spacing: 0;
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
}
.nav-article__label svg { width: 13px; height: 13px; }
.nav-article--next { text-align: left; }
.nav-article--next .nav-article__label { justify-content: flex-start; flex-direction: row-reverse; }
.nav-article__title {
  font-family: var(--serif);
  font-size: 18px; font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
}
.nav-article:hover .nav-article__title { color: var(--accent); }

/* ============ Footer ============ */
.site-footer {
  padding: 72px 0 40px;
  margin-top: 80px;
  border-top: 1px solid var(--line);
  text-align: center;
  position: relative;
}
.site-footer::before {
  content: '';
  position: absolute;
  top: -1px; left: 50%;
  transform: translateX(-50%);
  width: 52px; height: 2px;
  background: var(--accent);
}
.footer-statement {
  font-family: var(--serif);
  font-size: clamp(17px, 1.9vw, 22px);
  font-weight: 400;
  color: var(--ink);
  margin: 0 0 28px;
  letter-spacing: -0.01em;
  line-height: 1.4;
}
.footer-statement em {
  font-style: normal;
  color: var(--accent);
  font-weight: 500;
}
.footer-icons {
  display: inline-flex;
  gap: 12px;
  margin-bottom: 26px;
}
.footer-icons a {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  background: var(--bg-soft);
  transition: all 0.25s var(--transition);
}
.footer-icons a:hover {
  color: var(--bg);
  background: var(--accent);
  transform: translateY(-2px);
}
.footer-icons svg { width: 15px; height: 15px; }
.footer-copy {
  font-size: 12px;
  color: var(--muted);
  padding-top: 18px;
  border-top: 1px solid var(--line);
  max-width: 320px;
  margin: 0 auto;
}

/* ============ Reveal animation ============ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--transition), transform 0.7s var(--transition); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============ Archive page ============ */
.archive-list { padding: 40px 0 80px; }
.archive-year {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 700;
  margin: 40px 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  letter-spacing: -0.01em;
}
.archive-month {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0;
  margin: 28px 0 8px;
}
.archive-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  align-items: baseline;
}
.archive-item__title {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  margin: 0;
  transition: color 0.2s;
}
.archive-item:hover .archive-item__title { color: var(--accent); }
.archive-item__date {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0;
}

/* ============ Search page ============ */
.search-hero { padding: 60px 0 30px; }
.search-form {
  display: flex; gap: 10px; align-items: center;
  padding: 10px 20px;
  background: var(--bg-soft);
  border-radius: 999px;
  max-width: 560px;
}
.search-form input {
  flex: 1;
  border: 0; background: transparent;
  font-family: inherit;
  font-size: 16px;
  color: var(--ink);
  outline: none;
  padding: 10px 0;
}
.search-form input::placeholder { color: var(--muted); }
.search-form button {
  padding: 10px 22px;
  background: var(--ink); color: var(--bg);
  border-radius: 999px;
  font-weight: 500; font-size: 14px;
}
.search-form button:hover { background: var(--accent); }
.search-hero mark {
  background: var(--highlight);
  color: var(--accent);
  padding: 0 3px;
  border-radius: 2px;
}
.article mark {
  background: var(--highlight);
  color: var(--accent);
  padding: 0 3px;
  border-radius: 2px;
}
.search-meta {
  color: var(--muted);
  font-size: 14px;
  margin: 16px 0 0;
}

/* ============ About page ============ */
.about-hero { padding: 60px 0 40px; }
.about-hero h1 {
  font-family: var(--serif);
  font-size: clamp(32px, 4.8vw, 56px);
  line-height: 1.15;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}
.about-avatar {
  width: 120px; height: 120px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-soft), var(--accent));
  color: #fff;
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 52px; font-weight: 700;
  overflow: hidden;
  margin-bottom: 28px;
}
.about-avatar img { width: 100%; height: 100%; object-fit: cover; }
.about-bio {
  font-size: 18px; line-height: 1.95;
  color: var(--ink-soft);
  margin: 0 0 32px;
}
.about-links {
  display: flex; gap: 10px; flex-wrap: wrap;
}
.about-links a {
  padding: 10px 18px;
  background: var(--bg-soft);
  color: var(--ink-soft);
  border-radius: 999px;
  font-size: 14px;
  transition: all 0.2s;
  display: inline-flex; align-items: center; gap: 8px;
}
.about-links a:hover {
  background: var(--accent); color: #fff;
}
.about-links svg { width: 15px; height: 15px; }

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .article {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "cat   date"
      "title title"
      "ex    ex";
    column-gap: 12px;
    row-gap: 6px;
    padding: 20px 0;
  }
  .article__category { font-size: 11px; letter-spacing: 0; }
  .article__date { font-size: 11px; letter-spacing: 0; }
  .article__title { font-size: 18px; line-height: 1.4; }
  .article__excerpt { font-size: 13px; line-height: 1.65; }
  .article__read { display: none; }
}

@media (max-width: 860px) {
  .header-filters { display: none; }
  .menu-btn { display: grid; }
  .brand__logo { height: 32px; }
}

@media (max-width: 760px) {
  .article-body blockquote { margin: 1.8em 0; padding: 20px 24px; font-size: 19px; }
  .article-body figure { margin: 2em 0; }
  .article-body .video-embed { margin: 2em 0; }
}

@media (max-width: 620px) {
  .hero { padding: 50px 0 40px; }
  .section { padding: 20px 0 60px; }
  .article-header { padding: 24px 0 40px; }
  .hero-image { aspect-ratio: 4/3; margin-bottom: 40px; border-radius: var(--radius); }
  .article-body { font-size: 17px; }
  .author-card { flex-direction: column; padding: 24px; text-align: center; align-items: center; }

  .nav-articles { padding: 40px 0; }
  .nav-articles-grid { grid-template-columns: 1fr; gap: 12px; }
  .nav-article { padding: 14px 16px; border-radius: var(--radius-sm); }
  .nav-article__label { font-size: 11px; margin-bottom: 6px; }
  .nav-article__label svg { width: 11px; height: 11px; }
  .nav-article__title { font-size: 15px; line-height: 1.35; }

  .related { padding: 44px 0; margin-top: 40px; }
  .related-header { margin-bottom: 24px; }
  .related-title { font-size: 22px; }
  .related-link { font-size: 13px; }
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .related-card__image { aspect-ratio: 4/3; }
  .related-card__body { padding: 12px 12px 14px; }
  .related-card__category { font-size: 10px; margin-bottom: 6px; letter-spacing: 0; }
  .related-card__title { font-size: 13px; line-height: 1.4; }
  .related-card__meta { font-size: 11px; margin-top: 8px; padding-top: 8px; gap: 6px; }
  .related-card__meta .meta-dot { width: 2px; height: 2px; }
}

@media (max-width: 520px) {
  .footer-statement { font-size: 16px; padding: 0 8px; }
}

/* ============ Search Overlay ============ */
.search-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s var(--transition);
  z-index: 300;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 80px 20px 20px;
}
.search-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.search-overlay__panel {
  background: var(--bg-elev);
  width: min(92%, 620px);
  border-radius: var(--radius);
  padding: 12px 18px;
  box-shadow: var(--shadow-lg);
  transform: translateY(-10px);
  transition: transform 0.15s var(--transition);
  border: 1px solid var(--line);
}
.search-overlay.open .search-overlay__panel {
  transform: translateY(0);
}
.search-overlay__form {
  display: flex;
  gap: 10px;
  align-items: center;
}
.search-overlay__icon {
  width: 18px; height: 18px;
  color: var(--muted);
  flex-shrink: 0;
}
.search-overlay__form input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 17px;
  color: var(--ink);
  padding: 10px 0;
  outline: none;
}
.search-overlay__form input::placeholder { color: var(--muted); }
.search-overlay__submit {
  padding: 9px 20px;
  background: var(--ink);
  color: var(--bg);
  border: 0;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.15s var(--transition);
}
.search-overlay__submit:hover { background: var(--accent); }
.search-overlay__close {
  width: 36px; height: 36px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: background-color 0.15s var(--transition), color 0.15s var(--transition);
}
.search-overlay__close:hover { background: var(--bg-soft); color: var(--ink); }
body.search-open { overflow: hidden; }
