/*
Theme Name: НейроМастерская
Theme URI: https://nm-ai.ru
Author: Оксана Солдатова
Author URI: https://nm-ai.ru
Description: Авторская тема НейроМастерской — AI, автоматизация, нейросети. Динамичный дизайн с анимациями.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: neuromasterskaya
Tags: blog, custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ═══════════════════════════════════════════════
   GOOGLE FONTS & CSS VARIABLES
   ═══════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@400;600;700;900&family=Manrope:wght@400;500;600;700;800&family=Caveat:wght@400;700&family=JetBrains+Mono:wght@400;700&display=swap');

:root {
  --teal:        #22B8A0;
  --teal-dark:   #1A9084;
  --indigo:      #6E5BFF;
  --indigo-dark: #5648E0;
  --coral:       #F26B5B;
  --coral-dk:    #D9503F;
  --navy:        #1A1D3B;
  --lavender:    #ECEFFE;
  --lavender2:   #E0E4FD;
  --white:       #FFFFFF;
  --text:        #1A1D3B;
  --text2:       #4B5063;
  --border:      #DCE0F5;

  --font-display: 'Unbounded', 'Georgia', sans-serif;
  --font-body:    'Manrope', -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', monospace;
  --font-accent:  'Caveat', cursive;

  --r-sm:   10px;
  --r-md:   16px;
  --r-lg:   24px;
  --r-xl:   32px;
  --r-pill: 999px;

  --ease-expo:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --shadow-sm:     0 2px 8px rgba(26,29,59,0.06);
  --shadow-md:     0 4px 16px rgba(26,29,59,0.10);
  --shadow-lg:     0 8px 32px rgba(26,29,59,0.14);
  --shadow-teal:   0 8px 32px rgba(34,184,160,0.25);
  --shadow-coral:  0 8px 32px rgba(242,107,91,0.30);
  --shadow-indigo: 0 8px 32px rgba(110,91,255,0.25);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--lavender);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ═══════════════════════════════════════════════
   ANIMATED BACKGROUND PARTICLES
   ═══════════════════════════════════════════════ */
.nm-bg-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.nm-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
  animation: orb-float 20s ease-in-out infinite;
}
.nm-orb-1 {
  width: 500px; height: 500px;
  background: var(--teal);
  top: -100px; left: -150px;
  animation-duration: 22s;
}
.nm-orb-2 {
  width: 400px; height: 400px;
  background: var(--indigo);
  top: 40%; right: -100px;
  animation-duration: 18s;
  animation-delay: -6s;
}
.nm-orb-3 {
  width: 350px; height: 350px;
  background: var(--coral);
  bottom: -80px; left: 30%;
  animation-duration: 25s;
  animation-delay: -12s;
}

@keyframes orb-float {
  0%,100% { transform: translate(0,0) scale(1); }
  33%      { transform: translate(40px,-60px) scale(1.08); }
  66%      { transform: translate(-30px,40px) scale(0.95); }
}

/* Noise texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.025;
  pointer-events: none;
  z-index: 0;
}

/* ═══════════════════════════════════════════════
   SCROLL REVEAL ANIMATIONS
   ═══════════════════════════════════════════════ */
.nm-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s var(--ease-expo), transform 0.7s var(--ease-expo);
}
.nm-reveal.is-visible { opacity: 1; transform: translateY(0); }
.nm-reveal:nth-child(1) { transition-delay: 0.0s; }
.nm-reveal:nth-child(2) { transition-delay: 0.12s; }
.nm-reveal:nth-child(3) { transition-delay: 0.24s; }
.nm-reveal:nth-child(4) { transition-delay: 0.36s; }
.nm-reveal:nth-child(5) { transition-delay: 0.48s; }
.nm-reveal:nth-child(6) { transition-delay: 0.60s; }

.nm-fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s var(--ease-expo), transform 0.6s var(--ease-expo);
}
.nm-fade-up.is-visible { opacity: 1; transform: translateY(0); }

/* Slide-in from left — used for back button on single post */
.nm-slide-in {
  animation: slide-in-left 0.5s var(--ease-expo) 0.1s both;
}
@keyframes slide-in-left {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ═══════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════ */
.nm-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(236,239,254,0.85);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border-bottom: 1px solid rgba(220,224,245,0.8);
  transition: box-shadow 0.3s ease;
}
.nm-header.scrolled {
  box-shadow: 0 4px 20px rgba(26,29,59,0.10);
}

.nm-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: relative;
  z-index: 1;
}

.nm-logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
  flex-shrink: 0;
}
.nm-logo-l1 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--navy);
  letter-spacing: -0.03em;
}
.nm-logo-l2 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--teal);
  letter-spacing: -0.02em;
}
.nm-logo:hover .nm-logo-l1 { color: var(--indigo); transition: color 0.2s; }

