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

html, body {
  margin: 0;
  padding: 0;
}

/* DARK MODE + FONT */
body.site-body {
  font-family: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #020617 0, #020617 40%, #000 80%);
  color: #e5e7eb;
}

/* Header + layout */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: linear-gradient(to right, rgba(15,23,42,0.98), rgba(15,23,42,0.9));
  border-bottom: 1px solid rgba(148,163,184,0.26);
}

.site-header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.7rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Brand */
.brand-link {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: #020617;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-weight: 600;
  letter-spacing: 0.03em;
  font-size: 0.98rem;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: #9ca3af;
}

/* Nav + burger */
.main-nav {
  display: flex;
  gap: 1.1rem;
  align-items: center;
}

.nav-link {
  position: relative;
  font-size: 0.9rem;
  text-decoration: none;
  color: #e5e7eb;
  padding: 0.3rem 0.15rem;
  opacity: 0.85;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.16rem;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #22c55e, #22d3ee);
  transition: width 0.16s ease-out;
}

.nav-link:hover {
  opacity: 1;
}

.nav-link:hover::after {
  width: 100%;
}

/* Burger button (hidden on desktop) */
.menu-toggle {
  display: none;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.6);
  background: rgba(15,23,42,0.9);
  padding: 0;
  margin-left: 0.75rem;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: #e5e7eb;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.menu-toggle.is-open span:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}
.menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-4px) rotate(-45deg);
}

/* Shell */
.site-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 2.5rem;
}

/* Flash */
.flash {
  border-radius: 999px;
  padding: 0.65rem 1rem;
  margin-bottom: 0.9rem;
  font-size: 0.85rem;
}
.flash-notice {
  background: rgba(22,163,74,0.15);
  border: 1px solid rgba(34,197,94,0.65);
}
.flash-alert {
  background: rgba(248,113,113,0.15);
  border: 1px solid rgba(248,113,113,0.7);
}

/* HERO */
.hero {
  margin-top: 1.6rem;
  margin-bottom: 2.4rem;
  padding: 1.9rem 1.7rem;
  border-radius: 1.7rem;
  background:
    radial-gradient(circle at top left, #22c55e22, transparent 55%),
    radial-gradient(circle at bottom right, #0ea5e922, transparent 55%),
    linear-gradient(125deg, #020617, #020617, #020617);
  border: 1px solid rgba(148,163,184,0.35);
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(0, 1.4fr);
  gap: 1.9rem;
}

.hero-text h1 {
  margin: 0 0 0.7rem;
  font-size: 2.2rem;
  line-height: 1.1;
}

.hero-text p {
  margin: 0;
  color: #9ca3af;
  max-width: 32rem;
}

.hero-actions {
  margin-top: 1.4rem;
}

.hero-search {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.hero-search-input {
  flex: 1 1 220px;
  padding: 0.7rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.7);
  background: rgba(15,23,42,0.98);
  color: #e5e7eb;
  font-size: 0.9rem;
}

.hero-search-input::placeholder {
  color: #6b7280;
}

.hero-search-input:focus {
  outline: none;
  border-color: #22c55e;
  box-shadow: 0 0 0 1px rgba(34,197,94,0.35);
}

.hero-search-btn,
.btn-secondary {
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.65rem 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  white-space: nowrap;
}

/* New fancy search button */
.hero-search-btn {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 0 0, #4ade8050, transparent 55%),
              linear-gradient(135deg, #22c55e, #22d3ee);
  color: #020617;
  box-shadow: 0 10px 30px rgba(34,197,94,0.45);
  transform: translateY(0);
  transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
}

.hero-search-btn::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at 0 0, rgba(250,250,250,0.4), transparent 55%);
  opacity: 0;
  transition: opacity 0.18s ease-out;
}

.hero-search-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(34,197,94,0.6);
}

.hero-search-btn:hover::before {
  opacity: 1;
}

.hero-search-btn-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* Minimal "search circle" icon using pure CSS */
.hero-search-btn-label::before {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid #020617;
  box-shadow: 0 0 0 1px rgba(15,23,42,0.3);
  background: rgba(248,250,252,0.9);
}


.btn-secondary {
  background: transparent;
  color: #e5e7eb;
  border: 1px solid rgba(148,163,184,0.6);
}
.btn-secondary:hover {
  border-color: #e5e7eb;
}

.hero-hint {
  margin-top: 0.6rem;
  font-size: 0.8rem;
  color: #9ca3af;
}

/* Hero right side */
.hero-highlight {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.hero-highlight-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #a5b4fc;
}

.hero-highlight-card {
  border-radius: 1.3rem;
  padding: 1.1rem 1.2rem;
  background:
    radial-gradient(circle at top right, #22d3ee24, transparent),
    rgba(15,23,42,0.96);
  border: 1px solid rgba(148,163,184,0.7);
}

.hero-highlight-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.02rem;
}
.hero-highlight-card p {
  margin: 0;
  font-size: 0.9rem;
  color: #9ca3af;
}

/* Sections */
.section {
  margin-bottom: 2.6rem;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.section-header h1,
.section-header h2 {
  margin: 0;
  font-size: 1.45rem;
}
.section-subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
  color: #9ca3af;
}
.section-link {
  font-size: 0.85rem;
  text-decoration: none;
  color: #a5b4fc;
}
.section-link:hover {
  text-decoration: underline;
}

/* Article grid */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
}

