* { margin: 0; padding: 0; box-sizing: border-box; }
        body { font-family: 'Inter', sans-serif; background: #020408; color: #ffffff; transition: background-color 0.3s ease, color 0.3s ease; }
        ::selection { background: rgba(6, 182, 212, 0.3); color: #6ee7b7; }

        /* Light Mode CSS Overrides */
        body.light {
            background-color: #E2E8F0 !important;
            color: #0F172A !important;
        }
        body.light nav {
            background-color: rgba(226, 232, 240, 0.85) !important;
            border-color: #CBD5E1 !important;
        }
        body.light #mobileMenu {
            background-color: #E2E8F0 !important;
            border-color: #CBD5E1 !important;
        }
        body.light .bg-zinc-900\/50,
        body.light .bg-zinc-900,
        body.light .bg-[#05070a],
        body.light .bg-white\/5,
        body.light .article-card {
            background-color: #FFFFFF !important;
            border-color: #CBD5E1 !important;
        }
        body.light .bg-zinc-800 {
            background-color: #CBD5E1 !important;
        }
        body.light .border-white\/5,
        body.light .border-zinc-800,
        body.light .border-zinc-700 {
            border-color: #CBD5E1 !important;
        }
        body.light .text-zinc-300,
        body.light .text-zinc-400,
        body.light .text-zinc-500 {
            color: #475569 !important;
        }
        body.light .text-white {
            color: #0F172A !important;
        }
        body.light h1,
        body.light h2,
        body.light h3,
        body.light h4,
        body.light p {
            color: #0F172A !important;
            background: none !important;
            -webkit-text-fill-color: initial !important;
        }
        body.light .text-cyan-400,
        body.light .text-cyan-500 {
            color: #D14425 !important;
        }
        body.light .bg-cyan-500\/10 {
            background-color: rgba(209, 68, 37, 0.08) !important;
            color: #D14425 !important;
        }
        body.light .featured-overlay {
            background: linear-gradient(to top, rgba(226, 232, 240, 0.95) 0%, rgba(226, 232, 240, 0.6) 40%, rgba(226, 232, 240, 0.1) 100%) !important;
        }
        body.light .border-white\/10 {
            border-color: #CBD5E1 !important;
        }
        body.light .article-card span.text-zinc-300 {
            color: #ffffff !important;
            background-color: rgba(0, 0, 0, 0.75) !important;
            border-color: rgba(255, 255, 255, 0.2) !important;
        }

        .font-newsreader { font-family: 'Newsreader', serif; }

        /* Scrollbar */
        ::-webkit-scrollbar { width: 6px; }
        ::-webkit-scrollbar-track { background: #09090b; }
        ::-webkit-scrollbar-thumb { background: #27272a; border-radius: 3px; }
        ::-webkit-scrollbar-thumb:hover { background: #3f3f46; }

        /* Featured card gradient overlay */
        .featured-overlay {
            background: linear-gradient(to top, rgba(2, 4, 8, 0.95) 0%, rgba(2, 4, 8, 0.6) 40%, rgba(2, 4, 8, 0.1) 100%);
        }

        /* Card hover */
        .article-card {
            transition: all 500ms cubic-bezier(0.4, 0, 0.2, 1);
        }
        .article-card:hover {
            border-color: rgba(255, 255, 255, 0.15);
            transform: translateY(-4px);
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
        }
        .article-card:hover .card-image {
            transform: scale(1.05);
        }
        .article-card:hover .card-title {
            color: #00c6ff;
        }
        .article-card:hover .read-btn {
            background: #ffffff;
            color: #000000;
        }

        .card-image {
            transition: transform 600ms cubic-bezier(0.4, 0, 0.2, 1);
        }

        /* Category pill */
        .cat-pill {
            transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
        }
        .cat-pill:hover {
            background: rgba(255, 255, 255, 0.1);
            border-color: rgba(255, 255, 255, 0.2);
        }
        .cat-pill.active {
            background: #00c6ff;
            border-color: #00c6ff;
            color: #000000;
        }

        /* Search */
        .search-box {
            transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
        }
        .search-box:focus-within {
            border-color: #00c6ff;
            box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
        }

        /* Featured card hover */
        .featured-card:hover .featured-image {
            transform: scale(1.03);
        }
        .featured-card .featured-image {
            transition: transform 700ms cubic-bezier(0.4, 0, 0.2, 1);
        }
        .featured-card:hover .featured-title {
            color: #00c6ff;
        }

        /* Fade in animation */
        @keyframes fadeInUp {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .animate-in {
            animation: fadeInUp 0.6s ease-out forwards;
            opacity: 0;
        }
        .delay-1 { animation-delay: 0.1s; }
        .delay-2 { animation-delay: 0.2s; }
        .delay-3 { animation-delay: 0.3s; }
        .delay-4 { animation-delay: 0.4s; }
        .delay-5 { animation-delay: 0.5s; }
        .delay-6 { animation-delay: 0.6s; }

        /* Read button */
        .read-btn {
            transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
        }

        /* Toast */
        .toast {
            transform: translateY(20px);
            opacity: 0;
            transition: all 400ms cubic-bezier(0.4, 0, 0.2, 1);
        }
        .toast.show {
            transform: translateY(0);
            opacity: 1;
        }

        /* Mobile menu */
        .mobile-menu {
            max-height: 0;
            overflow: hidden;
            transition: max-height 400ms cubic-bezier(0.4, 0, 0.2, 1);
        }
        .mobile-menu.open {
            max-height: 400px;
        }

        /* Load more button */
        .load-more-btn {
            transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
        }
        .load-more-btn:hover {
            background: #ffffff;
            color: #000000;
            box-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
        }
    
  /* Back to Top Button styling */
  #backToTopBtn {
      position: fixed;
      bottom: 95px;
      right: 30px;
      z-index: 999;
      width: 48px;
      height: 48px;
      border-radius: 50%;
      background: rgba(30, 41, 59, 0.85);
      backdrop-filter: blur(8px);
      border: 1px solid rgba(255, 255, 255, 0.1);
      color: #fff;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
      transition: all 0.3s ease;
      opacity: 0;
      visibility: hidden;
      transform: translateY(10px);
  }
  #backToTopBtn.show {
      opacity: 1;
      visibility: visible;
      transform: translateY(0);
  }
  #backToTopBtn:hover {
      background: rgba(30, 41, 59, 1);
      transform: translateY(-3px);
  }
  body:not(.dark-theme) #backToTopBtn,
  body.light #backToTopBtn {
      background: rgba(226, 232, 240, 0.85);
      border-color: #CBD5E1;
      color: #0F172A;
      box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
  }
  body:not(.dark-theme) #backToTopBtn:hover,
  body.light #backToTopBtn:hover {
      background: #FFFFFF;
  }

/* Synchronized Header Styles (matching index.html style system) */
header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #050505;
  border-bottom: 1px solid #222;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s ease;
}
body.light header {
  background: rgba(226, 232, 240, 0.85) !important;
  border-bottom: 1.5px solid #CBD5E1 !important;
}
.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}
.logo-group {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background-color: #0A0A0A;
  border: 1.5px solid #222;
  border-radius: 50%;
  cursor: pointer;
  color: #F5F5F4;
  transition: all 0.3s ease;
}
body.light .theme-toggle-btn {
  background-color: #ffffff !important;
  border-color: #CBD5E1 !important;
  color: #0F172A !important;
}
.theme-toggle-btn:hover {
  transform: rotate(15deg) scale(1.05);
  border-color: #D14425;
  color: #D14425;
}
body.light .theme-toggle-btn:hover {
  border-color: #D14425 !important;
  color: #D14425 !important;
}
.theme-toggle-btn .sun-icon { display: none; }
.theme-toggle-btn .moon-icon { display: block; }