/* Header CTA buttons */
.nm-header-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nm-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.875rem;
  padding: 10px 20px;
  border-radius: var(--r-pill);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease-spring), box-shadow 0.2s ease, background 0.2s ease;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}
.nm-btn:hover { transform: translateY(-2px); }
.nm-btn:active { transform: scale(0.97); }

/* Shimmer effect on buttons */
.nm-btn::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 3s infinite;
}
@keyframes shimmer {
  0%   { left: -100%; }
  50%  { left: 150%; }
  100% { left: 150%; }
}

.nm-btn-tg {
  background: linear-gradient(135deg, #0088CC, #00ADEF);
  color: #fff;
  box-shadow: 0 6px 20px rgba(0,136,204,0.35);
}
.nm-btn-tg:hover { box-shadow: 0 10px 32px rgba(0,136,204,0.50); }

.nm-btn-max {
  background: linear-gradient(135deg, var(--indigo), #8B5CF6);
  color: #fff;
  box-shadow: var(--shadow-indigo);
}
.nm-btn-max:hover { box-shadow: 0 10px 32px rgba(110,91,255,0.50); }

.nm-btn-landing {
  background: linear-gradient(135deg, var(--teal), var(--indigo));
  color: #fff;
  box-shadow: var(--shadow-teal);
}
.nm-btn-landing:hover { box-shadow: 0 10px 32px rgba(34,184,160,0.45); }

/* Hamburger */
.nm-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--r-sm);
  transition: background 0.2s;
}
.nm-hamburger:hover { background: var(--lavender2); }
.nm-hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.nm-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nm-hamburger.open span:nth-child(2) { opacity: 0; }
.nm-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.nm-mobile-menu {
  display: none;
  position: absolute;
  top: 68px; left: 0; right: 0;
  background: rgba(236,239,254,0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 20px 28px;
  flex-direction: column;
  gap: 12px;
  z-index: 999;
}
.nm-mobile-menu.open { display: flex; }
.nm-mobile-menu .nm-btn { width: 100%; justify-content: center; }

/* ═══════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════ */
.nm-hero {
  position: relative;
  z-index: 1;
  padding: 80px 28px 60px;
  text-align: center;
  overflow: hidden;
}

.nm-hero-inner {
  max-width: 760px;
  margin: 0 auto;
}

.nm-eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  background: rgba(34,184,160,0.12);
  border: 1px solid rgba(34,184,160,0.25);
  padding: 5px 16px;
  border-radius: var(--r-pill);
  margin-bottom: 20px;
}

.nm-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  color: var(--navy);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
}

.nm-hero-title .nm-accent {
  background: linear-gradient(135deg, var(--teal), var(--indigo));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nm-hero-sub {
  font-size: 1.05rem;
  color: var(--text2);
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto 0;
}

/* Animated line under hero */
.nm-hero-line {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--indigo));
  border-radius: 3px;
  margin: 28px auto 0;
  animation: line-grow 1s var(--ease-expo) 0.5s both;
}
@keyframes line-grow {
  from { width: 0; opacity: 0; }
  to   { width: 60px; opacity: 1; }
}

/* ═══════════════════════════════════════════════
   POSTS GRID
   ═══════════════════════════════════════════════ */
.nm-posts-section {
  position: relative;
  z-index: 1;
  padding: 20px 28px 80px;
}

.nm-posts-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.nm-posts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
  gap: 16px;
}

.nm-section-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.02em;
}

.nm-posts-count {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text2);
  background: rgba(110,91,255,0.1);
  padding: 4px 12px;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
}

/* Grid */
.nm-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* Card */
.nm-card {
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(220,224,245,0.8);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition:
    transform 0.3s var(--ease-spring),
    box-shadow 0.3s ease,
    border-color 0.3s ease;
  cursor: pointer;
  will-change: transform;
  transform-style: preserve-3d;
  display: flex;
  flex-direction: column;
}

.nm-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: var(--shadow-lg);
  border-color: rgba(34,184,160,0.3);
}

/* Card thumbnail */
.nm-card-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--lavender2), var(--border));
  flex-shrink: 0;
}

.nm-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-expo);
}
.nm-card:hover .nm-card-thumb img { transform: scale(1.06); }

/* No image placeholder */
.nm-card-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--lavender2) 0%, rgba(110,91,255,0.12) 100%);
}
.nm-card-thumb-placeholder svg {
  width: 48px;
  height: 48px;
  opacity: 0.25;
}

/* Category badge on thumb */
.nm-card-cat {
  position: absolute;
  top: 14px;
  left: 14px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--indigo));
  padding: 4px 12px;
  border-radius: var(--r-pill);
  box-shadow: 0 4px 12px rgba(34,184,160,0.35);
}

