/*
Theme Name: Hive LiteMag
Theme URI: https://mammothinteractive.com
Author: Mammoth Interactive
Author URI: https://mammothinteractive.com
Description: A clean, bold editorial magazine theme inspired by modern AI/tech publications. Three-column grid layout with large display headings and full-color imagery.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hive-litemag
Tags: blog, magazine, news, editorial, three-columns, custom-menu, featured-images, translation-ready
*/

/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
  --color-black:       #0a0a0a;
  --color-near-black:  #1a1a1a;
  --color-dark-gray:   #2d2d2d;
  --color-mid-gray:    #666666;
  --color-light-gray:  #999999;
  --color-rule:        #e2e2e2;
  --color-rule-light:  #eeeeee;
  --color-white:       #ffffff;
  --color-link:        #5b7fa6;

  /* Poppins for the big display title — bold, geometric, techy */
  --font-display:  'Poppins', 'Arial Black', sans-serif;
  /* Barlow for body text and UI — clean, technical */
  --font-body:     'Barlow', 'Helvetica Neue', Arial, sans-serif;
  /* Roboto Mono for meta labels */
  --font-meta:     'Roboto Mono', 'Courier New', monospace;

  --weight-normal:  400;
  --weight-medium:  500;
  --weight-semi:    600;
  --weight-bold:    700;
  --weight-black:   800;

  --max-width:     1200px;
  --gutter:        40px;
  --col-gap:       40px;

  --transition-fast: 0.18s ease;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--color-dark-gray);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ============================================================
   TYPOGRAPHY — headings use Poppins bold
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  color: var(--color-black);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

/* ============================================================
   UTILITY
   ============================================================ */
.screen-reader-text {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}
.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ============================================================
   MASTHEAD / HEADER
   ============================================================ */
#masthead {
  background: var(--color-white);
  padding-top: 48px;
  padding-bottom: 0;
}

.site-branding {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-bottom: 16px;
}

/* Big bold Poppins title — matches screenshot exactly */
.site-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: var(--weight-black);
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--color-black);
}
.site-title a { transition: opacity var(--transition-fast); }
.site-title a:hover { opacity: 0.75; }

/* Spaced uppercase tagline — no decorative lines */
.site-tagline {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: var(--weight-normal);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-mid-gray);
  margin-top: 10px;
}

/* ============================================================
   PRIMARY NAVIGATION
   ============================================================ */
#site-navigation {
  border-top: 1px solid var(--color-rule);
  margin-top: 20px;
}

.main-navigation {
  display: flex;
  justify-content: center;
}

.main-navigation ul {
  display: flex;
  gap: 0;
}

.main-navigation ul li { position: relative; }

.main-navigation ul li a {
  display: block;
  padding: 14px 24px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: var(--weight-semi);
  color: var(--color-dark-gray);
  transition: color var(--transition-fast);
}
.main-navigation ul li a:hover,
.main-navigation ul li.current-menu-item > a {
  color: var(--color-black);
}

/* Dropdown */
.main-navigation ul ul {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-white);
  border: 1px solid var(--color-rule);
  border-top: 2px solid var(--color-black);
  min-width: 180px;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  z-index: 100;
}
.main-navigation ul li:hover > ul {
  opacity: 1; pointer-events: auto; transform: translateY(0);
}
.main-navigation ul ul li a { padding: 10px 18px; font-size: 0.8rem; }

/* Mobile toggle */
.menu-toggle {
  display: none;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: var(--weight-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 14px 0;
  color: var(--color-black);
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
#primary {
  padding-block: 48px;
}

/* Three equal columns */
.content-area {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
}

.content-area .column:not(:first-child) {
  padding-left: var(--col-gap);
}
.content-area .column:not(:last-child) {
  padding-right: var(--col-gap);
  border-right: 1px solid var(--color-rule);
}

/* ============================================================
   POST CARDS — title ABOVE image (matches screenshot)
   ============================================================ */
.post-card {
  margin-bottom: 44px;
  padding-bottom: 44px;
  border-bottom: 1px solid var(--color-rule-light);
}
.post-card:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

/* Title above the image */
.post-card .entry-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: var(--weight-bold);
  line-height: 1.25;
  margin-bottom: 14px;
  color: var(--color-black);
}
.post-card .entry-title .bold-prefix {
  font-weight: var(--weight-black);
}
.post-card .entry-title a {
  color: var(--color-black);
  transition: color var(--transition-fast);
}
.post-card .entry-title a:hover { color: var(--color-mid-gray); }

/* Thumbnail below the title */
.post-card .post-thumbnail {
  overflow: hidden;
  margin-bottom: 14px;
}
.post-card .post-thumbnail img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  transition: transform 0.45s ease;
}
.post-card:hover .post-thumbnail img {
  transform: scale(1.03);
}

/* Excerpt */
.post-card .entry-excerpt {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--color-mid-gray);
  margin-bottom: 10px;
}

