/* ============================================================
   /assets/styles-essay.css
   Общий стилевой слой для всех essay-* страниц сайта:
   палитра, сброс, типографика body, навигация (#sidenav),
   заголовок эссе (breadcrumb, project-header-body), секции
   (.ws-section), обзор (.overview-body, .key-thesis), тело
   эссе (.essay-toc, .essay-section), карточка книги (.book-card)
   и подвал "Смежные материалы" (.project-nav).

   Держится отдельно от /assets/styles.css (который покрывает
   lecture-* страницы): разметка и разметочные классы двух типов
   страниц не совпадают (например, здесь сайдбар — #sidenav по
   id, а не .sidenav по классу; .breadcrumb здесь имеет другую
   структуру), так что общий файл на двоих создал бы конфликты
   селекторов вместо переиспользования.

   Что остаётся в <style> каждой essay-страницы:
   - <title>, подключение шрифтов (Google Fonts <link>)
   - уникальный контент (.essay-p текст, .overview-p текст,
     .pn-* содержимое конкретной страницы)
   - responsive-подстройки, специфичные именно для этой страницы
   ============================================================ */

:root {
  --bg:          #fdfcfb;
  --ink:         #1c1c22;
  --ink-strong:  #0f0f14;
  --ink-muted:   #888;
  --accent:      #c0392b;
  --accent-text: #3d1f1a;
  --accent-bg:   #fdf4f3;
  --rule:        #ddd;
  --rule-strong: #1c1c22;
  --navy:        #1a2e4a;
  --navy-light:  #e8edf4;
  --sage:        #2d4a3e;
  --sage-light:  #e8f0ec;
  --amber:       #8a5c1a;
  --amber-light: #fdf4e3;
  --slate:       #3a4a5c;
  --slate-light: #edf0f4;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--ink);
  font-family: 'Merriweather', serif; font-weight: 300;
}

/* Fixed sidenav */
#sidenav {
  position: fixed; top: 0; left: 0;
  width: 196px; height: 100vh;
  background: #f2f0ed; border-right: 1px solid var(--rule);
  padding: 28px 0; overflow-y: auto; z-index: 50;
}
#sidenav .nav-logo {
  font-family: 'Inter', sans-serif; font-size: 9px; font-weight: 600;
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink-muted);
  padding: 0 20px 18px; border-bottom: 1px solid var(--rule); margin-bottom: 14px;
}
#sidenav .nav-back {
  display: flex; align-items: center; gap: 6px;
  font-family: 'Inter', sans-serif; font-size: 10.5px; font-weight: 500;
  color: var(--navy); text-decoration: none; padding: 6px 20px 14px;
  border-bottom: 1px solid var(--rule); margin-bottom: 10px;
}
#sidenav .nav-section {
  font-family: 'Inter', sans-serif; font-size: 9px; font-weight: 600;
  letter-spacing: 0.13em; text-transform: uppercase; color: #bbb;
  padding: 16px 20px 5px;
}
#sidenav a.nav-item {
  display: block; font-family: 'Inter', sans-serif;
  font-size: 11px; font-weight: 400; color: #666;
  text-decoration: none; padding: 6px 20px;
  border-left: 2px solid transparent; transition: all 0.15s; line-height: 1.4;
}
#sidenav a.nav-item:hover { color: var(--ink); background: #ebe8e3; }
#sidenav a.nav-item.active { color: var(--accent); border-left-color: var(--accent); font-weight: 500; }
#sidenav a.nav-item.sub { padding-left: 32px; font-size: 10px; color: #999; }

/* Main content area */
#main { margin-left: 196px; }

/* Shared components */
.eyebrow {
  font-family: 'Inter', sans-serif; font-size: 9px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent);
}

/* Badge outlined */
.badge-o {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'Inter', sans-serif; font-size: 10px; font-weight: 500;
  letter-spacing: 0.03em; border-radius: 2px; padding: 3px 9px;
  border: 1px solid currentColor; white-space: nowrap;
}
.badge-o .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.bo-ready   { color: var(--sage); }
.bo-review  { color: var(--navy); }

/* Origin trail */
.origin-trail { display: inline-flex; align-items: center; gap: 6px; font-family: 'Inter', sans-serif; font-size: 10px; color: var(--ink-muted); }
.origin-trail a { color: var(--navy); font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--navy-light); }

