/* ═══════════════════════════════════════════════════════════════
   NINAD KOBITA — Design System
   Direction: White · minimal · premium · bilingual equal weight
   Typography: Noto Serif Bengali + DM Serif Display + DM Sans
   Palette: Ink on paper · Terracotta accent · No dark heroes
   Updated: March 2026
═══════════════════════════════════════════════════════════════ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300;1,9..40,400&family=Noto+Serif+Bengali:wght@300;400;500;600&display=swap');

/* ── Design Tokens ────────────────────────────────────────── */
:root {
  /* Colour */
  --ink:        #111111;
  --ink-2:      #444444;
  --ink-3:      #888888;
  --ink-4:      #BBBBBB;
  --paper:      #FFFFFF;
  --surface:    #F8F7F4;
  --surface-2:  #F2F0EB;
  --border:     #E8E6E1;
  --border-2:   #D4D0C8;

  /* Brand */
  --navy:       #0F1B35;
  --navy-2:     #1A2A4A;
  --terra:      #C94F2C;
  --terra-2:    #E06040;
  --terra-light:#F5E8E4;

  /* Typography */
  --font-bn:    'Noto Serif Bengali', Georgia, serif;
  --font-serif: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --font-sans:  'DM Sans', -apple-system, 'Helvetica Neue', Arial, sans-serif;

  /* Spacing */
  --nav-h:  56px;
  --max-w:  1200px;
  --col-w:  680px;
  --pad:    clamp(16px, 4vw, 40px);

  /* Transitions */
  --t-fast: 0.12s ease;
  --t-med:  0.22s ease;
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; }

