/*
Theme Name: NexusTheme
Theme URI: https://nexusoffers.org
Author: Nexus Offers
Author URI: https://nexusoffers.org
Description: Premium WordPress theme for affiliate review blogs. Features dark/light mode, built-in SEO, affiliate review components, 6 color presets, and full Customizer control. Zero dependencies, unlimited sites.
Version: 1.0.0
Tested up to: 6.7
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nexustheme
Tags: blog, one-column, two-columns, right-sidebar, custom-colors, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, dark-mode
*/

/* ==========================================================================
   1. CSS CUSTOM PROPERTIES (Design Tokens)
   ========================================================================== */

:root {
  /* ---- Color Preset: Nexus Default (Warm Gold + Clean White) ---- */
  --nx-primary: #c5a55a;
  --nx-primary-hover: #b8953f;
  --nx-primary-light: rgba(197,165,90,0.12);
  --nx-secondary: #2c3e50;
  --nx-accent: #e67e22;

  /* Neutrals */
  --nx-bg: #f0f2f5;
  --nx-bg-card: #ffffff;
  --nx-bg-card-hover: #fafafa;
  --nx-bg-header: #ffffff;
  --nx-bg-footer: #1a1a2e;
  --nx-bg-sidebar: #ffffff;
  --nx-bg-code: #f4f4f8;
  --nx-bg-input: #ffffff;

  /* Text */
  --nx-text: #333333;
  --nx-text-secondary: #666666;
  --nx-text-muted: #999999;
  --nx-text-inverse: #ffffff;
  --nx-text-link: #c5a55a;
  --nx-text-link-hover: #b8953f;

  /* Borders */
  --nx-border: #e5e7eb;
  --nx-border-light: #f0f0f0;
  --nx-border-input: #d1d5db;
  --nx-border-focus: #c5a55a;

  /* Shadows */
  --nx-shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --nx-shadow: 0 2px 8px rgba(0,0,0,0.08);
  --nx-shadow-md: 0 4px 16px rgba(0,0,0,0.1);
  --nx-shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --nx-shadow-card: 0 1px 4px rgba(0,0,0,0.06);
  --nx-shadow-card-hover: 0 4px 20px rgba(0,0,0,0.1);

  /* Typography */
  --nx-font-primary: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --nx-font-heading: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --nx-font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  --nx-fs-xs: 0.75rem;
  --nx-fs-sm: 0.875rem;
  --nx-fs-base: 1rem;
  --nx-fs-md: 1.125rem;
  --nx-fs-lg: 1.25rem;
  --nx-fs-xl: 1.5rem;
  --nx-fs-2xl: 1.875rem;
  --nx-fs-3xl: 2.25rem;
  --nx-fs-4xl: 3rem;

  --nx-lh-tight: 1.25;
  --nx-lh-normal: 1.6;
  --nx-lh-relaxed: 1.8;

  --nx-fw-normal: 400;
  --nx-fw-medium: 500;
  --nx-fw-semibold: 600;
  --nx-fw-bold: 700;

  /* Spacing */
  --nx-space-xs: 0.25rem;
  --nx-space-sm: 0.5rem;
  --nx-space-md: 1rem;
  --nx-space-lg: 1.5rem;
  --nx-space-xl: 2rem;
  --nx-space-2xl: 3rem;
  --nx-space-3xl: 4rem;

  /* Layout */
  --nx-container: 1200px;
  --nx-content-width: 780px;
  --nx-sidebar-width: 340px;
  --nx-gap: 30px;
  --nx-header-height: 70px;

  /* Border Radius */
  --nx-radius-sm: 4px;
  --nx-radius: 8px;
  --nx-radius-md: 12px;
  --nx-radius-lg: 16px;
  --nx-radius-xl: 24px;
  --nx-radius-full: 9999px;

  /* Transitions */
  --nx-transition: 0.2s ease;
  --nx-transition-slow: 0.4s ease;

  /* Z-Index Scale */
  --nx-z-dropdown: 100;
  --nx-z-sticky: 200;
  --nx-z-overlay: 300;
  --nx-z-modal: 400;
  --nx-z-toast: 500;

  /* Status Colors */
  --nx-success: #22c55e;
  --nx-warning: #f59e0b;
  --nx-error: #ef4444;
  --nx-info: #3b82f6;
}

/* ==========================================================================
   2. COLOR PRESETS
   ========================================================================== */

