/* ==========================================================
   Redoan Asif Risan Archive — Editorial Design System
   ========================================================== */

:root {
  --color-bg: #fdfdfb;
  --color-surface: #ffffff;
  --color-text: #1a1a1a;
  --color-text-muted: #5c5c5c;
  --color-border: #e6e3dd;
  --color-accent: #8a1f11;      /* restrained brick-red accent */
  --color-accent-soft: #f4e9e6;
  --font-serif-bn: 'Noto Serif Bengali', serif;
  --font-sans-bn: 'Noto Sans Bengali', sans-serif;
  --font-serif-en: 'Source Serif 4', Georgia, serif;
  --font-sans-en: 'Inter', -apple-system, sans-serif;
  --container-width: 1180px;
  --radius: 3px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans-bn), var(--font-sans-en);
  line-height: 1.65;
  font-size: 16px;
}

h1, h2, h3, h4, .headline {
  font-family: var(--font-serif-bn), var(--font-serif-en);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 0.5em;
  color: var(--color-text);
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--color-accent); }
img { max-width: 100%; height: auto; display: block; }

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

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--color-accent); color: #fff; padding: 10px 16px; z-index: 999;
}
.skip-link:focus { left: 10px; top: 10px; }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--color-text);
  color: #eee;
  font-size: 0.8rem;
}
.topbar-inner {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 20px;
}
.topbar-right { display: flex; align-items: center; gap: 8px; }
.topbar-right a { color: #ccc; padding: 2px 4px; }
.topbar-right a.active, .topbar-right a:hover { color: #fff; }
.topbar-social { margin-left: 14px; display: flex; gap: 10px; }
.topbar-social a { color: #ccc; }

/* ---------- Header ---------- */
.site-header { background: var(--color-surface); border-bottom: 1px solid var(--color-border); }
.header-inner {
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px 20px;
}
.brand { display: flex; flex-direction: column; }
.brand-name {
  font-family: var(--font-serif-bn), var(--font-serif-en);
  font-size: 2rem; font-weight: 700; letter-spacing: 0.3px;
}
.brand-tagline { font-size: 0.85rem; color: var(--color-text-muted); margin-top: 2px; }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 8px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--color-text); }

.main-nav { border-top: 1px solid var(--color-border); background: var(--color-surface); }
.nav-inner { display: flex; justify-content: space-between; align-items: center; }
.nav-list { list-style: none; display: flex; gap: 26px; margin: 0; padding: 12px 0; flex-wrap: wrap; }
.nav-list a { font-size: 0.92rem; font-weight: 500; }
.nav-search { display: flex; align-items: center; border-bottom: 1px solid var(--color-border); }
.nav-search input { border: none; background: none; padding: 6px 4px; font-family: inherit; width: 140px; }
.nav-search input:focus { outline: none; }
.nav-search button { background: none; border: none; cursor: pointer; color: var(--color-text-muted); }

/* ---------- Buttons / misc ---------- */
.btn {
  display: inline-block; padding: 10px 22px; border: 1px solid var(--color-text);
  border-radius: var(--radius); font-weight: 500; font-size: 0.9rem;
}
.btn:hover { background: var(--color-text); color: #fff; }
.btn-accent { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }
.btn-accent:hover { background: #6e190d; color: #fff; }

.eyebrow {
  text-transform: uppercase; letter-spacing: 1.2px; font-size: 0.72rem;
  font-weight: 700; color: var(--color-accent);
}

.section-title {
  display: flex; align-items: baseline; justify-content: space-between;
  border-bottom: 2px solid var(--color-text); padding-bottom: 10px; margin: 48px 0 24px;
}
.section-title h2 { margin: 0; font-size: 1.5rem; }
.section-title a { font-size: 0.85rem; color: var(--color-text-muted); }

/* ---------- Homepage: Featured ---------- */
.featured-grid {
  display: grid; grid-template-columns: 1.6fr 1fr; gap: 32px; margin-top: 28px;
}
.featured-main img { border-radius: var(--radius); aspect-ratio: 16/10; object-fit: cover; }
.featured-main h1, .featured-main h2 { font-size: 2rem; margin: 14px 0 10px; }
.featured-main .excerpt { color: var(--color-text-muted); font-size: 1.02rem; }
.featured-side { display: flex; flex-direction: column; gap: 20px; }
.featured-side-item { display: flex; gap: 14px; border-bottom: 1px solid var(--color-border); padding-bottom: 16px; }
.featured-side-item img { width: 110px; height: 80px; object-fit: cover; border-radius: var(--radius); flex-shrink: 0; }
.featured-side-item h3 { font-size: 1.02rem; margin: 0 0 4px; }
.meta { font-size: 0.78rem; color: var(--color-text-muted); }
.meta a { color: var(--color-accent); font-weight: 600; }

/* ---------- Post grid / cards ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.post-card img { aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius); }
.post-card h3 { font-size: 1.08rem; margin: 12px 0 6px; }
.post-card .excerpt { color: var(--color-text-muted); font-size: 0.92rem; }

/* ---------- Ticker ---------- */
.ticker {
  background: var(--color-accent-soft); border: 1px solid var(--color-border);
  display: flex; align-items: center; padding: 10px 16px; border-radius: var(--radius);
  gap: 14px; overflow: hidden; margin: 20px 0;
}
.ticker-label {
  background: var(--color-accent); color: #fff; font-size: 0.75rem; font-weight: 700;
  padding: 4px 10px; border-radius: 3px; flex-shrink: 0;
}
.ticker-track { white-space: nowrap; overflow: hidden; position: relative; flex: 1; }
.ticker-track ul { display: inline-flex; gap: 40px; list-style: none; margin: 0; padding: 0; animation: ticker-scroll 30s linear infinite; }
.ticker-track a { font-size: 0.92rem; font-weight: 500; }
@keyframes ticker-scroll { from { transform: translateX(0);} to { transform: translateX(-50%);} }

/* ---------- Single post ---------- */
.breadcrumb { font-size: 0.82rem; color: var(--color-text-muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--color-text-muted); }
.breadcrumb a:hover { color: var(--color-accent); }
.post-header { max-width: 760px; margin: 0 auto 24px; text-align: center; }
.post-header h1 { font-size: 2.3rem; }
.post-header .subtitle { font-size: 1.15rem; color: var(--color-text-muted); font-weight: 400; margin-bottom: 14px; }
.post-featured-image { max-width: 920px; margin: 0 auto 30px; }
.post-featured-image img { border-radius: var(--radius); width: 100%; }
.post-body { max-width: 720px; margin: 0 auto; font-size: 1.08rem; }
.post-body p { margin: 0 0 1.3em; }
.post-body img { border-radius: var(--radius); margin: 1.6em 0; }
.post-body blockquote {
  border-left: 3px solid var(--color-accent); margin: 1.6em 0; padding: 4px 0 4px 20px;
  font-style: italic; color: var(--color-text-muted); font-size: 1.15rem;
}
.post-body iframe { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: var(--radius); }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 30px 0; max-width: 720px; margin-left: auto; margin-right: auto; }
.post-tags a { border: 1px solid var(--color-border); padding: 5px 12px; border-radius: 20px; font-size: 0.82rem; }
.share-buttons { display: flex; gap: 10px; max-width: 720px; margin: 0 auto 40px; }
.share-buttons a, .share-buttons button {
  border: 1px solid var(--color-border); border-radius: 50%; width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center; background: none; cursor: pointer; color: var(--color-text);
}
.post-nav { display: flex; justify-content: space-between; gap: 20px; max-width: 720px; margin: 0 auto 50px; border-top: 1px solid var(--color-border); padding-top: 24px; }
.post-nav a { max-width: 46%; font-size: 0.92rem; }
.post-nav .label { display: block; font-size: 0.72rem; color: var(--color-text-muted); text-transform: uppercase; margin-bottom: 4px; }

/* ---------- Sidebar layout ---------- */
.layout-with-sidebar { display: grid; grid-template-columns: 2.4fr 1fr; gap: 40px; }
.sidebar-box { border: 1px solid var(--color-border); border-radius: var(--radius); padding: 20px; margin-bottom: 24px; }
.sidebar-box h4 { font-size: 1rem; border-bottom: 1px solid var(--color-border); padding-bottom: 10px; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 500; margin-bottom: 6px; font-size: 0.92rem; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--color-border);
  border-radius: var(--radius); font-family: inherit; font-size: 0.95rem;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none; border-color: var(--color-accent);
}
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 18px; font-size: 0.92rem; }
.alert-success { background: #e8f4ea; color: #1c5e2c; border: 1px solid #bfe2c6; }
.alert-error { background: #fbe9e7; color: #8a1f11; border: 1px solid #f1c1ba; }

/* ---------- Pagination ---------- */
.pagination-list { display: flex; gap: 6px; list-style: none; padding: 0; margin: 40px 0; flex-wrap: wrap; }
.pagination-list a {
  display: inline-block; padding: 8px 14px; border: 1px solid var(--color-border); border-radius: var(--radius); font-size: 0.88rem;
}
.pagination-list li.active a { background: var(--color-text); color: #fff; border-color: var(--color-text); }

/* ---------- Gallery ---------- */
.masonry { columns: 3 220px; column-gap: 16px; }
.masonry figure { break-inside: avoid; margin: 0 0 16px; }
.masonry img { border-radius: var(--radius); cursor: zoom-in; }

/* ---------- Footer ---------- */
.site-footer { background: #171614; color: #cfcac2; margin-top: 60px; }
.footer-inner { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; padding: 50px 20px 30px; }
.footer-col h3 { color: #fff; }
.footer-col h4 { color: #fff; font-size: 0.95rem; margin-bottom: 14px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-col a { color: #cfcac2; font-size: 0.9rem; }
.footer-col a:hover { color: #fff; }
.footer-social { display: flex; gap: 14px; margin-top: 14px; }
.footer-social a { font-size: 1.1rem; }
.footer-bottom { border-top: 1px solid #333; padding: 16px 20px; font-size: 0.8rem; text-align: center; color: #999; }

/* ---------- 404 ---------- */
.error-page { text-align: center; padding: 100px 20px; }
.error-page h1 { font-size: 6rem; color: var(--color-accent); margin-bottom: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .featured-grid { grid-template-columns: 1fr; }
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .layout-with-sidebar { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .main-nav { display: none; }
  .main-nav.open { display: block; }
  .nav-inner { flex-direction: column; align-items: stretch; }
  .nav-list { flex-direction: column; gap: 4px; padding: 14px 0; }
  .post-grid { grid-template-columns: 1fr; }
  .brand-name { font-size: 1.5rem; }
  .footer-inner { grid-template-columns: 1fr; }
  .masonry { columns: 2 160px; }
}