/* Card body */
.nm-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.nm-card-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  font-size: 0.76rem;
  color: var(--text2);
  font-weight: 500;
}
.nm-card-meta-dot {
  width: 3px; height: 3px;
  background: var(--border);
  border-radius: 50%;
}

.nm-card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.35;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  transition: color 0.2s;
}
.nm-card:hover .nm-card-title { color: var(--teal-dark); }

.nm-card-excerpt {
  font-size: 0.875rem;
  color: var(--text2);
  line-height: 1.65;
  flex: 1;
  /* Clamp to 3 lines */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nm-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.nm-card-read {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--coral);
  transition: gap 0.2s var(--ease-spring), color 0.2s;
}
.nm-card:hover .nm-card-read { gap: 10px; color: var(--coral-dk); }
.nm-card-read svg { transition: transform 0.2s var(--ease-spring); }
.nm-card:hover .nm-card-read svg { transform: translateX(3px); }

.nm-card-reading-time {
  font-size: 0.73rem;
  color: var(--text2);
  font-family: var(--font-mono);
  opacity: 0.7;
}

/* Featured first post — full width */
.nm-card.nm-card-featured {
  grid-column: 1 / -1;
  flex-direction: row;
}
.nm-card.nm-card-featured .nm-card-thumb {
  width: 50%;
  aspect-ratio: auto;
  flex-shrink: 0;
}
.nm-card.nm-card-featured .nm-card-body {
  padding: 36px 40px;
}
.nm-card.nm-card-featured .nm-card-title {
  font-size: 1.5rem;
}
.nm-card.nm-card-featured .nm-card-excerpt {
  -webkit-line-clamp: 4;
}

/* ═══════════════════════════════════════════════
   PAGINATION
   ═══════════════════════════════════════════════ */
.nm-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px 0 60px;
  position: relative;
  z-index: 1;
}

.nm-pagination a,
.nm-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--r-md);
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.2s var(--ease-spring);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.8);
  color: var(--text2);
}
.nm-pagination a:hover {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
  transform: translateY(-2px);
  box-shadow: var(--shadow-teal);
}
.nm-pagination .current {
  background: linear-gradient(135deg, var(--teal), var(--indigo));
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-teal);
}

/* ═══════════════════════════════════════════════
   SINGLE POST
   ═══════════════════════════════════════════════ */
.nm-single {
  position: relative;
  z-index: 1;
  padding: 60px 28px 100px;
}

.nm-single-inner {
  max-width: 760px;
  margin: 0 auto;
}

.nm-single-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 36px;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,0.8);
  border: 1px solid var(--border);
  transition: all 0.2s var(--ease-spring);
}
.nm-single-back:hover {
  color: var(--teal);
  border-color: var(--teal);
  transform: translateX(-4px);
}

.nm-single-header { margin-bottom: 40px; }

.nm-single-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  font-size: 0.82rem;
  color: var(--text2);
  font-weight: 500;
}

.nm-single-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 900;
  color: var(--navy);
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.nm-single-thumb {
  border-radius: var(--r-xl);
  overflow: hidden;
  margin-bottom: 48px;
  box-shadow: var(--shadow-lg);
}
.nm-single-thumb img {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

/* Post content typography */
.nm-single-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
}
.nm-single-content h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy);
  margin: 2em 0 0.6em;
  letter-spacing: -0.02em;
}
.nm-single-content h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  margin: 1.5em 0 0.5em;
}
.nm-single-content p { margin-bottom: 1.4em; }
.nm-single-content ul, .nm-single-content ol {
  padding-left: 1.5em;
  margin-bottom: 1.4em;
}
.nm-single-content li { margin-bottom: 0.5em; }
.nm-single-content a {
  color: var(--teal-dark);
  border-bottom: 1px solid rgba(34,184,160,0.3);
  transition: border-color 0.2s, color 0.2s;
}
.nm-single-content a:hover {
  color: var(--indigo);
  border-color: var(--indigo);
}
.nm-single-content blockquote {
  border-left: 3px solid var(--teal);
  padding: 12px 20px;
  background: rgba(34,184,160,0.08);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  margin: 1.5em 0;
  color: var(--navy);
  font-style: italic;
}
.nm-single-content code {
  font-family: var(--font-mono);
  background: var(--lavender2);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.9em;
  color: var(--indigo);
}
.nm-single-content pre {
  background: var(--navy);
  color: var(--teal);
  padding: 20px;
  border-radius: var(--r-lg);
  overflow-x: auto;
  margin: 1.5em 0;
  font-family: var(--font-mono);
  font-size: 0.9rem;
}
.nm-single-content img {
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  margin: 1.5em 0;
}