/* ── Type scale ───────────────────────────────────────────── */
.type-display-bn {
  font-family: var(--font-bn);
  font-size: clamp(30px, 4.5vw, 48px);
  font-weight: 400;
  line-height: 1.15;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.type-display-en {
  font-family: var(--font-serif);
  font-size: clamp(22px, 3.2vw, 36px);
  font-weight: 400;
  line-height: 1.2;
  color: var(--ink);
  font-style: italic;
}
.type-h1-bn {
  font-family: var(--font-bn);
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 400;
  line-height: 1.25;
  color: var(--ink);
}
.type-h1-en {
  font-family: var(--font-serif);
  font-size: clamp(19px, 2.6vw, 24px);
  font-weight: 400;
  line-height: 1.3;
  color: var(--ink);
  font-style: italic;
}
.type-label {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.type-meta { font-family: var(--font-sans); font-size: 12px; color: var(--ink-3); }
.type-body { font-family: var(--font-sans); font-size: 15px; line-height: 1.75; color: var(--ink-2); }

/* ── Layout ───────────────────────────────────────────────── */
.container    { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--pad); }
.container-sm { max-width: var(--col-w); margin: 0 auto; padding: 0 var(--pad); }

/* ── Navigation ───────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad);
  background: rgba(255,255,255,0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: box-shadow var(--t-med);
}
.nav.raised { box-shadow: 0 1px 12px rgba(0,0,0,0.06); }
.nav-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav-brand-en { font-family: var(--font-serif); font-size: 16px; font-style: italic; color: var(--ink); }
.nav-divider  { width: 1px; height: 16px; background: var(--border-2); }
.nav-brand-bn { font-family: var(--font-bn); font-size: 16px; font-weight: 400; color: var(--ink); letter-spacing: -0.01em; }
.nav-links    { display: flex; align-items: center; gap: 2px; }
.nav-link {
  padding: 6px 14px;
  font-size: 13px;
  color: var(--ink-3);
  border-radius: 24px;
  transition: all var(--t-fast);
  white-space: nowrap;
}
.nav-link:hover  { color: var(--ink); background: var(--surface); }
.nav-link.active { color: var(--ink); font-weight: 500; }
.nav-sep { width: 1px; height: 18px; background: var(--border); margin: 0 6px; }
.nav-search-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border: 1px solid var(--border);
  border-radius: 24px;
  font-size: 13px;
  color: var(--ink-3);
  background: var(--surface);
  transition: all var(--t-fast);
  white-space: nowrap;
}
.nav-search-btn:hover { border-color: var(--border-2); color: var(--ink); background: var(--surface-2); }
.nav-search-btn .kbd {
  font-size: 10px; padding: 1px 5px;
  background: var(--paper); border: 1px solid var(--border-2);
  border-radius: 3px; color: var(--ink-4);
}

/* ── Section chrome ───────────────────────────────────────── */
.section    { padding: clamp(32px, 5vw, 60px) var(--pad); }
.section-sm { padding: clamp(24px, 3vw, 40px) var(--pad); }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.section-more { font-size: 12px; color: var(--terra); transition: color var(--t-fast); }
.section-more:hover { color: var(--terra-2); }

/* ── Stat bar ─────────────────────────────────────────────── */
.stat-bar { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.stat-cell { padding: 18px var(--pad); display: flex; align-items: baseline; gap: 10px; border-right: 1px solid var(--border); }
.stat-cell:last-child { border-right: none; }
.stat-n { font-family: var(--font-serif); font-size: 26px; font-weight: 400; color: var(--ink); line-height: 1; }
.stat-l { font-size: 10px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-4); }

/* ── Breadcrumb ───────────────────────────────────────────── */
.breadcrumb { display: flex; align-items: center; gap: 8px; padding: 14px var(--pad); font-size: 12px; color: var(--ink-3); border-bottom: 1px solid var(--border); }
.breadcrumb a { color: var(--ink-3); transition: color var(--t-fast); }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb-sep { color: var(--border-2); }

/* ── Poem list (poems.html, collection.html, poet.html) ───── */
.poem-list { }
.poem-row {
  display: grid;
  grid-template-columns: 48px 1fr 200px;
  gap: 0 20px;
  align-items: start;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: background var(--t-fast);
}
.poem-row:first-child { border-top: 1px solid var(--border); }
.poem-row:hover .pr-title-bn, .poem-row:hover .pr-title-en { color: var(--terra); }
.pr-num { font-family: var(--font-serif); font-size: 22px; color: var(--border-2); text-align: right; padding-top: 3px; line-height: 1; }
.pr-title-bn { font-family: var(--font-bn); font-size: 20px; color: var(--ink); line-height: 1.35; margin-bottom: 2px; transition: color var(--t-fast); }
.pr-title-en { font-family: var(--font-serif); font-size: 14px; font-style: italic; color: var(--ink); line-height: 1.4; margin-bottom: 4px; transition: color var(--t-fast); }
.pr-firstline { font-family: var(--font-serif); font-size: 13px; font-style: italic; color: var(--ink-3); line-height: 1.55; }
.pr-right { text-align: right; }
.pr-poet-bn { font-family: var(--font-bn); font-size: 14px; color: var(--ink); margin-bottom: 2px; }
.pr-poet-en { font-size: 12px; color: var(--ink-3); margin-bottom: 8px; }
.pr-year { font-size: 12px; color: var(--ink-4); }
.metre-tag { display: inline-block; padding: 2px 9px; border: 1px solid var(--border); border-radius: 2px; font-size: 9px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin-top: 5px; }

/* ── Filter bars ──────────────────────────────────────────── */
.filter-wrap { position: sticky; top: var(--nav-h); z-index: 100; background: rgba(255,255,255,0.97); border-bottom: 1px solid var(--border); backdrop-filter: blur(8px); }
.filter-row { display: flex; align-items: center; gap: 6px; padding: 10px var(--pad); overflow-x: auto; scrollbar-width: none; }
.filter-row::-webkit-scrollbar { display: none; }
.filter-row + .filter-row { border-top: 1px solid var(--border); }
.filter-label { font-size: 10px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-4); white-space: nowrap; margin-right: 4px; flex-shrink: 0; }
.filter-pill { padding: 5px 14px; border-radius: 24px; font-size: 11px; border: 1px solid var(--border); color: var(--ink-3); background: var(--paper); cursor: pointer; white-space: nowrap; transition: all var(--t-fast); flex-shrink: 0; }
.filter-pill:hover { color: var(--ink); border-color: var(--border-2); }
.filter-pill.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.era-tab { padding: 10px 16px; font-size: 11px; color: var(--ink-3); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; transition: all var(--t-fast); background: none; border-top: none; border-left: none; border-right: none; }
.era-tab:hover { color: var(--ink); }
.era-tab.on { color: var(--ink); border-bottom-color: var(--ink); font-weight: 500; }