/* IMAGE-FIRST ARTICLE CARDS */
.article-card {
  border-radius: 1.3rem;
  overflow: hidden;
  background: radial-gradient(circle at top left, rgba(15,23,42,0.95), #020617);
  border: 1px solid rgba(31,41,55,0.9);
  display: flex;
  flex-direction: column;
  min-height: 260px;
  box-shadow: 0 18px 40px rgba(15,23,42,0.9);
  transform: translateY(0);
  transition: transform 0.18s ease-out, box-shadow 0.18s ease-out, border-color 0.18s ease-out;
}

.article-card--image:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(15,23,42,1);
  border-color: rgba(59,130,246,0.75);
}

/* Media area */
.article-card-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.article-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.02);
  transition: transform 0.3s ease-out;
}

.article-card--image:hover .article-card-media img {
  transform: scale(1.06);
}

.article-card-media-placeholder {
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 0 0, #1d4ed8, #020617 60%);
}

.article-card-media-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85), transparent 55%);
}

.article-card-media-top {
  position: absolute;
  top: 0.6rem;
  left: 0.7rem;
}

.article-card-media-bottom {
  position: absolute;
  left: 0.7rem;
  right: 0.7rem;
  bottom: 0.75rem;
}

.article-card-media-bottom h3,
.article-card-media-bottom h2 {
  margin: 0;
  font-size: 1.02rem;
}

.article-card-media-bottom a {
  color: #f9fafb;
  text-decoration: none;
}
.article-card-media-bottom a:hover {
  text-decoration: underline;
}

/* Little pill on image */
.article-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  background: rgba(15,23,42,0.9);
  color: #a5b4fc;
  border: 1px solid rgba(129,140,248,0.9);
}

/* Content area */
.article-card-content {
  padding: 0.9rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.article-card-excerpt {
  margin: 0;
  font-size: 0.9rem;
  color: #9ca3af;
}

.article-card-meta {
  margin-top: 0.35rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #9ca3af;
}

/* ARTICLE PAGE — NEW DESIGN */
.article-page {
  margin-top: 1.4rem;
}

/* Hero at top of article */
.article-hero {
  max-width: 1120px;
  margin: 0 auto 1.8rem;
  border-radius: 1.6rem;
  overflow: hidden;
  border: 1px solid rgba(148,163,184,0.65);
  box-shadow: 0 28px 60px rgba(15,23,42,1);
}

.article-hero-media {
  position: relative;
  min-height: 260px;
  background: radial-gradient(circle at top left, #1d4ed8, #020617 55%);
}

.article-hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.02);
  transform: scale(1.03);
}

.article-hero-placeholder {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 0 0, #22c55e, transparent 45%),
    radial-gradient(circle at 100% 0, #0ea5e9, transparent 45%),
    radial-gradient(circle at 50% 100%, #a855f7, transparent 55%),
    #020617;
}

.article-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(15,23,42,0.35), rgba(15,23,42,0.96));
}

.article-hero-content {
  position: relative;
  padding: 1.6rem 1.8rem 1.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  justify-content: flex-end;
  max-width: 780px;
}

/* Top meta line in hero */
.article-hero-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
  color: #e5e7eb;
}

.article-hero-meta-right {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

/* Pill */
.article-hero-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: rgba(15,23,42,0.9);
  color: #a5b4fc;
  border: 1px solid rgba(129,140,248,0.9);
}

