/*
Theme Name: Afterglow
Theme URI: https://github.com/your-username/afterglow
Author: Your Name
Author URI: https://yourwebsite.com
Description: Afterglow — a mobile-first entertainment blog theme for modern readers. Minimal one-row header, slide-in menu, scrollable topic chips, bold editorial cards, and one electric violet-to-coral gradient thread throughout.
Version: 2.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: afterglow
Tags: news, entertainment, blog, custom-menu, featured-images, one-column, two-columns, right-sidebar
*/

/* =========================================================
   TABLE OF CONTENTS  (mobile-first: base = phones,
   min-width media queries scale up)
   1.  Custom Properties
   2.  Reset & Base
   3.  Typography
   4.  Layout
   5.  Header (bar + topic chips)
   6.  Drawer menu
   7.  Search overlay
   8.  Hero
   9.  Cards & lists
   10. Section headings
   11. Single post
   12. Sidebar & widgets
   13. Footer
   14. Comments
   15. Pagination, 404, search page
   16. Utilities & animation
   17. Desktop enhancements
   ========================================================= */

/* ---------------------------------------------------------
   1. Custom Properties
   --------------------------------------------------------- */
:root {
  --color-primary:      #7c3aed;                    /* electric violet */
  --color-primary-dark: #6023c9;
  --color-accent:       #fb5f7a;                    /* coral */
  --grad-accent:        linear-gradient(120deg, #7c3aed 0%, #d43ad6 55%, #fb5f7a 100%);
  --color-bg:           #fafafa;
  --color-surface:      #ffffff;
  --color-ink:          #16121f;                    /* near-black with violet cast */
  --color-text:         #221d2e;
  --color-text-muted:   #6f6a7c;
  --color-border:       #eae7f0;
  --color-chip-bg:      #f1eef7;
  --font-body:          'Inter', -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --font-heading:       'Space Grotesk', 'Inter', -apple-system, sans-serif;
  --radius:             10px;
  --radius-lg:          18px;
  --shadow-sm:          0 1px 3px rgba(22, 18, 31, .07);
  --shadow-md:          0 8px 28px rgba(22, 18, 31, .12);
  --max-width:          1160px;
  --sidebar-width:      320px;
  --gap:                20px;
  --header-height:      56px;
}

/* ---------------------------------------------------------
   2. Reset & Base
   --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; height: auto; display: block; }

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

ul, ol { list-style: none; }

button, input, select, textarea {
  font: inherit;
  border: none;
  background: none;
  outline: none;
}

::selection { background: var(--color-primary); color: #fff; }

/* ---------------------------------------------------------
   3. Typography
   --------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -.015em;
  color: var(--color-ink);
}

.entry-content h2 { font-size: 1.5rem;  margin: 2rem 0 .75rem; }
.entry-content h3 { font-size: 1.25rem; margin: 1.75rem 0 .6rem; }
.entry-content h4 { font-size: 1.05rem; margin: 1.5rem 0 .5rem; }

.entry-content p  { margin-bottom: 1.25rem; }
.entry-content ul, .entry-content ol { margin: 0 0 1.25rem 1.5rem; }
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li { margin-bottom: .4rem; }
.entry-content a  { color: var(--color-primary); font-weight: 600; }
.entry-content a:hover { text-decoration: underline; }
.entry-content img { border-radius: var(--radius); }

.entry-content blockquote {
  border-left: 4px solid;
  border-image: var(--grad-accent) 1;
  padding: .75rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--color-surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: #4a4458;
}

/* ---------------------------------------------------------
   4. Layout
   --------------------------------------------------------- */
.site-wrapper { min-height: 100vh; display: flex; flex-direction: column; }

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

.site-content { flex: 1; padding: 16px 0 40px; }

.content-area { display: block; }

.main-content { min-width: 0; }

/* ---------------------------------------------------------
   5. Header — one clean row: menu · wordmark · search
   --------------------------------------------------------- */
.site-header {
  background: rgba(255, 255, 255, .88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-bar {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.site-branding { display: flex; align-items: center; min-width: 0; }

.site-wordmark {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--color-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wordmark-dot {
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
}

.menu-toggle,
.header-search-btn {
  width: 42px;
  height: 42px;
  min-width: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--color-ink);
  cursor: pointer;
  transition: background .15s;
}

.menu-toggle:hover,
.header-search-btn:hover { background: var(--color-chip-bg); }

.menu-toggle { flex-direction: column; gap: 5px; }

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--color-ink);
  transition: transform .25s, opacity .25s;
}

.menu-toggle[aria-expanded="true"] span:first-child  { transform: translateY(3.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child   { transform: translateY(-3.5px) rotate(-45deg); }

.header-search-btn svg { width: 20px; height: 20px; }

/* Topic chips — one horizontally scrollable row */
.topic-chips {
  border-bottom: 1px solid var(--color-border);
  background: rgba(255, 255, 255, .88);
}

.topic-chips-track {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-top: 8px;
  padding-bottom: 10px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.topic-chips-track::-webkit-scrollbar { display: none; }

.topic-chips a,
.chip {
  flex: 0 0 auto;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--color-chip-bg);
  color: var(--color-text);
  font-size: .8rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background .15s, color .15s;
}

.topic-chips a:hover,
.topic-chips a.active,
.chip:hover {
  background: var(--color-ink);
  color: #fff;
}

/* ---------------------------------------------------------
   6. Drawer menu (slide-in from left)
   --------------------------------------------------------- */
.drawer-backdrop {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(22, 18, 31, .5);
  z-index: 200;
  opacity: 0;
  transition: opacity .25s;
}

.drawer-backdrop.is-open { opacity: 1; }

.site-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(320px, 86vw);
  background: var(--color-ink);
  color: #fff;
  z-index: 201;
  display: flex;
  flex-direction: column;
  padding: 18px 22px 24px;
  transform: translateX(-105%);
  transition: transform .28s cubic-bezier(.32, .72, .28, 1);
  overflow-y: auto;
}

.site-drawer.is-open { transform: translateX(0); }

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
}

.drawer-brand {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.drawer-close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  transition: background .15s;
}

.drawer-close:hover { background: rgba(255, 255, 255, .12); }

.drawer-close svg { width: 20px; height: 20px; }

.drawer-nav { flex: 1; }

.drawer-menu li { margin-bottom: 4px; }

.drawer-menu a {
  display: block;
  padding: 12px 10px;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -.01em;
  color: rgba(255, 255, 255, .92);
  border-radius: var(--radius);
  transition: background .15s, color .15s, padding-left .15s;
}

.drawer-menu a:hover,
.drawer-menu .current-menu-item > a {
  color: #fff;
  background: rgba(255, 255, 255, .08);
  padding-left: 16px;
}

.drawer-menu .sub-menu a {
  font-size: 1rem;
  font-weight: 500;
  padding: 8px 10px 8px 22px;
  color: rgba(255, 255, 255, .7);
}

.drawer-footer { margin-top: 24px; }

.drawer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.drawer-social a {
  font-size: .8rem;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .25);
  color: rgba(255, 255, 255, .85);
  transition: border-color .15s, color .15s;
}

.drawer-social a:hover { border-color: #fff; color: #fff; }

/* ---------------------------------------------------------
   7. Search overlay
   --------------------------------------------------------- */
.search-overlay {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(22, 18, 31, .72);
  z-index: 300;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 72px 16px 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s;
}

.search-overlay.is-open { opacity: 1; pointer-events: all; }

.search-overlay-inner {
  background: var(--color-surface);
  width: 100%;
  max-width: 620px;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-md);
  transform: translateY(-16px);
  transition: transform .22s;
}

.search-overlay.is-open .search-overlay-inner { transform: translateY(0); }

.search-overlay-close {
  display: block;
  margin-left: auto;
  font-size: .8rem;
  color: var(--color-text-muted);
  cursor: pointer;
  margin-bottom: 12px;
}

.search-overlay-form { display: flex; gap: 8px; }

.search-overlay-form input {
  flex: 1;
  min-width: 0;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 1rem;
  color: var(--color-text);
  transition: border-color .15s;
}

.search-overlay-form input:focus { border-color: var(--color-primary); }

.search-overlay-form button {
  background: var(--grad-accent);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius);
  font-weight: 700;
  cursor: pointer;
}

