Skip to content

Commit 583fb89

Browse files
Apply Material 3 styling and fix the Persian name and doubled heading dots
Co-Authored-By: Codebuff <noreply@codebuff.com>
1 parent 6896577 commit 583fb89

8 files changed

Lines changed: 228 additions & 73 deletions

File tree

‎app/assets/styles/main.css‎

Lines changed: 108 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,42 @@
3232
--section-y: clamp(56px, 8vw, 104px);
3333

3434
--ease: cubic-bezier(0.22, 1, 0.36, 1);
35+
36+
/* ---------- Material 3 layer ---------- */
37+
/* Colour roles, elevation, state layers and shape scale from Material 3,
38+
mapped onto the paper palette so the page keeps its own character. */
39+
--md-primary: #2f3bff;
40+
--md-on-primary: #ffffff;
41+
--md-primary-container: #e4e6ff;
42+
--md-on-primary-container: #0b1170;
43+
--md-secondary-container: #e9e5dd;
44+
--md-on-secondary-container: #2b2720;
45+
--md-surface: #f2efe9;
46+
--md-surface-dim: #e9e5dd;
47+
--md-surface-container-lowest: #fdfbf7;
48+
--md-surface-container: #faf8f4;
49+
--md-surface-container-high: #efece5;
50+
--md-on-surface: #141311;
51+
--md-on-surface-variant: #4f4c45;
52+
--md-outline: #c7c1b5;
53+
--md-outline-variant: #ded9cf;
54+
55+
--md-elevation-1: 0 1px 2px rgba(20, 19, 17, 0.1), 0 1px 3px 1px rgba(20, 19, 17, 0.06);
56+
--md-elevation-2: 0 1px 2px rgba(20, 19, 17, 0.1), 0 2px 6px 2px rgba(20, 19, 17, 0.08);
57+
--md-elevation-3: 0 1px 3px rgba(20, 19, 17, 0.12), 0 4px 8px 3px rgba(20, 19, 17, 0.08);
58+
59+
--md-state-hover: 0.08;
60+
--md-state-focus: 0.1;
61+
--md-state-press: 0.12;
62+
63+
--md-motion-standard: cubic-bezier(0.2, 0, 0, 1);
64+
--md-motion-emphasized: cubic-bezier(0.05, 0.7, 0.1, 1);
65+
66+
--md-shape-xs: 4px;
67+
--md-shape-sm: 8px;
68+
--md-shape-md: 12px;
69+
--md-shape-lg: 16px;
70+
--md-shape-xl: 28px;
3571
}
3672

