:root {
  --bg: #0f0f1a;
  --card: rgba(30, 30, 46, 0.72);
  --card-solid: #1e1e2e;
  --text: #ffffff;
  --muted: #a0a0b0;
  --primary: #1a1a2e;
  --secondary: #16213e;
  --accent: #e63946;
  --accent-soft: #ff6b6b;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

html.light {
  --bg: #f6f7fb;
  --card: rgba(255, 255, 255, 0.8);
  --card-solid: #ffffff;
  --text: #111827;
  --muted: #4b5563;
  --primary: #eef2ff;
  --secondary: #dbeafe;
  --accent: #e63946;
  --accent-soft: #ff7a7a;
  --border: rgba(15, 23, 42, 0.08);
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: radial-gradient(circle at top, rgba(230, 57, 70, 0.12), transparent 25%), linear-gradient(135deg, #1a1a2e, #16213e);
  color: var(--text);
  transition: background-color 0.35s ease, color 0.35s ease;
}

html.light body {
  background:
    radial-gradient(circle at top left, rgba(230, 57, 70, 0.08), transparent 22%),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.08), transparent 18%),
    linear-gradient(180deg, #fff7f8 0%, #f8fafc 18%, #eef2ff 55%, #ffffff 100%);
  color: var(--text);
}

html.light .hero-section {
  background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0));
}

html.light .hero-aurora {
  opacity: 0.16;
  mix-blend-mode: normal;
  filter: saturate(0.9) blur(12px);
}

html.light .site-header.scrolled {
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

html.light .ticker-shell,
html.light .glass-card,
html.light .newsletter-card,
html.light .tool-spotlight-card,
html.light .page-hero-small,
html.light .toc-shell .sticky,
html.light .ad-shell,
html.light .prose-shell,
html.light .feature-hero-card,
html.light .stat-box {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(148, 163, 184, 0.18);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

html.light .feature-image {
  background: linear-gradient(135deg, rgba(255,255,255,0.82), rgba(241,245,249,0.72)), url('/static/img/og-image.png') center/cover no-repeat;
}

html.light .feature-overlay {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.78));
}

html.light .floating-card {
  background: rgba(255,255,255,0.78);
  border-color: rgba(148,163,184,0.18);
  color: #0f172a;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

html.light .secondary-button,
html.light .glass-button,
html.light .filter-pill,
html.light .pagination-pill,
html.light .share-pill,
html.light .social-badge {
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  border-color: rgba(148, 163, 184, 0.24);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

html.light .secondary-button:hover,
html.light .glass-button:hover,
html.light .filter-pill:hover,
html.light .pagination-pill:hover,
html.light .share-pill:hover,
html.light .social-badge:hover,
html.light .glass-card:hover,
html.light .tool-spotlight-card:hover,
html.light .feature-hero-card:hover {
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
}

html.light .nav-link,
html.light .footer-title,
html.light .stat-number,
html.light .section-title,
html.light .hero-title,
html.light .hero-subtitle,
html.light .feature-copy h2,
html.light .feature-copy h3,
html.light .article-card h2 a,
html.light .article-card h3 a,
html.light .ticker-item,
html.light .scroll-indicator {
  color: #0f172a;
}

html.light .feature-copy p,
html.light .text-slate-300,
html.light .text-slate-400,
html.light .footer-copy,
html.light .footer-link,
html.light .stat-label,
html.light .prose-shell p {
  color: #475569 !important;
}

html.light .text-red-200,
html.light .text-red-100,
html.light .text-red-300 {
  color: #b91c1c !important;
}

html.light .newsletter-input {
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  border-color: rgba(148, 163, 184, 0.26);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}

html.light .newsletter-input::placeholder {
  color: #64748b;
}

html.light .prose-shell {
  background: rgba(255,255,255,0.82);
}

html.light .skeleton-line {
  background: rgba(148, 163, 184, 0.14);
}

.nepali-text {
  font-family: 'Mukta', sans-serif;
}

.page-shell {
  min-height: 100vh;
}

.page-transition {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, rgba(230,57,70,0.12), transparent 45%);
  pointer-events: none;
  animation: pageFade 0.9s ease;
  z-index: 0;
}

@keyframes pageFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.site-header.scrolled {
  background: rgba(10, 10, 20, 0.74);
  backdrop-filter: blur(18px);
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.25);
}

html.light .site-header.scrolled {
  background: rgba(255, 255, 255, 0.8);
}

