Pick the layout job
Use flex when items move in one direction: a navbar, a button row, a form field, or a hero section with text and an image.
Use grid when you need rows and columns together: project cards, pricing boxes, stats, or a dashboard.
Flex solves alignment
Most unfinished hackathon pages look weak because content touches edges, buttons float oddly, or cards do not line up. Flex fixes small layout problems fast.
Start with flex, then add direction, alignment, and gap. Avoid random margins on every child.