Agent-specific guidance for working on this Astro portfolio codebase.
Dev server: pnpm dev (usually port 4321)
Build: pnpm build
Preview: pnpm preview
Astro uses scoped <style> blocks. For global styles affecting child components, use :global():
.parent :global(.child-class) {
/* styles applied to child component */
}To make content extend beyond the 1100px container:
.breakout {
width: 100vw;
margin-left: calc(50% - 50vw);
padding-inline: max(2rem, calc((100vw - 1500px) / 2));
}Pass index to components and use CSS custom property:
{items.map((item, i) => <Card index={i} />)}.card {
animation-delay: calc(var(--i) * 0.1s);
}Use CSS variables from src/styles/colors.css:
var(--color-background)- adapts to light/darkvar(--color-text)- adapts to light/darkvar(--color-accent)- primary accent color
Comment out imports and JSX, add note:
// import Component from "./Component.astro"; // Hidden until content is ready
{/* Section hidden until content is ready */}Content pages can pass frontmatter to Layout for dynamic social previews:
<Layout
title={`${title} - Marcelo Rondon`}
description={description}
image={image}
>imageshould be the path from frontmatter (e.g.,/images/projects/my-project.png)- Falls back to
/images/thumbnail.pngif not provided - Layout constructs full URL using
basics.urlfrom cv.json
- Create in
src/components/ - Use TypeScript interface for Props
- Add scoped styles at bottom
- Import
@/styles/colors.cssif using theme variables
- Create in
src/pages/ - Import Layout from
@/layouts/Layout.astro - Pass title prop to Layout
- Create
.mdxfile in appropriatesrc/content/subfolder - Add required frontmatter fields per schema in
src/content.config.ts - Use media gallery components for images
- Easing:
cubic-bezier(0.16, 1, 0.3, 1) - Entry animations: 0.5-0.8s duration
- Hover transitions: 0.3s duration
- Stagger delay: 0.03s-0.1s per item
700px- Mobile breakpoint (single column, simplified layout)900px- Tablet breakpoint (intermediate adjustments)
- Run dev server:
pnpm dev - Check multiple viewport widths (mobile, tablet, desktop)
- Test both light and dark themes
- Verify animations play correctly on page load
- Run build before committing:
pnpm build