/* ── Poem reading page ────────────────────────────────────── */
.poem-header { padding: clamp(36px, 6vw, 64px) 0 clamp(24px, 4vw, 40px); border-bottom: 1px solid var(--border); margin-bottom: 32px; }
.poem-header .back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 32px; transition: color var(--t-fast); }
.poem-header .back-link:hover { color: var(--ink); }
.poem-meta-row { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; margin-top: 16px; }
.poem-meta-row span { font-size: 11px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.poem-meta-row .sep { color: var(--border-2); }

/* ── Layer tabs — pill style ──────────────────────────────── */
.layer-bar { display: flex; gap: 4px; margin-bottom: 36px; flex-wrap: wrap; }
.layer-tab {
  padding: 5px 16px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--t-fast);
  background: var(--paper);
}
.layer-tab:hover { color: var(--ink); border-color: var(--border-2); }
.layer-tab.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ── Poem body ────────────────────────────────────────────── */
.poem-body { }
.stanza { margin-bottom: 36px; }
.verse-line { margin-bottom: 16px; }
.vl-bn { font-family: var(--font-bn); font-size: 21px; font-weight: 400; color: var(--ink); line-height: 1.65; display: block; }
.vl-ph { font-family: var(--font-sans); font-size: 16px; color: var(--ink-2); letter-spacing: 0.04em; display: block; margin: 4px 0 5px; line-height: 1.6; }
.vl-rm { font-family: var(--font-sans); font-size: 13px; font-style: italic; color: var(--ink-4); display: block; margin-top: 2px; }
.vl-en { font-family: var(--font-serif); font-size: 18px; font-weight: 400; font-style: italic; color: var(--ink); line-height: 1.65; display: block; }

/* Layer visibility */
body.layer-bengali   .vl-ph, body.layer-bengali   .vl-rm, body.layer-bengali   .vl-en { display: none; }
body.layer-phonetic  .vl-bn, body.layer-phonetic  .vl-rm, body.layer-phonetic  .vl-en { display: none; }
body.layer-scholarly .vl-bn, body.layer-scholarly .vl-ph, body.layer-scholarly .vl-en { display: none; }
body.layer-english   .vl-bn, body.layer-english   .vl-ph, body.layer-english   .vl-rm { display: none; }

/* ── Charya 6-layer ───────────────────────────────────────── */
.charya-unit { padding: 0; margin-bottom: 32px; }
.charya-block { padding: 14px 0; border-bottom: 1px solid var(--border); }
.charya-block:last-child { border-bottom: none; }
.charya-block-label { font-family: var(--font-sans); font-size: 9px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-4); margin-bottom: 8px; }
.charya-old-text { font-family: var(--font-bn); font-size: 19px; line-height: 1.7; color: var(--ink-3); font-style: italic; display: block; margin-bottom: 4px; }
.charya-mod-text { font-family: var(--font-bn); font-size: 20px; line-height: 1.65; color: var(--ink); display: block; margin-bottom: 4px; }
body.layer-bengali  .charya-block.charya-mod, body.layer-bengali  .charya-block.charya-en  { display: none; }
body.layer-phonetic .charya-old-text, body.layer-phonetic .charya-mod-text, body.layer-phonetic .charya-block.charya-en { display: none; }
body.layer-phonetic .vl-rm { display: none; }
body.layer-scholarly .charya-old-text, body.layer-scholarly .charya-mod-text, body.layer-scholarly .charya-block.charya-mod, body.layer-scholarly .charya-block.charya-en { display: none; }
body.layer-english  .charya-block.charya-old, body.layer-english  .charya-block.charya-mod { display: none; }