/* Meta: date / category — monospace */
.post-card .entry-meta {
  font-family: var(--font-meta);
  font-size: 0.68rem;
  color: var(--color-light-gray);
  display: flex;
  align-items: center;
  gap: 0;
}
.post-card .entry-meta .meta-date { margin-right: 4px; }
.post-card .entry-meta .meta-sep  { margin-right: 4px; color: var(--color-rule); }
.post-card .entry-meta .meta-cat {
  color: var(--color-link);
  font-weight: var(--weight-normal);
}
.post-card .entry-meta .meta-cat:hover { text-decoration: underline; }
.post-card .entry-meta .meta-rule {
  flex: 1;
  height: 1px;
  background: var(--color-rule);
  margin-left: 10px;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero-featured {
  border-bottom: 1px solid var(--color-rule);
  padding-block: 0;
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 440px;
}
.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 48px 48px 0;
  border-right: 1px solid var(--color-rule);
}
.hero-category {
  font-family: var(--font-meta);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-mid-gray);
  margin-bottom: 14px;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: var(--weight-black);
  line-height: 1.15;
  margin-bottom: 16px;
}
.hero-excerpt {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--color-mid-gray);
  margin-bottom: 24px;
}
.hero-meta {
  font-family: var(--font-meta);
  font-size: 0.68rem;
  color: var(--color-light-gray);
}
.hero-meta .category-link {
  color: var(--color-link);
  margin-left: 4px;
}
.hero-image { overflow: hidden; }
.hero-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.hero-image:hover img { transform: scale(1.03); }

/* ============================================================
   SINGLE POST
   ============================================================ */
.single .entry-header {
  max-width: 780px;
  margin-inline: auto;
  text-align: center;
  padding-block: 56px 36px;
  border-bottom: 1px solid var(--color-rule);
  margin-bottom: 44px;
}
.single .entry-category {
  font-family: var(--font-meta);
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-mid-gray);
  margin-bottom: 16px;
}
.single .entry-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: var(--weight-black);
  line-height: 1.15;
  margin-bottom: 20px;
}
.single .entry-meta {
  font-family: var(--font-meta);
  font-size: 0.7rem;
  color: var(--color-light-gray);
  display: flex;
  justify-content: center;
  gap: 16px;
}
.single .post-thumbnail {
  max-width: 900px;
  margin-inline: auto;
  margin-bottom: 44px;
}
.single .post-thumbnail img { width: 100%; }
.single .entry-content {
  max-width: 700px;
  margin-inline: auto;
  font-size: 1rem;
  line-height: 1.8;
}
.single .entry-content p { margin-bottom: 1.4em; }
.single .entry-content h2 { font-size: 1.6rem; margin-block: 1.8em 0.6em; }
.single .entry-content blockquote {
  border-left: 3px solid var(--color-black);
  padding-left: 24px;
  margin-block: 1.8em;
  font-style: italic;
  font-size: 1.1rem;
}

/* ============================================================
   ARCHIVE HEADER
   ============================================================ */
.archive-header {
  padding-block: 48px 36px;
  border-bottom: 1px solid var(--color-rule);
  margin-bottom: 44px;
}
.archive-kicker {
  display: block;
  font-family: var(--font-meta);
  font-size: 0.65rem;
  font-weight: var(--weight-bold);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-mid-gray);
  margin-bottom: 10px;
}
.archive-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: var(--weight-black);
  color: var(--color-black);
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.widget-area { padding-top: 48px; border-top: 1px solid var(--color-rule); }
.widget { margin-bottom: 40px; }
.widget-title {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: var(--weight-bold);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-black);
  margin-bottom: 16px;
}

/* ============================================================
   SEARCH FORM
   ============================================================ */
.search-form { display: flex; border-bottom: 2px solid var(--color-black); }
.search-form input[type="search"] {
  flex: 1; border: none; outline: none;
  font-family: var(--font-body); font-size: 0.9rem;
  padding: 8px 0; background: transparent; color: var(--color-black);
}
.search-form button {
  font-family: var(--font-body); font-size: 0.7rem;
  font-weight: var(--weight-bold); letter-spacing: 0.1em;
  text-transform: uppercase; padding: 8px 0 8px 12px; color: var(--color-black);
}

/* ============================================================
   PAGINATION
   ============================================================ */
.posts-navigation, .post-navigation, .pagination {
  margin-top: 56px; padding-top: 28px;
  border-top: 1px solid var(--color-rule);
  font-family: var(--font-body); font-size: 0.8rem;
}
.nav-links { display: flex; justify-content: space-between; align-items: center; }
.nav-links .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border: 1px solid var(--color-rule);
  transition: all var(--transition-fast);
}
.nav-links .page-numbers:hover,
.nav-links .page-numbers.current {
  background: var(--color-black); color: var(--color-white); border-color: var(--color-black);
}

/* ============================================================
   FOOTER
   ============================================================ */