/* Preset 2: Midnight Pro */
[data-color-preset="midnight"] {
  --nx-primary: #3b82f6;
  --nx-primary-hover: #2563eb;
  --nx-primary-light: rgba(59,130,246,0.12);
  --nx-secondary: #1e293b;
  --nx-accent: #06b6d4;
  --nx-bg: #0f172a;
  --nx-bg-card: #1e293b;
  --nx-bg-card-hover: #243044;
  --nx-bg-header: #1e293b;
  --nx-bg-footer: #0c1322;
  --nx-bg-sidebar: #1e293b;
  --nx-bg-code: #162032;
  --nx-bg-input: #1e293b;
  --nx-text: #e2e8f0;
  --nx-text-secondary: #94a3b8;
  --nx-text-muted: #64748b;
  --nx-text-inverse: #0f172a;
  --nx-text-link: #60a5fa;
  --nx-text-link-hover: #93c5fd;
  --nx-border: #334155;
  --nx-border-light: #1e293b;
  --nx-border-input: #475569;
  --nx-shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --nx-shadow: 0 2px 8px rgba(0,0,0,0.35);
  --nx-shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --nx-shadow-card: 0 1px 4px rgba(0,0,0,0.3);
  --nx-shadow-card-hover: 0 4px 20px rgba(0,0,0,0.4);
}

/* Preset 3: Forest Wealth */
[data-color-preset="forest"] {
  --nx-primary: #16a34a;
  --nx-primary-hover: #15803d;
  --nx-primary-light: rgba(22,163,74,0.12);
  --nx-secondary: #1a2e1a;
  --nx-accent: #ca8a04;
  --nx-bg: #f0f5f0;
  --nx-bg-card: #ffffff;
  --nx-bg-card-hover: #f7faf7;
  --nx-bg-header: #ffffff;
  --nx-bg-footer: #1a2e1a;
  --nx-text: #1a2e1a;
  --nx-text-secondary: #4a6741;
  --nx-text-link: #16a34a;
  --nx-text-link-hover: #15803d;
  --nx-border: #d4e7d4;
}

/* Preset 4: Royal Purple */
[data-color-preset="royal"] {
  --nx-primary: #7c3aed;
  --nx-primary-hover: #6d28d9;
  --nx-primary-light: rgba(124,58,237,0.12);
  --nx-secondary: #2e1065;
  --nx-accent: #a78bfa;
  --nx-bg: #f5f0ff;
  --nx-bg-card: #ffffff;
  --nx-bg-card-hover: #faf7ff;
  --nx-bg-header: #ffffff;
  --nx-bg-footer: #1e0a3c;
  --nx-text: #2e1065;
  --nx-text-secondary: #6b4c9a;
  --nx-text-link: #7c3aed;
  --nx-text-link-hover: #6d28d9;
  --nx-border: #e0d4f5;
}

/* Preset 5: Ember Fire */
[data-color-preset="ember"] {
  --nx-primary: #ea580c;
  --nx-primary-hover: #c2410c;
  --nx-primary-light: rgba(234,88,12,0.12);
  --nx-secondary: #292524;
  --nx-accent: #f59e0b;
  --nx-bg: #fafaf9;
  --nx-bg-card: #ffffff;
  --nx-bg-card-hover: #fffbf7;
  --nx-bg-header: #ffffff;
  --nx-bg-footer: #1c1917;
  --nx-text: #292524;
  --nx-text-secondary: #78716c;
  --nx-text-link: #ea580c;
  --nx-text-link-hover: #c2410c;
  --nx-border: #e7e5e4;
}

/* Preset 6: Ocean Calm */
[data-color-preset="ocean"] {
  --nx-primary: #0891b2;
  --nx-primary-hover: #0e7490;
  --nx-primary-light: rgba(8,145,178,0.12);
  --nx-secondary: #164e63;
  --nx-accent: #06b6d4;
  --nx-bg: #f0f9ff;
  --nx-bg-card: #ffffff;
  --nx-bg-card-hover: #f5fbff;
  --nx-bg-header: #ffffff;
  --nx-bg-footer: #0c2d3e;
  --nx-text: #164e63;
  --nx-text-secondary: #4a8196;
  --nx-text-link: #0891b2;
  --nx-text-link-hover: #0e7490;
  --nx-border: #c4e5ef;
}

/* ==========================================================================
   3. RESET & BASE
   ========================================================================== */

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

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

body {
  font-family: var(--nx-font-primary);
  font-size: var(--nx-fs-base);
  font-weight: var(--nx-fw-normal);
  line-height: var(--nx-lh-normal);
  color: var(--nx-text);
  background-color: var(--nx-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ==========================================================================
   4. TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--nx-font-heading);
  font-weight: var(--nx-fw-bold);
  line-height: var(--nx-lh-tight);
  color: var(--nx-text);
  margin-bottom: 0.5em;
}