/* PDF icon */
.pdf-i {
  width: 22px; height: 28px; flex-shrink: 0;
  border: 1.5px solid currentColor; border-radius: 2px;
  background: white; position: relative;
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 3px;
}
.pdf-i::before {
  content: ''; position: absolute; top: -1px; right: -1px;
  width: 7px; height: 7px;
  border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  background: var(--bg);
}
.pdf-i span { font-family: 'Inter', sans-serif; font-size: 5.5px; font-weight: 700; color: currentColor; letter-spacing: 0.05em; }

/* Download PDF button */
.btn-pdf {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 500;
  letter-spacing: 0.03em; padding: 8px 16px 8px 10px;
  text-decoration: none; cursor: pointer; transition: all 0.15s; white-space: nowrap;
  border-radius: 1px; color: var(--accent); border: 1px solid var(--accent); background: white;
}
.btn-pdf:hover { background: var(--accent); color: white; }
.btn-pdf .pdf-i { width: 18px; height: 23px; color: inherit; }
.btn-pdf .pdf-i span { font-size: 4.5px; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Inter', sans-serif; font-size: 10.5px; font-weight: 500;
  color: var(--ink-muted); border: 1px solid var(--rule); background: white;
  padding: 7px 14px; text-decoration: none; transition: all 0.15s; border-radius: 1px;
}
.btn-ghost:hover { border-color: var(--ink-muted); color: var(--ink); }