/* ── Gloss ────────────────────────────────────────────────── */
.gloss-word { border-bottom: 1px dotted var(--border-2); cursor: help; transition: border-color var(--t-fast), color var(--t-fast); }
.gloss-word:hover { border-bottom-color: var(--terra); color: var(--terra); }
#gloss-tip { position: fixed; z-index: 500; background: var(--ink); color: var(--paper); padding: 12px 16px; border-radius: 4px; max-width: 280px; pointer-events: none; opacity: 0; transition: opacity var(--t-fast); font-size: 13px; line-height: 1.5; }
#gloss-tip.visible { opacity: 1; }
#gloss-tip .tip-word { font-family: var(--font-bn); font-size: 16px; font-weight: 500; color: #fff; display: block; margin-bottom: 2px; }
#gloss-tip .tip-rm   { font-size: 11px; color: rgba(255,255,255,0.5); letter-spacing: 0.06em; display: block; margin-bottom: 6px; }
#gloss-tip .tip-en   { font-size: 13px; color: rgba(255,255,255,0.85); display: block; }
#gloss-tip .tip-note { font-size: 11px; color: rgba(255,255,255,0.5); display: block; margin-top: 5px; font-style: italic; line-height: 1.4; }

/* ── About / poem tab panels ──────────────────────────────── */
.tab-bar { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-top: 40px; }
.tab-btn { padding: 12px 20px; font-size: 13px; color: var(--ink-3); border-bottom: 2px solid transparent; cursor: pointer; transition: all var(--t-fast); background: none; border-top: none; border-left: none; border-right: none; }
.tab-btn:hover { color: var(--ink); }
.tab-btn.on { color: var(--ink); border-bottom-color: var(--ink); font-weight: 500; }
.tab-panel { padding-top: 28px; display: none; }
.tab-panel.on { display: block; }

