website: refine styles for index and hub

This commit is contained in:
Pasha Sviderski
2026-07-09 18:56:46 +10:00
parent 7964273552
commit e684795aee
6 changed files with 601 additions and 370 deletions
+45 -1
View File
@@ -1,4 +1,4 @@
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500&family=Inter+Tight:ital,wght@0,500;0,600;0,700;1,700&display=fallback');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500&family=Inter+Tight:ital,wght@0,500;0,600;0,700;1,700&family=Caveat:wght@600&display=fallback');
@import 'tailwindcss/base';
@import 'tailwindcss/components';
@@ -13,3 +13,47 @@
[x-cloak=""] {
display: none;
}
/* Smooth in-page anchor scrolling, disabled for users who prefer reduced motion. */
html {
scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
html {
scroll-behavior: auto;
}
}
.text-balance {
text-wrap: balance;
}
/* Handwritten margin notes. */
.hw-note {
font-family: 'Caveat', cursive;
font-weight: 600;
font-size: 1.5rem;
line-height: 1.2;
}
/* A hand-swiped stroke with uneven rounded edges. */
.marker-red {
position: relative;
white-space: nowrap;
color: #fff;
isolation: isolate;
}
.marker-red::before {
content: "";
position: absolute;
z-index: -1;
inset: 0.08em -0.18em -0.02em -0.14em;
background: linear-gradient(100deg,
rgba(220, 38, 38, 0.82) 0%,
rgba(239, 68, 68, 0.95) 28%,
rgba(225, 29, 72, 0.9) 72%,
rgba(220, 38, 38, 0.88) 100%);
border-radius: 0.3em 0.5em 0.4em 0.6em;
transform: skew(-10deg) rotate(-0.5deg);
}