h1 { font-size: var(--nx-fs-3xl); }
h2 { font-size: var(--nx-fs-2xl); }
h3 { font-size: var(--nx-fs-xl); }
h4 { font-size: var(--nx-fs-lg); }
h5 { font-size: var(--nx-fs-md); }
h6 { font-size: var(--nx-fs-base); }

p {
  margin-bottom: var(--nx-space-md);
  line-height: var(--nx-lh-relaxed);
}

a {
  color: var(--nx-text-link);
  text-decoration: none;
  transition: color var(--nx-transition);
}

a:hover, a:focus {
  color: var(--nx-text-link-hover);
  text-decoration: underline;
}

strong, b { font-weight: var(--nx-fw-bold); }
em, i { font-style: italic; }

blockquote {
  border-left: 4px solid var(--nx-primary);
  padding: var(--nx-space-lg);
  margin: var(--nx-space-xl) 0;
  background: var(--nx-primary-light);
  border-radius: 0 var(--nx-radius) var(--nx-radius) 0;
  font-style: italic;
  color: var(--nx-text-secondary);
}

blockquote p:last-child { margin-bottom: 0; }

code, kbd, pre, samp {
  font-family: var(--nx-font-mono);
  font-size: var(--nx-fs-sm);
}

code {
  background: var(--nx-bg-code);
  padding: 2px 6px;
  border-radius: var(--nx-radius-sm);
  color: var(--nx-primary);
}

pre {
  background: var(--nx-bg-code);
  padding: var(--nx-space-lg);
  border-radius: var(--nx-radius);
  overflow-x: auto;
  margin: var(--nx-space-xl) 0;
  border: 1px solid var(--nx-border);
}

pre code {
  background: none;
  padding: 0;
  color: inherit;
}

ul, ol {
  padding-left: var(--nx-space-xl);
  margin-bottom: var(--nx-space-md);
}

li { margin-bottom: var(--nx-space-xs); }

hr {
  border: none;
  border-top: 1px solid var(--nx-border);
  margin: var(--nx-space-2xl) 0;
}

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

figure {
  margin: var(--nx-space-xl) 0;
}

figcaption {
  font-size: var(--nx-fs-sm);
  color: var(--nx-text-muted);
  text-align: center;
  margin-top: var(--nx-space-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--nx-space-xl) 0;
}

th, td {
  padding: var(--nx-space-sm) var(--nx-space-md);
  text-align: left;
  border-bottom: 1px solid var(--nx-border);
}

th {
  font-weight: var(--nx-fw-semibold);
  background: var(--nx-bg-code);
}

/* ==========================================================================
   5. LAYOUT
   ========================================================================== */

.nx-container {
  width: 100%;
  max-width: var(--nx-container);
  margin: 0 auto;
  padding: 0 var(--nx-space-lg);
}

.nx-site-content {
  display: flex;
  gap: var(--nx-gap);
  padding: var(--nx-space-2xl) 0;
}

.nx-main {
  flex: 1;
  min-width: 0;
}

.nx-sidebar {
  width: var(--nx-sidebar-width);
  flex-shrink: 0;
}

.nx-full-width .nx-main {
  max-width: 100%;
}

.nx-full-width .nx-sidebar {
  display: none;
}

/* ==========================================================================
   6. HEADER
   ========================================================================== */

.nx-header {
  background: var(--nx-bg-header);
  border-bottom: 1px solid var(--nx-border);
  position: sticky;
  top: 0;
  z-index: var(--nx-z-sticky);
  transition: box-shadow var(--nx-transition);
}

.nx-header.scrolled {
  box-shadow: var(--nx-shadow-md);
}

.nx-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nx-header-height);
}

.nx-logo {
  display: flex;
  align-items: center;
  gap: var(--nx-space-sm);
  text-decoration: none;
  font-size: var(--nx-fs-xl);
  font-weight: var(--nx-fw-bold);
  color: var(--nx-text);
}

.nx-logo:hover { color: var(--nx-text); text-decoration: none; }

.nx-logo img {
  max-height: 45px;
  width: auto;
}

.nx-nav {
  display: flex;
  align-items: center;
  gap: var(--nx-space-lg);
}

.nx-nav-menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--nx-space-xs);
  padding: 0;
  margin: 0;
}

.nx-nav-menu li { margin-bottom: 0; }

.nx-nav-menu a {
  color: var(--nx-text);
  font-weight: var(--nx-fw-medium);
  font-size: var(--nx-fs-sm);
  padding: var(--nx-space-sm) var(--nx-space-md);
  border-radius: var(--nx-radius);
  transition: all var(--nx-transition);
  text-decoration: none;
}

.nx-nav-menu a:hover,
.nx-nav-menu .current-menu-item > a {
  color: var(--nx-primary);
  background: var(--nx-primary-light);
  text-decoration: none;
}

