globals.css 26 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099
  1. @import "tailwindcss";
  2. @custom-variant dark (&:where(.dark, .dark *));
  3. /* Chinese pages (html lang="zh-CN"), for the few places Han text sets differently. */
  4. @custom-variant zh (&:lang(zh));
  5. @theme inline {
  6. /* Han characters fall through the Latin faces to the system's Chinese sans:
  7. PingFang on Apple, Microsoft YaHei on Windows, Noto Sans CJK on Android. */
  8. --font-sans:
  9. -apple-system, BlinkMacSystemFont, "SF Pro Text", var(--ff-text, Figtree),
  10. ui-sans-serif, system-ui, "Segoe UI", Roboto, "PingFang SC",
  11. "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC",
  12. "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
  13. /* In headings they fall through to Noto Serif SC, Fraunces' Han companion
  14. (config/fonts.ts), and only then to a generic serif, which on Windows
  15. would be SimSun. */
  16. --font-display:
  17. var(--display-face, ui-serif, Georgia),
  18. var(--ff-display-zh, "Noto Serif SC"), "Noto Serif SC", "Songti SC",
  19. "Noto Serif CJK SC", "Source Han Serif SC", "PingFang SC",
  20. "Microsoft YaHei", serif;
  21. --font-name: var(--name-face, ui-serif, Georgia, serif);
  22. --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
  23. --color-bg: var(--bg);
  24. --color-card: var(--card);
  25. --color-card-2: var(--card-2);
  26. --color-inset: var(--card-inset);
  27. --color-ink: var(--ink);
  28. --color-ink-2: var(--ink-2);
  29. --color-muted: var(--muted);
  30. --color-line: var(--line);
  31. --color-line-strong: var(--line-strong);
  32. --color-glacier: var(--glacier);
  33. --color-glacier-ink: var(--glacier-ink);
  34. --color-ember: var(--ember);
  35. --color-ember-ink: var(--ember-ink);
  36. --color-sky: var(--sky);
  37. --color-mint: var(--mint);
  38. --color-blush: var(--blush);
  39. --color-butter: var(--butter);
  40. --color-stage-sky: var(--stage-sky);
  41. --color-stage-mint: var(--stage-mint);
  42. --color-stage-butter: var(--stage-butter);
  43. --color-stage-lilac: var(--stage-lilac);
  44. --color-stage-blob: var(--stage-blob);
  45. /* backwards, not both: a held end state would override drag/FLIP transforms */
  46. --animate-rise: rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
  47. --animate-ping-soft: ping-soft 2.4s cubic-bezier(0, 0, 0.2, 1) infinite;
  48. --animate-shimmer: shimmer 1.6s linear infinite;
  49. }
  50. /* ---------- Tokens ---------- */
  51. /* Display type: a metric-matched fallback until Fraunces arrives after the
  52. first paint (components/font-loader.tsx), then Fraunces. Every var() has a
  53. fallback, so a missing variable (say, a page from an older deploy) can never
  54. void the whole stack and drop the headline to the body sans. */
  55. /* --display-face lists Latin faces only; --font-display adds the Han ones. */
  56. :root {
  57. --display-face: "Fraunces Fallback", ui-serif, Georgia;
  58. --name-face: "Fraunces Fallback", ui-serif, Georgia, serif;
  59. }
  60. html.ff {
  61. --display-face: var(--ff-display, Fraunces), ui-serif, Georgia;
  62. --name-face:
  63. var(--ff-name, Fraunces), var(--ff-display, Fraunces), ui-serif, Georgia,
  64. serif;
  65. }
  66. /* ---------- Chinese ---------- */
  67. /* Han characters have no italics, so none are faked (Latin keeps its real
  68. ones). In display type the punctuation is set proportionally ("palt"): a
  69. full-width comma would leave half an em of air in a headline. */
  70. html:lang(zh) {
  71. font-synthesis: none;
  72. }
  73. html:lang(zh) :is(.font-display, .title, .notion-h, .notion-title) {
  74. font-feature-settings: "palt";
  75. }
  76. /* A gentle settle when the display face swaps in. */
  77. .ff-in :is(.font-display, .title) {
  78. animation: ff-settle 0.5s ease both;
  79. }
  80. @keyframes ff-settle {
  81. from {
  82. opacity: 0.82;
  83. }
  84. }
  85. :root {
  86. /* Neutrals: the original warm off-white with white cards. */
  87. --bg: #f6f2f2;
  88. --card: #ffffff;
  89. --card-2: #f8f5f5;
  90. --ink: #17161b;
  91. --ink-2: #45424c;
  92. --muted: #6c6874;
  93. --line: rgb(23 22 27 / 0.07);
  94. --line-strong: rgb(23 22 27 / 0.13);
  95. /* Brand pastels from the original site, plus contrast-safe inks for text and strokes. */
  96. --sky: #8cc9fe;
  97. --mint: #63ccae;
  98. --blush: #ffbfd1;
  99. --butter: #ffdf9a;
  100. /* Project cards: a pastel stage by day, a deep tint of the same hue by night. */
  101. --stage-sky: var(--sky);
  102. --stage-mint: var(--mint);
  103. --stage-butter: var(--butter);
  104. --stage-lilac: #cbbffd;
  105. --stage-blob: var(--blush);
  106. --glacier: #2a86dd;
  107. --ember: #d9487a;
  108. /* Deeper shades of the same hues for small text (WCAG AA on white). */
  109. --glacier-ink: #1b6cc2;
  110. --ember-ink: #c23668;
  111. --topo: rgb(110 92 104 / 0.1);
  112. --aurora-a: rgb(140 201 254 / 0.42);
  113. --aurora-b: rgb(255 191 209 / 0.5);
  114. --aurora-c: rgb(99 204 174 / 0.2);
  115. --shadow:
  116. 0 0 0 0.5px rgb(23 22 27 / 0.05), 0 1px 2px rgb(23 22 27 / 0.04),
  117. 0 12px 32px -14px rgb(70 40 55 / 0.2);
  118. --shadow-hover:
  119. 0 0 0 0.5px rgb(23 22 27 / 0.06), 0 1px 2px rgb(23 22 27 / 0.05),
  120. 0 24px 48px -18px rgb(70 40 55 / 0.3);
  121. /* Glass cards: a translucent material over the wallpaper with a lit rim. */
  122. --card-glass: rgb(255 255 255 / 0.56);
  123. --card-sheen: rgb(255 255 255 / 0.42);
  124. --card-inset: rgb(255 255 255 / 0.58);
  125. --card-blur: 28px;
  126. --rim-hi: rgb(255 255 255 / 1);
  127. --rim-lo: rgb(255 255 255 / 0.45);
  128. --rim-end: rgb(255 255 255 / 0.8);
  129. --glint: rgb(255 255 255 / 1);
  130. --card-lifted: rgb(255 255 255 / 0.94);
  131. /* Motion: three springs (see lib/motion.ts). Everything that moves uses one. */
  132. --ease-snap: linear(
  133. 0,
  134. 0.021,
  135. 0.075,
  136. 0.148,
  137. 0.23,
  138. 0.316,
  139. 0.401,
  140. 0.481,
  141. 0.555,
  142. 0.623,
  143. 0.682,
  144. 0.735,
  145. 0.781,
  146. 0.82,
  147. 0.853,
  148. 0.881,
  149. 0.904,
  150. 0.924,
  151. 0.94,
  152. 0.953,
  153. 0.963,
  154. 0.972,
  155. 0.979,
  156. 0.984,
  157. 0.988,
  158. 0.991,
  159. 0.994,
  160. 0.996,
  161. 0.997,
  162. 0.998,
  163. 0.999,
  164. 1
  165. );
  166. --dur-snap: 350ms;
  167. --ease-glide: linear(
  168. 0,
  169. 0.025,
  170. 0.087,
  171. 0.173,
  172. 0.269,
  173. 0.369,
  174. 0.467,
  175. 0.559,
  176. 0.642,
  177. 0.715,
  178. 0.778,
  179. 0.831,
  180. 0.876,
  181. 0.912,
  182. 0.94,
  183. 0.963,
  184. 0.98,
  185. 0.992,
  186. 1.001,
  187. 1.007,
  188. 1.011,
  189. 1.013,
  190. 1.014,
  191. 1.014,
  192. 1.013,
  193. 1.012,
  194. 1.01,
  195. 1.009,
  196. 1.008,
  197. 1.006,
  198. 1.005,
  199. 1.004,
  200. 1.003,
  201. 1.002,
  202. 1.001,
  203. 1
  204. );
  205. --dur-glide: 560ms;
  206. --ease-wobble: linear(
  207. 0,
  208. 0.067,
  209. 0.229,
  210. 0.436,
  211. 0.648,
  212. 0.837,
  213. 0.986,
  214. 1.089,
  215. 1.148,
  216. 1.17,
  217. 1.163,
  218. 1.138,
  219. 1.104,
  220. 1.068,
  221. 1.034,
  222. 1.007,
  223. 0.988,
  224. 0.976,
  225. 0.971,
  226. 0.972,
  227. 0.975,
  228. 0.981,
  229. 0.987,
  230. 0.993,
  231. 0.998,
  232. 1.001,
  233. 1.004,
  234. 1.005,
  235. 1.005,
  236. 1.004,
  237. 1.003,
  238. 1.002,
  239. 1.001,
  240. 1
  241. );
  242. --dur-wobble: 820ms;
  243. /* visionOS-style hover light */
  244. --spot-fill: rgb(140 201 254 / 0.1);
  245. --spot-rim: rgb(42 134 221 / 0.28);
  246. /* Liquid glass */
  247. --glass-tint: rgb(255 255 255 / 0.34);
  248. --glass-rim: rgb(255 255 255 / 0.95);
  249. --glass-rim-dim: rgb(255 255 255 / 0.28);
  250. --glass-shadow:
  251. 0 1px 2px rgb(40 20 30 / 0.08), 0 14px 34px -14px rgb(60 30 45 / 0.3);
  252. --glass-ink: #17161b;
  253. }
  254. .dark {
  255. --stage-sky: #142f49;
  256. --stage-mint: #103830;
  257. --stage-butter: #362a12;
  258. --stage-lilac: #231d42;
  259. --stage-blob: rgb(255 159 189 / 0.12);
  260. /* Neutrals: the original night palette. */
  261. --bg: #0b0f11;
  262. --card: #0f1217;
  263. --card-2: #151a20;
  264. --ink: #eef0f7;
  265. --ink-2: #b7bec9;
  266. --muted: #8a929e;
  267. --line: #20262c;
  268. --line-strong: #2a2f35;
  269. --glacier: #8cc9fe;
  270. --ember: #ff9fbd;
  271. --glacier-ink: #8cc9fe;
  272. --ember-ink: #ff9fbd;
  273. --topo: rgb(140 201 254 / 0.07);
  274. --aurora-a: rgb(70 140 210 / 0.24);
  275. --aurora-b: rgb(255 150 190 / 0.12);
  276. --aurora-c: rgb(99 204 174 / 0.08);
  277. --shadow: 0 1px 1px rgb(0 0 0 / 0.4), 0 16px 40px -22px rgb(0 0 0 / 0.8);
  278. --shadow-hover:
  279. 0 1px 1px rgb(0 0 0 / 0.4), 0 26px 50px -22px rgb(0 0 0 / 0.95);
  280. --card-glass: rgb(26 31 39 / 0.5);
  281. --card-sheen: rgb(255 255 255 / 0.035);
  282. --card-inset: rgb(255 255 255 / 0.045);
  283. --rim-hi: rgb(255 255 255 / 0.3);
  284. --rim-lo: rgb(255 255 255 / 0.07);
  285. --rim-end: rgb(255 255 255 / 0.14);
  286. --glint: rgb(255 255 255 / 0.6);
  287. --card-lifted: rgb(30 36 45 / 0.95);
  288. --spot-fill: rgb(255 255 255 / 0.05);
  289. --spot-rim: rgb(255 255 255 / 0.3);
  290. --glass-tint: rgb(255 255 255 / 0.05);
  291. --glass-rim: rgb(255 255 255 / 0.55);
  292. --glass-rim-dim: rgb(255 255 255 / 0.08);
  293. --glass-shadow:
  294. 0 1px 2px rgb(0 0 0 / 0.5), 0 18px 40px -16px rgb(0 0 0 / 0.85);
  295. --glass-ink: #eef0f7;
  296. }
  297. /* ---------- Base ---------- */
  298. @layer base {
  299. html {
  300. color-scheme: light;
  301. background: var(--bg);
  302. -webkit-text-size-adjust: 100%;
  303. scroll-padding-top: 96px;
  304. }
  305. html.dark {
  306. color-scheme: dark;
  307. }
  308. /* A column, so on short pages the footer still sits at the bottom. */
  309. body {
  310. display: flex;
  311. flex-direction: column;
  312. min-height: 100dvh;
  313. background: var(--bg);
  314. color: var(--ink);
  315. font-family: var(--font-sans);
  316. letter-spacing: -0.004em;
  317. -webkit-font-smoothing: antialiased;
  318. -moz-osx-font-smoothing: grayscale;
  319. text-rendering: optimizeLegibility;
  320. }
  321. ::selection {
  322. background: color-mix(in oklab, var(--glacier) 28%, transparent);
  323. }
  324. :focus-visible {
  325. outline: 2px solid color-mix(in oklab, var(--glacier) 85%, transparent);
  326. outline-offset: 2px;
  327. }
  328. /* Inside glass, the ring sits within the control so it reads as part of it. */
  329. .lg :focus-visible {
  330. outline-offset: -2px;
  331. }
  332. }
  333. /* ---------- Components (kept below utilities so utilities can override) ---------- */
  334. @layer components {
  335. /* Apple-style eyebrow: small, semibold, sentence case. */
  336. .eyebrow {
  337. font-size: 13px;
  338. line-height: 18px;
  339. font-weight: 600;
  340. letter-spacing: -0.006em;
  341. color: var(--muted);
  342. }
  343. /* Display type: Fraunces with its softest corners. */
  344. .font-display,
  345. .title {
  346. font-family: var(--font-display);
  347. font-variation-settings: "SOFT" 100;
  348. }
  349. .title {
  350. font-weight: 600;
  351. letter-spacing: -0.012em;
  352. line-height: 1.1;
  353. color: var(--ink);
  354. }
  355. .no-scrollbar {
  356. scrollbar-width: none;
  357. }
  358. .no-scrollbar::-webkit-scrollbar {
  359. display: none;
  360. }
  361. /* macOS-style dock magnification, pure CSS. */
  362. .dock > a:hover {
  363. scale: 1.16;
  364. translate: 0 -3px;
  365. }
  366. .dock > a:hover + a,
  367. .dock > a:has(+ a:hover) {
  368. scale: 1.07;
  369. translate: 0 -1px;
  370. }
  371. /* ---------- Bento grid ---------- */
  372. .bento-wrap {
  373. container-type: inline-size;
  374. }
  375. .bento {
  376. --cols: 2;
  377. --gap: 10px;
  378. position: relative;
  379. display: grid;
  380. grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  381. grid-auto-rows: calc(
  382. (100cqi - (var(--cols) - 1) * var(--gap)) / var(--cols)
  383. );
  384. gap: var(--gap);
  385. }
  386. /* Every card sits in an explicit cell, computed per tier (lib/bento-layout.ts). */
  387. .bento > .card {
  388. grid-column: var(--c0) / span var(--w0);
  389. grid-row: var(--r0) / span var(--h0);
  390. }
  391. @media (min-width: 480px) {
  392. .bento > .card {
  393. grid-column: var(--c1) / span var(--w1);
  394. grid-row: var(--r1) / span var(--h1);
  395. }
  396. }
  397. @media (min-width: 640px) {
  398. .bento > .card {
  399. grid-column: var(--c2) / span var(--w2);
  400. grid-row: var(--r2) / span var(--h2);
  401. }
  402. }
  403. @media (min-width: 768px) {
  404. .bento > .card {
  405. grid-column: var(--c3) / span var(--w3);
  406. grid-row: var(--r3) / span var(--h3);
  407. }
  408. }
  409. @media (min-width: 1024px) {
  410. .bento > .card {
  411. grid-column: var(--c4) / span var(--w4);
  412. grid-row: var(--r4) / span var(--h4);
  413. }
  414. }
  415. /* Up to portrait tablets the header card (the hero) spans the full width, so
  416. it is a row of its own, as tall as its content, never a square with empty
  417. space in it (lib/bento-layout tiers 0 to 2). */
  418. @media (max-width: 767px) {
  419. .bento[data-has-header] {
  420. grid-template-rows: auto;
  421. }
  422. /* When a filter doesn't include it, it steps aside so the matches lead. */
  423. .bento > .card[data-header][data-dim] {
  424. display: none;
  425. }
  426. }
  427. /* Where the held card will land: a soft, empty well of glass. */
  428. .bento-ghost {
  429. border-radius: 28px;
  430. background: color-mix(in oklab, var(--glacier) 7%, transparent);
  431. box-shadow:
  432. inset 0 0 0 1.5px color-mix(in oklab, var(--glacier) 38%, transparent),
  433. inset 0 10px 30px -12px rgb(0 0 0 / 0.12);
  434. pointer-events: none;
  435. animation: fade-in 0.25s ease both;
  436. }
  437. @media (max-width: 639px) {
  438. .bento-ghost {
  439. border-radius: 24px;
  440. }
  441. }
  442. @media (min-width: 640px) {
  443. .bento {
  444. --gap: 14px;
  445. }
  446. }
  447. @media (min-width: 768px) {
  448. .bento {
  449. --cols: 3;
  450. }
  451. }
  452. @media (min-width: 1024px) {
  453. .bento {
  454. --cols: 4;
  455. --gap: 18px;
  456. }
  457. }
  458. @media (max-width: 639px) {
  459. .card {
  460. --card-radius: 24px;
  461. }
  462. }
  463. .card {
  464. --card-radius: 28px;
  465. position: relative;
  466. isolation: isolate;
  467. overflow: hidden;
  468. border-radius: var(--card-radius);
  469. /* Tints are image layers, never a background-color: while scrolling fast,
  470. Chrome fills tiles it hasn't painted yet with a layer's background-color,
  471. as a square the size of the layer (shadow included), which flashed. */
  472. background:
  473. linear-gradient(180deg, var(--card-sheen), transparent 36%),
  474. linear-gradient(var(--card-glass), var(--card-glass));
  475. -webkit-backdrop-filter: blur(var(--card-blur)) saturate(1.8);
  476. backdrop-filter: blur(var(--card-blur)) saturate(1.8);
  477. box-shadow: var(--shadow);
  478. transition:
  479. opacity 0.45s ease,
  480. filter 0.45s ease,
  481. box-shadow var(--dur-glide) var(--ease-glide),
  482. scale var(--dur-glide) var(--ease-glide);
  483. touch-action: pan-y;
  484. -webkit-touch-callout: none;
  485. }
  486. @media (hover: hover) and (pointer: fine) {
  487. .card {
  488. cursor: grab;
  489. }
  490. }
  491. /* Card content is clipped to the rounded shape even while layers animate
  492. (overflow alone lets composited children show square corners). */
  493. .card-body {
  494. position: relative;
  495. height: 100%;
  496. border-radius: inherit;
  497. overflow: hidden;
  498. clip-path: inset(0 round var(--card-radius));
  499. }
  500. @media (hover: hover) {
  501. .card:hover {
  502. box-shadow: var(--shadow-hover);
  503. }
  504. }
  505. /* visionOS-style hover light: a soft wash where the cursor is and a lit rim nearby. */
  506. .card::before,
  507. .card::after {
  508. content: "";
  509. position: absolute;
  510. inset: 0;
  511. border-radius: inherit;
  512. pointer-events: none;
  513. opacity: var(--spot, 0);
  514. transition: opacity 0.4s ease;
  515. z-index: 30;
  516. }
  517. .card::before {
  518. background: radial-gradient(
  519. 380px circle at var(--mx, -999px) var(--my, -999px),
  520. var(--spot-fill),
  521. transparent 50%
  522. );
  523. z-index: -1;
  524. }
  525. .card::after {
  526. padding: 1px;
  527. background: radial-gradient(
  528. 240px circle at var(--mx, -999px) var(--my, -999px),
  529. var(--spot-rim),
  530. transparent 65%
  531. );
  532. -webkit-mask:
  533. linear-gradient(#000 0 0) content-box,
  534. linear-gradient(#000 0 0);
  535. -webkit-mask-composite: xor;
  536. mask-composite: exclude;
  537. }
  538. .card[data-dim="true"] {
  539. opacity: 0.32;
  540. filter: saturate(0.35);
  541. }
  542. /* Pressed: the glass gives a little, like a held drop. */
  543. .card[data-pressed] {
  544. scale: 0.985;
  545. transition-duration: 0.45s, 0.45s, var(--dur-snap), var(--dur-snap);
  546. transition-timing-function: ease, ease, var(--ease-snap), var(--ease-snap);
  547. }
  548. /* Lifted: drops its blur (cheap to move) and floats above the grid. */
  549. .card[data-dragging="true"] {
  550. z-index: 50;
  551. scale: 1.03;
  552. background: linear-gradient(var(--card-lifted), var(--card-lifted));
  553. -webkit-backdrop-filter: none;
  554. backdrop-filter: none;
  555. box-shadow:
  556. 0 36px 70px -28px rgb(0 0 0 / 0.5),
  557. 0 14px 28px -14px rgb(0 0 0 / 0.28);
  558. cursor: grabbing;
  559. }
  560. .bento-wrap[data-dragging] .card:not([data-dragging]) {
  561. cursor: grabbing;
  562. }
  563. /* Entrance: each card condenses into place in reading order, and a glint of
  564. light runs along its glass edge as it settles. */
  565. .card[data-enter] {
  566. animation: condense 0.8s var(--ease-glide) backwards;
  567. animation-delay: calc(var(--i, 0) * 45ms);
  568. }
  569. /* The glint: a band of light swept across the rim once, on the compositor.
  570. It fills backwards only: an animation that fills forwards never ends for
  571. Chrome, which kept each band (2.2 cards wide) as a GPU layer for good, and
  572. with fifteen of them, cards scrolled back into view came up blank. Done,
  573. the band falls back to -100%, as far off the card as +100%. */
  574. .card[data-enter] .card-rim::after {
  575. content: "";
  576. position: absolute;
  577. inset: 0 -60%;
  578. background: linear-gradient(
  579. 108deg,
  580. transparent 42%,
  581. var(--glint) 50%,
  582. transparent 58%
  583. );
  584. translate: -100% 0;
  585. animation: glint 1.4s cubic-bezier(0.3, 0.6, 0.2, 1) backwards;
  586. animation-delay: calc(var(--i, 0) * 45ms + 0.25s);
  587. }
  588. /* The glass edge: brightest where the light comes from, catching again at the bottom. */
  589. .card-rim {
  590. position: absolute;
  591. inset: 0;
  592. z-index: 29;
  593. border-radius: inherit;
  594. padding: 1px;
  595. pointer-events: none;
  596. background: linear-gradient(
  597. 172deg,
  598. var(--rim-hi),
  599. var(--rim-lo) 22%,
  600. transparent 50%,
  601. var(--rim-lo) 84%,
  602. var(--rim-end)
  603. );
  604. overflow: hidden;
  605. -webkit-mask:
  606. linear-gradient(#000 0 0) content-box,
  607. linear-gradient(#000 0 0);
  608. -webkit-mask-composite: xor;
  609. mask-composite: exclude;
  610. }
  611. @supports not (
  612. (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))
  613. ) {
  614. .card {
  615. background: linear-gradient(var(--card), var(--card));
  616. }
  617. }
  618. @media (prefers-reduced-transparency: reduce) {
  619. .card {
  620. background: linear-gradient(var(--card), var(--card));
  621. -webkit-backdrop-filter: none;
  622. backdrop-filter: none;
  623. }
  624. }
  625. /* ---------- Liquid glass ---------- */
  626. .lg {
  627. position: relative;
  628. isolation: isolate;
  629. background: linear-gradient(var(--glass-tint), var(--glass-tint));
  630. -webkit-backdrop-filter: blur(var(--lg-blur, 12px)) saturate(1.7);
  631. backdrop-filter: blur(var(--lg-blur, 12px)) saturate(1.7);
  632. box-shadow: var(--glass-shadow);
  633. color: var(--glass-ink);
  634. }
  635. .lg[data-refract="true"] {
  636. -webkit-backdrop-filter: var(--lg-filter);
  637. backdrop-filter: var(--lg-filter);
  638. }
  639. /* The hero lens's copy of the card sits on a plain fill and only has to
  640. look right: no backdrop blur, and the avatar flattened to the face that
  641. shows, so nothing in the lens needs a layer of its own. */
  642. [data-clone] .lg {
  643. -webkit-backdrop-filter: none;
  644. backdrop-filter: none;
  645. }
  646. [data-clone] [data-face][style*="hidden"] {
  647. display: none;
  648. }
  649. [data-clone] :is([data-face], [data-flipper]) {
  650. transform: none !important;
  651. transform-style: flat !important;
  652. }
  653. [data-clone] * {
  654. -webkit-backface-visibility: visible !important;
  655. backface-visibility: visible !important;
  656. will-change: auto !important;
  657. }
  658. :is(a, button).lg {
  659. transition: scale var(--dur-wobble) var(--ease-wobble);
  660. }
  661. :is(a, button).lg:active {
  662. scale: 0.94;
  663. transition-duration: var(--dur-snap);
  664. transition-timing-function: var(--ease-snap);
  665. }
  666. /* Long, thin glass (the nav bar) keeps a steady top light instead of a
  667. cursor-chasing highlight. */
  668. .lg[data-steady-light] {
  669. --sheen: 0;
  670. --la: 180deg;
  671. }
  672. /* Specular sheen: follows the light (the cursor). */
  673. .lg::before {
  674. content: "";
  675. position: absolute;
  676. inset: 0;
  677. border-radius: inherit;
  678. pointer-events: none;
  679. background:
  680. radial-gradient(
  681. 120% 90% at var(--lx, 30%) var(--ly, -10%),
  682. rgb(255 255 255 / var(--sheen, 0.42)),
  683. rgb(255 255 255 / calc(var(--sheen, 0.42) * 0.15)) 38%,
  684. transparent 60%
  685. ),
  686. linear-gradient(
  687. 180deg,
  688. rgb(255 255 255 / 0.14),
  689. transparent 40%,
  690. rgb(255 255 255 / 0.04)
  691. );
  692. mix-blend-mode: soft-light;
  693. z-index: 1;
  694. }
  695. .dark .lg::before {
  696. mix-blend-mode: screen;
  697. opacity: 0.55;
  698. }
  699. /* Rim light: a bright edge where the light hits, a dim one opposite. */
  700. .lg::after {
  701. content: "";
  702. position: absolute;
  703. inset: 0;
  704. border-radius: inherit;
  705. padding: 1px;
  706. pointer-events: none;
  707. background: linear-gradient(
  708. var(--la, 135deg),
  709. var(--glass-rim),
  710. var(--glass-rim-dim) 30%,
  711. transparent 50%,
  712. var(--glass-rim-dim) 72%,
  713. color-mix(in oklab, var(--glass-rim) 70%, transparent)
  714. );
  715. -webkit-mask:
  716. linear-gradient(#000 0 0) content-box,
  717. linear-gradient(#000 0 0);
  718. -webkit-mask-composite: xor;
  719. mask-composite: exclude;
  720. z-index: 2;
  721. }
  722. .lg > * {
  723. position: relative;
  724. z-index: 3;
  725. }
  726. /* Inner caustic: a soft bright pool on the side away from the light. */
  727. .lg-caustic {
  728. position: absolute;
  729. inset: 0;
  730. border-radius: inherit;
  731. pointer-events: none;
  732. z-index: 1 !important;
  733. box-shadow:
  734. inset 0 1px 1px rgb(255 255 255 / 0.55),
  735. inset 0 -8px 16px -10px rgb(255 255 255 / 0.35),
  736. inset 0 0 0 0.5px rgb(255 255 255 / 0.2);
  737. }
  738. .dark .lg-caustic {
  739. box-shadow:
  740. inset 0 1px 1px rgb(255 255 255 / 0.28),
  741. inset 0 -8px 16px -10px rgb(255 255 255 / 0.12),
  742. inset 0 0 0 0.5px rgb(255 255 255 / 0.1);
  743. }
  744. /* The footer spans the page's column, its text on the column's text edge:
  745. the cards' padding on the home grid, the header on the blog, the prose in
  746. a post. */
  747. .site-footer {
  748. --footer-col: 100%;
  749. --footer-inset: 20px;
  750. }
  751. @media (min-width: 640px) {
  752. .site-footer {
  753. --footer-inset: 24px;
  754. }
  755. }
  756. html:has([data-col="blog"]) .site-footer {
  757. --footer-col: 1040px;
  758. --footer-inset: 0px;
  759. }
  760. html:has([data-col="post"]) .site-footer {
  761. --footer-col: 760px;
  762. --footer-inset: calc(min(16px, 8vw) + 2px);
  763. }
  764. }
  765. /* ---------- Motion ---------- */
  766. @keyframes condense {
  767. from {
  768. opacity: 0;
  769. scale: 0.965;
  770. translate: 0 14px;
  771. }
  772. }
  773. @keyframes glint {
  774. from {
  775. translate: -100% 0;
  776. }
  777. to {
  778. translate: 100% 0;
  779. }
  780. }
  781. @keyframes rise {
  782. from {
  783. opacity: 0;
  784. transform: translateY(14px) scale(0.985);
  785. }
  786. to {
  787. opacity: 1;
  788. transform: none;
  789. }
  790. }
  791. @keyframes ping-soft {
  792. 0% {
  793. transform: scale(0.6);
  794. opacity: 0.7;
  795. }
  796. 80%,
  797. 100% {
  798. transform: scale(2.4);
  799. opacity: 0;
  800. }
  801. }
  802. @keyframes shimmer {
  803. from {
  804. background-position: 200% 0;
  805. }
  806. to {
  807. background-position: -200% 0;
  808. }
  809. }
  810. @keyframes fade-in {
  811. from {
  812. opacity: 0;
  813. }
  814. }
  815. @keyframes grow {
  816. from {
  817. transform: scaleY(0);
  818. }
  819. to {
  820. transform: scaleY(1);
  821. }
  822. }
  823. @keyframes draw {
  824. from {
  825. stroke-dashoffset: 1;
  826. }
  827. to {
  828. stroke-dashoffset: 0;
  829. }
  830. }
  831. /* Globe labels need CSS anchor positioning; hide them where it's missing. */
  832. @supports not (anchor-name: --a) {
  833. .globe-label {
  834. display: none !important;
  835. }
  836. }
  837. @keyframes caret {
  838. 50% {
  839. opacity: 0;
  840. }
  841. }
  842. @keyframes twinkle {
  843. 50% {
  844. opacity: 0.12;
  845. }
  846. }
  847. ::view-transition-old(root),
  848. ::view-transition-new(root) {
  849. animation: none;
  850. mix-blend-mode: normal;
  851. }
  852. @media (prefers-reduced-motion: reduce) {
  853. *,
  854. ::before,
  855. ::after {
  856. animation-duration: 0.001ms !important;
  857. animation-iteration-count: 1 !important;
  858. transition-duration: 0.001ms !important;
  859. scroll-behavior: auto !important;
  860. }
  861. }
  862. /* Unlayered and prefixed with html so it beats react-notion-x's own unlayered CSS. */
  863. /* ---------- Notion (blog) ---------- */
  864. html .notion {
  865. --fg-color: var(--ink);
  866. --fg-color-0: var(--line);
  867. --fg-color-1: var(--line-strong);
  868. --fg-color-2: var(--muted);
  869. --fg-color-3: var(--muted);
  870. --fg-color-4: var(--ink-2);
  871. --fg-color-5: var(--ink-2);
  872. --fg-color-6: var(--ink);
  873. --fg-color-icon: var(--ink-2);
  874. --bg-color: transparent;
  875. --bg-color-0: var(--card-2);
  876. --bg-color-1: var(--card-2);
  877. --bg-color-2: var(--card-2);
  878. --notion-max-width: 760px;
  879. font-family: var(--font-sans) !important;
  880. color: var(--ink);
  881. }
  882. html .notion-h,
  883. html .notion-title {
  884. font-family: var(--font-display) !important;
  885. font-variation-settings: "SOFT" 100;
  886. font-weight: 600;
  887. letter-spacing: -0.012em;
  888. }
  889. html .notion-page {
  890. padding-bottom: 1.5rem;
  891. }
  892. html .notion-text,
  893. html .notion-list li {
  894. line-height: 1.75;
  895. }
  896. html .notion-link {
  897. color: var(--glacier-ink);
  898. border-bottom-color: color-mix(in oklab, var(--glacier) 40%, transparent);
  899. }
  900. html .notion-asset-wrapper img,
  901. html .medium-zoom-image {
  902. border-radius: 1.25rem !important;
  903. }
  904. html .notion-code {
  905. border-radius: 1rem;
  906. overflow: hidden !important;
  907. background: var(--card-2) !important;
  908. border: 1px solid var(--line);
  909. }
  910. html .notion-code code {
  911. scrollbar-width: none;
  912. }
  913. html .notion-code code::-webkit-scrollbar {
  914. display: none;
  915. }
  916. html .notion-code-copy-button {
  917. display: none;
  918. }
  919. html iframe.notion-asset-object-fit,
  920. html .notion-yt-lite {
  921. border-radius: 1rem;
  922. background-color: transparent;
  923. }
  924. /*
  925. * The hero headline: one line that grows with its card (it runs ~6.2em wide).
  926. * Below 768px the hero is a full-width row as tall as its content, so the line
  927. * stays single. From 768px it is a square beside other cards: the headline
  928. * breaks to "Hey, I'm / Eric." and grows in two steps as the card gets taller,
  929. * while the bio scales with the card, so the square fills alike at every size.
  930. * Measured at the 587px card: the gaps from byline to headline, headline to
  931. * bio and bio to links come out about even (~38/45/36px of white between the
  932. * ink), and ~52/51/46 where the bio wraps a line shorter (SF Pro on a Mac).
  933. */
  934. .hero-title {
  935. font-size: clamp(2rem, 15.5cqi, 5.2rem);
  936. line-height: 1.02;
  937. }
  938. @media (min-width: 768px) {
  939. @container hero (min-aspect-ratio: 9 / 10) {
  940. .hero-title {
  941. line-height: 0.98;
  942. }
  943. .hero-tail {
  944. display: block;
  945. }
  946. }
  947. @container hero (min-height: 472px) and (min-aspect-ratio: 9 / 10) {
  948. .hero-title {
  949. font-size: min(18.5cqi, 7.5rem);
  950. }
  951. }
  952. @container hero (min-height: 530px) and (min-aspect-ratio: 9 / 10) {
  953. .hero-title {
  954. font-size: min(20.4cqi, 7.5rem);
  955. }
  956. }
  957. }
  958. /* The name in the hero: a sky-to-blush gradient, Apple Intelligence style. */
  959. .hero-name {
  960. font-family: var(--font-name);
  961. font-style: italic;
  962. padding-right: 0.06em;
  963. background-image: linear-gradient(
  964. 100deg,
  965. var(--glacier) 5%,
  966. var(--ember) 95%
  967. );
  968. background-image: linear-gradient(
  969. in oklab 100deg,
  970. var(--glacier) 5%,
  971. var(--ember) 95%
  972. );
  973. -webkit-background-clip: text;
  974. background-clip: text;
  975. color: transparent;
  976. }