#colophon {
  border-top: 3px solid var(--color-black);
  padding-block: 40px 24px;
  background: var(--color-white);
}
.footer-widgets {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: var(--col-gap); margin-bottom: 36px;
  padding-bottom: 36px; border-bottom: 1px solid var(--color-rule);
}
.site-info {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-meta); font-size: 0.7rem; color: var(--color-light-gray);
}
.site-info a { color: var(--color-mid-gray); }
.site-info a:hover { color: var(--color-black); }
.footer-brand {
  font-family: var(--font-display); font-size: 1.2rem;
  font-weight: var(--weight-black); color: var(--color-black);
}
.footer-menu { display: flex; gap: 20px; }
.footer-menu li a { font-family: var(--font-body); font-size: 0.72rem; color: var(--color-light-gray); }
.footer-menu li a:hover { color: var(--color-black); }

/* ============================================================
   READ MORE
   ============================================================ */
.read-more {
  display: inline-block; font-family: var(--font-body);
  font-size: 0.72rem; font-weight: var(--weight-bold);
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--color-black); border-bottom: 1px solid var(--color-black);
  padding-bottom: 1px; margin-top: 10px;
  transition: opacity var(--transition-fast);
}
.read-more:hover { opacity: 0.5; }

/* ============================================================
   COMMENTS
   ============================================================ */
.comments-area {
  max-width: 780px; margin-inline: auto;
  margin-top: 56px; padding-top: 36px; border-top: 1px solid var(--color-rule);
}
.comments-title, .comment-reply-title {
  font-family: var(--font-display); font-size: 1.5rem; font-weight: var(--weight-bold);
  display: flex; align-items: center; gap: 18px; margin-bottom: 28px;
}
.comments-title::before   { content: 'i'; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; background: var(--color-near-black); color: var(--color-white); font-family: var(--font-meta); font-size: 0.85rem; flex-shrink: 0; }
.comment-reply-title::before { content: '+'; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; background: var(--color-near-black); color: var(--color-white); font-family: var(--font-meta); font-size: 1rem; flex-shrink: 0; }
.comment-form label { display: block; font-family: var(--font-meta); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-dark-gray); margin-bottom: 5px; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea { width: 100%; border: 1px solid var(--color-rule); padding: 10px 12px; font-family: var(--font-body); font-size: 0.9rem; color: var(--color-dark-gray); background: var(--color-white); outline: none; border-radius: 0; transition: border-color var(--transition-fast); }
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--color-black); }
.comment-form textarea { min-height: 180px; resize: vertical; }
.comment-form .form-submit .submit { display: inline-block; background: var(--color-near-black); color: var(--color-white); font-family: var(--font-body); font-size: 0.82rem; font-weight: var(--weight-bold); letter-spacing: 0.06em; text-transform: uppercase; padding: 13px 28px; border: none; cursor: pointer; float: right; transition: background var(--transition-fast); }
.comment-form .form-submit .submit:hover { background: var(--color-black); }
.logged-in-as, .comment-notes { font-size: 0.85rem; color: var(--color-mid-gray); margin-bottom: 18px; }
.comment-list .comment-body { padding-block: 24px; border-bottom: 1px solid var(--color-rule-light); }
.comment-list .comment-author { font-family: var(--font-body); font-weight: var(--weight-bold); font-size: 0.88rem; margin-bottom: 3px; }
.comment-list .comment-metadata { font-family: var(--font-meta); font-size: 0.65rem; color: var(--color-light-gray); margin-bottom: 10px; }
.comment-list .comment-content p { font-size: 0.9rem; line-height: 1.65; }
.no-comments { font-family: var(--font-display); font-size: 1.5rem; display: flex; align-items: center; gap: 18px; margin-bottom: 8px; }
.no-comments::before { content: 'i'; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; background: var(--color-near-black); color: var(--color-white); font-family: var(--font-meta); font-size: 0.85rem; flex-shrink: 0; }

/* ============================================================
   AUTHOR BIO
   ============================================================ */
.author-bio { max-width: 780px; margin-inline: auto; margin-top: 48px; padding: 28px; border: 1px solid var(--color-rule); display: flex; gap: 20px; align-items: flex-start; }
.author-bio .author-avatar img { width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0; }
.author-bio .author-name { font-size: 0.95rem; margin-bottom: 6px; }
.author-bio .author-description { font-size: 0.83rem; color: var(--color-mid-gray); line-height: 1.6; }

/* ============================================================
   TAGS
   ============================================================ */