/* Sub-menus */
.nx-nav-menu .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--nx-bg-card);
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius);
  box-shadow: var(--nx-shadow-md);
  min-width: 200px;
  padding: var(--nx-space-sm) 0;
  z-index: var(--nx-z-dropdown);
  list-style: none;
}

.nx-nav-menu li:hover > .sub-menu { display: block; }

.nx-nav-menu .sub-menu a {
  display: block;
  padding: var(--nx-space-sm) var(--nx-space-lg);
  border-radius: 0;
}

/* Header Actions */
.nx-header-actions {
  display: flex;
  align-items: center;
  gap: var(--nx-space-sm);
}

.nx-header-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: var(--nx-radius-full);
  color: var(--nx-text);
  font-size: var(--nx-fs-lg);
  transition: all var(--nx-transition);
}

.nx-header-btn:hover {
  background: var(--nx-primary-light);
  color: var(--nx-primary);
}

/* Mobile Menu Toggle */
.nx-mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--nx-space-sm);
}

.nx-mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--nx-text);
  transition: all var(--nx-transition);
  border-radius: 2px;
}

/* ==========================================================================
   7. POST CARDS
   ========================================================================== */

.nx-post-card {
  background: var(--nx-bg-card);
  border-radius: var(--nx-radius-md);
  box-shadow: var(--nx-shadow-card);
  overflow: hidden;
  transition: all var(--nx-transition);
  margin-bottom: var(--nx-space-xl);
}

.nx-post-card:hover {
  box-shadow: var(--nx-shadow-card-hover);
  transform: translateY(-2px);
}

/* List Layout (Default) */
.nx-post-card--list {
  display: flex;
  gap: 0;
}

.nx-post-card--list .nx-post-card__thumb {
  width: 300px;
  min-height: 200px;
  flex-shrink: 0;
}

.nx-post-card--list .nx-post-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nx-post-card__body {
  padding: var(--nx-space-xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.nx-post-card__category {
  display: inline-flex;
  padding: 4px 12px;
  font-size: var(--nx-fs-xs);
  font-weight: var(--nx-fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--nx-text-inverse);
  background: var(--nx-primary);
  border-radius: var(--nx-radius-sm);
  margin-bottom: var(--nx-space-sm);
  text-decoration: none;
  width: fit-content;
  transition: background var(--nx-transition);
}

.nx-post-card__category:hover {
  background: var(--nx-primary-hover);
  color: var(--nx-text-inverse);
  text-decoration: none;
}

.nx-post-card__title {
  font-size: var(--nx-fs-xl);
  margin-bottom: var(--nx-space-sm);
  line-height: var(--nx-lh-tight);
}

.nx-post-card__title a {
  color: var(--nx-text);
  text-decoration: none;
}

.nx-post-card__title a:hover {
  color: var(--nx-primary);
  text-decoration: none;
}

.nx-post-card__excerpt {
  color: var(--nx-text-secondary);
  font-size: var(--nx-fs-sm);
  line-height: var(--nx-lh-relaxed);
  margin-bottom: var(--nx-space-md);
}

.nx-post-card__meta {
  display: flex;
  align-items: center;
  gap: var(--nx-space-md);
  font-size: var(--nx-fs-sm);
  color: var(--nx-text-muted);
}

.nx-post-card__meta a {
  color: var(--nx-text-secondary);
  font-weight: var(--nx-fw-medium);
}

.nx-post-card__meta a:hover {
  color: var(--nx-primary);
  text-decoration: none;
}

.nx-post-card__meta-sep::before {
  content: "·";
  margin: 0 2px;
}

.nx-read-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--nx-fs-sm);
  font-weight: var(--nx-fw-medium);
  color: var(--nx-primary);
}

.nx-read-more:hover {
  gap: 8px;
  text-decoration: none;
}

/* Grid Layout */
.nx-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--nx-space-xl);
}

.nx-post-card--grid .nx-post-card__thumb img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

/* ==========================================================================
   8. SINGLE POST
   ========================================================================== */

.nx-single-header {
  margin-bottom: var(--nx-space-2xl);
}

.nx-breadcrumbs {
  display: flex;
  align-items: center;
  gap: var(--nx-space-xs);
  font-size: var(--nx-fs-sm);
  color: var(--nx-text-muted);
  margin-bottom: var(--nx-space-lg);
  flex-wrap: wrap;
}

.nx-breadcrumbs a {
  color: var(--nx-text-link);
}

.nx-breadcrumbs .nx-breadcrumb-sep {
  color: var(--nx-text-muted);
  margin: 0 2px;
}

.nx-breadcrumbs .nx-breadcrumb-current {
  color: var(--nx-text-secondary);
}