/* ═══ ESSAY HEADER ═══ */
#section-header {
  padding: 0 60px;
  border-bottom: 2px solid var(--rule-strong);
}
.breadcrumb {
  display: flex; align-items: center; gap: 6px;
  padding: 18px 0 0;
  flex-wrap: wrap;
}
.breadcrumb a {
  font-family: 'Inter', sans-serif; font-size: 10px; font-weight: 400;
  color: var(--ink-muted); text-decoration: none; transition: color 0.15s;
}
.breadcrumb a:hover { color: var(--navy); }
.breadcrumb .bc-sep { font-family: 'Inter', sans-serif; font-size: 10px; color: #ccc; }
.breadcrumb .bc-cur { font-family: 'Inter', sans-serif; font-size: 10px; font-weight: 500; color: var(--ink); }

.project-header-body {
  padding: 32px 0 36px;
  display: grid; grid-template-columns: 1fr auto;
  gap: 40px; align-items: end;
}
.ph-left {}
.ph-eyebrow { margin-bottom: 10px; }
.ph-title {
  font-family: 'DM Serif Display', serif; font-size: 2.15rem;
  color: var(--ink-strong); line-height: 1.18; margin-bottom: 10px;
}
.ph-desc {
  font-family: 'Merriweather', serif; font-size: 0.95rem; font-weight: 300;
  font-style: italic; color: var(--ink-muted); line-height: 1.55; max-width: 640px;
  margin-bottom: 22px;
}
.ph-meta-row {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.ph-meta-div { width: 1px; height: 13px; background: var(--rule); }

.ph-right {
  flex-shrink: 0; display: flex; flex-direction: column;
  align-items: flex-end; gap: 14px; padding-bottom: 4px;
}
.ph-dates {
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
}
.ph-date-row {
  font-family: 'Inter', sans-serif; font-size: 10px; font-weight: 300;
  color: var(--ink-muted); text-align: right;
}
.ph-date-row span { font-weight: 500; color: var(--ink); }

/* ═══ SECTION WRAPPER ═══ */
.ws-section {
  padding: 52px 60px;
  border-bottom: 1px solid var(--rule);
}
.ws-section.alt-bg { background: #faf9f8; }
.ws-section-header {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 28px; padding-bottom: 14px; border-bottom: 1px solid var(--rule);
}
.ws-section-title {
  font-family: 'DM Serif Display', serif; font-size: 1.25rem;
  color: var(--ink-strong); line-height: 1.3;
}
.ws-section-num {
  font-family: 'Inter', sans-serif; font-size: 9px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: #ccc;
}

/* ═══ OVERVIEW ═══ */
.overview-body { max-width: 720px; }
.overview-p {
  font-family: 'Merriweather', serif; font-size: 0.85rem; font-weight: 300;
  color: var(--ink); line-height: 1.9; margin-bottom: 24px; hyphens: auto;
}
.key-thesis {
  font-family: 'DM Serif Display', serif; font-size: 1.15rem; font-style: italic;
  color: var(--accent-text); background: var(--accent-bg);
  border-left: 3px solid var(--accent);
  padding: 18px 22px; margin: 32px 0; line-height: 1.65;
}

/* ═══ ESSAY BODY ═══ */
.essay-toc {
  display: flex; flex-wrap: wrap; gap: 8px 0; margin-bottom: 0;
}
.essay-toc a {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Inter', sans-serif; font-size: 10.5px; font-weight: 500;
  color: var(--ink-muted); text-decoration: none; padding: 6px 16px 6px 0;
  transition: color 0.15s;
}
.essay-toc a:hover { color: var(--navy); }
.essay-toc .toc-num {
  font-family: 'DM Serif Display', serif; font-style: italic; font-size: 11px; color: var(--accent);
}

/* ═══ BOOK REFERENCE ═══ */
.book-card {
  display: flex; align-items: center; gap: 20px;
  border: 1px solid var(--rule); border-radius: 3px;
  padding: 18px 20px; text-decoration: none; color: inherit;
  max-width: 620px; transition: border-color 0.15s;
}
.book-card:hover { border-color: var(--navy); }
.book-cover {
  flex-shrink: 0; width: 64px; height: 92px; border-radius: 2px;
  background: linear-gradient(155deg, #1c2b3f, #0f1c2e);
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; padding: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.book-cover-title {
  font-family: 'DM Serif Display', serif; font-size: 8px; font-style: italic;
  color: rgba(255,255,255,0.9); line-height: 1.25;
}
.book-cover-author {
  font-family: 'Inter', sans-serif; font-size: 4.5px; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase; color: rgba(180,200,230,0.45);
}
.essay-eyebrow {
  font-family: 'Inter', sans-serif; font-size: 9px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted);
  margin-bottom: 6px;
}
.essay-title {
  font-family: 'DM Serif Display', serif; font-size: 1.05rem;
  color: var(--ink-strong); line-height: 1.35; margin-bottom: 6px;
}
.essay-meta {
  font-family: 'Inter', sans-serif; font-size: 10px; font-weight: 300;
  color: var(--ink-muted);
}
.kl-lang-note {
  font-family: 'Inter', sans-serif; font-size: 10px; font-weight: 300;
  color: var(--ink-muted); margin-top: 10px;
}
.kl-lang-note a {
  color: var(--navy); text-decoration: none; border-bottom: 1px solid var(--navy-light);
}
.kl-lang-note a:hover { border-bottom-color: var(--navy); }
.essay-section { margin-bottom: 46px; scroll-margin-top: 100px; }
.essay-section:last-child { margin-bottom: 0; }
.essay-section-head {
  display: flex; align-items: baseline; gap: 12px;
  margin-bottom: 18px;
}
.essay-num {
  font-family: 'DM Serif Display', serif; font-style: italic; font-size: 1.1rem;
  color: var(--accent); flex-shrink: 0; width: 24px;
}
.essay-sec-title {
  font-family: 'Inter', sans-serif; font-size: 10px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-muted);
  padding-bottom: 6px; border-bottom: 1px solid var(--rule); flex: 1;
}
.essay-p {
  font-family: 'Merriweather', serif; font-size: 0.85rem; font-weight: 300;
  color: var(--ink); line-height: 1.9; margin-bottom: 20px; hyphens: auto;
}

/* ═══ RELATED MATERIALS (footer) ═══ */
.project-nav {
  background: #f2f0ed; border-top: 2px solid var(--rule-strong);
  padding: 40px 60px;
}
.pn-title {
  font-family: 'Inter', sans-serif; font-size: 9px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-muted);
  margin-bottom: 20px;
}
.pn-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px;
}
.pn-item {
  background: white; border: 1px solid var(--rule);
  padding: 16px 18px; text-decoration: none;
  display: flex; flex-direction: column; gap: 4px;
  transition: background 0.15s;
}
.pn-item:hover { background: #fdfcfb; border-color: var(--navy); }
.pn-role {
  font-family: 'Inter', sans-serif; font-size: 8.5px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted);
}
.pn-name {
  font-family: 'Inter', sans-serif; font-size: 11.5px; font-weight: 500;
  color: var(--navy); line-height: 1.35;
}
.pn-arrow { font-family: 'Inter', sans-serif; font-size: 11px; color: #ccc; margin-top: 2px; }
