/* ═══════════════════════════════════════════════════════════
   MetalinkBlog — Premium Modern Media Platform
   ═══════════════════════════════════════════════════════════ */

:root {
  --nx-primary: #FF5A5F;
  --nx-secondary: #FF9A3C;
  --nx-dark: #0F172A;
  --nx-light: #F8FAFC;
  --nx-indigo: #6366F1;
  --nx-text: #0F172A;
  --nx-muted: #64748B;
  --nx-border: rgba(15, 23, 42, 0.08);
  --nx-glass: rgba(255, 255, 255, 0.72);
  --nx-glass-border: rgba(255, 255, 255, 0.5);
  --nx-shadow: 0 24px 80px rgba(15, 23, 42, 0.08);
  --nx-shadow-lg: 0 32px 100px rgba(15, 23, 42, 0.12);
  --nx-radius: 16px;
  --nx-radius-lg: 24px;
  --nx-font: 'Inter', system-ui, sans-serif;
  --nx-display: 'Playfair Display', Georgia, serif;
  --nx-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --nx-container: 1240px;
  --nx-header-h: 72px;
  --nx-gradient: linear-gradient(135deg, #FF5A5F 0%, #FF9A3C 50%, #6366F1 100%);
  --nx-gradient-soft: linear-gradient(180deg, #F8FAFC 0%, #FFF 40%, #F1F5F9 100%);
}

[data-theme="dark"] {
  --nx-text: #F8FAFC;
  --nx-muted: #94A3B8;
  --nx-light: #0B1120;
  --nx-surface: #1E293B;
  --nx-surface-2: #334155;
  --nx-border: rgba(255, 255, 255, 0.1);
  --nx-glass: rgba(30, 41, 59, 0.85);
  --nx-glass-border: rgba(255, 255, 255, 0.1);
  --nx-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --nx-gradient-soft: linear-gradient(180deg, #0B1120 0%, #0F172A 50%, #1E293B 100%);
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; }

body.nexus {
  margin: 0;
  font-family: var(--nx-font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--nx-text);
  background: var(--nx-gradient-soft);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

.nx-main { min-height: 60vh; }

.nx-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--nx-gradient);
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ─── Brand ─── */
.nx-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--nx-text);
}

/* ─── Logo icon (orange AI brain) ─── */
.nx-brand__mark,
.nx-admin-logo__mark {
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: calc(var(--nx-logo-size, 38px) * 0.28);
  background: #0F172A;
  box-shadow: 0 4px 16px rgba(255, 90, 95, 0.28);
}

.nx-logo-icon {
  display: block;
  width: var(--nx-logo-size, 38px);
  height: var(--nx-logo-size, 38px);
  min-width: var(--nx-logo-size, 38px);
  min-height: var(--nx-logo-size, 38px);
  border-radius: 0;
  object-fit: cover;
  object-position: 50% 50%;
  transform: scale(1.12);
  flex-shrink: 0;
  box-shadow: none;
  background: transparent;
}

.nx-brand__mark svg,
.nx-brand__mark .nx-brand__img {
  width: var(--nx-logo-size, 38px);
  height: var(--nx-logo-size, 38px);
  display: block;
  border-radius: calc(var(--nx-logo-size, 38px) * 0.28);
  object-fit: cover;
  flex-shrink: 0;
}

.nx-brand--footer .nx-brand__mark,
.nx-brand--footer .nx-logo-icon {
  box-shadow: 0 4px 20px rgba(255, 90, 95, 0.35);
}

.nx-brand--auth {
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.nx-brand--admin {
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.nx-brand__name {
  font-family: var(--nx-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.nx-brand__tagline {
  display: block;
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #FF5A5F;
  margin-top: 2px;
}

.nx-gradient-text {
  background: linear-gradient(135deg, #FF5A5F, #FF9A3C);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nx-brand--footer .nx-brand__name { color: #fff; }

.nx-brand--admin .nx-brand__name { font-size: 1rem; }
.nx-brand--admin .nx-brand__tagline { display: none; }

/* ─── Header ─── */
.nx-header {
  position: fixed;
  top: 16px;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 16px;
  pointer-events: none;
}

.nx-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: var(--nx-header-h);
  padding: 10px 20px;
  background: transparent;
  border: none;
  box-shadow: none;
  pointer-events: auto;
  transition: all 0.4s var(--nx-ease);
}

.nx-header__inner::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--nx-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--nx-glass-border);
  border-radius: 100px;
  box-shadow: var(--nx-shadow);
  transition: background 0.4s var(--nx-ease), box-shadow 0.4s var(--nx-ease);
}

.nx-header.is-scrolled .nx-header__inner::before {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 40px rgba(15, 23, 42, 0.1);
}

[data-theme="dark"] .nx-header__inner::before,
[data-theme="dark"] .nx-header.is-scrolled .nx-header__inner::before {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(255, 255, 255, 0.1);
}

.nx-header.is-scrolled .nx-header__inner {
  top: 0;
}

[data-theme="dark"] .nx-header.is-scrolled .nx-header__inner,
[data-theme="dark"] .nx-header__inner {
  background: transparent;
  border-color: transparent;
}

.nx-header__nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
  min-width: 0;
}

.nx-header__nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.nx-header__nav-head,
.nx-header__backdrop {
  display: none;
}

.nx-header__link {
  padding: 8px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--nx-muted);
  border-radius: 100px;
  transition: all 0.25s var(--nx-ease);
}

.nx-header__link:hover,
.nx-header__link.is-active {
  color: var(--nx-text);
  background: rgba(255, 107, 87, 0.1);
}

.nx-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.nx-header .nx-brand {
  flex-shrink: 0;
}

.nx-icon-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: none;
  background: transparent;
  color: var(--nx-muted);
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.25s;
}

.nx-icon-btn:hover {
  background: rgba(255, 107, 87, 0.1);
  color: var(--nx-primary);
}

.nx-header__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}

