-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
931 lines (890 loc) · 49.1 KB
/
Copy pathindex.html
File metadata and controls
931 lines (890 loc) · 49.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#FAF7F3">
<title>Lars Holmström — Web design + full stack</title>
<meta name="description" content="Full-stack developer in Melbourne building native apps and privacy-first web tools. Design and engineering in one pair of hands.">
<meta property="og:type" content="website">
<meta property="og:title" content="Lars Holmström — Web design + full stack">
<meta property="og:description" content="Full-stack developer in Melbourne building native apps and privacy-first web tools.">
<meta property="og:url" content="https://larsh.dev/">
<meta property="og:site_name" content="Lars Holmström">
<meta property="og:image" content="https://larsh.dev/og.png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:creator" content="@larsitodev">
<meta name="twitter:image" content="https://larsh.dev/og.png">
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
<link rel="stylesheet" href="/vendor/fonts.css">
<style>
:root{
--paper:#FAF7F3;
--ink:#111111;
--mut:rgba(17,17,17,.55);
--hair:rgba(17,17,17,.12);
--pw:min(1180px,calc(100vw - 128px));
--rad:18px;
--ease:cubic-bezier(.22,.8,.28,1);
}
@media (max-width:560px){ :root{ --pw:calc(100vw - 48px); } }
*{margin:0;padding:0;box-sizing:border-box}
html{scroll-behavior:auto}
html,body{background:var(--paper)}
/* page scrollbar: ink pill like the nav, rounded + slightly inset via a transparent
border (background-clip keeps the fill inside it, so the border reads as a gap).
Scoped to the viewport (html) so inner textareas / code blocks keep default bars.
Webkit/Chromium/Safari; Firefox gets colour only (no radius/inset). */
html::-webkit-scrollbar{width:20px}
html::-webkit-scrollbar-track{background:transparent}
html::-webkit-scrollbar-thumb{background:var(--ink);border-radius:12px;border:4px solid transparent;background-clip:padding-box}
html{scrollbar-color:var(--ink) transparent}
body{
font-family:'Archivo',ui-sans-serif,system-ui,sans-serif;
color:var(--ink);
-webkit-font-smoothing:antialiased;
overflow-x:clip;
}
.mono{font-family:'Martian Mono',ui-monospace,monospace}
img{display:block;max-width:100%}
a{color:inherit;text-decoration:none}
::selection{background:#111;color:#FAF7F3}
/* paper texture: turbulence + diffuse lighting reads as cold-press tooth, not pixel noise.
It sits on the paper, under ink and images. Absolute (not fixed) so it never covers the footer. */
:root{--papertex:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='512' height='512'%3E%3Cfilter id='p' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.04' numOctaves='5' stitchTiles='stitch' result='n'/%3E%3CfeDiffuseLighting in='n' lighting-color='%23ffffff' surfaceScale='1.6'%3E%3CfeDistantLight azimuth='45' elevation='58'/%3E%3C/feDiffuseLighting%3E%3C/filter%3E%3Crect width='512' height='512' filter='url(%23p)'/%3E%3C/svg%3E")}
.grain{position:absolute;inset:0;pointer-events:none;
background:var(--papertex) repeat 0 0/512px;
opacity:.3;mix-blend-mode:multiply}
/* Safari refuses to blend against a stacking context's own background AND against
negative z-index siblings. So: paper + grain are plain positioned siblings painted
first in DOM order, no z-index anywhere inside the group. */
.page{position:relative;z-index:1;isolation:isolate}
.pagebg{position:absolute;inset:0;background:var(--paper)}
.wrap{width:var(--pw);margin-inline:auto}
/* ---------- nav ---------- */
.nav{position:fixed;top:24px;left:50%;translate:-50% 0;z-index:40;
width:min(420px,calc(100vw - 32px))}
.navpill{background:var(--ink);border-radius:var(--rad);overflow:hidden;
height:60px;transition:height .55s var(--ease);
box-shadow:0 0 0 rgba(0,0,0,0)}
.nav.open .navpill{box-shadow:0 18px 48px rgba(0,0,0,.18)}
.navrow{display:flex;align-items:center;justify-content:space-between;
height:60px;padding:8px 8px 8px 24px}
.brand{color:var(--paper);font-weight:600;font-size:20px;letter-spacing:-.02em}
.navbtn{width:44px;height:44px;border:0;border-radius:12px;background:var(--paper);
color:var(--ink);cursor:pointer;display:grid;place-items:center;font:inherit}
/* hamburger → X. Three stacked bars; on open the middle fades and the outer two
slide to centre and cross. Only transform/opacity animate, so it stays smooth. */
.navbtn .ic{display:block;width:16px;height:12px;position:relative}
.navbtn .ic i{position:absolute;left:0;width:16px;height:2px;border-radius:1px;
background:var(--ink);transition:transform .32s var(--ease),opacity .18s var(--ease)}
.navbtn .ic i:nth-child(1){top:0}
.navbtn .ic i:nth-child(2){top:5px}
.navbtn .ic i:nth-child(3){top:10px}
.nav.open .navbtn .ic i:nth-child(1){transform:translateY(5px) rotate(45deg)}
.nav.open .navbtn .ic i:nth-child(2){opacity:0}
.nav.open .navbtn .ic i:nth-child(3){transform:translateY(-5px) rotate(-45deg)}
.menu{padding:14px 28px 0}
.menu a.mlink{position:relative;display:flex;align-items:baseline;gap:16px;padding:5px 0;
color:var(--paper);font-weight:600;font-size:29px;letter-spacing:-.01em;
opacity:0;translate:0 12px;transition:opacity .4s var(--ease),translate .4s var(--ease)}
.nav.open .menu a.mlink{opacity:1;translate:0 0}
.menu a.mlink .n{font-size:11px;color:rgba(250,247,243,.4)}
.menu a.mlink .t{transition:translate .35s var(--ease)}
.menu a.mlink .a{position:absolute;right:0;top:50%;translate:10px -50%;opacity:0;
font-size:22px;transition:opacity .35s var(--ease),translate .35s var(--ease)}
.menu a.mlink:hover{color:#fff}
.menu a.mlink:hover .t,.menu a.mlink:focus-visible .t{translate:8px 0}
.menu a.mlink:hover .a,.menu a.mlink:focus-visible .a{opacity:1;translate:0 -50%}
.mfoot{display:flex;align-items:center;justify-content:space-between;
margin-top:18px;padding:16px 28px 20px;border-top:1px solid rgba(250,247,243,.15)}
.mfoot .socials{display:flex;gap:18px}
.mfoot .socials a{display:grid;place-items:center;opacity:.9}
.mfoot .socials a:hover{opacity:1}
.mfoot .socials svg{width:20px;height:20px;fill:var(--paper)}
.mfoot .socials svg.stroke{fill:none;stroke:var(--paper);stroke-width:2}
.clock{font-size:11px;letter-spacing:.06em;color:rgba(250,247,243,.5)}
/* ---------- hero + about fold ---------- */
.fold{position:relative}
.fold-sticky{position:sticky;top:0;height:100svh;
display:grid;place-items:center;pointer-events:none}
.portrait{width:min(440px,60vw);height:auto;aspect-ratio:1;border-radius:50%;object-fit:cover;
filter:grayscale(1);will-change:transform,filter}
.portrait-in{display:none} /* mobile-only inline About portrait (see ≤1023px) */
.hero{position:relative;min-height:100svh;margin-top:-100svh;
display:flex;flex-direction:column;justify-content:center;align-items:center}
.display-wrap{position:relative;margin-top:-6svh}
/* hero display face = Archivo instanced at wdth 118% (wider than Majd's default 100%
for more horizontal command), subset to the hero glyphs (~2.5KB). Static single
weight — the canvas draws a fixed weight anyway, so nothing dynamic is lost. */
@font-face{font-family:'Archivo Ext';src:url(/vendor/fonts/archivo-hero-118.woff2) format('woff2');font-weight:800;font-display:block}
.display{color:#fff;mix-blend-mode:difference;text-align:center;font-family:'Archivo Ext',sans-serif;
font-weight:800;font-size:clamp(49px,10.3vw,148px);line-height:.92;
letter-spacing:-.025em;user-select:none;
transform:translateZ(0)} /* Safari: promote the blended element to its own layer */
/* liquid text: the headline renders into a WebGL canvas that ripples under the
pointer; the canvas carries the difference blend, HTML text stays for a11y */
.display-gl{position:absolute;left:0;top:-90px;width:100%;height:calc(100% + 180px);
pointer-events:none;mix-blend-mode:difference;transform:translateZ(0)}
.display-wrap.gl .display{opacity:0}
/* captions stack in the bottom-left (© over the city) and slide out of the way as
the fold scrubs the portrait up through them — see updatePortrait(). `translate`
holds the centring so `transform` is free for the scrub; the two compose. */
.hero-foot{position:absolute;left:50%;bottom:36px;translate:-50% 0;
width:var(--pw);display:flex;flex-direction:column;align-items:flex-start;gap:6px;
will-change:transform,opacity}
.hero-foot .year{font-weight:600;font-size:clamp(22px,2.8vw,40px);letter-spacing:-.02em;
line-height:1}
.hero-foot .loc{font-size:clamp(10px,.9vw,13px);letter-spacing:.06em}
/* hero load-in */
@keyframes navIn{from{opacity:0;translate:0 -18px}to{opacity:1;translate:0 0}}
@keyframes riseIn{from{opacity:0;translate:0 22px}to{opacity:1;translate:0 0}}
@keyframes displayIn{
from{opacity:0;transform:translateZ(0) translateY(36px);clip-path:inset(-8% 0 62% 0)}
to{opacity:1;transform:translateZ(0) translateY(0);clip-path:inset(-8% 0 -8% 0)}}
.navpill{animation:navIn .7s var(--ease) .15s backwards}
/* Never animate .display-wrap: transform/opacity/clip-path each make it a stacking
context, and a stacking context ISOLATES mix-blend-mode. The difference blend then
has no backdrop and the letters render white for the animation's whole run, then
snap to black the instant it ends and the isolation collapses. So the load-in runs
on the blended elements themselves — an element's own stacking context isolates its
descendants, not its own blend against the page. JS adds .in once Archivo has loaded
and the GL texture is repainted, so the headline never reveals in a fallback font. */
.hero:not(.in) .display,
.hero:not(.in) .display-gl,
.hero:not(.in) .year,
.hero:not(.in) .loc{opacity:0}
.hero.in .display-wrap:not(.gl) .display{animation:displayIn 1s var(--ease) backwards}
.hero.in .display-gl{animation:displayIn 1s var(--ease) backwards}
.hero.in .year{animation:riseIn .7s var(--ease) .55s backwards}
.hero.in .loc{animation:riseIn .7s var(--ease) .67s backwards}
.about{position:relative;min-height:100svh;display:grid;align-content:center}
.about .grid{width:var(--pw);margin-inline:auto;display:grid;
grid-template-columns:300px 1fr 330px;gap:48px;align-items:start}
.about .colL{grid-column:1}
.about .colR{grid-column:3}
.about .hey{font-weight:600;font-size:clamp(34px,4.5vw,64px);line-height:1;letter-spacing:-.02em}
.about .colL p{margin-top:clamp(24px,8vh,96px);max-width:300px}
.about p{font-size:17px;line-height:1.5;letter-spacing:-.02em}
.about .colR{padding-top:clamp(12px,6vh,64px)}
.about .colR .dim{color:var(--mut);margin-top:24px}
.about .ln{display:block}
.cta{display:inline-block;margin-top:36px;font-weight:600;font-size:17px;
text-decoration:underline;text-underline-offset:4px}
.cta:hover{text-decoration-thickness:2px}
/* ---------- section shell ---------- */
section.block{position:relative;padding:120px 0 60px}
.h2row{display:flex;align-items:baseline;justify-content:space-between;margin-bottom:56px}
h2{font-weight:600;font-size:clamp(36px,4.6vw,64px);letter-spacing:-.02em}
.alink{font-weight:600;font-size:17px;text-decoration:underline;text-underline-offset:4px;white-space:nowrap}
.alink:hover{text-decoration-thickness:2px}
/* reveals — each section enters with its own character */
[data-r]{opacity:0;
transition:opacity .8s var(--ease),translate .8s var(--ease),scale .8s var(--ease);
transition-delay:var(--d,0s)}
[data-r=""],[data-r="up"]{translate:0 26px}
[data-r="left"]{translate:-40px 0}
[data-r="right"]{translate:40px 0}
[data-r="pop"]{translate:0 22px;scale:.965}
[data-r="fade"]{filter:blur(6px);transition:opacity 1s var(--ease),filter 1s var(--ease)}
[data-r].on{opacity:1;translate:0 0;scale:1;filter:none}
.pgrid [data-r]:nth-child(2){--d:.1s}
.pgrid [data-r]:nth-child(3){--d:.05s}
.pgrid [data-r]:nth-child(4){--d:.15s}
.srow[data-r]:nth-of-type(2){--d:.08s}
.srow[data-r]:nth-of-type(3){--d:.16s}
.srow[data-r]:nth-of-type(4){--d:.24s}
/* ---------- projects ---------- */
.pgrid{display:grid;grid-template-columns:1fr 1fr;gap:60px 16px}
.card .ph{border-radius:16px;overflow:hidden;aspect-ratio:582/436;background:#e8e4de}
.card .ph img{width:100%;height:100%;object-fit:cover;transition:scale .8s var(--ease)}
.card:hover .ph img{scale:1.03}
.card h3{font-weight:500;font-size:clamp(22px,2.1vw,30px);letter-spacing:-.01em;margin-top:20px}
.card .d{color:var(--mut);font-size:16px;margin-top:5px}
/* ---------- sites index ---------- */
.sites-head{display:grid;grid-template-columns:1fr 360px;align-items:start;gap:32px;margin-bottom:48px}
.sites-head .lead{color:var(--mut);font-size:17px;line-height:1.5}
.srow{display:grid;grid-template-columns:150px 1fr 1fr auto;gap:32px;align-items:center;
padding:18px 0;border-top:1px solid var(--hair)}
.srow:last-of-type{border-bottom:1px solid var(--hair)}
.srow .th{width:150px;aspect-ratio:150/94;border-radius:8px;overflow:hidden}
.srow .th img{width:100%;height:100%;object-fit:cover}
.srow .nm{font-weight:500;font-size:clamp(19px,2vw,30px);letter-spacing:-.01em}
.srow .nc{color:var(--mut);font-size:17px}
/* ---------- services ---------- */
.svc{display:grid;grid-template-columns:320px 1fr 260px;gap:48px;align-items:start;
padding:52px 0}
.svc .num{grid-row:1;font-weight:800;font-size:clamp(96px,14vw,210px);line-height:.85;
letter-spacing:-.03em;color:transparent;-webkit-text-stroke:1.5px rgba(17,17,17,.85)}
.svc h3{font-weight:600;font-size:clamp(26px,2.8vw,40px);letter-spacing:-.015em}
.svc .d{color:var(--mut);font-size:17px;line-height:1.5;letter-spacing:-.01em;margin-top:16px;max-width:430px}
.svc .tags{text-align:right;font-size:11px;line-height:2.2;letter-spacing:.08em;color:var(--mut);padding-top:8px}
/* ---------- contact ---------- */
.contact{display:grid;grid-template-columns:1fr 556px;gap:64px;align-items:start}
.contact h2{font-size:clamp(44px,6vw,88px);letter-spacing:-.025em}
.contact .lead{color:var(--mut);font-size:17px;line-height:1.5;margin-top:28px;max-width:380px}
/* ink button: fixed size; label shifts left while the arrow slides in on hover */
.chip{position:relative;display:inline-flex;align-items:center;justify-content:center;
background:var(--ink);color:var(--paper);border-radius:14px;
padding:15px 30px;font-weight:600;font-size:17px;cursor:pointer;border:0;
overflow:hidden;font-family:inherit}
.chip .t{display:inline-flex;transition:translate .35s var(--ease)}
.chip .a{position:absolute;right:16px;opacity:0;translate:10px 0;
transition:opacity .35s var(--ease),translate .35s var(--ease)}
.chip:hover .t,.chip:focus-visible .t{translate:-9px 0}
.chip:hover .a,.chip:focus-visible .a{opacity:1;translate:0 0}
.chip.sm{padding:13px 24px;font-size:16px;font-weight:500;border-radius:14px}
.chip.mt{margin-top:36px}
.socialrow{display:flex;gap:14px;margin-top:44px}
.socialrow a{width:52px;height:52px;border-radius:999px;background:var(--ink);
display:grid;place-items:center}
.socialrow svg{width:21px;height:21px;fill:var(--paper)}
.socialrow svg.stroke{fill:none;stroke:var(--paper);stroke-width:2}
/* icons take a little spin on hover — contact row and nav menu alike */
.socialrow svg,.mfoot .socials svg{transition:rotate .55s var(--ease)}
.socialrow a:hover svg,.socialrow a:focus-visible svg,
.mfoot .socials a:hover svg,.mfoot .socials a:focus-visible svg{rotate:360deg}
.formcard{background:var(--ink);border-radius:24px;padding:28px}
.formcard label{display:block;color:var(--paper);font-weight:500;font-size:15px;margin:20px 0 8px}
.formcard label:first-child{margin-top:0}
.formcard input,.formcard textarea{width:100%;background:rgba(255,255,255,.06);
border:1px solid rgba(250,247,243,.18);border-radius:12px;color:var(--paper);
font:inherit;font-size:16px;padding:13px 16px;outline:none}
.formcard input:focus,.formcard textarea:focus{border-color:rgba(250,247,243,.5)}
.formcard textarea{min-height:140px;resize:vertical}
.formcard ::placeholder{color:rgba(250,247,243,.4)}
.formcard .send{position:relative;width:100%;margin-top:24px;background:var(--paper);color:var(--ink);
border:0;border-radius:14px;padding:16px;font-weight:600;font-size:17px;cursor:pointer;
display:flex;align-items:center;justify-content:center;overflow:hidden;font-family:inherit}
.formcard .send .t{transition:translate .35s var(--ease)}
.formcard .send .a{position:absolute;right:22px;opacity:0;translate:10px 0;
transition:opacity .35s var(--ease),translate .35s var(--ease)}
.formcard .send:hover .t,.formcard .send:focus-visible .t{translate:-9px 0}
.formcard .send:hover .a,.formcard .send:focus-visible .a{opacity:1;translate:0 0}
.formcard .note{color:rgba(250,247,243,.5);font-size:12px;margin-top:14px;text-align:center;min-height:1em}
.hp{position:absolute;left:-9999px;opacity:0;height:0;overflow:hidden}
/* ---------- footer (uncover) ---------- */
.foot{position:fixed;left:0;right:0;bottom:0;z-index:0;padding:24px;
background:var(--paper)}
.foot::before{content:'';position:absolute;inset:0;pointer-events:none;
background:var(--papertex) repeat 0 0/512px;opacity:.3;mix-blend-mode:multiply}
.footcard{position:relative}
.footcard{background:var(--ink);border-radius:28px;max-width:1392px;margin-inline:auto;
padding:56px 82px 40px;color:var(--paper)}
.footrow{display:flex;align-items:center;justify-content:space-between;gap:24px;flex-wrap:wrap}
.fbtns{display:flex;gap:12px;flex-wrap:wrap}
.fbtn{position:relative;display:inline-flex;align-items:center;justify-content:center;
background:var(--paper);color:var(--ink);border-radius:12px;
padding:12px 24px;font-weight:500;font-size:15px;overflow:hidden}
.fbtn .t{transition:translate .35s var(--ease)}
.fbtn .a{position:absolute;right:11px;opacity:0;translate:9px 0;
transition:opacity .35s var(--ease),translate .35s var(--ease)}
.fbtn:hover .t,.fbtn:focus-visible .t{translate:-7px 0}
.fbtn:hover .a,.fbtn:focus-visible .a{opacity:1;translate:0 0}
.fstatus{font-size:12px;letter-spacing:.06em;color:rgba(250,247,243,.6)}
.wordmark{display:block;text-align:center;font-weight:800;letter-spacing:-.02em;
font-size:clamp(52px,13.4vw,198px);line-height:1;margin-top:36px;color:var(--paper);
user-select:none}
.fmeta{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;
margin-top:34px;font-size:11px;letter-spacing:.06em;color:rgba(250,247,243,.55)}
.fmeta a:hover{color:var(--paper)}
.endspace{height:var(--footh,560px)}
/* ---------- toast ---------- */
.toast{position:fixed;left:50%;bottom:28px;translate:-50% 20px;z-index:60;
background:var(--ink);color:var(--paper);border-radius:999px;padding:12px 22px;
font-size:14px;opacity:0;pointer-events:none;transition:all .4s var(--ease)}
.toast.on{opacity:1;translate:-50% 0}
/* ---------- responsive ---------- */
@media (max-width:1023px){
:root{--pw:calc(100vw - 128px)}
/* portrait moves INTO the About flow on mobile as its own inline slot between the
two text blocks, so it can never collide with the copy at any font size / display
zoom. The fold portrait is hidden here; the hero is clean extended type on paper. */
.about{align-content:start;min-height:auto}
.about .grid{grid-template-columns:1fr;gap:0;padding:80px 0 48px}
.about .colL{grid-column:1}
.about .colR{grid-column:1;padding-top:0;max-width:none}
.about .hey br{display:none}
.about .colL p{margin-top:20px;max-width:none}
.about p{max-width:56ch}
#portrait{display:none}
.portrait-in{display:block;width:min(300px,62vw);height:auto;aspect-ratio:1;border-radius:50%;
object-fit:cover;margin:40px auto}
.contact{grid-template-columns:1fr;gap:56px}
.formcard{max-width:640px}
.svc{grid-template-columns:250px 1fr;gap:32px}
.svc .tags{grid-column:2;text-align:left;padding-top:0}
.sites-head{grid-template-columns:1fr;gap:16px}
.srow{grid-template-columns:130px 1fr auto;gap:24px}
.srow .nc{display:none}
.footcard{padding:44px 48px 32px}
}
@media (max-width:560px){
:root{--pw:calc(100vw - 48px)}
.nav{width:calc(100vw - 32px)}
.about .hey br{display:block}
.about .colL p{margin-top:16px}
.about p{max-width:none}
.pgrid{grid-template-columns:1fr;gap:44px}
.srow{grid-template-columns:92px 1fr auto;gap:18px;padding:20px 0}
.srow .th{width:92px}
.srow .vs .txt{display:none}
.svc{grid-template-columns:1fr;gap:8px;padding:40px 0}
.svc .num{font-size:110px}
.svc h3{margin-top:16px}
.formcard{padding:22px 20px}
.footcard{padding:28px 26px 24px;border-radius:22px}
.foot{padding:0 12px 12px}
.hero-foot{bottom:22px}
section.block{padding:80px 0 40px}
}
/* short viewports (landscape phones): tighten spacing + inline portrait so About fits */
@media (max-width:1023px) and (max-height:760px){
.about .grid{padding:56px 0 40px}
.portrait-in{width:min(180px,34vh);margin:24px auto}
}
@media (prefers-reduced-motion:reduce){
[data-r]{opacity:1;translate:none;transition:none}
.navpill,.display,.display-gl,.hero-foot .year,.hero-foot .loc{animation:none}
/* no gate: show the hero outright rather than wait on fonts */
.hero:not(.in) .display,.hero:not(.in) .display-gl,
.hero:not(.in) .year,.hero:not(.in) .loc{opacity:1}
.display-wrap.gl .display{opacity:0}
*{scroll-behavior:auto!important}
}
</style>
</head>
<body>
<!-- footer sits under the page and is uncovered at the end -->
<footer class="foot" aria-label="Footer">
<div class="footcard">
<div class="footrow">
<nav class="fbtns" aria-label="Footer links">
<a class="fbtn" href="./work.html"><span class="t">Work</span><span class="a">→</span></a>
<a class="fbtn" href="#services"><span class="t">Services</span><span class="a">→</span></a>
<a class="fbtn" href="./blog/"><span class="t">Blog</span><span class="a">→</span></a>
<a class="fbtn" href="/resume/"><span class="t">Résumé</span><span class="a">→</span></a>
</nav>
<span class="fstatus mono">● OPEN TO NEW PROJECTS · MELBOURNE</span>
</div>
<span class="wordmark" aria-hidden="true">LARSH.DEV</span>
<div class="fmeta mono">
<span>© LARS HOLMSTRÖM · <a href="/privacy/">PRIVACY</a></span>
<span>BUILT BY HAND. COOKIELESS. RESPECTS DO NOT TRACK.</span>
</div>
</div>
</footer>
<div class="page" id="page">
<div class="pagebg" aria-hidden="true"></div>
<div class="grain" aria-hidden="true"></div>
<header class="nav" id="nav">
<div class="navpill" id="navpill">
<div class="navrow">
<a class="brand" href="#top">larsh.dev</a>
<button class="navbtn" id="navbtn" aria-expanded="false" aria-label="Menu">
<span class="ic"><i></i><i></i><i></i></span>
</button>
</div>
<nav class="menu" aria-label="Site">
<a class="mlink" href="#work"><span class="n mono">01</span><span class="t">Work</span><span class="a">→</span></a>
<a class="mlink" href="#sites"><span class="n mono">02</span><span class="t">Sites</span><span class="a">→</span></a>
<a class="mlink" href="#services"><span class="n mono">03</span><span class="t">Services</span><span class="a">→</span></a>
<a class="mlink" href="./blog/"><span class="n mono">04</span><span class="t">Blog</span><span class="a">→</span></a>
<a class="mlink" href="#contact"><span class="n mono">05</span><span class="t">Contact</span><span class="a">→</span></a>
</nav>
<div class="mfoot">
<div class="socials">
<a class="js-mail" data-u="larsh.dev" data-d="proton.me" aria-label="Email">
<svg class="stroke" viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="4" width="20" height="16" rx="2"/><path d="m2 7 10 6 10-6"/></svg></a>
<a href="https://x.com/larsitodev" target="_blank" rel="noopener noreferrer" aria-label="X">
<svg viewBox="0 0 24 24"><path d="M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z"/></svg></a>
<a href="https://github.com/lars-1987" target="_blank" rel="noopener noreferrer" aria-label="GitHub">
<svg viewBox="0 0 24 24"><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/></svg></a>
</div>
<span class="clock mono" id="clock">MELB --:--</span>
</div>
</div>
</header>
<div class="fold" id="fold">
<div class="fold-sticky">
<img class="portrait" id="portrait" src="/assets/portrait-900.jpg" alt="Portrait of Lars Holmström" width="900" height="900">
</div>
<section class="hero" id="top">
<div class="display-wrap" id="dwrap">
<h1 class="display" id="display">WEB DESIGN<br>+ FULL STACK</h1>
<canvas class="display-gl" id="dgl" aria-hidden="true"></canvas>
</div>
<div class="hero-foot">
<span class="year">©<span id="year">2026</span></span>
<span class="loc mono">MELBOURNE, AUSTRALIA</span>
</div>
</section>
<section class="about" id="about">
<div class="grid">
<div class="colL">
<h2 class="hey">Hey!<br>Hej!<br>Hola!</h2>
<p>I’m Lars, a full-stack developer in Melbourne building native apps and privacy-first web tools.</p>
</div>
<img class="portrait-in" src="/assets/portrait-900.jpg" alt="Portrait of Lars Holmström" width="900" height="900">
<div class="colR">
<p>I take products from a blank canvas to the App Store and the browser: interface, motion, front end, back end, and the deployment that ships it.</p>
<p class="dim">Design and engineering in one pair of hands, so nothing gets lost in the handoff.</p>
<a class="chip sm mt" href="#contact"><span class="t">Let’s chat</span><span class="a">→</span></a>
</div>
</div>
</section>
</div>
<section class="block" id="work">
<div class="wrap">
<div class="h2row" data-r>
<h2>Selected projects</h2>
<a class="chip sm" href="./work.html"><span class="t">See all</span><span class="a">→</span></a>
</div>
<div class="pgrid">
<a class="card" href="./project.html?id=sanctumpdf" data-r="pop">
<div class="ph"><img src="/assets/sanctum-preview.webp" alt="SanctumPDF app interface" loading="lazy"></div>
<h3>SanctumPDF</h3><p class="d">In-browser PDF conversion</p>
</a>
<a class="card" href="./project.html?id=metastrip" data-r="pop">
<div class="ph"><img src="/assets/metastrip-preview.webp" alt="MetaStrip app interface" loading="lazy"></div>
<h3>MetaStrip</h3><p class="d">Zero-server metadata removal</p>
</a>
<a class="card" href="./project.html?id=renew" data-r="pop">
<div class="ph"><img src="/assets/renew-preview.webp" alt="Renew iOS app" loading="lazy"></div>
<h3>Renew</h3><p class="d">AI skincare tracking for iOS</p>
</a>
<a class="card" href="./project.html?id=bedcheck" data-r="pop">
<div class="ph"><img src="/assets/bedcheck-preview.webp" alt="Bedcheck iOS app" loading="lazy"></div>
<h3>Bedcheck</h3><p class="d">Bedtime accountability for iOS</p>
</a>
</div>
</div>
</section>
<section class="block" id="sites">
<div class="wrap">
<div class="sites-head" data-r>
<h2>Sites that sell</h2>
<p class="lead">Any niche, one job: turn visitors into enquiries. All four are live; click through.</p>
</div>
<div>
<a class="srow" data-r="left" href="/summit/" target="_blank" rel="noopener">
<span class="th"><img src="/assets/summit-preview.webp" alt="Summit site" loading="lazy"></span>
<span class="nm">Summit</span><span class="nc">Bike servicing</span>
<span class="chip sm"><span class="t">View site</span><span class="a">→</span></span>
</a>
<a class="srow" data-r="left" href="/brighton/" target="_blank" rel="noopener">
<span class="th"><img src="/assets/brighton-preview.webp" alt="Brighton site" loading="lazy"></span>
<span class="nm">Brighton</span><span class="nc">Cosmetic dentistry</span>
<span class="chip sm"><span class="t">View site</span><span class="a">→</span></span>
</a>
<a class="srow" data-r="left" href="/hawthorne/" target="_blank" rel="noopener">
<span class="th"><img src="/assets/hawthorne-preview.webp" alt="Hawthorne site" loading="lazy"></span>
<span class="nm">Hawthorne</span><span class="nc">Boutique real estate</span>
<span class="chip sm"><span class="t">View site</span><span class="a">→</span></span>
</a>
<a class="srow" data-r="left" href="/atelier/" target="_blank" rel="noopener">
<span class="th"><img src="/assets/atelier-preview.webp" alt="Atelier site" loading="lazy"></span>
<span class="nm">Atelier</span><span class="nc">Architecture studio</span>
<span class="chip sm"><span class="t">View site</span><span class="a">→</span></span>
</a>
</div>
</div>
</section>
<section class="block" id="services">
<div class="wrap">
<div class="h2row" data-r><h2>Services</h2></div>
<div class="svc" data-r="left">
<span class="num" aria-hidden="true">01</span>
<div><h3>Product Design</h3>
<p class="d">Design systems, interfaces and user experiences that feel considered, not assembled, from concept to production.</p></div>
<p class="tags mono">UI / UX<br>DESIGN SYSTEMS<br>BRANDING</p>
</div>
<div class="svc" data-r="right">
<span class="num" aria-hidden="true">02</span>
<div><h3>Web Experiences</h3>
<p class="d">Marketing sites and landing pages with the typography, motion and pacing that make a brand feel expensive.</p></div>
<p class="tags mono">MARKETING SITES<br>LANDING PAGES<br>MOTION</p>
</div>
<div class="svc" data-r="left">
<span class="num" aria-hidden="true">03</span>
<div><h3>Full-Stack Engineering</h3>
<p class="d">Auth, payments, data and infrastructure: the whole product, built to run quietly for years.</p></div>
<p class="tags mono">SAAS<br>E-COMMERCE<br>PAYMENTS</p>
</div>
<div class="svc" data-r="right">
<span class="num" aria-hidden="true">04</span>
<div><h3>Mobile Products</h3>
<p class="d">iOS and Android apps designed and built end-to-end, from first mockup to App Store.</p></div>
<p class="tags mono">IOS<br>ANDROID<br>APP STORE</p>
</div>
</div>
</section>
<section class="block" id="contact" style="padding-bottom:120px">
<div class="wrap contact">
<div data-r="left">
<h2>Let’s chat.</h2>
<p class="lead">Have a project in mind? Tell me about it, or skip the form and email me directly.</p>
<button class="chip mt js-mail" data-u="larsh.dev" data-d="proton.me" type="button">
<span class="t addr">…</span><span class="a">→</span>
</button>
<div class="socialrow">
<a class="js-mail" data-u="larsh.dev" data-d="proton.me" aria-label="Email">
<svg class="stroke" viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="4" width="20" height="16" rx="2"/><path d="m2 7 10 6 10-6"/></svg></a>
<a href="https://x.com/larsitodev" target="_blank" rel="noopener noreferrer" aria-label="X">
<svg viewBox="0 0 24 24"><path d="M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z"/></svg></a>
<a href="https://github.com/lars-1987" target="_blank" rel="noopener noreferrer" aria-label="GitHub">
<svg viewBox="0 0 24 24"><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/></svg></a>
</div>
</div>
<form class="formcard" id="cform" data-r="right" novalidate>
<label for="cf-name">Name</label>
<input id="cf-name" name="name" type="text" autocomplete="name" required>
<label for="cf-email">Email</label>
<input id="cf-email" name="email" type="email" autocomplete="email" required>
<label for="cf-msg">Your project</label>
<textarea id="cf-msg" name="message" placeholder="What are we building?" required></textarea>
<input class="hp" type="text" name="website" tabindex="-1" autocomplete="off" aria-hidden="true">
<button class="send" type="submit"><span class="t">Send message</span><span class="a">→</span></button>
<p class="note" id="cnote"></p>
</form>
</div>
</section>
</div>
<div class="endspace" aria-hidden="true"></div>
<div class="toast mono" id="toast" role="status"></div>
<script src="/vendor/lenis.min.js"></script>
<script>
(() => {
'use strict';
const $ = (s, c) => (c || document).querySelector(s);
const $$ = (s, c) => [...(c || document).querySelectorAll(s)];
const reduced = matchMedia('(prefers-reduced-motion: reduce)').matches;
/* ---------- smooth scroll ---------- */
let lenis = null;
if (!reduced && window.Lenis) {
lenis = new Lenis({ duration: 1.1, smoothWheel: true });
const raf = t => { lenis.raf(t); requestAnimationFrame(raf); };
requestAnimationFrame(raf);
}
const scrollTo = target => {
if (lenis) lenis.scrollTo(target, { offset: 0 });
else target.scrollIntoView({ behavior: reduced ? 'auto' : 'smooth' });
};
$$('a[href^="#"]').forEach(a => a.addEventListener('click', e => {
const h = a.getAttribute('href') || '';
if (h.length < 2 || h[0] !== '#') return; // ignore "#" and JS-rewritten (mailto) hrefs
const t = $(h);
if (!t) return;
e.preventDefault();
closeMenu();
scrollTo(t);
}));
/* ---------- nav morph ---------- */
const nav = $('#nav'), pill = $('#navpill'), btn = $('#navbtn');
const setH = () => {
const open = nav.classList.contains('open');
pill.style.height = open ? pill.scrollHeight + 'px' : '60px';
$$('.menu, .mfoot', pill).forEach(el => el.toggleAttribute('inert', !open));
};
setH();
const closeMenu = () => { nav.classList.remove('open'); btn.setAttribute('aria-expanded', 'false'); setH(); };
btn.addEventListener('click', () => {
nav.classList.toggle('open');
btn.setAttribute('aria-expanded', nav.classList.contains('open'));
setH();
});
addEventListener('resize', setH);
document.addEventListener('keydown', e => { if (e.key === 'Escape') closeMenu(); });
document.addEventListener('click', e => { if (!nav.contains(e.target)) closeMenu(); });
/* ---------- melbourne clock ---------- */
const clock = $('#clock');
const fmt = new Intl.DateTimeFormat('en-AU', { timeZone: 'Australia/Melbourne', hour: '2-digit', minute: '2-digit', hour12: false });
const tick = () => { clock.textContent = 'MELB ' + fmt.format(new Date()); };
tick(); setInterval(tick, 30000);
$('#year').textContent = new Date().getFullYear();
/* ---------- hero: liquid text (hand-rolled WebGL, no deps) ---------- */
const display = $('#display');
const canHover = matchMedia('(hover: hover)').matches;
const dwrap = $('#dwrap'), dgl = $('#dgl');
const gl = !reduced && dgl.getContext('webgl', { alpha: true, antialias: true });
if (gl) {
dwrap.classList.add('gl');
const MAXR = 12;
const VS = 'attribute vec2 a;void main(){gl_Position=vec4(a,0.,1.);}';
const FS = `precision highp float;
uniform sampler2D uTex;uniform vec2 uRes;uniform float uTime;
uniform vec4 uRip[${MAXR}];
void main(){
vec2 px=vec2(gl_FragCoord.x,uRes.y-gl_FragCoord.y);
vec2 off=vec2(sin(px.y*.012+uTime*1.1),cos(px.x*.009+uTime*.9))*2.2;
for(int i=0;i<${MAXR};i++){
vec4 r=uRip[i];
if(r.w<=0.)continue;
float age=uTime-r.z;
vec2 d=px-r.xy;
float dist=length(d)+.0001;
float front=age*420.;
float amp=exp(-abs(dist-front)*.015)*exp(-age*1.6)*r.w;
off+=(d/dist)*sin((dist-front)*.035)*amp*34.;
}
vec2 uv=(px+off)/uRes;
vec4 c=texture2D(uTex,uv);
if(uv.x<0.||uv.x>1.||uv.y<0.||uv.y>1.)c=vec4(0.);
gl_FragColor=c;
}`;
const sh = (t, s) => { const o = gl.createShader(t); gl.shaderSource(o, s); gl.compileShader(o); return o; };
const prog = gl.createProgram();
gl.attachShader(prog, sh(gl.VERTEX_SHADER, VS));
gl.attachShader(prog, sh(gl.FRAGMENT_SHADER, FS));
gl.linkProgram(prog); gl.useProgram(prog);
gl.bindBuffer(gl.ARRAY_BUFFER, gl.createBuffer());
gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([-1, -1, 3, -1, -1, 3]), gl.STATIC_DRAW);
const aloc = gl.getAttribLocation(prog, 'a');
gl.enableVertexAttribArray(aloc);
gl.vertexAttribPointer(aloc, 2, gl.FLOAT, false, 0, 0);
gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);
const uRes = gl.getUniformLocation(prog, 'uRes'), uTime = gl.getUniformLocation(prog, 'uTime'),
uRip = gl.getUniformLocation(prog, 'uRip[0]') || gl.getUniformLocation(prog, 'uRip'),
uTexL = gl.getUniformLocation(prog, 'uTex');
const tex = gl.createTexture();
const dpr = Math.min(2, devicePixelRatio || 1);
let W = 0, H = 0;
const paintTex = () => {
const wb = dwrap.getBoundingClientRect();
W = Math.round(wb.width * dpr); H = Math.round((wb.height + 180) * dpr);
dgl.width = W; dgl.height = H;
gl.viewport(0, 0, W, H);
const t2 = document.createElement('canvas');
t2.width = W; t2.height = H;
const c2 = t2.getContext('2d');
const fs = parseFloat(getComputedStyle(display).fontSize) * dpr;
c2.fillStyle = '#fff';
c2.font = `800 ${fs}px 'Archivo Ext', sans-serif`;
c2.textAlign = 'center'; c2.textBaseline = 'alphabetic';
if ('letterSpacing' in c2) c2.letterSpacing = (fs * -.025).toFixed(1) + 'px';
const lh = fs * .92;
const lines = ['WEB DESIGN', '+ FULL STACK'];
let y = (H - lh * lines.length) / 2 + lh * .82;
lines.forEach(l => { c2.fillText(l, W / 2, y); y += lh; });
gl.bindTexture(gl.TEXTURE_2D, tex);
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, t2);
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
gl.uniform2f(uRes, W, H);
gl.uniform1i(uTexL, 0);
};
paintTex();
if (document.fonts && document.fonts.ready) document.fonts.ready.then(paintTex);
addEventListener('resize', paintTex);
const rip = [];
let lastT = 0, lx = 0, ly = 0;
if (canHover) dwrap.addEventListener('pointermove', e => {
const now = performance.now();
const b = dgl.getBoundingClientRect();
const x = (e.clientX - b.left) * dpr, y = (e.clientY - b.top) * dpr;
const dd = Math.hypot(x - lx, y - ly);
if (now - lastT > 70 && dd > 12) {
lastT = now; lx = x; ly = y;
rip.push({ x, y, t: now / 1000, s: Math.min(1, .35 + dd / 500) });
if (rip.length > MAXR) rip.shift();
}
});
const flat = new Float32Array(MAXR * 4);
const draw = () => {
const t = performance.now() / 1000;
for (let i = 0; i < MAXR; i++) {
const r = rip[i], alive = r && (t - r.t) < 2.5;
flat[i * 4] = alive ? r.x : 0; flat[i * 4 + 1] = alive ? r.y : 0;
flat[i * 4 + 2] = alive ? r.t : 0; flat[i * 4 + 3] = alive ? r.s : 0;
}
gl.uniform4fv(uRip, flat);
gl.uniform1f(uTime, t);
gl.clearColor(0, 0, 0, 0);
gl.clear(gl.COLOR_BUFFER_BIT);
gl.drawArrays(gl.TRIANGLES, 0, 3);
if (window.scrollY < innerHeight * 1.2 && !document.hidden) requestAnimationFrame(draw);
else setTimeout(() => requestAnimationFrame(draw), 300);
};
requestAnimationFrame(draw);
}
/* ---------- about: line-by-line reveal scrubbed by scroll ---------- */
const about = $('#about');
let aboutLines = [];
const lineify = () => {
if (reduced) return;
const hey = $('.hey', about);
if (!hey.dataset.orig) hey.dataset.orig = hey.innerHTML;
hey.innerHTML = hey.dataset.orig.split(/<br\s*\/?>/i)
.map(s => `<span class="ln">${s.trim()}</span>`).join('');
$$('.colL p, .colR p', about).forEach(p => {
if (!p.dataset.orig) p.dataset.orig = p.innerHTML;
const words = p.dataset.orig.split(/\s+/).filter(Boolean);
p.innerHTML = words.map(w => `<span class="w">${w}</span>`).join(' ');
let cur = null; const groups = [];
$$('.w', p).forEach(w => {
if (w.offsetTop !== cur) { cur = w.offsetTop; groups.push([]); }
groups[groups.length - 1].push(w.textContent);
});
p.innerHTML = groups.map(g => `<span class="ln">${g.join(' ')}</span>`).join('');
});
aboutLines = $$('.ln', about);
const chipEl = $('.colR .chip', about);
if (chipEl) aboutLines.push(chipEl);
// cascade top-to-bottom across both columns, not DOM order
aboutLines.sort((a, b) => a.offsetTop - b.offsetTop);
aboutLines.forEach(l => { l.style.opacity = 0; });
};
/* ---------- portrait: coin-spin to colour through the fold ---------- */
const fold = $('#fold'), portrait = $('#portrait');
const hero = $('#top'), heroFoot = $('.hero-foot');
let vh = innerHeight, dropY = 0, introP = reduced ? 1 : 0;
// hero state: the top of the circle sits just under the first display line
const measureDrop = () => {
vh = innerHeight;
const dr = display.getBoundingClientRect();
const line1Bottom = dr.top + scrollY + dr.height / 2;
const naturalTop = (vh - portrait.offsetHeight) / 2;
dropY = Math.max(0, line1Bottom + 10 - naturalTop);
};
const easeInOut = t => t < .5 ? 2 * t * t : 1 - Math.pow(-2 * t + 2, 2) / 2;
const updatePortrait = () => {
const r = fold.getBoundingClientRect();
const total = r.height - vh;
const p = Math.min(1, Math.max(0, -r.top / total));
const e = easeInOut(p);
if (reduced) {
portrait.style.filter = `grayscale(${1 - Math.round(p)})`;
return;
}
portrait.style.opacity = introP.toFixed(3);
portrait.style.transform =
`perspective(1200px) translateY(${((1 - e) * dropY).toFixed(1)}px) rotateY(${(e * 360).toFixed(1)}deg) scale(${((1 + e * .04) * (.88 + .12 * introP)).toFixed(3)})`;
portrait.style.filter = `grayscale(${(1 - e).toFixed(3)})`;
// captions: the hero scrolls up while the portrait stays pinned, so the stacked
// block would ride straight through the spinning circle. Clear it out to the left
// early in the fold (done by p≈.34) so the portrait sweeps into an empty frame.
if (heroFoot) {
const q = Math.min(1, Math.max(0, (p - .04) / .3));
const eq = q * q * (3 - 2 * q); // smoothstep
heroFoot.style.transform = `translateX(${(-eq * 130).toFixed(1)}px)`;
heroFoot.style.opacity = (1 - eq).toFixed(3);
}
// about lines: cascade keyed to fold progress so the last line lands as
// the portrait reaches dead centre (e≈1). START/END framed in p; K = overlap.
if (aboutLines.length) {
const START = .35, END = .92, K = 2.5, N = aboutLines.length;
const rp = Math.min(1, Math.max(0, (p - START) / (END - START)));
aboutLines.forEach((l, i) => {
l.style.opacity = Math.min(1, Math.max(0, (rp * (N + K) - i) / K)).toFixed(2);
});
}
};
const remeasure = () => { measureDrop(); lineify(); updatePortrait(); };
if (document.fonts && document.fonts.ready) document.fonts.ready.then(remeasure);
addEventListener('resize', remeasure);
measureDrop(); lineify();
if (lenis) lenis.on('scroll', updatePortrait);
addEventListener('scroll', updatePortrait, { passive: true });
updatePortrait();
// safety net: scroll events don't fire in occluded/restored tabs; timers do
let lastScrubY = -1;
setInterval(() => {
if (window.scrollY !== lastScrubY) { lastScrubY = window.scrollY; updatePortrait(); }
}, 250);
// load-in: portrait eases in alongside the CSS hero animations
if (!reduced) {
const t0 = performance.now() + 400, DUR = 900;
const irun = now => {
const k = Math.min(1, Math.max(0, (now - t0) / DUR));
introP = 1 - Math.pow(1 - k, 3);
updatePortrait();
if (k < 1) requestAnimationFrame(irun);
};
requestAnimationFrame(irun);
}
// hold the hero until its final look is settled: Archivo loaded (paintTex re-runs on
// fonts.ready — registered earlier, so it repaints first) plus two frames for the GL
// draw to land. Raced with a timeout so a slow/absent font load still reveals.
const fontsReady = (document.fonts && document.fonts.ready) || Promise.resolve();
Promise.race([fontsReady, new Promise(r => setTimeout(r, 900))]).then(() =>
requestAnimationFrame(() => requestAnimationFrame(() => hero.classList.add('in'))));
/* ---------- section reveals ---------- */
const io = new IntersectionObserver(entries => {
entries.forEach(en => { if (en.isIntersecting) { en.target.classList.add('on'); io.unobserve(en.target); } });
}, { rootMargin: '0px 0px -10% 0px' });
$$('[data-r]').forEach(el => io.observe(el));
/* ---------- section snap: settle at the nearest section start ---------- */
const snapTargets = ['#top', '#about', '#work', '#sites', '#services', '#contact'].map(s => $(s)).filter(Boolean);
if (!reduced) {
let snapT = null, snapping = false;
const trySnap = () => {
if (snapping || nav.classList.contains('open')) return;
const y = window.scrollY;
const max = document.body.scrollHeight - vh;
if (y > max - 8) return; // don't fight the footer reveal
let best = null, bestD = Infinity;
snapTargets.forEach(t => {
const ty = t.getBoundingClientRect().top + y;
const d = Math.abs(ty - y);
if (d < bestD) { bestD = d; best = ty; }
});
if (best === null || bestD < 2 || bestD > vh * .3) return;
snapping = true;
if (lenis) lenis.scrollTo(best, { duration: .9, onComplete: () => { snapping = false; } });
else { window.scrollTo({ top: best, behavior: 'smooth' }); setTimeout(() => { snapping = false; }, 700); }
};
const queueSnap = () => { if (snapping) return; clearTimeout(snapT); snapT = setTimeout(trySnap, 160); };
if (lenis) lenis.on('scroll', queueSnap);
addEventListener('scroll', queueSnap, { passive: true });
}
/* ---------- footer uncover spacing ---------- */
const foot = $('.foot');
const sizeFoot = () => document.documentElement.style.setProperty('--footh', foot.offsetHeight + 'px');
sizeFoot(); addEventListener('resize', sizeFoot);
/* ---------- email chips (obfuscated address) ---------- */
const toast = $('#toast');
let toastT;
const say = msg => { toast.textContent = msg; toast.classList.add('on'); clearTimeout(toastT); toastT = setTimeout(() => toast.classList.remove('on'), 2600); };
const addr = el => `${el.dataset.u}@${el.dataset.d}`;
$$('.js-mail').forEach(el => {
const a = addr(el);
const label = $('.addr', el);
if (label) label.textContent = a;
if (el.tagName === 'A') el.setAttribute('href', 'mailto:' + a); // real mailto, no #contact in the status bar
el.addEventListener('click', e => {
e.preventDefault();
location.href = `mailto:${a}`;
if (navigator.clipboard) navigator.clipboard.writeText(a).then(() => say('Email copied, and opening your mail app'), () => {});
});
});
/* ---------- contact form (Resend endpoint) ---------- */
const ENDPOINT = 'https://api.larsh.dev'; // Resend-backed Cloudflare Worker; falls back to mailto on failure
const form = $('#cform'), note = $('#cnote');
form.addEventListener('submit', async e => {
e.preventDefault();
if (form.website.value) return; // honeypot
const data = { name: form.name.value.trim(), email: form.email.value.trim(), message: form.message.value.trim() };
if (!data.name || !data.email || !data.message) { note.textContent = 'All three fields, please.'; return; }
note.textContent = 'Sending…';
try {
const res = await fetch(ENDPOINT, {
method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(data)
});
if (!res.ok) throw new Error(res.status);
note.textContent = 'Sent. I’ll get back to you within a day.';
form.reset();
} catch {
note.textContent = 'Opening your mail app instead…';
const body = encodeURIComponent(`${data.message}\n\n— ${data.name} (${data.email})`);
location.href = `mailto:larsh.dev@proton.me?subject=${encodeURIComponent('Project enquiry from ' + data.name)}&body=${body}`;
}
});
})();
</script>
<script src="/analytics.js"></script>
</body>
</html>