/* Social share after post */
.nm-single-share {
  margin-top: 60px;
  padding: 36px;
  background: rgba(255,255,255,0.8);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  text-align: center;
}
.nm-single-share-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}
.nm-single-share-sub {
  font-size: 0.875rem;
  color: var(--text2);
  margin-bottom: 24px;
}
.nm-single-share-btns {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════ */
.nm-footer {
  position: relative;
  z-index: 1;
  background: var(--navy);
  color: rgba(255,255,255,0.75);
  padding: 56px 28px 36px;
}

.nm-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.nm-footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.nm-footer-brand {}
.nm-footer-logo-l1 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.02em;
}
.nm-footer-logo-l2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--teal);
  letter-spacing: -0.02em;
}
.nm-footer-tagline {
  margin-top: 12px;
  font-size: 0.875rem;
  line-height: 1.6;
  max-width: 280px;
  color: rgba(255,255,255,0.55);
}

.nm-footer-links { display: flex; flex-direction: column; gap: 10px; }
.nm-footer-links-title {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 4px;
}
.nm-footer-links a {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.65);
  transition: color 0.2s;
  display: inline-flex; align-items: center; gap: 6px;
}
.nm-footer-links a:hover { color: var(--teal); }

.nm-footer-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.nm-footer-btns .nm-btn { font-size: 0.82rem; padding: 9px 18px; }

.nm-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.3);
}
.nm-footer-bottom a { color: rgba(255,255,255,0.4); }
.nm-footer-bottom a:hover { color: var(--teal); }

/* Animated gradient border on footer */
.nm-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--teal), var(--indigo), var(--coral), var(--teal));
  background-size: 200% 100%;
  animation: border-flow 4s linear infinite;
}
@keyframes border-flow {
  0%   { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}

/* ═══════════════════════════════════════════════
   NO POSTS PLACEHOLDER
   ═══════════════════════════════════════════════ */
.nm-no-posts {
  text-align: center;
  padding: 80px 20px;
  grid-column: 1 / -1;
}
.nm-no-posts-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}
.nm-no-posts h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--navy);
  margin-bottom: 8px;
}
.nm-no-posts p { color: var(--text2); }

/* ═══════════════════════════════════════════════
   FLOATING CTA BANNER (scroll-triggered)
   ═══════════════════════════════════════════════ */
.nm-float-banner {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transform: translateX(100px);
  opacity: 0;
  transition: transform 0.5s var(--ease-spring), opacity 0.4s ease;
  pointer-events: none;
}
.nm-float-banner.visible {
  transform: translateX(0);
  opacity: 1;
  pointer-events: all;
}
.nm-float-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: 0.82rem;
  text-decoration: none;
  box-shadow: var(--shadow-lg);
  transition: transform 0.2s var(--ease-spring), box-shadow 0.2s;
}
.nm-float-btn:hover { transform: translateX(-4px) scale(1.04); }
.nm-float-tg {
  background: linear-gradient(135deg, #0088CC, #00ADEF);
  color: #fff;
}
.nm-float-lp {
  background: linear-gradient(135deg, var(--teal), var(--indigo));
  color: #fff;
}

/* ═══════════════════════════════════════════════
   READING PROGRESS BAR (single post)
   ═══════════════════════════════════════════════ */
.nm-progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--teal), var(--indigo), var(--coral));
  z-index: 2000;
  transition: width 0.1s linear;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .nm-posts-grid { grid-template-columns: repeat(2, 1fr); }
  .nm-card.nm-card-featured {
    flex-direction: column;
  }
  .nm-card.nm-card-featured .nm-card-thumb {
    width: 100%;
    aspect-ratio: 16/9;
  }
}

@media (max-width: 768px) {
  .nm-header-cta { display: none; }
  .nm-hamburger { display: flex; }
  .nm-posts-grid { grid-template-columns: 1fr; }
  .nm-hero { padding: 50px 20px 40px; }
  .nm-hero-title { font-size: 1.8rem; }
  .nm-posts-section { padding: 10px 20px 60px; }
  .nm-float-banner { bottom: 16px; right: 16px; }
  .nm-single { padding: 40px 20px 80px; }
  .nm-single-thumb img { height: 240px; }
  .nm-footer-top { flex-direction: column; gap: 32px; }
  .nm-footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .nm-hero-title { font-size: 1.5rem; }
  .nm-single-share-btns { flex-direction: column; align-items: center; }
}

/* ═══════════════════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .nm-reveal, .nm-fade-up { opacity: 1; transform: none; transition: none; }
  .nm-orb { animation: none; }
  .nm-btn::after { display: none; }
  .nm-float-banner { transform: none; opacity: 1; }
  @keyframes orb-float { to {} }
}