.nx-header__toggle span {
  width: 20px;
  height: 2px;
  background: var(--nx-text);
  border-radius: 2px;
  transition: 0.3s;
}

.nx-header__mobile-actions { display: none; }

.nx-header__link--mobile-only {
  display: none;
}

.nx-header__nav-close {
  display: none;
}

/* ─── Buttons ─── */
.nx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--nx-font);
  font-size: 0.9375rem;
  font-weight: 600;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.35s var(--nx-ease);
  text-decoration: none;
  white-space: nowrap;
}

.nx-btn--sm { padding: 10px 18px; font-size: 0.8125rem; }
.nx-btn--lg { padding: 16px 32px; font-size: 1rem; }
.nx-btn--block { width: 100%; }

.nx-btn--primary {
  background: var(--nx-gradient);
  color: #fff;
  box-shadow: 0 8px 32px rgba(255, 107, 87, 0.35);
}

.nx-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(255, 107, 87, 0.45);
  color: #fff;
}

.nx-btn--glass {
  background: var(--nx-glass);
  color: var(--nx-text);
  border: 1px solid var(--nx-border);
  backdrop-filter: blur(12px);
}

.nx-btn--glass:hover {
  border-color: var(--nx-primary);
  color: var(--nx-primary);
}

/* ─── Glass ─── */
.nx-glass {
  background: var(--nx-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--nx-glass-border);
  border-radius: var(--nx-radius-lg);
}

.nx-glass-dark {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--nx-radius);
}

/* ─── Typography ─── */
.nx-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--nx-primary);
  margin-bottom: 16px;
}

.nx-eyebrow--light { color: #FDA4AF; }

.nx-section-title {
  font-family: var(--nx-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 12px;
  color: var(--nx-text);
}

.nx-section-desc {
  font-size: 1.0625rem;
  color: var(--nx-muted);
  max-width: 520px;
  margin: 0;
}

.nx-section-desc--light { color: rgba(255,255,255,0.65); }

.nx-section-head {
  margin-bottom: 48px;
}

.nx-section-head--light .nx-section-title { color: #fff; }

.nx-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--nx-primary);
  margin-top: 12px;
}

.nx-badge {
  display: inline-block;
  padding: 4px 12px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nx-primary);
  background: rgba(255, 107, 87, 0.12);
  border-radius: 100px;
}

.nx-badge--light {
  color: #FDA4AF;
  background: rgba(255, 255, 255, 0.1);
}

.nx-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 0.8125rem;
  color: var(--nx-muted);
}

.nx-avatar {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  background: var(--nx-gradient);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 50%;
}

.nx-author {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ─── Hero ─── */
.nx-hero {
  position: relative;
  padding: calc(var(--nx-header-h) + 48px) 0 80px;
  overflow: hidden;
}

.nx-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.nx-hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: nx-float 12s ease-in-out infinite;
}

.nx-hero__orb--1 {
  width: 500px;
  height: 500px;
  background: #FF6B57;
  top: -20%;
  right: -10%;
}

.nx-hero__orb--2 {
  width: 400px;
  height: 400px;
  background: #6366F1;
  bottom: -10%;
  left: -5%;
  animation-delay: -4s;
}

.nx-hero__orb--3 {
  width: 300px;
  height: 300px;
  background: #FF8A3D;
  top: 40%;
  left: 30%;
  animation-delay: -8s;
}