/* Prose sections */
.prose-section { margin-bottom: 24px; }
.prose-label { font-size: 10px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.prose-h2 { font-family: var(--font-serif); font-size: 20px; font-weight: 400; color: var(--ink); margin-bottom: 10px; line-height: 1.3; }
.prose-p { font-size: 14px; line-height: 1.85; color: var(--ink-2); }

/* ── Poet cards (index / poets.html) ─────────────────────── */
.poet-card {
  background: var(--paper);
  border: 1px solid var(--border);
  padding: 24px 20px;
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast);
  display: flex;
  flex-direction: column;
  text-decoration: none;
}
.poet-card:hover { background: var(--surface); border-color: var(--border-2); }
.poet-century { font-size: 10px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-4); margin-bottom: 10px; }
.poet-card .name-bn { font-family: var(--font-bn); font-size: 20px; color: var(--ink); line-height: 1.3; margin-bottom: 2px; }
.poet-card .name-en { font-family: var(--font-serif); font-size: 15px; font-style: italic; color: var(--ink-3); line-height: 1.35; margin-bottom: 16px; }
.poet-stats { margin-top: auto; display: flex; gap: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.poet-stat-n { font-family: var(--font-serif); font-size: 20px; color: var(--ink); display: block; line-height: 1; margin-bottom: 2px; }
.poet-stat-l { font-size: 9px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }

/* ── Era / tradition cards (index) ───────────────────────── */
.era-strip { display: grid; grid-template-columns: repeat(9, 1fr); gap: 2px; }
.era-card { padding: 20px 16px 18px; cursor: pointer; min-height: 128px; display: flex; flex-direction: column; justify-content: flex-end; position: relative; overflow: hidden; transition: filter var(--t-fast); text-decoration: none; }
.era-card:hover { filter: brightness(1.12); }
.era-num { position: absolute; top: 12px; right: 12px; font-family: var(--font-serif); font-size: 32px; opacity: 0.06; line-height: 1; color: #fff; }
.era-century { font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.45; margin-bottom: 4px; }
.era-name-en { font-family: var(--font-serif); font-size: 12px; font-style: italic; line-height: 1.3; margin-bottom: 1px; opacity: 0.85; }
.era-name-bn { font-family: var(--font-bn); font-size: 13px; font-weight: 500; line-height: 1.3; margin-bottom: 2px; }
/* Lighter, more inviting tradition palette */
.era-1 { background: #1B2C42; color: #C4D8F0; }
.era-2 { background: #2A1C40; color: #C8B8EC; }
.era-3 { background: #122E1E; color: #A8D8B4; }
.era-4 { background: #3A2208; color: #EAC888; }
.era-5 { background: #3A1020; color: #F0B0C4; }
.era-6 { background: #0E2A14; color: #9CDAA8; }
.era-7 { background: #062428; color: #8AD8E0; }
.era-8 { background: #1A1A3E; color: #ACBCF4; }
.era-9 { background: #281A2A; color: #D4ACE0; }

/* ── Collection page ──────────────────────────────────────── */
.collection-hero { padding: clamp(36px, 5vw, 60px) var(--pad) clamp(24px, 4vw, 40px); border-bottom: 1px solid var(--border); }
.collection-title-bn { font-family: var(--font-bn); font-size: clamp(26px, 4vw, 38px); font-weight: 400; color: var(--ink); margin-bottom: 4px; line-height: 1.2; }
.collection-title-en { font-family: var(--font-serif); font-size: clamp(18px, 2.5vw, 24px); font-style: italic; color: var(--ink); margin-bottom: 16px; line-height: 1.3; }
.collection-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--ink-3); }

/* ── Timeline page — white header ─────────────────────────── */
.timeline-header {
  background: var(--paper);
  padding: clamp(48px, 7vw, 80px) var(--pad) clamp(36px, 5vw, 56px);
  border-bottom: 1px solid var(--border);
}
.timeline-header-label { font-size: 10px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-4); margin-bottom: 16px; }
.timeline-header-title-en { font-family: var(--font-serif); font-size: clamp(28px, 4vw, 48px); font-style: italic; color: var(--ink); line-height: 1.05; margin-bottom: 6px; }
.timeline-header-title-bn { font-family: var(--font-bn); font-size: clamp(26px, 3.8vw, 44px); font-weight: 400; color: var(--ink); line-height: 1.1; margin-bottom: 20px; }
.timeline-header-sub { font-size: 15px; color: var(--ink-3); max-width: 520px; line-height: 1.75; }

/* Timeline era bar */
.timeline-bar { background: var(--surface); border-bottom: 1px solid var(--border); padding: 0 var(--pad); overflow-x: auto; scrollbar-width: none; }
.timeline-bar::-webkit-scrollbar { display: none; }
.timeline-track { display: flex; align-items: stretch; min-width: 900px; height: 64px; gap: 2px; }
.timeline-era-block { display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 6px 8px; cursor: pointer; transition: filter var(--t-fast); text-align: center; border-radius: 3px; text-decoration: none; }
.timeline-era-block:hover { filter: brightness(1.1); }
.timeline-era-block .teb-century { font-size: 8px; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.5; margin-bottom: 3px; }
.timeline-era-block .teb-name { font-family: var(--font-bn); font-size: 11px; font-weight: 500; line-height: 1.2; }

/* Era sections */
.era-section { border-bottom: 1px solid var(--border); scroll-margin-top: calc(var(--nav-h) + 64px); }
.era-section-header { display: grid; grid-template-columns: 280px 1fr; min-height: 200px; }
.era-section-left { padding: clamp(28px, 4vw, 48px) var(--pad); display: flex; flex-direction: column; justify-content: center; border-right: 1px solid var(--border); }
.era-section-number { font-family: var(--font-serif); font-size: 72px; font-weight: 400; color: var(--border); line-height: 1; margin-bottom: 12px; }
.era-section-century { font-size: 10px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.era-section-name-bn { font-family: var(--font-bn); font-size: clamp(20px, 3vw, 26px); font-weight: 500; line-height: 1.25; margin-bottom: 3px; }
.era-section-name-en { font-family: var(--font-serif); font-size: clamp(15px, 2.2vw, 19px); font-style: italic; line-height: 1.3; opacity: 0.8; }
.era-section-right { padding: clamp(28px, 4vw, 48px) var(--pad); }
.era-section-text { font-size: 15px; line-height: 1.8; color: var(--ink-2); max-width: 600px; margin-bottom: 28px; }
.era-section-text p + p { margin-top: 14px; }
.era-poets-label { font-size: 10px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.era-poets-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.era-poet-chip { padding: 10px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 2px; cursor: pointer; transition: all var(--t-fast); text-decoration: none; display: block; }
.era-poet-chip:hover { background: var(--paper); border-color: var(--border-2); }
.era-poet-chip .epc-bn { font-family: var(--font-bn); font-size: 14px; color: var(--ink); line-height: 1.3; margin-bottom: 2px; }
.era-poet-chip .epc-en { font-size: 11px; color: var(--ink-3); font-style: italic; }
.era-poems-link { margin-top: 20px; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--terra); transition: color var(--t-fast); text-decoration: none; }
.era-poems-link:hover { color: var(--terra-2); }

/* ── Poet page — white header (replaces old navy split) ───── */
.poet-hero {
  display: block;
  background: var(--paper);
  border-bottom: 1px solid var(--border);
}
/* Old split hero classes — kept for compatibility but overridden to white */
.poet-hero-left {
  background: var(--paper);
  padding: clamp(48px, 7vw, 80px) var(--pad) clamp(36px, 5vw, 56px);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
  overflow: visible;
  max-width: 900px;
  margin: 0 auto;
}
.poet-hero-bg { display: none; }
.poet-hero-era { font-size: 10px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-4); margin-bottom: 16px; }
.poet-hero-name-bn { font-family: var(--font-bn); font-size: clamp(28px, 4vw, 48px); font-weight: 400; color: var(--ink); line-height: 1.1; margin-bottom: 4px; }
.poet-hero-name-en { font-family: var(--font-serif); font-size: clamp(26px, 3.8vw, 44px); font-style: italic; color: var(--ink); line-height: 1.05; margin-bottom: 16px; }
.poet-hero-dates { font-size: 13px; color: var(--ink-3); letter-spacing: 0.04em; }
.poet-hero-right {
  background: var(--paper);
  padding: clamp(20px, 3vw, 32px) var(--pad) clamp(28px, 4vw, 44px);
  border-left: none;
  border-top: 1px solid var(--border);
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}
.poet-hero-stat-row { display: flex; gap: 24px; }
.poet-bio { font-family: var(--font-sans); font-size: 14px; line-height: 1.8; color: var(--ink-2); }

/* ── About page — white background throughout ─────────────── */
.about-hero {
  background: var(--paper);
  padding: clamp(48px, 7vw, 80px) var(--pad) clamp(36px, 5vw, 56px);
  border-bottom: 1px solid var(--border);
}
.about-body { max-width: 680px; margin: 0 auto; padding: clamp(36px, 5vw, 60px) var(--pad); }
.about-section { margin-bottom: clamp(32px, 5vw, 52px); padding-bottom: clamp(32px, 5vw, 52px); border-bottom: 1px solid var(--border); }
.about-section:last-child { border-bottom: none; }
.about-section-title { font-size: 10px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 16px; }
.about-section-text { font-size: 15px; line-height: 1.85; color: var(--ink-2); }
.about-section-text p + p { margin-top: 14px; }
.about-section-text a { color: var(--terra); border-bottom: 1px solid var(--terra-light); }
.about-section-text a:hover { border-bottom-color: var(--terra); }

/* ── Contact page — all white ─────────────────────────────── */
.contact-wrap { display: grid; grid-template-columns: 1fr 1.4fr; min-height: calc(100vh - var(--nav-h)); }
.contact-left {
  background: var(--paper);
  padding: clamp(40px, 6vw, 72px) var(--pad);
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--border);
}
.contact-left-title-bn { font-family: var(--font-bn); font-size: clamp(24px, 3.2vw, 34px); font-weight: 400; color: var(--ink); margin-bottom: 5px; line-height: 1.2; }
.contact-left-title-en { font-family: var(--font-serif); font-size: clamp(26px, 3.5vw, 38px); font-style: italic; color: var(--ink); margin-bottom: 6px; letter-spacing: -0.01em; }
.contact-left-text { font-size: 14px; color: var(--ink-3); line-height: 1.8; max-width: 360px; }
.contact-right { padding: clamp(40px, 6vw, 72px) var(--pad); background: var(--surface); }
.contact-form { max-width: 520px; }
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 11px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 7px; }
.form-input, .form-textarea, .form-select { width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: 2px; font-size: 14px; color: var(--ink); background: var(--paper); transition: border-color var(--t-fast); outline: none; font-family: var(--font-sans); }
.form-input:focus, .form-textarea:focus, .form-select:focus { border-color: var(--ink-3); }
.form-textarea { min-height: 140px; resize: vertical; line-height: 1.6; }
.form-select { appearance: none; cursor: pointer; }

/* ── Search overlay ───────────────────────────────────────── */
.search-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(255,255,255,0.97); backdrop-filter: blur(12px); opacity: 0; pointer-events: none; transition: opacity var(--t-med); display: flex; flex-direction: column; }
.search-overlay.open { opacity: 1; pointer-events: all; }
.search-top { padding: 20px var(--pad); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 16px; }
.search-input { flex: 1; font-size: 22px; font-weight: 300; border: none; outline: none; color: var(--ink); background: transparent; font-family: var(--font-sans); }
.search-input::placeholder { color: var(--ink-4); }
.search-close { font-size: 13px; color: var(--ink-3); padding: 6px 14px; border: 1px solid var(--border); border-radius: 24px; cursor: pointer; transition: all var(--t-fast); }
.search-close:hover { color: var(--ink); border-color: var(--border-2); }
.search-results { flex: 1; overflow-y: auto; padding: 24px var(--pad); }
.search-group-label { font-size: 10px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); padding-bottom: 10px; border-bottom: 1px solid var(--border); margin-bottom: 8px; margin-top: 24px; }
.search-group-label:first-child { margin-top: 0; }
.search-result { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); cursor: pointer; transition: background var(--t-fast); text-decoration: none; }
.search-result:hover { background: var(--surface); margin: 0 calc(-1 * var(--pad)); padding-left: var(--pad); padding-right: var(--pad); }
.sr-title-bn { font-family: var(--font-bn); font-size: 17px; color: var(--ink); margin-bottom: 1px; }
.sr-title-en { font-family: var(--font-serif); font-size: 14px; font-style: italic; color: var(--ink); margin-bottom: 2px; }
.sr-sub { font-size: 12px; color: var(--ink-3); }
.sr-arrow { font-size: 16px; color: var(--border-2); }

/* ── Buttons ──────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 24px; font-size: 13px; font-weight: 500; letter-spacing: 0.04em; border-radius: 2px; cursor: pointer; transition: all var(--t-fast); text-decoration: none; border: 1px solid transparent; }
.btn-dark { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-dark:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--border-2); }
.btn-outline:hover { border-color: var(--ink-3); }
.btn-outline-white { background: transparent; color: rgba(255,255,255,0.75); border-color: rgba(255,255,255,0.25); }
.btn-outline-white:hover { color: #fff; border-color: rgba(255,255,255,0.5); }
.btn-terra { background: var(--terra); color: var(--paper); border-color: var(--terra); }
.btn-terra:hover { background: var(--terra-2); border-color: var(--terra-2); }

/* ── Metre Guide ──────────────────────────────────────────── */
.metre-page { max-width: 760px; margin: 0 auto; padding: 0 clamp(1.25rem, 5vw, 2.5rem); }
.metre-header { padding: clamp(2.5rem, 6vh, 4rem) 0 2rem; border-bottom: 1px solid var(--border); margin-bottom: 3rem; }
.metre-eyebrow { font-family: var(--font-sans); font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--terra); margin-bottom: 1rem; }
.metre-title { font-family: var(--font-serif); font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 400; color: var(--ink); margin-bottom: .5rem; }
.metre-intro { font-family: var(--font-sans); font-size: .975rem; color: var(--ink-3); line-height: 1.8; max-width: 52ch; }
.metre-contents { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 3.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.mc-btn { font-family: var(--font-sans); font-size: .72rem; color: var(--ink-3); padding: .3rem .85rem; border: 1px solid var(--border); border-radius: 20px; transition: all .18s; }
.mc-btn:hover { border-color: var(--border-2); color: var(--ink); }
.metre-section { margin-bottom: 4.5rem; scroll-margin-top: calc(var(--nav-h) + 1rem); }
.ms-number { font-family: var(--font-sans); font-size: .65rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-4); margin-bottom: .6rem; display: block; }
.ms-title-bn { font-family: var(--font-bn); font-size: 1.9rem; color: var(--ink); margin-bottom: .2rem; line-height: 1.2; }
.ms-title-en { font-family: var(--font-serif); font-style: italic; font-size: 1.05rem; color: var(--ink-3); margin-bottom: 1.75rem; font-weight: 400; }
.ms-rule { background: var(--surface); border-left: 3px solid var(--border-2); padding: 1rem 1.35rem; border-radius: 0 2px 2px 0; font-family: var(--font-sans); font-size: .78rem; color: var(--ink-2); line-height: 1.75; margin-bottom: 2rem; }
.ms-rule strong { font-weight: 600; color: var(--ink); }
.ms-body { font-family: var(--font-sans); font-size: .975rem; color: var(--ink-2); line-height: 1.9; margin-bottom: 2rem; }
.ms-body p + p { margin-top: 1em; }
.ms-body em { font-style: italic; color: var(--ink); }
.ms-example { background: var(--surface); border: 1px solid var(--border); border-radius: 2px; padding: 1.5rem 1.75rem; margin-bottom: 1.75rem; }
.ms-example-label { font-family: var(--font-sans); font-size: .6rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-4); margin-bottom: 1.1rem; display: block; }
.ms-ex-bn { font-family: var(--font-bn); font-size: 1.25rem; color: var(--ink); line-height: 1.7; margin-bottom: .5rem; }
.ms-ex-ph { font-family: var(--font-sans); font-size: .78rem; color: var(--ink-3); line-height: 1.6; margin-bottom: .35rem; letter-spacing: .03em; }
.ms-ex-rm { font-family: var(--font-sans); font-style: italic; font-size: .75rem; color: var(--ink-4); line-height: 1.5; margin-bottom: .5rem; }
.ms-ex-en { font-family: var(--font-serif); font-size: .9rem; color: var(--ink-2); line-height: 1.65; }
.ms-ex-note { margin-top: 1rem; padding-top: .85rem; border-top: 1px solid var(--border); font-family: var(--font-sans); font-size: .65rem; color: var(--ink-4); line-height: 1.55; }
.beat-diagram { display: flex; gap: .25rem; flex-wrap: wrap; margin: 1rem 0 1.25rem; align-items: center; }
.beat { width: 1.6rem; height: 1.6rem; border-radius: 2px; display: flex; align-items: center; justify-content: center; font-family: var(--font-sans); font-size: .6rem; font-weight: 500; }
.beat-s { background: var(--ink); color: var(--paper); }
.beat-w { background: var(--border); color: var(--ink-3); }
.beat-gap { width: .75rem; }
.beat-label { font-family: var(--font-sans); font-size: .62rem; color: var(--ink-3); margin-left: .25rem; letter-spacing: .06em; }
.read-link { font-family: var(--font-sans); font-size: .75rem; color: var(--terra); display: inline-flex; align-items: center; gap: .35rem; border-bottom: 1px solid rgba(201,79,44,.3); padding-bottom: 1px; transition: gap .2s, border-color .2s; }
.read-link:hover { gap: .6rem; border-color: var(--terra); }
.metre-divider { border: none; border-top: 1px solid var(--border); margin: 4rem 0; }

/* ── Footer ───────────────────────────────────────────────── */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: clamp(32px, 5vw, 52px) var(--pad); }
.footer-inner { display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 32px; }
.footer-brand-bn { font-family: var(--font-bn); font-size: 18px; font-weight: 400; color: var(--ink); margin-bottom: 2px; }
.footer-brand-en { font-family: var(--font-serif); font-size: 15px; font-style: italic; color: var(--ink-2); margin-bottom: 14px; }
.footer-note { font-size: 12px; color: var(--ink-3); line-height: 1.6; max-width: 360px; }
.footer-nav { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.footer-nav a { font-size: 13px; color: var(--ink-3); transition: color var(--t-fast); }
.footer-nav a:hover { color: var(--ink); }

/* ── Utility ──────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .era-strip { grid-template-columns: repeat(5, 1fr); }
  .poem-row { grid-template-columns: 36px 1fr; }
  .poem-row .pr-right { display: none; }
  .era-section-header { grid-template-columns: 1fr; }
  .era-section-left { border-right: none; border-bottom: 1px solid var(--border); }
  .contact-wrap { grid-template-columns: 1fr; }
  .contact-left { border-right: none; border-bottom: 1px solid var(--border); }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-nav { align-items: flex-start; }
  .poet-hero-left { padding-bottom: clamp(24px, 4vw, 40px); }
  .poet-hero-right { border-top: 1px solid var(--border); }
}
@media (max-width: 640px) {
  :root { --pad: 16px; }
  .era-strip { grid-template-columns: repeat(3, 1fr); }
  .nav-links .nav-link:not(.nav-link-core) { display: none; }
  .stat-bar { flex-wrap: wrap; }
  .stat-cell { min-width: 50%; border-bottom: 1px solid var(--border); }
}
