aboutsummaryrefslogtreecommitdiff
path: root/index.html
blob: 6e2996db06ba092f815253affc5c7f9d9b88a615 (plain)
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
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>tyler.xyz Β· Aqua Desktop</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Audiowide&family=Michroma&family=Plus+Jakarta+Sans:wght@200;300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;700&family=IBM+Plex+Mono:wght@400;500&display=swap" />
<link rel="stylesheet" href="aero.css" />
<style>
  /* ============= LOCKED PALETTE ============= */
  :root {
    --sky: url("img/wallpaper.png") center / cover no-repeat, linear-gradient(180deg, oklch(78% 0.10 215) 0%, oklch(88% 0.14 145) 100%);
    --sun: radial-gradient(circle, oklch(99% 0.02 215) 0%, oklch(94% 0.05 215 / 0) 60%);
    --icon-blue:   linear-gradient(135deg, oklch(92% 0.06 215), oklch(72% 0.13 220) 60%, oklch(48% 0.13 230));
    --icon-orange: linear-gradient(135deg, oklch(94% 0.10 145), oklch(78% 0.18 145) 55%, oklch(52% 0.16 150));
    --icon-green:  linear-gradient(135deg, oklch(94% 0.12 130), oklch(76% 0.18 140) 55%, oklch(50% 0.16 150));
    --icon-pink:   linear-gradient(135deg, oklch(88% 0.08 195), oklch(68% 0.13 200) 60%, oklch(45% 0.13 210));
    --icon-silver: linear-gradient(135deg, oklch(98% 0.005 220), oklch(85% 0.015 220) 60%, oklch(62% 0.03 225));
    --title-bar:   linear-gradient(to bottom, oklch(94% 0.05 195), oklch(78% 0.10 200) 50%, oklch(60% 0.12 215));
    --start-btn:   linear-gradient(to bottom, oklch(94% 0.10 145) 0%, oklch(75% 0.18 145) 48%, oklch(50% 0.16 150) 52%, oklch(68% 0.18 145) 100%);
    --start-border: oklch(40% 0.14 150);
  }
  .desk { position: fixed; inset: 0; overflow: hidden; background: var(--sky); background-size: cover; background-position: center; }
  .icons { position: absolute; left: 24px; top: 24px; display: grid; grid-template-columns: 1fr; gap: 18px; z-index: 10; }
  .icon { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 80px; cursor: pointer; text-align: center; }
  .icon .glyph {
    width: 56px; height: 56px; border-radius: 14px;
    background: linear-gradient(135deg, oklch(88% 0.10 220), oklch(70% 0.14 230) 60%, oklch(50% 0.13 240));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), inset 0 -3px 6px rgba(40,80,140,0.4), 0 4px 14px rgba(40,80,140,0.35);
    display: flex; align-items: center; justify-content: center;
    font-size: 26px; color: white; text-shadow: 0 1px 2px rgba(0,0,0,0.4);
    position: relative;
  }
  .icon .glyph::before { content: ""; position: absolute; left: 4px; right: 4px; top: 3px; height: 40%; border-radius: 12px; background: linear-gradient(to bottom, rgba(255,255,255,0.75), transparent); }
  .icon .glyph.orange { background: linear-gradient(135deg, oklch(92% 0.08 70), oklch(75% 0.16 55) 60%, oklch(55% 0.15 35)); }
  .icon .glyph.green  { background: linear-gradient(135deg, oklch(90% 0.10 145), oklch(75% 0.15 145) 60%, oklch(50% 0.13 155)); }
  .icon .glyph.pink   { background: linear-gradient(135deg, oklch(90% 0.10 350), oklch(75% 0.16 350) 60%, oklch(55% 0.16 340)); }
  .icon .glyph.silver { background: linear-gradient(135deg, oklch(95% 0.01 240), oklch(78% 0.03 240) 60%, oklch(55% 0.04 240)); }
  .icon .label { font-size: 12px; color: white; text-shadow: 0 1px 3px rgba(0,0,0,0.6); font-weight: 500; }
  .icon:hover .glyph { transform: translateY(-2px) scale(1.04); transition: transform 200ms; }

  .win { position: absolute; min-width: 320px; z-index: 50; }
  /* When a window has been resized, it switches to a flex column so the
     body becomes a scroll region β€” keeps content from getting clipped */
  .win.resized {
    display: flex; flex-direction: column;
    overflow: hidden;
    border-radius: 18px;
  }
  .win.resized .body {
    flex: 1; min-height: 0;
    overflow-y: auto;
    border-radius: 0 0 18px 18px;
  }
  /* The browser window is already a flex column internally; let it fill */
  .win.resized > .browser { flex: 1; min-height: 0; }
  /* RESIZE HANDLES */
  .rs { position: absolute; z-index: 5; }
  .rs-e { right: -3px; top: 14px; bottom: 18px; width: 8px; cursor: ew-resize; }
  .rs-s { left: 14px; right: 18px; bottom: -3px; height: 8px; cursor: ns-resize; }
  .rs-se {
    right: 0; bottom: 0; width: 22px; height: 22px;
    cursor: nwse-resize;
    background-image:
      linear-gradient(135deg, transparent 0 38%, rgba(40,80,140,0.85) 38% 48%, transparent 48% 60%, rgba(40,80,140,0.75) 60% 70%, transparent 70%, rgba(40,80,140,0.6) 82% 92%, transparent 92%);
    border-radius: 0 0 18px 0;
    opacity: 0.65;
    transition: opacity 150ms, filter 150ms;
  }
  .rs-se:hover { opacity: 1; filter: drop-shadow(0 0 4px rgba(120,170,220,0.8)); }
  body.rs-cursor-e, body.rs-cursor-e * { cursor: ew-resize !important; }
  body.rs-cursor-s, body.rs-cursor-s * { cursor: ns-resize !important; }
  body.rs-cursor-se, body.rs-cursor-se * { cursor: nwse-resize !important; }
  .win .titlebar {
    height: 32px; padding: 0 12px; display: flex; align-items: center; gap: 8px;
    border-radius: 18px 18px 0 0;
    background: var(--title-bar);
    color: var(--title-fg, white); font-size: 13px; font-weight: 600; text-shadow: 0 1px 2px var(--title-shadow, rgba(0,0,0,0.3));
    cursor: grab; user-select: none;
    border-bottom: 1px solid rgba(0,0,0,0.15);
  }
  .win .titlebar .dots { display: flex; gap: 6px; margin-right: 8px; }
  .win .titlebar .dot { width: 13px; height: 13px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.35); cursor: pointer; box-shadow: inset 0 1px 0 rgba(255,255,255,0.7); }
  .win .titlebar .dot.r { background: radial-gradient(circle at 35% 30%, oklch(85% 0.18 30), oklch(55% 0.18 30)); }
  .win .titlebar .dot.y { background: radial-gradient(circle at 35% 30%, oklch(95% 0.15 95), oklch(70% 0.18 80)); }
  .win .titlebar .dot.g { background: radial-gradient(circle at 35% 30%, oklch(90% 0.18 145), oklch(60% 0.18 150)); }
  .win .body { padding: 16px; font-size: 13px; line-height: 1.55; color: oklch(22% 0.04 240); border-radius: 0 0 18px 18px; }

  .taskbar {
    position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%);
    height: 56px; padding: 0 12px; display: flex; align-items: center; gap: 10px;
    border-radius: 28px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.55), rgba(180,210,240,0.45));
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.85);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.95), 0 12px 36px rgba(40,80,140,0.3);
    z-index: 200;
  }
  .taskbar .start {
    height: 40px; padding: 0 18px 0 14px; display: inline-flex; align-items: center; gap: 8px;
    border-radius: 20px;
    background: var(--start-btn);
    color: white; text-shadow: 0 1px 2px rgba(0,0,0,0.4); font-weight: 700; font-size: 13px;
    border: 1px solid var(--start-border); cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.85), 0 3px 10px rgba(180,90,40,0.3);
  }
  .taskbar .sep { width: 1px; height: 32px; background: linear-gradient(to bottom, transparent, rgba(60,100,160,0.4), transparent); }
  .tray { display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; font-size: 12px; color: oklch(25% 0.05 240); }
  .clock { font-family: "Segoe UI", Tahoma; font-weight: 600; }

  /* SERVER ROW */
  .srv-row {
    display: flex; align-items: center; gap: 10px; padding: 7px 0;
    border-bottom: 1px dotted oklch(72% 0.05 220); font-size: 12px;
  }
  .srv-row:last-child { border-bottom: 0; }
  .srv-led {
    width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
    animation: led-pulse 2.2s ease-in-out infinite;
  }
  .srv-led.ok   { background: radial-gradient(circle at 30% 30%, oklch(96% 0.18 145), oklch(60% 0.18 150)); box-shadow: inset 0 1px 0 rgba(255,255,255,0.7), 0 0 8px oklch(70% 0.18 145 / 0.7); }
  .srv-led.warn { background: radial-gradient(circle at 30% 30%, oklch(95% 0.16 85),  oklch(70% 0.18 75));  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7), 0 0 8px oklch(70% 0.18 80 / 0.6); }
  @keyframes led-pulse { 50% { opacity: 0.55; } }
  .srv-host { font-family: 'Courier New', monospace; flex: 1; color: oklch(25% 0.05 230); }
  .srv-meta { font-size: 10px; opacity: 0.7; }

  /* FILM DIARY ROW */
  .film-row {
    display: flex; gap: 10px; padding: 8px 0;
    border-bottom: 1px dotted oklch(72% 0.05 220);
  }
  .film-row:last-child { border-bottom: 0; }
  .film-poster {
    width: 38px; height: 56px; border-radius: 4px; flex-shrink: 0;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 2px 6px rgba(40,80,140,0.2);
  }
  .film-meta { flex: 1; min-width: 0; font-size: 12px; line-height: 1.45; }
  .film-title { font-weight: 700; color: oklch(25% 0.06 230); font-size: 13px; }
  .film-year { font-weight: 400; opacity: 0.6; font-size: 11px; margin-left: 3px; }
  .film-rating { font-size: 11px; margin: 1px 0 2px; }
  .film-rating .star { color: oklch(80% 0.04 230); }
  .film-rating .star.on { color: oklch(72% 0.16 60); text-shadow: 0 0 4px oklch(80% 0.18 70 / 0.5); }
  .film-rating .star.half { background: linear-gradient(90deg, oklch(72% 0.16 60) 50%, oklch(80% 0.04 230) 50%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
  .film-note { font-size: 11px; opacity: 0.75; font-style: italic; }

  /* ============= FAUX BROWSER ============= */
  .browser { display: flex; flex-direction: column; height: 100%; }
  .browser .titlebar { border-bottom: 1px solid rgba(0,0,0,0.18); }
  .browser-toolbar {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px;
    background: linear-gradient(to bottom, oklch(96% 0.005 220), oklch(86% 0.015 225) 50%, oklch(78% 0.025 230));
    border-bottom: 1px solid oklch(60% 0.04 230);
    box-shadow: inset 0 -1px 0 rgba(255,255,255,0.5);
  }
  .nav-btn {
    width: 28px; height: 24px; border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(to bottom, oklch(99% 0.005 220), oklch(88% 0.015 225) 50%, oklch(74% 0.03 230));
    border: 1px solid oklch(55% 0.05 230);
    color: oklch(35% 0.05 235); font-size: 13px; line-height: 1;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.95), 0 1px 2px rgba(40,80,140,0.25);
    transition: transform 100ms, box-shadow 100ms;
  }
  .nav-btn:hover { transform: translateY(-0.5px); }
  .nav-btn:active { transform: translateY(0.5px); box-shadow: inset 0 1px 3px rgba(40,80,140,0.4); }
  .nav-btn[disabled] { opacity: 0.35; cursor: default; transform: none !important; }
  .nav-btn.refresh.spinning svg { animation: spin 700ms linear; }
  @keyframes spin { to { transform: rotate(360deg); } }
  .url-bar {
    flex: 1; height: 26px; display: flex; align-items: center; gap: 6px;
    padding: 0 10px;
    background: linear-gradient(to bottom, oklch(99% 0.003 220), oklch(94% 0.008 220));
    border: 1px solid oklch(60% 0.04 230);
    border-radius: 13px;
    box-shadow: inset 0 1px 2px rgba(40,80,140,0.18);
    font: 12px "IBM Plex Mono", "Courier New", monospace;
    color: oklch(28% 0.05 235);
    overflow: hidden; min-width: 0;
  }
  .url-bar .lock { font-size: 10px; color: oklch(58% 0.16 145); flex-shrink: 0; }
  .url-bar .url-scheme { opacity: 0.55; }
  .url-bar .url-host { color: oklch(30% 0.08 240); font-weight: 600; }
  .url-bar .url-path { opacity: 0.85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .url-bar .caret { width: 1px; height: 14px; background: oklch(40% 0.08 240); animation: blink 1s steps(2) infinite; }
  @keyframes blink { 50% { opacity: 0; } }
  .browser-bookmarks {
    display: flex; align-items: center; gap: 2px;
    padding: 4px 10px;
    background: linear-gradient(to bottom, oklch(94% 0.01 220), oklch(86% 0.02 225));
    border-bottom: 1px solid oklch(62% 0.04 230);
    font-size: 11px;
    overflow-x: auto; scrollbar-width: none;
  }
  .browser-bookmarks::-webkit-scrollbar { display: none; }
  .bm {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 8px; border-radius: 8px;
    color: oklch(28% 0.06 235); white-space: nowrap; cursor: pointer;
    border: 1px solid transparent;
    transition: background 120ms, border-color 120ms;
  }
  .bm:hover { background: rgba(255,255,255,0.6); border-color: rgba(255,255,255,0.95); }
  .bm.active { background: linear-gradient(to bottom, rgba(255,255,255,0.7), rgba(200,230,255,0.4)); border-color: rgba(120,170,220,0.5); }
  .bm .favicon { width: 12px; height: 12px; border-radius: 3px; box-shadow: inset 0 1px 0 rgba(255,255,255,0.6); }
  .bm.home .favicon { background: linear-gradient(135deg, oklch(85% 0.10 220), oklch(55% 0.14 235)); }
  .browser-page {
    flex: 1; min-height: 0; overflow-y: auto;
    background: oklch(98% 0.004 220);
    color: oklch(20% 0.03 240);
    font: 14px "Georgia", "Times New Roman", serif;
    line-height: 1.65;
    padding: 0;
    position: relative;
  }
  .browser-page::-webkit-scrollbar { width: 12px; }
  .browser-page::-webkit-scrollbar-track { background: linear-gradient(to right, oklch(92% 0.01 220), oklch(96% 0.005 220)); }
  .browser-page::-webkit-scrollbar-thumb { background: linear-gradient(to right, oklch(82% 0.03 225), oklch(70% 0.05 230)); border-radius: 6px; border: 2px solid oklch(94% 0.008 220); }
  .browser-status {
    height: 22px; padding: 0 12px;
    display: flex; align-items: center; justify-content: space-between;
    background: linear-gradient(to bottom, oklch(90% 0.01 220), oklch(80% 0.02 225));
    border-top: 1px solid oklch(60% 0.04 230);
    font: 11px "Segoe UI", Tahoma, sans-serif;
    color: oklch(35% 0.05 235);
    border-radius: 0 0 18px 18px;
  }
  .browser-status .progress {
    flex: 1; max-width: 80px; height: 8px; margin: 0 8px;
    background: oklch(82% 0.02 225); border-radius: 4px;
    border: 1px solid oklch(65% 0.04 230);
    overflow: hidden; box-shadow: inset 0 1px 2px rgba(40,80,140,0.15);
  }
  .browser-status .progress-bar {
    height: 100%; width: 100%;
    background: linear-gradient(to bottom, oklch(82% 0.13 220), oklch(58% 0.14 235));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.65);
  }
  /* index page */
  .idx-hero {
    padding: 32px 40px 24px;
    background:
      radial-gradient(60% 80% at 100% 0%, oklch(88% 0.10 215 / 0.5) 0%, transparent 60%),
      linear-gradient(to bottom, oklch(94% 0.03 220), oklch(98% 0.004 220));
    border-bottom: 1px solid oklch(88% 0.02 220);
  }
  .idx-eyebrow { font: 500 10px "IBM Plex Mono", monospace; letter-spacing: 2px; text-transform: uppercase; color: oklch(45% 0.10 230); margin-bottom: 8px; }
  .idx-title { font: 700 38px/1.05 "Georgia", "Times New Roman", serif; color: oklch(22% 0.06 235); letter-spacing: -1px; margin: 0 0 10px; }
  .idx-title em { font-style: italic; font-weight: 400; color: oklch(45% 0.12 220); }
  .idx-sub { font: italic 14px/1.5 "Georgia", serif; color: oklch(40% 0.04 235); max-width: 440px; margin: 0; }
  .idx-list { padding: 16px 40px 40px; }
  .idx-art { display: grid; grid-template-columns: 60px 1fr auto; gap: 18px; padding: 18px 0; border-bottom: 1px solid oklch(90% 0.015 220); cursor: pointer; transition: padding 120ms; }
  .idx-art:last-child { border-bottom: 0; }
  .idx-art:hover { padding-left: 6px; }
  .idx-art:hover .idx-art-title { color: oklch(40% 0.16 230); text-decoration: underline; text-decoration-color: oklch(70% 0.13 220 / 0.5); text-underline-offset: 3px; }
  .idx-art-num { font: 600 28px/1 "IBM Plex Mono", monospace; color: oklch(80% 0.04 225); padding-top: 4px; }
  .idx-art-title { font: 700 18px/1.25 "Georgia", serif; color: oklch(22% 0.06 235); margin: 0 0 4px; letter-spacing: -0.2px; }
  .idx-art-excerpt { font: 13px/1.55 "Georgia", serif; color: oklch(40% 0.04 235); margin: 4px 0 0; }
  .idx-art-meta { font: 11px "IBM Plex Mono", monospace; color: oklch(55% 0.06 230); text-align: right; padding-top: 4px; line-height: 1.6; white-space: nowrap; }
  .idx-art-tag { display: inline-block; padding: 1px 6px; border-radius: 3px; background: oklch(92% 0.04 220); color: oklch(40% 0.10 230); font-size: 10px; text-transform: lowercase; letter-spacing: 0.5px; }
  /* article page */
  .art-page { padding: 36px 56px 60px; max-width: 620px; margin: 0 auto; }
  .art-back { display: inline-flex; align-items: center; gap: 6px; font: 500 11px "IBM Plex Mono", monospace; color: oklch(45% 0.10 230); text-decoration: none; margin-bottom: 24px; cursor: pointer; letter-spacing: 1px; text-transform: uppercase; }
  .art-back:hover { color: oklch(35% 0.16 230); }
  .art-eyebrow { font: 500 10px "IBM Plex Mono", monospace; letter-spacing: 2px; text-transform: uppercase; color: oklch(55% 0.10 220); margin-bottom: 12px; }
  .art-title { font: 700 32px/1.15 "Georgia", "Times New Roman", serif; color: oklch(20% 0.06 235); letter-spacing: -0.6px; margin: 0 0 14px; }
  .art-byline { font: italic 13px/1.5 "Georgia", serif; color: oklch(48% 0.04 235); margin: 0 0 32px; padding-bottom: 16px; border-bottom: 1px solid oklch(88% 0.015 220); }
  .art-body { font-size: 15px; line-height: 1.75; color: oklch(22% 0.03 240); }
  .art-body p { margin: 0 0 18px; text-wrap: pretty; }
  .art-body p:first-of-type::first-letter { font-size: 56px; font-weight: 700; float: left; line-height: 0.9; padding: 4px 8px 0 0; color: oklch(40% 0.14 220); font-family: "Georgia", serif; }
  .art-body em { color: oklch(35% 0.10 230); }
  .art-body a, .art-body .ilink { color: oklch(40% 0.16 230); text-decoration: underline; text-decoration-color: oklch(70% 0.13 220 / 0.4); text-underline-offset: 2px; cursor: pointer; }
  .art-body h2 { font: 700 18px "Georgia", serif; color: oklch(22% 0.06 235); margin: 32px 0 12px; letter-spacing: -0.2px; }
  .art-body blockquote { margin: 24px 0; padding: 0 0 0 18px; border-left: 3px solid oklch(78% 0.10 220); font-style: italic; color: oklch(38% 0.06 230); }
  .art-body code { font: 13px "IBM Plex Mono", monospace; background: oklch(94% 0.01 220); padding: 1px 5px; border-radius: 3px; color: oklch(35% 0.10 230); }
  .art-foot { margin-top: 40px; padding-top: 20px; border-top: 1px solid oklch(88% 0.015 220); font: 12px "IBM Plex Mono", monospace; color: oklch(55% 0.06 230); display: flex; justify-content: space-between; align-items: center; }
  .art-foot .more { color: oklch(40% 0.16 230); cursor: pointer; }
</style>
</head>
<body>
  <script>(function(){var t=localStorage.getItem('tyler.theme')||'aero';document.body.setAttribute('data-theme',t);})();</script>
  <div class="desk" id="desk">
    <div class="sun" style="background: var(--sun);"></div>
    <div class="lens-flare"></div>
    <div class="clouds" id="clouds"></div>

    <!-- Desktop icons -->
    <div class="icons">
      <div class="icon" data-open="about"><div class="glyph" style="background: var(--icon-blue)">πŸ‘€</div><div class="label">About Me</div></div>
      <div class="icon" data-open="now"><div class="glyph" style="background: var(--icon-orange)">β˜€</div><div class="label">Now.txt</div></div>
      <div class="icon" data-open="music"><div class="glyph" style="background: var(--icon-pink)">β™ͺ</div><div class="label">last.fm</div></div>
      <div class="icon" data-open="servers"><div class="glyph" style="background: var(--icon-green)">πŸ–₯</div><div class="label">My Servers</div></div>
      <div class="icon" data-open="podcast"><div class="glyph" style="background: var(--icon-silver)">πŸŽ™</div><div class="label">REEL MOUTH</div></div>
      <div class="icon" data-open="films"><div class="glyph" style="background: var(--icon-pink)">🎞</div><div class="label">Films</div></div>
      <div class="icon" data-open="browser"><div class="glyph" style="background: var(--icon-blue)">🌐</div><div class="label">Internet</div></div>
      <div class="icon" data-open="guestbook"><div class="glyph" style="background: var(--icon-blue)">βœ‰</div><div class="label">Contact</div></div>
    </div>

    <!-- WINDOWS -->
    <div class="win glass" id="w-about" style="left: 180px; top: 60px; width: 440px;">
      <div class="titlebar"><div class="dots"><div class="dot r no-drag" onclick="this.closest('.win').style.display='none'"></div><div class="dot y"></div><div class="dot g"></div></div>About Me β€” tyler.txt</div>
      <div class="body">
        <div style="display: flex; gap: 14px; margin-bottom: 12px;">
          <div class="photo" style="width: 110px; height: 130px; background: none; padding: 0;"><img src="/img/static/portrait.jpg" alt="portrait" style="width:100%;height:100%;object-fit:cover;border-radius:10px;" /></div>
          <div>
            <div style="font-size: 22px; font-weight: 700; line-height: 1.1; color: oklch(28% 0.10 240);">Tyler Hoang</div>
            <div style="font-size: 12px; opacity: 0.7; margin-top: 2px;">a.k.a. Thuy Β· Tiger Β· Train</div>
            <div style="margin-top: 10px; font-size: 12px; line-height: 1.6;">
              <div>🏦 banker @ Chase</div>
              <div>πŸŽ“ M.S. Financial Analytics, CSULB</div>
              <div>🎹 hobbyist jazz pianist</div>
              <div>🐧 linux sysadmin for fun</div>
              <div>πŸ’ married to my lovely wife Trinh</div>
            </div>
          </div>
        </div>
        <p style="margin: 0 0 8px;">Hi! I'm Tyler, 24, Vietnamese-American, and this little corner of the internet is where I keep the un-LinkedIn version of myself. Banking pays the bills, but tinkering with servers, chasing chord voicings, and cooking dishes is what I do for fun.</p>
        <p style="margin: 0;">Poke around β€” drag windows, open icons, click the bubbles. The professional site is <a class="aero-link" href="https://tylerhoang.xyz">elsewhere</a>; this one's all play.</p>
      </div>
    </div>

    <div class="win glass warm" id="w-now" style="left: 660px; top: 100px; width: 320px;">
      <div class="titlebar" style="background: var(--title-bar);"><div class="dots"><div class="dot r no-drag" onclick="this.closest('.win').style.display='none'"></div><div class="dot y"></div><div class="dot g"></div></div>Now.txt</div>
      <div class="body">
        <div style="font-size: 11px; opacity: 0.7; margin-bottom: 8px;">updated 3 days ago Β· from sunny long beach</div>
        <ul style="margin: 0; padding-left: 18px; line-height: 1.7;">
          <li>finishing my master's program (please end)</li>
          <li>studying for cfa level i</li>
          <li>relearning nardis by bill evans</li>
          <li>rebuilding my nas/homelab</li>
          <li>many many episodes behind on the REEL MOUTH backlog</li>
        </ul>
      </div>
    </div>

    <div class="win glass blue" id="w-music" style="left: 380px; top: 360px; width: 360px;">
      <div class="titlebar"><div class="dots"><div class="dot r no-drag" onclick="this.closest('.win').style.display='none'"></div><div class="dot y"></div><div class="dot g"></div></div>last.fm β€” trollshotlol</div>
      <div class="body" id="np-host">
        <div id="np-card"></div>
        <div style="margin-top: 14px; font-size: 11px; opacity: 0.75; text-transform: uppercase; letter-spacing: 1px;">recent</div>
        <div id="np-recent" style="margin-top: 6px; display: flex; flex-direction: column; gap: 6px; font-size: 12px;">
          <div style="display:flex;justify-content:space-between;"><span>Stella by Starlight Β· Bill Evans</span><span style="opacity:0.6">2m</span></div>
          <div style="display:flex;justify-content:space-between;"><span>Body and Soul Β· Coleman Hawkins</span><span style="opacity:0.6">9m</span></div>
          <div style="display:flex;justify-content:space-between;"><span>Flamingo Β· Kero Kero Bonito</span><span style="opacity:0.6">38m</span></div>
        </div>
      </div>
    </div>

    <!-- SERVERS -->
    <div class="win glass" id="w-servers" style="left: 740px; top: 390px; width: 380px; display: none;">
      <div class="titlebar" style="background: var(--title-bar);"><div class="dots"><div class="dot r no-drag" onclick="this.closest('.win').style.display='none'"></div><div class="dot y"></div><div class="dot g"></div></div>My Servers β€” uptime.sh</div>
      <div class="body">
        <div style="font-size: 11px; opacity: 0.7; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 1.5px;">home lab status Β· auto-poll 30s</div>
        <div id="srv-list" style="display: flex; flex-direction: column; gap: 0;">
          <div class="srv-row"><div class="srv-led ok"></div><div class="srv-host">drive.tylerhoang.xyz</div><div class="srv-meta">Nextcloud</div></div>
          <div class="srv-row"><div class="srv-led ok"></div><div class="srv-host">up.tylerhoang.xyz</div><div class="srv-meta">Jenniesafe</div></div>
          <div class="srv-row"><div class="srv-led ok"></div><div class="srv-host">git.tylerhoang.xyz</div><div class="srv-meta">cgit</div></div>
          <div class="srv-row"><div class="srv-led ok"></div><div class="srv-host">tylerhoang.xyz</div><div class="srv-meta">portfolio</div></div>
          <div class="srv-row"><div class="srv-led ok"></div><div class="srv-host">fun.tylerhoang.xyz</div><div class="srv-meta">this site</div></div>
          <div class="srv-row"><div class="srv-led ok"></div><div class="srv-host">films.tylerhoang.xyz</div><div class="srv-meta">film diary</div></div>
          <div class="srv-row"><div class="srv-led warn"></div><div class="srv-host">reelmouth.tv</div><div class="srv-meta">on hiatus</div></div>
          <div class="srv-row"><div class="srv-led ok"></div><div class="srv-host">*.onion mirrors</div><div class="srv-meta">tor</div></div>
        </div>
        <div style="margin-top: 12px; padding-top: 10px; border-top: 1px dotted oklch(70% 0.05 220); font-size: 11px; opacity: 0.7; line-height: 1.6; font-family: 'Courier New', monospace;">
          host: beelink ser5 Β· debian 12<br/>
          4c / 8g / 1tb nvme · 🌱 carbon-neutral via vultr<br/>
          logs kept 30d. i basically never read them.
        </div>
      </div>
    </div>

    <!-- PODCAST -->
    <div class="win glass" id="w-podcast" style="left: 220px; top: 420px; width: 340px; display: none;">
      <div class="titlebar" style="background: var(--title-bar);"><div class="dots"><div class="dot r no-drag" onclick="this.closest('.win').style.display='none'"></div><div class="dot y"></div><div class="dot g"></div></div>REEL MOUTH β€” film pod</div>
      <div class="body">
        <div style="display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px;">
          <img id="pod-art" src="" alt="REEL MOUTH" style="width: 84px; height: 84px; border-radius: 12px; object-fit: cover; box-shadow: 0 3px 10px rgba(0,0,0,0.18); display: none;" />
          <div class="photo" id="pod-art-placeholder" style="width: 84px; height: 84px;"><span>πŸŽ™</span></div>
          <div style="font-size: 12px; line-height: 1.5;">
            <div style="font-size: 16px; font-weight: 700; color: oklch(28% 0.08 230); letter-spacing: -0.3px;">REEL MOUTH</div>
            <div style="opacity: 0.7; margin-bottom: 4px;">a film podcast Β· since 2022</div>
            <div>tyler + mark arguing about movies for ~90 minutes a week. We agree maybe 30% of the time.</div>
          </div>
        </div>
        <div style="font-size: 11px; opacity: 0.7; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 6px;">latest episodes</div>
        <div id="pod-episodes" style="display: flex; flex-direction: column; gap: 4px; font-size: 12px; line-height: 1.5;">
          <div style="opacity: 0.5; font-style: italic;">loading…</div>
        </div>
        <div style="margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap;">
          <a class="aqua sm" href="https://reelmouth.tv" style="text-decoration:none;">β–Ά reelmouth.tv</a>
          <a class="aqua sm" href="https://podcasts.apple.com/us/podcast/reel-mouth/id1709836497" style="text-decoration:none;">apple</a>
          <a class="aqua sm" href="https://open.spotify.com/show/4hu14vsr1fucEoV5MIrqCY" style="text-decoration:none;">spotify</a>
          <a class="aqua sm" href="https://anchor.fm/s/e8438774/podcast/rss" style="text-decoration:none;">rss</a>
        </div>
      </div>
    </div>

    <!-- GUESTBOOK / CONTACT -->
    <div class="win glass" id="w-guestbook" style="left: 540px; top: 200px; width: 360px; display: none;">
      <div class="titlebar" style="background: var(--title-bar);"><div class="dots"><div class="dot r no-drag" onclick="this.closest('.win').style.display='none'"></div><div class="dot y"></div><div class="dot g"></div></div>Contact β€” say hi.txt</div>
      <div class="body">
        <p style="margin: 0 0 10px;">No newsletter, no analytics. Just one email I actually read.</p>
        <div style="padding: 10px 14px; border-radius: 12px; background: rgba(255,255,255,0.55); border: 1px solid rgba(255,255,255,0.85); font-family: 'Courier New', monospace; font-size: 13px; margin-bottom: 14px;">
          πŸ“§ <a class="aero-link" href="mailto:tyler@tylerhoang.xyz">tyler@tylerhoang.xyz</a>
        </div>
        <div style="font-size: 12px; line-height: 1.7;">
          <div>πŸ”‘ <a class="aero-link" href="/files/gpg-main.txt">GPG public key</a> β€” encrypt if you can</div>
          <div>πŸ™ <a class="aero-link" href="https://github.com/tyhoang">github.com/tyhoang</a></div>
          <div>πŸ“ <a class="aero-link" href="https://git.tylerhoang.xyz">git.tylerhoang.xyz</a></div>
          <div>🎞 <a class="aero-link" href="https://letterboxd.com/trainytrain">letterboxd.com/trainytrain</a></div>
        </div>
        <div style="margin-top: 14px; padding-top: 10px; border-top: 1px dotted oklch(70% 0.05 220);">
          <div style="font-size: 10px; opacity: 0.65; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 6px;">β€” leave a quick note β€”</div>
          <input id="gb-name" placeholder="your name" class="no-drag" style="width: 100%; padding: 7px 10px; margin-bottom: 6px; border-radius: 10px; border: 1px solid rgba(120,160,200,0.4); background: rgba(255,255,255,0.7); font: 12px 'Segoe UI', Tahoma, sans-serif; color: oklch(25% 0.05 230); box-sizing: border-box;" />
          <input id="gb-email" type="email" placeholder="your email" class="no-drag" style="width: 100%; padding: 7px 10px; margin-bottom: 6px; border-radius: 10px; border: 1px solid rgba(120,160,200,0.4); background: rgba(255,255,255,0.7); font: 12px 'Segoe UI', Tahoma, sans-serif; color: oklch(25% 0.05 230); box-sizing: border-box;" />
          <textarea id="gb-msg" placeholder="say hi…" class="no-drag" style="width: 100%; min-height: 56px; resize: vertical; padding: 8px 10px; border-radius: 10px; border: 1px solid rgba(120,160,200,0.4); background: rgba(255,255,255,0.7); font: 12px 'Segoe UI', Tahoma, sans-serif; color: oklch(25% 0.05 230); box-sizing: border-box;"></textarea>
          <div style="display:flex; justify-content: space-between; align-items: center; margin-top: 6px;">
            <span id="gb-status" style="font-size: 10px; opacity: 0.65; font-style: italic;">β€” takes ~2 days for a reply β€”</span>
            <button class="aqua sm no-drag" id="gb-send">send</button>
          </div>
        </div>
      </div>
    </div>

    <!-- FILMS -->
    <div class="win glass" id="w-films" style="left: 460px; top: 280px; width: 400px; display: none;">
      <div class="titlebar" style="background: var(--title-bar);"><div class="dots"><div class="dot r no-drag" onclick="this.closest('.win').style.display='none'"></div><div class="dot y"></div><div class="dot g"></div></div>Films β€” films.tylerhoang.xyz</div>
      <div class="body">
        <div style="display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px;">
          <div>
            <div style="font-size: 14px; font-weight: 700; color: oklch(28% 0.08 230);">my film diary</div>
            <div style="font-size: 11px; opacity: 0.7;">a self-hosted Letterboxd, sort of. since '16.</div>
          </div>
          <div id="films-stats" style="font-size: 10px; text-align: right; opacity: 0.7; line-height: 1.4;"></div>
        </div>
        <div style="font-size: 11px; opacity: 0.7; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 6px;">recent watches</div>
        <div id="films-list" style="display: flex; flex-direction: column;">
          <div class="film-row">
            <div class="film-poster" style="background: linear-gradient(135deg, oklch(70% 0.14 30), oklch(40% 0.10 280));"></div>
            <div class="film-meta">
              <div class="film-title">Chungking Express <span class="film-year">1994</span></div>
              <div class="film-rating"><span class="star on">β˜…</span><span class="star on">β˜…</span><span class="star on">β˜…</span><span class="star on">β˜…</span><span class="star on">β˜…</span><span style="opacity:0.6;margin-left:8px;">2d ago Β· rewatch #11</span></div>
              <div class="film-note">still cry at the pineapples. wong's best.</div>
            </div>
          </div>
          <div class="film-row">
            <div class="film-poster" style="background: linear-gradient(135deg, oklch(85% 0.10 80), oklch(55% 0.12 30));"></div>
            <div class="film-meta">
              <div class="film-title">The Scent of Green Papaya <span class="film-year">1993</span></div>
              <div class="film-rating"><span class="star on">β˜…</span><span class="star on">β˜…</span><span class="star on">β˜…</span><span class="star on">β˜…</span><span class="star">β˜…</span><span style="opacity:0.6;margin-left:8px;">5d ago</span></div>
              <div class="film-note">trinh picked it. so quiet you can hear yourself think.</div>
            </div>
          </div>
          <div class="film-row">
            <div class="film-poster" style="background: linear-gradient(135deg, oklch(45% 0.10 250), oklch(25% 0.06 260));"></div>
            <div class="film-meta">
              <div class="film-title">Stalker <span class="film-year">1979</span></div>
              <div class="film-rating"><span class="star on">β˜…</span><span class="star on">β˜…</span><span class="star on">β˜…</span><span class="star on">β˜…</span><span class="star">β˜…</span><span style="opacity:0.6;margin-left:8px;">1w ago</span></div>
              <div class="film-note">3 hours of soviet vibes. felt every minute, in a good way.</div>
            </div>
          </div>
          <div class="film-row">
            <div class="film-poster" style="background: linear-gradient(135deg, oklch(75% 0.16 35), oklch(50% 0.14 20));"></div>
            <div class="film-meta">
              <div class="film-title">Perfect Days <span class="film-year">2023</span></div>
              <div class="film-rating"><span class="star on">β˜…</span><span class="star on">β˜…</span><span class="star on">β˜…</span><span class="star on half">β˜…</span><span class="star">β˜…</span><span style="opacity:0.6;margin-left:8px;">2w ago</span></div>
              <div class="film-note">koji yakusho cleaning toilets is more cinema than most cinema.</div>
            </div>
          </div>
        </div>
        <div style="margin-top: 12px; display: flex; gap: 8px; align-items: center; justify-content: space-between;">
          <span style="font-size: 11px; opacity: 0.7;">also mirrored on <a class="aero-link" href="https://letterboxd.com/trainytrain">letterboxd</a></span>
          <a class="aqua sm" href="https://films.tylerhoang.xyz" style="text-decoration:none;">see all β†’</a>
        </div>
      </div>
    </div>

    <!-- BROWSER -->
    <div class="win glass" id="w-browser" style="left: 280px; top: 40px; width: 680px; height: 560px; display: none;">
      <div class="browser">
        <div class="titlebar">
          <div class="dots">
            <div class="dot r no-drag" onclick="this.closest('.win').style.display='none'"></div>
            <div class="dot y"></div>
            <div class="dot g"></div>
          </div>
          <span id="br-title">fun.tylerhoang.xyz β€” Notes</span>
        </div>
        <div class="browser-toolbar no-drag">
          <button class="nav-btn" id="br-back" title="Back" disabled>
            <svg width="11" height="11" viewBox="0 0 11 11"><path d="M7.5 1.5 L3 5.5 L7.5 9.5" stroke="currentColor" stroke-width="1.8" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>
          </button>
          <button class="nav-btn" id="br-fwd" title="Forward" disabled>
            <svg width="11" height="11" viewBox="0 0 11 11"><path d="M3.5 1.5 L8 5.5 L3.5 9.5" stroke="currentColor" stroke-width="1.8" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>
          </button>
          <button class="nav-btn refresh" id="br-reload" title="Reload">
            <svg width="12" height="12" viewBox="0 0 12 12"><path d="M9.5 6 A3.5 3.5 0 1 1 8.5 3.4 M9.8 1.5 L9.8 4 L7.3 4" stroke="currentColor" stroke-width="1.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>
          </button>
          <button class="nav-btn" id="br-home" title="Home">
            <svg width="12" height="12" viewBox="0 0 12 12"><path d="M2 6 L6 2.5 L10 6 L10 10 L7.5 10 L7.5 7 L4.5 7 L4.5 10 L2 10 Z" stroke="currentColor" stroke-width="1.3" fill="none" stroke-linejoin="round"/></svg>
          </button>
          <div class="url-bar">
            <span class="lock">πŸ”’</span>
            <span class="url-scheme">https://</span><span class="url-host" id="br-host">fun.tylerhoang.xyz</span><span class="url-path" id="br-path">/articles</span>
            <span class="caret"></span>
          </div>
          <button class="nav-btn" id="br-go" title="Go" style="width: auto; padding: 0 10px;">Go</button>
        </div>
        <div class="browser-bookmarks">
          <div class="bm home" data-go="/articles"><div class="favicon"></div>Notes</div>
          <div class="bm" data-go="/articles/nextcloud-and-me"><div class="favicon" style="background: linear-gradient(135deg, oklch(85% 0.14 140), oklch(50% 0.16 150));"></div>self-hosting</div>
          <div class="bm" data-go="/articles/learning-cherokee"><div class="favicon" style="background: linear-gradient(135deg, oklch(85% 0.10 350), oklch(55% 0.16 340));"></div>jazz</div>
          <div class="bm" data-go="/articles/six-tries-bun-bo-hue"><div class="favicon" style="background: linear-gradient(135deg, oklch(85% 0.14 60), oklch(55% 0.16 35));"></div>cooking</div>
          <div class="bm" data-go="/articles/stalker-and-waiting"><div class="favicon" style="background: linear-gradient(135deg, oklch(75% 0.06 280), oklch(35% 0.06 260));"></div>film</div>
        </div>
        <div class="browser-page" id="br-page"></div>
        <div class="browser-status">
          <span id="br-status">Done</span>
          <div class="progress" id="br-progress" style="display:none;"><div class="progress-bar"></div></div>
          <span>πŸ”’ fun.tylerhoang.xyz Β· 100%</span>
        </div>
      </div>
    </div>

    <!-- TASKBAR -->
    <div class="taskbar">
      <div class="start"><span style="font-size:16px;">❀</span> tyler</div>
      <div class="sep"></div>
      <div id="mt"></div>
      <div class="sep"></div>
      <div id="cc"></div>
      <div class="sep"></div>
      <div class="tray">
        <span class="clock" id="clock"></span>
        <span style="opacity:0.6">|</span>
        <span>πŸ“Ά ☁ 73Β°F</span>
      </div>
    </div>

    <audio id="bgm" loop preload="none"></audio>
  </div>

<script src="aero.js"></script>
<script>
  Aero.initTheme();
  const desk = document.getElementById('desk');
  Aero.makeClouds(document.getElementById('clouds'));
  Aero.spawnBubbles(desk, 24);
  Aero.sparkleCursor();
  Aero.mountThemeSwitcher();

  document.querySelectorAll('.win').forEach(w => {
    Aero.makeDraggable(w, w.querySelector('.titlebar'));
    Aero.makeResizable(w, { minW: 300, minH: 220 });
  });

  document.querySelectorAll('.icon').forEach(ic => {
    ic.addEventListener('dblclick', () => {
      const key = ic.dataset.open;
      const w = document.getElementById('w-' + key);
      if (w) { w.style.display = ''; w.style.zIndex = (++window.__zTop || (window.__zTop = 100)); }
    });
    ic.addEventListener('click', () => {
      const key = ic.dataset.open;
      const w = document.getElementById('w-' + key);
      if (w) { w.style.display = ''; w.style.zIndex = (++window.__zTop || (window.__zTop = 100)); }
    });
  });

  // podcast RSS
  let podLoaded = false;
  async function loadPodcast() {
    if (podLoaded) return;
    podLoaded = true;
    try {
      const { art, episodes } = await Aero.fetchReelMouthFeed(6);
      if (art) {
        const img = document.getElementById('pod-art');
        const ph = document.getElementById('pod-art-placeholder');
        img.src = art;
        img.style.display = '';
        if (ph) ph.style.display = 'none';
      }
      const container = document.getElementById('pod-episodes');
      if (episodes.length) {
        container.innerHTML = episodes.map(e =>
          `<div style="display:flex;justify-content:space-between;gap:8px;">
            <a href="${e.url}" target="_blank" rel="noopener" style="color:inherit;text-decoration:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;" title="${e.title}">${e.title.toLowerCase()}</a>
            <span style="opacity:0.6;flex-shrink:0;">${e.duration}</span>
          </div>`
        ).join('');
      } else {
        container.innerHTML = '<div style="opacity:0.5;font-style:italic;">no episodes found</div>';
      }
    } catch (err) {
      document.getElementById('pod-episodes').innerHTML = '<div style="opacity:0.5;font-style:italic;">couldn\'t load feed</div>';
    }
  }
  document.querySelectorAll('.icon[data-open="podcast"]').forEach(ic => {
    ic.addEventListener('click', loadPodcast);
    ic.addEventListener('dblclick', loadPodcast);
  });

  // music toggle + volume slider (theme-aware)
  const MUSIC = {
    aero:   { src: '/mus/bazaar-theme.mp3',                 label: 'β™ͺ a-dog β€” bazaar theme' },
    chrome: { src: '/mus/CoolMan - WhoIsUsingThisComputer_.mp3', label: 'β™ͺ coolman β€” who is using this computer?' },
  };
  document.getElementById('mt').innerHTML = Aero.musicToggleHTML();
  const mtDiv = document.getElementById('mt');
  const mtBtn = mtDiv.querySelector('.mt-btn');
  const mtLabel = mtDiv.querySelector('.mt-label');
  const bgm = document.getElementById('bgm');
  bgm.volume = 0.2;

  const vol = document.createElement('input');
  vol.type = 'range'; vol.min = '0'; vol.max = '1'; vol.step = '0.01'; vol.value = '0.2';
  vol.className = 'no-drag aero-vol';
  vol.title = 'volume';
  vol.style.cssText = 'width:70px;margin-left:6px;cursor:pointer;accent-color:oklch(55% 0.13 230);vertical-align:middle;';
  mtDiv.querySelector('.music-toggle').appendChild(vol);
  vol.addEventListener('input', () => { bgm.volume = Number(vol.value); });

  let musicOn = false;

  function applyMusicTheme() {
    const track = MUSIC[Aero.getTheme()] || MUSIC.aero;
    if (bgm.getAttribute('src') !== track.src) {
      const pos = bgm.currentTime;
      bgm.src = track.src;
      if (musicOn) { bgm.load(); bgm.currentTime = 0; bgm.play(); }
    }
    if (musicOn) mtLabel.textContent = (MUSIC[Aero.getTheme()] || MUSIC.aero).label;
  }

  mtBtn.addEventListener('click', () => {
    musicOn = !musicOn;
    if (musicOn) {
      const track = MUSIC[Aero.getTheme()] || MUSIC.aero;
      bgm.src = track.src;
      bgm.load();
      bgm.play();
      mtBtn.textContent = '❚❚';
      mtLabel.textContent = track.label;
      mtBtn.style.background = 'radial-gradient(circle at 30% 25%,white,oklch(75% 0.14 55) 60%,oklch(55% 0.15 35))';
    } else {
      bgm.pause();
      mtBtn.textContent = 'β–Ά';
      mtLabel.textContent = 'music off';
      mtBtn.style.background = 'radial-gradient(circle at 30% 25%,white,oklch(82% 0.12 220) 60%,oklch(50% 0.13 240))';
    }
  });

  // swap track live when theme changes while music is playing
  window.addEventListener('themechange', applyMusicTheme);

  // counter
  document.getElementById('cc').innerHTML = Aero.counterHTML(0, 'visitors');
  Aero.fetchVisitorCount()
    .then(n => {
      document.getElementById('cc').innerHTML = Aero.counterHTML(n, 'visitors');
    })
    .catch(() => {});

  // now playing
  document.getElementById('np-card').innerHTML = Aero.nowPlayingHTML(false);
  Aero.animateEq(document.getElementById('np-card'));

  // fetch last.fm
  Aero.fetchLastFm()
    .then(tracks => {
      if (tracks && tracks.length > 0) {
        document.getElementById('np-card').innerHTML = Aero.nowPlayingHTML(false, tracks[0]);
        Aero.animateEq(document.getElementById('np-card'));

        const recentDiv = document.getElementById('np-recent');
        if (tracks.length > 1) {
          recentDiv.innerHTML = tracks.slice(1, 4).map(t => {
            const ago = t.when ? Math.floor((Date.now() - t.when) / 60000) : 0;
            const timeStr = ago < 60 ? ago + 'm' : Math.floor(ago / 60) + 'h';
            return `<div style="display:flex;justify-content:space-between;"><span>${t.artist ? t.artist + ' β€” ' : ''}${t.name}</span><span style="opacity:0.6">${timeStr}</span></div>`;
          }).join('');
        }
      }
    })
    .catch(() => {});

  // clock
  function tick() {
    const d = new Date();
    document.getElementById('clock').textContent =
      d.toLocaleTimeString([], { hour: 'numeric', minute: '2-digit' });
  }
  tick(); setInterval(tick, 30000);

  // guestbook send (fake but cute)
  const gbBtn = document.getElementById('gb-send');
  if (gbBtn) {
    gbBtn.addEventListener('click', async () => {
      const name = document.getElementById('gb-name').value.trim();
      const email = document.getElementById('gb-email').value.trim();
      const message = document.getElementById('gb-msg').value.trim();
      const status = document.getElementById('gb-status');
      if (!name || !email || !message) { status.textContent = 'β€” fill in all three fields β€”'; return; }
      status.textContent = 'sending…';
      gbBtn.disabled = true;
      try {
        const res = await fetch('https://tylerhoang.xyz/api/contact', {
          method: 'POST',
          headers: { 'Content-Type': 'application/json' },
          body: JSON.stringify({ name, email, message }),
        });
        const data = await res.json().catch(() => ({}));
        if (res.ok) {
          status.textContent = 'βœ“ sent! talk soon';
          document.getElementById('gb-name').value = '';
          document.getElementById('gb-email').value = '';
          document.getElementById('gb-msg').value = '';
        } else {
          status.textContent = data.error || 'βœ— something went wrong';
        }
      } catch {
        status.textContent = 'βœ— could not reach server';
      } finally {
        gbBtn.disabled = false;
        setTimeout(() => { status.textContent = 'β€” takes ~2 days for a reply β€”'; }, 5000);
      }
    });
  }

  /* ============= FAUX BROWSER =============
     Articles live in the ARTICLES array below.
     Each `body` is plain HTML β€” use <p>, <h2>, <blockquote>, <em>, <code>,
     and <span class="ilink" data-go="/articles/slug"> for in-page links.
  ============================================== */
  const ARTICLES = [
    {
      slug: 'nextcloud-and-me',
      title: 'Why I run my own Nextcloud (and you probably should too)',
      date: '2026-04-12',
      tag: 'self-hosting',
      excerpt: 'After my fourth Dropbox price hike, I bought a $180 mini-PC and never looked back. A field report.',
      body: `
        <p>For about six years I paid Dropbox roughly the cost of a nice dinner every month to store photos I'd never look at again. Then one Tuesday in March, an email came: prices going up <em>again</em>. I closed the tab, opened a new one, ordered a Beelink SER5 off Amazon, and started reading the Nextcloud install docs.</p>
        <p>What I learned, over the next 96 hours: self-hosting in 2026 is not what it was in 2016. The tooling has caught up with the dream. <code>apt install nextcloud-aio</code>, a TLS cert from Let's Encrypt that renews itself, a dyndns entry I update with a four-line cron job, and suddenly I have my own private cloud. The whole stack draws about 12 watts at idle.</p>
        <h2>What I actually use it for</h2>
        <p>The boring answer is: file sync. Photos from my phone, documents I'm working on, the world's most over-engineered shopping list shared with Trinh. The interesting answer is that having a server means I keep <em>finding</em> things to put on it β€” a Forgejo for git mirrors, a Jellyfin for movies I own on blu-ray, a tiny Postgres I use for film-diary metadata.</p>
        <blockquote>The point isn't to escape the cloud. The point is that the cloud should be a tool I pick up, not a landlord.</blockquote>
        <p>Will it pay for itself? At my Dropbox rate, the hardware breaks even around month nine. But that's not really the math that matters. The math that matters is that the machine sits on a shelf above my monitor and quietly does what I tell it.</p>
        <p>If you want to start, start small. A Raspberry Pi 5 and a USB drive will get you 80% of the way. The other 20% is patience and reading <span class="ilink" data-go="/articles/learning-cherokee">man pages on a Saturday morning</span>, which honestly I enjoy.</p>
      `,
    },
    {
      slug: 'learning-cherokee',
      title: 'Learning <em>Cherokee</em> at 23',
      date: '2026-03-28',
      tag: 'jazz',
      excerpt: 'Bud Powell\'s Cherokee is famously fast. I\'ve been practicing it at 60 bpm for two months. Some notes.',
      body: `
        <p>Bud Powell recorded <em>Cherokee</em> at something like 320 beats per minute. I can play it cleanly at 64. I tell myself this is progress.</p>
        <p>The thing nobody warns you about with bebop is that the tempo is the easy part. You can put a metronome on 320 and just <em>hold on</em> to it for a chorus, fudging the notes that don't fit under your fingers. What you can't fake is the <em>line</em> β€” the way Bud connects an A-section descent through the bridge's modulation up a half-step, and somehow the listener feels the bridge before it arrives.</p>
        <h2>The bridge</h2>
        <p>Eight bars in B major, dropped into the middle of a tune in Bβ™­. It's a famously sadistic chord change for a saxophone player. For a pianist, it just means thinking in five sharps instead of two flats β€” annoying but survivable.</p>
        <p>My teacher, who is 71 and has played this tune more times than I have eaten dinner, told me to stop practicing the bridge separately. "You'll never make it sound like part of the song," she said. "Play it from the top, slow, every time." So that's what I do. Six minutes per chorus at 64 bpm. I have become very patient with my left hand.</p>
        <h2>What I'm learning</h2>
        <p>That speed is a side effect of clarity, not the other way around. That the metronome is a witness, not a coach. And that if I can play <em>Cherokee</em> at 200 by my 25th birthday, I will buy myself a very nice steak.</p>
      `,
    },
    {
      slug: 'six-tries-bun-bo-hue',
      title: 'Six tries at my mom\'s bΓΊn bΓ² huαΊΏ',
      date: '2026-02-14',
      tag: 'cooking',
      excerpt: 'The broth is the whole game. Here is what I got wrong, and the one thing I finally got right.',
      body: `
        <p>My mom doesn't write recipes down. When I ask her how much shrimp paste, she says "a spoon." When I ask which spoon, she sighs.</p>
        <p>I have now made bΓΊn bΓ² huαΊΏ six times. The first three were unservable. The fourth was edible but flat. The fifth I overcorrected the lemongrass and it tasted like a candle. The sixth, last Sunday, made Trinh stop scrolling on her phone and say, unprompted, "this is good." I am framing the apron.</p>
        <h2>The mistakes</h2>
        <p>Attempt one: I used beef stock from a carton. My mother would disown me if she knew. The broth has to be built from the bone β€” beef shank and pork hock, simmered for at least four hours, skimmed obsessively. You can taste a corner cut. The whole thing is corners.</p>
        <p>Attempt three: not enough sαΊ£. Lemongrass should bruise your nose when you open the pot. I was being polite with it. BΓΊn bΓ² is not a polite soup.</p>
        <h2>The thing I got right</h2>
        <p>Annatto oil. Heat the seeds in neutral oil until the oil turns the color of a sunset, then strain. Add a tablespoon to the finished broth right before serving. It is the difference between a soup that <em>looks</em> like bΓΊn bΓ² and a soup that <em>is</em> bΓΊn bΓ².</p>
        <p>I still can't make it like she does. But I'm closer now than I was in February, and that's the whole project really. <span class="ilink" data-go="/articles/stalker-and-waiting">Patience as a recipe.</span></p>
      `,
    },
    {
      slug: 'stalker-and-waiting',
      title: 'Stalker and the unbearable lightness of waiting',
      date: '2026-01-30',
      tag: 'film',
      excerpt: 'Tarkovsky\'s 162-minute walk into a haunted room. A defense of slow cinema from someone with a short attention span.',
      body: `
        <p>I have never been good at waiting. I check my phone in elevators. I read the menu before I sit down. So it surprised me β€” surprises me still β€” how much I love <em>Stalker</em>, a movie in which approximately nothing happens for the better part of three hours.</p>
        <p>The plot, such as it is: three men walk through a forbidden zone toward a room that allegedly grants wishes. They argue. They get tired. They sit on damp stones and look at each other. There is no chase, no twist, no payoff in the way modern cinema teaches us to expect a payoff.</p>
        <h2>What Tarkovsky is doing</h2>
        <p>He is teaching you to wait. Not as a virtue β€” Tarkovsky is not a moralist β€” but as a <em>mode</em>. The camera holds on a face until the face stops performing and starts simply <em>being</em>. The Zone refuses to be interesting on a normal cinematic schedule. By the time the men reach the room, you have spent so long with their breathing that you understand, without being told, why they don't go in.</p>
        <blockquote>The room is not the point. The walk is the point. The room is just what gives the walk its shape.</blockquote>
        <h2>Why it matters now</h2>
        <p>We live in the most aggressive attention economy in human history. Every interface is designed to deliver a payoff before you can decide whether you wanted one. <em>Stalker</em> is the opposite. It says: I have nothing to sell you. Sit with me for three hours and we will see what your mind does when it isn't being fed.</p>
        <p>My mind did this: it stopped checking what time it was. By the last hour I had forgotten there was a time at all. Whatever Tarkovsky is, he is a better drug than my phone.</p>
      `,
    },
  ];

  const ARTICLE_INDEX = Object.fromEntries(ARTICLES.map(a => [a.slug, a]));
  const HOST = 'fun.tylerhoang.xyz';
  const browserHistory = { stack: [], idx: -1 };

  function fmtDate(iso) {
    const d = new Date(iso);
    return d.toLocaleDateString('en-US', { month: 'short', day: 'numeric', year: 'numeric' }).toLowerCase();
  }

  function renderIndex() {
    const items = ARTICLES.map((a, i) => `
      <div class="idx-art" data-go="/articles/${a.slug}">
        <div class="idx-art-num">${String(i + 1).padStart(2, '0')}</div>
        <div>
          <div class="idx-art-title">${a.title}</div>
          <div class="idx-art-excerpt">${a.excerpt}</div>
        </div>
        <div class="idx-art-meta">
          <div>${fmtDate(a.date)}</div>
          <div><span class="idx-art-tag">${a.tag}</span></div>
        </div>
      </div>
    `).join('');
    return `
      <div class="idx-hero">
        <div class="idx-eyebrow">/notes β€” Tyler Hoang</div>
        <h1 class="idx-title">Things I've been <em>thinking about</em>.</h1>
        <p class="idx-sub">Half-finished essays from a banker who'd rather be playing piano. New ones land when they land β€” usually monthly, never on a schedule.</p>
      </div>
      <div class="idx-list">${items}</div>
    `;
  }

  function renderArticle(slug) {
    const a = ARTICLE_INDEX[slug];
    if (!a) return `<div class="art-page"><h1 class="art-title">404 β€” not found</h1><p>That page isn't here.</p><span class="art-back" data-go="/articles">← back to notes</span></div>`;
    const i = ARTICLES.findIndex(x => x.slug === slug);
    const next = ARTICLES[(i + 1) % ARTICLES.length];
    return `
      <article class="art-page">
        <span class="art-back" data-go="/articles">← all notes</span>
        <div class="art-eyebrow">${a.tag} Β· ${fmtDate(a.date)}</div>
        <h1 class="art-title">${a.title}</h1>
        <div class="art-byline">by Tyler Hoang Β· ~${Math.max(2, Math.round(a.body.replace(/<[^>]+>/g,'').split(/\s+/).length / 200))} min read</div>
        <div class="art-body">${a.body}</div>
        <div class="art-foot">
          <span>↑ thanks for reading</span>
          <span class="more" data-go="/articles/${next.slug}">next: ${next.title.replace(/<[^>]+>/g,'')} β†’</span>
        </div>
      </article>
    `;
  }

  function pathToContent(path) {
    if (path === '/articles' || path === '/articles/') return renderIndex();
    const m = path.match(/^\/articles\/([a-z0-9-]+)$/);
    if (m) return renderArticle(m[1]);
    return `<div class="art-page"><h1 class="art-title">404</h1><p>No page at <code>${path}</code>.</p><span class="art-back" data-go="/articles">← back</span></div>`;
  }

  function updateChrome(path) {
    document.getElementById('br-host').textContent = HOST;
    document.getElementById('br-path').textContent = path;
    const isArt = /^\/articles\/[a-z0-9-]+$/.test(path);
    const slug = isArt ? path.split('/').pop() : null;
    const titleTxt = isArt && ARTICLE_INDEX[slug]
      ? `${ARTICLE_INDEX[slug].title.replace(/<[^>]+>/g,'')} β€” fun.tylerhoang.xyz`
      : 'Notes β€” fun.tylerhoang.xyz';
    document.getElementById('br-title').textContent = titleTxt;
    document.querySelectorAll('.browser-bookmarks .bm').forEach(bm => {
      bm.classList.toggle('active', bm.dataset.go === path);
    });
    document.getElementById('br-back').disabled = browserHistory.idx <= 0;
    document.getElementById('br-fwd').disabled = browserHistory.idx >= browserHistory.stack.length - 1;
  }

  function loadPath(path, pushHist = true) {
    const page = document.getElementById('br-page');
    const status = document.getElementById('br-status');
    const progress = document.getElementById('br-progress');
    status.textContent = `Contacting fun.tylerhoang.xyz…`;
    progress.style.display = 'block';
    progress.querySelector('.progress-bar').style.width = '20%';
    setTimeout(() => {
      progress.querySelector('.progress-bar').style.width = '70%';
      status.textContent = `Reading ${path}…`;
    }, 80);
    setTimeout(() => {
      page.innerHTML = pathToContent(path);
      page.scrollTop = 0;
      if (pushHist) {
        browserHistory.stack = browserHistory.stack.slice(0, browserHistory.idx + 1);
        browserHistory.stack.push(path);
        browserHistory.idx = browserHistory.stack.length - 1;
      }
      updateChrome(path);
      progress.querySelector('.progress-bar').style.width = '100%';
      setTimeout(() => {
        progress.style.display = 'none';
        progress.querySelector('.progress-bar').style.width = '0%';
        status.textContent = 'Done';
      }, 120);
    }, 220);
  }

  // delegated click handler β€” anything with data-go inside the browser navigates
  document.getElementById('w-browser').addEventListener('click', (e) => {
    const t = e.target.closest('[data-go]');
    if (t) { e.preventDefault(); loadPath(t.dataset.go); }
  });
  document.getElementById('br-back').addEventListener('click', () => {
    if (browserHistory.idx > 0) { browserHistory.idx--; loadPath(browserHistory.stack[browserHistory.idx], false); }
  });
  document.getElementById('br-fwd').addEventListener('click', () => {
    if (browserHistory.idx < browserHistory.stack.length - 1) { browserHistory.idx++; loadPath(browserHistory.stack[browserHistory.idx], false); }
  });
  document.getElementById('br-home').addEventListener('click', () => loadPath('/articles'));
  document.getElementById('br-go').addEventListener('click', () => {
    loadPath(document.getElementById('br-path').textContent.trim() || '/articles');
  });
  document.getElementById('br-reload').addEventListener('click', (e) => {
    const btn = e.currentTarget;
    btn.classList.remove('spinning'); void btn.offsetWidth; btn.classList.add('spinning');
    loadPath(browserHistory.stack[browserHistory.idx] || '/articles', false);
  });
  // initial page load
  loadPath('/articles');

  // fetch films
  Aero.fetchFilms()
    .then(data => {
      try {
        const films = Array.isArray(data) ? data : (data.films || data.data || []);
        const filmsList = document.getElementById('films-list');

        if (films.length > 0) {
          const esc = s => String(s == null ? '' : s).replace(/[&<>"']/g, c => ({'&':'&amp;','<':'&lt;','>':'&gt;','"':'&quot;',"'":'&#39;'}[c]));
          filmsList.innerHTML = films.slice(0, 4).map((film) => {
            const rating = Math.max(0, Math.min(3, Number(film.stars ?? film.rating ?? 0)));
            const stars = Array.from({ length: 3 }, (_, i) =>
              i < rating ? '<span class="star on">β˜…</span>' : '<span class="star">β˜…</span>'
            ).join('');

            let when = '';
            const raw = film.date_watched || film.watchedAt;
            if (raw) {
              const d = new Date(raw);
              if (!isNaN(d)) {
                const days = Math.floor((Date.now() - d) / 86400000);
                if (days <= 0) when = 'today';
                else if (days === 1) when = '1d ago';
                else if (days < 7) when = days + 'd ago';
                else if (days < 30) when = Math.floor(days / 7) + 'w ago';
                else when = Math.floor(days / 30) + 'mo ago';
              } else {
                when = String(raw);
              }
            }

            const poster = film.poster_url || film.posterUrl;
            const posterStyle = poster
              ? `background: url('${esc(poster).replace(/'/g, '%27')}') center / cover;`
              : `background: linear-gradient(135deg, oklch(70% 0.13 220), oklch(40% 0.10 250));`;

            const sub = film.director ? esc(film.director) : (film.note ? esc(film.note) : '');

            return `
              <div class="film-row">
                <div class="film-poster" style="${posterStyle}"></div>
                <div class="film-meta">
                  <div class="film-title">${esc(film.title)} <span class="film-year">${esc(film.year || '')}</span></div>
                  <div class="film-rating">${stars}<span style="opacity:0.6;margin-left:8px;">${when}</span></div>
                  ${sub ? `<div class="film-note">${sub}</div>` : ''}
                </div>
              </div>
            `;
          }).join('');
        }

        const statsDiv = document.getElementById('films-stats');
        if (data.total !== undefined || data.count !== undefined) {
          const total = data.total || data.count;
          let statsHtml = `<div><strong style="color: oklch(28% 0.08 230); font-size: 13px;">${total}</strong> watched</div>`;
          if (data.thisYear !== undefined) {
            statsHtml += `<div><strong style="color: oklch(28% 0.08 230); font-size: 13px;">${data.thisYear}</strong> this year</div>`;
          }
          statsDiv.innerHTML = statsHtml;
        }
      } catch (err) {
        console.error('Films parse error:', err);
      }
    })
    .catch(err => {
      console.error('Films fetch error:', err);
    });
</script>
</body>
</html>