.nx-hero__mesh {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(15, 23, 42, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
}

@keyframes nx-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -20px) scale(1.05); }
}

.nx-hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.nx-hero__title {
  font-family: var(--nx-display);
  font-size: clamp(2.75rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin: 0 0 24px;
  background: linear-gradient(135deg, var(--nx-dark) 0%, #334155 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="dark"] .nx-hero__title {
  background: linear-gradient(135deg, #fff 0%, #CBD5E1 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.nx-hero__desc {
  font-size: 1.125rem;
  color: var(--nx-muted);
  line-height: 1.7;
  max-width: 480px;
  margin-bottom: 32px;
}

.nx-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 40px;
}

.nx-hero__stats {
  display: flex;
  gap: 32px;
}

.nx-hero__stats strong {
  display: block;
  font-family: var(--nx-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--nx-text);
}

.nx-hero__stats span {
  font-size: 0.8125rem;
  color: var(--nx-muted);
}

.nx-hero__visual {
  position: relative;
  min-height: 420px;
}

.nx-hero__illustration {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.nx-hero__shape {
  position: absolute;
  border-radius: var(--nx-radius-lg);
  background: var(--nx-gradient);
  opacity: 0.15;
  animation: nx-float 8s ease-in-out infinite;
}

.nx-hero__shape--1 { width: 60%; height: 70%; top: 10%; right: 0; transform: rotate(-6deg); }
.nx-hero__shape--2 { width: 45%; height: 50%; bottom: 5%; left: 5%; animation-delay: -3s; background: var(--nx-indigo); opacity: 0.12; }
.nx-hero__shape--3 { width: 30%; height: 35%; top: 30%; left: 25%; border-radius: 50%; animation-delay: -6s; }

.nx-hero__card {
  position: relative;
  z-index: 2;
  margin-left: auto;
  max-width: 340px;
  overflow: hidden;
  box-shadow: var(--nx-shadow-lg);
  animation: nx-float 6s ease-in-out infinite;
  animation-delay: -2s;
}

.nx-hero__card-thumb {
  display: block;
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  flex-shrink: 0;
}

.nx-hero__card-thumb img,
.nx-hero__card-thumb .blog-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.nx-hero__card-body {
  padding: 20px;
}

.nx-hero__card-body h2 {
  font-family: var(--nx-display);
  font-size: 1.125rem;
  font-weight: 700;
  margin: 10px 0;
  line-height: 1.35;
}

/* ─── Trending ─── */
.nx-trending {
  padding: 40px 0 64px;
}

.nx-trending__track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 8px 24px 24px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.nx-trending__track::-webkit-scrollbar { display: none; }

.nx-trending__card {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 24px;
  min-width: 200px;
  background: var(--nx-glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius);
  scroll-snap-align: start;
  transition: all 0.35s var(--nx-ease);
}

.nx-trending__card:hover {
  transform: translateY(-4px);
  border-color: var(--nx-primary);
  box-shadow: var(--nx-shadow);
}

.nx-trending__icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: var(--nx-gradient);
  color: #fff;
  border-radius: 12px;
  font-size: 1rem;
}

.nx-trending__label {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--nx-text);
}

.nx-trending__arrow {
  margin-left: auto;
  color: var(--nx-muted);
  font-size: 0.75rem;
  transition: transform 0.3s;
}

.nx-trending__card:hover .nx-trending__arrow {
  transform: translateX(4px);
  color: var(--nx-primary);
}

.nx-trending__count {
  font-size: 0.75rem;
  color: var(--nx-muted);
  margin-left: auto;
}

/* ─── Bento ─── */
.nx-bento {
  padding: 64px 0;
}

.nx-bento__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
}

.nx-bento__item {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.4s var(--nx-ease), box-shadow 0.4s;
}

.nx-bento__item:hover {
  transform: translateY(-6px);
  box-shadow: var(--nx-shadow-lg);
}

.nx-bento__thumb {
  display: block;
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  flex-shrink: 0;
}

.nx-bento__thumb img,
.nx-bento__thumb .blog-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.6s var(--nx-ease);
}

.nx-bento__item:hover .nx-bento__thumb img,
.nx-bento__item:hover .nx-bento__thumb .blog-cover-img {
  transform: scale(1.06);
}

.nx-bento__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 20px 22px 24px;
  width: 100%;
  min-width: 0;
}

.nx-bento__body h3 {
  font-family: var(--nx-display);
  font-size: 1.0625rem;
  font-weight: 700;
  margin: 10px 0 8px;
  line-height: 1.35;
}

