globals.css 26 KB

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