body.light .theme-toggle-btn .moon-icon { display: block; }
body.light .theme-toggle-btn .sun-icon { display: none; }
body:not(.light) .theme-toggle-btn .moon-icon { display: none; }
body:not(.light) .theme-toggle-btn .sun-icon { display: block; color: #f59e0b; }

.btn-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background-color: #0A0A0A;
  color: #A8A29E;
  border: 1.5px solid #222;
  font-weight: 600;
  font-size: 14px;
  border-radius: 30px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
}
body.light .btn-nav {
  background-color: #ffffff !important;
  color: #0F172A !important;
  border-color: #CBD5E1 !important;
}
.btn-nav:hover {
  background-color: #D14425;
  color: #ffffff;
  border-color: #D14425;
  transform: translateY(-2px);
}
body.light .btn-nav:hover {
  background-color: #1e3c72 !important;
  color: #ffffff !important;
  border-color: #1e3c72 !important;
}
.btn-nav svg {
  transition: transform 0.3s ease;
}
.btn-nav:hover svg {
  transform: translateX(-2px);
}

/* Footer styling matching interactive-tools.css */
footer {
  border-top: 1px solid #222;
  padding: 40px 24px;
  background: #03060c;
  transition: background-color 0.4s ease;
}
body.light footer {
  background: #FFFFFF !important;
  border-top: 1.5px solid #CBD5E1 !important;
}
.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 20px;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}
.logo-icon svg path {
  stroke: #ffffff;
}
body.light .logo-icon svg path {
  stroke: #1e3c72 !important;
}
.footer-logo-text {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
}
body.light .footer-logo-text {
  color: #1e3c72 !important;
}
.footer-logo-text span {
  color: #D14425;
}
body.light .footer-logo-text span {
  color: #D14425 !important;
}
.copyright-text {
  font-size: 14px;
  color: #6B6560;
  font-family: 'Inter', sans-serif;
  margin: 0;
}
body.light .copyright-text {
  color: #475569 !important;
}
.copyright-text a {
  color: #D14425;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px dashed #D14425;
  padding-bottom: 2px;
}
.copyright-text a:hover {
  color: #F06A52;
  border-color: #F06A52;
}