.nx-bento__excerpt {
  font-size: 0.875rem;
  color: var(--nx-muted);
  margin: 0 0 12px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nx-bento__body .nx-meta {
  margin-top: auto;
}

/* ─── Editors ─── */
.nx-editors {
  padding: 64px 0;
}

.nx-editors__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.nx-editors__card {
  overflow: hidden;
  transition: all 0.4s var(--nx-ease);
}

.nx-editors__card:hover {
  transform: translateY(-8px);
  box-shadow: var(--nx-shadow-lg);
}

.nx-editors__thumb {
  display: block;
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  flex-shrink: 0;
}

.nx-editors__thumb img,
.nx-editors__thumb .blog-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.5s;
}

.nx-editors__card:hover .nx-editors__thumb img {
  transform: scale(1.08);
}

.nx-editors__body {
  padding: 22px;
}

.nx-editors__body h3 {
  font-family: var(--nx-display);
  font-size: 1.0625rem;
  font-weight: 700;
  margin: 10px 0 8px;
  line-height: 1.35;
}

.nx-editors__body p {
  font-size: 0.8125rem;
  color: var(--nx-muted);
  margin: 0 0 12px;
}

/* ─── AI Section ─── */
.nx-ai {
  position: relative;
  padding: 80px 0;
  overflow: hidden;
}

.nx-ai__bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #0F172A 0%, #1E1B4B 50%, #312E81 100%);
}

.nx-ai__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(255, 107, 87, 0.15), transparent 50%),
              radial-gradient(circle at 70% 80%, rgba(99, 102, 241, 0.2), transparent 40%);
}

.nx-ai .mag-container { position: relative; z-index: 1; }

.nx-ai__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.nx-ai__stat {
  padding: 28px 24px;
  text-align: center;
  transition: transform 0.3s;
}

.nx-ai__stat:hover { transform: scale(1.03); }

.nx-ai__stat-value {
  display: block;
  font-family: var(--nx-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.nx-ai__stat-label {
  display: block;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.55);
  margin-top: 8px;
}

.nx-ai__cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.nx-ai__card {
  padding: 24px;
  transition: all 0.35s;
}

.nx-ai__card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 107, 87, 0.4);
}

.nx-ai__card h3 {
  font-family: var(--nx-display);
  font-size: 1.0625rem;
  color: #fff;
  margin: 12px 0;
  line-height: 1.4;
}

.nx-ai__views {
  font-size: 0.8125rem;
  color: #FDA4AF;
}

/* ─── Latest ─── */
.nx-latest {
  padding: 64px 0;
}

.nx-latest__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.nx-latest__list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.nx-latest__card {
  overflow: hidden;
  transition: all 0.35s;
}

.nx-latest__card:hover {
  transform: translateY(-4px);
  box-shadow: var(--nx-shadow);
}

.nx-latest__thumb {
  display: block;
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  flex-shrink: 0;
}

.nx-latest__thumb img,
.nx-latest__thumb .blog-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.nx-latest__body { padding: 20px; }

.nx-latest__body h3 {
  font-family: var(--nx-display);
  font-size: 1.0625rem;
  font-weight: 700;
  margin: 10px 0;
}

.nx-latest__more {
  text-align: center;
  margin-top: 48px;
}

/* ─── Newsletter ─── */
.nx-newsletter {
  padding: 40px 0 100px;
}

.nx-newsletter__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 48px 56px;
  background: var(--nx-gradient);
  border: none;
  box-shadow: var(--nx-shadow-lg);
}

.nx-newsletter__inner .nx-section-title,
.nx-newsletter__inner .nx-eyebrow,
.nx-newsletter__inner p {
  color: #fff;
}

.nx-newsletter__inner .nx-eyebrow { color: rgba(255,255,255,0.8); }

.nx-newsletter__form {
  display: flex;
  gap: 12px;
}

.nx-newsletter__form input {
  flex: 1;
  padding: 16px 20px;
  font-size: 1rem;
  border: none;
  border-radius: 100px;
  background: rgba(255,255,255,0.95);
  color: var(--nx-dark);
}

.nx-newsletter__form .nx-btn {
  background: var(--nx-dark);
  box-shadow: none;
}

.nx-form-msg {
  font-size: 0.875rem;
  margin-top: 12px;
  color: rgba(255,255,255,0.9);
}

/* ─── Footer ─── */
.nx-footer {
  background: var(--nx-dark);
  color: rgba(255,255,255,0.7);
  padding: 64px 0 32px;
}

.nx-footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.nx-footer__brand p {
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-top: 16px;
  max-width: 280px;
}

