/*
Theme Name: Nityasha Editorial
Theme URI: https://blog.nityasha.com/
Author: Nityasha
Author URI: https://www.nityasha.com/
Description: Ultra-fast, minimalist OpenAI-inspired editorial WordPress theme for Nityasha Blog. Native Light & Dark mode, Rank Math SEO ready, Gutenberg Block Editor optimized, zero jQuery, and 100/100 Core Web Vitals architecture.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
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: nityasha-editorial
Tags: blog, news, editorial, one-column, two-columns, left-sidebar, block-styles, editor-style, featured-images, full-width-template, custom-logo, theme-options, accessibility-ready
*/

/* ==========================================================================
   1. Design Tokens (OpenAI-Inspired Monochrome Light & Dark Modes)
   ========================================================================== */
:root {
  --n-bg: #ffffff;
  --n-surface: #f6f6f7;
  --n-surface-hover: #ededf0;
  --n-text: #0d0d0d;
  --n-text-secondary: #565863;
  --n-text-muted: #747782;
  --n-border: rgba(13, 13, 13, 0.09);
  --n-border-strong: rgba(13, 13, 13, 0.18);
  --n-btn-bg: #0d0d0d;
  --n-btn-text: #ffffff;
  --n-btn-hover: #2b2b2e;
  --n-pill-active-bg: #0d0d0d;
  --n-pill-active-text: #ffffff;
  --n-code-bg: #f4f4f6;
  --n-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --n-shadow-md: 0 10px 30px rgba(0, 0, 0, 0.07);
  --n-backdrop: rgba(255, 255, 255, 0.86);
  --n-sidebar-w: 224px;
  --n-topbar-h: 64px;
  --n-radius-sm: 8px;
  --n-radius-md: 12px;
  --n-radius-lg: 16px;
  --n-font-sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --n-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --n-max-w: 1200px;
  --n-prose-w: 700px;
  --n-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
  --n-bg: #0d0d0d;
  --n-surface: #161618;
  --n-surface-hover: #212124;
  --n-text: #f5f5f7;
  --n-text-secondary: #a1a3ad;
  --n-text-muted: #7c7e88;
  --n-border: rgba(255, 255, 255, 0.1);
  --n-border-strong: rgba(255, 255, 255, 0.22);
  --n-btn-bg: #ffffff;
  --n-btn-text: #0d0d0d;
  --n-btn-hover: #e4e4e7;
  --n-pill-active-bg: #ffffff;
  --n-pill-active-text: #0d0d0d;
  --n-code-bg: #18181b;
  --n-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --n-shadow-md: 0 14px 36px rgba(0, 0, 0, 0.55);
  --n-backdrop: rgba(13, 13, 13, 0.86);
}

/* ==========================================================================
   2. Reset & Base Typography
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: var(--n-bg);
  color: var(--n-text);
}

body {
  margin: 0;
  font-family: var(--n-font-sans);
  font-size: 1rem;
  line-height: 1.6;
  background: var(--n-bg);
  color: var(--n-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

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

button, input {
  font-family: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--n-text);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  background: var(--n-btn-bg);
  color: var(--n-btn-text);
  padding: 10px 16px;
  font-weight: 500;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
  border-radius: var(--n-radius-sm);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Dark / Light Logo Switching (Zero Flash) */
.n-logo-img {
  height: 22px;
  width: auto;
  display: block;
}
.n-logo-light { display: none; }
.n-logo-dark { display: block; }
[data-theme="dark"] .n-logo-dark { display: none; }
[data-theme="dark"] .n-logo-light { display: block; }

/* Reading Progress Bar (Single Posts) */
.n-reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--n-text);
  z-index: 1200;
  transition: width 80ms linear;
  pointer-events: none;
}

/* ==========================================================================
   3. App Shell: OpenAI Fixed Left Sidebar + Top Utility Bar
   ========================================================================== */
.n-shell {
  display: flex;
  min-height: 100vh;
}

