Skip to content

Create beautiful slides on the web using a coding agent's frontend skills

Restructure skill for progressive disclosure — reduce context bloat ~70%

Zara Zhangb206c50c5a39
diff --git a/SKILL.md b/SKILL.md
index 98b367d..bd3f063 100644
--- a/SKILL.md
+++ b/SKILL.md
@@ -3,566 +3,130 @@ name: frontend-slides
description: Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual exploration rather than abstract choices.
---
-# Frontend Slides Skill
+# Frontend Slides
-Create zero-dependency, animation-rich HTML presentations that run entirely in the browser. This skill helps non-designers discover their preferred aesthetic through visual exploration ("show, don't tell"), then generates production-quality slide decks.
+Create zero-dependency, animation-rich HTML presentations that run entirely in the browser.
-## Core Philosophy
+## Core Principles
1. **Zero Dependencies** — Single HTML files with inline CSS/JS. No npm, no build tools.
-2. **Show, Don't Tell** — People don't know what they want until they see it. Generate visual previews, not abstract choices.
-3. **Distinctive Design** — Avoid generic "AI slop" aesthetics. Every presentation should feel custom-crafted.
-4. **Production Quality** — Code should be well-commented, accessible, and performant.
-5. **Viewport Fitting (CRITICAL)** — Every slide MUST fit exactly within the viewport. No scrolling within slides, ever. This is non-negotiable.
+2. **Show, Don't Tell** — Generate visual previews, not abstract choices. People discover what they want by seeing it.
+3. **Distinctive Design** — No generic "AI slop." Every presentation must feel custom-crafted.
+4. **Viewport Fitting (NON-NEGOTIABLE)** — Every slide MUST fit exactly within 100vh. No scrolling within slides, ever. Content overflows? Split into multiple slides.
----
+## Design Aesthetics
+
+You tend to converge toward generic, "on distribution" outputs. In frontend design, this creates what users call the "AI slop" aesthetic. Avoid this: make creative, distinctive frontends that surprise and delight.
+
+Focus on:
+- Typography: Choose fonts that are beautiful, unique, and interesting. Avoid generic fonts like Arial and Inter; opt instead for distinctive choices that elevate the frontend's aesthetics.
+- Color & Theme: Commit to a cohesive aesthetic. Use CSS variables for consistency. Dominant colors with sharp accents outperform timid, evenly-distributed palettes. Draw from IDE themes and cultural aesthetics for inspiration.
+- Motion: Use animations for effects and micro-interactions. Prioritize CSS-only solutions for HTML. Use Motion library for React when available. Focus on high-impact moments: one well-orchestrated page load with staggered reveals (animation-delay) creates more delight than scattered micro-interactions.
+- Backgrounds: Create atmosphere and depth rather than defaulting to solid colors. Layer CSS gradients, use geometric patterns, or add contextual effects that match the overall aesthetic.
+
+Avoid generic AI-generated aesthetics:
+- Overused font families (Inter, Roboto, Arial, system fonts)
+- Cliched color schemes (particularly purple gradients on white backgrounds)
+- Predictable layouts and component patterns
+- Cookie-cutter design that lacks context-specific character
-## CRITICAL: Viewport Fitting Requirements
+Interpret creatively and make unexpected choices that feel genuinely designed for the context. Vary between light and dark themes, different fonts, different aesthetics. You still tend to converge on common choices (Space Grotesk, for example) across generations. Avoid this: it is critical that you think outside the box!
-**This section is mandatory for ALL presentations. Every slide must be fully visible without scrolling on any screen size.**
+## Viewport Fitting Rules
-### The Golden Rule
+These invariants apply to EVERY slide in EVERY presentation:
-```
-Each slide = exactly one viewport height (100vh/100dvh)
-Content overflows? → Split into multiple slides or reduce content
-Never scroll within a slide.
-```
+- Every `.slide` must have `height: 100vh; height: 100dvh; overflow: hidden;`
+- ALL font sizes and spacing must use `clamp(min, preferred, max)` — never fixed px/rem
+- Content containers need `max-height` constraints
+- Images: `max-height: min(50vh, 400px)`
+- Breakpoints required for heights: 700px, 600px, 500px
+- Include `prefers-reduced-motion` support
-### Content Density Limits
+**When generating, read `viewport-base.css` and include its full contents in every presentation.**
-To guarantee viewport fitting, enforce these limits per slide:
+### Content Density Limits Per Slide
| Slide Type | Maximum Content |
|------------|-----------------|
| Title slide | 1 heading + 1 subtitle + optional tagline |
| Content slide | 1 heading + 4-6 bullet points OR 1 heading + 2 paragraphs |
-| Feature grid | 1 heading + 6 cards maximum (2x3 or 3x2 grid) |
-| Code slide | 1 heading + 8-10 lines of code maximum |
+| Feature grid | 1 heading + 6 cards maximum (2x3 or 3x2) |
+| Code slide | 1 heading + 8-10 lines of code |
| Quote slide | 1 quote (max 3 lines) + attribution |
| Image slide | 1 heading + 1 image (max 60vh height) |
-**If content exceeds these limits → Split into multiple slides**
-
-### Required CSS Architecture
-
-Every presentation MUST include this base CSS for viewport fitting:
-
-```css
-/* ===========================================
- VIEWPORT FITTING: MANDATORY BASE STYLES
- These styles MUST be included in every presentation.
- They ensure slides fit exactly in the viewport.
- =========================================== */
-
-/* 1. Lock html/body to viewport */
-html, body {
- height: 100%;
- overflow-x: hidden;
-}
-
-html {
- scroll-snap-type: y mandatory;
- scroll-behavior: smooth;
-}
-
-/* 2. Each slide = exact viewport height */
-.slide {
- width: 100vw;
- height: 100vh;
- height: 100dvh; /* Dynamic viewport height for mobile browsers */
- overflow: hidden; /* CRITICAL: Prevent ANY overflow */
- scroll-snap-align: start;
- display: flex;
- flex-direction: column;
- position: relative;
-}
-
-/* 3. Content container with flex for centering */
-.slide-content {
- flex: 1;
- display: flex;
- flex-direction: column;
- justify-content: center;
- max-height: 100%;
- overflow: hidden; /* Double-protection against overflow */
- padding: var(--slide-padding);
-}
-
-/* 4. ALL typography uses clamp() for responsive scaling */
-:root {
- /* Titles scale from mobile to desktop */
- --title-size: clamp(1.5rem, 5vw, 4rem);
- --h2-size: clamp(1.25rem, 3.5vw, 2.5rem);
- --h3-size: clamp(1rem, 2.5vw, 1.75rem);
-
- /* Body text */
- --body-size: clamp(0.75rem, 1.5vw, 1.125rem);
- --small-size: clamp(0.65rem, 1vw, 0.875rem);
-
- /* Spacing scales with viewport */
- --slide-padding: clamp(1rem, 4vw, 4rem);
- --content-gap: clamp(0.5rem, 2vw, 2rem);
- --element-gap: clamp(0.25rem, 1vw, 1rem);
-}
-
-/* 5. Cards/containers use viewport-relative max sizes */
-.card, .container, .content-box {
- max-width: min(90vw, 1000px);
- max-height: min(80vh, 700px);
-}
-
-/* 6. Lists auto-scale with viewport */
-.feature-list, .bullet-list {
- gap: clamp(0.4rem, 1vh, 1rem);
-}
-
-.feature-list li, .bullet-list li {
- font-size: var(--body-size);
- line-height: 1.4;
-}
-
-/* 7. Grids adapt to available space */
-.grid {
- display: grid;
- grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
- gap: clamp(0.5rem, 1.5vw, 1rem);
-}
-
-/* 8. Images constrained to viewport */
-img, .image-container {
- max-width: 100%;
- max-height: min(50vh, 400px);
- object-fit: contain;
-}
-
-/* ===========================================
- RESPONSIVE BREAKPOINTS
- Aggressive scaling for smaller viewports
- =========================================== */
-
-/* Short viewports (< 700px height) */
-@media (max-height: 700px) {
- :root {
- --slide-padding: clamp(0.75rem, 3vw, 2rem);
- --content-gap: clamp(0.4rem, 1.5vw, 1rem);
- --title-size: clamp(1.25rem, 4.5vw, 2.5rem);
- --h2-size: clamp(1rem, 3vw, 1.75rem);
- }
-}
-
-/* Very short viewports (< 600px height) */
-@media (max-height: 600px) {
- :root {
- --slide-padding: clamp(0.5rem, 2.5vw, 1.5rem);
- --content-gap: clamp(0.3rem, 1vw, 0.75rem);
- --title-size: clamp(1.1rem, 4vw, 2rem);
- --body-size: clamp(0.7rem, 1.2vw, 0.95rem);
- }
-
- /* Hide non-essential elements */
- .nav-dots, .keyboard-hint, .decorative {
- display: none;
- }
-}
-
-/* Extremely short (landscape phones, < 500px height) */
-@media (max-height: 500px) {
- :root {
- --slide-padding: clamp(0.4rem, 2vw, 1rem);
- --title-size: clamp(1rem, 3.5vw, 1.5rem);
- --h2-size: clamp(0.9rem, 2.5vw, 1.25rem);
- --body-size: clamp(0.65rem, 1vw, 0.85rem);
- }
-}
-
-/* Narrow viewports (< 600px width) */
-@media (max-width: 600px) {
- :root {
- --title-size: clamp(1.25rem, 7vw, 2.5rem);
- }
-
- /* Stack grids vertically */
- .grid {
- grid-template-columns: 1fr;
- }
-}
-
-/* ===========================================
- REDUCED MOTION
- Respect user preferences
- =========================================== */
-@media (prefers-reduced-motion: reduce) {
- *, *::before, *::after {
- animation-duration: 0.01ms !important;
- transition-duration: 0.2s !important;
- }
-
- html {
- scroll-behavior: auto;
- }
-}
-```
-
-### Overflow Prevention Checklist
-
-Before generating any presentation, mentally verify:
-
-1. ✅ Every `.slide` has `height: 100vh; height: 100dvh; overflow: hidden;`
-2. ✅ All font sizes use `clamp(min, preferred, max)`
-3. ✅ All spacing uses `clamp()` or viewport units
-4. ✅ Content containers have `max-height` constraints
-5. ✅ Images have `max-height: min(50vh, 400px)` or similar
-6. ✅ Grids use `auto-fit` with `minmax()` for responsive columns
-7. ✅ Breakpoints exist for heights: 700px, 600px, 500px
-8. ✅ No fixed pixel heights on content elements
-9. ✅ Content per slide respects density limits
-
-### When Content Doesn't Fit
-
-If you find yourself with too much content:
-
-**DO:**
-- Split into multiple slides
-- Reduce bullet points (max 5-6 per slide)
-- Shorten text (aim for 1-2 lines per bullet)
-- Use smaller code snippets
-- Create a "continued" slide
-- **When adding images to existing slides:** Move image to new slide or reduce other content first
-
-**DON'T:**
-- Reduce font size below readable limits
-- Remove padding/spacing entirely
-- Allow any scrolling
-- Cram content to fit
-- Add images without checking if existing content already fills the viewport
-
-### Testing Viewport Fit
-
-After generating, recommend the user test at these sizes:
-- Desktop: 1920×1080, 1440×900, 1280×720
-- Tablet: 1024×768, 768×1024 (portrait)
-- Mobile: 375×667, 414×896
-- Landscape phone: 667×375, 896×414
+**Content exceeds limits? Split into multiple slides. Never cram, never scroll.**
---
## Phase 0: Detect Mode
-First, determine what the user wants:
-
-**Mode A: New Presentation**
-- User wants to create slides from scratch
-- Proceed to Phase 1 (Content Discovery)
-
-**Mode B: PPT Conversion**
-- User has a PowerPoint file (.ppt, .pptx) to convert
-- Proceed to Phase 4 (PPT Extraction)
-
-**Mode C: Existing Presentation Enhancement**
-- User has an HTML presentation and wants to improve it
-- Read the existing file, understand the structure, then enhance
-- **CRITICAL: When modifying existing slides, ALWAYS ensure viewport fitting is maintained**
-
-### Mode C: Critical Modification Rules
-
-When enhancing existing presentations, follow these mandatory rules:
-
-**1. Before Adding Any Content:**
-- Read the current slide structure and count existing elements
-- Check against content density limits (see table above)
-- Calculate if the new content will fit within viewport constraints
-
-**2. When Adding Images (MOST COMMON ISSUE):**
-- Images must have `max-height: min(50vh, 400px)` or similar viewport constraint
-- Check if current slide already has maximum content (1 heading + 1 image)
-- If adding an image to a slide with existing content → **Split into two slides**
-- Example: If slide has heading + 4 bullets, and user wants to add an image:
- - **DON'T:** Cram image onto same slide
- - **DO:** Create new slide with heading + image, keep bullets on original slide
- - **OR:** Reduce bullets to 2-3 and add image with proper constraints
-
-**3. When Adding Text Content:**
-- Max 4-6 bullet points per slide
-- Max 2 paragraphs per slide
-- If adding content exceeds limits → **Split into multiple slides or create a continuation slide**
-
-**4. Required Checks After ANY Modification:**
-```
-✅ Does the slide have `overflow: hidden` on `.slide` class?
-✅ Are all new elements using `clamp()` for font sizes?
-✅ Do new images have viewport-relative max-height?
-✅ Does total content respect density limits?
-✅ Will this fit on a 1280×720 screen? On mobile portrait?
-```
-
-**5. Proactive Reorganization (NOT Optional):**
-When you detect that modifications will cause overflow:
-- **Automatically split content across slides** — Don't wait for user to ask
-- Inform user: "I've reorganized the content across 2 slides to ensure proper viewport fitting"
-- Use "continued" pattern for split content (e.g., "Key Features" → "Key Features (Continued)")
+Determine what the user wants:
-**6. Testing After Modifications:**
-Mentally verify the modified slide at these viewport sizes:
-- Desktop: 1280×720 (smallest common)
-- Tablet portrait: 768×1024
-- Mobile: 375×667
-
-**If in doubt → Split the content. Never allow scrolling within a slide.**
+- **Mode A: New Presentation** — Create from scratch. Go to Phase 1.
+- **Mode B: PPT Conversion** — Convert a .pptx file. Go to Phase 4.
+- **Mode C: Enhancement** — Improve an existing HTML presentation. Read it, understand it, enhance.
---
## Phase 1: Content Discovery (New Presentations)
-Before designing, understand the content. Ask via AskUserQuestion:
-
-### Step 1.1: Presentation Context + Images (Single Form)
-
-**IMPORTANT:** Ask ALL 4 questions in a single AskUserQuestion call so the user can fill everything out at once before submitting.
-
-**Question 1: Purpose**
-- Header: "Purpose"
-- Question: "What is this presentation for?"
-- Options:
- - "Pitch deck" — Selling an idea, product, or company to investors/clients
- - "Teaching/Tutorial" — Explaining concepts, how-to guides, educational content
- - "Conference talk" — Speaking at an event, tech talk, keynote
- - "Internal presentation" — Team updates, strategy meetings, company updates
-
-**Question 2: Slide Count**
-- Header: "Length"
-- Question: "Approximately how many slides?"
-- Options:
- - "Short (5-10)" — Quick pitch, lightning talk
- - "Medium (10-20)" — Standard presentation
- - "Long (20+)" — Deep dive, comprehensive talk
-
-**Question 3: Content**
-- Header: "Content"
-- Question: "Do you have the content ready, or do you need help structuring it?"
-- Options:
- - "I have all content ready" — Just need to design the presentation
- - "I have rough notes" — Need help organizing into slides
- - "I have a topic only" — Need help creating the full outline
-
-**Question 4: Images**
-- Header: "Images"
-- Question: "Do you have images to include? Select 'No images' or select Other and type/paste your image folder path."
-- Options:
- - "No images" — Text-only presentation (use CSS-generated visuals instead)
- - "./assets" — Use the `assets/` folder in the current project
-
-The user can select **"Other"** to type or paste any custom folder path (e.g. `~/Desktop/screenshots`). This way the image folder path is collected in the same form — no extra round-trip.
-
-**Question 5: Inline Editing**
-- Header: "Editing"
-- Question: "Do you need to edit text directly in the browser after generation?"
-- Options:
- - "Yes (Recommended)" — Can edit text in-browser, auto-save to localStorage, export file
- - "No" — Presentation only, keeps file smaller
-
-**Remember the user's choice — it determines whether edit-related HTML/CSS/JS is included in Phase 3.**
-
-If user has content, ask them to share it (text, bullet points, images, etc.).
-
-### Step 1.2: Image Evaluation
-
-**User-provided assets are important visual anchors** — but not every asset is necessarily usable. The first step is always to evaluate. After evaluation, the curated assets become additional context that shapes how the presentation is built. This is a **co-design process**: text content + curated visuals together inform the slide structure from the start, not a post-hoc "fit images in after the fact."
-
-**If user selected "No images"** → Skip the entire image pipeline. Proceed directly to Phase 2 (Style Discovery) and Phase 3 (Generate Presentation) using text content only. The presentation will use CSS-generated visuals (gradients, shapes, patterns, typography) for visual interest — this is the original behavior and produces fully polished results without any images.
-
-**If user provides an image folder:**
+Ask via AskUserQuestion (can combine up to 4 questions per call):
-1. **Scan the folder** — Use `ls` to list all image files (`.png`, `.jpg`, `.jpeg`, `.gif`, `.svg`, `.webp`)
-2. **View each image** — Use the Read tool to see what each image contains (Claude is multimodal)
-3. **Evaluate each image** — For each image, assess:
- - Filename and dimensions
- - What it shows (screenshot, logo, chart, diagram, photo)
- - **Usability:** Is the image clear, relevant to the presentation topic, and high enough quality? Mark as `USABLE` or `NOT USABLE` (with reason: blurry, irrelevant, broken, etc.)
- - **Content signal:** What feature or concept does this image represent? (e.g., "chat_ui.png" → "conversational interface feature")
- - Shape: square, landscape, portrait, circular
- - Dominant colors (important for style compatibility later)
-4. **Present the evaluation and proposed slide outline to the user** — Show which images are usable and which are not, with reasons. Then show the proposed slide outline with image assignments.
+**Question 1 — Purpose** (header: "Purpose"):
+What is this presentation for? Options: Pitch deck / Teaching-Tutorial / Conference talk / Internal presentation
-**Co-design: curated assets inform the outline**
+**Question 2 — Length** (header: "Length"):
+Approximately how many slides? Options: Short 5-10 / Medium 10-20 / Long 20+
-After evaluation, the **usable** images become context for planning the slide structure alongside text content. This is not "plan slides then add images" — it's designing the presentation around both text and visuals from the start:
+**Question 3 — Content** (header: "Content"):
+Do you have content ready? Options: All content ready / Rough notes / Topic only
-- 3 usable product screenshots → plan 3 feature slides, each anchored by one screenshot
-- 1 usable logo → title slide and/or closing slide
-- 1 usable architecture diagram → dedicated "How It Works" slide
-- 1 blurry/irrelevant image → excluded, with explanation to user
-
-This means curated images are factored in **before** style selection (Phase 2) and **before** HTML generation (Phase 3). They are co-equal context in the design process.
-
-5. **Confirm outline via AskUserQuestion** — Do NOT break the flow by asking the user to type free text. Use AskUserQuestion to confirm:
-
-**Question: Outline Confirmation**
-- Header: "Outline"
-- Question: "Does this slide outline and image selection look right?"
-- Options:
- - "Looks good, proceed" — Move on to style selection
- - "Adjust images" — I want to change which images go where
- - "Adjust outline" — I want to change the slide structure
-
-This keeps the entire flow in the AskUserQuestion format without dropping to free-text chat.
+If user has content, ask them to share it.
---
-## Phase 2: Style Discovery (Visual Exploration)
-
-**CRITICAL: This is the "show, don't tell" phase.**
-
-Most people can't articulate design preferences in words. Instead of asking "do you want minimalist or bold?", we generate mini-previews and let them react.
-
-### How Users Choose Presets
-
-Users can select a style in **two ways**:
+## Phase 2: Style Discovery
-**Option A: Guided Discovery (Default)**
-- User answers mood questions
-- Skill generates 3 preview files based on their answers
-- User views previews in browser and picks their favorite
-- This is best for users who don't have a specific style in mind
+**This is the "show, don't tell" phase.** Most people can't articulate design preferences in words.
-**Option B: Direct Selection**
-- If user already knows what they want, they can request a preset by name
-- Example: "Use the Bold Signal style" or "I want something like Dark Botanical"
-- Skip to Phase 3 immediately
+### Step 2.0: Style Path
-**Available Presets:**
-| Preset | Vibe | Best For |
-|--------|------|----------|
-| Bold Signal | Confident, high-impact | Pitch decks, keynotes |
-| Electric Studio | Clean, professional | Agency presentations |
-| Creative Voltage | Energetic, retro-modern | Creative pitches |
-| Dark Botanical | Elegant, sophisticated | Premium brands |
-| Notebook Tabs | Editorial, organized | Reports, reviews |
-| Pastel Geometry | Friendly, approachable | Product overviews |
-| Split Pastel | Playful, modern | Creative agencies |
-| Vintage Editorial | Witty, personality-driven | Personal brands |
-| Neon Cyber | Futuristic, techy | Tech startups |
-| Terminal Green | Developer-focused | Dev tools, APIs |
-| Swiss Modern | Minimal, precise | Corporate, data |
-| Paper & Ink | Literary, thoughtful | Storytelling |
+Ask how they want to choose (header: "Style"):
+- "Show me options" (recommended) — Generate 3 previews based on mood
+- "I know what I want" — Pick from preset list directly
-### Step 2.0: Style Path Selection
-
-First, ask how the user wants to choose their style:
-
-**Question: Style Selection Method**
-- Header: "Style"
-- Question: "How would you like to choose your presentation style?"
-- Options:
- - "Show me options" — Generate 3 previews based on my needs (recommended for most users)
- - "I know what I want" — Let me pick from the preset list directly
-
-**If "Show me options"** → Continue to Step 2.1 (Mood Selection)
-
-**If "I know what I want"** → Show preset picker:
-
-**Question: Pick a Preset**
-- Header: "Preset"
-- Question: "Which style would you like to use?"
-- Options:
- - "Bold Signal" — Vibrant card on dark, confident and high-impact
- - "Dark Botanical" — Elegant dark with soft abstract shapes
- - "Notebook Tabs" — Editorial paper look with colorful section tabs
- - "Pastel Geometry" — Friendly pastels with decorative pills
-
-(If user picks one, skip to Phase 3. If they want to see more options, show additional presets or proceed to guided discovery.)
+**If direct selection:** Show preset picker and skip to Phase 3. Available presets are defined in [STYLE_PRESETS.md](STYLE_PRESETS.md).
### Step 2.1: Mood Selection (Guided Discovery)
-**Question 1: Feeling**
-- Header: "Vibe"
-- Question: "What feeling should the audience have when viewing your slides?"
-- Options:
- - "Impressed/Confident" — Professional, trustworthy, this team knows what they're doing
- - "Excited/Energized" — Innovative, bold, this is the future
- - "Calm/Focused" — Clear, thoughtful, easy to follow
- - "Inspired/Moved" — Emotional, storytelling, memorable
-- multiSelect: true (can choose up to 2)
-
-### Step 2.2: Generate Style Previews
-
-Based on their mood selection, generate **3 distinct style previews** as mini HTML files in a temporary directory. Each preview should be a single title slide showing:
+Ask (header: "Vibe", multiSelect: true, max 2):
+What feeling should the audience have? Options:
+- Impressed/Confident — Professional, trustworthy
+- Excited/Energized — Innovative, bold
+- Calm/Focused — Clear, thoughtful
+- Inspired/Moved — Emotional, memorable
-- Typography (font choices, heading/body hierarchy)
-- Color palette (background, accent, text colors)
-- Animation style (how elements enter)
-- Overall aesthetic feel
+### Step 2.2: Generate 3 Style Previews
-**Preview Styles to Consider (pick 3 based on mood):**
+Based on mood, generate 3 distinct single-slide HTML previews showing typography, colors, animation, and overall aesthetic. Read [STYLE_PRESETS.md](STYLE_PRESETS.md) for available presets and their specifications.
-| Mood | Style Options |
-|------|---------------|
-| Impressed/Confident | "Bold Signal", "Electric Studio", "Dark Botanical" |
-| Excited/Energized | "Creative Voltage", "Neon Cyber", "Split Pastel" |
-| Calm/Focused | "Notebook Tabs", "Paper & Ink", "Swiss Modern" |
-| Inspired/Moved | "Dark Botanical", "Vintage Editorial", "Pastel Geometry" |
+| Mood | Suggested Presets |
+|------|-------------------|
+| Impressed/Confident | Bold Signal, Electric Studio, Dark Botanical |
+| Excited/Energized | Creative Voltage, Neon Cyber, Split Pastel |
+| Calm/Focused | Notebook Tabs, Paper & Ink, Swiss Modern |
+| Inspired/Moved | Dark Botanical, Vintage Editorial, Pastel Geometry |
-**IMPORTANT: Never use these generic patterns:**
-- Purple gradients on white backgrounds
-- Inter, Roboto, or system fonts
-- Standard blue primary colors
-- Predictable hero layouts
+Save previews to `.claude-design/slide-previews/` (style-a.html, style-b.html, style-c.html). Each should be self-contained, ~50-100 lines, showing one animated title slide.
-**Instead, use distinctive choices:**
-- Unique font pairings (Clash Display, Satoshi, Cormorant Garamond, DM Sans, etc.)
-- Cohesive color themes with personality
-- Atmospheric backgrounds (gradients, subtle patterns, depth)
-- Signature animation moments
+Open each preview automatically for the user.
-### Step 2.3: Present Previews
+### Step 2.3: User Picks
-Create the previews in: `.claude-design/slide-previews/`
-
-```
-.claude-design/slide-previews/
-├── style-a.html # First style option
-├── style-b.html # Second style option
-├── style-c.html # Third style option
-└── assets/ # Any shared assets
-```
-
-Each preview file should be:
-- Self-contained (inline CSS/JS)
-- A single "title slide" showing the aesthetic
-- Animated to demonstrate motion style
-- ~50-100 lines, not a full presentation
-
-**Logo in previews (if available):** If the user provided images in Step 1.2 and a logo was identified as `USABLE`, embed it (base64) into each of the 3 style previews. This creates a "wow moment" — the user sees their own brand identity styled three different ways, making the choice feel personal rather than abstract. Apply any necessary processing (e.g., circular crop) per-style so each preview shows the logo as it would actually appear in the final presentation. If no logo was provided, generate previews without one — this is fine.
-
-Present to user:
-```
-I've created 3 style previews for you to compare:
-
-**Style A: [Name]** — [1 sentence description]
-**Style B: [Name]** — [1 sentence description]
-**Style C: [Name]** — [1 sentence description]
-
-Open each file to see them in action:
-- .claude-design/slide-previews/style-a.html
-- .claude-design/slide-previews/style-b.html
-- .claude-design/slide-previews/style-c.html
-
-Take a look and tell me:
-1. Which style resonates most?
-2. What do you like about it?
-3. Anything you'd change?
-```
-
-Then use AskUserQuestion:
-
-**Question: Pick Your Style**
-- Header: "Style"
-- Question: "Which style preview do you prefer?"
-- Options:
- - "Style A: [Name]" — [Brief description]
- - "Style B: [Name]" — [Brief description]
- - "Style C: [Name]" — [Brief description]
- - "Mix elements" — Combine aspects from different styles
+Ask (header: "Style"):
+Which style preview do you prefer? Options: Style A: [Name] / Style B: [Name] / Style C: [Name] / Mix elements
If "Mix elements", ask for specifics.
@@ -570,501 +134,19 @@ If "Mix elements", ask for specifics.
## Phase 3: Generate Presentation
-Now generate the full presentation based on:
-- Content from Phase 1 (text only, or text + curated images)
-- Style from Phase 2
-
-If the user provided images, the slide outline already incorporates them as visual anchors from Step 1.2. If not, proceed with text-only content — CSS-generated visuals (gradients, shapes, patterns) provide visual interest.
-
-### Image Pipeline (skip if no images)
-
-If the user chose "No images" in Step 1.2, **skip this entire section** and go straight to generating HTML. The presentation will be text-only with CSS-generated visuals — this is a fully supported, first-class path.
-
-If the user provided images, execute these steps **before** generating HTML.
-
-**Key principle: Co-design, not post-hoc.** The curated images from Step 1.2 (those marked `USABLE`) are already part of the slide outline. The pipeline's job here is to process images for the chosen style and place them in the HTML.
-
-#### Step 3.1: Image Processing (Pillow)
-
-For each curated image, determine what processing it needs based on the chosen style (e.g., circular crop for logos, resize for large files) and what CSS framing will bridge any color gaps between the image and the style's palette. Then process accordingly.
-
-**Rules:**
-- **Never repeat** the same image on multiple slides (except logos which may bookend title + closing)
-- **Always add CSS framing** (border, glow, shadow) for images whose colors clash with the style's palette
-
-**Dependency:** Python `Pillow` library (the standard image processing library for Python).
-
-```bash
-# Install if not available (portable across macOS/Linux/Windows)
-pip install Pillow
-```
-
-This is analogous to how `python-pptx` is used in Phase 4 (PPT Conversion) — a standard, well-maintained Python package that any user can install.
-
-**Common processing operations:**
-
-```python
-from PIL import Image, ImageDraw
-
-# ─── Circular Crop (for logos on modern/clean styles) ───
-def crop_circle(input_path, output_path):
- """Crop a square image to a circle with transparent background."""
- img = Image.open(input_path).convert('RGBA')
- w, h = img.size
- # Make square if not already
- size = min(w, h)
- left = (w - size) // 2
- top = (h - size) // 2
- img = img.crop((left, top, left + size, top + size))
- # Create circular mask
- mask = Image.new('L', (size, size), 0)
- draw = ImageDraw.Draw(mask)
- draw.ellipse([0, 0, size, size], fill=255)
- img.putalpha(mask)
- img.save(output_path, 'PNG')
-
-# ─── Resize (for oversized images that inflate the HTML) ───
-def resize_max(input_path, output_path, max_dim=1200):
- """Resize image so largest dimension <= max_dim. Preserves aspect ratio."""
- img = Image.open(input_path)
- img.thumbnail((max_dim, max_dim), Image.LANCZOS)
- img.save(output_path, quality=85)
-
-# ─── Add Padding / Background (for images that need breathing room) ───
-def add_padding(input_path, output_path, padding=40, bg_color=(0, 0, 0, 0)):
- """Add transparent padding around an image."""
- img = Image.open(input_path).convert('RGBA')
- w, h = img.size
- new = Image.new('RGBA', (w + 2*padding, h + 2*padding), bg_color)
- new.paste(img, (padding, padding), img)
- new.save(output_path, 'PNG')
-```
-
-**When to apply each operation:**
-
-| Situation | Operation |
-|-----------|-----------|
-| Square logo on a style with rounded aesthetics | `crop_circle()` |
-| Image > 1MB (slow to load) | `resize_max(max_dim=1200)` |
-| Screenshot needs breathing room in layout | `add_padding()` |
-| Image has wrong aspect ratio for its slide slot | Manual crop with `img.crop((left, top, right, bottom))` |
-
-**Save processed images** alongside originals with a `_processed` suffix (e.g., `logo_round.png`). Never overwrite the user's original files.
-
-#### Step 3.2: Place Images
-
-**Use direct file paths** — do NOT convert images to base64 data URIs. Since presentations are viewed locally, reference images with relative paths from the HTML file:
-
-```html
-<img src="assets/logo_round.png" alt="Logo" class="slide-image logo">
-<img src="assets/screenshot.png" alt="Screenshot" class="slide-image screenshot">
-```
-
-This keeps the HTML file small and images easy to swap. Only use base64 encoding if the user explicitly requests a fully self-contained single-file presentation.
-
-**Image CSS classes (adapt border/glow colors to match the chosen style):**
-```css
-/* Base image constraint — CRITICAL for viewport fitting */
-.slide-image {
- max-width: 100%;
- max-height: min(50vh, 400px);
- object-fit: contain;
- border-radius: 8px;
-}
-
-/* Screenshots: add framing to bridge color gaps with the style */
-.slide-image.screenshot {
- border: 1px solid rgba(255, 255, 255, 0.1);
- border-radius: 12px;
- box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
-}
-
-/* Logos: smaller, no frame */
-.slide-image.logo {
- max-height: min(30vh, 200px);
-}
-```
-
-**IMPORTANT:** Adapt the `.screenshot` border and shadow colors to match the chosen style's accent color. For example:
-- Dark Botanical (gold accent): `border: 1px solid rgba(197, 160, 89, 0.2); box-shadow: 0 0 20px rgba(197, 160, 89, 0.08);`
-- Creative Voltage (neon yellow): `border: 2px solid rgba(212, 255, 0, 0.25); box-shadow: 0 0 20px rgba(212, 255, 0, 0.08);`
-
-**Placement patterns:**
-- **Title slide:** Logo centered above or beside the title
-- **Feature slides:** Screenshot on one side, text on the other (two-column layout)
-- **Full-bleed:** Image as slide background with text overlay (use with caution)
-- **Inline:** Image within content flow, centered, with caption below
-
-**Note:** Processed images (e.g. `logo_round.png`) are saved alongside originals in the assets folder. Reference them with relative paths in the HTML.
-
-### File Structure
-
-For single presentations:
-```
-presentation.html # Self-contained presentation
-assets/ # Images, if any
-```
-
-For projects with multiple presentations:
-```
-[presentation-name].html
-[presentation-name]-assets/
-```
-
-### HTML Architecture
-
-Follow this structure for all presentations:
-
-```html
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>Presentation Title</title>
-
- <!-- Fonts (use Fontshare or Google Fonts) -->
- <link rel="stylesheet" href="https://api.fontshare.com/v2/css?f[]=...">
-
- <style>
- /* ===========================================
- CSS CUSTOM PROPERTIES (THEME)
- Easy to modify: change these to change the whole look
- =========================================== */
- :root {
- /* Colors */
- --bg-primary: #0a0f1c;
- --bg-secondary: #111827;
- --text-primary: #ffffff;
- --text-secondary: #9ca3af;
- --accent: #00ffcc;
- --accent-glow: rgba(0, 255, 204, 0.3);
-
- /* Typography - MUST use clamp() for responsive scaling */
- --font-display: 'Clash Display', sans-serif;
- --font-body: 'Satoshi', sans-serif;
- --title-size: clamp(2rem, 6vw, 5rem);
- --subtitle-size: clamp(0.875rem, 2vw, 1.25rem);
- --body-size: clamp(0.75rem, 1.2vw, 1rem);
+Generate the full presentation using content from Phase 1 and style from Phase 2.
- /* Spacing - MUST use clamp() for responsive scaling */
- --slide-padding: clamp(1.5rem, 4vw, 4rem);
- --content-gap: clamp(1rem, 2vw, 2rem);
+**Before generating, read these supporting files:**
+- [html-template.md](html-template.md) — HTML architecture and JS features
+- [viewport-base.css](viewport-base.css) — Mandatory CSS (include in full)
+- [animation-patterns.md](animation-patterns.md) — Animation reference for the chosen feeling
- /* Animation */
- --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
- --duration-normal: 0.6s;
- }
-
- /* ===========================================
- BASE STYLES
- =========================================== */
- * {
- margin: 0;
- padding: 0;
- box-sizing: border-box;
- }
-
- html {
- scroll-behavior: smooth;
- scroll-snap-type: y mandatory;
- height: 100%;
- }
-
- body {
- font-family: var(--font-body);
- background: var(--bg-primary);
- color: var(--text-primary);
- overflow-x: hidden;
- height: 100%;
- }
-
- /* ===========================================
- SLIDE CONTAINER
- CRITICAL: Each slide MUST fit exactly in viewport
- - Use height: 100vh (NOT min-height)
- - Use overflow: hidden to prevent scroll
- - Content must scale with clamp() values
- =========================================== */
- .slide {
- width: 100vw;
- height: 100vh; /* EXACT viewport height - no scrolling */
- height: 100dvh; /* Dynamic viewport height for mobile */
- padding: var(--slide-padding);
- scroll-snap-align: start;
- display: flex;
- flex-direction: column;
- justify-content: center;
- position: relative;
- overflow: hidden; /* Prevent any content overflow */
- }
-
- /* Content wrapper that prevents overflow */
- .slide-content {
- flex: 1;
- display: flex;
- flex-direction: column;
- justify-content: center;
- max-height: 100%;
- overflow: hidden;
- }
-
- /* ===========================================
- RESPONSIVE BREAKPOINTS
- Adjust content for different screen sizes
- =========================================== */
- @media (max-height: 600px) {
- :root {
- --slide-padding: clamp(1rem, 3vw, 2rem);
- --content-gap: clamp(0.5rem, 1.5vw, 1rem);
- }
- }
-
- @media (max-width: 768px) {
- :root {
- --title-size: clamp(1.5rem, 8vw, 3rem);
- }
- }
-
- @media (max-height: 500px) and (orientation: landscape) {
- /* Extra compact for landscape phones */
- :root {
- --title-size: clamp(1.25rem, 5vw, 2rem);
- --slide-padding: clamp(0.75rem, 2vw, 1.5rem);
- }
- }
-
- /* ===========================================
- ANIMATIONS
- Trigger via .visible class (added by JS on scroll)
- =========================================== */
- .reveal {
- opacity: 0;
- transform: translateY(30px);
- transition: opacity var(--duration-normal) var(--ease-out-expo),
- transform var(--duration-normal) var(--ease-out-expo);
- }
-
- .slide.visible .reveal {
- opacity: 1;
- transform: translateY(0);
- }
-
- /* Stagger children */
- .reveal:nth-child(1) { transition-delay: 0.1s; }
- .reveal:nth-child(2) { transition-delay: 0.2s; }
- .reveal:nth-child(3) { transition-delay: 0.3s; }
- .reveal:nth-child(4) { transition-delay: 0.4s; }
-
- /* ... more styles ... */
- </style>
-</head>
-<body>
- <!-- Progress bar (optional) -->
- <div class="progress-bar"></div>
-
- <!-- Navigation dots (optional) -->
- <nav class="nav-dots">
- <!-- Generated by JS -->
- </nav>
-
- <!-- Slides -->
- <section class="slide title-slide">
- <h1 class="reveal">Presentation Title</h1>
- <p class="reveal">Subtitle or author</p>
- </section>
-
- <section class="slide">
- <h2 class="reveal">Slide Title</h2>
- <p class="reveal">Content...</p>
- </section>
-
- <!-- More slides... -->
-
- <script>
- /* ===========================================
- SLIDE PRESENTATION CONTROLLER
- Handles navigation, animations, and interactions
- =========================================== */
-
- class SlidePresentation {
- constructor() {
- // ... initialization
- }
-
- // ... methods
- }
-
- // Initialize
- new SlidePresentation();
- </script>
-</body>
-</html>
-```
-
-### Required JavaScript Features
-
-Every presentation should include:
-
-1. **SlidePresentation Class** — Main controller
- - Keyboard navigation (arrows, space)
- - Touch/swipe support
- - Mouse wheel navigation
- - Progress bar updates
- - Navigation dots
-
-2. **Intersection Observer** — For scroll-triggered animations
- - Add `.visible` class when slides enter viewport
- - Trigger CSS animations efficiently
-
-3. **Optional Enhancements** (based on style):
- - Custom cursor with trail
- - Particle system background (canvas)
- - Parallax effects
- - 3D tilt on hover
- - Magnetic buttons
- - Counter animations
- - **Inline editing** (only if user opted in during content discovery):
- - Edit toggle button (hidden by default, revealed via hover hotzone or `E` key)
- - Auto-save to localStorage
- - Export/save file functionality
- - See "Edit Button Implementation" section below for required code patterns
-
-### Edit Button Implementation (When User Opts In)
-
-**If the user chose "No" for inline editing in Phase 1, skip this entirely — do not generate any edit-related HTML, CSS, or JS.**
-
-**⚠️ Critical: Do NOT use CSS `~` sibling selector for hover-based show/hide.**
-
-The CSS-only approach (`edit-hotzone:hover ~ .edit-toggle`) fails because `pointer-events: none` on the toggle button causes the hover chain to break: user hovers hotzone → button becomes visible → mouse moves toward button → leaves hotzone → button disappears before click reaches it.
-
-**Required approach: JS-based hover with delay timeout.**
-
-HTML structure:
-```html
-<div class="edit-hotzone"></div>
-<button class="edit-toggle" id="editToggle" title="编辑模式 (E)">✏️</button>
-```
-
-CSS (visibility controlled by JS classes only):
-```css
-/* ⚠️ Do NOT use CSS ~ sibling selector for this!
- pointer-events: none breaks the hover chain.
- Must use JS with delay timeout. */
-.edit-hotzone {
- position: fixed; top: 0; left: 0;
- width: 80px; height: 80px;
- z-index: 10000;
- cursor: pointer;
-}
-.edit-toggle {
- opacity: 0;
- pointer-events: none;
- transition: opacity 0.3s ease;
- z-index: 10001;
-}
-/* Only JS-added classes control visibility */
-.edit-toggle.show,
-.edit-toggle.active {
- opacity: 1;
- pointer-events: auto;
-}
-```
-
-JS (all three interaction methods):
-```javascript
-// 1. Click handler on the toggle button
-document.getElementById('editToggle').addEventListener('click', () => {
- editor.toggleEditMode();
-});
-
-// 2. Hotzone hover with 400ms grace period
-const hotzone = document.querySelector('.edit-hotzone');
-const editToggle = document.getElementById('editToggle');
-let hideTimeout = null;
-
-hotzone.addEventListener('mouseenter', () => {
- clearTimeout(hideTimeout);
- editToggle.classList.add('show');
-});
-hotzone.addEventListener('mouseleave', () => {
- hideTimeout = setTimeout(() => {
- if (!editor.isActive) editToggle.classList.remove('show');
- }, 400);
-});
-editToggle.addEventListener('mouseenter', () => {
- clearTimeout(hideTimeout);
-});
-editToggle.addEventListener('mouseleave', () => {
- hideTimeout = setTimeout(() => {
- if (!editor.isActive) editToggle.classList.remove('show');
- }, 400);
-});
-
-// 3. Hotzone direct click
-hotzone.addEventListener('click', () => {
- editor.toggleEditMode();
-});
-
-// 4. Keyboard shortcut (E key, skip when editing text)
-document.addEventListener('keydown', (e) => {
- if ((e.key === 'e' || e.key === 'E') && !e.target.getAttribute('contenteditable')) {
- editor.toggleEditMode();
- }
-});
-```
-
-### Code Quality Requirements
-
-**Comments:**
-Every section should have clear comments explaining:
-- What it does
-- Why it exists
-- How to modify it
-
-```javascript
-/* ===========================================
- CUSTOM CURSOR
- Creates a stylized cursor that follows mouse with a trail effect.
- - Uses lerp (linear interpolation) for smooth movement
- - Grows larger when hovering over interactive elements
- =========================================== */
-class CustomCursor {
- constructor() {
- // ...
- }
-}
-```
-
-**Accessibility:**
-- Semantic HTML (`<section>`, `<nav>`, `<main>`)
-- Keyboard navigation works
-- ARIA labels where needed
-- Reduced motion support
-
-```css
-@media (prefers-reduced-motion: reduce) {
- .reveal {
- transition: opacity 0.3s ease;
- transform: none;
- }
-}
-```
-
-**CSS Function Negation:**
-- Never negate CSS functions directly — `-clamp()`, `-min()`, `-max()` are silently ignored by browsers with no console error
-- Always use `calc(-1 * clamp(...))` instead. See STYLE_PRESETS.md → "CSS Gotchas" for details.
-
-**Responsive & Viewport Fitting (CRITICAL):**
-
-**See the "CRITICAL: Viewport Fitting Requirements" section above for complete CSS and guidelines.**
-
-Quick reference:
-- Every `.slide` must have `height: 100vh; height: 100dvh; overflow: hidden;`
-- All typography and spacing must use `clamp()`
-- Respect content density limits (max 4-6 bullets, max 6 cards, etc.)
-- Include breakpoints for heights: 700px, 600px, 500px
-- When content doesn't fit → split into multiple slides, never scroll
+**Key requirements:**
+- Single self-contained HTML file, all CSS/JS inline
+- Include the FULL contents of viewport-base.css in the `<style>` block
+- Use fonts from Fontshare or Google Fonts — never system fonts
+- Add detailed comments explaining each section
+- Every section needs a clear `/* === SECTION NAME === */` comment block
---
@@ -1072,370 +154,30 @@ Quick reference:
When converting PowerPoint files:
-### Step 4.1: Extract Content
-
-Use Python with `python-pptx` to extract:
-
-```python
-from pptx import Presentation
-from pptx.util import Inches, Pt
-import json
-import os
-import base64
-
-def extract_pptx(file_path, output_dir):
- """
- Extract all content from a PowerPoint file.
- Returns a JSON structure with slides, text, and images.
- """
- prs = Presentation(file_path)
- slides_data = []
-
- # Create assets directory
- assets_dir = os.path.join(output_dir, 'assets')
- os.makedirs(assets_dir, exist_ok=True)
-
- for slide_num, slide in enumerate(prs.slides):
- slide_data = {
- 'number': slide_num + 1,
- 'title': '',
- 'content': [],
- 'images': [],
- 'notes': ''
- }
-
- for shape in slide.shapes:
- # Extract title
- if shape.has_text_frame:
- if shape == slide.shapes.title:
- slide_data['title'] = shape.text
- else:
- slide_data['content'].append({
- 'type': 'text',
- 'content': shape.text
- })
-
- # Extract images
- if shape.shape_type == 13: # Picture
- image = shape.image
- image_bytes = image.blob
- image_ext = image.ext
- image_name = f"slide{slide_num + 1}_img{len(slide_data['images']) + 1}.{image_ext}"
- image_path = os.path.join(assets_dir, image_name)
-
- with open(image_path, 'wb') as f:
- f.write(image_bytes)
-
- slide_data['images'].append({
- 'path': f"assets/{image_name}",
- 'width': shape.width,
- 'height': shape.height
- })
-
- # Extract notes
- if slide.has_notes_slide:
- notes_frame = slide.notes_slide.notes_text_frame
- slide_data['notes'] = notes_frame.text
-
- slides_data.append(slide_data)
-
- return slides_data
-```
-
-### Step 4.2: Confirm Content Structure
-
-Present the extracted content to the user:
-
-```
-I've extracted the following from your PowerPoint:
-
-**Slide 1: [Title]**
-- [Content summary]
-- Images: [count]
-
-**Slide 2: [Title]**
-- [Content summary]
-- Images: [count]
-
-...
-
-All images have been saved to the assets folder.
-
-Does this look correct? Should I proceed with style selection?
-```
-
-### Step 4.3: Style Selection
-
-Proceed to Phase 2 (Style Discovery) with the extracted content in mind.
-
-### Step 4.4: Generate HTML
-
-Convert the extracted content into the chosen style, preserving:
-- All text content
-- All images (referenced from assets folder)
-- Slide order
-- Any speaker notes (as HTML comments or separate file)
+1. **Extract content** — Run `python scripts/extract-pptx.py <input.pptx> <output_dir>` (install python-pptx if needed: `pip install python-pptx`)
+2. **Confirm with user** — Present extracted slide titles, content summaries, and image counts
+3. **Style selection** — Proceed to Phase 2 for style discovery
+4. **Generate HTML** — Convert to chosen style, preserving all text, images (from assets/), slide order, and speaker notes (as HTML comments)
---
## Phase 5: Delivery
-### Final Output
-
-When the presentation is complete:
-
-1. **Clean up temporary files**
- - Delete `.claude-design/slide-previews/` if it exists
-
-2. **Open the presentation**
- - Use `open [filename].html` to launch in browser
-
-3. **Provide summary**
-```
-Your presentation is ready!
-
-📁 File: [filename].html
-🎨 Style: [Style Name]
-📊 Slides: [count]
-
-**Navigation:**
-- Arrow keys (← →) or Space to navigate
-- Scroll/swipe also works
-- Click the dots on the right to jump to a slide
-
-**To customize:**
-- Colors: Look for `:root` CSS variables at the top
-- Fonts: Change the Fontshare/Google Fonts link
-- Animations: Modify `.reveal` class timings
-
-Would you like me to make any adjustments?
-```
-
-If the user opted in to inline editing, also include:
-```
-**Editing:**
-- Hover over top-left corner or press E to enter edit mode
-- Click any text to edit directly
-- Ctrl+S or click "Save file" to save changes
-```
-
----
-
-## Style Reference: Effect → Feeling Mapping
-
-Use this guide to match animations to intended feelings:
-
-### Dramatic / Cinematic
-- Slow fade-ins (1-1.5s)
-- Large scale transitions (0.9 → 1)
-- Dark backgrounds with spotlight effects
-- Parallax scrolling
-- Full-bleed images
-
-### Techy / Futuristic
-- Neon glow effects (box-shadow with accent color)
-- Particle systems (canvas background)
-- Grid patterns
-- Monospace fonts for accents
-- Glitch or scramble text effects
-- Cyan, magenta, electric blue palette
-
-### Playful / Friendly
-- Bouncy easing (spring physics)
-- Rounded corners (large radius)
-- Pastel or bright colors
-- Floating/bobbing animations
-- Hand-drawn or illustrated elements
-
-### Professional / Corporate
-- Subtle, fast animations (200-300ms)
-- Clean sans-serif fonts
-- Navy, slate, or charcoal backgrounds
-- Precise spacing and alignment
-- Minimal decorative elements
-- Data visualization focus
-
-### Calm / Minimal
-- Very slow, subtle motion
-- High whitespace
-- Muted color palette
-- Serif typography
-- Generous padding
-- Content-focused, no distractions
-
-### Editorial / Magazine
-- Strong typography hierarchy
-- Pull quotes and callouts
-- Image-text interplay
-- Grid-breaking layouts
-- Serif headlines, sans-serif body
-- Black and white with one accent
-
----
-
-## Animation Patterns Reference
-
-### Entrance Animations
-
-```css
-/* Fade + Slide Up (most common) */
-.reveal {
- opacity: 0;
- transform: translateY(30px);
- transition: opacity 0.6s var(--ease-out-expo),
- transform 0.6s var(--ease-out-expo);
-}
-
-.visible .reveal {
- opacity: 1;
- transform: translateY(0);
-}
-
-/* Scale In */
-.reveal-scale {
- opacity: 0;
- transform: scale(0.9);
- transition: opacity 0.6s, transform 0.6s var(--ease-out-expo);
-}
-
-/* Slide from Left */
-.reveal-left {
- opacity: 0;
- transform: translateX(-50px);
- transition: opacity 0.6s, transform 0.6s var(--ease-out-expo);
-}
-
-/* Blur In */
-.reveal-blur {
- opacity: 0;
- filter: blur(10px);
- transition: opacity 0.8s, filter 0.8s var(--ease-out-expo);
-}
-```
-
-### Background Effects
-
-```css
-/* Gradient Mesh */
-.gradient-bg {
- background:
- radial-gradient(ellipse at 20% 80%, rgba(120, 0, 255, 0.3) 0%, transparent 50%),
- radial-gradient(ellipse at 80% 20%, rgba(0, 255, 200, 0.2) 0%, transparent 50%),
- var(--bg-primary);
-}
-
-/* Noise Texture */
-.noise-bg {
- background-image: url("data:image/svg+xml,..."); /* Inline SVG noise */
-}
-
-/* Grid Pattern */
-.grid-bg {
- background-image:
- linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
- linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
- background-size: 50px 50px;
-}
-```
-
-### Interactive Effects
-
-```javascript
-/* 3D Tilt on Hover */
-class TiltEffect {
- constructor(element) {
- this.element = element;
- this.element.style.transformStyle = 'preserve-3d';
- this.element.style.perspective = '1000px';
- this.bindEvents();
- }
-
- bindEvents() {
- this.element.addEventListener('mousemove', (e) => {
- const rect = this.element.getBoundingClientRect();
- const x = (e.clientX - rect.left) / rect.width - 0.5;
- const y = (e.clientY - rect.top) / rect.height - 0.5;
-
- this.element.style.transform = `
- rotateY(${x * 10}deg)
- rotateX(${-y * 10}deg)
- `;
- });
-
- this.element.addEventListener('mouseleave', () => {
- this.element.style.transform = 'rotateY(0) rotateX(0)';
- });
- }
-}
-```
-
----
-
-## Troubleshooting
-
-### Common Issues
-
-**Fonts not loading:**
-- Check Fontshare/Google Fonts URL
-- Ensure font names match in CSS
-
-**Animations not triggering:**
-- Verify Intersection Observer is running
-- Check that `.visible` class is being added
-
-**Scroll snap not working:**
-- Ensure `scroll-snap-type` on html/body
-- Each slide needs `scroll-snap-align: start`
-
-**Mobile issues:**
-- Disable heavy effects at 768px breakpoint
-- Test touch events
-- Reduce particle count or disable canvas
-
-**Performance issues:**
-- Use `will-change` sparingly
-- Prefer `transform` and `opacity` animations
-- Throttle scroll/mousemove handlers
-
----
-
-## Related Skills
-
-- **learn** — Generate FORZARA.md documentation for the presentation
-- **frontend-design** — For more complex interactive pages beyond slides
-- **design-and-refine:design-lab** — For iterating on component designs
-
----
-
-## Example Session Flow
-
-1. User: "I want to create a pitch deck for my AI startup"
-2. Skill asks about purpose, length, content, and images (single form)
-3. User shares bullet points, selects `./assets` folder
-4. **Evaluate:** Skill views each image (multimodal), builds slide outline with image assignments:
- - `logo.png` → USABLE → title/closing slide
- - `chat_ui.png` → USABLE → feature slide
- - `dashboard.png` → USABLE → feature slide
- - `launch_card.png` → USABLE → feature slide
- - `blurry_team.jpg` → NOT USABLE (too low resolution)
-5. User confirms outline via AskUserQuestion
-6. Skill asks about desired feeling (Impressed + Excited)
-7. Skill generates 3 style previews
-8. User picks Style B (Neon Cyber)
-9. **Process + Generate:** Skill runs Pillow operations (circular crop, resize), generates full presentation with direct image paths
-10. Skill opens the presentation in browser
-11. User requests tweaks to specific slides
-12. Final presentation delivered
+1. **Clean up** — Delete `.claude-design/slide-previews/` if it exists
+2. **Open** — Use `open [filename].html` to launch in browser
+3. **Summarize** — Tell the user:
+ - File location, style name, slide count
+ - Navigation: Arrow keys, Space, scroll/swipe, click nav dots
+ - How to customize: `:root` CSS variables for colors, font link for typography, `.reveal` class for animations
---
-## Conversion Session Flow
+## Supporting Files
-1. User: "Convert my slides.pptx to a web presentation"
-2. Skill extracts content and images from PPT
-3. Skill confirms extracted content with user
-4. Skill asks about desired feeling/style
-5. Skill generates style previews
-6. User picks a style
-7. Skill generates HTML presentation with preserved assets
-8. Final presentation delivered
+| File | Purpose | When to Read |
+|------|---------|-------------|
+| [STYLE_PRESETS.md](STYLE_PRESETS.md) | 12 curated visual presets with colors, fonts, and signature elements | Phase 2 (style selection) |
+| [viewport-base.css](viewport-base.css) | Mandatory responsive CSS — copy into every presentation | Phase 3 (generation) |
+| [html-template.md](html-template.md) | HTML structure, JS features, code quality standards | Phase 3 (generation) |
+| [animation-patterns.md](animation-patterns.md) | CSS/JS animation snippets and effect-to-feeling guide | Phase 3 (generation) |
+| [scripts/extract-pptx.py](scripts/extract-pptx.py) | Python script for PPT content extraction | Phase 4 (conversion) |
diff --git a/STYLE_PRESETS.md b/STYLE_PRESETS.md
index 9ff5787..5bee81a 100644
--- a/STYLE_PRESETS.md
+++ b/STYLE_PRESETS.md
@@ -1,163 +1,8 @@
# Style Presets Reference
-Curated visual styles for Frontend Slides. Each preset is inspired by real design references—no generic "AI slop" aesthetics. **Abstract shapes only—no illustrations.**
+Curated visual styles for Frontend Slides. Each preset is inspired by real design references — no generic "AI slop" aesthetics. **Abstract shapes only — no illustrations.**
----
-
-## ⚠️ CRITICAL: Viewport Fitting (Non-Negotiable)
-
-**Every slide MUST fit exactly in the viewport. No scrolling within slides, ever.**
-
-### Content Density Limits Per Slide
-
-| Slide Type | Maximum Content |
-|------------|-----------------|
-| Title slide | 1 heading + 1 subtitle |
-| Content slide | 1 heading + 4-6 bullets (max 2 lines each) |
-| Feature grid | 1 heading + 6 cards (2x3 or 3x2) |
-| Code slide | 1 heading + 8-10 lines of code |
-| Quote slide | 1 quote (max 3 lines) + attribution |
-
-**Too much content? → Split into multiple slides. Never scroll.**
-
-### Required Base CSS (Include in ALL Presentations)
-
-```css
-/* ===========================================
- VIEWPORT FITTING: MANDATORY
- Copy this entire block into every presentation
- =========================================== */
-
-/* 1. Lock document to viewport */
-html, body {
- height: 100%;
- overflow-x: hidden;
-}
-
-html {
- scroll-snap-type: y mandatory;
- scroll-behavior: smooth;
-}
-
-/* 2. Each slide = exact viewport height */
-.slide {
- width: 100vw;
- height: 100vh;
- height: 100dvh; /* Dynamic viewport for mobile */
- overflow: hidden; /* CRITICAL: No overflow ever */
- scroll-snap-align: start;
- display: flex;
- flex-direction: column;
- position: relative;
-}
-
-/* 3. Content wrapper */
-.slide-content {
- flex: 1;
- display: flex;
- flex-direction: column;
- justify-content: center;
- max-height: 100%;
- overflow: hidden;
- padding: var(--slide-padding);
-}
-
-/* 4. ALL sizes use clamp() - scales with viewport */
-:root {
- /* Typography */
- --title-size: clamp(1.5rem, 5vw, 4rem);
- --h2-size: clamp(1.25rem, 3.5vw, 2.5rem);
- --body-size: clamp(0.75rem, 1.5vw, 1.125rem);
- --small-size: clamp(0.65rem, 1vw, 0.875rem);
-
- /* Spacing */
- --slide-padding: clamp(1rem, 4vw, 4rem);
- --content-gap: clamp(0.5rem, 2vw, 2rem);
-}
-
-/* 5. Cards/containers use viewport-relative max sizes */
-.card, .container {
- max-width: min(90vw, 1000px);
- max-height: min(80vh, 700px);
-}
-
-/* 6. Images constrained */
-img {
- max-width: 100%;
- max-height: min(50vh, 400px);
- object-fit: contain;
-}
-
-/* 7. Grids adapt to space */
-.grid {
- display: grid;
- grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
- gap: clamp(0.5rem, 1.5vw, 1rem);
-}
-
-/* ===========================================
- RESPONSIVE BREAKPOINTS - Height-based
- =========================================== */
-
-/* Short screens (< 700px height) */
-@media (max-height: 700px) {
- :root {
- --slide-padding: clamp(0.75rem, 3vw, 2rem);
- --content-gap: clamp(0.4rem, 1.5vw, 1rem);
- --title-size: clamp(1.25rem, 4.5vw, 2.5rem);
- }
-}
-
-/* Very short (< 600px height) */
-@media (max-height: 600px) {
- :root {
- --slide-padding: clamp(0.5rem, 2.5vw, 1.5rem);
- --title-size: clamp(1.1rem, 4vw, 2rem);
- --body-size: clamp(0.7rem, 1.2vw, 0.95rem);
- }
-
- .nav-dots, .keyboard-hint, .decorative {
- display: none;
- }
-}
-
-/* Extremely short - landscape phones (< 500px) */
-@media (max-height: 500px) {
- :root {
- --slide-padding: clamp(0.4rem, 2vw, 1rem);
- --title-size: clamp(1rem, 3.5vw, 1.5rem);
- --body-size: clamp(0.65rem, 1vw, 0.85rem);
- }
-}
-
-/* Narrow screens */
-@media (max-width: 600px) {
- .grid {
- grid-template-columns: 1fr;
- }
-}
-
-/* Reduced motion */
-@media (prefers-reduced-motion: reduce) {
- *, *::before, *::after {
- animation-duration: 0.01ms !important;
- transition-duration: 0.2s !important;
- }
-}
-```
-
-### Viewport Fitting Checklist
-
-Before finalizing any presentation, verify:
-
-- [ ] Every `.slide` has `height: 100vh; height: 100dvh; overflow: hidden;`
-- [ ] All font sizes use `clamp(min, preferred, max)`
-- [ ] All spacing uses `clamp()` or viewport units
-- [ ] Breakpoints exist for heights: 700px, 600px, 500px
-- [ ] Content respects density limits (max 6 bullets, max 6 cards)
-- [ ] No fixed pixel heights on content elements
-- [ ] Images have `max-height` constraints
-- [ ] No negated CSS functions (use `calc(-1 * clamp(...))` not `-clamp(...)`)
+**Viewport CSS:** For mandatory base styles, see [viewport-base.css](viewport-base.css). Include in every presentation.
---
@@ -480,73 +325,3 @@ Before finalizing any presentation, verify:
**Decorations:** Realistic illustrations, gratuitous glassmorphism, drop shadows without purpose
----
-
-## CSS Gotchas (Common Mistakes)
-
-### Negating CSS Functions
-
-**WRONG — silently ignored by browsers:**
-```css
-right: -clamp(28px, 3.5vw, 44px); /* ❌ Invalid! Browser ignores this */
-margin-left: -min(10vw, 100px); /* ❌ Invalid! */
-top: -max(2rem, 4vh); /* ❌ Invalid! */
-```
-
-**CORRECT — wrap in `calc()`:**
-```css
-right: calc(-1 * clamp(28px, 3.5vw, 44px)); /* ✅ */
-margin-left: calc(-1 * min(10vw, 100px)); /* ✅ */
-top: calc(-1 * max(2rem, 4vh)); /* ✅ */
-```
-
-CSS does not allow a leading `-` before function names like `clamp()`, `min()`, `max()`. The browser silently discards the entire declaration, causing the property to fall back to its initial/inherited value. This is especially dangerous because there is no console error — the element simply appears in the wrong position.
-
-**Rule: Always use `calc(-1 * ...)` to negate CSS function values.**
-
----
-
-## Troubleshooting Viewport Issues
-
-### Content Overflows the Slide
-
-**Symptoms:** Scrollbar appears, content cut off, elements outside viewport
-
-**Solutions:**
-1. Check slide has `overflow: hidden` (not `overflow: auto` or `visible`)
-2. Reduce content — split into multiple slides
-3. Ensure all fonts use `clamp()` not fixed `px` or `rem`
-4. Add/fix height breakpoints for smaller screens
-5. Check images have `max-height: min(50vh, 400px)`
-
-### Text Too Small on Mobile / Too Large on Desktop
-
-**Symptoms:** Unreadable text on phones, oversized text on big screens
-
-**Solutions:**
-```css
-/* Use clamp with viewport-relative middle value */
-font-size: clamp(1rem, 3vw, 2.5rem);
-/* ↑ ↑ ↑
- minimum scales maximum */
-```
-
-### Content Doesn't Fill Short Screens
-
-**Symptoms:** Excessive whitespace on landscape phones or short browser windows
-
-**Solutions:**
-1. Add `@media (max-height: 600px)` and `(max-height: 500px)` breakpoints
-2. Reduce padding at smaller heights
-3. Hide decorative elements (`display: none`)
-4. Consider hiding nav dots and hints on short screens
-
-### Testing Recommendations
-
-Test at these viewport sizes:
-- **Desktop:** 1920×1080, 1440×900, 1280×720
-- **Tablet:** 1024×768 (landscape), 768×1024 (portrait)
-- **Mobile:** 375×667 (iPhone SE), 414×896 (iPhone 11)
-- **Landscape phone:** 667×375, 896×414
-
-Use browser DevTools responsive mode to quickly test multiple sizes.
diff --git a/animation-patterns.md b/animation-patterns.md
new file mode 100644
index 0000000..19bb61a
--- /dev/null
+++ b/animation-patterns.md
@@ -0,0 +1,110 @@
+# Animation Patterns Reference
+
+Use this reference when generating presentations. Match animations to the intended feeling.
+
+## Effect-to-Feeling Guide
+
+| Feeling | Animations | Visual Cues |
+|---------|-----------|-------------|
+| **Dramatic / Cinematic** | Slow fade-ins (1-1.5s), large scale transitions (0.9 to 1), parallax scrolling | Dark backgrounds, spotlight effects, full-bleed images |
+| **Techy / Futuristic** | Neon glow (box-shadow), glitch/scramble text, grid reveals | Particle systems (canvas), grid patterns, monospace accents, cyan/magenta/electric blue |
+| **Playful / Friendly** | Bouncy easing (spring physics), floating/bobbing | Rounded corners, pastel/bright colors, hand-drawn elements |
+| **Professional / Corporate** | Subtle fast animations (200-300ms), clean slides | Navy/slate/charcoal, precise spacing, data visualization focus |
+| **Calm / Minimal** | Very slow subtle motion, gentle fades | High whitespace, muted palette, serif typography, generous padding |
+| **Editorial / Magazine** | Staggered text reveals, image-text interplay | Strong type hierarchy, pull quotes, grid-breaking layouts, serif headlines + sans body |
+
+## Entrance Animations
+
+```css
+/* Fade + Slide Up (most versatile) */
+.reveal {
+ opacity: 0;
+ transform: translateY(30px);
+ transition: opacity 0.6s var(--ease-out-expo),
+ transform 0.6s var(--ease-out-expo);
+}
+.visible .reveal {
+ opacity: 1;
+ transform: translateY(0);
+}
+
+/* Scale In */
+.reveal-scale {
+ opacity: 0;
+ transform: scale(0.9);
+ transition: opacity 0.6s, transform 0.6s var(--ease-out-expo);
+}
+
+/* Slide from Left */
+.reveal-left {
+ opacity: 0;
+ transform: translateX(-50px);
+ transition: opacity 0.6s, transform 0.6s var(--ease-out-expo);
+}
+
+/* Blur In */
+.reveal-blur {
+ opacity: 0;
+ filter: blur(10px);
+ transition: opacity 0.8s, filter 0.8s var(--ease-out-expo);
+}
+```
+
+## Background Effects
+
+```css
+/* Gradient Mesh — layered radial gradients for depth */
+.gradient-bg {
+ background:
+ radial-gradient(ellipse at 20% 80%, rgba(120, 0, 255, 0.3) 0%, transparent 50%),
+ radial-gradient(ellipse at 80% 20%, rgba(0, 255, 200, 0.2) 0%, transparent 50%),
+ var(--bg-primary);
+}
+
+/* Noise Texture — inline SVG for grain */
+.noise-bg {
+ background-image: url("data:image/svg+xml,..."); /* Inline SVG noise */
+}
+
+/* Grid Pattern — subtle structural lines */
+.grid-bg {
+ background-image:
+ linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
+ linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
+ background-size: 50px 50px;
+}
+```
+
+## Interactive Effects
+
+```javascript
+/* 3D Tilt on Hover — adds depth to cards/panels */
+class TiltEffect {
+ constructor(element) {
+ this.element = element;
+ this.element.style.transformStyle = 'preserve-3d';
+ this.element.style.perspective = '1000px';
+
+ this.element.addEventListener('mousemove', (e) => {
+ const rect = this.element.getBoundingClientRect();
+ const x = (e.clientX - rect.left) / rect.width - 0.5;
+ const y = (e.clientY - rect.top) / rect.height - 0.5;
+ this.element.style.transform = `rotateY(${x * 10}deg) rotateX(${-y * 10}deg)`;
+ });
+
+ this.element.addEventListener('mouseleave', () => {
+ this.element.style.transform = 'rotateY(0) rotateX(0)';
+ });
+ }
+}
+```
+
+## Troubleshooting
+
+| Problem | Fix |
+|---------|-----|
+| Fonts not loading | Check Fontshare/Google Fonts URL; ensure font names match in CSS |
+| Animations not triggering | Verify Intersection Observer is running; check `.visible` class is being added |
+| Scroll snap not working | Ensure `scroll-snap-type: y mandatory` on html; each slide needs `scroll-snap-align: start` |
+| Mobile issues | Disable heavy effects at 768px breakpoint; test touch events; reduce particle count |
+| Performance issues | Use `will-change` sparingly; prefer `transform`/`opacity` animations; throttle scroll handlers |
diff --git a/html-template.md b/html-template.md
new file mode 100644
index 0000000..82c5024
--- /dev/null
+++ b/html-template.md
@@ -0,0 +1,190 @@
+# HTML Presentation Template
+
+Reference architecture for generating slide presentations. Every presentation follows this structure.
+
+## Base HTML Structure
+
+```html
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <title>Presentation Title</title>
+
+ <!-- Fonts: use Fontshare or Google Fonts — never system fonts -->
+ <link rel="stylesheet" href="https://api.fontshare.com/v2/css?f[]=...">
+
+ <style>
+ /* ===========================================
+ CSS CUSTOM PROPERTIES (THEME)
+ Change these to change the whole look
+ =========================================== */
+ :root {
+ /* Colors — from chosen style preset */
+ --bg-primary: #0a0f1c;
+ --bg-secondary: #111827;
+ --text-primary: #ffffff;
+ --text-secondary: #9ca3af;
+ --accent: #00ffcc;
+ --accent-glow: rgba(0, 255, 204, 0.3);
+
+ /* Typography — MUST use clamp() */
+ --font-display: 'Clash Display', sans-serif;
+ --font-body: 'Satoshi', sans-serif;
+ --title-size: clamp(2rem, 6vw, 5rem);
+ --subtitle-size: clamp(0.875rem, 2vw, 1.25rem);
+ --body-size: clamp(0.75rem, 1.2vw, 1rem);
+
+ /* Spacing — MUST use clamp() */
+ --slide-padding: clamp(1.5rem, 4vw, 4rem);
+ --content-gap: clamp(1rem, 2vw, 2rem);
+
+ /* Animation */
+ --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
+ --duration-normal: 0.6s;
+ }
+
+ /* ===========================================
+ BASE STYLES
+ =========================================== */
+ * { margin: 0; padding: 0; box-sizing: border-box; }
+
+ /* --- PASTE viewport-base.css CONTENTS HERE --- */
+
+ /* ===========================================
+ ANIMATIONS
+ Trigger via .visible class (added by JS on scroll)
+ =========================================== */
+ .reveal {
+ opacity: 0;
+ transform: translateY(30px);
+ transition: opacity var(--duration-normal) var(--ease-out-expo),
+ transform var(--duration-normal) var(--ease-out-expo);
+ }
+
+ .slide.visible .reveal {
+ opacity: 1;
+ transform: translateY(0);
+ }
+
+ /* Stagger children for sequential reveal */
+ .reveal:nth-child(1) { transition-delay: 0.1s; }
+ .reveal:nth-child(2) { transition-delay: 0.2s; }
+ .reveal:nth-child(3) { transition-delay: 0.3s; }
+ .reveal:nth-child(4) { transition-delay: 0.4s; }
+
+ /* ... preset-specific styles ... */
+ </style>
+</head>
+<body>
+ <!-- Optional: Progress bar -->
+ <div class="progress-bar"></div>
+
+ <!-- Optional: Navigation dots -->
+ <nav class="nav-dots"><!-- Generated by JS --></nav>
+
+ <!-- Slides -->
+ <section class="slide title-slide">
+ <h1 class="reveal">Presentation Title</h1>
+ <p class="reveal">Subtitle or author</p>
+ </section>
+
+ <section class="slide">
+ <div class="slide-content">
+ <h2 class="reveal">Slide Title</h2>
+ <p class="reveal">Content...</p>
+ </div>
+ </section>
+
+ <!-- More slides... -->
+
+ <script>
+ /* ===========================================
+ SLIDE PRESENTATION CONTROLLER
+ =========================================== */
+ class SlidePresentation {
+ constructor() {
+ this.slides = document.querySelectorAll('.slide');
+ this.currentSlide = 0;
+ this.setupIntersectionObserver();
+ this.setupKeyboardNav();
+ this.setupTouchNav();
+ this.setupProgressBar();
+ this.setupNavDots();
+ }
+
+ setupIntersectionObserver() {
+ // Add .visible class when slides enter viewport
+ // Triggers CSS animations efficiently
+ }
+
+ setupKeyboardNav() {
+ // Arrow keys, Space, Page Up/Down
+ }
+
+ setupTouchNav() {
+ // Touch/swipe support for mobile
+ }
+
+ setupProgressBar() {
+ // Update progress bar on scroll
+ }
+
+ setupNavDots() {
+ // Generate and manage navigation dots
+ }
+ }
+
+ new SlidePresentation();
+ </script>
+</body>
+</html>
+```
+
+## Required JavaScript Features
+
+Every presentation must include:
+
+1. **SlidePresentation Class** — Main controller with:
+ - Keyboard navigation (arrows, space, page up/down)
+ - Touch/swipe support
+ - Mouse wheel navigation
+ - Progress bar updates
+ - Navigation dots
+
+2. **Intersection Observer** — For scroll-triggered animations:
+ - Add `.visible` class when slides enter viewport
+ - Trigger CSS transitions efficiently
+
+3. **Optional Enhancements** (match to chosen style):
+ - Custom cursor with trail
+ - Particle system background (canvas)
+ - Parallax effects
+ - 3D tilt on hover
+ - Magnetic buttons
+ - Counter animations
+
+## Code Quality
+
+**Comments:** Every section needs clear comments explaining what it does and how to modify it.
+
+**Accessibility:**
+- Semantic HTML (`<section>`, `<nav>`, `<main>`)
+- Keyboard navigation works fully
+- ARIA labels where needed
+- `prefers-reduced-motion` support (included in viewport-base.css)
+
+## File Structure
+
+Single presentations:
+```
+presentation.html # Self-contained, all CSS/JS inline
+assets/ # Images only, if any
+```
+
+Multiple presentations in one project:
+```
+[name].html
+[name]-assets/
+```
diff --git a/scripts/extract-pptx.py b/scripts/extract-pptx.py
new file mode 100644
index 0000000..498e2a5
--- /dev/null
+++ b/scripts/extract-pptx.py
@@ -0,0 +1,96 @@
+#!/usr/bin/env python3
+"""
+Extract all content from a PowerPoint file (.pptx).
+Returns a JSON structure with slides, text, and images.
+
+Usage:
+ python extract-pptx.py <input.pptx> [output_dir]
+
+Requires: pip install python-pptx
+"""
+
+import json
+import os
+import sys
+from pptx import Presentation
+
+
+def extract_pptx(file_path, output_dir="."):
+ """
+ Extract all content from a PowerPoint file.
+ Returns a list of slide data dicts with text, images, and notes.
+ """
+ prs = Presentation(file_path)
+ slides_data = []
+
+ # Create assets directory for extracted images
+ assets_dir = os.path.join(output_dir, "assets")
+ os.makedirs(assets_dir, exist_ok=True)
+
+ for slide_num, slide in enumerate(prs.slides):
+ slide_data = {
+ "number": slide_num + 1,
+ "title": "",
+ "content": [],
+ "images": [],
+ "notes": "",
+ }
+
+ for shape in slide.shapes:
+ # Extract text content
+ if shape.has_text_frame:
+ if shape == slide.shapes.title:
+ slide_data["title"] = shape.text
+ else:
+ slide_data["content"].append(
+ {"type": "text", "content": shape.text}
+ )
+
+ # Extract images
+ if shape.shape_type == 13: # Picture type
+ image = shape.image
+ image_bytes = image.blob
+ image_ext = image.ext
+ image_name = f"slide{slide_num + 1}_img{len(slide_data['images']) + 1}.{image_ext}"
+ image_path = os.path.join(assets_dir, image_name)
+
+ with open(image_path, "wb") as f:
+ f.write(image_bytes)
+
+ slide_data["images"].append(
+ {
+ "path": f"assets/{image_name}",
+ "width": shape.width,
+ "height": shape.height,
+ }
+ )
+
+ # Extract speaker notes
+ if slide.has_notes_slide:
+ notes_frame = slide.notes_slide.notes_text_frame
+ slide_data["notes"] = notes_frame.text
+
+ slides_data.append(slide_data)
+
+ return slides_data
+
+
+if __name__ == "__main__":
+ if len(sys.argv) < 2:
+ print("Usage: python extract-pptx.py <input.pptx> [output_dir]")
+ sys.exit(1)
+
+ input_file = sys.argv[1]
+ output_dir = sys.argv[2] if len(sys.argv) > 2 else "."
+
+ slides = extract_pptx(input_file, output_dir)
+
+ # Write extracted data as JSON
+ output_path = os.path.join(output_dir, "extracted-slides.json")
+ with open(output_path, "w") as f:
+ json.dump(slides, f, indent=2)
+
+ print(f"Extracted {len(slides)} slides to {output_path}")
+ for s in slides:
+ img_count = len(s["images"])
+ print(f" Slide {s['number']}: {s['title'] or '(no title)'} — {img_count} image(s)")
diff --git a/viewport-base.css b/viewport-base.css
new file mode 100644
index 0000000..67290b5
--- /dev/null
+++ b/viewport-base.css
@@ -0,0 +1,153 @@
+/* ===========================================
+ VIEWPORT FITTING: MANDATORY BASE STYLES
+ Include this ENTIRE file in every presentation.
+ These styles ensure slides fit exactly in the viewport.
+ =========================================== */
+
+/* 1. Lock html/body to viewport */
+html, body {
+ height: 100%;
+ overflow-x: hidden;
+}
+
+html {
+ scroll-snap-type: y mandatory;
+ scroll-behavior: smooth;
+}
+
+/* 2. Each slide = exact viewport height */
+.slide {
+ width: 100vw;
+ height: 100vh;
+ height: 100dvh; /* Dynamic viewport height for mobile browsers */
+ overflow: hidden; /* CRITICAL: Prevent ANY overflow */
+ scroll-snap-align: start;
+ display: flex;
+ flex-direction: column;
+ position: relative;
+}
+
+/* 3. Content container with flex for centering */
+.slide-content {
+ flex: 1;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ max-height: 100%;
+ overflow: hidden; /* Double-protection against overflow */
+ padding: var(--slide-padding);
+}
+
+/* 4. ALL typography uses clamp() for responsive scaling */
+:root {
+ /* Titles scale from mobile to desktop */
+ --title-size: clamp(1.5rem, 5vw, 4rem);
+ --h2-size: clamp(1.25rem, 3.5vw, 2.5rem);
+ --h3-size: clamp(1rem, 2.5vw, 1.75rem);
+
+ /* Body text */
+ --body-size: clamp(0.75rem, 1.5vw, 1.125rem);
+ --small-size: clamp(0.65rem, 1vw, 0.875rem);
+
+ /* Spacing scales with viewport */
+ --slide-padding: clamp(1rem, 4vw, 4rem);
+ --content-gap: clamp(0.5rem, 2vw, 2rem);
+ --element-gap: clamp(0.25rem, 1vw, 1rem);
+}
+
+/* 5. Cards/containers use viewport-relative max sizes */
+.card, .container, .content-box {
+ max-width: min(90vw, 1000px);
+ max-height: min(80vh, 700px);
+}
+
+/* 6. Lists auto-scale with viewport */
+.feature-list, .bullet-list {
+ gap: clamp(0.4rem, 1vh, 1rem);
+}
+
+.feature-list li, .bullet-list li {
+ font-size: var(--body-size);
+ line-height: 1.4;
+}
+
+/* 7. Grids adapt to available space */
+.grid {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
+ gap: clamp(0.5rem, 1.5vw, 1rem);
+}
+
+/* 8. Images constrained to viewport */
+img, .image-container {
+ max-width: 100%;
+ max-height: min(50vh, 400px);
+ object-fit: contain;
+}
+
+/* ===========================================
+ RESPONSIVE BREAKPOINTS
+ Aggressive scaling for smaller viewports
+ =========================================== */
+
+/* Short viewports (< 700px height) */
+@media (max-height: 700px) {
+ :root {
+ --slide-padding: clamp(0.75rem, 3vw, 2rem);
+ --content-gap: clamp(0.4rem, 1.5vw, 1rem);
+ --title-size: clamp(1.25rem, 4.5vw, 2.5rem);
+ --h2-size: clamp(1rem, 3vw, 1.75rem);
+ }
+}
+
+/* Very short viewports (< 600px height) */
+@media (max-height: 600px) {
+ :root {
+ --slide-padding: clamp(0.5rem, 2.5vw, 1.5rem);
+ --content-gap: clamp(0.3rem, 1vw, 0.75rem);
+ --title-size: clamp(1.1rem, 4vw, 2rem);
+ --body-size: clamp(0.7rem, 1.2vw, 0.95rem);
+ }
+
+ /* Hide non-essential elements */
+ .nav-dots, .keyboard-hint, .decorative {
+ display: none;
+ }
+}
+
+/* Extremely short (landscape phones, < 500px height) */
+@media (max-height: 500px) {
+ :root {
+ --slide-padding: clamp(0.4rem, 2vw, 1rem);
+ --title-size: clamp(1rem, 3.5vw, 1.5rem);
+ --h2-size: clamp(0.9rem, 2.5vw, 1.25rem);
+ --body-size: clamp(0.65rem, 1vw, 0.85rem);
+ }
+}
+
+/* Narrow viewports (< 600px width) */
+@media (max-width: 600px) {
+ :root {
+ --title-size: clamp(1.25rem, 7vw, 2.5rem);
+ }
+
+ /* Stack grids vertically */
+ .grid {
+ grid-template-columns: 1fr;
+ }
+}
+
+/* ===========================================
+ REDUCED MOTION
+ Respect user preferences
+ =========================================== */
+@media (prefers-reduced-motion: reduce) {
+ *, *::before, *::after {
+ animation-duration: 0.01ms !important;
+ transition-duration: 0.2s !important;
+ }
+
+ html {
+ scroll-behavior: auto;
+ }
+}