globals.css 27 KB

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