Skip to content

Commit e173a8d

Browse files
author
lam
committed
Refactor layout of investments section
1 parent 02e1a0e commit e173a8d

2 files changed

Lines changed: 208 additions & 172 deletions

File tree

assets/css/landing.css

Lines changed: 156 additions & 120 deletions
Original file line numberDiff line numberDiff line change
@@ -409,25 +409,93 @@ body.layout--landing .initial-content {
409409
}
410410

411411
/* =====================================================================
412-
6. INVESTMENT GRID (asymmetric bento — 5 cards)
413-
=====================================================================
414-
Desktop:
415-
+------------------+ +-----------+
416-
| 1 (featured) | | 2 |
417-
| spans 2 rows | +-----------+
418-
| | | 3 |
419-
+------------------+ +-----------+
420-
+------------------+ +-----------+
421-
| 4 | | 5 |
422-
+------------------+ +-----------+
412+
6. TIMELINE
423413
===================================================================== */
424-
.lp-grid {
425-
display: grid;
426-
grid-template-columns: 1.5fr 1fr;
427-
gap: 1rem;
414+
.lp-timeline {
415+
position: relative;
416+
display: flex;
417+
flex-direction: column;
418+
padding: 1rem 0 2rem;
419+
}
420+
421+
/* Central vertical spine */
422+
.lp-timeline::before {
423+
content: "";
424+
position: absolute;
425+
left: 50%;
426+
top: 0;
427+
bottom: 0;
428+
width: 2px;
429+
background: linear-gradient(to bottom, rgba(247,147,26,0.6), rgba(139,92,246,0.4), transparent);
430+
transform: translateX(-50%);
431+
}
432+
433+
/* Year badge */
434+
.lp-tl-year {
435+
position: relative;
436+
z-index: 2;
437+
align-self: center;
438+
margin: 1.8rem 0 0.8rem;
439+
}
440+
441+
.lp-tl-year:first-child { margin-top: 0; }
442+
443+
.lp-tl-year span {
444+
display: inline-block;
445+
font-family: "DM Serif Display", Georgia, serif;
446+
font-size: 0.82rem;
447+
color: #FFE26E;
448+
background: #0a1223;
449+
border: 1px solid rgba(255,226,110,0.2);
450+
padding: 0.3em 1.2em;
451+
border-radius: 100px;
452+
letter-spacing: 0.08em;
453+
}
454+
455+
/* Timeline item row */
456+
.lp-tl-item {
457+
position: relative;
458+
display: flex;
459+
align-items: flex-start;
460+
width: 100%;
461+
padding: 0.7rem 0;
428462
}
429463

430-
.lp-card--1 { grid-row: span 2; }
464+
.lp-tl-item--right {
465+
justify-content: flex-start;
466+
padding-left: calc(50% + 28px);
467+
}
468+
469+
.lp-tl-item--left {
470+
justify-content: flex-end;
471+
padding-right: calc(50% + 28px);
472+
}
473+
474+
/* Glowing dot on the spine */
475+
.lp-tl-dot {
476+
position: absolute;
477+
left: 50%;
478+
top: 1.6rem;
479+
width: 12px;
480+
height: 12px;
481+
border-radius: 50%;
482+
background: var(--card-color, #F7931A);
483+
border: 2.5px solid #0a1223;
484+
box-shadow: 0 0 10px var(--card-glow, rgba(247,147,26,0.3));
485+
transform: translateX(-50%) scale(0);
486+
z-index: 2;
487+
transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
488+
}
489+
490+
.lp-tl-item.is-visible .lp-tl-dot {
491+
transform: translateX(-50%) scale(1);
492+
}
493+
494+
/* Card fills available half */
495+
.lp-tl-item .lp-card {
496+
flex: 1;
497+
max-width: 100%;
498+
}
431499

432500
/* =====================================================================
433501
7. CARD
@@ -466,20 +534,6 @@ body.layout--landing .initial-content {
466534
background: var(--card-accent, linear-gradient(90deg, #F7931A, #FFE26E));
467535
}
468536

469-
/* Number watermark */
470-
.lp-card__num {
471-
position: absolute;
472-
bottom: -0.6rem;
473-
right: 0.6rem;
474-
font-size: 7rem;
475-
font-weight: 900;
476-
line-height: 1;
477-
letter-spacing: -0.06em;
478-
color: rgba(255,255,255,0.025);
479-
pointer-events: none;
480-
user-select: none;
481-
}
482-
483537
/* Inner body */
484538
.lp-card__body {
485539
display: flex;
@@ -489,44 +543,6 @@ body.layout--landing .initial-content {
489543
flex: 1;
490544
}
491545

492-
/* Featured card: gradient header zone */
493-
.lp-card--1 .lp-card__zone {
494-
display: flex;
495-
align-items: center;
496-
justify-content: space-between;
497-
padding: 0.5rem 1.2rem;
498-
background: linear-gradient(135deg,
499-
rgba(247,147,26,0.14) 0%,
500-
rgba(255,226,110,0.05) 100%);
501-
border-bottom: 1px solid rgba(247,147,26,0.12);
502-
}
503-
504-
.lp-pill {
505-
display: inline-flex;
506-
align-items: center;
507-
gap: 0.35em;
508-
font-size: 0.55rem;
509-
letter-spacing: 0.14em;
510-
text-transform: uppercase;
511-
padding: 0.22em 0.7em;
512-
border-radius: 100px;
513-
}
514-
515-
.lp-pill--orange {
516-
color: #F7931A;
517-
background: rgba(247,147,26,0.12);
518-
border: 1px solid rgba(247,147,26,0.25);
519-
}
520-
521-
.lp-pill--orange::before {
522-
content: "";
523-
width: 4px;
524-
height: 4px;
525-
border-radius: 50%;
526-
background: #F7931A;
527-
box-shadow: 0 0 5px #F7931A;
528-
}
529-
530546
.lp-card__date {
531547
font-size: 0.6rem;
532548
color: rgba(255,255,255,0.25);
@@ -555,13 +571,6 @@ body.layout--landing .initial-content {
555571
border: 1px solid rgba(255,255,255,0.08);
556572
}
557573

558-
.lp-card--1 .lp-card__icon {
559-
width: 36px;
560-
height: 36px;
561-
font-size: 0.95rem;
562-
margin-bottom: 0.3rem;
563-
}
564-
565574
/* Thumbnail images replacing icons */
566575
.lp-card__thumb {
567576
width: 64px;
@@ -588,26 +597,15 @@ body.layout--landing .initial-content {
588597
margin-bottom: 0;
589598
}
590599

591-
.lp-card--1 .lp-card__thumb {
592-
width: 72px;
593-
height: 72px;
594-
border-radius: 14px;
595-
}
596-
597600
.lp-card__name {
598-
font-family: "DM Serif Display", Georgia, serif;
599-
font-size: 0.9rem;
600-
font-weight: 400;
601+
font-family: "DM Sans", "Helvetica Neue", Arial, sans-serif;
602+
font-size: 1rem;
603+
font-weight: 700;
601604
color: #fff;
602605
letter-spacing: -0.01em;
603606
line-height: 1.2;
604607
}
605608

606-
.lp-card--1 .lp-card__name {
607-
font-size: 1.1rem;
608-
letter-spacing: -0.02em;
609-
}
610-
611609
.lp-card__sub {
612610
font-size: 0.66rem;
613611
color: rgba(255,255,255,0.34);
@@ -729,11 +727,27 @@ body.layout--landing .initial-content {
729727

730728
/* --- Tablet (max 860px) ---------------------------------------------- */
731729
@media (max-width: 860px) {
732-
.lp-grid {
733-
grid-template-columns: 1fr;
730+
/* Timeline: spine shifts to left, all cards on right */
731+
.lp-timeline::before {
732+
left: 24px;
733+
transform: none;
734+
}
735+
736+
.lp-tl-year {
737+
align-self: flex-start;
738+
margin-left: 10px;
739+
}
740+
741+
.lp-tl-item--right,
742+
.lp-tl-item--left {
743+
padding-left: 52px;
744+
padding-right: 0;
745+
justify-content: flex-start;
734746
}
735747

736-
.lp-card--1 { grid-row: auto; }
748+
.lp-tl-dot {
749+
left: 24px;
750+
}
737751

738752
.lp-stats-grid {
739753
grid-template-columns: repeat(2, 1fr);
@@ -837,6 +851,24 @@ body.layout--landing .initial-content {
837851
padding: 2rem 1rem 1.5rem;
838852
}
839853

854+
/* Timeline mobile */
855+
.lp-timeline::before {
856+
left: 16px;
857+
}
858+
859+
.lp-tl-year {
860+
margin-left: 2px;
861+
}
862+
863+
.lp-tl-item--right,
864+
.lp-tl-item--left {
865+
padding-left: 40px;
866+
}
867+
868+
.lp-tl-dot {
869+
left: 16px;
870+
}
871+
840872
/* Cards */
841873
.lp-card__body {
842874
padding: 1rem 1rem 1rem;
@@ -846,10 +878,6 @@ body.layout--landing .initial-content {
846878
font-size: 1rem;
847879
}
848880

849-
.lp-card--1 .lp-card__name {
850-
font-size: 1.15rem;
851-
}
852-
853881
.lp-card__sub {
854882
font-size: 0.88rem;
855883
}
@@ -881,14 +909,6 @@ body.layout--landing .initial-content {
881909
padding: 0.25em 0.7em;
882910
}
883911

884-
.lp-pill {
885-
font-size: 0.58rem;
886-
}
887-
888-
.lp-card__num {
889-
font-size: 5rem;
890-
}
891-
892912
/* Thumbnails */
893913
.lp-card__thumb {
894914
width: 56px;
@@ -900,11 +920,6 @@ body.layout--landing .initial-content {
900920
height: 46px;
901921
}
902922

903-
.lp-card--1 .lp-card__thumb {
904-
width: 64px;
905-
height: 64px;
906-
}
907-
908923
/* Banner */
909924
.lp-banner {
910925
padding: 2rem 1.2rem;
@@ -942,25 +957,46 @@ body.layout--landing .initial-content {
942957
transform: translateY(0);
943958
}
944959

945-
/* Stagger children within the portfolio grid */
946-
.lp-grid .lp-card {
960+
/* Timeline items: directional slide-in */
961+
.lp-tl-item {
947962
opacity: 0;
948-
transform: translateY(28px);
949-
transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
950-
transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
963+
transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
964+
transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
965+
}
966+
967+
.lp-tl-item--right {
968+
transform: translateX(40px);
951969
}
952970

953-
.lp-grid.is-visible .lp-card:nth-child(1) { transition-delay: 0s; }
954-
.lp-grid.is-visible .lp-card:nth-child(2) { transition-delay: 0.12s; }
955-
.lp-grid.is-visible .lp-card:nth-child(3) { transition-delay: 0.24s; }
956-
.lp-grid.is-visible .lp-card:nth-child(4) { transition-delay: 0.36s; }
957-
.lp-grid.is-visible .lp-card:nth-child(5) { transition-delay: 0.48s; }
971+
.lp-tl-item--left {
972+
transform: translateX(-40px);
973+
}
958974

959-
.lp-grid.is-visible .lp-card {
975+
.lp-tl-item.is-visible {
976+
opacity: 1;
977+
transform: translateX(0);
978+
}
979+
980+
/* Year marker fade-in */
981+
.lp-tl-year {
982+
opacity: 0;
983+
transform: translateY(16px);
984+
transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
985+
transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
986+
}
987+
988+
.lp-tl-year.is-visible {
960989
opacity: 1;
961990
transform: translateY(0);
962991
}
963992

993+
/* Mobile: all items slide from right */
994+
@media (max-width: 860px) {
995+
.lp-tl-item--left {
996+
transform: translateX(40px);
997+
}
998+
}
999+
9641000
/* Stagger stat cards */
9651001
.lp-stats-grid .lp-stat-card {
9661002
opacity: 0;

0 commit comments

Comments
 (0)