.entry-tags { max-width: 700px; margin-inline: auto; margin-top: 28px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag-link { display: inline-block; font-family: var(--font-meta); font-size: 0.63rem; font-weight: var(--weight-bold); letter-spacing: 0.1em; text-transform: uppercase; padding: 4px 10px; border: 1px solid var(--color-rule); color: var(--color-mid-gray); transition: all var(--transition-fast); }
.tag-link:hover { background: var(--color-black); color: var(--color-white); border-color: var(--color-black); }

/* ============================================================
   CATEGORY LABEL
   ============================================================ */
.category-label { display: inline-block; font-family: var(--font-meta); font-size: 0.63rem; font-weight: var(--weight-bold); letter-spacing: 0.18em; text-transform: uppercase; color: var(--color-mid-gray); border-bottom: 2px solid currentColor; padding-bottom: 2px; margin-bottom: 16px; transition: color var(--transition-fast); }
.category-label:hover { color: var(--color-black); }

/* ============================================================
   MISC
   ============================================================ */
.no-sidebar #primary { width: 100%; }
.no-posts { font-family: var(--font-body); color: var(--color-mid-gray); font-size: 0.9rem; }

/* ============================================================
   FADE-IN
   ============================================================ */
.fade-in { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.fade-in.is-visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  :root { --col-gap: 28px; }
}

@media (max-width: 768px) {
  :root { --gutter: 20px; }
  .site-title { font-size: 2.5rem; }
  .menu-toggle { display: block; }
  .main-navigation ul { display: none; flex-direction: column; border-top: 1px solid var(--color-rule); padding-block: 6px; }
  .main-navigation ul.toggled { display: flex; }
  .main-navigation ul li a { padding: 10px 0; border-bottom: 1px solid var(--color-rule-light); }
  .main-navigation ul ul { position: static; border: none; opacity: 1; pointer-events: auto; transform: none; padding-left: 16px; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-content { padding: 28px 0 0; border-right: none; border-top: 1px solid var(--color-rule); }
  .hero-image { aspect-ratio: 16/9; }
  .content-area { grid-template-columns: 1fr; }
  .content-area .column:not(:last-child) { border-right: none; padding-right: 0; border-bottom: 1px solid var(--color-rule); padding-bottom: 36px; margin-bottom: 36px; }
  .content-area .column:not(:first-child) { padding-left: 0; }
  .footer-widgets { grid-template-columns: 1fr; gap: 28px; }
  .site-info { flex-direction: column; gap: 10px; text-align: center; }
}

@media (max-width: 480px) {
  .site-title { font-size: 2rem; }
}

@media print {
  #masthead, #colophon { display: none; }
  body { font-size: 12pt; }
}

/* ============================================================
   POST GRID — 3 columns, all posts, no category splitting
   ============================================================ */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px 40px;
  padding-top: 40px;
}

/* Override post-card margin/border since grid handles spacing */
.post-grid .post-card {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

@media (max-width: 900px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); gap: 36px 28px; }
}
@media (max-width: 560px) {
  .post-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ============================================================
   SINGLE POST + SIDEBAR LAYOUT
   ============================================================ */
.single-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 56px;
  padding-block: 40px;
  align-items: start;
}

/* Main content column */
.single-layout .site-main {
  min-width: 0;
}

.single .entry-header {
  margin-bottom: 24px;
}

.single .entry-meta-top {
  font-family: var(--font-meta);
  font-size: 0.68rem;
  color: var(--color-light-gray);
  margin-bottom: 12px;
}
.single .entry-meta-top .meta-cat {
  color: var(--color-link);
}
.single .entry-meta-top .meta-cat:hover {
  text-decoration: underline;
}

.single .entry-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: var(--weight-black);
  line-height: 1.15;
  color: var(--color-black);
}

.single .post-thumbnail {
  margin-bottom: 28px;
}
.single .post-thumbnail img {
  width: 100%;
  height: auto;
}

.single .entry-content {
  font-size: 1rem;
  line-height: 1.8;
}
.single .entry-content p  { margin-bottom: 1.4em; }
.single .entry-content h2 { font-size: 1.5rem; margin-block: 1.6em 0.5em; }
.single .entry-content h3 { font-size: 1.2rem; margin-block: 1.4em 0.4em; }
.single .entry-content ul,
.single .entry-content ol { padding-left: 1.4em; margin-bottom: 1.4em; }
.single .entry-content li { margin-bottom: 0.4em; }
.single .entry-content blockquote {
  border-left: 3px solid var(--color-black);
  padding-left: 20px; margin-block: 1.6em;
  font-style: italic; font-size: 1.05rem;
}
.single .entry-content img { max-width: 100%; height: auto; margin-block: 1em; }

/* ============================================================
   SIDEBAR
   ============================================================ */
#secondary.widget-area {
  padding-top: 0;
  border-top: none;
  position: sticky;
  top: 24px;
}

.widget-area .widget {
  margin-bottom: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--color-rule-light);
}
.widget-area .widget:last-child {
  border-bottom: none;
}

.widget-area .widget-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: var(--weight-bold);
  color: var(--color-black);
  letter-spacing: -0.01em;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-black);
  margin-bottom: 14px;
  text-transform: none;
}