.n-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--n-sidebar-w);
  background: var(--n-bg);
  border-right: 1px solid var(--n-border);
  display: flex;
  flex-direction: column;
  padding: 20px 18px 24px;
  z-index: 900;
  overflow-y: auto;
}

.n-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px;
  margin-bottom: 24px;
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
}

.n-brand-tag {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--n-text-muted);
  letter-spacing: 0;
  padding-left: 8px;
  border-left: 1px solid var(--n-border-strong);
}

.n-sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.n-nav-section-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--n-text-muted);
  padding: 0 8px;
  margin: 0 0 8px;
}

.n-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.n-nav-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--n-radius-sm);
  font-size: 0.91rem;
  font-weight: 450;
  color: var(--n-text-secondary);
  transition: background 150ms var(--n-ease), color 150ms var(--n-ease);
}

.n-nav-list a:hover,
.n-nav-list .current-menu-item > a,
.n-nav-list .current-cat > a,
.n-nav-list a.is-active {
  background: var(--n-surface);
  color: var(--n-text);
}

.n-nav-list .current-menu-item > a,
.n-nav-list .current-cat > a,
.n-nav-list a.is-active {
  font-weight: 550;
}

.n-sidebar-footer {
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px solid var(--n-border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Main Column */
.n-main-wrap {
  flex: 1;
  min-width: 0;
  margin-left: var(--n-sidebar-w);
  display: flex;
  flex-direction: column;
}

/* Top Utility Bar */
.n-topbar {
  position: sticky;
  top: 0;
  z-index: 800;
  height: var(--n-topbar-h);
  background: var(--n-backdrop);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--n-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 48px);
  gap: 12px;
}

.n-topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.n-mobile-menu-btn,
.n-mobile-brand {
  display: none;
}

.n-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.n-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  min-width: 36px;
  padding: 0 10px;
  border: 1px solid var(--n-border);
  background: transparent;
  border-radius: 9999px;
  cursor: pointer;
  color: var(--n-text-secondary);
  font-size: 0.85rem;
  transition: background 150ms var(--n-ease), color 150ms var(--n-ease), border-color 150ms var(--n-ease);
}

.n-icon-btn:hover {
  background: var(--n-surface);
  color: var(--n-text);
  border-color: var(--n-border-strong);
}

.n-search-trigger {
  padding: 0 14px;
}

.n-kbd {
  font-family: var(--n-font-mono);
  font-size: 0.72rem;
  color: var(--n-text-muted);
  background: var(--n-surface);
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid var(--n-border);
}

.n-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  border-radius: 9999px;
  background: var(--n-btn-bg);
  color: var(--n-btn-text);
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 150ms var(--n-ease), transform 150ms var(--n-ease);
}

.n-btn-primary:hover {
  background: var(--n-btn-hover);
}

.n-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 18px;
  border-radius: 9999px;
  background: var(--n-surface);
  color: var(--n-text);
  border: 1px solid var(--n-border);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 150ms var(--n-ease), border-color 150ms var(--n-ease);
}

.n-btn-secondary:hover {
  background: var(--n-surface-hover);
  border-color: var(--n-border-strong);
}

/* Theme Toggle Icons */
.n-icon-sun { display: none; }
.n-icon-moon { display: block; }
[data-theme="dark"] .n-icon-sun { display: block; }
[data-theme="dark"] .n-icon-moon { display: none; }

/* Container */
.n-container {
  width: 100%;
  max-width: var(--n-max-w);
  margin: 0 auto;
  padding: clamp(28px, 4vw, 56px) clamp(20px, 4vw, 48px) 80px;
}

/* ==========================================================================
   4. Newsroom / Blog Index Header, Filter Pills & View Switcher
   ========================================================================== */
.n-news-header {
  margin-bottom: 36px;
}

.n-page-title {
  font-size: clamp(2.1rem, 4.2vw, 3.1rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin: 0 0 12px;
}

.n-page-subtitle {
  font-size: 1.08rem;
  color: var(--n-text-secondary);
  max-width: 60ch;
  margin: 0 0 28px;
  line-height: 1.55;
}

.n-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--n-border);
}