/* Big title and optional excerpt */
.article-hero-title {
  margin: 0.4rem 0 0.3rem;
  font-size: 2.1rem;
  line-height: 1.1;
  color: #f9fafb;
}

.article-hero-excerpt {
  margin: 0;
  font-size: 0.95rem;
  color: #e5e7eb;
  max-width: 40rem;
}

/* Extra gallery image below hero */
.article-gallery {
  max-width: 1120px;
  margin: 0 auto 1.8rem;
}

.article-gallery-item {
  border-radius: 1.3rem;
  overflow: hidden;
  border: 1px solid rgba(148,163,184,0.55);
  background: #020617;
  box-shadow: 0 20px 50px rgba(15,23,42,0.9);
}

.article-gallery-item img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* Body layout: main + side */
.article-body-shell {
  max-width: 1120px;
  margin: 0 auto 2.6rem;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 1.35fr);
  gap: 2.1rem;
}

/* Main article text */
.article-body-main {
  max-width: 780px;
}

.article-body-content {
  line-height: 1.75;
  font-size: 0.98rem;
  color: #e5e7eb;
}

/* Drop cap first paragraph */
.article-body-content p:first-of-type::first-letter {
  font-size: 3rem;
  line-height: 0.9;
  float: left;
  padding-right: 0.35rem;
  padding-top: 0.16rem;
  font-weight: 600;
  color: #a5b4fc;
}

/* Paragraph spacing */
.article-body-content p {
  margin-bottom: 0.9rem;
}

/* Headings inside article content */
.article-body-content h2,
.article-body-content h3 {
  margin-top: 1.4rem;
  margin-bottom: 0.45rem;
  font-weight: 600;
  color: #e5e7eb;
}

.article-body-content h2 {
  font-size: 1.25rem;
}
.article-body-content h3 {
  font-size: 1.05rem;
}

/* Inline images inside content */
.article-body-content img {
  max-width: 100%;
  border-radius: 1rem;
  border: 1px solid rgba(148,163,184,0.4);
  display: block;
  margin: 1.1rem auto;
  box-shadow: 0 18px 45px rgba(15,23,42,0.9);
}

/* Blockquote style */
.article-body-content blockquote {
  margin: 1.2rem 0;
  padding: 0.8rem 1rem;
  border-left: 3px solid #a855f7;
  background: rgba(15,23,42,0.9);
  border-radius: 0.9rem;
  color: #e5e7eb;
  font-style: italic;
}

/* Footer of article body */
.article-body-footer {
  margin-top: 1.6rem;
}

/* Side column */
.article-body-aside {
  align-self: flex-start;
}

/* Generic side card */
.article-aside-card {
  border-radius: 1.2rem;
  padding: 1rem 1.2rem;
  background:
    radial-gradient(circle at 0 0, #22c55e22, transparent 60%),
    rgba(15,23,42,0.96);
  border: 1px solid rgba(148,163,184,0.7);
  font-size: 0.9rem;
  color: #d1d5db;
  margin-bottom: 1rem;
}

.article-aside-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
}

.article-aside-card p {
  margin: 0 0 0.7rem;
}

.article-aside-link {
  font-size: 0.86rem;
  text-decoration: none;
  color: #a5b4fc;
}
.article-aside-link:hover {
  text-decoration: underline;
}