/* ---------------------------------------------------------
   8. Hero
   --------------------------------------------------------- */
.hero-section { margin: 4px 0 var(--gap); }

.hero-post {
  position: relative;
  display: block;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-ink);
  aspect-ratio: 4 / 5;                /* tall & thumb-friendly on phones */
  box-shadow: var(--shadow-md);
}

.hero-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.hero-post:hover .hero-thumbnail { transform: scale(1.03); }

.hero-overlay {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: linear-gradient(to top, rgba(15, 10, 25, .88) 0%, rgba(15, 10, 25, .32) 50%, transparent 100%);
}

.hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 18px;
}

.hero-categories { display: flex; gap: 6px; margin-bottom: 10px; }

.hero-cat-badge {
  background: var(--grad-accent);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.hero-title {
  font-size: clamp(1.4rem, 5.5vw, 2.1rem);
  color: #fff;
  margin-bottom: 8px;
}

.hero-excerpt {
  font-size: .9rem;
  color: rgba(255, 255, 255, .82);
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-meta { font-size: .76rem; color: rgba(255, 255, 255, .6); }

/* ---------------------------------------------------------
   9. Cards & lists (single column on phones)
   --------------------------------------------------------- */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: var(--gap);
}

.article-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .18s, box-shadow .18s;
  display: flex;
  flex-direction: column;
}