3773
*,
@@ -142,7 +178,7 @@ button {
142178
.skip {
143179
position: fixed;
144180
top: 12px;
145-
left: 12px;
181+
inset-inline-start: 12px;
146182
z-index: 1000;
147183
padding: 10px 16px;
148184
border-radius: var(--radius-pill);
@@ -217,7 +253,10 @@ button {
217253

218254
/* ---------- Controls ---------- */
219255

256+
/* Material 3 filled / outlined / tonal buttons: state layer, elevation, ripple. */
257+
220258
.btn {
259+
position: relative;
221260
display: inline-flex;
222261
align-items: center;
223262
gap: 8px;
@@ -228,43 +267,92 @@ button {
228267
font-weight: 500;
229268
letter-spacing: -0.01em;
230269
cursor: pointer;
270+
overflow: hidden;
271+
isolation: isolate;
272+
-webkit-tap-highlight-color: transparent;
231273
transition:
232-
transform 0.35s var(--ease),
233-
background-color 0.25s var(--ease),
234-
border-color 0.25s var(--ease),
235-
color 0.25s var(--ease);
274+
box-shadow 0.25s var(--md-motion-standard),
275+
background-color 0.25s var(--md-motion-standard),
276+
border-color 0.25s var(--md-motion-standard),
277+
color 0.25s var(--md-motion-standard);
278+
}
279+
280+
.btn::before {
281+
content: '';
282+
position: absolute;
283+
inset: 0;
284+
background: currentColor;
285+
opacity: 0;
286+
pointer-events: none;
287+
transition: opacity 0.15s var(--md-motion-standard);
288+
}
289+
290+
.btn:hover::before {
291+
opacity: var(--md-state-hover);
236292
}
237293

238-
.btn:hover {
239-
transform: translateY(-2px);
294+
.btn:focus-visible::before {
295+
opacity: var(--md-state-focus);
296+
}
297+
298+
.btn:active::before {
299+
opacity: var(--md-state-press);
240300
}
241301

242302
.btn--primary {
243-
background: var(--accent);
244-
color: #fff;
303+
background: var(--md-primary);
304+
color: var(--md-on-primary);
305+
box-shadow: var(--md-elevation-1);
245306
}
246307

247308
.btn--primary:hover {
248-
background: var(--accent-deep);
309+
background: var(--md-primary);
310+
box-shadow: var(--md-elevation-2);
249311
}
250312

251313
.btn--ghost {
252-
border-color: var(--line-strong);
253-
color: var(--ink);
314+
border-color: var(--md-outline);
315+
color: var(--md-on-surface);
254316
}
255317

256318
.btn--ghost:hover {
257-
border-color: var(--ink);
258-
background: var(--paper-raised);
319+
border-color: var(--md-on-surface);
320+
background: var(--md-surface-container-lowest);
259321
}
260322

261323
.btn--dark {
262-
background: var(--ink);
263-
color: var(--paper);
324+
background: var(--md-on-surface);
325+
color: var(--md-surface);
326+
box-shadow: var(--md-elevation-1);
264327
}
265328

266329
.btn--dark:hover {
267-
background: var(--accent);
330+
background: var(--md-on-surface);
331+
box-shadow: var(--md-elevation-2);
332+
}
333+
334+
/* Material ripple: one delegated listener in PortfolioPage.vue feeds this. */
335+
336+
.ripple {
337+
position: relative;
338+
overflow: hidden;
339+
}
340+
341+
.ripple-wave {
342+
position: absolute;
343+
border-radius: 50%;
344+
background: currentColor;
345+
opacity: 0.2;
346+
transform: scale(0);
347+
pointer-events: none;
348+
animation: md-ripple 0.55s var(--md-motion-standard) forwards;
349+
}
350+
351+
@keyframes md-ripple {
352+
to {
353+
transform: scale(1);
354+
opacity: 0;
355+
}
268356
}
269357

270358
.pill {
@@ -283,9 +371,10 @@ button {
283371
.chip {
284372
display: inline-flex;
285373
align-items: center;
374+
min-height: 30px;
286375
padding: 6px 12px;
287-
border: 1px solid rgba(20, 19, 17, 0.14);
288-
border-radius: var(--radius-pill);
376+
border: 1px solid var(--md-outline-variant);
377+
border-radius: var(--md-shape-sm);
289378
font-size: 0.78rem;
290379
letter-spacing: -0.005em;
291380
color: var(--ink-soft);

‎app/assets/styles/page.css‎

Lines changed: 35 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
.hero-name-last {
1919
display: block;
20-
padding-left: clamp(0px, 6vw, 84px);
20+
padding-inline-start: clamp(0px, 6vw, 84px);
2121
}
2222

2323
.hero-lede {
@@ -45,10 +45,11 @@
4545
display: grid;
4646
gap: 12px;
4747
padding: 22px;
48-
border: 1px solid var(--line);
48+
border: 1px solid var(--md-outline-variant);
4949
border-radius: var(--radius-md);
5050
corner-shape: squircle;
51-
background: var(--paper-raised);
51+
background: var(--md-surface-container-lowest);
52+
box-shadow: var(--md-elevation-1);
5253
font-size: 0.9rem;
5354
}
5455

@@ -129,8 +130,8 @@
129130
.stack-item {
130131
display: grid;
131132
gap: 1px;
132-
padding-left: 14px;
133-
border-left: 1px solid var(--line);
133+
padding-inline-start: 14px;
134+
border-inline-start: 1px solid var(--line);
134135
}
135136

136137
.stack-index {
@@ -175,10 +176,11 @@
175176
.glance {
176177
align-self: start;
177178
padding: 24px;
178-
border: 1px solid var(--line);
179+
border: 1px solid var(--md-outline-variant);
179180
border-radius: var(--radius-md);
180181
corner-shape: squircle;
181-
background: var(--paper-raised);
182+
background: var(--md-surface-container-lowest);
183+
box-shadow: var(--md-elevation-1);
182184
}
183185

184186
.glance-list {
@@ -203,7 +205,7 @@
203205
}
204206

205207
.glance-row dd {
206-
text-align: right;
208+
text-align: end;
207209
}
208210

209211
.glance-note {
@@ -321,18 +323,21 @@
321323
flex-direction: column;
322324
gap: 9px;
323325
padding: 24px;
324-
border: 1px solid var(--line);
326+
border: 1px solid var(--md-outline-variant);
325327
border-radius: var(--radius-md);
326328
corner-shape: squircle;
327-
background: var(--paper-raised);
329+
background: var(--md-surface-container-lowest);
330+
box-shadow: var(--md-elevation-1);
328331
transition:
329-
transform 0.4s var(--ease),
330-
border-color 0.3s var(--ease);
332+
transform 0.3s var(--md-motion-standard),
333+
box-shadow 0.3s var(--md-motion-standard),
334+
border-color 0.3s var(--md-motion-standard);
331335
}
332336

333337
.process-card:hover {
334-
transform: translateY(-3px);
335-
border-color: var(--line-strong);
338+
transform: translateY(-2px);
339+
border-color: var(--md-outline);
340+
box-shadow: var(--md-elevation-3);
336341
}
337342

338343
.process-card h3 {
@@ -387,6 +392,7 @@
387392
border: 1px solid rgba(20, 19, 17, 0.1);
388393
border-radius: var(--radius-lg);
389394
corner-shape: squircle;
395+
box-shadow: var(--md-elevation-1);
390396
}
391397

392398
.project-main {
@@ -436,7 +442,8 @@
436442

437443
.project-features li {
438444
position: relative;
439-
padding: 9px 0 9px 18px;
445+
padding-block: 9px;
446+
padding-inline: 18px 0;
440447
border-top: 1px solid rgba(20, 19, 17, 0.11);
441448
font-size: 0.83rem;
442449
color: rgba(20, 19, 17, 0.76);
@@ -446,7 +453,7 @@
446453
content: '';
447454
position: absolute;
448455
top: 1.15em;
449-
left: 0;
456+
inset-inline-start: 0;
450457
width: 8px;
451458
height: 1px;
452459
background: var(--accent);
@@ -514,8 +521,9 @@
514521
padding: clamp(28px, 4vw, 52px);
515522
border-radius: var(--radius-lg);
516523
corner-shape: squircle;
517-
background: var(--ink);
518-
color: var(--paper);
524+
background: var(--md-on-surface);
525+
color: var(--md-surface);
526+
box-shadow: var(--md-elevation-2);
519527
}
520528

521529
.eyebrow--invert {
@@ -543,9 +551,11 @@
543551
align-content: start;
544552
gap: 7px;
545553
padding: 22px;
546-
border: 1px solid var(--line);
554+
border: 1px solid var(--md-outline-variant);
547555
border-radius: var(--radius-md);
548556
corner-shape: squircle;
557+
background: var(--md-surface-container-lowest);
558+
box-shadow: var(--md-elevation-1);
549559
}
550560

551561
.ai-card h3 {
@@ -599,10 +609,12 @@
599609
}
600610

601611
.contact-email {
612+
position: relative;
602613
display: inline-flex;
603614
align-items: center;
604615
gap: 10px;
605616
padding-bottom: 6px;
617+
-webkit-tap-highlight-color: transparent;
606618
border-bottom: 1px solid var(--line-strong);
607619
font-family: var(--font-display);
608620
font-size: clamp(1.15rem, 2.3vw, 1.7rem);
@@ -855,14 +867,15 @@ html[dir='rtl'] .footer-name {
855867
}
856868

857869
html[dir='rtl'] .hero-name {
858-
font-size: clamp(2.8rem, 7.6vw, 6.2rem);
870+
font-size: clamp(1.75rem, 6vw, 4.8rem);
859871
line-height: 1.12;
860872
letter-spacing: 0;
873+
white-space: nowrap;
861874
}
862875

863876
html[dir='rtl'] .hero-name-last {
864-
padding-left: 0;
865-
padding-right: clamp(0px, 5vw, 64px);
877+
display: inline;
878+
padding: 0;
866879
}
867880

868881
html[dir='rtl'] .hero-lede,

0 commit comments

Comments
 (0)