.n-filter-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.n-pill {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 9999px;
  font-size: 0.855rem;
  font-weight: 500;
  color: var(--n-text-secondary);
  background: transparent;
  border: 1px solid var(--n-border);
  cursor: pointer;
  transition: all 150ms var(--n-ease);
}

.n-pill:hover {
  color: var(--n-text);
  border-color: var(--n-border-strong);
  background: var(--n-surface);
}

.n-pill.is-active {
  background: var(--n-pill-active-bg);
  color: var(--n-pill-active-text);
  border-color: var(--n-pill-active-bg);
}

.n-view-toggle {
  display: inline-flex;
  align-items: center;
  background: var(--n-surface);
  border: 1px solid var(--n-border);
  border-radius: 9999px;
  padding: 3px;
  gap: 2px;
}

.n-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 28px;
  border-radius: 9999px;
  border: none;
  background: transparent;
  color: var(--n-text-muted);
  cursor: pointer;
  transition: background 150ms var(--n-ease), color 150ms var(--n-ease);
}

.n-view-btn.is-active,
.n-view-btn:hover {
  color: var(--n-text);
}

.n-view-btn.is-active {
  background: var(--n-bg);
  box-shadow: var(--n-shadow-sm);
}

/* ==========================================================================
   5. Featured Hero Story & OpenAI Editorial Grid / List Cards
   ========================================================================== */
.n-hero-post {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(24px, 3.5vw, 48px);
  align-items: center;
  padding: 12px 0 44px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--n-border);
}

.n-hero-media {
  position: relative;
  border-radius: var(--n-radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--n-surface);
  display: block;
}

.n-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 420ms var(--n-ease);
}

.n-hero-post:hover .n-hero-media img {
  transform: scale(1.025);
}

.n-hero-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.n-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.84rem;
  color: var(--n-text-muted);
}

.n-meta-cat {
  color: var(--n-text);
  font-weight: 550;
}

.n-meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--n-text-muted);
  opacity: 0.6;
}

.n-hero-title {
  font-size: clamp(1.65rem, 2.7vw, 2.35rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0;
}

.n-hero-title a:hover {
  opacity: 0.78;
}

.n-hero-excerpt {
  font-size: 1.02rem;
  color: var(--n-text-secondary);
  line-height: 1.6;
  margin: 0;
}

.n-read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.92rem;
  font-weight: 550;
  margin-top: 4px;
}

.n-read-more svg {
  transition: transform 180ms var(--n-ease);
}

.n-hero-post:hover .n-read-more svg,
.n-card:hover .n-read-more svg {
  transform: translateX(3px);
}

/* Editorial Grid */
.n-post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px 28px;
}

.n-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.n-card-media {
  position: relative;
  display: block;
  border-radius: var(--n-radius-md);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--n-surface);
  border: 1px solid var(--n-border);
}

.n-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 380ms var(--n-ease);
}

.n-card:hover .n-card-media img {
  transform: scale(1.03);
}

.n-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 20% 20%, var(--n-surface-hover), var(--n-surface));
  padding: 24px;
}

.n-card-placeholder .n-logo-img {
  height: 30px;
  opacity: 0.25;
}

.n-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.n-card-title {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin: 0;
}

.n-card-title a:hover {
  opacity: 0.72;
}

.n-card-excerpt {
  font-size: 0.92rem;
  color: var(--n-text-secondary);
  line-height: 1.55;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* OpenAI List View Mode */
.n-post-grid.is-list-view {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.n-post-grid.is-list-view .n-card {
  flex-direction: row;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--n-border);
}

.n-post-grid.is-list-view .n-card-media {
  display: none;
}

.n-post-grid.is-list-view .n-card-body {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 8px 28px;
  width: 100%;
  align-items: baseline;
}

.n-post-grid.is-list-view .n-meta-row {
  grid-column: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.n-post-grid.is-list-view .n-meta-dot {
  display: none;
}

.n-post-grid.is-list-view .n-card-title {
  grid-column: 2;
  font-size: 1.2rem;
}

.n-post-grid.is-list-view .n-card-excerpt {
  grid-column: 2;
  -webkit-line-clamp: 2;
}

/* Pagination */
.n-pagination {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--n-border);
  display: flex;
  justify-content: center;
}

.n-pagination .nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.n-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--n-text-secondary);
  border: 1px solid transparent;
  transition: all 150ms var(--n-ease);
}