.nx-single-title {
  font-size: var(--nx-fs-3xl);
  margin-bottom: var(--nx-space-md);
  line-height: 1.2;
}

.nx-single-meta {
  display: flex;
  align-items: center;
  gap: var(--nx-space-md);
  font-size: var(--nx-fs-sm);
  color: var(--nx-text-muted);
}

.nx-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  font-size: var(--nx-fs-xs);
  font-weight: var(--nx-fw-medium);
  color: var(--nx-success);
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.2);
  border-radius: var(--nx-radius-sm);
}

/* Entry Content */
.nx-entry-content {
  font-size: var(--nx-fs-md);
  line-height: var(--nx-lh-relaxed);
}

.nx-entry-content h2 {
  margin-top: var(--nx-space-3xl);
  margin-bottom: var(--nx-space-lg);
  padding-bottom: var(--nx-space-sm);
  border-bottom: 2px solid var(--nx-primary-light);
}

.nx-entry-content h3 {
  margin-top: var(--nx-space-2xl);
  margin-bottom: var(--nx-space-md);
}

.nx-entry-content img {
  border-radius: var(--nx-radius);
  margin: var(--nx-space-lg) auto;
}

.nx-entry-content a {
  text-decoration: underline;
  text-decoration-color: var(--nx-primary-light);
  text-underline-offset: 3px;
}

.nx-entry-content a:hover {
  text-decoration-color: var(--nx-primary);
}

/* ==========================================================================
   9. SIDEBAR & WIDGETS
   ========================================================================== */

.nx-widget {
  background: var(--nx-bg-sidebar);
  border-radius: var(--nx-radius-md);
  box-shadow: var(--nx-shadow-card);
  padding: var(--nx-space-xl);
  margin-bottom: var(--nx-space-xl);
}

.nx-widget-title {
  font-size: var(--nx-fs-lg);
  font-weight: var(--nx-fw-bold);
  margin-bottom: var(--nx-space-lg);
  padding-bottom: var(--nx-space-sm);
  border-bottom: 2px solid var(--nx-primary);
}

.nx-widget ul {
  list-style: none;
  padding: 0;
}

.nx-widget ul li {
  padding: var(--nx-space-sm) 0;
  border-bottom: 1px solid var(--nx-border-light);
}

.nx-widget ul li:last-child { border-bottom: none; }

.nx-widget ul li a {
  color: var(--nx-text);
  font-size: var(--nx-fs-sm);
}

.nx-widget ul li a:hover {
  color: var(--nx-primary);
  text-decoration: none;
}

/* Search Widget */
.nx-search-form {
  display: flex;
  gap: 0;
}

.nx-search-form input[type="search"] {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--nx-border-input);
  border-right: none;
  border-radius: var(--nx-radius) 0 0 var(--nx-radius);
  font-family: var(--nx-font-primary);
  font-size: var(--nx-fs-sm);
  background: var(--nx-bg-input);
  color: var(--nx-text);
  outline: none;
  transition: border-color var(--nx-transition);
}

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

.nx-search-form button {
  padding: 10px 18px;
  background: var(--nx-primary);
  color: var(--nx-text-inverse);
  border: none;
  border-radius: 0 var(--nx-radius) var(--nx-radius) 0;
  cursor: pointer;
  font-weight: var(--nx-fw-semibold);
  font-size: var(--nx-fs-sm);
  transition: background var(--nx-transition);
}

.nx-search-form button:hover {
  background: var(--nx-primary-hover);
}

/* Sticky Sidebar */
.nx-sidebar--sticky {
  position: sticky;
  top: calc(var(--nx-header-height) + var(--nx-space-xl));
}

/* ==========================================================================
   10. AUTHOR BOX
   ========================================================================== */

.nx-author-box {
  display: flex;
  gap: var(--nx-space-lg);
  background: var(--nx-bg-card);
  border-radius: var(--nx-radius-md);
  box-shadow: var(--nx-shadow-card);
  padding: var(--nx-space-xl);
  margin: var(--nx-space-2xl) 0;
  border-left: 4px solid var(--nx-primary);
}

.nx-author-box__avatar {
  flex-shrink: 0;
}

.nx-author-box__avatar img {
  width: 80px;
  height: 80px;
  border-radius: var(--nx-radius-full);
  object-fit: cover;
  border: 3px solid var(--nx-primary-light);
}

.nx-author-box__info h4 {
  margin-bottom: var(--nx-space-xs);
}

.nx-author-box__label {
  font-size: var(--nx-fs-xs);
  color: var(--nx-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--nx-space-xs);
}

.nx-author-box__bio {
  font-size: var(--nx-fs-sm);
  color: var(--nx-text-secondary);
  line-height: var(--nx-lh-relaxed);
}

