@import url('https://fonts.googleapis.com/css2?family=Tiro+Bangla:ital@0;1&family=Hind+Siliguri:wght@400;500;600;700&display=swap');

:root {
  --paper: #efe6d6;
  --paper-raised: #f7f1e6;
  --ink: #241c15;
  --ink-soft: #4a4038;
  --maroon: #7a2331;
  --maroon-soft: #a94a56;
  --teal: #1f4b43;
  --teal-soft: #3c6d63;
  --gold: #b8863b;
  --rule: #d9cbae;
  --max-width: 1080px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Hind Siliguri', sans-serif;
  font-size: 17px;
  line-height: 1.7;
}

h1, h2, h3, .brand {
  font-family: 'Tiro Bangla', serif;
  color: var(--ink);
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- header ---------- */

.site-header {
  border-bottom: 3px solid var(--ink);
  background: var(--paper-raised);
}

.site-header .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  padding-top: 28px;
  padding-bottom: 20px;
  gap: 12px;
}

.brand-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand {
  font-size: 2.1rem;
  letter-spacing: 0.5px;
}

.tagline {
  font-size: 0.92rem;
  color: var(--ink-soft);
  font-style: italic;
}

nav.main-nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
  font-size: 0.98rem;
}

nav.main-nav a {
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}

nav.main-nav a:hover,
nav.main-nav a.active {
  border-bottom-color: var(--maroon);
}

/* ---------- hero ---------- */

.hero {
  padding: 56px 0 48px;
  border-bottom: 1px solid var(--rule);
}

.hero .wrap {
  display: grid;
  grid-template-columns: 6px 1fr;
  gap: 28px;
  align-items: start;
}

.hero .spine {
  background: linear-gradient(var(--maroon), var(--teal));
  height: 100%;
  min-height: 140px;
  border-radius: 2px;
}

.hero h1 {
  font-size: 2.5rem;
  line-height: 1.35;
  max-width: 18ch;
}

.hero p.lede {
  margin-top: 16px;
  max-width: 62ch;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.hero .featured-link {
  display: inline-block;
  margin-top: 20px;
  font-weight: 600;
  color: var(--maroon);
  border-bottom: 1px solid var(--maroon);
  padding-bottom: 2px;
}

/* ---------- layout: posts + sidebar ---------- */

.content-layout {
  padding: 48px 0 64px;
}

.content-layout .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 56px;
  align-items: start;
}

.category-section {
  margin-bottom: 56px;
}

.category-heading {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 6px;
}

.category-heading h2 {
  font-size: 1.6rem;
}

.category-heading .count {
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.category-desc {
  color: var(--ink-soft);
  font-size: 0.96rem;
  margin: 6px 0 26px;
  max-width: 60ch;
}

/* family drama: left-border strip cards */

.family .post-card {
  border-left: 4px solid var(--maroon);
  padding: 4px 0 4px 20px;
  margin-bottom: 26px;
}

.family .post-card h3 {
  font-size: 1.2rem;
  margin-bottom: 6px;
}

/* historical/fantasy: hairline top rule, ornamental mark */

.historical .post-card {
  border-top: 1px solid var(--teal-soft);
  padding-top: 16px;
  margin-bottom: 26px;
  position: relative;
}

.historical .post-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 44px;
  height: 3px;
  background: var(--teal);
}

.historical .post-card h3 {
  font-size: 1.2rem;
  margin-bottom: 6px;
}

.post-card .meta {
  font-size: 0.85rem;
  color: var(--gold);
  margin-bottom: 8px;
}

.post-card p {
  color: var(--ink-soft);
  font-size: 0.98rem;
  margin: 0 0 8px;
}

.post-card .read-more {
  font-size: 0.9rem;
  font-weight: 600;
}

.family .read-more {
  color: var(--maroon);
}

.historical .read-more {
  color: var(--teal);
}

/* ---------- sidebar ---------- */

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.widget h2 {
  font-size: 1.15rem;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 8px;
  margin-bottom: 16px;
}

.widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.widget.categories li {
  display: flex;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px dashed var(--rule);
  font-size: 0.96rem;
}

.widget.categories li a:hover {
  color: var(--maroon);
}

.widget.popular li {
  padding: 10px 0;
  border-bottom: 1px dashed var(--rule);
  font-size: 0.94rem;
}

.widget.popular li:last-child {
  border-bottom: none;
}

.widget.about p {
  font-size: 0.95rem;
  color: var(--ink-soft);
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 3px solid var(--ink);
  background: var(--paper-raised);
  padding: 26px 0;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

/* ---------- single post page ---------- */

.post-page {
  padding: 48px 0 72px;
}

.post-page .wrap.narrow {
  max-width: 720px;
}

.post-header .meta {
  font-size: 0.9rem;
  color: var(--gold);
  margin-bottom: 10px;
}

.post-header h1 {
  font-size: 2.1rem;
  line-height: 1.4;
}

.post-body {
  margin-top: 28px;
  font-size: 1.06rem;
}

.post-body p {
  margin: 0 0 22px;
}

.post-nav {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  font-size: 0.92rem;
}

/* ---------- responsive ---------- */

@media (max-width: 800px) {
  .content-layout .wrap {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 2rem;
  }

  nav.main-nav ul {
    gap: 16px;
    flex-wrap: wrap;
  }
}

/* ---------- accessibility ---------- */

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--maroon);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