/* Recent Posts widget */
.widget_recent_entries ul { list-style: none; }
.widget_recent_entries ul li {
  padding-block: 8px;
  border-bottom: 1px solid var(--color-rule-light);
  font-size: 0.85rem;
  line-height: 1.4;
}
.widget_recent_entries ul li:last-child { border-bottom: none; }
.widget_recent_entries ul li a {
  color: var(--color-dark-gray);
  font-weight: var(--weight-medium);
  transition: color var(--transition-fast);
}
.widget_recent_entries ul li a:hover { color: var(--color-black); }
.widget_recent_entries .post-date {
  display: block;
  font-family: var(--font-meta);
  font-size: 0.65rem;
  color: var(--color-light-gray);
  margin-top: 2px;
}

/* Categories widget */
.widget_categories ul { list-style: none; }
.widget_categories ul li {
  padding-block: 6px;
  border-bottom: 1px solid var(--color-rule-light);
  font-size: 0.85rem;
}
.widget_categories ul li:last-child { border-bottom: none; }
.widget_categories ul li a {
  color: var(--color-dark-gray);
  transition: color var(--transition-fast);
}
.widget_categories ul li a:hover { color: var(--color-black); }

/* Text / HTML widget */
.widget_text p, .widget_custom_html p {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--color-mid-gray);
}

/* Image widget */
.widget_media_image img { width: 100%; height: auto; }

@media (max-width: 900px) {
  .single-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  #secondary.widget-area {
    position: static;
    border-top: 2px solid var(--color-black);
    padding-top: 32px;
  }
}

/* ============================================================
   FIX: Remove excess space above single post content
   ============================================================ */
.single-layout {
  padding-top: 24px;
}
.single .entry-header {
  margin-bottom: 16px;
}
.single .entry-meta-top {
  margin-bottom: 8px;
}

/* ============================================================
   DARK MODE
   ============================================================ */
[data-theme="dark"] {
  --color-black:       #f0f0f0;
  --color-near-black:  #e0e0e0;
  --color-dark-gray:   #cccccc;
  --color-mid-gray:    #999999;
  --color-light-gray:  #666666;
  --color-rule:        #2e2e2e;
  --color-rule-light:  #252525;
  --color-white:       #121212;
  --color-bg:          #121212;
  --color-link:        #7aa8d4;
}

[data-theme="dark"] body {
  background: #121212;
  color: #cccccc;
}

[data-theme="dark"] #masthead,
[data-theme="dark"] #colophon {
  background: #121212;
}

[data-theme="dark"] .post-card .post-thumbnail img {
  opacity: 0.9;
}

[data-theme="dark"] .comment-form input,
[data-theme="dark"] .comment-form textarea {
  background: #1e1e1e;
  color: #cccccc;
  border-color: #2e2e2e;
}

[data-theme="dark"] .widget-area .widget-title {
  border-bottom-color: #f0f0f0;
}

/* ============================================================
   DARK MODE TOGGLE BUTTON
   ============================================================ */
.theme-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  width: 48px;
  height: 26px;
  background: #e0e0e0;
  border-radius: 13px;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
[data-theme="dark"] .theme-toggle {
  background: #444;
}
.theme-toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.3s ease, background 0.3s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
[data-theme="dark"] .theme-toggle::after {
  transform: translateX(22px);
  background: #f0f0f0;
}
.theme-toggle-wrap {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--color-white);
  border: 1px solid var(--color-rule);
  border-radius: 20px;
  padding: 6px 12px 6px 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}
.theme-toggle-label {
  font-family: var(--font-meta);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-mid-gray);
  user-select: none;
}

/* ============================================================
   SINGLE POST — serif body font matching screenshot
   ============================================================ */
.single .entry-content {
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
  font-size: 1.05rem;
  line-height: 1.85;
  color: #333;
}

.single .entry-content p {
  margin-bottom: 1.5em;
}

/* Headings stay Poppins but lighter weight inside content */
.single .entry-content h2 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: var(--weight-bold);
  margin-block: 1.8em 0.5em;
  color: var(--color-black);
}
.single .entry-content h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: var(--weight-bold);
  margin-block: 1.5em 0.4em;
}

/* Lists */
.single .entry-content ul,
.single .entry-content ol {
  padding-left: 1.6em;
  margin-bottom: 1.5em;
}
.single .entry-content ul { list-style: disc; }
.single .entry-content ol { list-style: decimal; }
.single .entry-content li { margin-bottom: 0.5em; }

/* Bold inside content */
.single .entry-content strong { font-weight: 700; }

[data-theme="dark"] .single .entry-content {
  color: #cccccc;
}

/* ============================================================
   MOBILE-FRIENDLY HEADER TITLE & TAGLINE
   ============================================================ */

/* Use clamp() so the title scales fluidly with viewport width */
.site-title {
  font-size: clamp(2rem, 8vw, 88px) !important;
  word-break: break-word;
  hyphens: auto;
  line-height: 1.05;
}

.site-tagline {
  font-size: clamp(0.55rem, 2vw, 0.72rem) !important;
  letter-spacing: clamp(0.1em, 1.5vw, 0.3em);
  word-break: break-word;
  text-align: center;
  padding-inline: 12px;
}

