Skip to content

Commit 5a5b5d0

Browse files
committed
fix(homepage): mobile responsive
1 parent 5b48ecf commit 5a5b5d0

1 file changed

Lines changed: 49 additions & 21 deletions

File tree

src/components/Highlights.module.css

Lines changed: 49 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
/* --- BENTO GRID (2x2) --- */
3838
.bentoGrid {
3939
display: grid;
40-
/* Auto-fit with a min-width ensures it goes 1-col on mobile, 2-col on desktop */
4140
grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
4241
gap: 2rem;
4342
margin-bottom: 3rem;
@@ -53,6 +52,7 @@
5352
flex-direction: column;
5453
transition: transform 0.2s, box-shadow 0.2s;
5554
height: 100%;
55+
min-width: 0;
5656
}
5757

5858
.featureCard:hover {
@@ -192,12 +192,17 @@
192192
border-bottom: 1px solid #e2e8f0;
193193
background-image: radial-gradient(#cbd5e1 1px, transparent 1px);
194194
background-size: 24px 24px;
195+
/* Add overflow hidden to prevent children from stretching page width */
196+
overflow: hidden;
195197
}
198+
196199
.splitRow {
197200
display: grid;
201+
/* Default: 2 columns on Desktop */
198202
grid-template-columns: 1fr 1fr;
199203
gap: 4rem;
200204
align-items: center;
205+
max-width: 100%; /* Ensure it doesn't exceed container */
201206
}
202207
.badge {
203208
display: inline-block;
@@ -414,35 +419,58 @@
414419
}
415420

416421
/* --- RESPONSIVE --- */
417-
/* Mobile Tweaks */
418-
@media (max-width: 768px) {
419-
.logos {
420-
gap: 2rem;
422+
/* 1. TABLET LAYOUT (Between 768px and 996px) */
423+
/* Stack content vertically, but KEEP the terminal visible */
424+
@media (max-width: 996px) {
425+
.splitRow {
426+
grid-template-columns: 1fr; /* Stack columns vertically */
427+
gap: 3rem;
428+
text-align: center; /* Center text for better vertical flow */
421429
}
422-
.logoBig {
423-
height: 70px;
430+
431+
.splitContent {
432+
order: 1; /* Text on top */
433+
margin: 0 auto;
434+
width: 100%;
435+
max-width: 700px;
424436
}
425-
.logoSmall {
426-
height: 35px;
437+
438+
.splitVisual {
439+
order: 2; /* Terminal on bottom */
440+
display: block; /* Ensure it is VISIBLE */
441+
width: 100%;
442+
max-width: 700px;
443+
margin: 0 auto;
444+
text-align: left; /* Reset text align for code inside */
427445
}
428-
}
429446

430-
@media (max-width: 996px) {
431-
.bentoGrid {
432-
grid-template-columns: 1fr;
447+
/* Center the badges/capabilities */
448+
.badge {
449+
margin-left: auto;
450+
margin-right: auto;
433451
}
434-
.splitRow {
435-
grid-template-columns: 1fr;
436-
gap: 2rem;
452+
453+
.capabilitiesGrid {
454+
margin: 2rem auto 0;
455+
text-align: left;
456+
max-width: 500px;
457+
grid-template-columns: 1fr 1fr; /* On tablet, we can fit 2 cols of capabilities */
458+
gap: 1.5rem;
437459
}
438-
.splitContent {
439-
order: 1;
440-
text-align: center;
460+
}
461+
462+
/* 2. MOBILE LAYOUT (Below 768px) */
463+
/* Hide the terminal ONLY here */
464+
@media (max-width: 768px) {
465+
.bentoGrid {
466+
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
441467
}
468+
442469
.splitVisual {
443-
order: 2;
470+
display: none !important; /* POOF! Gone on mobile */
444471
}
472+
445473
.capabilitiesGrid {
446-
text-align: left;
474+
grid-template-columns: 1fr; /* Stack capabilities on phone */
447475
}
448476
}

0 commit comments

Comments
 (0)