--- /** * SectionHeader.astro * --------------------------------------------------------------------------- * Reusable section title block: a mono "kicker" (e.g. "02"), an h2 heading, and * an optional supporting line. Keeps section openers visually consistent. * * `tone` controls contrast: * - "default" for headers on lighter CONTENT surfaces (uses --color-text / * --color-text-muted, which are tuned for the page body). * - "hero" for headers that sit on a dark hero / starfield background: forces * near-white title + bright subtitle + a glowing kicker so the text stands * out against the deep Milky Way field. */ import Icon from "@components/Icon.astro"; interface Props { /** Monospace kicker, e.g. "02" or "Experience". */ kicker?: string; title: string; /** Optional subtitle shown under the title. */ subtitle?: string; /** Optional mdi icon shown beside the kicker. */ icon?: string; class?: string; align?: "left" | "center"; /** "hero" = bright text for dark backgrounds; "default" = body content. */ tone?: "default" | "hero"; } const { kicker, title, subtitle, icon, class: className = "", align = "left", tone = "default", } = Astro.props; const isHero = tone === "hero"; const titleColor = isHero ? "var(--color-cream)" : undefined; const subtitleColor = isHero ? "var(--color-cream)" : "var(--color-text-muted)"; ---
{ kicker && ( {icon && } {kicker} ) }

{title}

{ subtitle && (

{subtitle}

) }