diff --git a/docs/css/best-practices/accessibility.mdx b/docs/css/best-practices/accessibility.mdx
index e345ed2..f186c51 100644
--- a/docs/css/best-practices/accessibility.mdx
+++ b/docs/css/best-practices/accessibility.mdx
@@ -1 +1,149 @@
-
\ No newline at end of file
+---
+title: "CSS Accessibility Best Practices"
+description: "Essential guidelines for using CSS to create accessible web interfaces, focusing on color contrast, focus indicators, responsive design, and motion control."
+keywords: [CSS accessibility, WCAG, color contrast, focus indicators, prefers-reduced-motion, responsive design, accessibility best practices]
+tags: ['css', 'accessibility', 'best-practices', 'a11y']
+sidebar_label: Accessibility
+---
+
+Accessibility in CSS is about ensuring that the presentation layer of your website—the styles, layout, and visual interactions—supports users with disabilities, including those using screen readers, keyboard navigation, or specialized input devices.
+
+Accessible design starts with semantic HTML, but CSS is responsible for ensuring the interface is usable for *everyone*.
+
+
+
+
+## 1. Color Contrast and Readability
+
+Insufficient color contrast is the most common accessibility issue. Users with low vision, color blindness, or those viewing screens in bright sunlight need strong contrast to read text and distinguish interactive elements.
+
+### WCAG Standards
+
+The **Web Content Accessibility Guidelines (WCAG)** define minimum contrast ratios:
+
+ * **AA Standard (Minimum):**
+ * Normal Text: **4.5:1** contrast ratio.
+ * Large Text (18pt or 14pt bold): **3:1** contrast ratio.
+ * **AAA Standard (Enhanced):**
+ * Normal Text: **7:1** contrast ratio.
+
+:::warning Do Not Rely on Color Alone
+Do not use color as the *only* visual means of conveying information. For instance, in a form, don't just turn an invalid input red; add a text error message or an icon.
+:::
+
+### Utility Tips
+
+Use tools or built-in utilities (if available in your framework) that check contrast automatically. If styling manually, use a contrast checker tool for every text-background pairing.
+
+```css title="styles.css"
+/* Ensure strong contrast */
+.text-dark {
+ color: #333333; /* Contrast 12.8:1 against white */
+}
+
+/* Ensure accessible link colors against the background */
+.link {
+ color: #007bff; /* Must have 4.5:1 ratio against the background */
+}
+```
+
+## 2. Focus Indicators (`:focus`)
+
+Keyboard users (who often use the `Tab` key) rely entirely on a visible focus indicator to know which element they are currently interacting with. Removing the default browser outline is a critical accessibility failure.
+
+### A. Never Remove, Always Enhance
+
+It is bad practice to use `outline: none;` without immediately replacing it with a more visible indicator.
+
+```css title="styles.css"
+/* Bad Practice: Removes crucial visual feedback */
+button:focus {
+ outline: none; /* DO NOT DO THIS without replacement */
+}
+
+/* Good Practice: Replace the default outline with a clear, visible box-shadow or border */
+button:focus-visible {
+ outline: 3px solid transparent; /* Ensure default is gone first (if needed) */
+ box-shadow: 0 0 0 4px #4f46e5; /* Use a high-contrast color */
+ border-radius: 4px;
+}
+```
+
+
+
+
+### B. `:focus-visible` (Modern Standard)
+
+The `:focus-visible` pseudo-class is highly recommended. It ensures the focus style is only displayed when the element is focused via the keyboard, *not* when clicked with a mouse. This satisfies accessibility requirements without annoying mouse users.
+
+## 3. Controlling Motion and Animation
+
+Users with vestibular disorders can experience dizziness, nausea, or motion sickness from excessive, sudden, or large-scale animations.
+
+### The `prefers-reduced-motion` Media Query
+
+Use the `prefers-reduced-motion` media query to respect a user's operating system setting that requests minimal animation.
+
+```css title="styles.css"
+/* Default animation */
+.hero-image {
+ transform: translateX(0);
+ transition: transform 0.5s ease-in-out;
+}
+
+/* Override for users who prefer reduced motion */
+@media (prefers-reduced-motion: reduce) {
+ .hero-image {
+ /* Disable all animation */
+ transition: none;
+ /* Set final state immediately */
+ transform: translateX(0) !important;
+ /* Or only use opacity changes */
+ /* transition: opacity 0.5s; */
+ }
+}
+```
+
+:::tip Animation Policy
+When designing interactions, your policy should be: **Animations are decorative, never mandatory.** If an animation is essential to understanding the content, provide an alternative, static presentation.
+:::
+
+## 4. Layout and Responsive Accessibility
+
+Responsive design is an accessibility requirement. Content must be easily viewable and usable regardless of screen size, zoom level, or orientation.
+
+### A. Zooming and Scaling
+
+The use of fixed pixel values (`px`) for font sizes and widths can break layouts when a user zooms in.
+
+ * **Font Size:** Use relative units like `rem` or `em` to ensure text scales with the user's browser settings.
+ * **Layout:** Use fluid units (`%`, `vw`, `fr`) or flexible layouts (Flexbox/Grid) to allow the page to adapt gracefully without horizontal scrolling.
+
+
+
+
+### B. Hiding Content Accessible
+
+Sometimes, you need to visually hide content (e.g., a search label) while keeping it available for screen readers.
+
+ * **Do NOT use `display: none` or `visibility: hidden`:** These hide content from *all* users, including screen readers.
+ * **Use the Visually Hidden Technique:** Apply a set of styles that hides the element visually but keeps it in the accessibility tree.
+
+```css title="styles.css"
+/* Visually hides content but keeps it available for screen readers */
+.visually-hidden {
+ position: absolute;
+ width: 1px;
+ height: 1px;
+ padding: 0;
+ margin: -1px; /* Avoid margin collapsing issues */
+ overflow: hidden;
+ clip: rect(0, 0, 0, 0); /* Legacy hiding technique */
+ white-space: nowrap;
+ border-width: 0;
+}
+```
+
+## Conclusion
+
+By following these CSS accessibility best practices, you can create web interfaces that are inclusive and usable for all users. Always test your designs with real users and assistive technologies to ensure your accessibility efforts are effective. Remember, accessibility is not just a checklist, it's a commitment to providing equal access to information and functionality for everyone.
\ No newline at end of file
diff --git a/docs/css/best-practices/maintainability.mdx b/docs/css/best-practices/maintainability.mdx
index e345ed2..c14aa75 100644
--- a/docs/css/best-practices/maintainability.mdx
+++ b/docs/css/best-practices/maintainability.mdx
@@ -1 +1,206 @@
-
\ No newline at end of file
+---
+title: "CSS Maintainability and Architecture"
+description: "Learn best practices for writing scalable, readable, and easy-to-maintain CSS, focusing on architecture, naming conventions, and style separation for large projects."
+keywords: [CSS maintainability, CSS architecture, BEM, component-based CSS, style organization, OOCSS, SMACSS, CSS guidelines]
+tags: ['css', 'maintainability', 'best-practices', 'architecture', 'bem', 'oocss', 'smacss']
+sidebar_label: Maintainability
+---
+
+Writing CSS for small projects is straightforward. Writing CSS for large, evolving, and collaborative applications requires a structured, architectural approach to ensure the codebase remains **readable, scalable, and easy to debug** over time.
+
+Maintainable CSS is predictable CSS.
+
+
+
+
+## 1. The Core Principles of Maintainability
+
+### A. Predictability
+
+Styles should apply consistently, and developers should immediately know what an element will look like just by looking at its class names. This is where specificity control (e.g., using Cascade Layers) and naming conventions (e.g., BEM) are crucial.
+
+### B. Scalability
+
+The architecture must support growth without increasing complexity. Adding a new component should not require modifying existing, unrelated CSS files.
+
+### C. Readability
+
+Styles should be organized logically, comments should explain complex intent, and naming should be explicit, not cryptic.
+
+## 2. Naming Conventions: BEM and Utility-First
+
+A robust naming convention is the backbone of maintainable CSS. It minimizes naming conflicts and reduces the need for high specificity.
+
+### A. Block, Element, Modifier (BEM)
+
+BEM is an organization strategy that ensures CSS selectors are flat, highly specific (via single classes), and highly descriptive. It enforces modularity by limiting selectors to a single class, removing dependency on the HTML structure.
+
+| Part | Notation | Example | Description |
+| :--- | :--- | :--- | :--- |
+| **Block** | `block` | `.card` | Independent, reusable component (e.g., a header, a card). |
+| **Element** | `block__element` | `.card__title` | A part of a block that cannot be used separately. |
+| **Modifier** | `block--modifier` | `.card--dark` | A flag on a block or element to change its appearance or behavior. |
+
+```css title="styles.css"
+/* BEM Example */
+
+/* Block: Defines the container structure */
+.card {
+ border: 1px solid #ccc;
+ padding: 16px;
+}
+
+/* Element: Only applies inside the .card block */
+.card__title {
+ font-size: 1.5rem;
+ margin-bottom: 8px;
+}
+
+/* Modifier: A variant of the Block */
+.card--dark {
+ background-color: #333;
+ color: white;
+}
+```
+
+
+
+
+### B. Utility-First (Tailwind CSS)
+
+Frameworks like Tailwind prioritize maintainability by eliminating custom CSS entirely. Maintainability comes from:
+
+1. **Scope Control:** Styles are applied directly to the element via classes, making the scope local.
+2. **No Naming Decisions:** Developers spend no time on complex naming conventions.
+3. **Encapsulation:** Every component carries its styles with it, guaranteeing predictability.
+
+**For Example:**
+
+```html title="index.html"
+
+
+
Card Title
+
This is a simple card component.
+
+```
+
+## 3. Architectural Separation (SMACSS/OOCSS)
+
+For projects using traditional CSS or preprocessors, styles should be separated into logical files based on their purpose.
+
+### A. SMACSS (Scalable and Modular Architecture for CSS)
+
+SMACSS suggests organizing files based on five style categories:
+
+| Category | Description | Examples |
+| :--- | :--- | :--- |
+| **Base** | Default, unclassed element styles. | `body`, `h1`, `a`, `input` |
+| **Layout** | Major structural components and grid. | `#header`, `.l-sidebar`, `.grid-layout` |
+| **Module** | Reusable, independent components. | `.card`, `.button`, `.modal` |
+| **State** | Styles describing transient states. | `.is-hidden`, `.is-active`, `[aria-expanded="true"]` |
+| **Theme** | Overrides for colors, fonts, and images. | `.t-dark-mode` |
+
+
+
+
+### B. Object-Oriented CSS (OOCSS)
+
+OOCSS promotes two core concepts to increase code reuse:
+
+1. **Separate Structure and Skin:** Keep the structural properties (`width`, `height`, `margin`) separate from the visual properties (`color`, `border`, `background`).
+ * *Example:* A `.media-object` class defines the padding and display, while `.red-theme` defines the border color.
+2. **Separate Container and Content:** Styles should not be dependent on where they are placed. Avoid location-dependent selectors (e.g., `#sidebar h2`).
+
+**For Example:**
+
+```css title="styles.css"
+/* Structure */
+.media-object {
+ display: flex;
+ padding: 16px;
+}
+.media-object__image {
+ margin-right: 16px;
+}
+.media-object__content {
+ flex: 1;
+}
+/* Skin */
+.red-theme {
+ border: 2px solid red;
+ background-color: #ffe5e5;
+}
+```
+
+## 4. Documentation and Comments
+
+CSS is often the least documented part of a codebase. Good documentation is crucial for maintenance.
+
+### A. File-Level and Section Comments
+
+Every CSS file should start with a header explaining its purpose, dependencies, and author. Within the file, use large comment blocks to delineate major sections.
+
+```css title="styles.css"
+/* ------------------------------------
+/* COMPONENTS: CARD MODULE (.card)
+/* Dependencies: none
+/* Description: Reusable container for content blocks.
+/* ------------------------------------ */
+```
+
+### B. Explaining Specificity Hacks
+
+If you *must* use `!important` or high specificity (e.g., an ID selector), provide a clear, detailed comment explaining:
+
+1. *Why* the high specificity was necessary (e.g., "Must override third-party library X").
+2. What styles the selector is intended to override.
+
+
+
+
+## 5. Preprocessor and Postprocessor Organization
+
+If using a tool like Sass or Less, leverage its features for maintainability:
+
+1. **Variables and Mixins:** Centralize common values (colors, fonts, breakpoints) into variables and reuse blocks of code via mixins.
+2. **Nesting (Use Sparingly):** Limit nesting to a maximum of two or three levels deep to prevent complex, high-specificity selectors that break predictability.
+3. **Partials:** Use `@import` or `@use` to break the monolithic CSS file into smaller, focused partials (e.g., `_buttons.scss`, `_variables.scss`, `_layout.scss`).
+
+
+
+```scss
+// Variables
+$primary-color: #1d4ed8;
+$secondary-color: #9333ea;
+// Mixin
+@mixin button-styles {
+ padding: 8px 16px;
+ border: none;
+ border-radius: 4px;
+ cursor: pointer;
+}
+
+.button {
+ @include button-styles;
+ background-color: $primary-color;
+ color: white;
+}
+```
+
+
+```css
+.button {
+ padding: 8px 16px;
+ border: none;
+ border-radius: 4px;
+ background-color: #1d4ed8; /* $primary-color */
+ color: white;
+ cursor: pointer;
+}
+```
+
+
+
+## Conclusion
+
+Maintainable CSS is essential for large-scale web applications. By following structured naming conventions like BEM, organizing styles using architectural patterns like SMACSS or OOCSS, and documenting your code effectively, you can ensure that your CSS remains scalable, readable, and easy to maintain over time. Always prioritize predictability and clarity in your styles to facilitate collaboration and future development.
\ No newline at end of file
diff --git a/docs/css/best-practices/naming-conventions.mdx b/docs/css/best-practices/naming-conventions.mdx
index e345ed2..592c513 100644
--- a/docs/css/best-practices/naming-conventions.mdx
+++ b/docs/css/best-practices/naming-conventions.mdx
@@ -1 +1,191 @@
-
\ No newline at end of file
+---
+title: "CSS Naming Conventions and Architecture"
+description: "Master essential CSS naming conventions like BEM and utility-first to create predictable, scalable, and maintainable styles in large-scale applications."
+keywords: [CSS naming conventions, BEM, Block Element Modifier, utility-first CSS, kebab-case, CSS best practices, OOCSS, SMACSS]
+tags: [CSS naming conventions, BEM, Block Element Modifier, utility-first CSS, kebab-case, CSS best practices, OOCSS, SMACSS]
+sidebar_label: Naming Conventions
+---
+
+The global nature of CSS means that styles written for one component can accidentally interfere with another. **CSS Naming Conventions** solve this problem by providing a systematic way to name classes, making them highly descriptive and ensuring their effects are predictable and localized.
+
+A good naming convention leads to:
+
+1. **Low Specificity:** Classes are easy to override without needing `!important`.
+2. **Modularity:** Classes are independent of the HTML structure.
+3. **Readability:** Developers immediately understand a class's purpose and scope.
+
+
+
+
+## 1. Block, Element, Modifier (BEM)
+
+BEM is the most widely adopted and influential naming convention. It enforces a strict, flat structure that clearly delineates the component, its internal parts, and its variations. This effectively controls the global cascade by ensuring selectors are only one class deep.
+
+### BEM Structure
+
+BEM names consist of three distinct parts, separated by specific delimiters:
+
+| Part | Notation | Example | Description |
+| :--- | :--- | :--- | :--- |
+| **Block** | `block` | `.card` | An independent, reusable component. |
+| **Element** | `block__element` | `.card__title` | A part of the Block that has no meaning outside of it. |
+| **Modifier** | `block--modifier` | `.card--dark` | A variation or flag that changes the Block or Element's appearance. |
+
+### BEM Example
+
+The BEM convention clearly communicates the relationship between the HTML elements.
+
+
+
+
+```html
+
+
+
+
+
+
+
+
Jane Doe
+
+
+
+
+```
+
+
+
+
+```css
+/* Block: Low specificity, high reuse */
+.profile-card {
+ padding: 1rem;
+ border: 1px solid #ccc;
+}
+
+/* Element: Targets a specific part */
+.profile-card__avatar {
+ border-radius: 50%;
+ width: 60px;
+}
+
+/* Modifier: Specific variation of the block */
+.profile-card--active {
+ background-color: #e5f4ff;
+ border-color: #3b82f6;
+}
+
+/* Modifier: Specific variation of the element (the button) */
+.profile-card__button--small {
+ font-size: 0.8rem;
+ padding: 0.25rem 0.5rem;
+}
+```
+
+
+
+
+:::tip BEM Specificity
+BEM selectors almost always result in a specificity of `0,1,0,0` (one class selector), ensuring that all classes are easily overridden by each other and preventing specificity wars.
+:::
+
+
+
+
+## 2. Utility-First Naming (Atomic CSS)
+
+Frameworks like Tailwind CSS represent the ultimate form of naming predictability. Instead of naming an *object* (like `.card`), you name its *properties* (like `.p-4`, `.shadow-lg`).
+
+### Characteristics of Utility-First
+
+1. **Single-Responsibility:** Each class does exactly one thing (e.g., `text-xl` only sets `font-size`).
+2. **No Custom Naming:** The convention is predefined by the framework (e.g., `ml-4` for `margin-left: 1rem`).
+3. **High Predictability:** You know exactly what styles are applied just by reading the HTML.
+
+```html title="index.html"
+
+
+```
+
+:::info Scalability Impact
+Utility-first CSS solves scalability by eliminating the cascade between components. Since styles are localized to the HTML, there are no side effects when modifying the appearance of one component.
+:::
+
+## 3. General Naming Best Practices
+
+Regardless of the primary convention you choose, following these universal rules ensures readability and maintenance.
+
+### A. Use Kebab-Case
+
+Always use **kebab-case** (hyphens) for class names, file names, and directories in CSS.
+
+| Convention | Example | Use |
+| :--- | :--- | :--- |
+| **Kebab-case (Recommended)** | `modal-header`, `user-profile` | CSS class names, component folders. |
+| **CamelCase** | `modalHeader` | JavaScript variables, not CSS. |
+| **Snake_case** | `modal_header` | Rarely used in modern frontend development. |
+
+### B. Avoid Location-Dependent Naming
+
+Never name a class based on its position in the HTML document (`.left-sidebar-nav`, `.header-button`). If the element moves, the name becomes meaningless or misleading.
+
+| Avoid | Prefer | Rationale |
+| :--- | :--- | :--- |
+| `.sidebar-profile-box` | `.profile-card` | The card should work anywhere, not just the sidebar. |
+| `.last-item` | `.list-item--last` | Use a BEM modifier or pseudo-classes (`:last-child`). |
+
+### C. Use Scope Prefixes
+
+For very large projects or when integrating third-party code, use a custom prefix to namespace your own styles. This prevents conflicts with external libraries.
+
+```css title="styles.css"
+/* Custom prefix: 'ch' for CodeHarborHub */
+.ch-modal {}
+.ch-button--primary {}
+```
+
+
+
+
+## 4. Other Architectural Naming Systems
+
+While BEM and Utility-First dominate, other systems offer valuable structure:
+
+### A. SMACSS (Scalable and Modular Architecture for CSS)
+
+SMACSS uses prefixes to denote the **category** of the style, enforcing separation between layers:
+
+| Prefix | Meaning | Example |
+| :--- | :--- | :--- |
+| `l-` | **Layout** (major structure) | `.l-sidebar` |
+| `is-` / `has-` | **State** (status flags) | `.is-active`, `.has-error` |
+| (None) | **Module/Component** | `.card` |
+
+### B. OOCSS (Object-Oriented CSS)
+
+OOCSS promotes naming reusable style "objects" that are not specific to content. Its principles are the foundation for BEM and Utility-First:
+
+1. **Separate Structure and Skin:** Naming classes for structure (`.media-layout`) separately from classes for visuals (`.rounded-red`).
+2. **Separate Container and Content:** Ensuring a module name like `.accordion` never uses a location-dependent selector (e.g., `.sidebar .accordion`).
+
+```css title="styles.css"
+/* Structure */
+.accordion {
+ border: 1px solid #ccc;
+}
+.accordion__item {
+ padding: 1rem;
+}
+
+/* Skin */
+.accordion--dark {
+ background-color: #333;
+ color: white;
+}
+```
+
+## Conclusion
+
+Choosing and consistently applying a CSS naming convention is crucial for building maintainable, scalable stylesheets. Whether you adopt BEM for its clarity and modularity, Utility-First for its predictability and isolation, or a hybrid approach incorporating SMACSS or OOCSS principles, the key is consistency. Clear, descriptive names empower developers to understand and modify styles confidently, reducing bugs and improving collaboration across teams.
\ No newline at end of file
diff --git a/docs/css/best-practices/performance.mdx b/docs/css/best-practices/performance.mdx
index e345ed2..7d6d1d0 100644
--- a/docs/css/best-practices/performance.mdx
+++ b/docs/css/best-practices/performance.mdx
@@ -1 +1,204 @@
-
\ No newline at end of file
+---
+title: "CSS Performance Optimization"
+description: "Essential techniques for writing high performance CSS that reduces layout reflows, improves rendering speed, and ensures smooth user interfaces."
+keywords: [CSS performance, optimization, reflow, repaint, browser rendering, layout shift, hardware acceleration, critical CSS, BEM]
+tags: [CSS performance, optimization, reflow, repaint, browser rendering, layout shift, hardware acceleration, critical CSS, BEM]
+sidebar_label: Performance
+---
+
+CSS is not just about aesthetics; how it is written and managed directly impacts webpage performance, especially load times and perceived responsiveness. Poorly optimized CSS can lead to slow loading, janky scrolling, and frustrating user experiences due to excessive **Reflow** (Layout) and **Repaint**.
+
+Optimizing CSS means improving the browser's ability to process styles, compute layouts, and paint pixels quickly.
+
+
+
+
+## 1. Understanding the Rendering Bottlenecks
+
+The browser rendering process involves several steps. Performance issues typically occur in the **Layout** and **Paint** stages.
+
+1. **Style Calculation:** Applying all CSS rules to the DOM elements.
+2. **Layout (Reflow):** Calculating the size and position of every element on the screen.
+3. **Paint (Repaint):** Filling in the pixels (colors, borders, backgrounds).
+4. **Compositing:** Drawing layers onto the screen.
+
+### A. Reflow (Layout)
+
+**Reflow** is the most expensive operation. It happens when the browser needs to re-calculate the geometric information (size/position) of elements. A change in one element (like increasing its width) can force all subsequent elements to recalculate their position.
+
+**Reflow triggers include:**
+
+ * Modifying dimensions (`width`, `height`, `margin`, `padding`).
+ * Changing font size or family.
+ * Manipulating the DOM structure (adding, removing, moving elements).
+
+### B. Repaint
+
+**Repaint** is less expensive than Reflow. It occurs when an element's visibility is changed without altering its layout (e.g., changing `color`, `background-color`, or `box-shadow`).
+
+## 2. Fast CSS Selectors
+
+The browser reads CSS selectors from **right to left**. Complex, descendant selectors are slow because the browser first finds all potential target elements and then verifies the ancestry for each one.
+
+### A. Prioritize Simple Selectors
+
+**Slow Selectors (Avoid):**
+
+ * **Universal Selectors:** `* {}` (Applies to everything, forcing massive computation).
+ * **Deep Descendant Selectors:** `.nav li a {}` (Must check many layers).
+ * **Key Selectors (rightmost part):** `div > .button` (Browsers find every `.button` first, then check if its parent is a `div`).
+
+**Fast Selectors (Prefer):**
+
+ * **ID Selector:** `#id` (Extremely fast, unique).
+ * **Class Selector:** `.class` (Fast, highly targeted).
+ * **Element Selector:** `h1` (Fast, limited scope).
+
+### B. Embrace Methodologies (BEM)
+
+Methodologies like BEM (Block, Element, Modifier) encourage flat, highly specific, and reusable class names. This speeds up the browser's style matching because it rarely needs to check ancestry.
+
+```css title="styles.css"
+/* Slow: Descendant check required */
+.navigation li a { ... }
+
+/* Fast: Simple class lookup */
+.nav__item-link { ... }
+```
+
+
+
+
+## 3. Optimizing Layout and Rendering
+
+You can dramatically reduce Reflows by telling the browser to handle changes in a way that doesn't affect surrounding elements.
+
+### A. Use Transforms over Geometry
+
+When animating or moving elements, use **CSS Transforms** (`transform: translate(...)`, `scale(...)`) and **Opacity** (`opacity`) instead of changing properties like `top`, `left`, `width`, or `margin`.
+
+Transforms and opacity can often be handled by the GPU (Hardware Acceleration), bypassing the main browser thread and avoiding Reflow/Repaint entirely.
+
+```css title="styles.css"
+/* Slow Animation (Triggers Reflow) */
+.box {
+ transition: margin-left 0.3s;
+ margin-left: 100px;
+}
+
+/* Fast Animation (GPU Accelerated) */
+.box {
+ transition: transform 0.3s;
+ transform: translateX(100px);
+}
+```
+
+### B. Minimize Scope with Absolute/Fixed Positioning
+
+If an element must be moved with `top`/`left`, consider taking it out of the normal document flow using `position: absolute` or `position: fixed`. This limits the scope of the Reflow: only the positioned element's layout is recalculated, not its siblings or ancestors.
+
+### C. The Power of `will-change`
+
+The `will-change` property hints to the browser about which properties you intend to change in the future (e.g., during an animation). This allows the browser to optimize for that change ahead of time, often by promoting the element to its own rendering layer.
+
+```css title="styles.css"
+.animated-element {
+ /* Tell the browser to optimize for transform and opacity changes */
+ will-change: transform, opacity;
+}
+```
+
+
+
+
+## 4. Critical CSS and Loading
+
+**Critical CSS** involves delivering the minimal amount of CSS required to render the "above-the-fold" content (the visible part of the page) immediately.
+
+### A. Inline Critical Styles
+
+Extract the CSS needed for the viewport and inject it directly into the HTML document using `
+
+
+
+
+```
+
+### B. Asynchronous Loading
+
+Load the rest of the non-critical CSS asynchronously (using the technique shown above) or by moving the `` tag to the end of the ``. This ensures the main content is readable sooner.
+
+
+
+
+## 5. File Size and Organization
+
+### A. Minification and Compression
+
+Ensure all production CSS is **minified** (whitespace and comments removed) and delivered with **Gzip or Brotli compression**. This significantly reduces file transfer size.
+
+### B. Removal of Unused CSS
+
+Large frameworks (like Bootstrap or older versions of Tailwind) can contain thousands of unused styles. Use tools (like PurgeCSS or native framework configuration) to analyze your markup and remove any unused classes from the final bundle.
+
+### C. Use CSS Custom Properties
+
+While Custom Properties (`--variable-name`) don't dramatically affect rendering speed, they simplify maintenance and reduce repetition, leading to smaller overall file sizes, which benefits performance.
+
+```css title="styles.css"
+:root {
+ --primary-color: #3490dc;
+ --secondary-color: #ffed4a;
+ }
+.button {
+ background-color: var(--primary-color);
+ color: white;
+}
+.button-secondary {
+ background-color: var(--secondary-color);
+ color: black;
+}
+```
+
+## Icon Styling Best Practices
+
+When incorporating icons into your web projects, it's essential to ensure they are styled consistently and aligned properly with surrounding text or elements. Here are some best practices for styling icons using Tailwind CSS.
+
+### A. Flexbox for Alignment
+
+Using Flexbox is the most reliable way to align icons with text. Wrap the icon and text in a flex container and use `items-center` to vertically center them.
+
+```html title="index.html"
+
+
+ Dashboard
+
+```
+
+### B. Sizing Icons
+
+Icons should be sized appropriately to match the text size. Use Tailwind's width (`w-`) and height (`h-`) utilities to control icon dimensions.
+
+```html title="index.html"
+
+Settings
+```
+
+### C. Coloring Icons
+
+Use Tailwind's text color utilities to color icons. For SVG icons, ensure the `fill` or `stroke` attributes are set to `currentColor` so they inherit the text color.
+
+```html title="index.html"
+
+```
+
diff --git a/docs/css/best-practices/scalability.mdx b/docs/css/best-practices/scalability.mdx
index e345ed2..f085271 100644
--- a/docs/css/best-practices/scalability.mdx
+++ b/docs/css/best-practices/scalability.mdx
@@ -1 +1,182 @@
-
\ No newline at end of file
+---
+title: "CSS Scalability for Large Applications"
+description: "Achieve long-term CSS success by implementing robust architectural patterns, component isolation techniques, and modern features like Custom Properties for highly scalable and maintainable codebases."
+keywords: [CSS scalability, large-scale CSS architecture, modular CSS, custom properties, CSS variables, SMACSS, BEM, CSS preprocessors, tooling]
+tags: [CSS scalability, large-scale CSS architecture, modular CSS, custom properties, CSS variables, SMACSS, BEM, CSS preprocessors, tooling]
+sidebar_label: Scalability
+---
+
+**CSS Scalability** is the ability of a stylesheet codebase to grow over time without becoming a source of bugs, conflicts, or developer friction. As projects increase in complexity, the global nature of CSS makes it prone to side effects—where changing one style breaks an unrelated part of the application.
+
+Achieving scalability requires establishing clear boundaries, conventions, and architectural layers to control the cascade.
+
+
+
+
+## 1. Establishing Architectural Layers (SMACSS)
+
+One of the most effective strategies for scalability is adopting a layered architecture, such as **SMACSS (Scalable and Modular Architecture for CSS)**. This approach separates your styles into distinct, predictable categories, enforcing structure and controlling the cascade.
+
+
+
+
+### A. Base and Layout
+
+| Layer | Purpose | Content | Priority |
+| :--- | :--- | :--- | :--- |
+| **Base** | Default styles applied to bare elements. | `reset.css`, `body`, `h1`, `a`, form elements. | Lowest. |
+| **Layout** | Defines the major page sections and containers. | Grid systems, headers, footers, sidebars (`.l-main-content`). | Low. |
+
+### B. Module (Components)
+
+This is the largest and most critical layer for scalability. Modules are reusable, independent components (e.g., a card, a modal, a button).
+
+:::tip Key Scalability Rule
+Styles within a module **must not** rely on the styles defined in the Layout or Base layers, except for global resets. A module should render correctly regardless of where it is placed on the page.
+:::
+
+### C. State and Theme
+
+| Layer | Purpose | Notation/Scope |
+| :--- | :--- | :--- |
+| **State** | Describes how a module or layout looks in a particular state. | Prefixed classes like `.is-active`, `.has-error`. Always override module/layout styles. |
+| **Theme** | Provides visual variations (e.g., color scheme, dark mode). | Separate files or variables that globally modify the look. |
+
+
+
+
+## 2. Component Isolation and Modularity
+
+Scalability hinges on making components independent. When every component manages its own styles, you can add, remove, or modify it without fear of global side effects.
+
+### A. Flat Naming (BEM)
+
+As discussed in maintainability, **BEM** (Block\_\_Element--Modifier) forces low, predictable specificity (e.g., `0,0,1,0`). This prevents styles from bleeding between components.
+
+```css title="styles.css"
+/* Avoid reliance on HTML structure */
+.product-card > h2 { color: red; } /* High specificity, easily broken */
+
+/* BEM Style: Flat and predictable */
+.product-card__title { color: var(--product-title-color); }
+```
+
+### B. Utility-First Frameworks (The Modern Approach)
+
+The utility-first paradigm (like Tailwind CSS) takes component isolation to the extreme. Since all styles are applied via single-purpose classes on the element itself, there is **zero cascade** between components, making scaling incredibly simple.
+
+
+
+
+```css
+/* Requires careful selector naming and file separation */
+.card-component {
+ background-color: white;
+ padding: 1rem;
+}
+.card-component__title {
+ font-size: 1.25rem;
+}
+```
+
+
+
+
+```html
+
+
+
+ Scalable Card Title
+
+
+```
+
+
+
+
+
+
+
+## 3. The Power of CSS Custom Properties
+
+Custom Properties (CSS Variables) are a modern feature that drastically improves scalability by centralizing values and simplifying theme management.
+
+### A. Dry Code
+
+By defining colors, spacing, and typography once, you avoid repeating values throughout your stylesheets.
+
+```css title="styles.css"
+:root {
+ --color-primary: #1e3a8a; /* Blue-900 */
+ --spacing-unit: 8px;
+}
+
+.button {
+ background: var(--color-primary);
+ padding: calc(var(--spacing-unit) * 2); /* Modular spacing */
+}
+```
+
+### B. Theme Scalability
+
+Custom Properties enable true runtime theming. To introduce a "dark mode," you only need to override the variables on a higher selector (like the `body` or a dedicated `.theme--dark` class), and all dependent components update automatically.
+
+```css title="styles.css"
+.theme--dark {
+ /* Override the global variable */
+ --color-primary: #3b82f6; /* Blue-500 */
+ --color-text: #f3f4f6;
+
+ /* All components using var(--color-primary) are instantly themed */
+}
+```
+
+:::info Custom Properties vs. Preprocessor Variables
+CSS Custom Properties are *dynamic* (they can be changed at runtime via JavaScript), while preprocessor variables (like Sass `$variables`) are *static* (they are compiled once and cannot be changed by the browser). Use both\!
+:::
+
+
+
+
+## 4. Tooling and Automation
+
+Scalability often depends on your build tools being smart enough to manage large codebases efficiently.
+
+### A. Preprocessor Organization
+
+Leverage preprocessors (Sass, Less) to break your styles into hundreds of small, manageable files called **Partials**.
+
+Your main stylesheet should become a simple manifest of imports:
+
+```scss title="styles.scss"
+/* main.scss */
+
+// 1. Variables and Mixins
+@use 'abstracts/variables';
+@use 'abstracts/mixins';
+
+// 2. Base styles
+@use 'base/reset';
+@use 'base/typography';
+
+// 3. Layouts
+@use 'layout/header';
+@use 'layout/grid';
+
+// 4. Components (Modules)
+@use 'components/button';
+@use 'components/card';
+@use 'components/modal';
+```
+
+### B. Purging Unused CSS
+
+In large projects, unused CSS accumulates quickly. Use PostCSS plugins like **PurgeCSS** to scan your HTML/JS files and strip out any CSS classes that are not detected in your markup. This ensures your final production bundle is as small as possible, regardless of how many libraries or components you are using.
+
+:::warning The Trade-Off
+While Purging is vital for performance, it requires careful configuration. Ensure dynamic classes (e.g., classes toggled by JavaScript, or utility classes used in non-standard ways) are included in the 'safelist' to prevent them from being accidentally removed.
+:::
+
+## Conclusion
+
+By implementing these CSS scalability best practices, you can build large, complex applications that remain maintainable and performant over time. Establish clear architectural layers, isolate components, leverage modern CSS features like Custom Properties, and utilize tooling to manage complexity. Scalability is not just about writing code that works today—it's about creating a foundation that can grow and adapt as your project evolves.
\ No newline at end of file
diff --git a/docs/css/best-practices/smacss-architectural-layers-diagram.jpg b/docs/css/best-practices/smacss-architectural-layers-diagram.jpg
new file mode 100644
index 0000000..7e24e43
Binary files /dev/null and b/docs/css/best-practices/smacss-architectural-layers-diagram.jpg differ
diff --git a/docusaurus.config.js b/docusaurus.config.js
index 0c3db4f..2d7ca29 100644
--- a/docusaurus.config.js
+++ b/docusaurus.config.js
@@ -328,6 +328,7 @@ const config = {
"http",
"latex",
"markdown",
+ "scss",
],
},
docs: {