globals.css 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095
  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. .card[data-enter] .card-rim::after {
  571. content: "";
  572. position: absolute;
  573. inset: 0 -60%;
  574. background: linear-gradient(
  575. 108deg,
  576. transparent 42%,
  577. var(--glint) 50%,
  578. transparent 58%
  579. );
  580. translate: -100% 0;
  581. animation: glint 1.4s cubic-bezier(0.3, 0.6, 0.2, 1) both;
  582. animation-delay: calc(var(--i, 0) * 45ms + 0.25s);
  583. }
  584. /* The glass edge: brightest where the light comes from, catching again at the bottom. */
  585. .card-rim {
  586. position: absolute;
  587. inset: 0;
  588. z-index: 29;
  589. border-radius: inherit;
  590. padding: 1px;
  591. pointer-events: none;
  592. background: linear-gradient(
  593. 172deg,
  594. var(--rim-hi),
  595. var(--rim-lo) 22%,
  596. transparent 50%,
  597. var(--rim-lo) 84%,
  598. var(--rim-end)
  599. );
  600. overflow: hidden;
  601. -webkit-mask:
  602. linear-gradient(#000 0 0) content-box,
  603. linear-gradient(#000 0 0);
  604. -webkit-mask-composite: xor;
  605. mask-composite: exclude;
  606. }
  607. @supports not (
  608. (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))
  609. ) {
  610. .card {
  611. background: linear-gradient(var(--card), var(--card));
  612. }
  613. }
  614. @media (prefers-reduced-transparency: reduce) {
  615. .card {
  616. background: linear-gradient(var(--card), var(--card));
  617. -webkit-backdrop-filter: none;
  618. backdrop-filter: none;
  619. }
  620. }
  621. /* ---------- Liquid glass ---------- */
  622. .lg {
  623. position: relative;
  624. isolation: isolate;
  625. background: linear-gradient(var(--glass-tint), var(--glass-tint));
  626. -webkit-backdrop-filter: blur(var(--lg-blur, 12px)) saturate(1.7);
  627. backdrop-filter: blur(var(--lg-blur, 12px)) saturate(1.7);
  628. box-shadow: var(--glass-shadow);
  629. color: var(--glass-ink);
  630. }
  631. .lg[data-refract="true"] {
  632. -webkit-backdrop-filter: var(--lg-filter);
  633. backdrop-filter: var(--lg-filter);
  634. }
  635. /* The hero lens's copy of the card sits on a plain fill and only has to
  636. look right: no backdrop blur, and the avatar flattened to the face that
  637. shows, so nothing in the lens needs a layer of its own. */
  638. [data-clone] .lg {
  639. -webkit-backdrop-filter: none;
  640. backdrop-filter: none;
  641. }
  642. [data-clone] [data-face][style*="hidden"] {
  643. display: none;
  644. }
  645. [data-clone] :is([data-face], [data-flipper]) {
  646. transform: none !important;
  647. transform-style: flat !important;
  648. }
  649. [data-clone] * {
  650. -webkit-backface-visibility: visible !important;
  651. backface-visibility: visible !important;
  652. will-change: auto !important;
  653. }
  654. :is(a, button).lg {
  655. transition: scale var(--dur-wobble) var(--ease-wobble);
  656. }
  657. :is(a, button).lg:active {
  658. scale: 0.94;
  659. transition-duration: var(--dur-snap);
  660. transition-timing-function: var(--ease-snap);
  661. }
  662. /* Long, thin glass (the nav bar) keeps a steady top light instead of a
  663. cursor-chasing highlight. */
  664. .lg[data-steady-light] {
  665. --sheen: 0;
  666. --la: 180deg;
  667. }
  668. /* Specular sheen: follows the light (the cursor). */
  669. .lg::before {
  670. content: "";
  671. position: absolute;
  672. inset: 0;
  673. border-radius: inherit;
  674. pointer-events: none;
  675. background:
  676. radial-gradient(
  677. 120% 90% at var(--lx, 30%) var(--ly, -10%),
  678. rgb(255 255 255 / var(--sheen, 0.42)),
  679. rgb(255 255 255 / calc(var(--sheen, 0.42) * 0.15)) 38%,
  680. transparent 60%
  681. ),
  682. linear-gradient(
  683. 180deg,
  684. rgb(255 255 255 / 0.14),
  685. transparent 40%,
  686. rgb(255 255 255 / 0.04)
  687. );
  688. mix-blend-mode: soft-light;
  689. z-index: 1;
  690. }
  691. .dark .lg::before {
  692. mix-blend-mode: screen;
  693. opacity: 0.55;
  694. }
  695. /* Rim light: a bright edge where the light hits, a dim one opposite. */
  696. .lg::after {
  697. content: "";
  698. position: absolute;
  699. inset: 0;
  700. border-radius: inherit;
  701. padding: 1px;
  702. pointer-events: none;
  703. background: linear-gradient(
  704. var(--la, 135deg),
  705. var(--glass-rim),
  706. var(--glass-rim-dim) 30%,
  707. transparent 50%,
  708. var(--glass-rim-dim) 72%,
  709. color-mix(in oklab, var(--glass-rim) 70%, transparent)
  710. );
  711. -webkit-mask:
  712. linear-gradient(#000 0 0) content-box,
  713. linear-gradient(#000 0 0);
  714. -webkit-mask-composite: xor;
  715. mask-composite: exclude;
  716. z-index: 2;
  717. }
  718. .lg > * {
  719. position: relative;
  720. z-index: 3;
  721. }
  722. /* Inner caustic: a soft bright pool on the side away from the light. */
  723. .lg-caustic {
  724. position: absolute;
  725. inset: 0;
  726. border-radius: inherit;
  727. pointer-events: none;
  728. z-index: 1 !important;
  729. box-shadow:
  730. inset 0 1px 1px rgb(255 255 255 / 0.55),
  731. inset 0 -8px 16px -10px rgb(255 255 255 / 0.35),
  732. inset 0 0 0 0.5px rgb(255 255 255 / 0.2);
  733. }
  734. .dark .lg-caustic {
  735. box-shadow:
  736. inset 0 1px 1px rgb(255 255 255 / 0.28),
  737. inset 0 -8px 16px -10px rgb(255 255 255 / 0.12),
  738. inset 0 0 0 0.5px rgb(255 255 255 / 0.1);
  739. }
  740. /* The footer spans the page's column, its text on the column's text edge:
  741. the cards' padding on the home grid, the header on the blog, the prose in
  742. a post. */
  743. .site-footer {
  744. --footer-col: 100%;
  745. --footer-inset: 20px;
  746. }
  747. @media (min-width: 640px) {
  748. .site-footer {
  749. --footer-inset: 24px;
  750. }
  751. }
  752. html:has([data-col="blog"]) .site-footer {
  753. --footer-col: 1040px;
  754. --footer-inset: 0px;
  755. }
  756. html:has([data-col="post"]) .site-footer {
  757. --footer-col: 760px;
  758. --footer-inset: calc(min(16px, 8vw) + 2px);
  759. }
  760. }
  761. /* ---------- Motion ---------- */
  762. @keyframes condense {
  763. from {
  764. opacity: 0;
  765. scale: 0.965;
  766. translate: 0 14px;
  767. }
  768. }
  769. @keyframes glint {
  770. from {
  771. translate: -100% 0;
  772. }
  773. to {
  774. translate: 100% 0;
  775. }
  776. }
  777. @keyframes rise {
  778. from {
  779. opacity: 0;
  780. transform: translateY(14px) scale(0.985);
  781. }
  782. to {
  783. opacity: 1;
  784. transform: none;
  785. }
  786. }
  787. @keyframes ping-soft {
  788. 0% {
  789. transform: scale(0.6);
  790. opacity: 0.7;
  791. }
  792. 80%,
  793. 100% {
  794. transform: scale(2.4);
  795. opacity: 0;
  796. }
  797. }
  798. @keyframes shimmer {
  799. from {
  800. background-position: 200% 0;
  801. }
  802. to {
  803. background-position: -200% 0;
  804. }
  805. }
  806. @keyframes fade-in {
  807. from {
  808. opacity: 0;
  809. }
  810. }
  811. @keyframes grow {
  812. from {
  813. transform: scaleY(0);
  814. }
  815. to {
  816. transform: scaleY(1);
  817. }
  818. }
  819. @keyframes draw {
  820. from {
  821. stroke-dashoffset: 1;
  822. }
  823. to {
  824. stroke-dashoffset: 0;
  825. }
  826. }
  827. /* Globe labels need CSS anchor positioning; hide them where it's missing. */
  828. @supports not (anchor-name: --a) {
  829. .globe-label {
  830. display: none !important;
  831. }
  832. }
  833. @keyframes caret {
  834. 50% {
  835. opacity: 0;
  836. }
  837. }
  838. @keyframes twinkle {
  839. 50% {
  840. opacity: 0.12;
  841. }
  842. }
  843. ::view-transition-old(root),
  844. ::view-transition-new(root) {
  845. animation: none;
  846. mix-blend-mode: normal;
  847. }
  848. @media (prefers-reduced-motion: reduce) {
  849. *,
  850. ::before,
  851. ::after {
  852. animation-duration: 0.001ms !important;
  853. animation-iteration-count: 1 !important;
  854. transition-duration: 0.001ms !important;
  855. scroll-behavior: auto !important;
  856. }
  857. }
  858. /* Unlayered and prefixed with html so it beats react-notion-x's own unlayered CSS. */
  859. /* ---------- Notion (blog) ---------- */
  860. html .notion {
  861. --fg-color: var(--ink);
  862. --fg-color-0: var(--line);
  863. --fg-color-1: var(--line-strong);
  864. --fg-color-2: var(--muted);
  865. --fg-color-3: var(--muted);
  866. --fg-color-4: var(--ink-2);
  867. --fg-color-5: var(--ink-2);
  868. --fg-color-6: var(--ink);
  869. --fg-color-icon: var(--ink-2);
  870. --bg-color: transparent;
  871. --bg-color-0: var(--card-2);
  872. --bg-color-1: var(--card-2);
  873. --bg-color-2: var(--card-2);
  874. --notion-max-width: 760px;
  875. font-family: var(--font-sans) !important;
  876. color: var(--ink);
  877. }
  878. html .notion-h,
  879. html .notion-title {
  880. font-family: var(--font-display) !important;
  881. font-variation-settings: "SOFT" 100;
  882. font-weight: 600;
  883. letter-spacing: -0.012em;
  884. }
  885. html .notion-page {
  886. padding-bottom: 1.5rem;
  887. }
  888. html .notion-text,
  889. html .notion-list li {
  890. line-height: 1.75;
  891. }
  892. html .notion-link {
  893. color: var(--glacier-ink);
  894. border-bottom-color: color-mix(in oklab, var(--glacier) 40%, transparent);
  895. }
  896. html .notion-asset-wrapper img,
  897. html .medium-zoom-image {
  898. border-radius: 1.25rem !important;
  899. }
  900. html .notion-code {
  901. border-radius: 1rem;
  902. overflow: hidden !important;
  903. background: var(--card-2) !important;
  904. border: 1px solid var(--line);
  905. }
  906. html .notion-code code {
  907. scrollbar-width: none;
  908. }
  909. html .notion-code code::-webkit-scrollbar {
  910. display: none;
  911. }
  912. html .notion-code-copy-button {
  913. display: none;
  914. }
  915. html iframe.notion-asset-object-fit,
  916. html .notion-yt-lite {
  917. border-radius: 1rem;
  918. background-color: transparent;
  919. }
  920. /*
  921. * The hero headline: one line that grows with its card (it runs ~6.2em wide).
  922. * Below 768px the hero is a full-width row as tall as its content, so the line
  923. * stays single. From 768px it is a square beside other cards: the headline
  924. * breaks to "Hey, I'm / Eric." and grows in two steps as the card gets taller,
  925. * while the bio scales with the card, so the square fills alike at every size.
  926. * Measured at the 587px card: the gaps from byline to headline, headline to
  927. * bio and bio to links come out about even (~38/45/36px of white between the
  928. * ink), and ~52/51/46 where the bio wraps a line shorter (SF Pro on a Mac).
  929. */
  930. .hero-title {
  931. font-size: clamp(2rem, 15.5cqi, 5.2rem);
  932. line-height: 1.02;
  933. }
  934. @media (min-width: 768px) {
  935. @container hero (min-aspect-ratio: 9 / 10) {
  936. .hero-title {
  937. line-height: 0.98;
  938. }
  939. .hero-tail {
  940. display: block;
  941. }
  942. }
  943. @container hero (min-height: 472px) and (min-aspect-ratio: 9 / 10) {
  944. .hero-title {
  945. font-size: min(18.5cqi, 7.5rem);
  946. }
  947. }
  948. @container hero (min-height: 530px) and (min-aspect-ratio: 9 / 10) {
  949. .hero-title {
  950. font-size: min(20.4cqi, 7.5rem);
  951. }
  952. }
  953. }
  954. /* The name in the hero: a sky-to-blush gradient, Apple Intelligence style. */
  955. .hero-name {
  956. font-family: var(--font-name);
  957. font-style: italic;
  958. padding-right: 0.06em;
  959. background-image: linear-gradient(
  960. 100deg,
  961. var(--glacier) 5%,
  962. var(--ember) 95%
  963. );
  964. background-image: linear-gradient(
  965. in oklab 100deg,
  966. var(--glacier) 5%,
  967. var(--ember) 95%
  968. );
  969. -webkit-background-clip: text;
  970. background-clip: text;
  971. color: transparent;
  972. }