diff --git a/.gitignore b/.gitignore index 5ef6a52..6de9991 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,8 @@ # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - +.cursor/ +ai-notes/ +docs/ +specs/ # dependencies /node_modules /.pnp diff --git a/app/blog/deepseek-sparse-attention/page.tsx b/app/blog/deepseek-sparse-attention/page.tsx index eaf9f49..bdb289b 100644 --- a/app/blog/deepseek-sparse-attention/page.tsx +++ b/app/blog/deepseek-sparse-attention/page.tsx @@ -129,40 +129,29 @@ export default function DeepSeekProject() { return ( <> - {/* Hero Section */} -
- {/* Background effects */} -
-
-
-
- - {/* Animated background particles */} -
-
-
-
-
-
+ {/* Hero Section - Reduced */} +
+ {/* Simplified background - single subtle gradient */} +
-
-
+
+
-

- +

+ {heroData?.title || 'DeepSeek\'s Attention Revolution'}

-
+
{heroData?.subtitle || '⚡ From O(L²) to O(Lk) - The Lightning Indexer Breakthrough'}
{/* Tags */} {heroData?.tags && heroData.tags.length > 0 && ( -
+
{heroData.tags.map((tag, index) => ( - {index > 0 && } + {index > 0 && } {tag.includes('⏱️') && ( @@ -180,13 +169,6 @@ export default function DeepSeekProject() { ))}
)} - - {/* Glow effect for the title */} -
- - {heroData?.title || 'DeepSeek\'s Attention Revolution'} - -

diff --git a/app/blog/diffusion-transformer-representation-autoencoder/page.tsx b/app/blog/diffusion-transformer-representation-autoencoder/page.tsx index 624d9a4..4a0bf69 100644 --- a/app/blog/diffusion-transformer-representation-autoencoder/page.tsx +++ b/app/blog/diffusion-transformer-representation-autoencoder/page.tsx @@ -129,40 +129,29 @@ export default function DiffusionTransformerRAEProject() { return ( <> - {/* Hero Section */} -
- {/* Background effects */} -
-
-
-
- - {/* Animated background particles */} -
-
-
-
-
-
+ {/* Hero Section - Reduced */} +
+ {/* Simplified background - single subtle gradient */} +
-
-
+
+
-

- +

+ {heroData?.title || '47x Faster Image & Video Generation Training'}

-
+
{heroData?.subtitle || 'Diffusion Transformers with Representation Autoencoders'}
{/* Tags */} {heroData?.tags && heroData.tags.length > 0 && ( -
+
{heroData.tags.map((tag, index) => ( - {index > 0 && } + {index > 0 && } {tag.includes('⏱️') && ( @@ -182,7 +171,7 @@ export default function DiffusionTransformerRAEProject() { )} {/* Links to Paper and GitHub */} -
diff --git a/app/blog/lejepa/page.tsx b/app/blog/lejepa/page.tsx index 6301719..cd2c9e9 100644 --- a/app/blog/lejepa/page.tsx +++ b/app/blog/lejepa/page.tsx @@ -129,40 +129,29 @@ export default function LeJEPAProject() { return ( <> - {/* Hero Section */} -
- {/* Background effects */} -
-
-
-
- - {/* Animated background particles */} -
-
-
-
-
-
+ {/* Hero Section - Reduced */} +
+ {/* Simplified background - single subtle gradient */} +
-
-
+
+
-

- +

+ {heroData?.title || 'LeJEPA: Provable and Scalable'}

-
+
{heroData?.subtitle || 'Self-Supervised Learning Without the Heuristics'}
{/* Tags */} {heroData?.tags && heroData.tags.length > 0 && ( -
+
{heroData.tags.map((tag, index) => ( - {index > 0 && } + {index > 0 && } {/* Simple icon logic based on keywords */} {(tag.includes('Theory') || tag.includes('Stats')) && ( @@ -181,13 +170,6 @@ export default function LeJEPAProject() { ))}
)} - - {/* Glow effect for the title */} -
- - {heroData?.title || 'LeJEPA: Provable and Scalable'} - -

diff --git a/app/blog/path-to-open-superintelligence/page.tsx b/app/blog/path-to-open-superintelligence/page.tsx index e9952c8..178b959 100644 --- a/app/blog/path-to-open-superintelligence/page.tsx +++ b/app/blog/path-to-open-superintelligence/page.tsx @@ -129,40 +129,29 @@ export default function RoadmapToOpenSuperintelligence() { return ( <> - {/* Hero Section */} -
- {/* Background effects */} -
-
-
-
- - {/* Animated background particles */} -
-
-
-
-
-
+ {/* Hero Section - Reduced */} +
+ {/* Simplified background - single subtle gradient */} +
-
-
+
+
-

- +

+ {heroData?.title || 'Path To Open Superintelligence'}

-
+
{heroData?.subtitle || 'A Strategic Path Forward for Building AGI Through Open Collaboration'}
{/* Tags */} {heroData?.tags && heroData.tags.length > 0 && ( -
+
{heroData.tags.map((tag, index) => ( - {index > 0 && } + {index > 0 && } {tag.includes('🚀') && ( @@ -185,13 +174,6 @@ export default function RoadmapToOpenSuperintelligence() { ))}
)} - - {/* Glow effect for the title */} -
- - {heroData?.title || 'Path To Open Superintelligence'} - -

diff --git a/app/blog/pretrain-llm-with-nvfp4/page.tsx b/app/blog/pretrain-llm-with-nvfp4/page.tsx index 9cb9e65..5237f40 100644 --- a/app/blog/pretrain-llm-with-nvfp4/page.tsx +++ b/app/blog/pretrain-llm-with-nvfp4/page.tsx @@ -129,40 +129,29 @@ export default function NVFP4Project() { return ( <> - {/* Hero Section */} -
- {/* Background effects */} -
-
-
-
- - {/* Animated background particles */} -
-
-
-
-
-
+ {/* Hero Section - Reduced */} +
+ {/* Simplified background - single subtle gradient */} +
-
-
+
+
-

- +

+ {heroData?.title || "NVIDIA's 4-Bit Revolution"}

-
+
{heroData?.subtitle || "⚡ NVFP4: 2-3x Faster Training, 50% Less Memory"}
{/* Tags */} {heroData?.tags && heroData.tags.length > 0 && ( -
+
{heroData.tags.map((tag, index) => ( - {index > 0 && } + {index > 0 && } {tag.includes('⏱️') && ( @@ -180,13 +169,6 @@ export default function NVFP4Project() { ))}
)} - - {/* Glow effect for the title */} -
- - {heroData?.title || "NVIDIA's 4-Bit Revolution"} - -

diff --git a/app/blog/qerl-quantization-reinforcement-learning/page.tsx b/app/blog/qerl-quantization-reinforcement-learning/page.tsx index a3507c9..c5a71ed 100644 --- a/app/blog/qerl-quantization-reinforcement-learning/page.tsx +++ b/app/blog/qerl-quantization-reinforcement-learning/page.tsx @@ -131,40 +131,29 @@ export default function QeRLProject() { return ( <> - {/* Hero Section */} -
- {/* Background effects */} -
-
-
-
- - {/* Animated background particles */} -
-
-
-
-
-
+ {/* Hero Section - Reduced */} +
+ {/* Simplified background - single subtle gradient */} +
-
-
+
+
-

- +

+ {heroData?.title || 'Train 32B LLM Reasoning On 1 GPU - H100 80GB - QeRL'}

-
+
{heroData?.subtitle || 'LLM Reinforcement Learning With 4Bit Quantization'}
{/* Tags */} {heroData?.tags && heroData.tags.length > 0 && ( -
+
{heroData.tags.map((tag, index) => ( - {index > 0 && } + {index > 0 && } {tag.includes('⏱️') && ( @@ -184,7 +173,7 @@ export default function QeRLProject() { )} {/* Links to Paper and GitHub */} -
diff --git a/app/blog/the-most-difficult-project-in-human-history/page.tsx b/app/blog/the-most-difficult-project-in-human-history/page.tsx index 195db67..6b6987f 100644 --- a/app/blog/the-most-difficult-project-in-human-history/page.tsx +++ b/app/blog/the-most-difficult-project-in-human-history/page.tsx @@ -129,40 +129,29 @@ export default function MostDifficultProject() { return ( <> - {/* Hero Section */} -
- {/* Background effects */} -
-
-
-
- - {/* Animated background particles */} -
-
-
-
-
-
+ {/* Hero Section - Reduced */} +
+ {/* Simplified background - single subtle gradient */} +
-
-
+
+
-

- +

+ {heroData?.title || 'The Most Difficult Project in Human History'}

-
+
{heroData?.subtitle || ''}
{/* Tags */} {heroData?.tags && heroData.tags.length > 0 && ( -
+
{heroData.tags.map((tag, index) => ( - {index > 0 && } + {index > 0 && } {tag.includes('🎯') && ( @@ -180,13 +169,6 @@ export default function MostDifficultProject() { ))}
)} - - {/* Glow effect for the title */} -
- - {heroData?.title || 'The Most Difficult Project in Human History'} - -

diff --git a/app/blog/tiny-recursive-model/page.tsx b/app/blog/tiny-recursive-model/page.tsx index ab592ed..d01ac66 100644 --- a/app/blog/tiny-recursive-model/page.tsx +++ b/app/blog/tiny-recursive-model/page.tsx @@ -129,40 +129,29 @@ export default function TinyRecursiveModelProject() { return ( <> - {/* Hero Section */} -
- {/* Background effects */} -
-
-
-
- - {/* Animated background particles */} -
-
-
-
-
-
+ {/* Hero Section - Reduced */} +
+ {/* Simplified background - single subtle gradient */} +
-
-
+
+
-

- +

+ {heroData?.title || 'Tiny Recursive Model'}

-
+
{heroData?.subtitle || 'Exploring recursive architectures for efficient AI models'}
{/* Tags */} {heroData?.tags && heroData.tags.length > 0 && ( -
+
{heroData.tags.map((tag, index) => ( - {index > 0 && } + {index > 0 && } {tag.includes('⏱️') && ( @@ -182,7 +171,7 @@ export default function TinyRecursiveModelProject() { )} {/* Links to Paper and GitHub */} -
diff --git a/app/globals.css b/app/globals.css index 0e28869..6e3f195 100644 --- a/app/globals.css +++ b/app/globals.css @@ -6,22 +6,22 @@ body { font-family: system-ui, sans-serif; } -/* Custom scrollbar for dark theme */ +/* Custom scrollbar */ ::-webkit-scrollbar { width: 8px; } ::-webkit-scrollbar-track { - background: #1e293b; + background: hsl(var(--scrollbar-track)); } ::-webkit-scrollbar-thumb { - background: #475569; + background: hsl(var(--scrollbar-thumb)); border-radius: 4px; } ::-webkit-scrollbar-thumb:hover { - background: #64748b; + background: hsl(var(--scrollbar-thumb-hover)); } /* Smooth transitions for all interactive elements */ @@ -78,57 +78,89 @@ body { @layer base { :root { - --background: 0 0% 100%; - --foreground: 0 0% 3.9%; - --card: 0 0% 100%; - --card-foreground: 0 0% 3.9%; - --popover: 0 0% 100%; - --popover-foreground: 0 0% 3.9%; - --primary: 0 0% 9%; - --primary-foreground: 0 0% 98%; - --secondary: 0 0% 96.1%; - --secondary-foreground: 0 0% 9%; - --muted: 0 0% 96.1%; - --muted-foreground: 0 0% 45.1%; - --accent: 0 0% 96.1%; - --accent-foreground: 0 0% 9%; - --destructive: 0 84.2% 60.2%; - --destructive-foreground: 0 0% 98%; - --border: 0 0% 89.8%; - --input: 0 0% 89.8%; - --ring: 0 0% 3.9%; + /* Base theme colors - dark theme as default */ + --background: 222 47% 11%; + --foreground: 210 40% 98%; + --card: 222 47% 11%; + --card-foreground: 210 40% 98%; + --popover: 222 47% 11%; + --popover-foreground: 210 40% 98%; + --primary: 210 40% 98%; + --primary-foreground: 222 47% 11%; + --secondary: 217 32% 17%; + --secondary-foreground: 210 40% 98%; + --muted: 217 32% 17%; + --muted-foreground: 215 20% 65%; + --accent: 217 32% 17%; + --accent-foreground: 210 40% 98%; + --destructive: 0 84% 60%; + --destructive-foreground: 210 40% 98%; + --border: 217 32% 17%; + --input: 217 32% 17%; + --ring: 217 91% 60%; --chart-1: 12 76% 61%; --chart-2: 173 58% 39%; --chart-3: 197 37% 24%; --chart-4: 43 74% 66%; --chart-5: 27 87% 67%; --radius: 0.5rem; - } - .dark { - --background: 0 0% 3.9%; - --foreground: 0 0% 98%; - --card: 0 0% 3.9%; - --card-foreground: 0 0% 98%; - --popover: 0 0% 3.9%; - --popover-foreground: 0 0% 98%; - --primary: 0 0% 98%; - --primary-foreground: 0 0% 9%; - --secondary: 0 0% 14.9%; - --secondary-foreground: 0 0% 98%; - --muted: 0 0% 14.9%; - --muted-foreground: 0 0% 63.9%; - --accent: 0 0% 14.9%; - --accent-foreground: 0 0% 98%; - --destructive: 0 62.8% 30.6%; - --destructive-foreground: 0 0% 98%; - --border: 0 0% 14.9%; - --input: 0 0% 14.9%; - --ring: 0 0% 83.1%; - --chart-1: 220 70% 50%; - --chart-2: 160 60% 45%; - --chart-3: 30 80% 55%; - --chart-4: 280 65% 60%; - --chart-5: 340 75% 55%; + /* Scrollbar colors */ + --scrollbar-track: 222 47% 11%; + --scrollbar-thumb: 217 32% 28%; + --scrollbar-thumb-hover: 215 20% 50%; + /* Math styling colors */ + --math-primary: 213 94% 68%; + --math-secondary: 270 91% 65%; + --math-accent: 160 84% 39%; + --math-text: 45 93% 47%; + --math-relation: 330 81% 60%; + --math-bracket: 215 16% 47%; + /* Syntax highlighting colors */ + --syntax-bg: 222 47% 11%; + --syntax-text: 213 27% 84%; + --syntax-keyword: 270 91% 65%; + --syntax-string: 160 84% 39%; + --syntax-comment: 215 16% 47%; + --syntax-number: 45 93% 47%; + --syntax-function: 213 94% 68%; + --syntax-variable: 330 81% 60%; + /* Gradient colors */ + --gradient-start: 222 47% 11%; + --gradient-mid: 222 47% 17%; + --gradient-end: 222 47% 11%; + --gradient-accent-1: 217 91% 60%; + --gradient-accent-2: 270 91% 65%; + --gradient-accent-3: 187 85% 53%; + /* Project-specific colors */ + --indigo-900: 251 84% 27%; + --indigo-600: 239 84% 67%; + --indigo-500: 239 84% 67%; + --indigo-400: 239 84% 77%; + --indigo-300: 239 84% 85%; + --green-900: 142 76% 16%; + --green-600: 142 71% 45%; + --green-500: 142 71% 45%; + --green-400: 142 71% 55%; + --green-300: 142 71% 75%; + --emerald-900: 160 84% 16%; + --emerald-600: 160 84% 39%; + --emerald-500: 160 84% 39%; + --emerald-400: 160 84% 54%; + --emerald-300: 160 84% 71%; + --amber-600: 38 92% 50%; + --amber-500: 38 92% 50%; + --amber-400: 38 92% 60%; + --amber-300: 38 92% 75%; + --orange-600: 25 95% 53%; + --orange-500: 25 95% 53%; + --orange-400: 25 95% 63%; + --violet-900: 262 83% 33%; + --violet-600: 262 83% 58%; + --violet-500: 262 83% 58%; + --violet-400: 262 83% 73%; + --pink-600: 330 81% 60%; + --pink-500: 330 81% 60%; + --pink-400: 330 81% 70%; } } @@ -249,14 +281,14 @@ body { .chatbot-markdown .hljs-comment, .chatbot-markdown .hljs-quote { - color: #6a737d; + color: hsl(var(--syntax-comment)); font-style: italic; } .chatbot-markdown .hljs-keyword, .chatbot-markdown .hljs-selector-tag, .chatbot-markdown .hljs-subst { - color: #d73a49; + color: hsl(var(--syntax-keyword)); font-weight: bold; } @@ -265,59 +297,59 @@ body { .chatbot-markdown .hljs-variable, .chatbot-markdown .hljs-template-variable, .chatbot-markdown .hljs-tag .hljs-attr { - color: #005cc5; + color: hsl(var(--syntax-function)); } .chatbot-markdown .hljs-string, .chatbot-markdown .hljs-doctag { - color: #032f62; + color: hsl(var(--syntax-string)); } .chatbot-markdown .hljs-title, .chatbot-markdown .hljs-section, .chatbot-markdown .hljs-selector-id { - color: #6f42c1; + color: hsl(var(--syntax-keyword)); font-weight: bold; } .chatbot-markdown .hljs-type, .chatbot-markdown .hljs-class .hljs-title { - color: #d73a49; + color: hsl(var(--syntax-variable)); font-weight: bold; } .chatbot-markdown .hljs-tag, .chatbot-markdown .hljs-name, .chatbot-markdown .hljs-attribute { - color: #22863a; + color: hsl(var(--syntax-string)); font-weight: normal; } .chatbot-markdown .hljs-regexp, .chatbot-markdown .hljs-link { - color: #032f62; + color: hsl(var(--syntax-string)); } .chatbot-markdown .hljs-symbol, .chatbot-markdown .hljs-bullet { - color: #e36209; + color: hsl(var(--syntax-number)); } .chatbot-markdown .hljs-built_in, .chatbot-markdown .hljs-builtin-name { - color: #005cc5; + color: hsl(var(--syntax-function)); } .chatbot-markdown .hljs-meta { - color: #6a737d; + color: hsl(var(--syntax-comment)); } .chatbot-markdown .hljs-deletion { - background: #ffeef0; + background: hsl(var(--destructive) / 0.1); } .chatbot-markdown .hljs-addition { - background: #f0fff4; + background: hsl(var(--math-accent) / 0.1); } .chatbot-markdown .hljs-emphasis { diff --git a/app/layout.tsx b/app/layout.tsx index 9ee9fff..354f933 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -4,6 +4,8 @@ import "./globals.css"; import "highlight.js/styles/github-dark.css"; import { Navigation } from "@/components/navigation"; import { Footer } from "@/components/footer"; +import { PaletteProvider } from "@/components/palette-provider"; +import { PaletteSwitcher } from "@/components/palette-switcher"; const geistSans = Geist({ variable: "--font-geist-sans", @@ -26,16 +28,18 @@ export default function RootLayout({ children: React.ReactNode; }>) { return ( - + -
+ +
{children}
+
diff --git a/app/learn/page.tsx b/app/learn/page.tsx index 13fe725..dd8f637 100644 --- a/app/learn/page.tsx +++ b/app/learn/page.tsx @@ -4,19 +4,19 @@ import Link from "next/link"; export default function LearnPage() { return ( -
+
{/* Hero Section */}
-
+

- + Learn Everything You Need To Be An AI Researcher

-

+

Master the fundamentals and publish your own papers

@@ -34,18 +34,18 @@ export default function LearnPage() {
{/* Math Module */} -
+
-
- +
+
-

+

Mathematics Fundamentals

-

+

Essential math concepts for AI

@@ -54,85 +54,85 @@ export default function LearnPage() {
-

+

1.Functions

- +
-

+

Linear, quadratic, and activation functions

-

+

2.Derivatives

- +
-

+

Understanding rates of change and gradients

-

+

3.Vectors

-

+

Understanding magnitude, direction, and vector operations

-

+

4.Matrices

-

+

Matrix operations and transformations

-

+

5.Gradients

-

+

Partial derivatives and gradient descent

@@ -143,15 +143,15 @@ export default function LearnPage() {
- +
-

+

PyTorch Fundamentals

-

+

Working with tensors and PyTorch basics

@@ -160,136 +160,136 @@ export default function LearnPage() {
-

+

1.Creating Tensors

-

+

Building blocks of deep learning

-

+

2.Tensor Addition

-

+

Element-wise operations on tensors

-

+

3.Matrix Multiplication

-

+

The core operation in neural networks

-

+

4.Transposing Tensors

-

+

Flipping dimensions and axes

-

+

5.Reshaping Tensors

- +
-

+

Changing tensor dimensions

-

+

6.Indexing and Slicing

-

+

Accessing and extracting tensor elements

-

+

7.Concatenating Tensors

-

+

Combining multiple tensors

-

+

8.Creating Special Tensors

-

+

Zeros, ones, identity matrices and more

@@ -300,15 +300,15 @@ export default function LearnPage() {
- +
-

+

Neuron From Scratch

-

+

Understanding the fundamental unit of neural networks

@@ -317,119 +317,119 @@ export default function LearnPage() {
-

+

1.What is a Neuron

-

+

The basic building block of neural networks

-

+

2.The Linear Step

-

+

Weighted sums and bias in neurons

-

+

3.The Activation Function

-

+

Introducing non-linearity to neurons

-

+

4.Building a Neuron in Python

-

+

Implementing a single neuron from scratch

-

+

5.Making a Prediction

-

+

How a neuron processes input to output

-

+

6.The Concept of Loss

-

+

Measuring prediction error

-

+

7.The Concept of Learning

-

+

How neurons adjust their parameters

@@ -440,15 +440,15 @@ export default function LearnPage() {
- +
-

+

Activation Functions

-

+

Understanding different activation functions

@@ -457,102 +457,102 @@ export default function LearnPage() {
-

+

1.ReLU

-

+

Rectified Linear Unit - The most popular activation function

-

+

2.Sigmoid

- +
-

+

The classic S-shaped activation function

-

+

3.Tanh

-

+

Hyperbolic tangent - Zero-centered activation

-

+

4.SiLU

- +
-

+

Sigmoid Linear Unit - The Swish activation

-

+

5.SwiGLU

- +
-

+

Swish-Gated Linear Unit - Advanced activation

-

+

6.Softmax

-

+

Multi-class classification activation function

@@ -563,15 +563,15 @@ export default function LearnPage() {
- +
-

+

Neural Networks from Scratch

-

+

Build neural networks from the ground up

@@ -580,119 +580,119 @@ export default function LearnPage() {
-

+

1.Architecture of a Network

- +
-

+

Understanding neural network structure and design

-

+

2.Building a Layer

-

+

Constructing individual network layers

-

+

3.Implementing a Network

-

+

Putting together a complete neural network

-

+

4.The Chain Rule

-

+

Mathematical foundation of backpropagation

-

+

5.Calculating Gradients

- +
-

+

Computing derivatives for network training

-

+

6.Backpropagation in Action

- +
-

+

Understanding the backpropagation algorithm

-

+

7.Implementing Backpropagation

-

+

Coding the backpropagation algorithm from scratch

@@ -703,16 +703,16 @@ export default function LearnPage() {
- +
-

+

Attention Mechanism

-

+

Understanding attention and self-attention

@@ -721,102 +721,102 @@ export default function LearnPage() {
-

+

1.What is Attention

-

+

Understanding the attention mechanism

-

+

2.Self Attention from Scratch

-

+

Building self-attention from the ground up

-

+

3.Calculating Attention Scores

-

+

Computing query-key-value similarities

-

+

4.Applying Attention Weights

-

+

Using attention scores to weight values

-

+

5.Multi Head Attention

- +
-

+

Parallel attention mechanisms

-

+

6.Attention in Code

-

+

Implementing attention mechanisms in Python

@@ -827,15 +827,15 @@ export default function LearnPage() {
- +
-

+

Transformer Feedforward

-

+

Feedforward networks and Mixture of Experts

@@ -844,136 +844,136 @@ export default function LearnPage() {
-

+

1.The Feedforward Layer

- +
-

+

Understanding transformer feedforward networks

-

+

2.What is Mixture of Experts

-

+

Introduction to MoE architecture

-

+

3.The Expert

- +
-

+

Understanding individual expert networks

-

+

4.The Gate

-

+

Routing and gating mechanisms in MoE

-

+

5.Combining Experts

-

+

Merging multiple expert outputs

-

+

6.MoE in a Transformer

-

+

Integrating mixture of experts in transformers

-

+

7.MoE in Code

-

+

Implementing mixture of experts in Python

-

+

8.The DeepSeek MLP

-

+

DeepSeek's advanced MLP architecture

@@ -984,15 +984,15 @@ export default function LearnPage() {
- +
-

+

Building a Transformer

-

+

Complete transformer implementation from scratch

@@ -1001,102 +1001,102 @@ export default function LearnPage() {
-

+

1.Transformer Architecture

-

+

Understanding the complete transformer structure

-

+

2.RoPE Positional Encoding

-

+

Rotary position embeddings for transformers

-

+

3.Building a Transformer Block

-

+

Constructing individual transformer layers

-

+

4.The Final Linear Layer

-

+

Output projection and prediction head

-

+

5.Full Transformer in Code

-

+

Complete transformer implementation

-

+

6.Training a Transformer

-

+

Training process and optimization

@@ -1107,15 +1107,15 @@ export default function LearnPage() {
- +
-

+

Large Language Models

-

+

Understanding LLM training and optimization

@@ -1124,17 +1124,17 @@ export default function LearnPage() {
-

+

1.Batch Size vs Sequence Length

-

+

Understanding the trade-offs between batch size and sequence length

diff --git a/app/page.tsx b/app/page.tsx index 47ab88f..8456a79 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -1,24 +1,52 @@ 'use client'; import Link from "next/link"; +import { useEffect, useState } from "react"; +import VaporwaveGrid from "@/components/vaporwave-grid"; export default function Home() { + const [isLightTheme, setIsLightTheme] = useState(false); + + useEffect(() => { + const checkTheme = () => { + const bgColor = getComputedStyle(document.documentElement) + .getPropertyValue('--background') + .trim(); + + if (bgColor) { + // Parse HSL: "H S% L%" + const parts = bgColor.split(/\s+/); + const lightness = parseFloat(parts[2]?.replace('%', '') || '0'); + setIsLightTheme(lightness > 50); + } + }; + + checkTheme(); + // Check on palette changes + const observer = new MutationObserver(checkTheme); + observer.observe(document.documentElement, { + attributes: true, + attributeFilter: ['style', 'class'], + }); + + return () => observer.disconnect(); + }, []); + + // Theme-aware shadow styles + const titleShadow = isLightTheme + ? 'drop-shadow(0 1px 3px rgba(0, 0, 0, 0.15)) drop-shadow(0 0 1px rgba(0, 0, 0, 0.2))' + : 'drop-shadow(0 2px 8px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 2px rgba(0, 0, 0, 0.9)) drop-shadow(0 -1px 0 rgba(255, 255, 255, 0.1))'; + + const subtitleShadow = isLightTheme + ? '0 1px 3px rgba(0, 0, 0, 0.15), 0 0 1px rgba(0, 0, 0, 0.2)' + : '0 2px 8px rgba(0, 0, 0, 0.8), 0 0 2px rgba(0, 0, 0, 0.9), 0 1px 0 rgba(255, 255, 255, 0.1)'; + return ( <> {/* Hero Section */} -
- {/* Animated mesh gradient background */} -
- - {/* Animated gradient mesh overlay */} -
-
-
-
-
- - {/* Grid pattern overlay */} -
+
+ {/* Vaporwave Grid Animation */} + {/* Floating geometric shapes - Removed for cleaner look */} {/*
@@ -28,56 +56,38 @@ export default function Home() {
*/} -
+
{/* Main Heading with modern gradient */} -
-

- +
+

+ Open Superintelligence Lab

- {/* Subtitle with typing effect styling */} -

+ {/* Subtitle with embossed text shadow for readability */} +

Do AI research with top tier AI researchers

- {/* Description */} - {/*

- Building AGI through open collaboration. Join researchers, engineers, and visionaries advancing AI research and development. -

*/} - - {/* Feature Tags */} - {/*
- {[ - { icon: '🌐', text: 'Open Source', color: 'blue' }, - { icon: '🧠', text: 'LLM Research', color: 'purple' }, - { icon: '⚡', text: 'Innovation', color: 'cyan' }, - { icon: '🤝', text: 'Collaboration', color: 'pink' }, - ].map((tag, i) => ( -
-
- {tag.icon} - - {tag.text} - -
-
- ))} -
*/} - - {/* CTA Buttons */} -
+ {/* CTA Buttons - properly centered with gap between them */} +
- {/* Scroll indicator */} -
- + {/* Scroll indicator - below buttons */} +
+
@@ -110,17 +120,17 @@ export default function Home() {

{/* Main Projects Section */} -
- {/* Background effects */} -
+
+ {/* Background effects - theme aware */} +
{/* Section Header */}
-

+

Research Projects

-

+

Explore our cutting-edge AI research initiatives pushing the boundaries of what's possible

@@ -130,7 +140,7 @@ export default function Home() { {/* Path to Open Superintelligence - Featured */} {/* Animated gradient border glow */}
@@ -143,7 +153,7 @@ export default function Home() { Strategic Vision - + Featured
@@ -152,12 +162,12 @@ export default function Home() { Path To Open Superintelligence

-

+

A strategic roadmap for building AGI through open collaboration, addressing key challenges and defining our path forward to create transformative AI systems that benefit all of humanity.

-
+
@@ -176,7 +186,7 @@ export default function Home() { {/* DeepSeek Sparse Attention Project */}
@@ -191,12 +201,12 @@ export default function Home() { DeepSeek Sparse Attention - DeepSeek-V3.2-Exp

-

+

Advanced research on DeepSeek's innovative sparse attention mechanisms for efficient long-context processing and memory optimization

-
+
@@ -212,7 +222,7 @@ export default function Home() { {/* Tiny Recursive Model Project */}
@@ -227,12 +237,12 @@ export default function Home() { Tiny Recursive Model

-

+

How a 7M parameter model beats 100x bigger models at Sudoku, Mazes, and ARC-AGI using recursive reasoning with a 2-layer transformer

-
+
@@ -248,7 +258,7 @@ export default function Home() { {/* Pretrain LLM with NVFP4 Project */}
@@ -263,12 +273,12 @@ export default function Home() { Pretrain LLM with NVFP4 -

+

NVIDIA's breakthrough 4-bit training methodology achieving 2-3x speedup and 50% memory reduction without sacrificing model quality

-
+
@@ -284,7 +294,7 @@ export default function Home() { {/* Diffusion Transformer RAE Project */}
@@ -299,12 +309,12 @@ export default function Home() { 47x Faster Image Generation Training -

+

Diffusion Transformers with Representation Autoencoders achieve state-of-the-art FID 1.13 on ImageNet while training 47x faster (80 vs 1400 epochs)

-
+
@@ -320,7 +330,7 @@ export default function Home() { {/* QeRL Project */}
@@ -335,12 +345,12 @@ export default function Home() { QeRL: Beyond Efficiency -

+

Quantization-enhanced Reinforcement Learning for LLMs achieves 1.5x speedup and enables RL training of 32B models on a single H100 80GB GPU

-
+
diff --git a/components/course-navigation.tsx b/components/course-navigation.tsx index 0b737a6..3425a0b 100644 --- a/components/course-navigation.tsx +++ b/components/course-navigation.tsx @@ -40,10 +40,10 @@ export function CourseNavigation() { const NavigationContent = () => ( <>
-

+

Course Contents

-

+

Navigate through the lessons

@@ -52,10 +52,10 @@ export function CourseNavigation() { {modules.map((module, moduleIndex) => (
-
+
{module.icon}
-

+

{module.title}

@@ -73,8 +73,8 @@ export function CourseNavigation() { className={` block px-3 py-2 rounded-lg text-sm transition-all duration-200 ${isActive - ? 'bg-blue-600/20 text-blue-400 font-medium border-l-2 border-blue-400' - : 'text-slate-400 hover:text-slate-200 hover:bg-white/5' + ? 'bg-gradient-accent-1/20 text-gradient-accent-1 font-medium border-l-2 border-gradient-accent-1' + : 'text-muted-foreground hover:text-foreground hover:bg-card/50' } `} > @@ -89,10 +89,10 @@ export function CourseNavigation() { ))} -
+
@@ -108,10 +108,10 @@ export function CourseNavigation() { {/* Mobile Toggle Button */} @@ -127,14 +127,14 @@ export function CourseNavigation() { {/* Mobile Sidebar */}
+ + {/* Dropdown Menu */} + {isMenuOpen && ( + <> + {/* Overlay */} +
setIsMenuOpen(false)} + /> + {/* Menu */} +
e.stopPropagation()} + > +
+ {/* Home */} + setIsMenuOpen(false)} + className="group relative flex items-center gap-3 px-4 py-3 text-sm font-medium text-foreground/80 hover:text-foreground rounded-md transition-all duration-200 hover:bg-gradient-to-r hover:from-gradient-accent-1/10 hover:via-gradient-accent-2/10 hover:to-gradient-accent-3/10" + > + + + + Home + + + {/* Learn */} + setIsMenuOpen(false)} + className="group relative flex items-center gap-3 px-4 py-3 text-sm font-medium text-foreground/80 hover:text-foreground rounded-md transition-all duration-200 hover:bg-gradient-to-r hover:from-gradient-accent-1/10 hover:via-gradient-accent-2/10 hover:to-gradient-accent-3/10" + > + + + + Learn + + + {/* Divider */} +
+ + {/* Discord */} +
setIsMenuOpen(false)} + className="group relative flex items-center gap-3 px-4 py-3 text-sm font-medium text-foreground/80 hover:text-foreground rounded-md transition-all duration-200 hover:bg-gradient-to-r hover:from-gradient-accent-1/10 hover:via-gradient-accent-2/10 hover:to-gradient-accent-3/10" + > + + + + Discord + + + + + + {/* YouTube */} + setIsMenuOpen(false)} + className="group relative flex items-center gap-3 px-4 py-3 text-sm font-medium text-foreground/80 hover:text-foreground rounded-md transition-all duration-200 hover:bg-destructive/10" + > + + + + YouTube + + + + +
+
+ + )}
); -} - +} \ No newline at end of file diff --git a/components/osl-logo.tsx b/components/osl-logo.tsx new file mode 100644 index 0000000..2d21277 --- /dev/null +++ b/components/osl-logo.tsx @@ -0,0 +1,43 @@ +'use client'; + +import Link from 'next/link'; +import { useState } from 'react'; + +export function OSLLogo() { + const [isHovering, setIsHovering] = useState(false); + + return ( + setIsHovering(true)} + onMouseLeave={() => setIsHovering(false)} + > + {/* Dynamic Background Glow */} +
+ + {/* The OSL Monogram */} +
+ + OSL + + + {/* Sleek animated accent line */} +
+
+ + ); +} diff --git a/components/palette-provider.tsx b/components/palette-provider.tsx new file mode 100644 index 0000000..31f1a63 --- /dev/null +++ b/components/palette-provider.tsx @@ -0,0 +1,17 @@ +'use client'; + +import { useEffect } from 'react'; +import { applyPalette } from '@/lib/palettes/loader'; + +const STORAGE_KEY = 'palette-preference'; + +export function PaletteProvider() { + useEffect(() => { + // Check for saved preference first, otherwise use default + const saved = localStorage.getItem(STORAGE_KEY); + const paletteName = saved || 'default'; + applyPalette(paletteName).catch(console.error); + }, []); + + return null; +} diff --git a/components/palette-switcher.tsx b/components/palette-switcher.tsx new file mode 100644 index 0000000..6b46db0 --- /dev/null +++ b/components/palette-switcher.tsx @@ -0,0 +1,121 @@ +'use client'; + +import { useState, useEffect } from 'react'; +import { applyPalette } from '@/lib/palettes/loader'; + +const AVAILABLE_PALETTES = [ + { name: 'default', label: 'Default (Dark)' }, + { name: 'ink-wash', label: 'Ink Wash (Light)' }, + { name: 'vaporwave', label: 'Vaporwave (Vibrant)' }, + { name: 'slatewave', label: 'Slatewave (Original)' }, + { name: 'emerald-odyssey', label: 'Emerald Odyssey' }, + { name: 'harvest-moon', label: 'Harvest Moon' }, + { name: 'deep-ocean', label: 'Deep Ocean (Dark)' }, + { name: 'amber-glow', label: 'Amber Glow (Dark)' }, + { name: 'terminal-green', label: 'Terminal Green (Dark)' }, +]; + +const STORAGE_KEY = 'palette-preference'; + +export function PaletteSwitcher() { + const [currentPalette, setCurrentPalette] = useState('default'); + const [isOpen, setIsOpen] = useState(false); + + useEffect(() => { + // Load saved preference or use default + const saved = localStorage.getItem(STORAGE_KEY); + if (saved && AVAILABLE_PALETTES.some(p => p.name === saved)) { + setCurrentPalette(saved); + applyPalette(saved).catch(console.error); + } + }, []); + + const handlePaletteChange = async (paletteName: string) => { + try { + await applyPalette(paletteName); + setCurrentPalette(paletteName); + localStorage.setItem(STORAGE_KEY, paletteName); + setIsOpen(false); + } catch (error) { + console.error('Failed to apply palette:', error); + } + }; + + return ( +
+
+ {/* Dropdown Menu */} + {isOpen && ( + <> +
setIsOpen(false)} + /> +
e.stopPropagation()} + > +
+ {AVAILABLE_PALETTES.map((palette) => ( + + ))} +
+
+ + )} + + {/* Toggle Button */} + +
+
+ ); +} diff --git a/components/vaporwave-grid.tsx b/components/vaporwave-grid.tsx new file mode 100644 index 0000000..e2bbf66 --- /dev/null +++ b/components/vaporwave-grid.tsx @@ -0,0 +1,391 @@ +'use client'; + +import React, { useRef, useEffect } from "react"; + +export default function VaporwaveGrid() { + const canvasRef = useRef(null); + + useEffect(() => { + const canvas = canvasRef.current; + if (!canvas) return; + const ctx = canvas.getContext("2d")!; + if (!ctx) return; + + let time = 0; + let rafId = 0; + let waveStartTime = -Infinity; + let waveTimerId = 0; + let resizeObserver: ResizeObserver | null = null; + + // Function to get color from CSS variable + const getCSSColor = (varName: string, fallback: string) => { + if (typeof window === 'undefined') return fallback; + const root = getComputedStyle(document.documentElement); + const hslValue = root.getPropertyValue(varName).trim(); + if (!hslValue) return fallback; + + // Convert HSL "H S% L%" to hex + const parts = hslValue.split(/\s+/); + const h = parseFloat(parts[0]) / 360; + const s = parseFloat(parts[1]) / 100; + const l = parseFloat(parts[2]) / 100; + + let r: number, g: number, b: number; + if (s === 0) { + r = g = b = l; + } else { + const hue2rgb = (p: number, q: number, t: number) => { + if (t < 0) t += 1; + if (t > 1) t -= 1; + if (t < 1/6) return p + (q - p) * 6 * t; + if (t < 1/2) return q; + if (t < 2/3) return p + (q - p) * (2/3 - t) * 6; + return p; + }; + const q = l < 0.5 ? l * (1 + s) : l + s - l * s; + const p = 2 * l - q; + r = hue2rgb(p, q, h + 1/3); + g = hue2rgb(p, q, h); + b = hue2rgb(p, q, h - 1/3); + } + + const toHex = (n: number) => Math.round(n * 255).toString(16).padStart(2, '0'); + return `#${toHex(r)}${toHex(g)}${toHex(b)}`; + }; + + // Get colors from palette (cache them, update every 2 seconds) + const colorCache = { + SKY_TOP: "#A9DCFF", + SKY_MID: "#CFC5FF", + SKY_BOT: "#C0AAFF", + GRID_COLOR: "255,255,255", + SUN_COLOR: "255,196,138" + }; + + let lastColorUpdate = 0; + const updateColors = () => { + colorCache.SKY_TOP = getCSSColor('--gradient-start', '#A9DCFF'); + colorCache.SKY_MID = getCSSColor('--gradient-mid', '#CFC5FF'); + colorCache.SKY_BOT = getCSSColor('--gradient-end', '#C0AAFF'); + + // Get foreground color for grid + const fgHsl = getComputedStyle(document.documentElement).getPropertyValue('--foreground').trim(); + if (fgHsl) { + const parts = fgHsl.split(/\s+/); + const h = parseInt(parts[0]) / 360; + const s = parseInt(parts[1]) / 100; + const l = parseInt(parts[2]) / 100; + + let r: number, g: number, b: number; + if (s === 0) { + r = g = b = l; + } else { + const hue2rgb = (p: number, q: number, t: number) => { + if (t < 0) t += 1; + if (t > 1) t -= 1; + if (t < 1/6) return p + (q - p) * 6 * t; + if (t < 1/2) return q; + if (t < 2/3) return p + (q - p) * (2/3 - t) * 6; + return p; + }; + const q = l < 0.5 ? l * (1 + s) : l + s - l * s; + const p = 2 * l - q; + r = hue2rgb(p, q, h + 1/3); + g = hue2rgb(p, q, h); + b = hue2rgb(p, q, h - 1/3); + } + colorCache.GRID_COLOR = `${Math.round(r * 255)},${Math.round(g * 255)},${Math.round(b * 255)}`; + } + + // Get accent color for sun + const accentHsl = getComputedStyle(document.documentElement).getPropertyValue('--gradient-accent-2').trim(); + if (accentHsl) { + const parts = accentHsl.split(/\s+/); + const h = parseInt(parts[0]) / 360; + const s = parseInt(parts[1]) / 100; + const l = parseInt(parts[2]) / 100; + + let r: number, g: number, b: number; + if (s === 0) { + r = g = b = l; + } else { + const hue2rgb = (p: number, q: number, t: number) => { + if (t < 0) t += 1; + if (t > 1) t -= 1; + if (t < 1/6) return p + (q - p) * 6 * t; + if (t < 1/2) return q; + if (t < 2/3) return p + (q - p) * (2/3 - t) * 6; + return p; + }; + const q = l < 0.5 ? l * (1 + s) : l + s - l * s; + const p = 2 * l - q; + r = hue2rgb(p, q, h + 1/3); + g = hue2rgb(p, q, h); + b = hue2rgb(p, q, h - 1/3); + } + colorCache.SUN_COLOR = `${Math.round(r * 255)},${Math.round(g * 255)},${Math.round(b * 255)}`; + } + }; + + // ----- Layout & palette ----- + const HORIZON_RATIO = 0.55; + + // Grid + const NUM_H_LINES = 18; + const NUM_V_LINES = 12; + const V_MARGIN = 0.18; + const EASE_POWER = 2.15; + const BASE_ALPHA_BOTTOM = 0.22; + const BASE_ALPHA_HORIZON = 0.01; + + // Shimmer + const WAVE_DURATION = 5; + const WAVE_INTERVAL_MS = 9000; + const WAVE_BAND_WIDTH_T = 0.12; + const WAVE_AMPLITUDE = 10; + const WAVE_FREQ = 0.018; + const WAVE_TIME_FREQ = 2.6; + + const SUN_RADIUS = 78; + const SUN_POS = { xPct: 0.80, yPct: 0.24 }; + + // ----- setup ----- + const measure = () => { + const parent = canvas.parentElement; + const rect = parent ? parent.getBoundingClientRect() : canvas.getBoundingClientRect(); + const dpr = window.devicePixelRatio || 1; + const w = Math.max(1, Math.floor(rect.width)); + const h = Math.max(1, Math.floor(rect.height)); + canvas.width = Math.floor(w * dpr); + canvas.height = Math.floor(h * dpr); + canvas.style.width = `${w}px`; + canvas.style.height = `${h}px`; + ctx.setTransform(dpr, 0, 0, dpr, 0, 0); + }; + + const triggerWave = () => { + waveStartTime = time; + waveTimerId = window.setTimeout(triggerWave, WAVE_INTERVAL_MS); + }; + + function drawSky(w: number, canvasHeight: number) { + const g = ctx.createLinearGradient(0, 0, 0, canvasHeight); + g.addColorStop(0, colorCache.SKY_TOP); + g.addColorStop(0.55, colorCache.SKY_MID); + g.addColorStop(1, colorCache.SKY_BOT); + ctx.fillStyle = g; + ctx.fillRect(0, 0, w, canvasHeight); + } + + function drawSunTopToBottom(cx: number, cy: number, r: number) { + ctx.save(); + ctx.beginPath(); + ctx.arc(cx, cy, r, 0, Math.PI * 2); + ctx.clip(); + const lg = ctx.createLinearGradient(cx, cy - r, cx, cy + r); + lg.addColorStop(0, `rgba(${colorCache.SUN_COLOR},0.95)`); + lg.addColorStop(1, `rgba(${colorCache.SUN_COLOR},0)`); + ctx.fillStyle = lg; + ctx.fillRect(cx - r, cy - r, r * 2, r * 2); + ctx.restore(); + + const halo = ctx.createRadialGradient(cx, cy, r * 0.7, cx, cy, r * 1.6); + halo.addColorStop(0, `rgba(${colorCache.SUN_COLOR},0.22)`); + halo.addColorStop(1, `rgba(${colorCache.SUN_COLOR},0)`); + ctx.fillStyle = halo; + ctx.beginPath(); + ctx.arc(cx, cy, r * 1.6, 0, Math.PI * 2); + ctx.fill(); + } + + function drawSunrise(horizon: number, w: number, h: number) { + // Main gradient - extended and more gradual + let g = ctx.createLinearGradient(0, horizon - 180, 0, horizon + 220); + g.addColorStop(0.00, `rgba(${colorCache.SUN_COLOR}, 0.00)`); + g.addColorStop(0.20, `rgba(${colorCache.SUN_COLOR}, 0.28)`); + g.addColorStop(0.35, `rgba(${colorCache.SUN_COLOR}, 0.45)`); + g.addColorStop(0.50, `rgba(${colorCache.SUN_COLOR}, 0.55)`); + g.addColorStop(0.65, `rgba(${colorCache.SUN_COLOR}, 0.45)`); + g.addColorStop(0.80, `rgba(${colorCache.SUN_COLOR}, 0.28)`); + g.addColorStop(1.00, `rgba(${colorCache.SUN_COLOR}, 0.00)`); + ctx.fillStyle = g; + ctx.fillRect(0, horizon - 180, w, 400); + + ctx.save(); + ctx.globalCompositeOperation = "lighter"; + // Secondary gradient - more extended + g = ctx.createLinearGradient(0, horizon - 120, 0, horizon + 140); + g.addColorStop(0.00, `rgba(${colorCache.SUN_COLOR}, 0.00)`); + g.addColorStop(0.35, `rgba(${colorCache.SUN_COLOR}, 0.12)`); + g.addColorStop(0.50, `rgba(${colorCache.SUN_COLOR}, 0.16)`); + g.addColorStop(0.65, `rgba(${colorCache.SUN_COLOR}, 0.12)`); + g.addColorStop(1.00, `rgba(${colorCache.SUN_COLOR}, 0.00)`); + ctx.fillStyle = g; + ctx.fillRect(0, horizon - 120, w, 260); + ctx.restore(); + + // Horizon line glow + g = ctx.createLinearGradient(0, horizon - 8, 0, horizon + 8); + g.addColorStop(0, `rgba(${colorCache.GRID_COLOR},0.00)`); + g.addColorStop(0.5, `rgba(${colorCache.GRID_COLOR},0.10)`); + g.addColorStop(1, `rgba(${colorCache.GRID_COLOR},0.00)`); + ctx.fillStyle = g; + ctx.fillRect(0, horizon - 8, w, 16); + + // Top fade - more extended + g = ctx.createLinearGradient(0, horizon - 240, 0, horizon); + g.addColorStop(0, `rgba(${colorCache.SUN_COLOR}, 0.00)`); + g.addColorStop(0.6, `rgba(${colorCache.SUN_COLOR}, 0.06)`); + g.addColorStop(1, `rgba(${colorCache.SUN_COLOR}, 0.10)`); + ctx.fillStyle = g; + ctx.fillRect(0, horizon - 240, w, 240); + + // Bottom fade - more extended + g = ctx.createLinearGradient(0, horizon, 0, horizon + 100); + g.addColorStop(0, `rgba(${colorCache.SUN_COLOR}, 0.18)`); + g.addColorStop(0.5, `rgba(${colorCache.SUN_COLOR}, 0.08)`); + g.addColorStop(1, `rgba(${colorCache.SUN_COLOR}, 0.00)`); + ctx.fillStyle = g; + ctx.fillRect(0, horizon, w, 100); + } + + const draw = () => { + try { + if (!canvas || !ctx || canvas.width === 0 || canvas.height === 0) { + rafId = requestAnimationFrame(draw); + return; + } + + // Update colors every 2 seconds + const now = Date.now(); + if (now - lastColorUpdate > 2000) { + try { + updateColors(); + lastColorUpdate = now; + } catch (err) { + console.error('Color update failed:', err); + } + } + + time += 1 / 60; + const dpr = window.devicePixelRatio || 1; + const w = canvas.width / dpr; + const h = canvas.height / dpr; + + if (w === 0 || h === 0) { + rafId = requestAnimationFrame(draw); + return; + } + + const horizon = h * HORIZON_RATIO; + + // 1) Sky + drawSky(w, h); + + // 2) Sun + smooth blob + drawSunTopToBottom(w * SUN_POS.xPct, h * SUN_POS.yPct, SUN_RADIUS); + + // 3) Warm sunrise (colored) + drawSunrise(horizon, w, h); + + // 4) Grid with shimmer + const tSince = time - waveStartTime; + const active = tSince >= 0 && tSince < WAVE_DURATION; + const waveFrontT = active ? 1 - tSince / WAVE_DURATION : -1; + + // horizontals + for (let i = 0; i < NUM_H_LINES; i++) { + const t = i / (NUM_H_LINES - 1); + const eased = Math.pow(t, EASE_POWER); + const baseY = horizon + eased * (h - horizon); + const alpha = BASE_ALPHA_HORIZON + (BASE_ALPHA_BOTTOM - BASE_ALPHA_HORIZON) * t; + + ctx.strokeStyle = `rgba(${colorCache.GRID_COLOR},${alpha})`; + ctx.beginPath(); + const step = 5; + for (let x = 0; x <= w; x += step) { + let y = baseY; + if (active) { + const dist = Math.abs(t - waveFrontT); + const influence = Math.max(0, 1 - dist / WAVE_BAND_WIDTH_T); + if (influence > 0) { + const depthScale = t; + const local = Math.sin(x * WAVE_FREQ + time * WAVE_TIME_FREQ); + y += local * WAVE_AMPLITUDE * influence * depthScale; + } + } + if (x === 0) ctx.moveTo(x, y); else ctx.lineTo(x, y); + } + ctx.stroke(); + } + + // verticals + for (let i = 0; i <= NUM_V_LINES; i++) { + const p = i / NUM_V_LINES; + const xTop = w * (V_MARGIN + p * (1 - 2 * V_MARGIN)); + const vanishingX = w / 2; + const xBottom = vanishingX + (xTop - vanishingX) * 3.2; + + const alpha = BASE_ALPHA_HORIZON + (BASE_ALPHA_BOTTOM - BASE_ALPHA_HORIZON) * 0.75; + ctx.strokeStyle = `rgba(${colorCache.GRID_COLOR},${alpha})`; + ctx.beginPath(); + ctx.moveTo(xTop, horizon); + ctx.lineTo(xBottom, h); + ctx.stroke(); + } + + rafId = requestAnimationFrame(draw); + } catch (err) { + console.error('Draw error:', err); + rafId = requestAnimationFrame(draw); // Keep animating even if there's an error + } + }; + + // Set up listeners + const onWindowResize = () => measure(); + window.addEventListener("resize", onWindowResize); + + // Use ResizeObserver to react to container size changes + if (typeof ResizeObserver !== "undefined") { + const parent = canvas.parentElement || canvas; + resizeObserver = new ResizeObserver(() => { + measure(); + }); + resizeObserver.observe(parent); + } + + // Initial setup + updateColors(); + lastColorUpdate = Date.now(); + + // Wait for browser layout before measuring + requestAnimationFrame(() => { + measure(); + + // Draw initial frame + if (canvas.width > 0 && canvas.height > 0) { + const dpr = window.devicePixelRatio || 1; + const w = canvas.width / dpr; + const h = canvas.height / dpr; + drawSky(w, h); + } + + // Start animation loop + draw(); + }); + + waveTimerId = window.setTimeout(() => { + waveStartTime = time; + triggerWave(); + }, 800); + + return () => { + window.removeEventListener("resize", onWindowResize); + if (resizeObserver) resizeObserver.disconnect(); + cancelAnimationFrame(rafId); + clearTimeout(waveTimerId); + }; + }, []); + + return ; +} diff --git a/lib/palettes/loader.ts b/lib/palettes/loader.ts new file mode 100644 index 0000000..9a6c21a --- /dev/null +++ b/lib/palettes/loader.ts @@ -0,0 +1,90 @@ +'use client'; + +import { generateCssVars, type Palette } from './utils'; + +/** + * Get the palette name from environment variable or default to 'default' + */ +export function getPaletteName(): string { + // For client-side, we can't access process.env directly in browser + // We'll use a data attribute or script tag approach + if (typeof window !== 'undefined') { + // Try to get from a script tag or meta tag + const paletteScript = document.getElementById('palette-config'); + if (paletteScript && paletteScript.textContent) { + try { + const config = JSON.parse(paletteScript.textContent); + return config.palette || 'default'; + } catch (e) { + console.warn('Failed to parse palette config', e); + } + } + } + + // Server-side or fallback - use NEXT_PUBLIC_ prefix for client access + if (typeof process !== 'undefined' && process.env) { + return process.env.NEXT_PUBLIC_PALETTE || process.env.PALETTE || 'default'; + } + return 'default'; +} + +/** + * Load palette from JSON file at runtime + */ +export async function loadPaletteClient(name: string): Promise { + try { + const response = await fetch(`/palettes/${name}.json`); + if (!response.ok) { + throw new Error(`Failed to load palette: ${name}`); + } + return await response.json(); + } catch (error) { + console.warn(`Failed to load palette "${name}", falling back to default`, error); + // Try to load default + try { + const response = await fetch('/palettes/default.json'); + return await response.json(); + } catch (defaultError) { + console.error('Failed to load default palette', defaultError); + // Return minimal fallback + return { + background: '#FFFFFF', + foreground: '#000000', + }; + } + } +} + +/** + * Inject CSS variables into the document root + */ +export function injectCssVars(cssVars: Record) { + if (typeof document === 'undefined') return; + + const root = document.documentElement; + + for (const [key, value] of Object.entries(cssVars)) { + root.style.setProperty(key, value); + } +} + +/** + * Apply palette by loading it and injecting CSS variables + */ +export async function applyPalette(paletteName?: string) { + const name = paletteName || getPaletteName(); + const palette = await loadPaletteClient(name); + const cssVars = generateCssVars(palette); + injectCssVars(cssVars); + return { name, palette, cssVars }; +} + +/** + * Initialize palette on page load + */ +export function initPalette() { + if (typeof window === 'undefined') return; + + // Apply palette immediately + applyPalette().catch(console.error); +} diff --git a/lib/palettes/utils.ts b/lib/palettes/utils.ts new file mode 100644 index 0000000..0a8d39d --- /dev/null +++ b/lib/palettes/utils.ts @@ -0,0 +1,69 @@ +export interface Palette { + [key: string]: string; +} + +/** + * Convert hex color to HSL format (without hsl() wrapper) + * Returns format: "H S% L%" (e.g., "240 10% 3.9%") + */ +export function hexToHsl(hex: string): string { + // Remove # if present + const cleanHex = hex.replace('#', ''); + + // Parse hex values + const r = parseInt(cleanHex.substring(0, 2), 16) / 255; + const g = parseInt(cleanHex.substring(2, 4), 16) / 255; + const b = parseInt(cleanHex.substring(4, 6), 16) / 255; + + const max = Math.max(r, g, b); + const min = Math.min(r, g, b); + let h = 0; + let s = 0; + const l = (max + min) / 2; + + if (max !== min) { + const d = max - min; + s = l > 0.5 ? d / (2 - max - min) : d / (max + min); + + switch (max) { + case r: + h = ((g - b) / d + (g < b ? 6 : 0)) / 6; + break; + case g: + h = ((b - r) / d + 2) / 6; + break; + case b: + h = ((r - g) / d + 4) / 6; + break; + } + } + + h = Math.round(h * 360); + s = Math.round(s * 1000) / 10; + const lightness = Math.round(l * 1000) / 10; + + return `${h} ${s}% ${lightness}%`; +} + +/** + * Generate CSS variable object from palette + * Converts hex colors to HSL format for CSS variables + */ +export function generateCssVars(palette: Palette): Record { + const cssVars: Record = {}; + + for (const [key, value] of Object.entries(palette)) { + // Convert CSS variable names (kebab-case to --var-name) + const cssVarName = `--${key.replace(/([A-Z])/g, '-$1').toLowerCase()}`; + + // Handle alpha values and other non-hex values (like radius) + if (key.includes('alpha') || key === 'radius' || !value.startsWith('#')) { + cssVars[cssVarName] = value; + } else { + cssVars[cssVarName] = hexToHsl(value); + } + } + + return cssVars; +} + diff --git a/lib/themes.ts b/lib/themes.ts new file mode 100644 index 0000000..6d011f5 --- /dev/null +++ b/lib/themes.ts @@ -0,0 +1,169 @@ +export interface Theme { + name: string + label: string + cssVars: { + light: Record + dark: Record + } +} + +export const themes: Theme[] = [ + { + name: "zinc", + label: "Zinc", + cssVars: { + light: { + "--background": "0 0% 100%", + "--foreground": "240 10% 3.9%", + "--card": "0 0% 100%", + "--card-foreground": "240 10% 3.9%", + "--popover": "0 0% 100%", + "--popover-foreground": "240 10% 3.9%", + "--primary": "240 5.9% 10%", + "--primary-foreground": "0 0% 98%", + "--secondary": "240 4.8% 95.9%", + "--secondary-foreground": "240 5.9% 10%", + "--muted": "240 4.8% 95.9%", + "--muted-foreground": "240 3.8% 46.1%", + "--accent": "240 4.8% 95.9%", + "--accent-foreground": "240 5.9% 10%", + "--destructive": "0 84.2% 60.2%", + "--destructive-foreground": "0 0% 98%", + "--border": "240 5.9% 90%", + "--input": "240 5.9% 90%", + "--ring": "240 10% 3.9%", + "--radius": "0.5rem", + }, + dark: { + "--background": "240 10% 3.9%", + "--foreground": "0 0% 98%", + "--card": "240 10% 3.9%", + "--card-foreground": "0 0% 98%", + "--popover": "240 10% 3.9%", + "--popover-foreground": "0 0% 98%", + "--primary": "0 0% 98%", + "--primary-foreground": "240 5.9% 10%", + "--secondary": "240 3.7% 15.9%", + "--secondary-foreground": "0 0% 98%", + "--muted": "240 3.7% 15.9%", + "--muted-foreground": "240 5% 64.9%", + "--accent": "240 3.7% 15.9%", + "--accent-foreground": "0 0% 98%", + "--destructive": "0 62.8% 30.6%", + "--destructive-foreground": "0 0% 98%", + "--border": "240 3.7% 15.9%", + "--input": "240 3.7% 15.9%", + "--ring": "240 4.9% 83.9%", + }, + }, + }, + { + name: "ocean", + label: "Ocean", + cssVars: { + light: { + "--background": "0 0% 100%", + "--foreground": "222.2 84% 4.9%", + "--card": "0 0% 100%", + "--card-foreground": "222.2 84% 4.9%", + "--popover": "0 0% 100%", + "--popover-foreground": "222.2 84% 4.9%", + "--primary": "221.2 83.2% 53.3%", + "--primary-foreground": "210 40% 98%", + "--secondary": "210 40% 96.1%", + "--secondary-foreground": "222.2 47.4% 11.2%", + "--muted": "210 40% 96.1%", + "--muted-foreground": "215.4 16.3% 46.9%", + "--accent": "210 40% 96.1%", + "--accent-foreground": "222.2 47.4% 11.2%", + "--destructive": "0 84.2% 60.2%", + "--destructive-foreground": "210 40% 98%", + "--border": "214.3 31.8% 91.4%", + "--input": "214.3 31.8% 91.4%", + "--ring": "221.2 83.2% 53.3%", + "--radius": "0.5rem", + }, + dark: { + "--background": "222.2 84% 4.9%", + "--foreground": "210 40% 98%", + "--card": "222.2 84% 4.9%", + "--card-foreground": "210 40% 98%", + "--popover": "222.2 84% 4.9%", + "--popover-foreground": "210 40% 98%", + "--primary": "217.2 91.2% 59.8%", + "--primary-foreground": "222.2 47.4% 11.2%", + "--secondary": "217.2 32.6% 17.5%", + "--secondary-foreground": "210 40% 98%", + "--muted": "217.2 32.6% 17.5%", + "--muted-foreground": "215 20.2% 65.1%", + "--accent": "217.2 32.6% 17.5%", + "--accent-foreground": "210 40% 98%", + "--destructive": "0 62.8% 30.6%", + "--destructive-foreground": "210 40% 98%", + "--border": "217.2 32.6% 17.5%", + "--input": "217.2 32.6% 17.5%", + "--ring": "224.3 76.3% 48%", + }, + }, + }, + { + name: "midnight", + label: "Midnight", + cssVars: { + light: { + "--background": "0 0% 100%", + "--foreground": "224 71.4% 4.1%", + "--card": "0 0% 100%", + "--card-foreground": "224 71.4% 4.1%", + "--popover": "0 0% 100%", + "--popover-foreground": "224 71.4% 4.1%", + "--primary": "262.1 83.3% 57.8%", + "--primary-foreground": "210 20% 98%", + "--secondary": "220 14.3% 95.9%", + "--secondary-foreground": "220.9 39.3% 11%", + "--muted": "220 14.3% 95.9%", + "--muted-foreground": "220 8.9% 46.1%", + "--accent": "220 14.3% 95.9%", + "--accent-foreground": "220.9 39.3% 11%", + "--destructive": "0 84.2% 60.2%", + "--destructive-foreground": "210 20% 98%", + "--border": "220 13% 91%", + "--input": "220 13% 91%", + "--ring": "262.1 83.3% 57.8%", + "--radius": "0.5rem", + }, + dark: { + "--background": "224 71.4% 4.1%", + "--foreground": "210 20% 98%", + "--card": "224 71.4% 4.1%", + "--card-foreground": "210 20% 98%", + "--popover": "224 71.4% 4.1%", + "--popover-foreground": "210 20% 98%", + "--primary": "263.4 70% 50.4%", + "--primary-foreground": "210 20% 98%", + "--secondary": "215 27.9% 16.9%", + "--secondary-foreground": "210 20% 98%", + "--muted": "215 27.9% 16.9%", + "--muted-foreground": "217.9 10.6% 64.9%", + "--accent": "215 27.9% 16.9%", + "--accent-foreground": "210 20% 98%", + "--destructive": "0 62.8% 30.6%", + "--destructive-foreground": "210 20% 98%", + "--border": "215 27.9% 16.9%", + "--input": "215 27.9% 16.9%", + "--ring": "263.4 70% 50.4%", + }, + }, + }, +] + +export function applyTheme(themeName: string, isDark: boolean = true) { + const theme = themes.find((t) => t.name === themeName) || themes[0] + const vars = isDark ? theme.cssVars.dark : theme.cssVars.light + + const root = document.documentElement + + Object.entries(vars).forEach(([key, value]) => { + root.style.setProperty(key, value) + }) +} diff --git a/lib/utils.ts b/lib/utils.ts new file mode 100644 index 0000000..03aaa4b --- /dev/null +++ b/lib/utils.ts @@ -0,0 +1,6 @@ +import { type ClassValue, clsx } from "clsx" +import { twMerge } from "tailwind-merge" + +export function cn(...inputs: ClassValue[]) { + return twMerge(clsx(inputs)) +} diff --git a/next.config.ts b/next.config.ts index a6ba7ec..0117cbb 100644 --- a/next.config.ts +++ b/next.config.ts @@ -1,15 +1,19 @@ import type { NextConfig } from "next"; +const isProd = process.env.NODE_ENV === 'production'; + const nextConfig: NextConfig = { - // Static export configuration for production builds - output: 'export', - trailingSlash: true, + // Static export configuration for production builds only + ...(isProd && { + output: 'export', + trailingSlash: true, + distDir: 'out', + }), images: { unoptimized: true }, // Custom domain configuration (opensuperintelligencelab.com) // No basePath needed for custom domain - distDir: 'out', }; export default nextConfig; diff --git a/package-lock.json b/package-lock.json index 6dc3229..ea89502 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,9 @@ "name": "open-superintelligence-lab-github-io", "version": "0.1.0", "dependencies": { + "@radix-ui/react-slot": "^1.2.4", + "class-variance-authority": "^0.7.1", + "clsx": "^2.1.1", "highlight.js": "^11.11.1", "lucide-react": "^0.544.0", "next": "15.5.3", @@ -18,6 +21,7 @@ "rehype-katex": "^7.0.1", "remark-gfm": "^4.0.1", "remark-math": "^6.0.0", + "tailwind-merge": "^3.4.0", "tailwindcss-animate": "^1.0.7" }, "devDependencies": { @@ -892,6 +896,39 @@ "node": ">=14" } }, + "node_modules/@radix-ui/react-compose-refs": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.2.tgz", + "integrity": "sha512-z4eqJvfiNnFMHIIvXP3CY57y2WJs5g2v3X0zm9mEJkrkNv4rDxu+sg9Jh8EkXyeqBkB7SOcboo9dMVqhyrACIg==", + "license": "MIT", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-slot": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.2.4.tgz", + "integrity": "sha512-Jl+bCv8HxKnlTLVrcDE8zTMJ09R9/ukw4qBs/oZClOfoQk/cOTbDn+NceXfV7j09YPVQUryJPHurafcSg6EVKA==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-compose-refs": "1.1.2" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, "node_modules/@rtsao/scc": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@rtsao/scc/-/scc-1.1.0.tgz", @@ -2142,11 +2179,32 @@ "node": ">= 6" } }, + "node_modules/class-variance-authority": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/class-variance-authority/-/class-variance-authority-0.7.1.tgz", + "integrity": "sha512-Ka+9Trutv7G8M6WT6SeiRWz792K5qEqIGEGzXKhAE6xOWAY6pPH8U+9IY3oCMv6kqTmLsv7Xh/2w2RigkePMsg==", + "license": "Apache-2.0", + "dependencies": { + "clsx": "^2.1.1" + }, + "funding": { + "url": "https://polar.sh/cva" + } + }, "node_modules/client-only": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz", "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==" }, + "node_modules/clsx": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", + "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/color": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz", @@ -6884,6 +6942,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/tailwind-merge": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-3.4.0.tgz", + "integrity": "sha512-uSaO4gnW+b3Y2aWoWfFpX62vn2sR3skfhbjsEnaBI81WD1wBLlHZe5sWf0AqjksNdYTbGBEd0UasQMT3SNV15g==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/dcastil" + } + }, "node_modules/tailwindcss": { "version": "3.4.17", "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.17.tgz", diff --git a/package.json b/package.json index b08ac6b..2be3772 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,9 @@ "serve:out": "npx serve out" }, "dependencies": { + "@radix-ui/react-slot": "^1.2.4", + "class-variance-authority": "^0.7.1", + "clsx": "^2.1.1", "highlight.js": "^11.11.1", "lucide-react": "^0.544.0", "next": "15.5.3", @@ -22,6 +25,7 @@ "rehype-katex": "^7.0.1", "remark-gfm": "^4.0.1", "remark-math": "^6.0.0", + "tailwind-merge": "^3.4.0", "tailwindcss-animate": "^1.0.7" }, "devDependencies": { diff --git a/public/palettes/amber-glow.json b/public/palettes/amber-glow.json new file mode 100644 index 0000000..4a78d4c --- /dev/null +++ b/public/palettes/amber-glow.json @@ -0,0 +1,79 @@ +{ + "background": "#0F0A06", + "foreground": "#FFFFFF", + "card": "#2A1F18", + "card-foreground": "#FCD34D", + "popover": "#2A1F18", + "popover-foreground": "#FCD34D", + "primary": "#FBBF24", + "primary-foreground": "#0F0A06", + "secondary": "#3A2A1F", + "secondary-foreground": "#FCD34D", + "muted": "#3A2A1F", + "muted-foreground": "#FBBF24", + "accent": "#D97706", + "accent-foreground": "#FCD34D", + "destructive": "#EF4444", + "destructive-foreground": "#FCD34D", + "border": "#D97706", + "input": "#3A2A1F", + "ring": "#F59E0B", + "chart-1": "#F59E0B", + "chart-2": "#FBBF24", + "chart-3": "#D97706", + "chart-4": "#F59E0B", + "chart-5": "#FBBF24", + "radius": "0.5rem", + "scrollbar-track": "#2A1F18", + "scrollbar-thumb": "#D97706", + "scrollbar-thumb-hover": "#F59E0B", + "math-primary": "#FBBF24", + "math-secondary": "#F59E0B", + "math-accent": "#FCD34D", + "math-text": "#FBBF24", + "math-relation": "#F59E0B", + "math-bracket": "#FBBF24", + "syntax-bg": "#2A1F18", + "syntax-text": "#FCD34D", + "syntax-keyword": "#F59E0B", + "syntax-string": "#FCD34D", + "syntax-comment": "#D97706", + "syntax-number": "#F59E0B", + "syntax-function": "#FCD34D", + "syntax-variable": "#F59E0B", + "gradient-start": "#1C1410", + "gradient-mid": "#2A1F18", + "gradient-end": "#FB923C", + "gradient-accent-1": "#D97706", + "gradient-accent-2": "#FBBF24", + "gradient-accent-3": "#FBBF24", + "indigo-900": "#312E81", + "indigo-600": "#4F46E5", + "indigo-500": "#6366F1", + "indigo-400": "#818CF8", + "indigo-300": "#A5B4FC", + "green-900": "#14532D", + "green-600": "#16A34A", + "green-500": "#22C55E", + "green-400": "#4ADE80", + "green-300": "#86EFAC", + "emerald-900": "#064E3B", + "emerald-600": "#059669", + "emerald-500": "#10B981", + "emerald-400": "#34D399", + "emerald-300": "#6EE7B7", + "amber-600": "#D97706", + "amber-500": "#F59E0B", + "amber-400": "#FBBF24", + "amber-300": "#FCD34D", + "orange-600": "#EA580C", + "orange-500": "#F97316", + "orange-400": "#FB923C", + "violet-900": "#4C1D95", + "violet-600": "#7C3AED", + "violet-500": "#8B5CF6", + "violet-400": "#A78BFA", + "pink-600": "#DB2777", + "pink-500": "#EC4899", + "pink-400": "#F472B6" +} diff --git a/public/palettes/deep-ocean.json b/public/palettes/deep-ocean.json new file mode 100644 index 0000000..83227ba --- /dev/null +++ b/public/palettes/deep-ocean.json @@ -0,0 +1,79 @@ +{ + "background": "#050814", + "foreground": "#FFFFFF", + "card": "#1E1B4B", + "card-foreground": "#A5B4FC", + "popover": "#1E1B4B", + "popover-foreground": "#A5B4FC", + "primary": "#818CF8", + "primary-foreground": "#050814", + "secondary": "#312E81", + "secondary-foreground": "#A5B4FC", + "muted": "#312E81", + "muted-foreground": "#818CF8", + "accent": "#6366F1", + "accent-foreground": "#A5B4FC", + "destructive": "#EF4444", + "destructive-foreground": "#A5B4FC", + "border": "#4338CA", + "input": "#312E81", + "ring": "#6366F1", + "chart-1": "#6366F1", + "chart-2": "#818CF8", + "chart-3": "#A5B4FC", + "chart-4": "#6366F1", + "chart-5": "#818CF8", + "radius": "0.5rem", + "scrollbar-track": "#1E1B4B", + "scrollbar-thumb": "#4338CA", + "scrollbar-thumb-hover": "#6366F1", + "math-primary": "#818CF8", + "math-secondary": "#6366F1", + "math-accent": "#A5B4FC", + "math-text": "#818CF8", + "math-relation": "#6366F1", + "math-bracket": "#818CF8", + "syntax-bg": "#1E1B4B", + "syntax-text": "#A5B4FC", + "syntax-keyword": "#818CF8", + "syntax-string": "#A5B4FC", + "syntax-comment": "#4338CA", + "syntax-number": "#818CF8", + "syntax-function": "#A5B4FC", + "syntax-variable": "#818CF8", + "gradient-start": "#0A0E27", + "gradient-mid": "#1E1B4B", + "gradient-end": "#EC4899", + "gradient-accent-1": "#818CF8", + "gradient-accent-2": "#F59E0B", + "gradient-accent-3": "#C7D2FE", + "indigo-900": "#312E81", + "indigo-600": "#4F46E5", + "indigo-500": "#6366F1", + "indigo-400": "#818CF8", + "indigo-300": "#A5B4FC", + "green-900": "#14532D", + "green-600": "#16A34A", + "green-500": "#22C55E", + "green-400": "#4ADE80", + "green-300": "#86EFAC", + "emerald-900": "#064E3B", + "emerald-600": "#059669", + "emerald-500": "#10B981", + "emerald-400": "#34D399", + "emerald-300": "#6EE7B7", + "amber-600": "#D97706", + "amber-500": "#F59E0B", + "amber-400": "#FBBF24", + "amber-300": "#FCD34D", + "orange-600": "#EA580C", + "orange-500": "#F97316", + "orange-400": "#FB923C", + "violet-900": "#4C1D95", + "violet-600": "#7C3AED", + "violet-500": "#8B5CF6", + "violet-400": "#A78BFA", + "pink-600": "#DB2777", + "pink-500": "#EC4899", + "pink-400": "#F472B6" +} diff --git a/public/palettes/default.json b/public/palettes/default.json new file mode 100644 index 0000000..750b2e4 --- /dev/null +++ b/public/palettes/default.json @@ -0,0 +1,79 @@ +{ + "background": "#0F172A", + "foreground": "#FFFFFF", + "card": "#1E293B", + "card-foreground": "#F8FAFC", + "popover": "#1E293B", + "popover-foreground": "#F8FAFC", + "primary": "#F8FAFC", + "primary-foreground": "#0F172A", + "secondary": "#1E293B", + "secondary-foreground": "#F8FAFC", + "muted": "#334155", + "muted-foreground": "#94A3B8", + "accent": "#334155", + "accent-foreground": "#F8FAFC", + "destructive": "#EF4444", + "destructive-foreground": "#F8FAFC", + "border": "#334155", + "input": "#334155", + "ring": "#6366F1", + "chart-1": "#F97316", + "chart-2": "#22C55E", + "chart-3": "#1E293B", + "chart-4": "#EAB308", + "chart-5": "#EC4899", + "radius": "0.5rem", + "scrollbar-track": "#1E293B", + "scrollbar-thumb": "#475569", + "scrollbar-thumb-hover": "#64748B", + "math-primary": "#60A5FA", + "math-secondary": "#C084FC", + "math-accent": "#34D399", + "math-text": "#FBBF24", + "math-relation": "#F472B6", + "math-bracket": "#94A3B8", + "syntax-bg": "#1E293B", + "syntax-text": "#E2E8F0", + "syntax-keyword": "#C084FC", + "syntax-string": "#34D399", + "syntax-comment": "#64748B", + "syntax-number": "#FBBF24", + "syntax-function": "#60A5FA", + "syntax-variable": "#F472B6", + "gradient-start": "#020617", + "gradient-mid": "#0F172A", + "gradient-end": "#EC4899", + "gradient-accent-1": "#3B82F6", + "gradient-accent-2": "#F59E0B", + "gradient-accent-3": "#06B6D4", + "indigo-900": "#312E81", + "indigo-600": "#4F46E5", + "indigo-500": "#6366F1", + "indigo-400": "#818CF8", + "indigo-300": "#A5B4FC", + "green-900": "#14532D", + "green-600": "#16A34A", + "green-500": "#22C55E", + "green-400": "#4ADE80", + "green-300": "#86EFAC", + "emerald-900": "#064E3B", + "emerald-600": "#059669", + "emerald-500": "#10B981", + "emerald-400": "#34D399", + "emerald-300": "#6EE7B7", + "amber-600": "#D97706", + "amber-500": "#F59E0B", + "amber-400": "#FBBF24", + "amber-300": "#FCD34D", + "orange-600": "#EA580C", + "orange-500": "#F97316", + "orange-400": "#FB923C", + "violet-900": "#4C1D95", + "violet-600": "#7C3AED", + "violet-500": "#8B5CF6", + "violet-400": "#A78BFA", + "pink-600": "#DB2777", + "pink-500": "#EC4899", + "pink-400": "#F472B6" +} \ No newline at end of file diff --git a/public/palettes/emerald-odyssey.json b/public/palettes/emerald-odyssey.json new file mode 100644 index 0000000..c65e015 --- /dev/null +++ b/public/palettes/emerald-odyssey.json @@ -0,0 +1,79 @@ +{ + "background": "#051F18", + "foreground": "#FFFFFF", + "card": "#00674F", + "card-foreground": "#9FFFE6", + "popover": "#00674F", + "popover-foreground": "#73E6CB", + "primary": "#39FFC7", + "primary-foreground": "#051F18", + "secondary": "#00674F", + "secondary-foreground": "#9FFFE6", + "muted": "#00674F", + "muted-foreground": "#73E6CB", + "accent": "#39FFC7", + "accent-foreground": "#051F18", + "destructive": "#EF4444", + "destructive-foreground": "#73E6CB", + "border": "#3EBB9E", + "input": "#00674F", + "ring": "#3EBB9E", + "chart-1": "#3EBB9E", + "chart-2": "#73E6CB", + "chart-3": "#00674F", + "chart-4": "#3EBB9E", + "chart-5": "#73E6CB", + "radius": "0.5rem", + "scrollbar-track": "#00674F", + "scrollbar-thumb": "#3EBB9E", + "scrollbar-thumb-hover": "#73E6CB", + "math-primary": "#73E6CB", + "math-secondary": "#3EBB9E", + "math-accent": "#00674F", + "math-text": "#73E6CB", + "math-relation": "#3EBB9E", + "math-bracket": "#73E6CB", + "syntax-bg": "#00674F", + "syntax-text": "#73E6CB", + "syntax-keyword": "#3EBB9E", + "syntax-string": "#73E6CB", + "syntax-comment": "#00674F", + "syntax-number": "#3EBB9E", + "syntax-function": "#73E6CB", + "syntax-variable": "#3EBB9E", + "gradient-start": "#0A3C30", + "gradient-mid": "#00674F", + "gradient-end": "#BE5103", + "gradient-accent-1": "#39FFC7", + "gradient-accent-2": "#FFCE1B", + "gradient-accent-3": "#3EBB9E", + "indigo-900": "#00674F", + "indigo-600": "#3EBB9E", + "indigo-500": "#3EBB9E", + "indigo-400": "#73E6CB", + "indigo-300": "#73E6CB", + "green-900": "#0A3C30", + "green-600": "#00674F", + "green-500": "#3EBB9E", + "green-400": "#3EBB9E", + "green-300": "#73E6CB", + "emerald-900": "#0A3C30", + "emerald-600": "#00674F", + "emerald-500": "#3EBB9E", + "emerald-400": "#73E6CB", + "emerald-300": "#73E6CB", + "amber-600": "#FFCE1B", + "amber-500": "#FFCE1B", + "amber-400": "#FFCE1B", + "amber-300": "#FFCE1B", + "orange-600": "#BE5103", + "orange-500": "#BE5103", + "orange-400": "#BE5103", + "violet-900": "#00674F", + "violet-600": "#3EBB9E", + "violet-500": "#3EBB9E", + "violet-400": "#73E6CB", + "pink-600": "#EF4444", + "pink-500": "#EF4444", + "pink-400": "#EF4444" +} diff --git a/public/palettes/harvest-moon.json b/public/palettes/harvest-moon.json new file mode 100644 index 0000000..4171d03 --- /dev/null +++ b/public/palettes/harvest-moon.json @@ -0,0 +1,79 @@ +{ + "background": "#0D0604", + "foreground": "#FFFFFF", + "card": "#2A1A15", + "card-foreground": "#FFCE1B", + "popover": "#2A1A15", + "popover-foreground": "#FFCE1B", + "primary": "#FFE66D", + "primary-foreground": "#0D0604", + "secondary": "#800020", + "secondary-foreground": "#FFCE1B", + "muted": "#A52A2A", + "muted-foreground": "#FFCE1B", + "accent": "#BE5103", + "accent-foreground": "#FFCE1B", + "destructive": "#EF4444", + "destructive-foreground": "#FFCE1B", + "border": "#BE5103", + "input": "#A52A2A", + "ring": "#FFCE1B", + "chart-1": "#FFCE1B", + "chart-2": "#BE5103", + "chart-3": "#A52A2A", + "chart-4": "#800020", + "chart-5": "#FFCE1B", + "radius": "0.5rem", + "scrollbar-track": "#2A1A15", + "scrollbar-thumb": "#A52A2A", + "scrollbar-thumb-hover": "#BE5103", + "math-primary": "#FFCE1B", + "math-secondary": "#BE5103", + "math-accent": "#A52A2A", + "math-text": "#FFCE1B", + "math-relation": "#BE5103", + "math-bracket": "#800020", + "syntax-bg": "#2A1A15", + "syntax-text": "#FFCE1B", + "syntax-keyword": "#BE5103", + "syntax-string": "#FFCE1B", + "syntax-comment": "#800020", + "syntax-number": "#BE5103", + "syntax-function": "#FFCE1B", + "syntax-variable": "#BE5103", + "gradient-start": "#1A0F0A", + "gradient-mid": "#2A1A15", + "gradient-end": "#FF9900", + "gradient-accent-1": "#800020", + "gradient-accent-2": "#FFCE1B", + "gradient-accent-3": "#BE5103", + "indigo-900": "#800020", + "indigo-600": "#A52A2A", + "indigo-500": "#BE5103", + "indigo-400": "#BE5103", + "indigo-300": "#FFCE1B", + "green-900": "#1A0F0A", + "green-600": "#BE5103", + "green-500": "#BE5103", + "green-400": "#FFCE1B", + "green-300": "#FFCE1B", + "emerald-900": "#1A0F0A", + "emerald-600": "#BE5103", + "emerald-500": "#BE5103", + "emerald-400": "#FFCE1B", + "emerald-300": "#FFCE1B", + "amber-600": "#FFCE1B", + "amber-500": "#FFCE1B", + "amber-400": "#FFCE1B", + "amber-300": "#FFCE1B", + "orange-600": "#BE5103", + "orange-500": "#BE5103", + "orange-400": "#FFCE1B", + "violet-900": "#800020", + "violet-600": "#A52A2A", + "violet-500": "#BE5103", + "violet-400": "#FFCE1B", + "pink-600": "#EF4444", + "pink-500": "#EF4444", + "pink-400": "#EF4444" +} diff --git a/public/palettes/ink-wash.json b/public/palettes/ink-wash.json new file mode 100644 index 0000000..376da64 --- /dev/null +++ b/public/palettes/ink-wash.json @@ -0,0 +1,79 @@ +{ + "background": "#FFFFE3", + "foreground": "#2A2A2A", + "card": "#F5F5DC", + "card-foreground": "#2A2A2A", + "popover": "#F5F5DC", + "popover-foreground": "#2A2A2A", + "primary": "#2A2A2A", + "primary-foreground": "#FFFFE3", + "secondary": "#E8E8D8", + "secondary-foreground": "#2A2A2A", + "muted": "#D8D8C8", + "muted-foreground": "#5A6A7A", + "accent": "#5A6A7A", + "accent-foreground": "#FFFFE3", + "destructive": "#C84A4A", + "destructive-foreground": "#FFFFE3", + "border": "#C8C8B8", + "input": "#E8E8D8", + "ring": "#5A6A7A", + "chart-1": "#6D8196", + "chart-2": "#8B9AA8", + "chart-3": "#4A5A6A", + "chart-4": "#A8B8C8", + "chart-5": "#5A6A7A", + "radius": "0.5rem", + "scrollbar-track": "#E8E8D8", + "scrollbar-thumb": "#A8A898", + "scrollbar-thumb-hover": "#5A6A7A", + "math-primary": "#5A6A7A", + "math-secondary": "#4A5A6A", + "math-accent": "#6D8196", + "math-text": "#3A4A5A", + "math-relation": "#5A6A7A", + "math-bracket": "#8A8A7A", + "syntax-bg": "#F5F5DC", + "syntax-text": "#2A2A2A", + "syntax-keyword": "#4A5A6A", + "syntax-string": "#5A6A7A", + "syntax-comment": "#9A9A8A", + "syntax-number": "#6D8196", + "syntax-function": "#5A6A7A", + "syntax-variable": "#4A5A6A", + "gradient-start": "#FFFFE3", + "gradient-mid": "#F5F5DC", + "gradient-end": "#D8D8C8", + "gradient-accent-1": "#4A5568", + "gradient-accent-2": "#5A6A7A", + "gradient-accent-3": "#6D8196", + "indigo-900": "#4A5568", + "indigo-600": "#6D8196", + "indigo-500": "#7A8A9A", + "indigo-400": "#8B9AA8", + "indigo-300": "#9CABB8", + "green-900": "#4A5A6A", + "green-600": "#5A6A7A", + "green-500": "#6A7A8A", + "green-400": "#7A8A9A", + "green-300": "#8A9AAA", + "emerald-900": "#4A5568", + "emerald-600": "#5A6A7A", + "emerald-500": "#6A7A8A", + "emerald-400": "#7A8A9A", + "emerald-300": "#8A9AAA", + "amber-600": "#8A7A6A", + "amber-500": "#9A8A7A", + "amber-400": "#AA9A8A", + "amber-300": "#BAAA9A", + "orange-600": "#9A7A6A", + "orange-500": "#AA8A7A", + "orange-400": "#BA9A8A", + "violet-900": "#5A5A6A", + "violet-600": "#6A6A7A", + "violet-500": "#7A7A8A", + "violet-400": "#8A8A9A", + "pink-600": "#9A6A7A", + "pink-500": "#AA7A8A", + "pink-400": "#BA8A9A" +} diff --git a/public/palettes/slatewave.json b/public/palettes/slatewave.json new file mode 100644 index 0000000..a7eb50b --- /dev/null +++ b/public/palettes/slatewave.json @@ -0,0 +1,79 @@ +{ + "background": "#0A0A1A", + "foreground": "#FFFFFF", + "card": "#1A1A2E", + "card-foreground": "#CFC5FF", + "popover": "#1A1A2E", + "popover-foreground": "#CFC5FF", + "primary": "#CAB8FF", + "primary-foreground": "#0A0A1A", + "secondary": "#1E1E3E", + "secondary-foreground": "#A9F4DA", + "muted": "#252540", + "muted-foreground": "#CFC5FF", + "accent": "#FFC99B", + "accent-foreground": "#0A0A1A", + "destructive": "#FF6B9D", + "destructive-foreground": "#0A0A1A", + "border": "#C0AAFF", + "input": "#1E1E3E", + "ring": "#CAB8FF", + "chart-1": "#FFC99B", + "chart-2": "#A9F4DA", + "chart-3": "#CFC5FF", + "chart-4": "#C0AAFF", + "chart-5": "#FFA8D8", + "radius": "0.5rem", + "scrollbar-track": "#1A1A2E", + "scrollbar-thumb": "#C0AAFF", + "scrollbar-thumb-hover": "#CAB8FF", + "math-primary": "#A9F4DA", + "math-secondary": "#CFC5FF", + "math-accent": "#FFC99B", + "math-text": "#CAB8FF", + "math-relation": "#A9DCFF", + "math-bracket": "#CFC5FF", + "syntax-bg": "#1A1A2E", + "syntax-text": "#A9DCFF", + "syntax-keyword": "#CAB8FF", + "syntax-string": "#A9F4DA", + "syntax-comment": "#5A5A7A", + "syntax-number": "#FFC99B", + "syntax-function": "#CFC5FF", + "syntax-variable": "#FFA8D8", + "gradient-start": "#0A0A1A", + "gradient-mid": "#1A1A2E", + "gradient-end": "#FFA8D8", + "gradient-accent-1": "#A9DCFF", + "gradient-accent-2": "#FFC99B", + "gradient-accent-3": "#A9F4DA", + "indigo-900": "#1E1E3E", + "indigo-600": "#C0AAFF", + "indigo-500": "#CAB8FF", + "indigo-400": "#CFC5FF", + "indigo-300": "#A9DCFF", + "green-900": "#1A2E1A", + "green-600": "#A9F4DA", + "green-500": "#A9F4DA", + "green-400": "#A9F4DA", + "green-300": "#D4FFE8", + "emerald-900": "#1A2E1A", + "emerald-600": "#A9F4DA", + "emerald-500": "#A9F4DA", + "emerald-400": "#A9F4DA", + "emerald-300": "#D4FFE8", + "amber-600": "#FFC99B", + "amber-500": "#FFC99B", + "amber-400": "#FFC99B", + "amber-300": "#FFD9B8", + "orange-600": "#FFC99B", + "orange-500": "#FFC99B", + "orange-400": "#FFD9B8", + "violet-900": "#1E1E3E", + "violet-600": "#C0AAFF", + "violet-500": "#CAB8FF", + "violet-400": "#CFC5FF", + "pink-600": "#FFA8D8", + "pink-500": "#FFA8D8", + "pink-400": "#FFC0E8" +} diff --git a/public/palettes/terminal-green.json b/public/palettes/terminal-green.json new file mode 100644 index 0000000..c93b18d --- /dev/null +++ b/public/palettes/terminal-green.json @@ -0,0 +1,79 @@ +{ + "background": "#0D1B0A", + "foreground": "#FFFFFF", + "card": "#1A2E14", + "card-foreground": "#39FF14", + "popover": "#1A2E14", + "popover-foreground": "#39FF14", + "primary": "#00FF41", + "primary-foreground": "#0D1B0A", + "secondary": "#1A2E14", + "secondary-foreground": "#39FF14", + "muted": "#1A2E14", + "muted-foreground": "#00FF41", + "accent": "#39FF14", + "accent-foreground": "#0D1B0A", + "destructive": "#EF4444", + "destructive-foreground": "#39FF14", + "border": "#00FF41", + "input": "#1A2E14", + "ring": "#39FF14", + "chart-1": "#39FF14", + "chart-2": "#00FF41", + "chart-3": "#1A2E14", + "chart-4": "#39FF14", + "chart-5": "#00FF41", + "radius": "0.5rem", + "scrollbar-track": "#1A2E14", + "scrollbar-thumb": "#00FF41", + "scrollbar-thumb-hover": "#39FF14", + "math-primary": "#39FF14", + "math-secondary": "#00FF41", + "math-accent": "#00FF41", + "math-text": "#39FF14", + "math-relation": "#00FF41", + "math-bracket": "#00FF41", + "syntax-bg": "#1A2E14", + "syntax-text": "#39FF14", + "syntax-keyword": "#00FF41", + "syntax-string": "#39FF14", + "syntax-comment": "#00FF41", + "syntax-number": "#39FF14", + "syntax-function": "#00FF41", + "syntax-variable": "#39FF14", + "gradient-start": "#0D1B0A", + "gradient-mid": "#1A2E14", + "gradient-end": "#FF9900", + "gradient-accent-1": "#00FF41", + "gradient-accent-2": "#FFCE1B", + "gradient-accent-3": "#00FF41", + "indigo-900": "#312E81", + "indigo-600": "#4F46E5", + "indigo-500": "#6366F1", + "indigo-400": "#818CF8", + "indigo-300": "#A5B4FC", + "green-900": "#0D1B0A", + "green-600": "#00FF41", + "green-500": "#39FF14", + "green-400": "#39FF14", + "green-300": "#39FF14", + "emerald-900": "#0D1B0A", + "emerald-600": "#00FF41", + "emerald-500": "#39FF14", + "emerald-400": "#39FF14", + "emerald-300": "#39FF14", + "amber-600": "#FFCE1B", + "amber-500": "#FFCE1B", + "amber-400": "#FFCE1B", + "amber-300": "#FFCE1B", + "orange-600": "#FF9800", + "orange-500": "#FF9800", + "orange-400": "#FF9800", + "violet-900": "#4C1D95", + "violet-600": "#7C3AED", + "violet-500": "#8B5CF6", + "violet-400": "#A78BFA", + "pink-600": "#DB2777", + "pink-500": "#EC4899", + "pink-400": "#F472B6" +} diff --git a/public/palettes/vaporwave.json b/public/palettes/vaporwave.json new file mode 100644 index 0000000..462dfcc --- /dev/null +++ b/public/palettes/vaporwave.json @@ -0,0 +1,79 @@ +{ + "background": "#050510", + "foreground": "#FFFFFF", + "card": "#0A0C37", + "card-foreground": "#FFFFFF", + "popover": "#0A0C37", + "popover-foreground": "#FFFFFF", + "primary": "#FF61C6", + "primary-foreground": "#050510", + "secondary": "#375971", + "secondary-foreground": "#5CECFF", + "muted": "#1A1D5A", + "muted-foreground": "#5CECFF", + "accent": "#5CECFF", + "accent-foreground": "#050510", + "destructive": "#FF9900", + "destructive-foreground": "#050510", + "border": "#375971", + "input": "#0A0C37", + "ring": "#FF61C6", + "chart-1": "#FF61C6", + "chart-2": "#5CECFF", + "chart-3": "#F4FF61", + "chart-4": "#FF9900", + "chart-5": "#375971", + "radius": "0.5rem", + "scrollbar-track": "#050510", + "scrollbar-thumb": "#FF61C6", + "scrollbar-thumb-hover": "#5CECFF", + "math-primary": "#5CECFF", + "math-secondary": "#FF61C6", + "math-accent": "#F4FF61", + "math-text": "#FFFFFF", + "math-relation": "#FF9900", + "math-bracket": "#FF61C6", + "syntax-bg": "#050510", + "syntax-text": "#FFFFFF", + "syntax-keyword": "#FF61C6", + "syntax-string": "#F4FF61", + "syntax-comment": "#375971", + "syntax-number": "#FF9900", + "syntax-function": "#5CECFF", + "syntax-variable": "#FF61C6", + "gradient-start": "#050510", + "gradient-mid": "#0A0C37", + "gradient-end": "#FF61C6", + "gradient-accent-1": "#FF61C6", + "gradient-accent-2": "#F4FF61", + "gradient-accent-3": "#FF9900", + "indigo-900": "#050510", + "indigo-600": "#5CECFF", + "indigo-500": "#5CECFF", + "indigo-400": "#5CECFF", + "indigo-300": "#5CECFF", + "green-900": "#050510", + "green-600": "#F4FF61", + "green-500": "#F4FF61", + "green-400": "#F4FF61", + "green-300": "#F4FF61", + "emerald-900": "#050510", + "emerald-600": "#F4FF61", + "emerald-500": "#F4FF61", + "emerald-400": "#F4FF61", + "emerald-300": "#F4FF61", + "amber-600": "#FF9900", + "amber-500": "#FF9900", + "amber-400": "#FF9900", + "amber-300": "#FF9900", + "orange-600": "#FF9900", + "orange-500": "#FF9900", + "orange-400": "#FF9900", + "violet-900": "#050510", + "violet-600": "#FF61C6", + "violet-500": "#FF61C6", + "violet-400": "#FF61C6", + "pink-600": "#FF61C6", + "pink-500": "#FF61C6", + "pink-400": "#FF61C6" +} diff --git a/styles/math-styles.css b/styles/math-styles.css index bc96ad0..f52c587 100644 --- a/styles/math-styles.css +++ b/styles/math-styles.css @@ -1,16 +1,16 @@ /* Custom styling for LaTeX math formulas */ .katex { - color: #60a5fa !important; /* Blue color for inline math */ - background: rgba(96, 165, 250, 0.05); + color: hsl(var(--math-primary)) !important; + background: hsl(var(--math-primary) / 0.05); padding: 3px 3px; border-radius: 3px; - border: 1px solid rgba(96, 165, 250, 0.2); + border: 1px solid hsl(var(--math-primary) / 0.2); font-weight: 500; } .katex-display { - background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(59, 130, 246, 0.1)); - border: 1px solid rgba(139, 92, 246, 0.3); + background: linear-gradient(135deg, hsl(var(--math-secondary) / 0.1), hsl(var(--math-primary) / 0.1)); + border: 1px solid hsl(var(--math-secondary) / 0.3); border-radius: 12px; padding: 20px; margin: 24px 0; @@ -22,107 +22,107 @@ background: transparent; border: none; padding: 0; - color: #c084fc !important; /* Purple color for display math */ + color: hsl(var(--math-secondary)) !important; font-size: 1.1em; } /* Style specific math elements */ .katex .mord { - color: #34d399 !important; /* Green for variables and letters */ + color: hsl(var(--math-accent)) !important; } .katex .mbin { - color: #fbbf24 !important; /* Yellow for binary operators like +, -, ⋅ */ + color: hsl(var(--math-text)) !important; } .katex .mrel { - color: #f472b6 !important; /* Pink for relations like =, ∈, ≤ */ + color: hsl(var(--math-relation)) !important; } .katex .mopen, .katex .mclose { - color: #94a3b8 !important; /* Gray for brackets and parentheses */ + color: hsl(var(--math-bracket)) !important; } .katex .mfrac { - color: #fb7185 !important; /* Rose for fractions */ + color: hsl(var(--math-secondary)) !important; } .katex .msqrt { - color: #a7f3d0 !important; /* Light green for square roots */ + color: hsl(var(--math-accent)) !important; } .katex .msubsup { - color: #a78bfa !important; /* Purple for superscripts and subscripts */ + color: hsl(var(--math-secondary)) !important; } .katex .mtext { - color: #60a5fa !important; /* Blue for text functions like \text{ReLU} */ + color: hsl(var(--math-primary)) !important; } /* Hover effects */ .katex:hover { - background: rgba(96, 165, 250, 0.15); - border-color: rgba(96, 165, 250, 0.4); + background: hsl(var(--math-primary) / 0.15); + border-color: hsl(var(--math-primary) / 0.4); transition: all 0.2s ease; } .katex-display:hover { - background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(59, 130, 246, 0.15)); - border-color: rgba(139, 92, 246, 0.5); + background: linear-gradient(135deg, hsl(var(--math-secondary) / 0.15), hsl(var(--math-primary) / 0.15)); + border-color: hsl(var(--math-secondary) / 0.5); transition: all 0.2s ease; } /* Custom syntax highlighting for code blocks */ .hljs { - background: #1e293b !important; /* slate-800 */ - color: #e2e8f0 !important; /* slate-200 */ + background: hsl(var(--syntax-bg)) !important; + color: hsl(var(--syntax-text)) !important; } .hljs-keyword { - color: #c084fc !important; /* purple-300 */ + color: hsl(var(--syntax-keyword)) !important; } .hljs-string { - color: #34d399 !important; /* emerald-400 */ + color: hsl(var(--syntax-string)) !important; } .hljs-comment { - color: #64748b !important; /* slate-500 */ + color: hsl(var(--syntax-comment)) !important; font-style: italic; } .hljs-number { - color: #fbbf24 !important; /* amber-400 */ + color: hsl(var(--syntax-number)) !important; } .hljs-function { - color: #60a5fa !important; /* blue-400 */ + color: hsl(var(--syntax-function)) !important; } .hljs-variable { - color: #f472b6 !important; /* pink-400 */ + color: hsl(var(--syntax-variable)) !important; } .hljs-type { - color: #fb7185 !important; /* rose-400 */ + color: hsl(var(--syntax-variable)) !important; } .hljs-built_in { - color: #a78bfa !important; /* violet-400 */ + color: hsl(var(--syntax-keyword)) !important; } .hljs-title { - color: #60a5fa !important; /* blue-400 */ + color: hsl(var(--syntax-function)) !important; } .hljs-params { - color: #e2e8f0 !important; /* slate-200 */ + color: hsl(var(--syntax-text)) !important; } .hljs-attr { - color: #34d399 !important; /* emerald-400 */ + color: hsl(var(--syntax-string)) !important; } .hljs-value { - color: #fbbf24 !important; /* amber-400 */ + color: hsl(var(--syntax-number)) !important; } diff --git a/tailwind.config.js b/tailwind.config.js index 0eedd6f..9caeef3 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,6 +1,5 @@ /** @type {import('tailwindcss').Config} */ module.exports = { - darkMode: ['class'], content: [ './pages/**/*.{js,ts,jsx,tsx,mdx}', './components/**/*.{js,ts,jsx,tsx,mdx}', @@ -53,14 +52,126 @@ module.exports = { border: 'hsl(var(--border))', input: 'hsl(var(--input))', ring: 'hsl(var(--ring))', - chart: { - '1': 'hsl(var(--chart-1))', - '2': 'hsl(var(--chart-2))', - '3': 'hsl(var(--chart-3))', - '4': 'hsl(var(--chart-4))', - '5': 'hsl(var(--chart-5))' - } - }, + chart: { + '1': 'hsl(var(--chart-1))', + '2': 'hsl(var(--chart-2))', + '3': 'hsl(var(--chart-3))', + '4': 'hsl(var(--chart-4))', + '5': 'hsl(var(--chart-5))' + }, + gradient: { + start: 'hsl(var(--gradient-start))', + mid: 'hsl(var(--gradient-mid))', + end: 'hsl(var(--gradient-end))', + accent: { + '1': 'hsl(var(--gradient-accent-1))', + '2': 'hsl(var(--gradient-accent-2))', + '3': 'hsl(var(--gradient-accent-3))' + } + }, + math: { + primary: 'hsl(var(--math-primary))', + secondary: 'hsl(var(--math-secondary))', + accent: 'hsl(var(--math-accent))', + text: 'hsl(var(--math-text))', + relation: 'hsl(var(--math-relation))', + bracket: 'hsl(var(--math-bracket))' + }, + syntax: { + bg: 'hsl(var(--syntax-bg))', + text: 'hsl(var(--syntax-text))', + keyword: 'hsl(var(--syntax-keyword))', + string: 'hsl(var(--syntax-string))', + comment: 'hsl(var(--syntax-comment))', + number: 'hsl(var(--syntax-number))', + function: 'hsl(var(--syntax-function))', + variable: 'hsl(var(--syntax-variable))' + }, + scrollbar: { + track: 'hsl(var(--scrollbar-track))', + thumb: 'hsl(var(--scrollbar-thumb))', + 'humb-hover': 'hsl(var(--scrollbar-thumb-hover))' + }, + // Override default Tailwind colors to use palette variables + slate: { + 950: 'hsl(var(--background))', + 900: 'hsl(var(--background))', + 800: 'hsl(var(--card))', + 700: 'hsl(var(--secondary))', + 600: 'hsl(var(--border))', + 500: 'hsl(var(--muted))', + 400: 'hsl(var(--muted-foreground))', + 300: 'hsl(var(--muted-foreground))', + }, + gray: { + 100: 'hsl(var(--foreground))', + 200: 'hsl(var(--foreground))', + 300: 'hsl(var(--muted-foreground))', + 400: 'hsl(var(--muted-foreground))', + 700: 'hsl(var(--border))', + 800: 'hsl(var(--card))', + 900: 'hsl(var(--background))', + }, + blue: { + 600: 'hsl(var(--gradient-accent-1))', + 500: 'hsl(var(--gradient-accent-1))', + 400: 'hsl(var(--gradient-accent-1))', + }, + purple: { + 600: 'hsl(var(--gradient-accent-2))', + 500: 'hsl(var(--gradient-accent-2))', + 400: 'hsl(var(--gradient-accent-2))', + }, + cyan: { + 600: 'hsl(var(--gradient-accent-3))', + 500: 'hsl(var(--gradient-accent-3))', + 400: 'hsl(var(--gradient-accent-3))', + }, + indigo: { + 900: 'hsl(var(--indigo-900))', + 600: 'hsl(var(--indigo-600))', + 500: 'hsl(var(--indigo-500))', + 400: 'hsl(var(--indigo-400))', + 300: 'hsl(var(--indigo-300))', + }, + green: { + 900: 'hsl(var(--green-900))', + 600: 'hsl(var(--green-600))', + 500: 'hsl(var(--green-500))', + 400: 'hsl(var(--green-400))', + 300: 'hsl(var(--green-300))', + }, + emerald: { + 900: 'hsl(var(--emerald-900))', + 600: 'hsl(var(--emerald-600))', + 500: 'hsl(var(--emerald-500))', + 400: 'hsl(var(--emerald-400))', + 300: 'hsl(var(--emerald-300))', + }, + amber: { + 600: 'hsl(var(--amber-600))', + 500: 'hsl(var(--amber-500))', + 400: 'hsl(var(--amber-400))', + 300: 'hsl(var(--amber-300))', + }, + orange: { + 600: 'hsl(var(--orange-600))', + 500: 'hsl(var(--orange-500))', + 400: 'hsl(var(--orange-400))', + }, + violet: { + 900: 'hsl(var(--violet-900))', + 600: 'hsl(var(--violet-600))', + 500: 'hsl(var(--violet-500))', + 400: 'hsl(var(--violet-400))', + }, + pink: { + 600: 'hsl(var(--pink-600))', + 500: 'hsl(var(--pink-500))', + 400: 'hsl(var(--pink-400))', + }, + white: 'hsl(var(--foreground))' + }, borderRadius: { lg: 'var(--radius)', md: 'calc(var(--radius) - 2px)',