.article-card:hover,
.article-card:active {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.article-card__thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--color-chip-bg);
}

.article-card__thumb img { width: 100%; height: 100%; object-fit: cover; }

.article-card__body { padding: 14px 16px 16px; }

.article-card__cat {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 6px;
}

.article-card__title {
  font-size: 1.08rem;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card__meta { font-size: .76rem; color: var(--color-text-muted); }

/* Text list items (small thumb + title) */
.article-list { display: flex; flex-direction: column; }

.article-list-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 4px;
  border-bottom: 1px solid var(--color-border);
  transition: background .15s;
}

.article-list-item:last-child { border-bottom: none; }

.article-list-item:hover { background: var(--color-surface); }

.article-list-item__thumb {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-chip-bg);
}

.article-list-item__thumb img { width: 100%; height: 100%; object-fit: cover; }

.article-list-item__body { min-width: 0; }

.article-list-item__cat {
  display: inline-block;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--color-primary);
  margin-bottom: 2px;
}

.article-list-item__title {
  font-size: .95rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-list-item__meta { font-size: .72rem; color: var(--color-text-muted); margin-top: 3px; }

/* ---------------------------------------------------------
   10. Section headings
   --------------------------------------------------------- */
.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 28px 0 14px;
}

.section-heading h2 {
  font-size: 1.25rem;
  position: relative;
  padding-left: 14px;
}

.section-heading h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: .12em;
  bottom: .12em;
  width: 4px;
  border-radius: 4px;
  background: var(--grad-accent);
}

.view-all {
  font-size: .78rem;
  font-weight: 700;
  color: var(--color-primary);
  white-space: nowrap;
}

.view-all:hover { color: var(--color-accent); }

/* ---------------------------------------------------------
   11. Single post
   --------------------------------------------------------- */
.single-post-header { margin: 8px 0 16px; }

.single-post-categories { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }

.single-post-cat {
  background: var(--color-chip-bg);
  color: var(--color-primary);
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 4px 12px;
  border-radius: 999px;
  transition: background .15s, color .15s;
}

.single-post-cat:hover { background: var(--color-primary); color: #fff; }

.single-post-title { font-size: clamp(1.5rem, 6vw, 2.4rem); margin-bottom: 10px; }

.single-post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.single-post-meta .author-name { font-weight: 600; color: var(--color-text); }
.single-post-meta .author-name:hover { color: var(--color-primary); }
.meta-sep { opacity: .5; }

.single-post-featured {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}

.entry-content { font-size: 1.02rem; max-width: 70ch; }

/* Share bar */
.share-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0;
  padding: 14px 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.share-bar__label {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--color-text-muted);
  margin-right: 4px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  transition: opacity .15s;
}

.share-btn:hover { opacity: .85; }
.share-btn--facebook { background: #1877f2; }
.share-btn--twitter  { background: #16121f; }
.share-btn--copy     { background: var(--color-primary); }

/* Post tags */
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }

.post-tag {
  background: var(--color-chip-bg);
  font-size: .76rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  color: var(--color-text-muted);
  transition: background .15s, color .15s;
}

.post-tag:hover { background: var(--color-ink); color: #fff; }

/* Author bio */
.author-bio {
  display: flex;
  gap: 14px;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin: 24px 0;
  box-shadow: var(--shadow-sm);
}

.author-bio__avatar img { border-radius: 50%; }

.author-bio__name { font-size: 1rem; margin-bottom: 4px; }

.author-bio__description { font-size: .88rem; color: var(--color-text-muted); }

/* Post navigation */
.post-navigation { display: flex; flex-direction: column; gap: 10px; margin: 24px 0; }

.post-nav-item {
  flex: 1;
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  font-size: .9rem;
  font-weight: 600;
  transition: transform .15s, box-shadow .15s;
}

.post-nav-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* Related posts */
.related-posts { margin: 28px 0; }

/* Breadcrumbs */
.breadcrumbs { font-size: .78rem; color: var(--color-text-muted); margin-bottom: 12px; }
.breadcrumbs a:hover { color: var(--color-primary); }
.breadcrumb-sep { margin: 0 6px; opacity: .5; }

/* Archive / search headers */
.archive-header,
.search-page-header { margin: 8px 0 18px; }

.archive-header h1,
.search-page-header h1 { font-size: clamp(1.3rem, 5vw, 1.9rem); }

.search-count { color: var(--color-text-muted); font-size: .88rem; margin-top: 4px; }

/* ---------------------------------------------------------
   12. Sidebar & widgets
   --------------------------------------------------------- */
.sidebar { margin-top: 32px; }

.widget {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  padding: 16px;
  margin-bottom: 16px;
}

.widget-title {
  font-family: var(--font-heading);
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--color-ink);
  padding: 0 0 10px;
  margin: 0 0 14px;
  border-bottom: 2px solid;
  border-image: var(--grad-accent) 1;
}

/* .widget carries the padding; .widget-inner is a plain wrapper */
.widget-inner { padding: 0; }

/* Block-based widgets (WP 5.8+) have no .widget-inner wrapper */
.widget.widget_block .wp-block-heading {
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 10px;
}

/* Popular posts widget */
.popular-posts-list { display: flex; flex-direction: column; }

.popular-post-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
}