@media (max-width: 600px) {
  .site-title {
    font-size: clamp(1.8rem, 10vw, 3rem) !important;
  }
  .site-tagline {
    font-size: 0.6rem !important;
    letter-spacing: 0.12em;
  }
  #masthead {
    padding-top: 24px !important;
  }
  .site-branding {
    padding-bottom: 12px !important;
  }
}

@media (max-width: 380px) {
  .site-title {
    font-size: 1.6rem !important;
  }
}

/* ============================================================
   MONO STYLE — activated via [data-style="mono"] on <html>
   ============================================================ */
[data-style="mono"] {
  --bg:           #0d0d0d;
  --bg-surface:   #141414;
  --bg-raised:    #1a1a1a;
  --border:       #2a2a2a;
  --border-light: #222222;
  --text:         #c8c8c8;
  --text-dim:     #666666;
  --text-bright:  #f0f0f0;
  --accent:       #00ff88;
  --accent-dim:   #00994d;
  --accent-blue:  #4da6ff;
  --accent-red:   #ff4d4d;

  --color-black:      #f0f0f0;
  --color-near-black: #e0e0e0;
  --color-dark-gray:  #c8c8c8;
  --color-mid-gray:   #666666;
  --color-light-gray: #444444;
  --color-rule:       #2a2a2a;
  --color-rule-light: #222222;
  --color-white:      #0d0d0d;
  --color-link:       #4da6ff;

  --font-display: 'JetBrains Mono', 'Fira Code', monospace;
  --font-body:    'JetBrains Mono', 'Fira Code', monospace;
  --font-meta:    'JetBrains Mono', monospace;
}

[data-style="mono"] body {
  background: #0d0d0d;
  color: #c8c8c8;
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
}

[data-style="mono"] #masthead,
[data-style="mono"] #colophon {
  background: #0d0d0d;
  border-bottom-color: #2a2a2a;
}