/* ==========================================================================
   11. RELATED POSTS
   ========================================================================== */

.nx-related-posts {
  margin: var(--nx-space-2xl) 0;
}

.nx-related-posts__title {
  font-size: var(--nx-fs-xl);
  margin-bottom: var(--nx-space-lg);
  display: flex;
  align-items: center;
  gap: var(--nx-space-sm);
}

.nx-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--nx-space-lg);
}

.nx-related-card {
  background: var(--nx-bg-card);
  border-radius: var(--nx-radius);
  overflow: hidden;
  box-shadow: var(--nx-shadow-sm);
  transition: all var(--nx-transition);
}

.nx-related-card:hover {
  box-shadow: var(--nx-shadow-md);
  transform: translateY(-2px);
}

.nx-related-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.nx-related-card__body {
  padding: var(--nx-space-md);
}

.nx-related-card__body h4 {
  font-size: var(--nx-fs-sm);
  line-height: var(--nx-lh-tight);
}

.nx-related-card__body h4 a {
  color: var(--nx-text);
  text-decoration: none;
}

.nx-related-card__body h4 a:hover {
  color: var(--nx-primary);
}

/* ==========================================================================
   12. FOOTER
   ========================================================================== */

.nx-footer {
  background: var(--nx-bg-footer);
  color: var(--nx-text-inverse);
  padding: var(--nx-space-3xl) 0 0;
}

.nx-footer a {
  color: rgba(255,255,255,0.7);
}

.nx-footer a:hover {
  color: var(--nx-primary);
  text-decoration: none;
}

.nx-footer-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--nx-space-2xl);
  margin-bottom: var(--nx-space-2xl);
}

.nx-footer-widget-title {
  font-size: var(--nx-fs-md);
  font-weight: var(--nx-fw-bold);
  color: #fff;
  margin-bottom: var(--nx-space-lg);
}

.nx-footer-widget ul {
  list-style: none;
  padding: 0;
}

.nx-footer-widget ul li {
  margin-bottom: var(--nx-space-sm);
}

.nx-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: var(--nx-space-lg) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--nx-fs-sm);
  color: rgba(255,255,255,0.5);
}

.nx-footer-nav {
  list-style: none;
  display: flex;
  gap: var(--nx-space-lg);
  padding: 0;
  margin: 0;
}

.nx-footer-nav li { margin-bottom: 0; }

/* Back to Top */
.nx-back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  background: var(--nx-primary);
  color: var(--nx-text-inverse);
  border: none;
  border-radius: var(--nx-radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--nx-shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--nx-transition);
  z-index: var(--nx-z-sticky);
  font-size: 18px;
}

.nx-back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nx-back-to-top:hover {
  background: var(--nx-primary-hover);
  transform: translateY(-2px);
}

/* ==========================================================================
   13. PAGINATION
   ========================================================================== */

.nx-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--nx-space-xs);
  margin: var(--nx-space-2xl) 0;
}

.nx-pagination a, .nx-pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 var(--nx-space-md);
  border-radius: var(--nx-radius);
  font-size: var(--nx-fs-sm);
  font-weight: var(--nx-fw-medium);
  transition: all var(--nx-transition);
  text-decoration: none;
}

.nx-pagination a {
  background: var(--nx-bg-card);
  color: var(--nx-text);
  box-shadow: var(--nx-shadow-sm);
}

.nx-pagination a:hover {
  background: var(--nx-primary-light);
  color: var(--nx-primary);
  text-decoration: none;
}

.nx-pagination .current {
  background: var(--nx-primary);
  color: var(--nx-text-inverse);
  box-shadow: var(--nx-shadow-sm);
}

/* ==========================================================================
   14. COMMENTS
   ========================================================================== */

.nx-comments {
  margin-top: var(--nx-space-2xl);
}

.nx-comments-title {
  font-size: var(--nx-fs-xl);
  margin-bottom: var(--nx-space-xl);
}

.nx-comment-list {
  list-style: none;
  padding: 0;
}

.nx-comment {
  display: flex;
  gap: var(--nx-space-md);
  padding: var(--nx-space-lg) 0;
  border-bottom: 1px solid var(--nx-border-light);
}

.nx-comment-avatar img {
  width: 50px;
  height: 50px;
  border-radius: var(--nx-radius-full);
}

.nx-comment-author {
  font-weight: var(--nx-fw-semibold);
  font-size: var(--nx-fs-sm);
}

.nx-comment-date {
  font-size: var(--nx-fs-xs);
  color: var(--nx-text-muted);
}

.nx-comment-content {
  font-size: var(--nx-fs-sm);
  color: var(--nx-text-secondary);
  margin-top: var(--nx-space-sm);
}

