mohd-faraz

_blogs

// blogs / 20260429.md

Dev Log: April 29 Wrap-up

2026-04-29
#CSS#Refactoring#TailwindCSS#Security#UI/UX

Overview

Today was one of those 'clean sweep' days. I spent most of my time diving into the CSS weeds and reorganizing the project's foundation to make it feel less like a prototype and more like a real application.

What I Worked On

Taming the CSS Chaos

I started the day by looking at my styling and realized the utility classes were getting a bit out of hand. I had a lot of manual rgba values and backdrop filters scattered around for the glassmorphism effects. I decided to move these into a proper @layer utilities block in the main CSS file.

I eventually refactored them again to use Tailwind's @apply directives. It’s much cleaner to just call @apply backdrop-blur-md than to write out the prefixed CSS properties every single time. It makes the components a lot more readable and the design language consistent across the site.

Making things work on small screens

Responsiveness is always a bit of a battle. I noticed the hero section and some of the interactive boxes were looking pretty cramped on mobile. I went through and adjusted the padding and font sizes—specifically for the multi-language toggle buttons. I had to drop the font size down to 10px on tiny screens just to keep everything from breaking layout, which isn't ideal, but it looks a lot better than it did this morning.

Security and Modularization

I had a 'yikes' moment realizing I was still keeping some sensitive configuration and API endpoints too close to the UI logic. I spent some time migrating all the environment variables to a proper .env setup and created a centralized configuration file.

I also took the opportunity to modularize the code. The main application file was getting bloated with old styles and utility functions. I stripped out a massive block of unused CSS and moved the API logic for the AI features (like the text-to-speech and content generation) into a more structured format. It’s much easier to sleep knowing my API keys aren't just sitting there hardcoded in the component anymore.

UI Refinements

I did a quick pass on the overall look and feel. I updated the shadow logic and backdrop blurs to make the UI feel a bit more modern. The interaction states for buttons now have a nicer transition and a bit more 'pop' with better shadows. It’s a small detail, but it makes the whole portal feel more responsive and high-quality.

Wrapping Up

The codebase feels much lighter now. I've still got some work to do on the AI integration logic tomorrow, but at least now the foundation is solid and the mobile view doesn't look broken.