Master Next.js layouts for persistent UI, route groups for organization, and nested layouts for shared state. Patterns from building my portfolio architecture.
Layouts wrap pages, persist across navigation, and can fetch data once for all child routes.
Root layout (app/layout.tsx) is responsible for:
Global HTML structure (<html>, <body>)
Global CSS and fonts