.n-pagination .page-numbers:hover {
  background: var(--n-surface);
  color: var(--n-text);
}

.n-pagination .page-numbers.current {
  background: var(--n-pill-active-bg);
  color: var(--n-pill-active-text);
}

/* ==========================================================================
   6. Single Article Layout (OpenAI Editorial + Sticky Auto-TOC + Gutenberg)
   ========================================================================== */
.n-breadcrumbs {
  font-size: 0.84rem;
  color: var(--n-text-muted);
  margin-bottom: 24px;
}

.n-breadcrumbs a:hover {
  color: var(--n-text);
}

.n-breadcrumbs .rank-math-breadcrumb p {
  margin: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.n-article-header {
  max-width: 820px;
  margin: 0 auto 36px;
  text-align: center;
}

.n-article-header .n-meta-row {
  justify-content: center;
  margin-bottom: 18px;
}

.n-article-title {
  font-size: clamp(2rem, 4.4vw, 3.25rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin: 0 0 18px;
}

.n-article-deck {
  font-size: clamp(1.05rem, 1.5vw, 1.22rem);
  color: var(--n-text-secondary);
  line-height: 1.55;
  max-width: 62ch;
  margin: 0 auto 24px;
}

.n-article-byline {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.88rem;
  color: var(--n-text-secondary);
}

.n-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.n-share-inline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.n-article-hero {
  max-width: 1020px;
  margin: 0 auto 48px;
  border-radius: var(--n-radius-lg);
  overflow: hidden;
  border: 1px solid var(--n-border);
  background: var(--n-surface);
}

.n-article-hero img {
  width: 100%;
  max-height: 580px;
  object-fit: cover;
}

.n-article-hero figcaption {
  padding: 12px 18px;
  font-size: 0.84rem;
  color: var(--n-text-muted);
  border-top: 1px solid var(--n-border);
}

/* 2-Column Body: Sticky TOC + Editorial Prose */
.n-article-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, var(--n-prose-w));
  justify-content: center;
  gap: 56px;
  align-items: start;
}

.n-article-layout.no-toc {
  grid-template-columns: minmax(0, var(--n-prose-w));
}

.n-toc-aside {
  position: sticky;
  top: calc(var(--n-topbar-h) + 28px);
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding-right: 12px;
}

.n-toc-title {
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--n-text-muted);
  margin: 0 0 12px;
}

.n-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--n-border);
}

.n-toc-list li {
  margin: 0;
}

.n-toc-list a {
  display: block;
  padding: 6px 0 6px 14px;
  font-size: 0.84rem;
  line-height: 1.4;
  color: var(--n-text-muted);
  border-left: 2px solid transparent;
  margin-left: -1px;
  transition: color 150ms var(--n-ease), border-color 150ms var(--n-ease);
}

.n-toc-list a:hover,
.n-toc-list a.is-active {
  color: var(--n-text);
}

.n-toc-list a.is-active {
  border-left-color: var(--n-text);
  font-weight: 550;
}

.n-toc-list .n-toc-h3 a {
  padding-left: 26px;
  font-size: 0.8rem;
}

/* ==========================================================================
   7. Prose & Gutenberg Block Editor Styling
   ========================================================================== */
.n-prose {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--n-text);
  min-width: 0;
}

.n-prose > * + * {
  margin-top: 1.35em;
}

.n-prose h2 {
  font-size: clamp(1.45rem, 2.2vw, 1.85rem);
  font-weight: 600;
  letter-spacing: -0.028em;
  line-height: 1.22;
  margin-top: 2.3em;
  margin-bottom: 0.6em;
  scroll-margin-top: 88px;
}

