/*
Theme Name: Bulletin
Theme URI: https://example.com
Author: Segun
Description: A dark-hero editorial blog theme with search, category tabs, a featured article spotlight, and a clean 3-column article grid.
Version: 1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: bulletin
*/

/* ==========================================================================
   Variables
   ========================================================================== */
:root {
  --ink: #0b1220;
  --ink-soft: #1c2a4a;
  --muted: #6b7280;
  --line: #e6e9f0;
  --paper: #ffffff;
  --panel: #f4f7fb;
  --hero-bg: #f2f6fc;
  --accent: #1d5fd1;
  --accent-dark: #144aa8;
  --footer-bg: #0b1220;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --maxw: 1280px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 40px; }

/* ==========================================================================
   Header / Nav
   ========================================================================== */
.site-header {
  position: relative;
  z-index: 20;
  padding: 18px 0;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.site-branding {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.site-branding img.custom-logo { height: 32px; width: auto; }

.primary-nav ul {
  display: flex;
  gap: 36px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.primary-nav a {
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 500;
}
.primary-nav a:hover { color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: 22px; }
.header-actions .login-link { color: var(--accent); font-size: 15px; font-weight: 600; }
.header-actions .login-link:hover { color: var(--accent-dark); }

.menu-toggle { display: none; background: none; border: 0; color: var(--ink); font-size: 24px; cursor: pointer; }

@media (max-width: 900px) {
  .primary-nav { display: none; }
  .menu-toggle { display: block; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  background: var(--hero-bg);
  overflow: hidden;
}
.hero.has-image { background-size: cover; background-position: center; }
.hero .wrap { position: relative; z-index: 2; }
.hero-inner { padding: 100px 0 44px; max-width: 720px; }
.hero-eyebrow {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 14px;
}
.hero-title {
  color: var(--ink);
  font-size: 46px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
}
.hero-title .accent-line { color: var(--accent); display: block; }
.hero-desc {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
  margin: 0 0 34px;
  max-width: 560px;
}
.hero-search {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 620px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 6px 6px 22px;
  box-shadow: 0 8px 24px rgba(20,33,61,0.06);
}
.hero-search input[type="search"] {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 12px 0;
  color: var(--ink);
  font-size: 15px;
  outline: none;
}
.hero-search input[type="search"]::placeholder { color: var(--muted); }
.hero-search button {
  background: var(--accent);
  color: #fff;
  border: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-weight: 600;
  font-size: 0;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
}
.hero-search button::before {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 14px; height: 14px;
  margin: -8px 0 0 -8px;
  border: 2px solid #fff;
  border-radius: 50%;
}
.hero-search button::after {
  content: "";
  position: absolute;
  top: 62%; left: 62%;
  width: 6px; height: 2px;
  background: #fff;
  transform: rotate(45deg);
}
.hero-search button:hover { background: var(--accent-dark); }

/* ==========================================================================
   Category tabs
   ========================================================================== */
.category-tabs {
  background: var(--hero-bg);
  position: relative;
  z-index: 5;
  padding-bottom: 56px;
}
.category-tabs .wrap {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  flex-wrap: wrap;
}
.category-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 18px 9px 10px;
}
.category-tabs a .cat-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--panel);
  flex-shrink: 0;
}
.category-tabs a:nth-child(6n+1) .cat-dot { background: #e6f0ff; }
.category-tabs a:nth-child(6n+2) .cat-dot { background: #f1e9ff; }
.category-tabs a:nth-child(6n+3) .cat-dot { background: #e9f7ee; }
.category-tabs a:nth-child(6n+4) .cat-dot { background: #fdece0; }
.category-tabs a:nth-child(6n+5) .cat-dot { background: #fdeef0; }
.category-tabs a:nth-child(6n+6) .cat-dot { background: #eef0ff; }
.category-tabs a:hover { border-color: var(--accent); color: var(--ink); }
.category-tabs a.active { border-color: var(--accent); color: var(--accent); background: #eef4ff; }

/* ==========================================================================
   Featured article
   ========================================================================== */
.featured-section { background: var(--paper); padding: 12px 0 8px; }
.featured-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 18px;
}
.featured-card {
  background: var(--paper);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: 0 1px 2px rgba(20,20,28,0.05);
}
.featured-media {
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 16/6.2;
  background: linear-gradient(120deg, #101018, #2b1a10 55%, #123330 100%);
}
.featured-media img { width: 100%; height: 100%; object-fit: cover; }
.featured-body { padding: 28px 18px 22px; }
.featured-title {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  max-width: 760px;
}
.featured-title a:hover { color: var(--accent); }
.featured-excerpt { color: var(--ink-soft); font-size: 16px; max-width: 720px; margin: 0; }

@media (max-width: 700px) {
  .featured-media { aspect-ratio: 4/3; }
  .featured-title { font-size: 24px; }
}

/* ==========================================================================
   Article grid
   ========================================================================== */
.articles-section { padding: 56px 0 90px; }
.articles-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 22px;
}
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
@media (max-width: 980px) { .article-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .article-grid { grid-template-columns: 1fr; } }

.article-card { display: flex; flex-direction: column; }
.article-thumb {
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--panel);
  margin-bottom: 18px;
}
.article-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.article-card:hover .article-thumb img { transform: scale(1.04); }
.article-card h3 {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}
.article-card h3 a:hover { color: var(--accent); }
.article-excerpt { color: var(--muted); font-size: 14.5px; line-height: 1.55; margin: 0 0 16px; }
.article-meta { font-size: 12.5px; color: var(--muted); font-weight: 600; letter-spacing: 0.02em; }
.article-meta .author { color: var(--ink-soft); }
.article-meta .dot { margin: 0 8px; opacity: .5; }

.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 56px; }
.pagination a, .pagination span {
  min-width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px;
  font-size: 14px; font-weight: 600;
  color: var(--ink-soft);
}
.pagination .current { background: var(--accent); color: #fff; }
.pagination a:hover { background: var(--panel); }

/* ==========================================================================
   Single post
   ========================================================================== */
.post-hero { background: var(--paper); padding: 56px 0 0; text-align: center; }
.post-hero-inner { max-width: 900px; margin: 0 auto; }
.post-eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  margin: 0 0 14px;
}
.post-title-rounded {
  font-family: 'Baloo 2', -apple-system, sans-serif;
  color: var(--accent);
  font-size: 42px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
}
.post-readtime { color: var(--muted); font-size: 14px; margin: 0 0 36px; }

.post-hero-media {
  background: var(--footer-bg);
  border-radius: 28px;
  padding: 22px;
  background-image:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.06) 0 1px, transparent 1px 40px);
}
.post-hero-frame { border-radius: 16px; overflow: hidden; }
.post-hero-frame img { width: 100%; display: block; }

.post-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 56px;
  padding: 60px 40px 100px;
}
.post-sidebar { position: sticky; top: 24px; align-self: start; }
.author-card {
  background: var(--panel);
  border-radius: 20px;
  padding: 32px 24px;
  text-align: center;
}
.author-avatar { width: 80px; height: 80px; margin: 0 auto 16px; border-radius: 50%; overflow: hidden; }
.author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-name { font-weight: 700; font-size: 16px; margin: 0 0 22px; color: var(--ink); }
.share-label {
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 14px;
}
.share-icons { display: flex; justify-content: center; gap: 12px; margin-bottom: 26px; }
.share-icons a {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.share-icons a:hover { background: var(--accent-dark); }
.sidebar-cta-text { font-size: 14px; font-weight: 600; color: var(--ink-soft); margin: 0 0 14px; }
.sidebar-cta-btn {
  display: block;
  background: var(--accent);
  color: #fff;
  padding: 14px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  text-align: center;
}
.sidebar-cta-btn:hover { background: var(--accent-dark); }

.post-content { font-size: 18px; line-height: 1.8; color: var(--ink-soft); }
.post-content > *:first-child { margin-top: 0; }
.post-content h2 { color: var(--accent); font-size: 26px; margin-top: 44px; font-weight: 700; }
.post-content h3 { color: var(--ink); font-size: 21px; margin-top: 34px; font-weight: 700; }
.post-content a { color: var(--accent); text-decoration: underline; }
.post-content img { border-radius: var(--radius-md); margin: 30px 0; }
.post-comments-wrap { padding-top: 0; }

.page-header { background: var(--hero-bg); padding: 70px 0 40px; }
.page-title { color: var(--ink); font-size: 38px; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.page-content { max-width: 780px; margin: 50px auto 100px; font-size: 18px; line-height: 1.75; color: var(--ink-soft); }
.page-content img { border-radius: var(--radius-md); margin: 30px 0; }
.page-content a { color: var(--accent); text-decoration: underline; }

@media (max-width: 860px) {
  .post-title-rounded { font-size: 30px; }
  .post-layout { grid-template-columns: 1fr; padding: 40px 20px 70px; gap: 30px; }
  .post-sidebar { position: static; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--footer-bg); color: rgba(255,255,255,0.55); padding: 60px 0 36px; margin-top: 40px; }
.site-footer .wrap { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 40px; }
.site-footer a { color: rgba(255,255,255,0.75); }
.site-footer a:hover { color: #fff; }
.footer-brand { display: flex; flex-direction: column; gap: 14px; }
.footer-brand .site-branding { color: #fff; }
.footer-brand .footer-copy { font-size: 13px; color: rgba(255,255,255,0.45); }
.footer-social { display: flex; gap: 10px; margin-top: 6px; }
.footer-social a {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
}
.footer-menu ul { list-style: none; margin: 0; padding: 0; font-size: 14px; display: flex; flex-direction: column; gap: 12px; }