/* Explicit light mode overrides for blog cards (Task 4) */
body.light .article-card {
    background-color: #FFFFFF !important;
    border-color: #CBD5E1 !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03) !important;
}
body.light .article-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04) !important;
    border-color: #94A3B8 !important;
}
body.light .article-card .card-title {
    color: #0F172A !important;
}
body.light .article-card p {
    color: #334155 !important;
}
body.light .article-card span,
body.light .article-card i {
    color: #64748B !important;
}
body.light .article-card .read-btn {
    border-color: #CBD5E1 !important;
    color: #475569 !important;
}
body.light .article-card:hover .read-btn {
    background-color: #0F172A !important;
    color: #FFFFFF !important;
    border-color: #0F172A !important;
}

/* Blog article light mode contrast overrides (Task 5) */
body.light h1,
body.light h2,
body.light h3,
body.light h4,
body.light h5,
body.light h6,
body.light p,
body.light li,
body.light ol,
body.light ul,
body.light span,
body.light code {
    color: #0F172A !important;
    background: none !important;
    -webkit-text-fill-color: initial !important;
}

/* Preserve white text inside dark widgets and buttons in light mode */
body.light .cta-widget h3,
body.light .cta-widget p,
body.light .cta-widget li,
body.light .cta-widget span,
body.light .bg-zinc-900 h3,
body.light .bg-zinc-900 p,
body.light .bg-zinc-900 span {
    color: #FFFFFF !important;
}

body.light main a,
body.light .main-content a {
    color: #1e3c72 !important;
    text-decoration: underline !important;
}

body.light .breadcrumbs a {
    color: #475569 !important;
}

body.light .breadcrumbs span {
    color: #94A3B8 !important;
}


/* Footer links styling */
.footer-links a {
  color: #64748b !important;
  text-decoration: none !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  transition: color 0.3s ease !important;
}
.footer-links a:hover {
  color: #ffffff !important;
}
body.light .footer-links a {
  color: #475569 !important;
}
body.light .footer-links a:hover {
  color: #1e3c72 !important;
}