.n-prose h3 {
  font-size: clamp(1.2rem, 1.7vw, 1.4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-top: 1.9em;
  margin-bottom: 0.5em;
  scroll-margin-top: 88px;
}

.n-prose h4 {
  font-size: 1.08rem;
  font-weight: 600;
  margin-top: 1.6em;
  margin-bottom: 0.4em;
}

.n-prose p {
  margin-top: 0;
  margin-bottom: 1.3em;
}

.n-prose a {
  text-decoration: underline;
  text-decoration-color: var(--n-border-strong);
  text-underline-offset: 3px;
  transition: text-decoration-color 150ms ease;
}

.n-prose a:hover {
  text-decoration-color: var(--n-text);
}

.n-prose ul,
.n-prose ol {
  padding-left: 1.4em;
  margin: 1.2em 0;
}

.n-prose li + li {
  margin-top: 0.45em;
}

.n-prose blockquote,
.n-prose .wp-block-quote {
  margin: 1.8em 0;
  padding: 18px 22px;
  background: var(--n-surface);
  border-left: 3px solid var(--n-text);
  border-radius: 0 var(--n-radius-md) var(--n-radius-md) 0;
  color: var(--n-text);
}

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

.n-prose .is-style-nityasha-callout {
  padding: 22px 24px;
  background: var(--n-surface);
  border: 1px solid var(--n-border);
  border-radius: var(--n-radius-md);
  margin: 1.8em 0;
}

.n-prose hr,
.n-prose .wp-block-separator {
  border: 0;
  border-top: 1px solid var(--n-border);
  margin: 2.5em 0;
}

/* Gutenberg Images & Alignments */
.n-prose figure {
  margin: 2em 0;
}

.n-prose figure img {
  border-radius: var(--n-radius-md);
  border: 1px solid var(--n-border);
}

.n-prose figcaption {
  font-size: 0.85rem;
  color: var(--n-text-muted);
  text-align: center;
  margin-top: 10px;
}

.n-prose .alignwide {
  max-width: min(960px, 100%);
}

/* Comparison & Data Tables (Gutenberg wp-block-table) */
.n-prose .wp-block-table,
.n-prose .n-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 2em 0;
  border: 1px solid var(--n-border);
  border-radius: var(--n-radius-md);
}

.n-prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
  line-height: 1.5;
  text-align: left;
}

.n-prose th,
.n-prose td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--n-border);
  vertical-align: top;
}

.n-prose thead th {
  background: var(--n-surface);
  font-weight: 600;
  color: var(--n-text);
  white-space: nowrap;
}

.n-prose tbody tr:last-child td {
  border-bottom: none;
}

.n-prose tbody tr:hover {
  background: var(--n-surface);
}

/* Code Blocks */
.n-prose code {
  font-family: var(--n-font-mono);
  font-size: 0.88em;
  background: var(--n-code-bg);
  padding: 2px 6px;
  border-radius: 5px;
}

.n-prose pre {
  position: relative;
  background: var(--n-code-bg);
  border: 1px solid var(--n-border);
  border-radius: var(--n-radius-md);
  padding: 18px 20px;
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.6;
}

.n-prose pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}

.n-code-copy {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--n-border);
  background: var(--n-bg);
  color: var(--n-text-secondary);
  cursor: pointer;
}

.n-code-copy:hover {
  color: var(--n-text);
  border-color: var(--n-border-strong);
}

/* Tags & Post Footer */
.n-post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--n-border);
}

.n-post-tags a {
  font-size: 0.82rem;
  color: var(--n-text-secondary);
  background: var(--n-surface);
  border: 1px solid var(--n-border);
  padding: 5px 12px;
  border-radius: 9999px;
  text-decoration: none;
}

.n-post-tags a:hover {
  color: var(--n-text);
  border-color: var(--n-border-strong);
}

/* Author Box */
.n-author-card {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 24px;
  margin-top: 36px;
  background: var(--n-surface);
  border: 1px solid var(--n-border);
  border-radius: var(--n-radius-lg);
}

