A modern, accessible tourism landing page for Athens, Greece, utilizing next-generation CSS color spaces.
Athens Explorer is a responsive, high-performance landing page designed to showcase the cultural and gastronomic highlights of Athens. Unlike traditional static sites, this project leverages Modern CSS (Level 4) features, including the oklch() color space for perceptually uniform gradients and high-fidelity color management.
The design system is built on a "Mobile-First" philosophy (adapted for desktop) with a focus on visual hierarchy and readability.
-
Color System: Migrated away from sRGB/Hex codes to OKLCH. This ensures that color lightness (
$L$ ) and chroma ($C$ ) remain consistent across different hues, improving readability and accessibility. - Typography: Uses Manrope, a modern sans-serif font, ensuring legibility on high-DPI displays.
- Layout Engine: Utilizes CSS Flexbox for a fluid, adaptive layout that maintains structure across different viewport sizes.
I chose oklch over standard Hex/RGB because it decouples Lightness from Chroma (intensity).
- Code:
color: oklch(0.76 0.05 264); - Benefit: This allows for generating dynamic hover states and gradients (like the navbar background) without accidental shifts in perceived brightness, which is a common issue with HSL.
The markup strictly follows semantic standards (<header>, <main>, <section>, <nav>) rather than using generic <div> wrappers.
- SEO: Helps search engines understand the priority of content.
- Accessibility: Allows screen readers to navigate the "Landmark" regions of the page effectively.
- Lazy Loading: All images utilize
loading="lazy"to defer off-screen image decoding. This significantly improves the Largest Contentful Paint (LCP) metric on initial load. - Compositor-Only Animations: The navbar underline animation targets the
widthandopacityproperties to minimize main-thread layout thrashing.
- Sticky Navigation: Implemented with pure CSS (
position: sticky), removing the need for JavaScript event listeners. - Interactive Cards: Hover states with
transform: scale()and opacity transitions create a tactile feel for the user. - Smooth Scrolling: Native CSS
scroll-behavior: smoothprovides a polished navigation experience between sections.
- Clone the repository.
- Open
index.htmlin any modern browser.- Note: No build step (npm/webpack) is required, adhering to the "Vanilla Web" philosophy.