Skip to content

Commit 264f842

Browse files
davidagustinclaude
andcommitted
fix: improve mobile responsiveness with tighter spacing and overflow safety
- Add overflow-x: hidden on html/body to prevent horizontal scrollbar - Scale down section titles (text-3xl), subtitles (text-base), and section padding (py-16) on mobile for better proportions - Hero title: text-4xl on mobile (was text-5xl) - Grid cards: tighter padding (p-4) and smaller titles on mobile - Modal: responsive padding (p-4 sm:p-6 md:p-8) - Featured strip and controls: reduced bottom margins on mobile Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 4383a35 commit 264f842

File tree

3 files changed

+15
-13
lines changed

3 files changed

+15
-13
lines changed

src/components/Hero.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ const Hero: React.FC = () => {
9090
{/* Name - MASSIVE Apple-style typography */}
9191
<motion.h1
9292
variants={staggerItem}
93-
className="text-5xl sm:text-6xl md:text-7xl lg:text-8xl font-black text-white leading-[1.05] mb-6 tracking-tight"
93+
className="text-4xl sm:text-6xl md:text-7xl lg:text-8xl font-black text-white leading-[1.05] mb-6 tracking-tight"
9494
>
9595
David Agustin
9696
</motion.h1>

src/components/Projects.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ const FeaturedStrip: React.FC<{ onSelect: (p: Project) => void }> = ({ onSelect
8181
}, [isPlaying]);
8282

8383
return (
84-
<div className="mb-12">
84+
<div className="mb-8 sm:mb-12">
8585
<div className="flex items-center gap-3 mb-4">
8686
<h3 className="text-sm font-semibold uppercase tracking-wider text-surface-400 dark:text-surface-500">
8787
Featured
@@ -447,12 +447,12 @@ const GridView: React.FC<{
447447
>
448448
<ProjectThumbnail project={project} className="h-40" />
449449

450-
<div className="p-6">
451-
<div className="mb-4">
452-
<span className="inline-block text-[10px] font-semibold uppercase tracking-wider text-surface-400 mb-3">
450+
<div className="p-4 sm:p-6">
451+
<div className="mb-3 sm:mb-4">
452+
<span className="inline-block text-[10px] font-semibold uppercase tracking-wider text-surface-400 mb-2 sm:mb-3">
453453
{project.category}
454454
</span>
455-
<h3 className="text-lg font-bold text-surface-900 dark:text-white mb-2 group-hover:text-primary-700 dark:group-hover:text-primary-400 transition-colors">
455+
<h3 className="text-base sm:text-lg font-bold text-surface-900 dark:text-white mb-1.5 sm:mb-2 group-hover:text-primary-700 dark:group-hover:text-primary-400 transition-colors">
456456
{project.title}
457457
</h3>
458458
<p className="text-sm text-surface-500 dark:text-surface-400 leading-relaxed line-clamp-3">
@@ -589,7 +589,7 @@ const Projects: React.FC = () => {
589589

590590
<FeaturedStrip onSelect={setSelectedProject} />
591591

592-
<div className="mb-10 space-y-4">
592+
<div className="mb-6 sm:mb-10 space-y-3 sm:space-y-4">
593593
{/* Search + View Toggle Row */}
594594
<div className="flex flex-col sm:flex-row sm:items-center gap-3">
595595
<label htmlFor="project-search" className="sr-only">Search projects</label>
@@ -746,13 +746,13 @@ const Projects: React.FC = () => {
746746
className="w-full"
747747
/>
748748

749-
<div className="p-6 sm:p-8">
750-
<div className="flex items-start justify-between mb-4">
749+
<div className="p-4 sm:p-6 md:p-8">
750+
<div className="flex items-start justify-between mb-3 sm:mb-4">
751751
<div>
752752
<span className="inline-block text-[10px] font-semibold uppercase tracking-wider text-primary-600 mb-2">
753753
{selectedProject.category}
754754
</span>
755-
<h3 className="text-2xl font-bold text-surface-900 dark:text-white">
755+
<h3 className="text-xl sm:text-2xl font-bold text-surface-900 dark:text-white">
756756
{selectedProject.title}
757757
</h3>
758758
</div>

src/index.css

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55
@layer base {
66
html {
77
scroll-behavior: smooth;
8+
overflow-x: hidden;
89
}
910

1011
body {
12+
overflow-x: hidden;
1113
font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
1214
"Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans",
1315
"Helvetica Neue", sans-serif;
@@ -62,15 +64,15 @@
6264
}
6365

6466
.section-title {
65-
@apply text-4xl sm:text-5xl lg:text-6xl font-bold text-surface-900 mb-6 tracking-tight;
67+
@apply text-3xl sm:text-5xl lg:text-6xl font-bold text-surface-900 mb-4 sm:mb-6 tracking-tight;
6668
}
6769

6870
.dark .section-title {
6971
@apply text-white;
7072
}
7173

7274
.section-subtitle {
73-
@apply text-lg sm:text-xl text-surface-500 mb-16 max-w-2xl leading-relaxed;
75+
@apply text-base sm:text-xl text-surface-500 mb-10 sm:mb-16 max-w-2xl leading-relaxed;
7476
}
7577

7678
.dark .section-subtitle {
@@ -86,7 +88,7 @@
8688
}
8789

8890
section:not(#home) {
89-
@apply py-24 sm:py-32;
91+
@apply py-16 sm:py-24 lg:py-32;
9092
}
9193

9294
.loading-screen {

0 commit comments

Comments
 (0)