/* Affiliate card variations */
.article-aside-card--affiliate {
  background:
    radial-gradient(circle at 0 0, #22c55e22, transparent 60%),
    radial-gradient(circle at 100% 0, #0ea5e922, transparent 60%),
    rgba(15,23,42,0.98);
  border-color: rgba(74,222,128,0.7);
}

.article-aside-label {
  font-size: 0.77rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #bbf7d0;
  margin: 0 0 0.5rem;
}

/* Affiliate content layout */
.article-affiliate-main {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.7rem;
}

.article-affiliate-image {
  flex: 0 0 80px;
  border-radius: 0.8rem;
  overflow: hidden;
  background: #020617;
  border: 1px solid rgba(148,163,184,0.65);
}

.article-affiliate-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-affiliate-text h3 {
  margin: 0 0 0.2rem;
  font-size: 0.98rem;
  color: #ecfccb;
}

.article-affiliate-price {
  margin: 0 0 0.2rem;
  font-size: 0.9rem;
  color: #bef264;
  font-weight: 500;
}

.article-affiliate-desc {
  margin: 0;
  font-size: 0.86rem;
  color: #d1fae5;
}

/* Affiliate button */
.article-affiliate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.2rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: none;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  background: linear-gradient(135deg, #22c55e, #22d3ee);
  color: #020617;
  box-shadow: 0 12px 30px rgba(34,197,94,0.55);
}

.article-affiliate-btn:hover {
  filter: brightness(1.05);
}

/* Affiliate note */
.article-affiliate-note {
  margin: 0.5rem 0 0;
  font-size: 0.74rem;
  color: #a1a1aa;
}

/* Responsive article layout */
@media (max-width: 900px) {
  .article-hero-content {
    padding: 1.4rem 1.2rem 1.5rem;
  }

  .article-hero-title {
    font-size: 1.7rem;
  }

  .article-body-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.8rem;
  }

  .article-body-aside {
    order: -1; /* card appears above text on mobile */
  }
}


.article-page-header {
  margin-bottom: 1.4rem;
}
.article-page-label {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #a5b4fc;
}
.article-page-header h1 {
  margin: 0.4rem 0 0.4rem;
  font-size: 2rem;
}
.article-page-meta {
  font-size: 0.85rem;
  color: #9ca3af;
}

.article-page-cover {
  margin-top: 1rem;
  border-radius: 1.1rem;
  overflow: hidden;
  border: 1px solid rgba(148,163,184,0.6);
}
.article-page-cover img {
  width: 100%;
  height: auto;
  display: block;
}

.article-page-body {
  margin-top: 1.4rem;
  line-height: 1.7;
  font-size: 0.98rem;
}
.article-page-body p {
  margin-bottom: 0.9rem;
}

.article-page-footer {
  margin-top: 1.8rem;
}

/* Static pages */
.page {
  max-width: 780px;
  margin: 1rem auto 2.5rem;
}
.page-header h1 {
  margin: 0 0 0.4rem;
}
.page-body {
  margin-top: 0.9rem;
  line-height: 1.65;
  font-size: 0.96rem;
}

/* Contact form */
.contact-form {
  margin-top: 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.form-row label {
  font-size: 0.85rem;
  color: #9ca3af;
}
.form-row input,
.form-row textarea {
  border-radius: 0.7rem;
  border: 1px solid rgba(148,163,184,0.7);
  padding: 0.55rem 0.7rem;
  background: rgba(15,23,42,0.98);
  color: #e5e7eb;
  font-size: 0.9rem;
}
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: #22c55e;
}

/* Search info */
.search-result-info {
  font-size: 0.85rem;
  color: #9ca3af;
  margin-bottom: 0.7rem;
}

/* Footer */
.site-footer {
  margin-top: 2.4rem;
  border-top: 1px solid rgba(31,41,55,0.9);
  padding-top: 1rem;
  color: #6b7280;
  font-size: 0.8rem;
}
.site-footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.footer-link {
  color: #9ca3af;
  text-decoration: none;
}
.footer-link:hover {
  text-decoration: underline;
}

/* RESPONSIVE: burger + layout */
@media (max-width: 800px) {
  .site-header-inner {
    padding-inline: 1rem;
  }

  .site-shell {
    padding-inline: 1rem;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    padding: 1.4rem 1.2rem;
  }

  .hero-text h1 {
    font-size: 1.9rem;
  }

  .site-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Show burger, overlay nav */
  .menu-toggle {
    display: inline-flex;
  }

  .main-nav {
    position: fixed;
    left: 0;
    right: 0;
    top: 56px;
    flex-direction: column;
    background: rgba(15,23,42,0.98);
    padding: 0.75rem 1.5rem 1rem;
    gap: 0.6rem;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.18s ease-out, opacity 0.18s ease-out;
  }

  .main-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-link {
    padding: 0.35rem 0;
    font-size: 0.95rem;
  }

  /* THEME: LIGHT MODE OVERRIDES
    --------------------------------------------
    We don't touch any existing styles; we only
    override colors when data-theme="light" is
    set on the <html> element.
  */

  :root {
    color-scheme: dark;
  }

  :root[data-theme="light"] {
    color-scheme: light;
  }

  /* Page background + base text */
  :root[data-theme="light"] body.site-body {
    background: radial-gradient(circle at top left, #f4f4f5 0, #ffffff 40%, #e5e7eb 100%);
    color: #020617;
  }

  /* Header */
  :root[data-theme="light"] .site-header {
    background: linear-gradient(to right, rgba(249,250,251,0.96), rgba(243,244,246,0.98));
    border-bottom-color: rgba(209,213,219,1);
  }

  /* Brand / nav */
  :root[data-theme="light"] .nav-link {
    color: #111827;
  }

  :root[data-theme="light"] .nav-link span {
    color: #4b5563;
  }

  /* Hero section on home page */
  :root[data-theme="light"] .hero {
    background:
      radial-gradient(circle at top left, #bbf7d822, transparent 55%),
      radial-gradient(circle at bottom right, #7dd3fc22, transparent 55%),
      linear-gradient(125deg, #f9fafb, #ffffff, #e5e7eb);
    border-color: rgba(209,213,219,1);
    color: #020617;
  }

  /* Hero search input */
  :root[data-theme="light"] .hero-search-input {
    background: #ffffff;
    color: #020617;
    border-color: rgba(148,163,184,0.55);
  }

  :root[data-theme="light"] .hero-search-input::placeholder {
    color: #9ca3af;
  }

  /* Article cards on home/search pages */
  :root[data-theme="light"] .article-card {
    background: radial-gradient(circle at top left, #ffffff, #f9fafb);
    border-color: rgba(209,213,219,1);
    box-shadow: 0 18px 40px rgba(15,23,42,0.08);
  }

  :root[data-theme="light"] .article-card-meta {
    color: #6b7280;
  }

  /* Article body text */
  :root[data-theme="light"] .article-body-content {
    color: #111827;
  }

  /* Aside cards on article page */
  :root[data-theme="light"] .article-aside-card {
    background:
      radial-gradient(circle at 0 0, #bbf7d822, transparent 60%),
      #ffffff;
    border-color: rgba(209,213,219,1);
    color: #111827;
  }

  /* Affiliate aside card keeps a subtle accent */
  :root[data-theme="light"] .article-aside-card--affiliate {
    background:
      radial-gradient(circle at 0 0, #bbf7d822, transparent 60%),
      radial-gradient(circle at 100% 0, #7dd3fc22, transparent 60%),
      #ffffff;
    border-color: rgba(74,222,128,0.7);
  }

  /* Footer */
  :root[data-theme="light"] .site-footer {
    border-top-color: rgba(209,213,219,1);
    color: #6b7280;
  }
  :root[data-theme="light"] .footer-link {
    color: #4b5563;
  }

  /* THEME TOGGLE SWITCH
   ---------------------------------------------------------------- */
  .theme-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.17rem 0.45rem;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.4);
    background: radial-gradient(circle at top left, #020617 0, #020617 60%, #020617 100%);
    cursor: pointer;
    min-width: 64px;
    height: 30px;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(15,23,42,0.5);
    outline: none;
  }

  :root[data-theme="light"] .theme-toggle {
    background: linear-gradient(135deg, #f9fafb, #e5e7eb);
    border-color: rgba(209,213,219,1);
    box-shadow: 0 10px 25px rgba(15,23,42,0.12);
  }

  /* Base: hide both icons by default */
  .theme-toggle-icon {
    font-size: 0.9rem;
    z-index: 2;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  /* DARK theme: show only moon */
  :root[data-theme="dark"] .theme-toggle-icon-sun {
    opacity: 0;
    transform: scale(0.7);
  }

  :root[data-theme="dark"] .theme-toggle-icon-moon {
    opacity: 1;
    transform: scale(1);
  }

  /* LIGHT theme: show only sun */
  :root[data-theme="light"] .theme-toggle-icon-sun {
    opacity: 1;
    transform: scale(1);
  }

  :root[data-theme="light"] .theme-toggle-icon-moon {
    opacity: 0;
    transform: scale(0.7);
  }


  /* Thumb */
  .theme-toggle-thumb {
    position: absolute;
    inset: 3px;
    width: 22px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 30%, #e5e7eb, #cbd5f5);
    box-shadow: 0 8px 20px rgba(15,23,42,0.65);
    transform: translateX(0);
    transition: transform 0.22s ease-out, background 0.22s ease-out, box-shadow 0.22s ease-out;
  }

  /* Move thumb right in light mode */
  :root[data-theme="light"] .theme-toggle-thumb {
    transform: translateX(28px);
    background: radial-gradient(circle at 30% 30%, #fefce8, #fbbf24);
    box-shadow: 0 10px 30px rgba(245,158,11,0.65);
  }


}
