globals.css 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572
  1. @import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&display=swap");
  2. @import "tailwindcss";
  3. @custom-variant dark (&:where(.dark, .dark *));
  4. :root {
  5. --top-nav-height: 105px;
  6. --border-color: #dce6e9;
  7. --bg-color: theme(colors.zinc.50);
  8. --bg-secondary: theme(colors.zinc.100);
  9. --text-color: rgba(60, 66, 87, 1);
  10. --text-secondary: theme(colors.slate.500);
  11. --text-link: #5a7ab5;
  12. --text-brand: #1a1a18;
  13. --accent-color: theme(colors.indigo.500);
  14. --accent-hover: theme(colors.indigo.600);
  15. }
  16. .dark {
  17. --border-color: #3f3f3f;
  18. --bg-color: #1a1a18;
  19. --bg-secondary: #33332d;
  20. --text-color: #a3a3a2;
  21. --text-header: #e9e9e9;
  22. --text-secondary: theme(colors.gray.300);
  23. --text-link: theme(colors.slate.400);
  24. --text-brand: #f8f674;
  25. --text-brand-hover: #f8f675;
  26. --accent-color: #f8f675;
  27. --accent-hover: #f8f675;
  28. }
  29. *,
  30. *::before,
  31. *::after {
  32. box-sizing: border-box;
  33. }
  34. html,
  35. body {
  36. overflow-x: hidden;
  37. max-width: 100vw;
  38. }
  39. body {
  40. font-family:
  41. ui-sans-serif,
  42. system-ui,
  43. -apple-system,
  44. BlinkMacSystemFont,
  45. "Segoe UI",
  46. Roboto,
  47. "Helvetica Neue",
  48. Arial,
  49. "Noto Sans",
  50. sans-serif,
  51. "Apple Color Emoji",
  52. "Segoe UI Emoji",
  53. "Segoe UI Symbol",
  54. "Noto Color Emoji";
  55. color: var(--text-color);
  56. background-color: var(--bg-color);
  57. margin: 0;
  58. transition:
  59. background-color 0.2s ease,
  60. color 0.2s ease;
  61. }
  62. p {
  63. line-height: 1.5em;
  64. }
  65. .article-content {
  66. width: 100%;
  67. }
  68. .article-content p {
  69. margin: 1em 0;
  70. }
  71. .article-content > * {
  72. max-width: 100%;
  73. overflow-wrap: break-word;
  74. word-wrap: break-word;
  75. }
  76. .font-brand {
  77. font-family: "JetBrains Mono", monospace;
  78. font-weight: 500;
  79. color: var(--text-brand);
  80. }
  81. h1 {
  82. font-family: "JetBrains Mono", monospace;
  83. font-weight: 700;
  84. color: var(--text-brand);
  85. }
  86. h2,
  87. h3,
  88. h4,
  89. h5,
  90. h6 {
  91. font-weight: 600;
  92. color: var(--text-header);
  93. margin: 1em 0 0.5em;
  94. }
  95. h1 {
  96. font-size: 40px;
  97. }
  98. h2 {
  99. font-size: 28px;
  100. }
  101. h3 {
  102. font-size: 20px;
  103. }
  104. a {
  105. color: var(--text-link);
  106. }
  107. a:hover {
  108. color: var(--text-brand-hover);
  109. }
  110. /* Homepage Button Styles */
  111. .btn {
  112. display: inline-flex;
  113. align-items: center;
  114. justify-content: center;
  115. gap: 0.5rem;
  116. padding: 0.5rem 1.5rem;
  117. border-radius: 4px;
  118. font-family: "JetBrains Mono", monospace;
  119. font-weight: 500;
  120. font-size: 1rem;
  121. text-decoration: none;
  122. transition: all 0.15s ease;
  123. border: 2px solid transparent;
  124. }
  125. .btn-primary {
  126. background: #f8f674;
  127. color: #1a1a18 !important;
  128. border-color: #f8f674;
  129. }
  130. .btn-primary:hover {
  131. background: #ffff8d;
  132. border-color: #ffff8d;
  133. color: #1a1a18 !important;
  134. transform: translateY(-1px);
  135. }
  136. .btn-secondary {
  137. background: transparent;
  138. color: #888 !important;
  139. border: 2px solid #555;
  140. }
  141. .btn-secondary:hover {
  142. color: #f8f674 !important;
  143. border-color: #f8f674;
  144. }
  145. /* Terminal Syntax Highlighting */
  146. .terminal-comment {
  147. color: #6a9955;
  148. }
  149. .terminal-prompt {
  150. color: #dcdcaa;
  151. }
  152. /* Lists - Override Tailwind's reset to restore default list styling */
  153. .article-content ul,
  154. .article-content ol {
  155. margin: 1em 0;
  156. padding-left: 1.5em;
  157. line-height: 1.75;
  158. }
  159. .article-content ul {
  160. list-style-type: disc;
  161. }
  162. .article-content ol {
  163. list-style-type: decimal;
  164. }
  165. .article-content li {
  166. margin: 0.5em 0;
  167. }
  168. /* Dark mode code syntax highlighting */
  169. .dark pre[class*="language-"] {
  170. background: #1f2937 !important;
  171. text-shadow: none;
  172. color: #e5e7eb;
  173. }
  174. .dark pre[class*="language-"] *,
  175. .dark code[class*="language-"] {
  176. color: #e5e7eb;
  177. text-shadow: none;
  178. }
  179. /* Ensure inline code also has proper color in dark mode */
  180. .dark code {
  181. color: #e5e7eb;
  182. }
  183. .dark .token.comment,
  184. .dark .token.prolog,
  185. .dark .token.doctype,
  186. .dark .token.cdata {
  187. color: #6b7280;
  188. }
  189. .dark .token.punctuation {
  190. color: #9ca3af;
  191. }
  192. .dark .token.property,
  193. .dark .token.tag,
  194. .dark .token.boolean,
  195. .dark .token.number,
  196. .dark .token.constant,
  197. .dark .token.symbol,
  198. .dark .token.deleted {
  199. color: #f87171;
  200. }
  201. .dark .token.selector,
  202. .dark .token.attr-name,
  203. .dark .token.string,
  204. .dark .token.char,
  205. .dark .token.builtin,
  206. .dark .token.inserted {
  207. color: #34d399;
  208. }
  209. .dark .token.operator,
  210. .dark .token.entity,
  211. .dark .token.url,
  212. .dark .language-css .token.string,
  213. .dark .style .token.string {
  214. color: #fbbf24;
  215. }
  216. .dark .token.atrule,
  217. .dark .token.attr-value,
  218. .dark .token.keyword {
  219. color: #60a5fa;
  220. }
  221. .dark .token.function,
  222. .dark .token.class-name {
  223. color: #f472b6;
  224. }
  225. .dark .token.regex,
  226. .dark .token.important,
  227. .dark .token.variable {
  228. color: #fbbf24;
  229. }
  230. /* Mobile Responsive Styles */
  231. @media (max-width: 1024px) {
  232. /* Hide table of contents on tablet and below */
  233. .toc-container {
  234. display: none;
  235. }
  236. }
  237. @media (max-width: 768px) {
  238. :root {
  239. --top-nav-height: 60px;
  240. }
  241. /* Hide desktop sidenav, show via mobile toggle */
  242. .sidenav-desktop {
  243. display: none;
  244. }
  245. /* Mobile sidenav overlay */
  246. .sidenav-mobile-overlay {
  247. position: fixed;
  248. top: 0;
  249. left: 0;
  250. right: 0;
  251. bottom: 0;
  252. background: rgba(0, 0, 0, 0.5);
  253. z-index: 40;
  254. opacity: 0;
  255. visibility: hidden;
  256. transition:
  257. opacity 0.3s ease,
  258. visibility 0.3s ease;
  259. }
  260. .sidenav-mobile-overlay.open {
  261. opacity: 1;
  262. visibility: visible;
  263. }
  264. /* Mobile sidenav drawer */
  265. .sidenav-mobile {
  266. position: fixed;
  267. top: var(--top-nav-height);
  268. left: 0;
  269. width: 280px;
  270. height: calc(100vh - var(--top-nav-height));
  271. background: var(--bg-color);
  272. z-index: 50;
  273. transform: translateX(-100%);
  274. transition: transform 0.3s ease;
  275. overflow-y: auto;
  276. border-right: 1px solid var(--border-color);
  277. }
  278. .sidenav-mobile.open {
  279. transform: translateX(0);
  280. }
  281. /* Hide desktop nav items */
  282. .desktop-nav {
  283. display: none !important;
  284. }
  285. /* Mobile menu button */
  286. .mobile-menu-btn {
  287. display: flex !important;
  288. }
  289. h1 {
  290. font-size: 28px;
  291. }
  292. h2 {
  293. font-size: 22px;
  294. }
  295. h3 {
  296. font-size: 18px;
  297. }
  298. }
  299. /* Hamburger menu icon */
  300. .hamburger {
  301. display: flex;
  302. flex-direction: column;
  303. justify-content: space-between;
  304. width: 20px;
  305. height: 14px;
  306. cursor: pointer;
  307. }
  308. .hamburger span {
  309. display: block;
  310. width: 100%;
  311. height: 2px;
  312. background: var(--text-color);
  313. border-radius: 1px;
  314. transition: all 0.3s ease;
  315. }
  316. .hamburger.open span:nth-child(1) {
  317. transform: rotate(45deg) translate(4px, 4px);
  318. }
  319. .hamburger.open span:nth-child(2) {
  320. opacity: 0;
  321. }
  322. .hamburger.open span:nth-child(3) {
  323. transform: rotate(-45deg) translate(4px, -4px);
  324. }
  325. /* DocSearch Styles */
  326. :root {
  327. --docsearch-primary-color: var(--text-brand);
  328. --docsearch-text-color: var(--text-secondary);
  329. --docsearch-spacing: 0.5rem;
  330. --docsearch-icon-stroke-width: 1.5;
  331. --docsearch-highlight-color: var(--text-brand);
  332. --docsearch-muted-color: var(--text-secondary);
  333. --docsearch-container-background: rgba(0, 0, 0, 0.5);
  334. --docsearch-modal-background: var(--bg-color);
  335. --docsearch-modal-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  336. --docsearch-searchbox-height: 2.5rem;
  337. --docsearch-searchbox-background: var(--bg-secondary);
  338. --docsearch-searchbox-focus-background: var(--bg-secondary);
  339. --docsearch-hit-color: var(--text-color);
  340. --docsearch-hit-active-color: var(--text-color);
  341. --docsearch-hit-background: var(--bg-secondary);
  342. --docsearch-hit-shadow: none;
  343. --docsearch-key-gradient: var(--bg-secondary);
  344. --docsearch-key-shadow: inset 0 -1px 0 var(--border-color);
  345. --docsearch-footer-background: var(--bg-color);
  346. --docsearch-footer-shadow: 0 -1px 0 var(--border-color);
  347. --docsearch-secondary-text-color: var(--text-color);
  348. --docsearch-icon-color: var(--text-color);
  349. --docsearch-logo-color: var(--text-brand);
  350. }
  351. .dark {
  352. --docsearch-container-background: rgba(0, 0, 0, 0.7);
  353. }
  354. /* DocSearch Button */
  355. .DocSearch-Button {
  356. margin: 0;
  357. padding: 0 0.75rem;
  358. border-radius: 0.5rem;
  359. border: 1px solid var(--border-color);
  360. background-color: var(--bg-secondary);
  361. color: var(--text-secondary);
  362. min-width: 200px;
  363. height: 2rem;
  364. transition: border-color 0.15s ease;
  365. }
  366. .DocSearch-Button:hover {
  367. border-color: var(--text-secondary);
  368. box-shadow: none;
  369. }
  370. .DocSearch-Button-Placeholder {
  371. font-size: 0.875rem;
  372. }
  373. .DocSearch-Search-Icon {
  374. width: 1rem;
  375. height: 1rem;
  376. color: var(--text-secondary);
  377. }
  378. .DocSearch-Button-Keys {
  379. display: flex;
  380. align-items: center;
  381. gap: 0.25rem;
  382. }
  383. .DocSearch-Button-Key {
  384. background: var(--bg-color);
  385. border: 1px solid var(--border-color);
  386. border-radius: 0.25rem;
  387. padding: 0 0.375rem;
  388. font-size: 0.75rem;
  389. font-weight: 500;
  390. color: var(--text-secondary);
  391. box-shadow: none;
  392. }
  393. /* DocSearch Modal */
  394. .DocSearch-Modal {
  395. background: var(--bg-color);
  396. border: 1px solid var(--border-color);
  397. border-radius: 0.75rem;
  398. box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  399. }
  400. .DocSearch-SearchBar {
  401. border-bottom: 1px solid var(--border-color);
  402. padding: 0.75rem;
  403. }
  404. .DocSearch-Form {
  405. background: var(--bg-secondary);
  406. border-radius: 0.5rem;
  407. border: 1px solid var(--border-color);
  408. }
  409. .DocSearch-Input {
  410. color: var(--text-color);
  411. font-size: 1rem;
  412. }
  413. .DocSearch-Input::placeholder {
  414. color: var(--text-secondary);
  415. }
  416. .DocSearch-Reset {
  417. color: var(--text-secondary);
  418. }
  419. .DocSearch-Reset:hover {
  420. color: var(--text-color);
  421. }
  422. .DocSearch-Cancel {
  423. color: var(--text-secondary);
  424. }
  425. /* DocSearch Hits */
  426. .DocSearch-Dropdown {
  427. max-height: 60vh;
  428. }
  429. .DocSearch-Hit {
  430. padding: 0.5rem 0.75rem;
  431. }
  432. .DocSearch-Hit-source {
  433. color: var(--text-secondary);
  434. font-weight: 600;
  435. padding: 0.5rem 0.75rem 0.25rem;
  436. background: transparent;
  437. }
  438. .DocSearch-Hit a {
  439. background: var(--bg-color);
  440. border-radius: 0.5rem;
  441. border: 1px solid transparent;
  442. }
  443. .DocSearch-Hit[aria-selected="true"] a {
  444. background: var(--bg-secondary);
  445. border-color: var(--border-color);
  446. }
  447. .DocSearch-Hit-title {
  448. color: var(--text-color);
  449. font-weight: 500;
  450. }
  451. .DocSearch-Hit-path {
  452. color: var(--text-secondary);
  453. }
  454. .DocSearch-Hit-icon {
  455. color: var(--text-secondary);
  456. }
  457. .DocSearch-Hit-action {
  458. color: var(--text-secondary);
  459. }
  460. /* DocSearch Footer */
  461. .DocSearch-Footer {
  462. background: var(--bg-color);
  463. border-top: 1px solid var(--border-color);
  464. border-radius: 0 0 0.75rem 0.75rem;
  465. }
  466. .DocSearch-Logo .cls-1,
  467. .DocSearch-Logo .cls-2 {
  468. fill: var(--text-secondary);
  469. }
  470. /* DocSearch Commands */
  471. .DocSearch-Commands {
  472. color: var(--text-secondary);
  473. }
  474. .DocSearch-Commands-Key {
  475. background: var(--bg-secondary);
  476. border: 1px solid var(--border-color);
  477. border-radius: 0.25rem;
  478. box-shadow: none;
  479. }
  480. /* Tablet responsive */
  481. @media (max-width: 1024px) and (min-width: 769px) {
  482. .DocSearch-Button {
  483. min-width: 140px;
  484. }
  485. }