@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@400;500;600;700&family=Noto+Serif+Bengali:wght@500;700&display=swap');

:root {
  --bg: #0b0f19;
  --surface: #131a2a;
  --surface-hover: #1a2338;
  --border: #243049;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --accent: #f59e0b;
  --accent-hover: #d97706;
  --accent-soft: rgba(245, 158, 11, 0.14);
  --danger: #ef4444;
  --success: #10b981;
  --radius: 14px;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

[data-theme="light"] {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-hover: #f1f5f9;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-muted: #475569;
  --accent: #d97706;
  --accent-hover: #b45309;
  --accent-soft: rgba(217, 119, 6, 0.12);
  --shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Hind Siliguri', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  transition: background 0.25s, color 0.25s;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 15, 25, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
[data-theme="light"] .navbar {
  background: rgba(248, 250, 252, 0.9);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Noto Serif Bengali', serif;
  font-weight: 700;
  font-size: 1.45rem;
  color: var(--accent);
}
.brand-badge {
  background: var(--accent);
  color: #0b0f19;
  font-family: 'Hind Siliguri', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  transition: all 0.2s;
}
.btn:hover { background: var(--surface-hover); border-color: var(--accent); }
.btn-primary {
  background: var(--accent);
  color: #0b0f19;
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }

/* Hero */
.hero {
  padding: 44px 0 30px;
  border-bottom: 1px solid var(--border);
  background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.14), transparent 55%);
}
.hero-tag {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 4px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 12px;
}
.hero h1 {
  font-family: 'Noto Serif Bengali', serif;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  line-height: 1.3;
  margin-bottom: 10px;
}
.hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 740px;
}

/* Filter & Search Bar */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin: 26px 0;
}
.cat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pill {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: 0.2s;
}
.pill:hover, .pill.active {
  background: var(--accent);
  color: #0b0f19;
  border-color: var(--accent);
}
.search-box {
  display: flex;
  gap: 8px;
}
.search-box input {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  min-width: 230px;
}

/* Featured Post */
.featured-card {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 34px;
  box-shadow: var(--shadow);
}
.featured-img {
  width: 100%;
  height: 100%;
  min-height: 290px;
  object-fit: cover;
  display: block;
}
.featured-body {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.cat-badge {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 2px 10px;
  border-radius: 6px;
  font-weight: 600;
}
.featured-body h2 {
  font-family: 'Noto Serif Bengali', serif;
  font-size: 1.7rem;
  line-height: 1.35;
  margin-bottom: 12px;
}
.featured-body p {
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* Grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(335px, 1fr));
  gap: 24px;
  margin-bottom: 36px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.22s, border-color 0.22s;
  box-shadow: var(--shadow);
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}
.card-img {
  width: 100%;
  height: 195px;
  object-fit: cover;
  background: #1e293b;
}
.card-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-title {
  font-family: 'Noto Serif Bengali', serif;
  font-size: 1.24rem;
  line-height: 1.4;
  margin-bottom: 10px;
}
.card-excerpt {
  color: var(--text-muted);
  font-size: 0.96rem;
  margin-bottom: 18px;
  flex: 1;
}
.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 48px;
}
.page-btn {
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-weight: 600;
  transition: 0.2s;
}
.page-btn:hover, .page-btn.active {
  background: var(--accent);
  color: #0b0f19;
  border-color: var(--accent);
}

/* Single Post View */
.article-wrap {
  max-width: 820px;
  margin: 36px auto 60px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.article-cover {
  width: 100%;
  max-height: 430px;
  object-fit: cover;
}
.article-content {
  padding: 36px;
}
.article-content h1 {
  font-family: 'Noto Serif Bengali', serif;
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
  line-height: 1.35;
  margin: 12px 0 18px;
}
.article-body {
  font-size: 1.12rem;
  line-height: 1.9;
}
.article-body p { margin-bottom: 18px; }
.article-body h3 {
  font-family: 'Noto Serif Bengali', serif;
  color: var(--accent);
  margin: 26px 0 12px;
  font-size: 1.35rem;
}
.article-body ul, .article-body ol {
  margin: 0 0 20px 24px;
}
.article-body li { margin-bottom: 10px; }

/* Related Section */
.related-box {
  max-width: 1200px;
  margin: 0 auto 54px;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.footer-links {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  gap: 18px;
  font-size: 0.88rem;
}

/* Admin Panel */
.admin-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin: 28px 0;
}
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}
textarea.form-control { min-height: 180px; resize: vertical; }
.alert {
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 18px;
  font-weight: 600;
}
.alert-success { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid #10b981; }
.alert-danger { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid #ef4444; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
th { color: var(--accent); }

@media (max-width: 820px) {
  .featured-card { grid-template-columns: 1fr; }
  .article-content { padding: 22px; }
}