.popular-post-item:last-child { border-bottom: none; }

.popular-post-item__rank {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  min-width: 20px;
}

.popular-post-item__thumb {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  overflow: hidden;
}

.popular-post-item__thumb img { width: 100%; height: 100%; object-fit: cover; }

.popular-post-item__title {
  font-size: .85rem;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.popular-post-item:hover .popular-post-item__title { color: var(--color-primary); }

/* Category list widget */
.category-list-item a {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: .88rem;
  font-weight: 600;
  border-bottom: 1px solid var(--color-border);
}

.category-list-item:last-child a { border-bottom: none; }
.category-list-item a:hover { color: var(--color-primary); }
.cat-count { color: var(--color-text-muted); font-weight: 400; }

/* Newsletter widget */
.newsletter-widget {
  background: var(--color-ink);
  border-radius: var(--radius-lg);
  padding: 20px;
  color: #fff;
  text-align: center;
}

.newsletter-widget h3 { font-size: 1.05rem; color: #fff; margin-bottom: 6px; }

.newsletter-widget p { font-size: .85rem; opacity: .85; margin-bottom: 14px; }

.newsletter-form { display: flex; flex-direction: column; gap: 8px; }

.newsletter-form input[type="email"] {
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .3);
  color: #fff;
  font-size: .85rem;
  padding: 10px 14px;
  border-radius: 999px;
}

.newsletter-form input[type="email"]::placeholder { color: rgba(255, 255, 255, .6); }

.newsletter-form button {
  background: var(--grad-accent);
  color: #fff;
  font-size: .85rem;
  font-weight: 700;
  padding: 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: opacity .15s;
}

.newsletter-form button:hover { opacity: .9; }

/* Generic widget resets */
.widget ul { list-style: none; }
.widget ul li { padding: 6px 0; font-size: .9rem; }
.widget ul li a:hover { color: var(--color-primary); }
.widget select {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 8px 10px;
  background: var(--color-surface);
}

/* Sidebar/widget search forms (block or classic) */
.widget form[role="search"] input[type="search"],
.search-form input[type="search"] {
  width: 100%;
  border: 2px solid var(--color-border);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: .9rem;
  transition: border-color .15s;
}

.widget form[role="search"] input[type="search"]:focus,
.search-form input[type="search"]:focus { border-color: var(--color-primary); }

.widget form[role="search"] button,
.search-form .search-submit {
  background: var(--color-ink);
  color: #fff;
  border-radius: 999px;
  padding: 9px 16px;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
}

/* WP search block: input + button side by side */
.wp-block-search__inside-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wp-block-search__inside-wrapper .wp-block-search__input { flex: 1; min-width: 0; }

.wp-block-search__label {
  display: block;
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 8px;
}

/* The block button often ships with no text — draw a search icon in it */
.wp-block-search__button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
}

