/* ============================================================
   Dark mode for the Tailwind-utility pages
   (blog, contact, education, homepage, interactive-portfolio).

   These pages toggle `.dark` on <body> but have no dark styles
   of their own, and tokens.css lightens text under `.dark`. This
   file maps their Tailwind gray utilities onto the brand's
   dark-mode tokens. Every rule is scoped to `body.dark`, which
   beats a single Tailwind utility on specificity, so light mode
   is unchanged (except the footer contrast fix at the bottom).
   Load after tokens.css and styles.css.
   ============================================================ */

/* ---------- Surfaces ---------- */
body.dark,
body.dark .bg-gray-50 { background-color: var(--deep-navy); }
body.dark { color: var(--slate-200); }
body.dark .bg-white   { background-color: var(--slate-800); }
body.dark .bg-gray-100,
body.dark .bg-gray-200 { background-color: var(--slate-700); }
body.dark .bg-gray-300 { background-color: var(--slate-600); }
body.dark .hover\:bg-gray-200:hover,
body.dark .hover\:bg-gray-300:hover { background-color: var(--slate-600); }
body.dark .hover\:bg-blue-50:hover  { background-color: var(--slate-700); }
body.dark .bg-blue-50,
body.dark .bg-purple-50 { background-color: var(--slate-800); }
/* Text inside those boxes was dark-on-tint; lighten it to match.
   Scoped to the boxes so light pills (bg-*-100) keep dark text. */
body.dark .bg-blue-50 .text-blue-800     { color: var(--tint-blue-dark); }
body.dark .bg-purple-50 .text-purple-800 { color: var(--tint-purple); }

/* ---------- Text ---------- */
body.dark .text-gray-900 { color: var(--slate-50); }
body.dark .text-gray-800 { color: var(--slate-100); }
body.dark .text-gray-700 { color: var(--slate-300); }
body.dark .text-gray-600,
body.dark .text-gray-500,
body.dark .text-gray-400 { color: var(--slate-400); }

/* Brand blue on navy is under 4.5:1 for small text, so links and
   accents use the approved dark-surface tint (tokens.css). */
body.dark .text-blue-600,
body.dark .hover\:text-blue-600:hover { color: var(--tint-blue-dark); }
body.dark .hover\:text-blue-800:hover { color: var(--slate-50); }
body.dark .text-green-600,
body.dark .text-green-700  { color: var(--viz-green-light); }
body.dark .text-purple-600 { color: var(--tint-purple); }

/* ---------- Borders ---------- */
body.dark .border-gray-200,
body.dark .border-gray-300 { border-color: var(--slate-700); }
body.dark .border-gray-800 { border-color: var(--slate-800); }

/* ---------- Forms (contact) ---------- */
body.dark input,
body.dark textarea,
body.dark select {
  background-color: var(--slate-800);
  color: var(--slate-100);
  border-color: var(--slate-600);
}
body.dark input::placeholder,
body.dark textarea::placeholder { color: var(--slate-400); }

/* ---------- Footer contrast (light AND dark) ----------
   The footer has no background of its own, so its text-gray-400
   copy sat at 2.4:1 on the light page. Slate 500 is the brand's
   caption color (4.6:1 on Paper White); in dark mode the rule
   above swaps it to Slate 400 (6.9:1 on Deep Navy). */
footer .text-gray-400 { color: var(--slate-500); }
body.dark footer .text-gray-400 { color: var(--slate-400); }