/* Comment Form */
.nx-comment-form textarea,
.nx-comment-form input[type="text"],
.nx-comment-form input[type="email"],
.nx-comment-form input[type="url"] {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--nx-border-input);
  border-radius: var(--nx-radius);
  font-family: var(--nx-font-primary);
  font-size: var(--nx-fs-sm);
  background: var(--nx-bg-input);
  color: var(--nx-text);
  transition: border-color var(--nx-transition);
  margin-bottom: var(--nx-space-md);
}

.nx-comment-form textarea:focus,
.nx-comment-form input:focus {
  outline: none;
  border-color: var(--nx-border-focus);
  box-shadow: 0 0 0 3px var(--nx-primary-light);
}

.nx-comment-form textarea { min-height: 150px; resize: vertical; }

.nx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--nx-space-sm);
  padding: 12px 24px;
  font-family: var(--nx-font-primary);
  font-size: var(--nx-fs-sm);
  font-weight: var(--nx-fw-semibold);
  border-radius: var(--nx-radius);
  border: none;
  cursor: pointer;
  transition: all var(--nx-transition);
  text-decoration: none;
}

.nx-btn--primary {
  background: var(--nx-primary);
  color: var(--nx-text-inverse);
}

.nx-btn--primary:hover {
  background: var(--nx-primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--nx-shadow-md);
}

/* ==========================================================================
   15. TABLE OF CONTENTS
   ========================================================================== */

.nx-toc {
  background: var(--nx-bg-card);
  border: 1px solid var(--nx-border);
  border-left: 4px solid var(--nx-primary);
  border-radius: var(--nx-radius);
  padding: var(--nx-space-lg);
  margin: var(--nx-space-xl) 0;
}

.nx-toc__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--nx-fs-md);
  font-weight: var(--nx-fw-bold);
  cursor: pointer;
  user-select: none;
}

.nx-toc__toggle {
  font-size: var(--nx-fs-xs);
  color: var(--nx-text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--nx-radius-sm);
}

.nx-toc__toggle:hover { background: var(--nx-primary-light); }

.nx-toc__list {
  list-style: none;
  padding: 0;
  margin-top: var(--nx-space-md);
}

.nx-toc__list li {
  padding: var(--nx-space-xs) 0;
  border-bottom: none;
  margin-bottom: 0;
}

.nx-toc__list a {
  color: var(--nx-text-secondary);
  font-size: var(--nx-fs-sm);
  text-decoration: none;
  padding: 4px 0;
  display: block;
  transition: color var(--nx-transition);
}

.nx-toc__list a:hover {
  color: var(--nx-primary);
}

.nx-toc__list .toc-h3 { padding-left: var(--nx-space-lg); }
.nx-toc__list .toc-h4 { padding-left: var(--nx-space-2xl); }

/* ==========================================================================
   16. SEARCH OVERLAY
   ========================================================================== */

.nx-search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  z-index: var(--nx-z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--nx-transition);
  backdrop-filter: blur(8px);
}

.nx-search-overlay.active {
  opacity: 1;
  visibility: visible;
}

.nx-search-overlay__inner {
  width: 90%;
  max-width: 600px;
  transform: translateY(-20px);
  transition: transform var(--nx-transition);
}

.nx-search-overlay.active .nx-search-overlay__inner {
  transform: translateY(0);
}

.nx-search-overlay input {
  width: 100%;
  padding: 20px 24px;
  font-size: var(--nx-fs-xl);
  font-family: var(--nx-font-primary);
  border: none;
  border-radius: var(--nx-radius-lg);
  background: var(--nx-bg-card);
  color: var(--nx-text);
  outline: none;
  box-shadow: var(--nx-shadow-lg);
}