.wp-block-search__button:empty::before {
  content: "";
  width: 16px;
  height: 16px;
  background-color: #fff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------------------------------------------------------
   13. Footer
   --------------------------------------------------------- */
.site-footer {
  background: var(--color-ink);
  color: #b7b1c4;
  padding: 36px 0 20px;
  margin-top: auto;
}

.site-footer .site-wordmark { color: #fff; }

.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
  padding-bottom: 26px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  margin-bottom: 20px;
}

.footer-brand .site-logo,
.footer-brand .site-wordmark {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
  display: inline-block;
}

.footer-brand p { font-size: .85rem; }

.footer-nav-columns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.footer-nav-group h4 {
  color: #fff;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 10px;
}

.footer-nav-group a {
  display: block;
  font-size: .85rem;
  padding: 3px 0;
  transition: color .15s;
}

.footer-nav-group a:hover { color: #fff; }

.footer-social { display: flex; gap: 10px; margin-top: 14px; }

.footer-social a {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  transition: background .15s;
}

.footer-social a:hover { background: var(--color-primary); }

.footer-social svg { width: 15px; height: 15px; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: .76rem;
}

.footer-copy a:hover { color: #fff; }

/* ---------------------------------------------------------
   14. Comments
   --------------------------------------------------------- */
.comments-area { margin: 32px 0; }

.comments-title { font-size: 1.15rem; margin-bottom: 18px; }

.comment-list > li {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

.comment-list .children { margin: 12px 0 0 18px; }

.comment-header { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }

.comment-avatar img { border-radius: 50%; }

.comment-author-name { font-weight: 700; font-size: .9rem; }

.comment-date { font-size: .74rem; color: var(--color-text-muted); }
.comment-date a:hover { color: var(--color-primary); }

.comment-body { font-size: .92rem; }

.comment-reply-link {
  display: inline-block;
  font-size: .76rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-top: 8px;
}

/* Comment form */
.comment-respond { margin-top: 20px; }

.comment-respond .comment-reply-title { font-size: 1.1rem; margin-bottom: 14px; }

.comment-form-fields { display: grid; grid-template-columns: 1fr; gap: 10px; }

.comment-form-field { margin-bottom: 10px; }

.comment-form-field label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.comment-form-field label span { color: var(--color-accent); }

.comment-form-field input,
.comment-form-field textarea {
  width: 100%;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: .95rem;
  background: var(--color-surface);
  transition: border-color .15s;
}

.comment-form-field input:focus,
.comment-form-field textarea:focus { border-color: var(--color-primary); }

.comment-form-cookies-consent {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: .8rem;
  color: var(--color-text-muted);
  margin: 10px 0;
}

.comment-form .submit,
.btn-primary {
  display: inline-block;
  background: var(--grad-accent);
  color: #fff;
  font-weight: 700;
  font-size: .9rem;
  padding: 11px 26px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: opacity .15s, transform .15s;
}

.comment-form .submit:hover,
.btn-primary:hover { opacity: .9; transform: translateY(-1px); }

.no-comments { color: var(--color-text-muted); font-size: .9rem; }

/* ---------------------------------------------------------
   15. Pagination, 404, search page
   --------------------------------------------------------- */
.pagination { display: flex; justify-content: center; margin: 24px 0; }

.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; }

.pagination .page-numbers {
  min-width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--color-surface);
  font-size: .85rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: background .15s, color .15s;
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover { background: var(--color-ink); color: #fff; }

.page-links { margin: 16px 0; font-size: .9rem; }

.error-404 { text-align: center; padding: 48px 16px; }

.error-code {
  font-family: var(--font-heading);
  font-size: clamp(4rem, 22vw, 7rem);
  font-weight: 700;
  line-height: 1;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.error-404 h1 { font-size: 1.3rem; margin: 10px 0; }

.error-404 p { color: var(--color-text-muted); margin-bottom: 20px; }

.search-form-wrapper { max-width: 460px; margin: 0 auto; }

/* ---------------------------------------------------------
   16. Utilities & animation
   --------------------------------------------------------- */
.sr-only,
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

body.drawer-open,
body.overlay-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.card-enter { animation: cardIn .4s ease both; }

/* ---------------------------------------------------------
   17. Desktop enhancements (mobile-first: scale UP)
   --------------------------------------------------------- */
@media (min-width: 600px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }

  .hero-post { aspect-ratio: 16 / 9; }

  .hero-content { padding: 26px 28px; }

  .comment-form-fields { grid-template-columns: 1fr 1fr; }

  .post-navigation { flex-direction: row; }

  .newsletter-form { flex-direction: row; }
  .newsletter-form input[type="email"] { flex: 1 1 auto; min-width: 0; }
  .newsletter-form button { flex: 0 0 auto; padding: 10px 16px; }
}

@media (min-width: 900px) {
  .site-content { padding: 24px 0 56px; }

  .footer-top { grid-template-columns: 1fr 2fr; }

  .footer-nav-columns { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
  .content-area {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--sidebar-width);
    gap: 32px;
    align-items: start;
  }

  .sidebar {
    margin-top: 0;
    position: sticky;
    top: calc(var(--header-height) + 56px);
  }

  .hero-post { aspect-ratio: 16 / 8; }

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

  .cards-grid-3 { grid-template-columns: repeat(3, 1fr); }
}