.n-author-card img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  flex-shrink: 0;
}

.n-author-name {
  font-weight: 600;
  font-size: 1rem;
  margin: 0 0 4px;
}

.n-author-bio {
  font-size: 0.9rem;
  color: var(--n-text-secondary);
  margin: 0;
  line-height: 1.55;
}

/* Nityasha Product CTA Card */
.n-cta-card {
  margin-top: 48px;
  padding: clamp(28px, 4vw, 44px);
  border-radius: var(--n-radius-lg);
  background: var(--n-surface);
  border: 1px solid var(--n-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.n-cta-copy {
  max-width: 54ch;
}

.n-cta-eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--n-text-muted);
  margin: 0 0 8px;
}

.n-cta-heading {
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin: 0 0 8px;
}

.n-cta-text {
  font-size: 0.96rem;
  color: var(--n-text-secondary);
  margin: 0;
}

/* Related Posts */
.n-related-section {
  margin-top: 72px;
  padding-top: 44px;
  border-top: 1px solid var(--n-border);
}

.n-section-heading {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0 0 28px;
}

/* ==========================================================================
   8. Search Modal (⌘K)
   ========================================================================== */
.n-search-modal {
  position: fixed;
  inset: 0;
  z-index: 1500;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 16px 24px;
}

.n-search-modal.is-open {
  display: flex;
}

.n-search-dialog {
  width: 100%;
  max-width: 580px;
  background: var(--n-bg);
  border: 1px solid var(--n-border-strong);
  border-radius: var(--n-radius-lg);
  box-shadow: var(--n-shadow-md);
  overflow: hidden;
}

.n-search-form {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--n-border);
}

.n-search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1.05rem;
  outline: none;
}

.n-search-hints {
  padding: 16px 20px 20px;
}

.n-search-hints-label {
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--n-text-muted);
  margin: 0 0 10px;
}

/* ==========================================================================
   9. Footer
   ========================================================================== */
.n-footer {
  margin-top: auto;
  border-top: 1px solid var(--n-border);
  background: var(--n-bg);
  padding: 48px clamp(20px, 4vw, 48px) 36px;
}

.n-footer-inner {
  max-width: var(--n-max-w);
  margin: 0 auto;
}

.n-footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 32px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--n-border);
}

.n-footer-desc {
  font-size: 0.9rem;
  color: var(--n-text-secondary);
  max-width: 34ch;
  margin: 12px 0 0;
  line-height: 1.55;
}

.n-footer-col h3 {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--n-text);
  margin: 0 0 12px;
}

.n-footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.n-footer-col a {
  font-size: 0.88rem;
  color: var(--n-text-secondary);
}

.n-footer-col a:hover {
  color: var(--n-text);
}

.n-footer-bottom {
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.84rem;
  color: var(--n-text-muted);
}

/* ==========================================================================
   10. Responsive Breakpoints
   ========================================================================== */
.n-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 890;
}

.n-sidebar-backdrop.is-open {
  display: block;
}

@media (max-width: 1120px) {
  .n-post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .n-article-layout {
    grid-template-columns: minmax(0, var(--n-prose-w));
  }
  .n-toc-aside {
    display: none;
  }
}

@media (max-width: 960px) {
  .n-sidebar {
    transform: translateX(-100%);
    transition: transform 240ms var(--n-ease);
    width: 268px;
  }
  .n-sidebar.is-open {
    transform: translateX(0);
  }
  .n-main-wrap {
    margin-left: 0;
  }
  .n-mobile-menu-btn,
  .n-mobile-brand {
    display: inline-flex;
  }
  .n-hero-post {
    grid-template-columns: 1fr;
  }
  .n-footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .n-post-grid {
    grid-template-columns: 1fr;
  }
  .n-post-grid.is-list-view .n-card-body {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .n-post-grid.is-list-view .n-meta-row {
    flex-direction: row;
  }
  .n-kbd,
  .n-search-label {
    display: none;
  }
  .n-footer-grid {
    grid-template-columns: 1fr;
  }
}