.nx-search-overlay__close {
  position: absolute;
  top: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: var(--nx-radius-full);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   17. 404 PAGE
   ========================================================================== */

.nx-404 {
  text-align: center;
  padding: var(--nx-space-3xl) 0;
}

.nx-404__code {
  font-size: 8rem;
  font-weight: var(--nx-fw-bold);
  color: var(--nx-primary);
  opacity: 0.2;
  line-height: 1;
}

.nx-404__title {
  font-size: var(--nx-fs-2xl);
  margin-bottom: var(--nx-space-md);
}

.nx-404__desc {
  color: var(--nx-text-secondary);
  margin-bottom: var(--nx-space-xl);
}

/* ==========================================================================
   18. POST NAVIGATION
   ========================================================================== */

.nx-post-nav {
  display: flex;
  gap: var(--nx-space-lg);
  margin: var(--nx-space-2xl) 0;
  border-top: 1px solid var(--nx-border);
  padding-top: var(--nx-space-xl);
}

.nx-post-nav__item {
  flex: 1;
  padding: var(--nx-space-md);
  border-radius: var(--nx-radius);
  transition: background var(--nx-transition);
}

.nx-post-nav__item:hover {
  background: var(--nx-primary-light);
}

.nx-post-nav__label {
  font-size: var(--nx-fs-xs);
  color: var(--nx-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--nx-space-xs);
}

.nx-post-nav__title {
  font-size: var(--nx-fs-sm);
  font-weight: var(--nx-fw-semibold);
}

.nx-post-nav__title a {
  color: var(--nx-text);
  text-decoration: none;
}

.nx-post-nav__title a:hover { color: var(--nx-primary); }

.nx-post-nav__item--next { text-align: right; }

/* ==========================================================================
   19. SOCIAL SHARING
   ========================================================================== */

.nx-share {
  display: flex;
  align-items: center;
  gap: var(--nx-space-sm);
  margin: var(--nx-space-xl) 0;
}

.nx-share__label {
  font-size: var(--nx-fs-sm);
  font-weight: var(--nx-fw-semibold);
  color: var(--nx-text-secondary);
}

.nx-share__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--nx-space-xs);
  padding: 8px 14px;
  border-radius: var(--nx-radius-full);
  font-size: var(--nx-fs-xs);
  font-weight: var(--nx-fw-medium);
  color: #fff;
  text-decoration: none;
  transition: all var(--nx-transition);
}

.nx-share__btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--nx-shadow-md);
  color: #fff;
  text-decoration: none;
}

.nx-share__btn--facebook { background: #1877f2; }
.nx-share__btn--twitter { background: #1da1f2; }
.nx-share__btn--linkedin { background: #0a66c2; }
.nx-share__btn--pinterest { background: #e60023; }
.nx-share__btn--whatsapp { background: #25d366; }
.nx-share__btn--copy { background: var(--nx-text-secondary); }

/* ==========================================================================
   20. RESPONSIVE
   ========================================================================== */

@media (max-width: 1024px) {
  .nx-site-content {
    flex-direction: column;
  }

  .nx-sidebar {
    width: 100%;
  }

  .nx-post-card--list {
    flex-direction: column;
  }

  .nx-post-card--list .nx-post-card__thumb {
    width: 100%;
    min-height: 200px;
  }
}

@media (max-width: 768px) {
  :root {
    --nx-fs-3xl: 1.75rem;
    --nx-fs-2xl: 1.5rem;
    --nx-fs-xl: 1.25rem;
    --nx-header-height: 60px;
  }

  .nx-nav-menu { display: none; }
  .nx-mobile-toggle { display: flex; }

  .nx-header-inner {
    padding: 0 var(--nx-space-md);
  }

  .nx-post-nav {
    flex-direction: column;
  }

  .nx-author-box {
    flex-direction: column;
    text-align: center;
  }

  .nx-footer-bottom {
    flex-direction: column;
    gap: var(--nx-space-md);
    text-align: center;
  }

  .nx-footer-nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .nx-share {
    flex-wrap: wrap;
  }

  .nx-related-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   21. ANIMATIONS
   ========================================================================== */

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

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

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.nx-animate-fade {
  animation: fadeIn 0.4s ease forwards;
}

/* Scroll-triggered reveal */
.nx-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.nx-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   22. PRINT STYLES
   ========================================================================== */

@media print {
  .nx-header,
  .nx-footer,
  .nx-sidebar,
  .nx-share,
  .nx-related-posts,
  .nx-post-nav,
  .nx-back-to-top,
  .nx-search-overlay,
  .nx-toc,
  .nx-comments,
  .nx-breadcrumbs { display: none !important; }

  body {
    color: #000;
    background: #fff;
    font-size: 12pt;
  }

  .nx-main { max-width: 100%; }

  a { text-decoration: underline; color: #000; }

  .nx-single-title { font-size: 24pt; }
}

/* ==========================================================================
   23. ACCESSIBILITY
   ========================================================================== */

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background-color: var(--nx-bg-card);
  clip: auto !important;
  clip-path: none;
  color: var(--nx-primary);
  display: block;
  font-size: var(--nx-fs-sm);
  font-weight: var(--nx-fw-bold);
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}

:focus-visible {
  outline: 2px solid var(--nx-primary);
  outline-offset: 2px;
}

/* Skip Link */
.skip-link {
  position: fixed;
  top: -100%;
  left: 0;
  background: var(--nx-primary);
  color: var(--nx-text-inverse);
  padding: var(--nx-space-md) var(--nx-space-lg);
  z-index: 9999;
  transition: top var(--nx-transition);
  font-weight: var(--nx-fw-semibold);
}

.skip-link:focus {
  top: 0;
  outline: none;
}