.logo-glow,
.glass-button,
.glass-card,
.newsletter-card,
.tool-spotlight-card,
.feature-hero-card,
.page-hero-small,
.toc-shell .sticky,
.ad-shell {
  backdrop-filter: blur(18px);
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.glass-button,
.primary-button,
.secondary-button,
.filter-pill,
.pagination-pill,
.share-pill,
.social-badge,
.newsletter-input {
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.nav-link {
  position: relative;
  color: var(--text);
  font-weight: 600;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 100%;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  transition: transform 0.2s ease;
}

.nav-link:hover::after {
  transform: scaleX(1);
}

.glass-button,
.filter-pill,
.pagination-pill,
.share-pill,
.social-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  padding: 0.75rem 1rem;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 999px;
  padding: 0.95rem 1.4rem;
  font-weight: 700;
}

.primary-button {
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  color: white;
  box-shadow: 0 20px 40px rgba(230, 57, 70, 0.25);
}

.secondary-button {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.primary-button:hover,
.secondary-button:hover,
.glass-button:hover,
.glass-card:hover,
.tool-spotlight-card:hover,
.feature-hero-card:hover,
.share-pill:hover,
.filter-pill:hover,
.pagination-pill:hover,
.social-badge:hover {
  transform: translateY(-4px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.hero-section {
  position: relative;
  isolation: isolate;
}

.hero-aurora {
  position: absolute;
  inset: 0;
  background: linear-gradient(-45deg, #1a1a2e, #16213e, rgba(230,57,70,0.35), #1a1a2e);
  background-size: 300% 300%;
  animation: aurora 12s ease infinite;
  opacity: 0.9;
}

@keyframes aurora {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero-title,
.section-title {
  font-size: clamp(2.6rem, 5vw, 4.8rem);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.hero-subtitle {
  font-size: clamp(1.35rem, 2vw, 2rem);
}

.section-kicker,
.eyebrow {
  display: inline-flex;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  background: rgba(230, 57, 70, 0.14);
  color: #fecdd3;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
}

.section-heading-wrap {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.scroll-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.08);
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

.floating-card {
  position: absolute;
  padding: 1rem 1.2rem;
  border-radius: 1.4rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(14px);
  color: white;
  font-weight: 700;
  box-shadow: var(--shadow);
  animation: floatCard 6s ease-in-out infinite;
}

.card-one { top: 14%; right: 12%; }
.card-two { top: 38%; right: 4%; animation-delay: 1s; }
.card-three { bottom: 12%; right: 18%; animation-delay: 2s; }

@keyframes floatCard {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-14px); }
}

.ticker-shell {
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
  padding: 1rem 0;
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 40s linear infinite;
}

.ticker-shell:hover .ticker-track {
  animation-play-state: paused;
}

.ticker-item {
  white-space: nowrap;
  margin-right: 2.5rem;
  color: var(--text);
  font-weight: 600;
}

@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.feature-hero-card,
.page-hero-small,
.glass-card,
.newsletter-card,
.tool-spotlight-card,
.ad-shell {
  border-radius: 2rem;
}

.feature-image {
  position: relative;
  min-height: 28rem;
  border-radius: 2rem;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(26,26,46,0.95), rgba(22,33,62,0.9)), url('/static/img/og-image.png') center/cover no-repeat;
  display: flex;
  align-items: flex-end;
}

.feature-image > *:not(.feature-overlay) {
  position: relative;
  z-index: 2;
}

.feature-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.08), rgba(0,0,0,0.72));
}

.feature-copy {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 2rem;
}

.glass-card,
.newsletter-card,
.tool-spotlight-card,
.page-hero-small,
.prose-shell {
  padding: 1.75rem;
}

.article-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.category-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 700;
}

.category-badge.ai-news { background: rgba(59,130,246,0.16); color: #bfdbfe; }
.category-badge.tutorial { background: rgba(34,197,94,0.16); color: #bbf7d0; }
.category-badge.tools { background: rgba(168,85,247,0.16); color: #e9d5ff; }
.category-badge.chatgpt { background: rgba(16,185,129,0.16); color: #a7f3d0; }
.category-badge.nepal-tech { background: rgba(230,57,70,0.16); color: #fecdd3; }

.newsletter-input {
  width: 100%;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.08);
  color: var(--text);
  padding: 0.95rem 1.2rem;
}

.newsletter-input::placeholder {
  color: var(--muted);
}

.prose-shell {
  border-radius: 2rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
}

.prose-shell p {
  color: #d6d8e2;
  line-height: 1.9;
  margin-bottom: 1.4rem;
  font-size: 1.06rem;
}

html.light .prose-shell p {
  color: #334155;
}

.article-header-wrap {
  background: linear-gradient(135deg, rgba(26,26,46,0.95), rgba(22,33,62,0.95));
}

.skeleton-line {
  position: relative;
  overflow: hidden;
  background: rgba(255,255,255,0.08);
}

.skeleton-line::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  animation: shimmer 1.6s infinite;
}

@keyframes shimmer {
  100% { transform: translateX(100%); }
}

.fade-in-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.footer-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
}

.footer-copy,
.footer-link {
  color: var(--muted);
}

.footer-link:hover {
  color: #fff;
}

.filter-pill.active,
.pagination-pill.active {
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  color: white;
  border-color: transparent;
}

.stat-box {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  border-radius: 1.5rem;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
  padding: 1.2rem;
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
}

.stat-label {
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .floating-card { display: none; }
  .feature-hero-card {
    border-radius: 1.5rem;
  }
  .feature-image {
    min-height: auto;
    border-radius: 1.5rem;
    padding: 1rem;
    align-items: stretch;
  }
  .feature-copy {
    padding: 0;
  }
  .feature-copy h2,
  .feature-copy h3 {
    font-size: 1.7rem !important;
    line-height: 1.15;
    word-break: break-word;
    overflow-wrap: anywhere;
  }
  .feature-copy p,
  .feature-copy a,
  .feature-copy span {
    overflow-wrap: anywhere;
  }
  .hero-section { padding-top: 1rem; }
}

html.light .article-header-wrap {
  background: linear-gradient(135deg, rgba(255,255,255,0.96), rgba(238,242,255,0.96));
}

html.light .section-kicker,
html.light .eyebrow {
  color: #b91c1c;
  background: rgba(230, 57, 70, 0.1);
}

html.light .category-badge.ai-news { background: rgba(59,130,246,0.12); color: #1d4ed8; }
html.light .category-badge.tutorial { background: rgba(34,197,94,0.12); color: #15803d; }
html.light .category-badge.tools { background: rgba(168,85,247,0.12); color: #7e22ce; }
html.light .category-badge.chatgpt { background: rgba(16,185,129,0.12); color: #047857; }
html.light .category-badge.nepal-tech { background: rgba(230,57,70,0.12); color: #b91c1c; }