.nx-footer__col h4 {
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.nx-footer__col a {
  display: block;
  font-size: 0.9375rem;
  padding: 6px 0;
  color: rgba(255,255,255,0.6);
  transition: color 0.2s;
}

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

.nx-footer__social {
  display: flex;
  gap: 12px;
}

.nx-footer__social a {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  padding: 0;
}

.nx-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.8125rem;
}

.nx-footer__legal {
  display: flex;
  gap: 24px;
}

.nx-footer__legal a { color: rgba(255,255,255,0.5); }

/* ─── Scroll reveal ─── */
.nx-reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s var(--nx-ease), transform 0.8s var(--nx-ease);
  transition-delay: var(--reveal-delay, 0s);
}

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

/* ─── Inner pages (browse, article) compatibility ─── */
.blog-page {
  padding: calc(var(--nx-header-h) + 48px) 0 64px;
}

.blog-masthead {
  margin-top: calc(var(--nx-header-h) + 24px);
  border-radius: var(--nx-radius-lg);
  margin-left: 24px;
  margin-right: 24px;
  max-width: var(--nx-container);
  margin-inline: auto;
}

/* ─── Modal override ─── */
.news-modal__dialog {
  border-radius: var(--nx-radius-lg);
}

.news-modal__actions .blog-btn--primary,
.news-modal__actions .nx-btn--primary {
  background: var(--nx-gradient);
}

/* ─── Responsive ─── */
@media (max-width: 1100px) {
  .nx-hero__grid { grid-template-columns: 1fr; }
  .nx-hero__visual { min-height: 360px; }
  .nx-bento__grid { grid-template-columns: repeat(2, 1fr); }
  .nx-editors__grid { grid-template-columns: repeat(2, 1fr); }
  .nx-ai__grid { grid-template-columns: repeat(2, 1fr); }
  .nx-ai__cards { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .nx-header {
    padding: 0 12px;
  }

  .nx-header__inner {
    justify-content: space-between;
    gap: 8px;
    padding: 8px 14px 8px 16px;
    min-height: 58px;
    overflow: visible;
  }

  .nx-header__inner::before {
    border-radius: 100px;
  }

  .nx-header .nx-brand {
    flex-shrink: 0;
    min-width: 0;
    position: relative;
    z-index: 1003;
  }

  .nx-header__backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1090;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s var(--nx-ease), visibility 0.35s;
  }

  .nx-header__backdrop.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nx-header__nav {
    display: flex;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: min(340px, 88vw);
    z-index: 1100;
    flex: none;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: stretch;
    background: #fff;
    padding: 0 0 32px;
    overflow: hidden;
    transform: translateX(100%);
    transition: transform 0.4s var(--nx-ease);
    border-radius: 0;
    gap: 0;
    box-shadow: -8px 0 40px rgba(15, 23, 42, 0.12);
    pointer-events: auto;
  }

  [data-theme="dark"] .nx-header__nav { background: var(--nx-dark); }

  .nx-header__nav.is-open { transform: translateX(0); }

  .nx-header__nav-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    flex-shrink: 0;
  }

  .nx-header__nav-links {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    align-content: flex-start;
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 8px 20px 0;
    -webkit-overflow-scrolling: touch;
  }

  .nx-header__nav-close {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--nx-glass-border);
    border-radius: 50%;
    background: #fff;
    color: var(--nx-text);
    font-size: 1.125rem;
    cursor: pointer;
    flex-shrink: 0;
  }

  .nx-header__link {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    font-size: 1.0625rem;
    padding: 14px 0;
    border-radius: 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    color: var(--nx-text);
    background: transparent;
  }

  .nx-header__link--mobile-only {
    display: block;
  }

  .nx-header__actions {
    margin-left: auto;
    flex-shrink: 0;
    gap: 4px;
    position: relative;
    z-index: 1003;
  }

  .nx-header__write-btn {
    padding: 8px 12px;
    font-size: 0.8125rem;
  }

  .nx-header__toggle {
    display: flex;
    margin-left: 2px;
  }

  .nx-header__mobile-actions {
    display: block;
    width: 100%;
    margin-top: auto;
    padding: 20px 20px 0;
    flex-shrink: 0;
  }

  .nx-latest__grid { grid-template-columns: 1fr; }
  .nx-newsletter__inner { grid-template-columns: 1fr; padding: 32px 28px; }
  .nx-newsletter__form { flex-direction: column; }
  .nx-footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .nx-bento__grid,
  .nx-editors__grid,
  .nx-ai__grid { grid-template-columns: 1fr; }
  .nx-hero__stats { gap: 20px; }
  .nx-footer__grid { grid-template-columns: 1fr; }
  .nx-footer__bottom { flex-direction: column; gap: 12px; }
}
