"use client"; import type { CSSProperties } from "react"; import { useLayoutEffect, useRef, useState } from "react"; import { HeroStepRender } from "@/components/hero-step-render"; const cadSkillsAscii = String.raw` ██████╗ █████╗ ██████╗ ███████╗██╗ ██╗██╗██╗ ██╗ ███████╗ ██╔════╝██╔══██╗██╔══██╗ ██╔════╝██║ ██╔╝██║██║ ██║ ██╔════╝ ██║ ███████║██║ ██║ ███████╗█████╔╝ ██║██║ ██║ ███████╗ ██║ ██╔══██║██║ ██║ ╚════██║██╔═██╗ ██║██║ ██║ ╚════██║ ╚██████╗██║ ██║██████╔╝ ███████║██║ ██╗██║███████╗███████╗███████║ ╚═════╝╚═╝ ╚═╝╚═════╝ ╚══════╝╚═╝ ╚═╝╚═╝╚══════╝╚══════╝╚══════╝`; const ASCII_MEASURE_FONT_SIZE = 10; const ASCII_MIN_FONT_SIZE = 7; const ASCII_MAX_FONT_SIZE = 18; const ASCII_MAX_HEIGHT = 132; const ASCII_WIDTH_FILL = 0.995; function clamp(value: number, min: number, max: number) { return Math.min(Math.max(value, min), max); } function AsciiWord({ ascii }: { ascii: string }) { const frameRef = useRef(null); const measureRef = useRef(null); const [fontSize, setFontSize] = useState(10.5); useLayoutEffect(() => { const frame = frameRef.current; const measure = measureRef.current; if (!frame || !measure) { return; } const updateFontSize = () => { const measuredWidth = measure.scrollWidth; const measuredHeight = measure.scrollHeight; const availableWidth = frame.clientWidth * ASCII_WIDTH_FILL; if (!measuredWidth || !measuredHeight || !availableWidth) { return; } const widthSize = (availableWidth / measuredWidth) * ASCII_MEASURE_FONT_SIZE; const heightSize = (ASCII_MAX_HEIGHT / measuredHeight) * ASCII_MEASURE_FONT_SIZE; const nextFontSize = clamp( Math.min(widthSize, heightSize), ASCII_MIN_FONT_SIZE, ASCII_MAX_FONT_SIZE ); setFontSize((current) => Math.abs(current - nextFontSize) > 0.05 ? nextFontSize : current ); }; updateFontSize(); const resizeObserver = new ResizeObserver(updateFontSize); resizeObserver.observe(frame); void document.fonts?.ready.then(updateFontSize); return () => resizeObserver.disconnect(); }, [ascii]); const visibleClassName = "inline-block select-none whitespace-pre font-mono leading-[108%]"; const measureClassName = "pointer-events-none invisible absolute left-0 top-0 inline-block whitespace-pre font-mono text-[10px] leading-[108%]"; const asciiStyle = { fontSize: `${fontSize}px` } as CSSProperties; return (
        {ascii}
      
        {ascii}
      
); } function HeroAsciiHeading() { return ( ); } function HeroSubtitle({ className = "" }: { className?: string }) { return (

Generate CAD in AI agents like Codex and Claude Code.{" "} 100% open source, runs locally, free forever.

); } export function HeroSection() { return (

CAD Skills

); }