/* Prompt prefix above title */
[data-style="mono"] .site-branding::before {
  content: 'root@site:~$';
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: #00994d;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

/* Green glowing title with blinking cursor */
[data-style="mono"] .site-title {
  color: #00ff88 !important;
  text-shadow: 0 0 40px rgba(0,255,136,0.25);
  font-family: 'JetBrains Mono', monospace !important;
  letter-spacing: -0.03em;
}
[data-style="mono"] .site-title a { color: #00ff88; }
[data-style="mono"] .site-title a:hover { color: #fff; text-shadow: 0 0 30px rgba(255,255,255,0.2); }
[data-style="mono"] .site-title::after {
  content: '_';
  animation: mono-blink 1.1s step-end infinite;
  color: #00ff88;
}
@keyframes mono-blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* Tagline with comment prefix */
[data-style="mono"] .site-tagline {
  color: #444 !important;
  font-family: 'JetBrains Mono', monospace !important;
  letter-spacing: 0.1em !important;
}
[data-style="mono"] .site-tagline::before { content: '// '; color: #00994d; }

/* Nav */
[data-style="mono"] .main-navigation ul li a {
  color: #666;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
}
[data-style="mono"] .main-navigation ul li a:hover,
[data-style="mono"] .main-navigation ul li.current-menu-item > a {
  color: #00ff88;
  background: rgba(0,255,136,0.04);
}
[data-style="mono"] .main-navigation ul li a::before {
  content: './';
  color: #00994d;
  margin-right: 2px;
}
[data-style="mono"] #site-navigation { border-top-color: #2a2a2a; }

/* Post grid — terminal window cards */
[data-style="mono"] .post-grid {
  background: #2a2a2a;
  border: 1px solid #2a2a2a;
  gap: 1px;
}
[data-style="mono"] .post-card {
  background: #0d0d0d;
  border-bottom: none;
  padding: 20px;
}
[data-style="mono"] .post-card:hover { background: #141414; }

/* Terminal titlebar dots */
[data-style="mono"] .post-card::before {
  content: '● ● ●';
  display: block;
  font-size: 0.45rem;
  letter-spacing: 0.4em;
  color: #333;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #2a2a2a;
}
[data-style="mono"] .post-card::before {
  background: none;
}

[data-style="mono"] .post-card .entry-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  color: #f0f0f0;
}
[data-style="mono"] .post-card .entry-title a { color: #f0f0f0; }
[data-style="mono"] .post-card .entry-title a:hover { color: #00ff88; }

/* Scanline overlay on card images */
[data-style="mono"] .post-card .post-thumbnail {
  position: relative;
}
[data-style="mono"] .post-card .post-thumbnail::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px, transparent 2px,
    rgba(0,0,0,0.18) 2px, rgba(0,0,0,0.18) 4px
  );
  pointer-events: none;
  z-index: 1;
}
[data-style="mono"] .post-card .post-thumbnail img {
  filter: saturate(0.7) brightness(0.85);
  transition: filter 0.4s ease;
}
[data-style="mono"] .post-card:hover .post-thumbnail img {
  filter: saturate(1) brightness(1);
}

[data-style="mono"] .post-card .entry-excerpt { color: #666; font-size: 0.78rem; }

[data-style="mono"] .post-card .entry-meta { border-top-color: #222; color: #444; }
[data-style="mono"] .post-card .entry-meta .meta-date::before { content: 'date: '; color: #00994d; }
[data-style="mono"] .post-card .entry-meta .meta-cat { color: #4da6ff; }
[data-style="mono"] .post-card .entry-meta .meta-rule { background: #222; }

/* Single post */
[data-style="mono"] .single .entry-title {
  font-family: 'JetBrains Mono', monospace !important;
  color: #f0f0f0;
}
[data-style="mono"] .single .entry-title::before { content: '# '; color: #00994d; }

[data-style="mono"] .single .entry-content {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
  color: #c8c8c8;
}
[data-style="mono"] .single .entry-content h2::before { content: '## '; color: #00994d; }
[data-style="mono"] .single .entry-content h3::before { content: '### '; color: #00994d; }
[data-style="mono"] .single .entry-content a { color: #4da6ff; }
[data-style="mono"] .single .entry-content code {
  background: #1a1a1a; color: #00ff88;
  border: 1px solid #2a2a2a; padding: 2px 6px;
}
[data-style="mono"] .single .entry-content pre {
  background: #1a1a1a; border: 1px solid #2a2a2a;
  border-left: 3px solid #00994d; padding: 16px;
}
[data-style="mono"] .single .entry-content ul li::before { content: '> '; color: #00994d; }
[data-style="mono"] .single .entry-content blockquote {
  border-left-color: #00994d; color: #666;
}

/* Single post scanlines on featured image */
[data-style="mono"] .single .post-thumbnail { position: relative; }
[data-style="mono"] .single .post-thumbnail::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px, transparent 3px,
    rgba(0,0,0,0.1) 3px, rgba(0,0,0,0.1) 4px
  );
  pointer-events: none;
}

/* Sidebar */
[data-style="mono"] #secondary.widget-area {
  background: #141414;
  border: 1px solid #2a2a2a;
  padding: 20px;
}
[data-style="mono"] .widget-area .widget { border-bottom-color: #222; }
[data-style="mono"] .widget-area .widget-title {
  color: #00ff88;
  border-bottom-color: #2a2a2a;
  font-family: 'JetBrains Mono', monospace;
}
[data-style="mono"] .widget-area .widget-title::before { content: '> '; color: #00994d; }
[data-style="mono"] .widget_recent_entries ul li a { color: #c8c8c8; }
[data-style="mono"] .widget_recent_entries ul li a:hover { color: #00ff88; }
[data-style="mono"] .widget_recent_entries .post-date::before { content: 'date: '; color: #00994d; }
[data-style="mono"] .widget_recent_entries ul li,
[data-style="mono"] .widget_categories ul li { border-bottom-color: #222; }
[data-style="mono"] .widget_categories ul li a { color: #666; }
[data-style="mono"] .widget_categories ul li a:hover { color: #00ff88; }

/* Comments */
[data-style="mono"] .comments-area { border-top-color: #2a2a2a; }
[data-style="mono"] .comments-title::before,
[data-style="mono"] .comment-reply-title::before {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  color: #00ff88;
}
[data-style="mono"] .comment-form input,
[data-style="mono"] .comment-form textarea {
  background: #1a1a1a; border-color: #2a2a2a; color: #c8c8c8;
}
[data-style="mono"] .comment-form input:focus,
[data-style="mono"] .comment-form textarea:focus { border-color: #00994d; }
[data-style="mono"] .comment-form .form-submit .submit {
  background: transparent;
  border: 1px solid #00994d;
  color: #00ff88;
}
[data-style="mono"] .comment-form .form-submit .submit:hover {
  background: #00ff88;
  color: #0d0d0d;
}

/* Footer */
[data-style="mono"] #colophon {
  background: #141414;
  border-top-color: #2a2a2a;
}
[data-style="mono"] .footer-brand { color: #00ff88; font-family: 'JetBrains Mono', monospace; }

/* Theme toggle pill */
[data-style="mono"] .theme-style-wrap {
  background: #1a1a1a;
  border-color: #2a2a2a;
}
[data-style="mono"] .theme-style-label { color: #666; }

/* MONO LIGHT MODE ============================================ */
[data-style="mono"][data-theme="light"] {
  --bg: #f5f5f0; --bg-surface: #eeeeea; --bg-raised: #e5e5e0;
  --border: #cccccc; --border-light: #dddddd;
  --text: #2a2a2a; --text-dim: #777; --text-bright: #0a0a0a;
  --accent: #006633; --accent-dim: #004422; --accent-blue: #004499; --accent-red: #aa2200;
}
[data-style="mono"][data-theme="light"] body { background: #f5f5f0; color: #2a2a2a; }
[data-style="mono"][data-theme="light"] #masthead,
[data-style="mono"][data-theme="light"] #colophon { background: #f5f5f0; border-color: #ccc; }
[data-style="mono"][data-theme="light"] .site-branding::before { color: #004422; }
[data-style="mono"][data-theme="light"] .site-title { color: #006633 !important; text-shadow: none; }
[data-style="mono"][data-theme="light"] .site-title a { color: #006633; }
[data-style="mono"][data-theme="light"] .site-title a:hover { color: #000; }
[data-style="mono"][data-theme="light"] .site-title::after { color: #006633; }
[data-style="mono"][data-theme="light"] .site-tagline { color: #888 !important; }
[data-style="mono"][data-theme="light"] .site-tagline::before { color: #004422; }
[data-style="mono"][data-theme="light"] .main-navigation ul li a { color: #555; }
[data-style="mono"][data-theme="light"] .main-navigation ul li a:hover { color: #006633; background: rgba(0,102,51,.05); }
[data-style="mono"][data-theme="light"] #site-navigation { border-top-color: #ccc; }
[data-style="mono"][data-theme="light"] .post-grid { background: #ccc; border-color: #ccc; }
[data-style="mono"][data-theme="light"] .post-card { background: #f5f5f0; }
[data-style="mono"][data-theme="light"] .post-card:hover { background: #eeeeea; }
[data-style="mono"][data-theme="light"] .post-card .entry-title a { color: #0a0a0a; }
[data-style="mono"][data-theme="light"] .post-card .entry-title a:hover { color: #006633; }
[data-style="mono"][data-theme="light"] .post-card .post-thumbnail img { filter: saturate(.9) brightness(.98); }
[data-style="mono"][data-theme="light"] .post-card .entry-excerpt { color: #666; }
[data-style="mono"][data-theme="light"] .post-card .entry-meta { border-top-color: #ddd; color: #999; }
[data-style="mono"][data-theme="light"] .post-card .entry-meta .meta-date::before { color: #004422; }
[data-style="mono"][data-theme="light"] .post-card .entry-meta .meta-cat { color: #004499; }
[data-style="mono"][data-theme="light"] .single .entry-title { color: #0a0a0a; }
[data-style="mono"][data-theme="light"] .single .entry-title::before { color: #004422; }
[data-style="mono"][data-theme="light"] .single .entry-content { color: #2a2a2a; }
[data-style="mono"][data-theme="light"] .single .entry-content h2::before,
[data-style="mono"][data-theme="light"] .single .entry-content h3::before { color: #004422; }
[data-style="mono"][data-theme="light"] .single .entry-content a { color: #004499; }
[data-style="mono"][data-theme="light"] .single .entry-content code { background: #e5e5e0; color: #006633; border-color: #ccc; }
[data-style="mono"][data-theme="light"] .single .entry-content pre { background: #e5e5e0; border-left-color: #004422; }
[data-style="mono"][data-theme="light"] #secondary.widget-area { background: #eeeeea; border-color: #ccc; }
[data-style="mono"][data-theme="light"] .widget-area .widget-title { color: #006633; border-bottom-color: #ccc; }
[data-style="mono"][data-theme="light"] .widget-area .widget-title::before { color: #004422; }
[data-style="mono"][data-theme="light"] .widget_recent_entries ul li a { color: #2a2a2a; }
[data-style="mono"][data-theme="light"] .widget_recent_entries ul li a:hover { color: #006633; }
[data-style="mono"][data-theme="light"] .comment-form input,
[data-style="mono"][data-theme="light"] .comment-form textarea { background: #fff; border-color: #ccc; color: #2a2a2a; }
[data-style="mono"][data-theme="light"] .comment-form .form-submit .submit { border-color: #004422; color: #006633; }
[data-style="mono"][data-theme="light"] .comment-form .form-submit .submit:hover { background: #006633; color: #fff; }
[data-style="mono"][data-theme="light"] .footer-brand { color: #006633; }

/* MONO HTML DECORATIONS (rendered by PHP, not CSS pseudo) */
.mono-prompt {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: #00994d;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.mono-cursor {
  display: inline;
  color: #00ff88;
  animation: mono-blink2 1.1s step-end infinite;
  font-family: 'JetBrains Mono', monospace;
}
@keyframes mono-blink2 { 0%,100%{opacity:1} 50%{opacity:0} }

.mono-comment {
  color: #00994d;
  font-family: 'JetBrains Mono', monospace;
}

/* Remove CSS pseudo decorations now handled by PHP */
[data-style="mono"] .site-branding::before { content: none !important; display: none !important; }
[data-style="mono"] .site-title::after     { content: none !important; display: none !important; }
[data-style="mono"] .site-tagline::before  { content: none !important; display: none !important; }

/* Mono light mode: adjust decoration colours */
[data-style="mono"][data-theme="light"] .mono-prompt  { color: #004422; }
[data-style="mono"][data-theme="light"] .mono-cursor  { color: #006633; }
[data-style="mono"][data-theme="light"] .mono-comment { color: #004422; }
