1- /* Import tw-animate-css for animations - must be first */
1+ /* Tailwind v4 — must come first to establish its layers */
2+ @import "tailwindcss" ;
3+
4+ /* Animations (tw-animate-css is already v4-compatible) */
25@import "tw-animate-css" ;
36
4- /* Import all theme files - must come before other CSS rules */
7+ /* Theme files (plain CSS overrides) */
58@import "./themes/purple.css" ;
69@import "./themes/orange.css" ;
710@import "./themes/pink.css" ;
1720@import "./themes/velvet.css" ;
1821@import "./themes/sun.css" ;
1922
20- @tailwind base;
21- @tailwind components;
22- @tailwind utilities;
23+ /* Load the existing JS theme config (colors / fonts / shadows / maxWidth …)
24+ in v4 compatibility mode. */
25+ @config "../../tailwind.config.mjs" ;
26+
27+ /* Class-based dark mode — v4 does NOT honor the JS config's darkMode key,
28+ so the `.dark` variant must be declared here. */
29+ @custom-variant dark (& : where (.dark , .dark * ));
2330
2431: root {
2532 color-scheme : light;
@@ -152,18 +159,23 @@ body {
152159 animation : slideInLeft 0.6s ease-out forwards;
153160}
154161
155- /* Simplified gradient classes for sections */
162+ /* Section gradients as plain CSS (no dependency on Tailwind's gradient
163+ internals, which changed in v4). Theme files override these per-theme. */
156164.gradient-hero {
157- @apply bg-gradient-to-br from-theme-primary;
158- --tw-gradient-to : var (--theme-accent ) var (--tw-gradient-to-position );
159- --tw-gradient-stops : var (--tw-gradient-from ),
160- var (--theme-secondary ) var (--tw-gradient-via-position ),
161- var (--theme-accent ) var (--tw-gradient-to-position );
165+ background-image : linear-gradient (
166+ to bottom right,
167+ var (--theme-primary ),
168+ var (--theme-secondary ),
169+ var (--theme-accent )
170+ );
162171}
163172
164173.gradient-header {
165- @apply bg-gradient-to-r from-theme-primary;
166- --tw-gradient-to : var (--theme-secondary ) var (--tw-gradient-to-position );
174+ background-image : linear-gradient (
175+ to right,
176+ var (--theme-primary ),
177+ var (--theme-secondary )
178+ );
167179}
168180
169181/* Simplified gradient classes with opacity for stats cards */
@@ -201,11 +213,19 @@ body {
201213
202214/* Text utilities */
203215a {
204- @apply transition-colors duration-200 text-theme-primary hover:text-theme-secondary underline underline-offset-2;
216+ @apply transition-colors duration-200 underline underline-offset-2;
217+ color : var (--theme-primary );
218+ }
219+ a : hover {
220+ color : var (--theme-secondary );
205221}
206222
207223.prose a {
208- @apply text-theme-primary hover:text-theme-secondary font-medium;
224+ @apply font-medium;
225+ color : var (--theme-primary );
226+ }
227+ .prose a : hover {
228+ color : var (--theme-secondary );
209229}
210230
211231/* Code highlighting */
@@ -266,7 +286,9 @@ ol ul {
266286}
267287
268288/* Gradient text for headers - use CSS variables for theme support */
269- .gradient-text {
289+ .gradient-text ,
290+ h2 ,
291+ h3 {
270292 background : linear-gradient (
271293 to right,
272294 var (--theme-primary ),
@@ -281,11 +303,11 @@ ol ul {
281303
282304/* Gradient text for hero (brighter, contrasts with gradient bg) */
283305.gradient-text-hero {
284- @apply bg-gradient -to-r from-white via-gray-100 to-white bg-clip-text text-transparent;
306+ @apply bg-linear -to-r from-white via-gray-100 to-white bg-clip-text text-transparent;
285307}
286308
287309.dark .gradient-text-hero {
288- @apply bg-gradient -to-r from-gray-300 via-gray-200 to-gray-300 bg-clip-text text-transparent;
310+ @apply bg-linear -to-r from-gray-300 via-gray-200 to-gray-300 bg-clip-text text-transparent;
289311}
290312
291313/* Theme-aware border colors */
@@ -335,13 +357,7 @@ ol ul {
335357 --tw-gradient-stops : var (--tw-gradient-from ), var (--tw-gradient-to );
336358}
337359
338- h2 {
339- @apply gradient-text;
340- }
341-
342- h3 {
343- @apply gradient-text;
344- }
360+ /* (h2/h3 gradient text is applied via the .gradient-text selector above) */
345361
346362/* Override gradient text for headers on gradient backgrounds */
347363h1 .text-white ,
@@ -458,7 +474,9 @@ h3.text-white {
458474}
459475
460476/* Headings large - 18 occurrences */
461- .heading-lg {
477+ .heading-lg ,
478+ section > div > h2 ,
479+ section > div > div > h2 {
462480 @apply text-3xl font-bold mb-4 text-gray-900 dark:text-white;
463481}
464482
@@ -506,11 +524,7 @@ h3.text-white {
506524 @apply w-6 h-6 text-white;
507525}
508526
509- /* Section heading styles using child combinators */
510- section > div > h2 ,
511- section > div > div > h2 {
512- @apply heading-lg;
513- }
527+ /* (section h2 sizing is applied via the .heading-lg selector above) */
514528
515529/* Centered section headings */
516530.section-header {
0 commit comments