MojoLlama
Archived Mojo/MAX quantizer and serving research repository (read-only history)
Brought by drakestapleton
| 1 | <!DOCTYPE html> |
| 2 | <html lang="en"> |
| 3 | <head> |
| 4 | <meta charset="UTF-8"> |
| 5 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| 6 | <title>MojoLlama — CPU-First LLM Inference Platform</title> |
| 7 | <meta name="description" content="MojoLlama: high-throughput CPU LLM inference. GGUF native, MoE-optimized, 50+ architectures. Open-source inference engine built in Mojo+MAX."> |
| 8 | <meta name="color-scheme" content="light dark"> |
| 9 | <meta property="og:title" content="MojoLlama — CPU-First LLM Platform"> |
| 10 | <meta property="og:description" content="Inference, fine-tuning, quantization, and serving — engineered for CPU. Built in Mojo+MAX."> |
| 11 | <meta property="og:url" content="https://git.bamse.cloud/a730/MojoLlama/~site/"> |
| 12 | <meta property="og:image" content="logo.png"> |
| 13 | <link rel="icon" type="image/png" sizes="32x32" href="favicon.png"> |
| 14 | <link rel="icon" type="image/png" sizes="48x48" href="favicon-48.png"> |
| 15 | <link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon.png"> |
| 16 | <link rel="preconnect" href="https://fonts.googleapis.com"> |
| 17 | <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> |
| 18 | <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet"> |
| 19 | <style> |
| 20 | /* ══════════════════════════════════════════════ |
| 21 | MojoLlama — Carbon-Inspired Brand System |
| 22 | IBM Carbon Design System principles: |
| 23 | - Token-driven theming (light/dark + layers) |
| 24 | - Productive/expressive type scale |
| 25 | - Half-step hover, two-step active interactions |
| 26 | - Progressive dark layering (#161616 → #262626 → #393939) |
| 27 | - Purposeful 8px grid whitespace |
| 28 | - Sharp, authoritative card language |
| 29 | ══════════════════════════════════════════════ */ |
| 30 | |
| 31 | :root { |
| 32 | /* Brand */ |
| 33 | --mojo: #6C3CE1; |
| 34 | --mojo-dark: #5228B5; |
| 35 | --mojo-light: #8B5CF6; |
| 36 | --mojo-subtle: rgba(108, 60, 225, 0.08); |
| 37 | --mojo-gradient: linear-gradient(135deg, #6C3CE1 0%, #22D3EE 100%); |
| 38 | |
| 39 | /* Light theme — IBM Carbon g10/g100 tokens */ |
| 40 | --bg: #FFFFFF; |
| 41 | --bg-alt: #F4F4F4; |
| 42 | --bg-card: #FFFFFF; |
| 43 | --bg-terminal: #1a1a2e; |
| 44 | --border: #E0E0E0; |
| 45 | --border-light: #EDEDED; |
| 46 | --border-strong: #C6C6C6; |
| 47 | |
| 48 | --text: #161616; |
| 49 | --text-secondary: #525252; |
| 50 | --text-tertiary: #8D8D8D; |
| 51 | --text-inverse: #FFFFFF; |
| 52 | |
| 53 | --layer-hover: rgba(0,0,0,0.04); |
| 54 | --layer-active: rgba(0,0,0,0.08); |
| 55 | --focus: #6C3CE1; |
| 56 | --focus-inverse: #FFFFFF; |
| 57 | |
| 58 | /* Feedback */ |
| 59 | --success: #198038; |
| 60 | --warning: #DA1E28; |
| 61 | |
| 62 | /* Typography */ |
| 63 | --font-body: 'Inter', 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; |
| 64 | --font-mono: 'JetBrains Mono', 'IBM Plex Mono', 'Fira Code', monospace; |
| 65 | |
| 66 | /* Spacing (8px grid) */ |
| 67 | --space-2: 2px; |
| 68 | --space-4: 4px; |
| 69 | --space-8: 8px; |
| 70 | --space-12: 12px; |
| 71 | --space-16: 16px; |
| 72 | --space-24: 24px; |
| 73 | --space-32: 32px; |
| 74 | --space-40: 40px; |
| 75 | --space-48: 48px; |
| 76 | --space-64: 64px; |
| 77 | --space-80: 80px; |
| 78 | --space-96: 96px; |
| 79 | --space-128: 128px; |
| 80 | |
| 81 | /* Layout */ |
| 82 | --max-width: 1248px; |
| 83 | --radius-sm: 4px; |
| 84 | --radius: 8px; |
| 85 | --radius-lg: 12px; |
| 86 | --shadow-sm: 0 1px 3px rgba(0,0,0,0.08); |
| 87 | --shadow: 0 4px 12px rgba(0,0,0,0.08); |
| 88 | --shadow-lg: 0 12px 40px rgba(0,0,0,0.1); |
| 89 | --transition: 0.2s cubic-bezier(0.2, 0, 0, 1); |
| 90 | --transition-slow: 0.4s cubic-bezier(0.2, 0, 0, 1); |
| 91 | } |
| 92 | |
| 93 | /* ── Dark theme — IBM Carbon g90/g100 tokens with progressive layering ── */ |
| 94 | [data-theme="dark"] { |
| 95 | --bg: #161616; |
| 96 | --bg-alt: #1C1C1C; |
| 97 | --bg-card: #262626; |
| 98 | --bg-terminal: #0D0D14; |
| 99 | --border: #393939; |
| 100 | --border-light: #333333; |
| 101 | --border-strong: #525252; |
| 102 | |
| 103 | --text: #F4F4F4; |
| 104 | --text-secondary: #C6C6C6; |
| 105 | --text-tertiary: #8D8D8D; |
| 106 | --text-inverse: #161616; |
| 107 | |
| 108 | --layer-hover: rgba(255,255,255,0.05); |
| 109 | --layer-active: rgba(255,255,255,0.1); |
| 110 | --mojo-subtle: rgba(139, 92, 246, 0.15); |
| 111 | --focus: #8B5CF6; |
| 112 | --focus-inverse: #161616; |
| 113 | |
| 114 | --success: #42BE65; |
| 115 | --warning: #FA4D56; |
| 116 | } |
| 117 | |
| 118 | /* ── System preference (no explicit toggle yet) ── */ |
| 119 | @media (prefers-color-scheme: dark) { |
| 120 | :root:not([data-theme="light"]) { |
| 121 | --bg: #161616; |
| 122 | --bg-alt: #1C1C1C; |
| 123 | --bg-card: #262626; |
| 124 | --bg-terminal: #0D0D14; |
| 125 | --border: #393939; |
| 126 | --border-light: #333333; |
| 127 | --border-strong: #525252; |
| 128 | --text: #F4F4F4; |
| 129 | --text-secondary: #C6C6C6; |
| 130 | --text-tertiary: #8D8D8D; |
| 131 | --text-inverse: #161616; |
| 132 | --layer-hover: rgba(255,255,255,0.05); |
| 133 | --layer-active: rgba(255,255,255,0.1); |
| 134 | --mojo-subtle: rgba(139, 92, 246, 0.15); |
| 135 | --focus: #8B5CF6; |
| 136 | --focus-inverse: #161616; |
| 137 | --success: #42BE65; |
| 138 | --warning: #FA4D56; |
| 139 | } |
| 140 | } |
| 141 | |
| 142 | /* ── Reset ── */ |
| 143 | *, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; } |
| 144 | html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; } |
| 145 | body { |
| 146 | font-family: var(--font-body); |
| 147 | background: var(--bg); |
| 148 | color: var(--text); |
| 149 | line-height: 1.5; |
| 150 | font-size: 16px; |
| 151 | transition: background var(--transition-slow), color var(--transition-slow); |
| 152 | } |
| 153 | img { max-width: 100%; display: block; } |
| 154 | a { color: var(--mojo); text-decoration: none; transition: color var(--transition); } |
| 155 | a:hover { color: var(--mojo-dark); } |
| 156 | ::selection { background: var(--mojo-subtle); } |
| 157 | |
| 158 | /* ── Skip to content (a11y) ── */ |
| 159 | .skip-link { |
| 160 | position: absolute; |
| 161 | top: -100%; |
| 162 | left: var(--space-16); |
| 163 | background: var(--mojo); |
| 164 | color: #fff; |
| 165 | padding: var(--space-8) var(--space-16); |
| 166 | border-radius: var(--radius-sm); |
| 167 | font-size: 0.875rem; |
| 168 | font-weight: 600; |
| 169 | z-index: 9999; |
| 170 | transition: top 0.2s; |
| 171 | } |
| 172 | .skip-link:focus { |
| 173 | top: var(--space-8); |
| 174 | color: #fff; |
| 175 | } |
| 176 | |
| 177 | /* ── Focus visible (IBM Carbon style) ── */ |
| 178 | :focus-visible { |
| 179 | outline: 2px solid var(--focus); |
| 180 | outline-offset: 2px; |
| 181 | } |
| 182 | [data-theme="dark"] :focus-visible { |
| 183 | outline-color: var(--focus); |
| 184 | } |
| 185 | |
| 186 | /* ── Typography ── */ |
| 187 | h1, h2, h3, h4 { font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; } |
| 188 | h1 { font-size: 3.5rem; font-weight: 700; letter-spacing: -0.02em; } |
| 189 | h2 { font-size: 2rem; margin-bottom: var(--space-8); } |
| 190 | h3 { font-size: 1.25rem; margin-bottom: var(--space-8); } |
| 191 | p { color: var(--text-secondary); line-height: 1.7; max-width: 640px; } |
| 192 | code { |
| 193 | font-family: var(--font-mono); |
| 194 | font-size: 0.85em; |
| 195 | background: var(--mojo-subtle); |
| 196 | padding: 2px 6px; |
| 197 | border-radius: var(--radius-sm); |
| 198 | color: var(--mojo-dark); |
| 199 | } |
| 200 | |
| 201 | /* ── Layout ── */ |
| 202 | .container { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-32); } |
| 203 | .section { padding: var(--space-96) 0; } |
| 204 | .section-sm { padding: var(--space-64) 0; } |
| 205 | .section-alt { background: var(--bg-alt); } |
| 206 | .section-label { |
| 207 | display: inline-block; |
| 208 | font-size: 0.75rem; |
| 209 | font-weight: 600; |
| 210 | text-transform: uppercase; |
| 211 | letter-spacing: 0.08em; |
| 212 | color: var(--mojo); |
| 213 | margin-bottom: var(--space-16); |
| 214 | } |
| 215 | .section-divider { |
| 216 | width: 100%; height: 1px; |
| 217 | background: var(--border-light); |
| 218 | margin: 0; |
| 219 | border: none; |
| 220 | } |
| 221 | |
| 222 | /* ── Scroll reveal ── */ |
| 223 | .reveal { |
| 224 | opacity: 0; |
| 225 | transform: translateY(24px); |
| 226 | transition: opacity 0.6s cubic-bezier(0.2, 0, 0, 1), transform 0.6s cubic-bezier(0.2, 0, 0, 1); |
| 227 | } |
| 228 | .reveal.visible { |
| 229 | opacity: 1; |
| 230 | transform: translateY(0); |
| 231 | } |
| 232 | |
| 233 | /* ── Navigation ── */ |
| 234 | nav { |
| 235 | position: fixed; top: 0; width: 100%; z-index: 100; |
| 236 | background: rgba(255,255,255,0.92); |
| 237 | backdrop-filter: blur(12px); |
| 238 | -webkit-backdrop-filter: blur(12px); |
| 239 | border-bottom: 1px solid var(--border-light); |
| 240 | transition: background var(--transition-slow), border-color var(--transition-slow); |
| 241 | } |
| 242 | [data-theme="dark"] nav, |
| 243 | :root:not([data-theme="light"]) nav { |
| 244 | background: rgba(22,22,22,0.92); |
| 245 | } |
| 246 | nav .container { |
| 247 | display: flex; align-items: center; justify-content: space-between; |
| 248 | height: 56px; |
| 249 | } |
| 250 | nav .logo { |
| 251 | font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em; |
| 252 | color: var(--text); |
| 253 | } |
| 254 | nav .logo span { color: var(--mojo); } |
| 255 | nav .nav-links { display: flex; align-items: center; gap: var(--space-32); } |
| 256 | nav .nav-links a { |
| 257 | font-size: 0.875rem; font-weight: 500; |
| 258 | color: var(--text-secondary); |
| 259 | transition: color var(--transition); |
| 260 | position: relative; |
| 261 | } |
| 262 | nav .nav-links a:hover, |
| 263 | nav .nav-links a.active { color: var(--text); } |
| 264 | nav .nav-links a.active::after { |
| 265 | content: ''; |
| 266 | position: absolute; |
| 267 | bottom: -4px; |
| 268 | left: 0; |
| 269 | right: 0; |
| 270 | height: 2px; |
| 271 | background: var(--mojo); |
| 272 | border-radius: 1px; |
| 273 | } |
| 274 | nav .version-badge { |
| 275 | font-size: 0.7rem; font-weight: 600; |
| 276 | color: var(--text-tertiary); |
| 277 | padding: 2px 8px; |
| 278 | border: 1px solid var(--border-light); |
| 279 | border-radius: 100px; |
| 280 | } |
| 281 | nav .btn-nav { |
| 282 | display: inline-flex; align-items: center; gap: var(--space-8); |
| 283 | padding: 6px 20px; border-radius: var(--radius); |
| 284 | background: var(--text); color: var(--text-inverse); |
| 285 | font-size: 0.875rem; font-weight: 500; |
| 286 | transition: all var(--transition); |
| 287 | } |
| 288 | nav .btn-nav:hover { opacity: 0.85; color: var(--text-inverse); text-decoration: none; } |
| 289 | |
| 290 | /* Theme toggle */ |
| 291 | .theme-toggle { |
| 292 | background: none; border: 1px solid var(--border); |
| 293 | border-radius: var(--radius); |
| 294 | width: 36px; height: 36px; |
| 295 | display: flex; align-items: center; justify-content: center; |
| 296 | cursor: pointer; |
| 297 | color: var(--text-secondary); |
| 298 | transition: all var(--transition); |
| 299 | padding: 0; |
| 300 | } |
| 301 | .theme-toggle:hover { |
| 302 | border-color: var(--mojo); |
| 303 | color: var(--mojo); |
| 304 | background: var(--mojo-subtle); |
| 305 | } |
| 306 | .theme-toggle svg { width: 18px; height: 18px; } |
| 307 | .theme-toggle .icon-moon { display: block; } |
| 308 | .theme-toggle .icon-sun { display: none; } |
| 309 | [data-theme="dark"] .theme-toggle .icon-moon { display: none; } |
| 310 | [data-theme="dark"] .theme-toggle .icon-sun { display: block; } |
| 311 | :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; } |
| 312 | :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; } |
| 313 | |
| 314 | /* Mobile hamburger */ |
| 315 | .nav-hamburger { |
| 316 | display: none; |
| 317 | background: none; border: none; |
| 318 | width: 36px; height: 36px; |
| 319 | align-items: center; justify-content: center; |
| 320 | cursor: pointer; |
| 321 | color: var(--text); |
| 322 | padding: 0; |
| 323 | } |
| 324 | .nav-hamburger svg { width: 24px; height: 24px; } |
| 325 | .nav-hamburger .hamburger-close { display: none; } |
| 326 | .nav-hamburger.open .hamburger-open { display: none; } |
| 327 | .nav-hamburger.open .hamburger-close { display: block; } |
| 328 | .mobile-overlay { |
| 329 | display: none; |
| 330 | position: fixed; |
| 331 | inset: 0; |
| 332 | background: rgba(0,0,0,0.4); |
| 333 | z-index: 99; |
| 334 | opacity: 0; |
| 335 | transition: opacity var(--transition); |
| 336 | } |
| 337 | .mobile-overlay.open { opacity: 1; } |
| 338 | .mobile-drawer { |
| 339 | position: fixed; |
| 340 | top: 56px; |
| 341 | right: 0; |
| 342 | width: 280px; |
| 343 | height: calc(100vh - 56px); |
| 344 | background: var(--bg); |
| 345 | border-left: 1px solid var(--border-light); |
| 346 | z-index: 101; |
| 347 | padding: var(--space-24); |
| 348 | transform: translateX(100%); |
| 349 | transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1); |
| 350 | overflow-y: auto; |
| 351 | } |
| 352 | .mobile-drawer.open { transform: translateX(0); } |
| 353 | .mobile-drawer a { |
| 354 | display: block; |
| 355 | padding: var(--space-12) 0; |
| 356 | font-size: 0.95rem; |
| 357 | font-weight: 500; |
| 358 | color: var(--text-secondary); |
| 359 | border-bottom: 1px solid var(--border-light); |
| 360 | } |
| 361 | .mobile-drawer a:hover { color: var(--text); } |
| 362 | .mobile-drawer .drawer-version { |
| 363 | font-size: 0.7rem; font-weight: 600; |
| 364 | color: var(--text-tertiary); |
| 365 | margin-top: var(--space-16); |
| 366 | } |
| 367 | |
| 368 | /* ── Hero — Split layout (60/40) ── */ |
| 369 | .hero { |
| 370 | padding: var(--space-128) 0 var(--space-80); |
| 371 | position: relative; |
| 372 | overflow: hidden; |
| 373 | } |
| 374 | .hero::before { |
| 375 | content: ''; |
| 376 | position: absolute; |
| 377 | top: -40%; |
| 378 | right: -20%; |
| 379 | width: 900px; height: 900px; |
| 380 | background: radial-gradient(circle, rgba(108,60,225,0.06) 0%, transparent 60%); |
| 381 | pointer-events: none; |
| 382 | } |
| 383 | [data-theme="dark"] .hero::before, |
| 384 | :root:not([data-theme="light"]) .hero::before { |
| 385 | background: radial-gradient(circle, rgba(139,92,246,0.1) 0%, transparent 60%); |
| 386 | } |
| 387 | .hero .hero-split { |
| 388 | display: grid; |
| 389 | grid-template-columns: 1.2fr 1fr; |
| 390 | gap: var(--space-64); |
| 391 | align-items: center; |
| 392 | } |
| 393 | .hero-badge { |
| 394 | display: inline-flex; align-items: center; gap: var(--space-8); |
| 395 | padding: 4px 14px; |
| 396 | border-radius: 100px; |
| 397 | font-size: 0.8rem; font-weight: 500; |
| 398 | background: var(--mojo-subtle); |
| 399 | color: var(--mojo-dark); |
| 400 | margin-bottom: var(--space-24); |
| 401 | } |
| 402 | [data-theme="dark"] .hero-badge, |
| 403 | :root:not([data-theme="light"]) .hero-badge { |
| 404 | color: var(--mojo-light); |
| 405 | } |
| 406 | .hero h1 { max-width: 700px; margin-bottom: var(--space-24); } |
| 407 | .hero h1 .gradient { |
| 408 | background: var(--mojo-gradient); |
| 409 | -webkit-background-clip: text; |
| 410 | -webkit-text-fill-color: transparent; |
| 411 | background-clip: text; |
| 412 | } |
| 413 | .hero .hero-text p { |
| 414 | font-size: 1.2rem; |
| 415 | color: var(--text-secondary); |
| 416 | max-width: 520px; |
| 417 | margin-bottom: var(--space-40); |
| 418 | } |
| 419 | .hero-btns { display: flex; gap: var(--space-16); flex-wrap: wrap; } |
| 420 | |
| 421 | /* Hero terminal visual */ |
| 422 | .hero-terminal { |
| 423 | background: var(--bg-terminal); |
| 424 | border-radius: var(--radius-lg); |
| 425 | border: 1px solid rgba(255,255,255,0.08); |
| 426 | box-shadow: var(--shadow-lg); |
| 427 | overflow: hidden; |
| 428 | font-family: var(--font-mono); |
| 429 | font-size: 0.78rem; |
| 430 | line-height: 1.8; |
| 431 | } |
| 432 | .hero-terminal .term-header { |
| 433 | display: flex; align-items: center; gap: var(--space-8); |
| 434 | padding: 12px 16px; |
| 435 | background: rgba(255,255,255,0.04); |
| 436 | border-bottom: 1px solid rgba(255,255,255,0.06); |
| 437 | } |
| 438 | .hero-terminal .term-dot { |
| 439 | width: 10px; height: 10px; border-radius: 50%; |
| 440 | } |
| 441 | .hero-terminal .term-dot:nth-child(1) { background: #ff5f57; } |
| 442 | .hero-terminal .term-dot:nth-child(2) { background: #febc2e; } |
| 443 | .hero-terminal .term-dot:nth-child(3) { background: #28c840; } |
| 444 | .hero-terminal .term-title { |
| 445 | color: rgba(255,255,255,0.3); |
| 446 | font-size: 0.72rem; |
| 447 | margin-left: var(--space-8); |
| 448 | } |
| 449 | .hero-terminal .term-body { |
| 450 | padding: 20px 24px; |
| 451 | color: #a0a0b8; |
| 452 | } |
| 453 | .hero-terminal .prompt { color: var(--mojo-light); } |
| 454 | .hero-terminal .cmd { color: #e0e0f0; } |
| 455 | .hero-terminal .result { color: #6fcf97; } |
| 456 | .hero-terminal .comment { color: #6f6f8f; font-style: italic; } |
| 457 | |
| 458 | /* Terminal typing animation */ |
| 459 | .term-line { |
| 460 | opacity: 0; |
| 461 | transform: translateY(4px); |
| 462 | } |
| 463 | .term-line.typed { |
| 464 | opacity: 1; |
| 465 | transform: translateY(0); |
| 466 | transition: opacity 0.15s ease, transform 0.15s ease; |
| 467 | } |
| 468 | |
| 469 | .btn { |
| 470 | display: inline-flex; align-items: center; gap: var(--space-8); |
| 471 | padding: 12px 28px; border-radius: var(--radius); |
| 472 | font-size: 0.95rem; font-weight: 500; |
| 473 | transition: all var(--transition); |
| 474 | cursor: pointer; border: none; |
| 475 | } |
| 476 | .btn-primary { |
| 477 | background: var(--text); color: var(--text-inverse); |
| 478 | } |
| 479 | .btn-primary:hover { |
| 480 | background: var(--mojo); transform: translateY(-1px); text-decoration: none; |
| 481 | } |
| 482 | .btn-secondary { |
| 483 | background: transparent; color: var(--text); |
| 484 | border: 1px solid var(--border); |
| 485 | } |
| 486 | .btn-secondary:hover { |
| 487 | border-color: var(--text); transform: translateY(-1px); text-decoration: none; |
| 488 | } |
| 489 | [data-theme="dark"] .btn-primary { |
| 490 | background: var(--mojo-light); |
| 491 | } |
| 492 | [data-theme="dark"] .btn-primary:hover { |
| 493 | background: var(--mojo); |
| 494 | } |
| 495 | :root:not([data-theme="light"]) .btn-primary { |
| 496 | background: var(--mojo-light); |
| 497 | } |
| 498 | :root:not([data-theme="light"]) .btn-primary:hover { |
| 499 | background: var(--mojo); |
| 500 | } |
| 501 | |
| 502 | /* ── Metrics Strip ── */ |
| 503 | .metrics-strip { |
| 504 | display: flex; gap: var(--space-64); flex-wrap: wrap; |
| 505 | padding: var(--space-48) 0; margin-top: var(--space-48); |
| 506 | border-top: 1px solid var(--border-light); |
| 507 | } |
| 508 | .metric-value { |
| 509 | font-size: 2rem; font-weight: 700; color: var(--text); |
| 510 | letter-spacing: -0.02em; |
| 511 | } |
| 512 | .metric-label { |
| 513 | font-size: 0.85rem; color: var(--text-tertiary); |
| 514 | margin-top: var(--space-4); |
| 515 | } |
| 516 | .metric-accent .metric-value { color: var(--mojo); } |
| 517 | |
| 518 | /* ── Feature Cards ── */ |
| 519 | .feature-grid { |
| 520 | display: grid; |
| 521 | grid-template-columns: repeat(3, 1fr); |
| 522 | gap: var(--space-24); |
| 523 | margin-top: var(--space-48); |
| 524 | } |
| 525 | .feature-card { |
| 526 | padding: var(--space-32); |
| 527 | border-radius: var(--radius-lg); |
| 528 | border: 1px solid var(--border-light); |
| 529 | background: var(--bg-card); |
| 530 | transition: all var(--transition); |
| 531 | } |
| 532 | .feature-card:hover { |
| 533 | border-color: var(--mojo); |
| 534 | box-shadow: var(--shadow); |
| 535 | background: var(--layer-hover); |
| 536 | } |
| 537 | .feature-card .icon { |
| 538 | width: 40px; height: 40px; |
| 539 | display: flex; align-items: center; justify-content: center; |
| 540 | border-radius: var(--radius); |
| 541 | background: var(--mojo-subtle); |
| 542 | font-size: 1.2rem; |
| 543 | margin-bottom: var(--space-16); |
| 544 | } |
| 545 | .feature-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: var(--space-8); } |
| 546 | .feature-card p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; } |
| 547 | .feature-card .tag { |
| 548 | display: inline-block; |
| 549 | padding: 2px 10px; border-radius: 100px; |
| 550 | font-size: 0.72rem; font-weight: 600; |
| 551 | margin-top: var(--space-12); |
| 552 | background: rgba(25,128,56,0.1); |
| 553 | color: var(--success); |
| 554 | } |
| 555 | |
| 556 | /* ── Release Notes / News ── */ |
| 557 | .release-grid { |
| 558 | display: grid; |
| 559 | grid-template-columns: repeat(4, 1fr); |
| 560 | gap: var(--space-24); |
| 561 | margin-top: var(--space-40); |
| 562 | } |
| 563 | .release-card { |
| 564 | padding: var(--space-24) var(--space-24) var(--space-32); |
| 565 | border-radius: var(--radius-lg); |
| 566 | border: 1px solid var(--border-light); |
| 567 | background: var(--bg-card); |
| 568 | transition: border-color var(--transition), box-shadow var(--transition); |
| 569 | } |
| 570 | .release-card:hover { |
| 571 | border-color: var(--mojo); |
| 572 | box-shadow: var(--shadow); |
| 573 | } |
| 574 | .release-card .release-tag { |
| 575 | display: inline-block; |
| 576 | padding: 2px 10px; border-radius: 100px; |
| 577 | font-size: 0.7rem; font-weight: 600; |
| 578 | text-transform: uppercase; |
| 579 | letter-spacing: 0.05em; |
| 580 | margin-bottom: var(--space-12); |
| 581 | } |
| 582 | .release-tag-new { background: rgba(108,60,225,0.1); color: var(--mojo-dark); } |
| 583 | [data-theme="dark"] .release-tag-new, |
| 584 | :root:not([data-theme="light"]) .release-tag-new { color: var(--mojo-light); } |
| 585 | .release-tag-perf { background: rgba(25,128,56,0.1); color: var(--success); } |
| 586 | .release-tag-infra { background: rgba(0,120,200,0.1); color: #0066CC; } |
| 587 | [data-theme="dark"] .release-tag-infra, |
| 588 | :root:not([data-theme="light"]) .release-tag-infra { color: #5AA8FF; } |
| 589 | .release-card h3 { |
| 590 | font-size: 1rem; margin-bottom: var(--space-8); |
| 591 | } |
| 592 | .release-card p { |
| 593 | font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; |
| 594 | } |
| 595 | .release-card .release-stat { |
| 596 | font-size: 1.5rem; font-weight: 700; |
| 597 | color: var(--text); |
| 598 | margin-top: var(--space-12); |
| 599 | } |
| 600 | .release-card .release-stat-label { |
| 601 | font-size: 0.75rem; color: var(--text-tertiary); |
| 602 | } |
| 603 | |
| 604 | /* ── Table ── */ |
| 605 | .table-wrap { |
| 606 | overflow-x: auto; |
| 607 | border: 1px solid var(--border-light); |
| 608 | border-radius: var(--radius-lg); |
| 609 | margin-top: var(--space-32); |
| 610 | } |
| 611 | table { |
| 612 | width: 100%; border-collapse: collapse; |
| 613 | font-size: 0.88rem; |
| 614 | } |
| 615 | thead { background: var(--bg-alt); } |
| 616 | th { |
| 617 | padding: 14px 20px; text-align: left; |
| 618 | font-size: 0.72rem; font-weight: 600; text-transform: uppercase; |
| 619 | letter-spacing: 0.05em; color: var(--text-tertiary); |
| 620 | border-bottom: 1px solid var(--border-light); |
| 621 | } |
| 622 | td { |
| 623 | padding: 14px 20px; |
| 624 | border-bottom: 1px solid var(--border-light); |
| 625 | color: var(--text-secondary); |
| 626 | } |
| 627 | tr:last-child td { border-bottom: none; } |
| 628 | tr:hover td { background: var(--mojo-subtle); } |
| 629 | td strong { color: var(--text); } |
| 630 | td .badge { |
| 631 | display: inline-block; |
| 632 | padding: 1px 8px; border-radius: 3px; |
| 633 | font-size: 0.75rem; font-weight: 600; |
| 634 | } |
| 635 | .badge-green { background: rgba(25,128,56,0.1); color: var(--success); } |
| 636 | .badge-orange { background: rgba(255,107,0,0.1); color: var(--warning); } |
| 637 | .badge-gold { background: rgba(255,215,0,0.12); color: #B8860B; } |
| 638 | [data-theme="dark"] .badge-gold, |
| 639 | :root:not([data-theme="light"]) .badge-gold { color: #FFD700; } |
| 640 | |
| 641 | /* ── CLI Code Block ── */ |
| 642 | .cli-box { |
| 643 | background: var(--text); color: #E0E0E0; |
| 644 | border-radius: var(--radius-lg); |
| 645 | padding: var(--space-24); |
| 646 | font-family: var(--font-mono); |
| 647 | font-size: 0.82rem; |
| 648 | line-height: 2; |
| 649 | overflow-x: auto; |
| 650 | } |
| 651 | [data-theme="dark"] .cli-box, |
| 652 | :root:not([data-theme="light"]) .cli-box { |
| 653 | background: #0D0D14; |
| 654 | } |
| 655 | .cli-box .comment { color: #6F6F6F; font-style: italic; } |
| 656 | .cli-box .prompt { color: var(--mojo-light); } |
| 657 | .cli-box .cmd { color: #E0E0E0; } |
| 658 | |
| 659 | /* ── Steps ── */ |
| 660 | .steps { |
| 661 | display: grid; |
| 662 | grid-template-columns: repeat(3, 1fr); |
| 663 | gap: var(--space-32); |
| 664 | margin-top: var(--space-48); |
| 665 | } |
| 666 | .step { |
| 667 | padding: var(--space-32); |
| 668 | border-radius: var(--radius-lg); |
| 669 | background: var(--bg-card); |
| 670 | border: 1px solid var(--border-light); |
| 671 | transition: border-color var(--transition), box-shadow var(--transition); |
| 672 | } |
| 673 | .step:hover { |
| 674 | border-color: var(--mojo); |
| 675 | box-shadow: var(--shadow); |
| 676 | } |
| 677 | .step-number { |
| 678 | font-size: 0.75rem; font-weight: 700; color: var(--mojo); |
| 679 | text-transform: uppercase; letter-spacing: 0.05em; |
| 680 | margin-bottom: var(--space-12); |
| 681 | } |
| 682 | .step h3 { font-size: 1.1rem; } |
| 683 | |
| 684 | /* ── Timeline Roadmap ── */ |
| 685 | .roadmap-timeline { |
| 686 | font-family: var(--font-body); font-size: 13px; color: var(--text-secondary); |
| 687 | width: 100%; margin: 32px 0; position: relative; |
| 688 | } |
| 689 | .roadmap-timeline .periods-container, |
| 690 | .roadmap-timeline .cards-container { |
| 691 | overflow: hidden; box-sizing: border-box; position: relative; |
| 692 | min-height: 80px; transition: height .4s ease-in-out; |
| 693 | } |
| 694 | .roadmap-timeline .periods-container { margin-bottom: 0; } |
| 695 | .roadmap-timeline .periods-container section, |
| 696 | .roadmap-timeline .cards-container section { |
| 697 | width: 70%; position: absolute; margin-left: 15%; |
| 698 | box-sizing: border-box; transition: transform .35s ease, opacity .25s ease; |
| 699 | opacity: 0; border-radius: var(--radius-lg); |
| 700 | } |
| 701 | .roadmap-timeline .periods-container section { |
| 702 | border-bottom: 4px solid var(--border-light); |
| 703 | padding: 8px 1.5em 1.2em; background: var(--bg); bottom: 0; |
| 704 | } |
| 705 | .roadmap-timeline .periods-container section.active { |
| 706 | height: auto; opacity: 1; transform: translateX(0); z-index: 5; |
| 707 | } |
| 708 | .roadmap-timeline .periods-container section.active .title, |
| 709 | .roadmap-timeline .periods-container section.active p { display: block; } |
| 710 | .roadmap-timeline .periods-container section.prev { |
| 711 | height: auto; opacity: 0.3; transform: translateX(-100%); z-index: 0; |
| 712 | } |
| 713 | .roadmap-timeline .periods-container section.next { |
| 714 | height: auto; opacity: 0.3; transform: translateX(100%); z-index: 0; |
| 715 | } |
| 716 | .roadmap-timeline .periods-container section .year { |
| 717 | font-size: 0.75rem; font-weight: 600; text-transform: uppercase; |
| 718 | letter-spacing: 0.06em; margin-bottom: 2px; |
| 719 | } |
| 720 | .roadmap-timeline .periods-container section .title { |
| 721 | font-size: 1.2rem; font-weight: 600; color: var(--text); |
| 722 | margin-bottom: 4px; display: none; |
| 723 | } |
| 724 | .roadmap-timeline .periods-container section p { |
| 725 | font-size: 0.85rem; line-height: 1.5; display: none; margin: 0; |
| 726 | color: var(--text-secondary); |
| 727 | } |
| 728 | .roadmap-timeline .periods-container .btn-back, |
| 729 | .roadmap-timeline .periods-container .btn-next, |
| 730 | .roadmap-timeline .timeline-container .btn-back, |
| 731 | .roadmap-timeline .timeline-container .btn-next { |
| 732 | display: inline-block; width: 15%; height: 100%; position: absolute; |
| 733 | cursor: pointer; z-index: 10; transition: 0.3s ease; top: 0; |
| 734 | background: none; border: none; padding: 0; |
| 735 | } |
| 736 | .roadmap-timeline .periods-container .btn-back:hover, |
| 737 | .roadmap-timeline .timeline-container .btn-back:hover { background: linear-gradient(to right, rgba(0,0,0,0.02), transparent); } |
| 738 | .roadmap-timeline .periods-container .btn-next:hover, |
| 739 | .roadmap-timeline .timeline-container .btn-next:hover { background: linear-gradient(to left, rgba(0,0,0,0.02), transparent); } |
| 740 | .roadmap-timeline .periods-container .btn-back.hide, |
| 741 | .roadmap-timeline .periods-container .btn-next.hide, |
| 742 | .roadmap-timeline .timeline-container .btn-back.hide, |
| 743 | .roadmap-timeline .timeline-container .btn-next.hide { display: none; } |
| 744 | .roadmap-timeline .periods-container .btn-back { left: 0; } |
| 745 | .roadmap-timeline .periods-container .btn-next { right: 0; } |
| 746 | |
| 747 | /* Timeline bar */ |
| 748 | .roadmap-timeline .timeline-container { |
| 749 | position: relative; width: 100%; height: 50px; overflow: hidden; margin: 4px 0; |
| 750 | } |
| 751 | .roadmap-timeline .timeline-container .timeline { |
| 752 | position: absolute; display: block; height: 50px; |
| 753 | transition: left .3s ease-in-out; left: 0; |
| 754 | } |
| 755 | .roadmap-timeline .timeline-container .timeline ol { |
| 756 | display: block; width: 100%; height: 2px; |
| 757 | background: var(--border-light); list-style: none; margin: 0; |
| 758 | padding: 24px 210px 24px 210px; |
| 759 | } |
| 760 | .roadmap-timeline .timeline-container .timeline ol li { |
| 761 | display: inline-block; width: 14px; height: 14px; |
| 762 | margin-top: -6px; margin-left: 60px; |
| 763 | border-radius: 50%; border: 3px solid var(--text-tertiary); |
| 764 | background: var(--bg); position: relative; cursor: pointer; |
| 765 | box-shadow: 0 2px 6px rgba(0,0,0,.12); transition: all .2s; |
| 766 | vertical-align: middle; |
| 767 | } |
| 768 | .roadmap-timeline .timeline-container .timeline ol li:hover { transform: scale(1.2); } |
| 769 | .roadmap-timeline .timeline-container .timeline ol li.active { |
| 770 | box-shadow: 0 0 0 3px rgba(108,60,225,0.2); |
| 771 | } |
| 772 | .roadmap-timeline .timeline-container .timeline ol li.active::before, |
| 773 | .roadmap-timeline .timeline-container .timeline ol li.active::after { |
| 774 | content: ""; display: block; height: 20px; width: 2px; |
| 775 | position: absolute; left: 6px; |
| 776 | } |
| 777 | .roadmap-timeline .timeline-container .timeline ol li.active::before { top: -22px; } |
| 778 | .roadmap-timeline .timeline-container .timeline ol li.active::after { bottom: -22px; } |
| 779 | .roadmap-timeline .timeline-container .btn-back { left: 0.5em; } |
| 780 | .roadmap-timeline .timeline-container .btn-next { right: 0.5em; } |
| 781 | |
| 782 | /* Cards */ |
| 783 | .roadmap-timeline .cards-container { min-height: 120px; } |
| 784 | .roadmap-timeline .cards-container section { |
| 785 | padding: 1.5em; border: 1px solid var(--border-light); |
| 786 | border-radius: var(--radius-lg); background: var(--bg-card); |
| 787 | box-shadow: 0 4px 16px rgba(0,0,0,.06); |
| 788 | } |
| 789 | .roadmap-timeline .cards-container section.active { |
| 790 | height: auto; opacity: 1; transform: translateX(0); z-index: 5; |
| 791 | } |
| 792 | .roadmap-timeline .cards-container section.prev { |
| 793 | height: auto; opacity: 0.3; transform: translateX(-105%); z-index: 0; |
| 794 | } |
| 795 | .roadmap-timeline .cards-container section.next { |
| 796 | height: auto; opacity: 0.3; transform: translateX(105%); z-index: 0; |
| 797 | } |
| 798 | .roadmap-timeline .cards-container section .year { |
| 799 | text-align: center; font-size: 0.7rem; font-weight: 600; |
| 800 | text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 4px; |
| 801 | } |
| 802 | .roadmap-timeline .cards-container section .title { |
| 803 | font-size: 1rem; font-weight: 600; color: var(--text); |
| 804 | margin-bottom: 8px; text-align: center; |
| 805 | } |
| 806 | .roadmap-timeline .cards-container section .subtitle { |
| 807 | font-size: 0.82rem; color: var(--text-secondary); |
| 808 | margin-bottom: 12px; text-align: center; |
| 809 | } |
| 810 | .roadmap-timeline .cards-container section .content { font-size: 0.85rem; color: var(--text-secondary); } |
| 811 | .roadmap-timeline .cards-container section .items { |
| 812 | display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; |
| 813 | list-style: none; padding: 0; margin: 0; |
| 814 | } |
| 815 | .roadmap-timeline .cards-container section .items li { |
| 816 | padding: 3px 0; font-size: 0.82rem; position: relative; padding-left: 14px; |
| 817 | } |
| 818 | .roadmap-timeline .cards-container section .items li::before { |
| 819 | content: ''; position: absolute; left: 0; top: 8px; |
| 820 | width: 6px; height: 6px; border-radius: 50%; |
| 821 | background: var(--dot-color, var(--mojo)); |
| 822 | } |
| 823 | .roadmap-timeline .cards-container section .tag { |
| 824 | display: inline-block; font-size: 0.65rem; font-weight: 600; |
| 825 | padding: 2px 10px; border-radius: 100px; text-transform: uppercase; |
| 826 | letter-spacing: 0.04em; margin-bottom: 8px; |
| 827 | } |
| 828 | .tag-now { background: rgba(25,128,56,0.1); color: var(--success); } |
| 829 | .tag-next { background: var(--mojo-subtle); color: var(--mojo-dark); } |
| 830 | [data-theme="dark"] .tag-next, |
| 831 | :root:not([data-theme="light"]) .tag-next { color: var(--mojo-light); } |
| 832 | .tag-future { background: rgba(212,90,0,0.08); color: #D45A00; } |
| 833 | |
| 834 | /* Timeline nav arrows */ |
| 835 | .roadmap-timeline .tl-arrow { |
| 836 | display: inline-block; width: 30px; height: 30px; position: absolute; |
| 837 | top: 50%; transform: translateY(-50%); cursor: pointer; z-index: 11; |
| 838 | transition: all .2s; border-radius: 50%; |
| 839 | display: flex; align-items: center; justify-content: center; |
| 840 | } |
| 841 | .roadmap-timeline .tl-arrow:hover { background: var(--bg-alt); } |
| 842 | .roadmap-timeline .tl-arrow svg { fill: var(--text-tertiary); } |
| 843 | .roadmap-timeline .tl-arrow.hide { display: none; } |
| 844 | |
| 845 | /* Responsive */ |
| 846 | @media (max-width: 768px) { |
| 847 | .roadmap-timeline .periods-container section, |
| 848 | .roadmap-timeline .cards-container section { width: 86%; margin-left: 7%; } |
| 849 | .roadmap-timeline .timeline-container .timeline ol { padding: 24px 60px; } |
| 850 | .roadmap-timeline .cards-container section .items { grid-template-columns: 1fr; } |
| 851 | } |
| 852 | |
| 853 | /* ── CTA Banner ── */ |
| 854 | .cta-banner { |
| 855 | background: linear-gradient(135deg, #1a1a2e 0%, #2d1b69 100%); |
| 856 | padding: var(--space-64) 0; |
| 857 | text-align: center; |
| 858 | } |
| 859 | .cta-banner h2 { |
| 860 | color: #F4F4F4; |
| 861 | margin-bottom: var(--space-12); |
| 862 | } |
| 863 | .cta-banner p { |
| 864 | color: rgba(255,255,255,0.6); |
| 865 | margin: 0 auto var(--space-32); |
| 866 | max-width: 480px; |
| 867 | } |
| 868 | .cta-banner .btn-primary { |
| 869 | background: var(--mojo-light); |
| 870 | color: #fff; |
| 871 | } |
| 872 | .cta-banner .btn-primary:hover { |
| 873 | background: var(--mojo); |
| 874 | transform: translateY(-1px); |
| 875 | } |
| 876 | .cta-banner .btn-secondary { |
| 877 | color: #F4F4F4; |
| 878 | border-color: rgba(255,255,255,0.2); |
| 879 | } |
| 880 | .cta-banner .btn-secondary:hover { |
| 881 | border-color: #F4F4F4; |
| 882 | } |
| 883 | |
| 884 | /* ── Footer ── */ |
| 885 | footer { |
| 886 | padding: var(--space-64) 0 var(--space-32); |
| 887 | border-top: 1px solid var(--border-light); |
| 888 | } |
| 889 | footer .grid { |
| 890 | display: grid; |
| 891 | grid-template-columns: 2fr 1fr 1fr 1fr; |
| 892 | gap: var(--space-40); |
| 893 | margin-bottom: var(--space-48); |
| 894 | } |
| 895 | footer h4 { |
| 896 | font-size: 0.72rem; font-weight: 600; text-transform: uppercase; |
| 897 | letter-spacing: 0.05em; color: var(--text-tertiary); |
| 898 | margin-bottom: var(--space-16); |
| 899 | } |
| 900 | footer a { |
| 901 | display: block; color: var(--text-secondary); |
| 902 | font-size: 0.88rem; margin-bottom: var(--space-8); |
| 903 | } |
| 904 | footer a:hover { color: var(--text); } |
| 905 | footer .copyright { |
| 906 | text-align: center; |
| 907 | padding-top: var(--space-24); |
| 908 | border-top: 1px solid var(--border-light); |
| 909 | font-size: 0.8rem; color: var(--text-tertiary); |
| 910 | } |
| 911 | |
| 912 | /* ── Back-to-top ── */ |
| 913 | .back-to-top { |
| 914 | position: fixed; |
| 915 | bottom: var(--space-24); |
| 916 | right: var(--space-24); |
| 917 | width: 40px; height: 40px; |
| 918 | background: var(--bg-card); |
| 919 | border: 1px solid var(--border); |
| 920 | border-radius: 50%; |
| 921 | display: flex; align-items: center; justify-content: center; |
| 922 | cursor: pointer; |
| 923 | opacity: 0; |
| 924 | transform: translateY(10px); |
| 925 | transition: opacity var(--transition), transform var(--transition), background var(--transition); |
| 926 | z-index: 50; |
| 927 | color: var(--text-secondary); |
| 928 | box-shadow: var(--shadow); |
| 929 | } |
| 930 | .back-to-top.visible { |
| 931 | opacity: 1; |
| 932 | transform: translateY(0); |
| 933 | } |
| 934 | .back-to-top:hover { |
| 935 | background: var(--mojo); |
| 936 | color: #fff; |
| 937 | border-color: var(--mojo); |
| 938 | } |
| 939 | |
| 940 | /* ── Responsive ── */ |
| 941 | @media (max-width: 1100px) { |
| 942 | .hero .hero-split { grid-template-columns: 1fr; } |
| 943 | .hero-terminal { max-width: 500px; } |
| 944 | } |
| 945 | @media (max-width: 1024px) { |
| 946 | .feature-grid { grid-template-columns: repeat(2, 1fr); } |
| 947 | .steps { grid-template-columns: repeat(2, 1fr); } |
| 948 | .release-grid { grid-template-columns: repeat(2, 1fr); } |
| 949 | } |
| 950 | @media (max-width: 768px) { |
| 951 | h1 { font-size: 2.2rem; } |
| 952 | h2 { font-size: 1.5rem; } |
| 953 | .hero { padding: var(--space-96) 0 var(--space-48); } |
| 954 | .section { padding: var(--space-48) 0; } |
| 955 | .section-sm { padding: var(--space-32) 0; } |
| 956 | .feature-grid { grid-template-columns: 1fr; } |
| 957 | .steps { grid-template-columns: 1fr; } |
| 958 | .release-grid { grid-template-columns: 1fr; } |
| 959 | .metrics-strip { gap: var(--space-32); } |
| 960 | footer .grid { grid-template-columns: 1fr 1fr; } |
| 961 | .hero-terminal { display: none; } |
| 962 | .roadmap-timeline .cards-container section .items { grid-template-columns: 1fr; } |
| 963 | .nav-hamburger { display: flex; } |
| 964 | nav .nav-links { display: none; } |
| 965 | } |
| 966 | @media (max-width: 480px) { |
| 967 | .container { padding: 0 var(--space-16); } |
| 968 | footer .grid { grid-template-columns: 1fr; } |
| 969 | } |
| 970 | </style> |
| 971 | </head> |
| 972 | <body> |
| 973 | |
| 974 | <a href="#main-content" class="skip-link">Skip to content</a> |
| 975 | |
| 976 | <nav> |
| 977 | <div class="container"> |
| 978 | <a href="#" class="logo">Mojo<span>Llama</span></a> |
| 979 | <div class="nav-links"> |
| 980 | <span class="version-badge">v0.5.0</span> |
| 981 | <a href="#features">Features</a> |
| 982 | <a href="#models">Models</a> |
| 983 | <a href="#benchmarks">Benchmarks</a> |
| 984 | <a href="#quickstart">Quick start</a> |
| 985 | <a href="docs/">Docs</a> |
| 986 | <a href="studio.html">Chat</a> |
| 987 | <button class="theme-toggle" aria-label="Toggle dark mode" id="themeToggle"> |
| 988 | <svg class="icon-moon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/></svg> |
| 989 | <svg class="icon-sun" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="5"/><line x1="12" y1="1" x2="12" y2="3"/><line x1="12" y1="21" x2="12" y2="23"/><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/><line x1="1" y1="12" x2="3" y2="12"/><line x1="21" y1="12" x2="23" y2="12"/><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"/></svg> |
| 990 | </button> |
| 991 | <a href="https://github.com/a730/MojoLlama" class="btn-nav">GitHub →</a> |
| 992 | </div> |
| 993 | <button class="nav-hamburger" id="hamburgerBtn" aria-label="Open menu"> |
| 994 | <svg class="hamburger-open" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="3" y1="12" x2="21" y2="12"/><line x1="3" y1="6" x2="21" y2="6"/><line x1="3" y1="18" x2="21" y2="18"/></svg> |
| 995 | <svg class="hamburger-close" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg> |
| 996 | </button> |
| 997 | </div> |
| 998 | </nav> |
| 999 | |
| 1000 | <div class="mobile-overlay" id="mobileOverlay"></div> |
| 1001 | <div class="mobile-drawer" id="mobileDrawer"> |
| 1002 | <span class="drawer-version">v0.5.0</span> |
| 1003 | <a href="#features">Features</a> |
| 1004 | <a href="#models">Models</a> |
| 1005 | <a href="#benchmarks">Benchmarks</a> |
| 1006 | <a href="#quickstart">Quick start</a> |
| 1007 | <a href="docs/">Docs</a> |
| 1008 | <a href="studio.html">Chat</a> |
| 1009 | <a href="studio.html">Studio</a> |
| 1010 | <a href="https://github.com/a730/MojoLlama">GitHub</a> |
| 1011 | </div> |
| 1012 | |
| 1013 | <!-- ════ HERO — Split layout ════ --> |
| 1014 | <div class="hero" id="main-content"> |
| 1015 | <div class="container"> |
| 1016 | <div class="hero-split"> |
| 1017 | <div class="hero-text reveal"> |
| 1018 | <div class="hero-badge">v0.5.0 — Open source</div> |
| 1019 | <h1>CPU-first LLM inference,<br><span class="gradient">engineered for performance</span></h1> |
| 1020 | <p>MojoLlama is a high-throughput inference engine for CPU, built on <a href="https://www.modular.com/max" style="color:inherit;text-decoration:underline;text-decoration-color:var(--mojo-subtle);text-underline-offset:3px;">Modular MAX</a>. GGUF native, MoE-optimized, with support for 50+ architectures — from Llama to Gemma 4 to hybrid SSM models. GPU acceleration via MAX engine for supported models.</p> |
| 1021 | <div class="hero-btns"> |
| 1022 | <a href="https://github.com/a730/MojoLlama" class="btn btn-primary">Get started →</a> |
| 1023 | <a href="studio.html" class="btn btn-secondary">Try chat</a> |
| 1024 | </div> |
| 1025 | </div> |
| 1026 | <div class="hero-terminal reveal" id="heroTerminal"> |
| 1027 | <div class="term-header"> |
| 1028 | <span class="term-dot"></span> |
| 1029 | <span class="term-dot"></span> |
| 1030 | <span class="term-dot"></span> |
| 1031 | <span class="term-title">mojollama — benchmark</span> |
| 1032 | </div> |
| 1033 | <div class="term-body"> |
| 1034 | <div class="term-line" data-delay="0"><span class="comment"># ZAYA1-8B Q8_0 — Pure Mojo engine 🦙</span></div> |
| 1035 | <div class="term-line" data-delay="200"><span class="prompt">$</span> <span class="cmd">./zaya_gen_q8 32</span></div> |
| 1036 | <div class="term-line" data-delay="600"><br></div> |
| 1037 | <div class="term-line" data-delay="700"><span class="result">✓ Model loaded (4.3s)</span></div> |
| 1038 | <div class="term-line" data-delay="900"><span class="comment"> architecture: zaya (80 layers, 16 experts, top-1)</span></div> |
| 1039 | <div class="term-line" data-delay="1050"><span class="comment"> quantization: Q8_0</span></div> |
| 1040 | <div class="term-line" data-delay="1200"><span class="comment"> parameters: 8.4B total / 760M active</span></div> |
| 1041 | <div class="term-line" data-delay="1400"><br></div> |
| 1042 | <div class="term-line" data-delay="1500"><span class="result">✓ Generating 128 tokens...</span></div> |
| 1043 | <div class="term-line" data-delay="1800"><span class="comment"> zero C code — all Mojo SIMD + parallelize</span></div> |
| 1044 | <div class="term-line" data-delay="2100"><span class="comment"> no Python bridge — pure Mojo compute kernels</span></div> |
| 1045 | <div class="term-line" data-delay="2400"><br></div> |
| 1046 | <div class="term-line" data-delay="2600"><span style="color:#ffffff;">📊 Results</span></div> |
| 1047 | <div class="term-line" data-delay="2800"><span class="result"> throughput: 28.6 tok/s</span></div> |
| 1048 | <div class="term-line" data-delay="3000"><span class="result"> output: real English text (verified)</span></div> |
| 1049 | </div> |
| 1050 | </div> |
| 1051 | </div> |
| 1052 | <div class="metrics-strip reveal"> |
| 1053 | <div class="metric metric-accent"><div class="metric-value" data-count="28.6">0</div><div class="metric-label">Peak tok/s (pure Mojo)</div></div> |
| 1054 | <div class="metric metric-accent"><div class="metric-value" data-count="0.94">0</div><div class="metric-label">vs llama.cpp</div></div> |
| 1055 | <div class="metric"><div class="metric-value" data-count="50" data-suffix="+">0</div><div class="metric-label">Architectures</div></div> |
| 1056 | <div class="metric"><div class="metric-value" data-count="47">0</div><div class="metric-label">Concurrent tok/s</div></div> |
| 1057 | <div class="metric"><div class="metric-value" data-text="Apache 2.0">0</div><div class="metric-label">License</div></div> |
| 1058 | </div> |
| 1059 | </div> |
| 1060 | </div> |
| 1061 | |
| 1062 | <!-- ════ LATEST RELEASES ════ --> |
| 1063 | <div class="section section-alt"> |
| 1064 | <div class="container"> |
| 1065 | <div class="section-label reveal">What's new</div> |
| 1066 | <h2 class="reveal">Latest releases</h2> |
| 1067 | <p class="reveal">New architecture support, performance breakthroughs, and infrastructure improvements shipped in recent releases.</p> |
| 1068 | <div class="release-grid"> |
| 1069 | <div class="release-card reveal"> |
| 1070 | <span class="release-tag release-tag-new">Gemma 4</span> |
| 1071 | <h3>Gemma 4 E2B engine</h3> |
| 1072 | <p>Per-layer projections, GeGLU activation, sliding window attention (SWA=512), logit softcapping at 30.0, shared KV layers, and post-attention/FFW norms.</p> |
| 1073 | <div class="release-stat">18.8<span class="release-stat-label"> tok/s</span></div> |
| 1074 | </div> |
| 1075 | <div class="release-card reveal"> |
| 1076 | <span class="release-tag release-tag-new">Pure Mojo</span> |
| 1077 | <h3>ZAYA1-8B — pure Mojo engine</h3> |
| 1078 | <p>80 layers (40 attn + 40 MoE, 16 experts top-1) running entirely in Mojo. Zero C code, zero Python bridge. Q8_0 quantized matmul via SIMD+parallelize. Full architecture with GQA, RoPE, RMS norm, residual scales, and 262K vocab decode.</p> |
| 1079 | <div class="release-stat">28.6<span class="release-stat-label"> tok/s (pure Mojo)</span></div> |
| 1080 | </div> |
| 1081 | <div class="release-card reveal"> |
| 1082 | <span class="release-tag release-tag-perf">0.94×</span> |
| 1083 | <h3>GPT-OSS on par with llama.cpp</h3> |
| 1084 | <p>After MXFP4 expert matmul fix and Q5_0 attention kernel, GPT-OSS-20B reaches 25.5 tok/s — on par with llama.cpp's 27.2 tok/s on the same hardware. The benchmark table at line 1210 shows the corrected numbers.</p> |
| 1085 | </div> |
| 1086 | <div class="release-card reveal"> |
| 1087 | <span class="release-tag release-tag-perf">1.57×</span> |
| 1088 | <h3>Qwen3.6 hybrid SSM</h3> |
| 1089 | <p>Hybrid SSM+Attention layers with MXFP4 quantization. Concurrent serving at 47 tok/s aggregate across 10 workers, 92% of 200% scaling target.</p> |
| 1090 | </div> |
| 1091 | <div class="release-card reveal"> |
| 1092 | <span class="release-tag release-tag-perf">OMO</span> |
| 1093 | <h3>TinyLlama pure Mojo</h3> |
| 1094 | <p>Full TinyLlama-1.1B inference in pure Mojo — 27.2 tok/s f16, 88.1 tok/s Q8_0 B=4. Batched matmul with SIMD FMA, GQA attention, RoPE, RMS norm, and vocab decode. Zero C code.</p> |
| 1095 | <div class="release-stat">88.1<span class="release-stat-label"> tok/s (B=4 Q8_0)</span></div> |
| 1096 | </div> |
| 1097 | <div class="release-card reveal"> |
| 1098 | <span class="release-tag release-tag-infra">Docker</span> |
| 1099 | <h3>Production Docker image</h3> |
| 1100 | <p>Multi-stage build on GHCR with hardware auto-tune, HF model download, and docker-compose profiles for API server, chat, bench, and fallback.</p> |
| 1101 | </div> |
| 1102 | <div class="release-card reveal"> |
| 1103 | <span class="release-tag release-tag-infra">Pages</span> |
| 1104 | <h3>GitHub Pages site</h3> |
| 1105 | <p>Interactive chat UI, benchmark tables, architecture support matrix, and getting-started guide deployed to GitHub Pages on every push.</p> |
| 1106 | </div> |
| 1107 | <div class="release-card reveal"> |
| 1108 | <span class="release-tag release-tag-infra">MAX</span> |
| 1109 | <h3>MAX GPU acceleration</h3> |
| 1110 | <p>GPU inference via Modular MAX engine — CUDA, ROCm, and Metal backends. Offload compute to GPU while keeping MojoLlama's CPU-optimized pipeline for unsupported layers.</p> |
| 1111 | </div> |
| 1112 | <div class="release-card reveal"> |
| 1113 | <span class="release-tag release-tag-new">Studio</span> |
| 1114 | <h3>MojoLlama Studio dashboard</h3> |
| 1115 | <p>Full-featured dashboard with chat, training, benchmarking, auto-tune, quantization, dataset tools, and HuggingFace Hub integration.</p> |
| 1116 | </div> |
| 1117 | </div> |
| 1118 | </div> |
| 1119 | </div> |
| 1120 | |
| 1121 | <!-- ════ FEATURES ════ --> |
| 1122 | <div class="section" id="features"> |
| 1123 | <div class="container"> |
| 1124 | <div class="section-label reveal">Features</div> |
| 1125 | <h2 class="reveal">Built for local LLM workloads</h2> |
| 1126 | <p class="reveal" style="margin-bottom:0;">From single-token inference to production concurrent serving — MojoLlama scales to your hardware.</p> |
| 1127 | <div class="feature-grid"> |
| 1128 | <div class="feature-card reveal"> |
| 1129 | <div class="icon">⚡</div> |
| 1130 | <h3>MoE-optimized engine</h3> |
| 1131 | <p>C-accelerated fused MoE forward kernel with expert dispatch for GPT-OSS, Qwen3, and Qwen3.6 MoE models.</p> |
| 1132 | <span class="tag">MoE optimized</span> |
| 1133 | </div> |
| 1134 | <div class="feature-card reveal"> |
| 1135 | <div class="icon">🧬</div> |
| 1136 | <h3>Hybrid SSM + Attention</h3> |
| 1137 | <p>Qwen3.6-35B with Mamba-2 SSM + Attention hybrid layers, MXFP4 quantization, and concurrent serving at 47 tok/s aggregate.</p> |
| 1138 | </div> |
| 1139 | <div class="feature-card reveal"> |
| 1140 | <div class="icon">🧩</div> |
| 1141 | <h3>Gemma 4 & ZAYA1</h3> |
| 1142 | <p>Gemma 4: per-layer projections, GeGLU activation, sliding window, logit softcapping. ZAYA1: interleaved ATTN/MoE+MoD with CCA.</p> |
| 1143 | </div> |
| 1144 | <div class="feature-card reveal"> |
| 1145 | <div class="icon">🔌</div> |
| 1146 | <h3>50+ architectures</h3> |
| 1147 | <p>Llama, Mistral, Qwen, GPT-OSS, DeepSeek V2/V3, DBRX, Mixtral, Gemma 4, ZAYA1, Falcon, Phi — pluggable forward passes for any GGUF model.</p> |
| 1148 | </div> |
| 1149 | <div class="feature-card reveal"> |
| 1150 | <div class="icon">🔋</div> |
| 1151 | <h3>GGUF native</h3> |
| 1152 | <p>All quantization types: Q4_0, Q4_K, Q5_K, Q6_K, Q8_0, MXFP4. Full K-quant support including Q5_K and MXFP4 for expert weights.</p> |
| 1153 | </div> |
| 1154 | <div class="feature-card reveal"> |
| 1155 | <div class="icon">🎮</div> |
| 1156 | <h3>MAX GPU engine</h3> |
| 1157 | <p>Built on <strong>Modular MAX</strong> — GPU acceleration via MAX engine for supported models. Leverages CUDA, ROCm, and Metal backends through MAX's hardware abstraction layer.</p> |
| 1158 | <span class="tag">GPU acceleration</span> |
| 1159 | </div> |
| 1160 | <div class="feature-card reveal"> |
| 1161 | <div class="icon">🔄</div> |
| 1162 | <h3>Concurrent serving</h3> |
| 1163 | <p>Multi-process server with configurable workers. Up to 47 tok/s aggregate on Qwen3.6-35B with 10 concurrent users.</p> |
| 1164 | </div> |
| 1165 | <div class="feature-card reveal"> |
| 1166 | <div class="icon">🔧</div> |
| 1167 | <h3>Hardware auto-tune</h3> |
| 1168 | <p>Sweeps OMP threads, batch sizes, concurrency levels, and engine settings. Caches per-model optimized config on first load.</p> |
| 1169 | </div> |
| 1170 | <div class="feature-card reveal"> |
| 1171 | <div class="icon">📦</div> |
| 1172 | <h3>Docker ready</h3> |
| 1173 | <p>Pre-built image on GHCR with auto-tune, HuggingFace model download, and docker-compose for API server, chat, and llama.cpp fallback.</p> |
| 1174 | </div> |
| 1175 | <div class="feature-card reveal"> |
| 1176 | <div class="icon">🖥️</div> |
| 1177 | <h3>Unified CLI</h3> |
| 1178 | <p>Single <code>mojollama</code> command for chat, serve, bench, quantize, convert, autotune, eval, train, export, and hub operations.</p> |
| 1179 | </div> |
| 1180 | </div> |
| 1181 | </div> |
| 1182 | </div> |
| 1183 | |
| 1184 | <!-- ════ ARCHITECTURE SUPPORT ════ --> |
| 1185 | <div class="section section-alt" id="models"> |
| 1186 | <div class="container"> |
| 1187 | <div class="section-label reveal">Models</div> |
| 1188 | <h2 class="reveal">Architecture support</h2> |
| 1189 | <p class="reveal" style="margin-bottom:0;">Every model that loads in GGUF format is supported. Architecture-specific forward passes ensure correct computation.</p> |
| 1190 | <div class="table-wrap reveal"> |
| 1191 | <table> |
| 1192 | <thead><tr><th>Architecture</th><th>Status</th><th>Notable features</th></tr></thead> |
| 1193 | <tbody> |
| 1194 | <tr><td><strong>Llama 2/3/4</strong>, Mistral</td><td><span class="badge badge-green">Full</span></td><td>Dense, GQA, SwiGLU, RoPE</td></tr> |
| 1195 | <tr><td><strong>Qwen2</strong>, Qwen3</td><td><span class="badge badge-green">Full</span></td><td>TNT embedding, partial rotary</td></tr> |
| 1196 | <tr><td><strong>GPT-OSS</strong></td><td><span class="badge badge-green">Full</span></td><td>MoE 32 experts, packed experts, bias attention — on par with llama.cpp</td></tr> |
| 1197 | <tr><td><strong>Qwen3 MoE</strong></td><td><span class="badge badge-green">Full</span></td><td>128 experts top-8, shared expert, SwiGLU</td></tr> |
| 1198 | <tr><td><strong>Qwen3.6-35B</strong></td><td><span class="badge badge-green">Full</span></td><td>Hybrid SSM+Attention, MXFP4, MoE 256 experts</td></tr> |
| 1199 | <tr><td><strong>Gemma 4</strong></td><td><span class="badge badge-green">Full</span></td><td>Per-layer projections, GeGLU, sliding window, logit softcapping</td></tr> |
| 1200 | <tr><td><strong>ZAYA1-8B</strong></td><td><span class="badge badge-green">Pure Mojo ✅</span></td><td>80 layers ATTN/MoE, 16 exp top-1, Q8_0, 28.6 tok/s</td></tr> |
| 1201 | <tr><td><strong>DeepSeek V2/V3</strong></td><td><span class="badge badge-green">Supported</span></td><td>Multi-head Latent Attention, DeepSeekMoE</td></tr> |
| 1202 | <tr><td><strong>Mixtral</strong>, DBRX</td><td><span class="badge badge-green">Supported</span></td><td>Standard MoE with gated FFN</td></tr> |
| 1203 | <tr><td><strong>Falcon</strong></td><td><span class="badge badge-orange">In development</span></td><td>Parallel attention+FFN, fused QKV</td></tr> |
| 1204 | <tr><td><strong>Phi-3/4</strong></td><td><span class="badge badge-orange">In development</span></td><td>Fused QKV, long RoPE</td></tr> |
| 1205 | </tbody> |
| 1206 | </table> |
| 1207 | </div> |
| 1208 | </div> |
| 1209 | </div> |
| 1210 | |
| 1211 | <!-- ════ BENCHMARKS ════ --> |
| 1212 | <div class="section" id="benchmarks"> |
| 1213 | <div class="container"> |
| 1214 | <div class="section-label reveal">Performance</div> |
| 1215 | <h2 class="reveal">Benchmarked on real hardware</h2> |
| 1216 | <p class="reveal" style="margin-bottom:0;">AMD Threadripper 3970X (32C/64T, 251GB DDR4). 32 threads unless noted. All measurements in tok/s (higher is better).</p> |
| 1217 | <div class="table-wrap reveal"> |
| 1218 | <table> |
| 1219 | <thead><tr><th>Model</th><th>Engine</th><th>tok/s</th><th>vs llama.cpp</th></tr></thead> |
| 1220 | <tbody> |
| 1221 | <tr><td><strong>TinyLlama 1.1B</strong> Q4_0</td><td>Dense engine</td><td>79.2</td><td>0.89×</td></tr> |
| 1222 | <tr><td><strong>TinyLlama 1.1B</strong> f16</td><td><strong>Pure Mojo</strong></td><td><strong>27.2</strong></td><td>—</td></tr> |
| 1223 | <tr><td><strong>ZAYA1-8B</strong> Q8_0</td><td><strong>Pure Mojo</strong></td><td><strong>28.6</strong> 🏆</td><td>—</td></tr> |
| 1224 | <tr><td><strong>GPT-OSS-20B</strong> Q4_K_M</td><td>MoE (Python)</td><td><strong>25.5</strong></td><td>0.94×</td></tr> |
| 1225 | <tr><td><strong>Qwen3.6-35B</strong> MXFP4</td><td>MoE (Python)</td><td>25.5</td><td><span class="badge badge-green">1.57× 🏆</span></td></tr> |
| 1226 | <tr><td><strong>Qwen3.6-35B</strong> MXFP4</td><td>Concurrent (10×3t)</td><td><strong>47</strong> aggregate</td><td>—</td></tr> |
| 1227 | <tr><td><strong>Gemma 4 4.6B</strong> Q4_K_M</td><td>Gemma4 engine</td><td>18.8</td><td>—</td></tr> |
| 1228 | <tr><td><strong>ZAYA1-8B</strong> Q4_K_M</td><td>ZAYA engine (1t)</td><td>0.9</td><td>—</td></tr> |
| 1229 | </tbody> |
| 1230 | </table> |
| 1231 | </div> |
| 1232 | </div> |
| 1233 | </div> |
| 1234 | |
| 1235 | <!-- ════ GETTING STARTED ════ --> |
| 1236 | <div class="section section-alt" id="quickstart"> |
| 1237 | <div class="container"> |
| 1238 | <div class="section-label reveal">Getting started</div> |
| 1239 | <h2 class="reveal">From zero to inference</h2> |
| 1240 | <p class="reveal" style="margin-bottom:var(--space-8);">Install MojoLlama and run your first model in minutes.</p> |
| 1241 | <div class="steps"> |
| 1242 | <div class="step reveal"> |
| 1243 | <div class="step-number">Step 01</div> |
| 1244 | <h3>Install</h3> |
| 1245 | <p style="font-size:0.88rem; margin-top:var(--space-12);">Clone the repository and install dependencies.</p> |
| 1246 | <div class="cli-box" style="margin-top:var(--space-16); padding:var(--space-16); font-size:0.78rem;"> |
| 1247 | <span class="prompt">$</span> <span class="cmd">git clone https://github.com/a730/MojoLlama.git</span><br> |
| 1248 | <span class="prompt">$</span> <span class="cmd">cd MojoLlama/src && pip install -e .</span> |
| 1249 | </div> |
| 1250 | </div> |
| 1251 | <div class="step reveal"> |
| 1252 | <div class="step-number">Step 02</div> |
| 1253 | <h3>Download a model</h3> |
| 1254 | <p style="font-size:0.88rem; margin-top:var(--space-12);">Get a GGUF model from HuggingFace or use your own.</p> |
| 1255 | <div class="cli-box" style="margin-top:var(--space-16); padding:var(--space-16); font-size:0.78rem;"> |
| 1256 | <span class="prompt">$</span> <span class="cmd">mojollama convert --hf meta-llama/Llama-3.2-1B \</span><br> |
| 1257 | <span class="cmd"> --outtype q4_0</span> |
| 1258 | </div> |
| 1259 | </div> |
| 1260 | <div class="step reveal"> |
| 1261 | <div class="step-number">Step 03</div> |
| 1262 | <h3>Run inference</h3> |
| 1263 | <p style="font-size:0.88rem; margin-top:var(--space-12);">Chat, serve, or benchmark — all from one command.</p> |
| 1264 | <div class="cli-box" style="margin-top:var(--space-16); padding:var(--space-16); font-size:0.78rem;"> |
| 1265 | <span class="prompt">$</span> <span class="cmd">mojollama chat -m model.gguf</span><br> |
| 1266 | <span class="prompt">$</span> <span class="cmd">mojollama serve -m model.gguf -p 8080</span> |
| 1267 | </div> |
| 1268 | </div> |
| 1269 | </div> |
| 1270 | <div style="text-align:center; margin-top:var(--space-40);"> |
| 1271 | <a href="https://github.com/a730/MojoLlama" class="btn btn-secondary">View full documentation →</a> |
| 1272 | </div> |
| 1273 | </div> |
| 1274 | </div> |
| 1275 | |
| 1276 | <!-- ════ ROADMAP ════ --> |
| 1277 | <div class="section section-alt" id="roadmap"> |
| 1278 | <div class="container"> |
| 1279 | <div class="section-label reveal">Roadmap</div> |
| 1280 | <h2 class="reveal">What's coming next</h2> |
| 1281 | <p class="reveal">Major milestones across engine, studio, GPU, and platform. Use the timeline dots or arrows to navigate.</p> |
| 1282 | |
| 1283 | <div class="roadmap-timeline reveal" id="mojoTimeline"> |
| 1284 | |
| 1285 | <!-- Periods (top) --> |
| 1286 | <div class="periods-container"> |
| 1287 | <section class="period-single active" period="period0"> |
| 1288 | <div class="year" style="color:#198038;">Phase 0</div> |
| 1289 | <div class="title">Foundation — shipped</div> |
| 1290 | <p>C engine, Python MoE engine (0.94× vs llama.cpp), Studio (14 panels, 25+ CLI commands), Docker deployment. 60+ arch detection, 2 custom forward passes.</p> |
| 1291 | </section> |
| 1292 | <section class="period-single" period="period1"> |
| 1293 | <div class="year" style="color:#6C3CE1;">Phase 1</div> |
| 1294 | <div class="title">Full HF Model Coverage</div> |
| 1295 | <p>Custom forward passes for Falcon, Phi-3/4, DeepSeek V2/V3, Qwen2-VL, Command-R. Automated forward pass generator from GGUF metadata for remaining 40+ archs. Perplexity regression benchmark per arch.</p> |
| 1296 | </section> |
| 1297 | <section class="period-single" period="period2"> |
| 1298 | <div class="year" style="color:#0043CE;">Phase 2</div> |
| 1299 | <div class="title">Studio: One-Stop ML App</div> |
| 1300 | <p>Pure-Python quantizer, imatrix + dynamic 2-bit quantization. LoRA/QLoRA with true Python gradients. Capability benchmarks (MMLU, GSM8K, HumanEval). HF dataset integration + quality filters. Training loop UI with live charts.</p> |
| 1301 | </section> |
| 1302 | <section class="period-single" period="period3"> |
| 1303 | <div class="year" style="color:#D45A00;">Phase 3</div> |
| 1304 | <div class="title">CPU + GPU Engine</div> |
| 1305 | <p>Q8_0 input C quant (2-4×), MXFP4 C kernel (10×), continuous batching. MAX GPU: CUDA, ROCm, Metal backends. GPU attention, MoE dispatch, KV cache. Flash Attention + CUDA graphs. Multi-GPU tensor/pipeline parallelism. GPU auto-tune.</p> |
| 1306 | </section> |
| 1307 | <section class="period-single" period="period4"> |
| 1308 | <div class="year" style="color:#009D9A;">Phase 4</div> |
| 1309 | <div class="title">Platform: Ship It</div> |
| 1310 | <p>pip package with pre-built wheels (manylinux x86_64, aarch64). Tauri desktop app. CI/CD with benchmark regressions. API hardening (keys, rate limiting, hot-swap). Model registry + comprehensive test suite.</p> |
| 1311 | </section> |
| 1312 | |
| 1313 | <button class="btn-back tl-arrow hide" aria-label="Previous"><svg width="18" height="18" viewBox="0 0 30 30"><path d="M11.828 15l7.89-7.89-2.83-2.828L6.283 14.89l.11.11-.11.11L16.89 25.72l2.828-2.83"/></svg></button> |
| 1314 | <button class="btn-next tl-arrow" aria-label="Next"><svg width="18" height="18" viewBox="0 0 30 30"><path d="M18.172 14.718l-7.89-7.89L13.112 4l10.606 10.607-.11.11.11.11-10.608 10.61-2.828-2.83 7.89-7.89"/></svg></button> |
| 1315 | </div> |
| 1316 | |
| 1317 | <!-- Timeline (middle) --> |
| 1318 | <div class="timeline-container"> |
| 1319 | <div class="timeline"></div> |
| 1320 | <button class="btn-back tl-arrow hide" aria-label="Previous"><svg width="18" height="18" viewBox="0 0 30 30"><path d="M11.828 15l7.89-7.89-2.83-2.828L6.283 14.89l.11.11-.11.11L16.89 25.72l2.828-2.83"/></svg></button> |
| 1321 | <button class="btn-next tl-arrow" aria-label="Next"><svg width="18" height="18" viewBox="0 0 30 30"><path d="M18.172 14.718l-7.89-7.89L13.112 4l10.606 10.607-.11.11.11.11-10.608 10.61-2.828-2.83 7.89-7.89"/></svg></button> |
| 1322 | </div> |
| 1323 | |
| 1324 | <!-- Cards (bottom) --> |
| 1325 | <div class="cards-container"> |
| 1326 | <section class="card-single active" period="period0"> |
| 1327 | <span class="tag tag-now">Now</span> |
| 1328 | <div class="year" style="color:#198038;">Phase 0</div> |
| 1329 | <div class="title">Foundation</div> |
| 1330 | <div class="subtitle">6 major areas shipped</div> |
| 1331 | <ul class="items"> |
| 1332 | <li style="--dot:#198038;">C batched engine — AVX2+OMP quant matmul</li> |
| 1333 | <li style="--dot:#198038;">Python MoE engine — 0.94× vs llama.cpp</li> |
| 1334 | <li style="--dot:#198038;">2 custom forward passes (Gemma 4, ZAYA1)</li> |
| 1335 | <li style="--dot:#198038;">Studio web UI — 14 panels</li> |
| 1336 | <li style="--dot:#198038;">Studio CLI — 25+ commands</li> |
| 1337 | <li style="--dot:#198038;">Docker with auto-tune + HF download</li> |
| 1338 | </ul> |
| 1339 | </section> |
| 1340 | <section class="card-single" period="period1"> |
| 1341 | <span class="tag tag-next">Next</span> |
| 1342 | <div class="year" style="color:#6C3CE1;">Phase 1</div> |
| 1343 | <div class="title">Full HF Model Coverage</div> |
| 1344 | <div class="subtitle">10 tasks · 4 weeks</div> |
| 1345 | <ul class="items"> |
| 1346 | <li style="--dot:#6C3CE1;">Falcon — parallel attention+FFN, fused QKV</li> |
| 1347 | <li style="--dot:#6C3CE1;">Phi-3/4 — fused QKV, long RoPE (128K)</li> |
| 1348 | <li style="--dot:#6C3CE1;">DeepSeek V2/V3 — Multi-head Latent Attention</li> |
| 1349 | <li style="--dot:#6C3CE1;">Qwen2-VL — vision + language interop</li> |
| 1350 | <li style="--dot:#6C3CE1;">Command-R / Cohere2 — Tanh-gated RoPE</li> |
| 1351 | <li style="--dot:#6C3CE1;">Automated forward pass generator from GGUF metadata</li> |
| 1352 | <li style="--dot:#6C3CE1;">BTLM / GLM — bidirectional hybrid</li> |
| 1353 | <li style="--dot:#6C3CE1;">Perplexity regression benchmark per arch</li> |
| 1354 | </ul> |
| 1355 | </section> |
| 1356 | <section class="card-single" period="period2"> |
| 1357 | <span class="tag tag-next">Next</span> |
| 1358 | <div class="year" style="color:#0043CE;">Phase 2</div> |
| 1359 | <div class="title">Studio: One-Stop ML App</div> |
| 1360 | <div class="subtitle">18 tasks · 6-8 weeks</div> |
| 1361 | <ul class="items"> |
| 1362 | <li style="--dot:#0043CE;">Pure-Python quantizer — Q4_K through Q8_0</li> |
| 1363 | <li style="--dot:#0043CE;">Imatrix + dynamic 2-bit quantization</li> |
| 1364 | <li style="--dot:#0043CE;">Studio quant wizard — pick model → quants → run</li> |
| 1365 | <li style="--dot:#0043CE;">LoRA/QLoRA with true Python gradients</li> |
| 1366 | <li style="--dot:#0043CE;">Training loop UI — loss charts, ETA, schedule</li> |
| 1367 | <li style="--dot:#0043CE;">DPO/ORPO preference optimization</li> |
| 1368 | <li style="--dot:#0043CE;">Capability benchmarks — MMLU, GSM8K, HumanEval</li> |
| 1369 | <li style="--dot:#0043CE;">HF dataset integration + quality filters</li> |
| 1370 | <li style="--dot:#0043CE;">Perplexity evaluation + benchmark history</li> |
| 1371 | </ul> |
| 1372 | </section> |
| 1373 | <section class="card-single" period="period3"> |
| 1374 | <span class="tag tag-future">Future</span> |
| 1375 | <div class="year" style="color:#D45A00;">Phase 3</div> |
| 1376 | <div class="title">CPU + GPU Engine</div> |
| 1377 | <div class="subtitle">21 tasks · 8-12 weeks</div> |
| 1378 | <ul class="items"> |
| 1379 | <li style="--dot:#D45A00;">Q8_0 input C quant — 2-4× matmul improvement</li> |
| 1380 | <li style="--dot:#D45A00;">MXFP4 C kernel — 10× faster than Python</li> |
| 1381 | <li style="--dot:#D45A00;">True continuous batching + PagedAttention</li> |
| 1382 | <li style="--dot:#D45A00;">MAX GPU: CUDA, ROCm, Metal backends</li> |
| 1383 | <li style="--dot:#D45A00;">GPU attention, MoE dispatch, KV cache</li> |
| 1384 | <li style="--dot:#D45A00;">Flash Attention + CUDA graphs</li> |
| 1385 | <li style="--dot:#D45A00;">Multi-GPU tensor + pipeline parallelism</li> |
| 1386 | <li style="--dot:#D45A00;">GPU-native FP8/INT4 quantization</li> |
| 1387 | <li style="--dot:#D45A00;">GPU auto-tune — layers, batch, concurrency</li> |
| 1388 | </ul> |
| 1389 | </section> |
| 1390 | <section class="card-single" period="period4"> |
| 1391 | <span class="tag tag-future">Future</span> |
| 1392 | <div class="year" style="color:#009D9A;">Phase 4</div> |
| 1393 | <div class="title">Platform: Ship It</div> |
| 1394 | <div class="subtitle">7 tasks · 4-6 weeks</div> |
| 1395 | <ul class="items"> |
| 1396 | <li style="--dot:#009D9A;">pip package — manylinux x86_64, aarch64 wheels</li> |
| 1397 | <li style="--dot:#009D9A;">Desktop app — Tauri wrapper for Studio</li> |
| 1398 | <li style="--dot:#009D9A;">CI/CD — GitHub Actions, benchmark regressions</li> |
| 1399 | <li style="--dot:#009D9A;">API hardening — keys, rate limiting, hot-swap</li> |
| 1400 | <li style="--dot:#009D9A;">Model registry — local + HF Hub, one-click download</li> |
| 1401 | <li style="--dot:#009D9A;">Comprehensive test suite</li> |
| 1402 | <li style="--dot:#009D9A;">Auto-generated release notes</li> |
| 1403 | </ul> |
| 1404 | </section> |
| 1405 | </div> |
| 1406 | |
| 1407 | <div style="text-align:center; margin-top:24px;"> |
| 1408 | <a href="ROADMAP.md" style="font-size:0.88rem; font-weight:500;">View full roadmap →</a> |
| 1409 | </div> |
| 1410 | |
| 1411 | </div> |
| 1412 | </div> |
| 1413 | </div> |
| 1414 | |
| 1415 | <!-- ════ CTA BANNER ════ --> |
| 1416 | <div class="cta-banner"> |
| 1417 | <div class="container"> |
| 1418 | <h2 class="reveal">Star us on GitHub</h2> |
| 1419 | <p class="reveal">MojoLlama is open source (Apache 2.0). Contributions, issues, and feature requests welcome.</p> |
| 1420 | <div class="hero-btns reveal" style="justify-content:center;"> |
| 1421 | <a href="https://github.com/a730/MojoLlama" class="btn btn-primary">GitHub →</a> |
| 1422 | <a href="https://github.com/a730/MojoLlama/issues" class="btn btn-secondary">Report an issue</a> |
| 1423 | </div> |
| 1424 | </div> |
| 1425 | </div> |
| 1426 | |
| 1427 | <!-- ════ FOOTER ════ --> |
| 1428 | <footer> |
| 1429 | <div class="container"> |
| 1430 | <div class="grid"> |
| 1431 | <div> |
| 1432 | <div style="font-weight:700; font-size:1.1rem; margin-bottom:var(--space-12);">Mojo<span style="color:var(--mojo);">Llama</span></div> |
| 1433 | <p style="font-size:0.85rem; line-height:1.6;">CPU-first LLM inference built on Modular MAX. GPU acceleration available via MAX engine. Fully open source under Apache 2.0.</p> |
| 1434 | </div> |
| 1435 | <div> |
| 1436 | <h4>Product</h4> |
| 1437 | <a href="studio.html">Chat</a> |
| 1438 | <a href="studio.html">Studio</a> |
| 1439 | <a href="docs/">Documentation</a> |
| 1440 | <a href="docs/#troubleshooting">Troubleshooting</a> |
| 1441 | <a href="#benchmarks">Benchmarks</a> |
| 1442 | </div> |
| 1443 | <div> |
| 1444 | <h4>Community</h4> |
| 1445 | <a href="https://github.com/a730/MojoLlama">GitHub</a> |
| 1446 | <a href="https://github.com/a730/MojoLlama/issues">Issues</a> |
| 1447 | </div> |
| 1448 | <div> |
| 1449 | <h4>Ecosystem</h4> |
| 1450 | <a href="https://www.modular.com/max"><strong>MAX Platform</strong></a> |
| 1451 | <a href="https://www.modular.com">Modular</a> |
| 1452 | <a href="https://github.com/ggml-org/gguf">GGUF</a> |
| 1453 | <a href="https://github.com/ggml-org/llama.cpp">llama.cpp</a> |
| 1454 | </div> |
| 1455 | </div> |
| 1456 | <div class="copyright">MojoLlama v0.5.0 — Apache 2.0 License</div> |
| 1457 | </div> |
| 1458 | </footer> |
| 1459 | |
| 1460 | <!-- Back to top --> |
| 1461 | <button class="back-to-top" id="backToTop" aria-label="Back to top"> |
| 1462 | <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="18 15 12 9 6 15"/></svg> |
| 1463 | </button> |
| 1464 | |
| 1465 | <script> |
| 1466 | (function() { |
| 1467 | 'use strict'; |
| 1468 | |
| 1469 | var COLORS = { |
| 1470 | period0: '#198038', |
| 1471 | period1: '#6C3CE1', |
| 1472 | period2: '#0043CE', |
| 1473 | period3: '#D45A00', |
| 1474 | period4: '#009D9A' |
| 1475 | }; |
| 1476 | |
| 1477 | /* ── Theme toggle (IBM Carbon style) ── */ |
| 1478 | function initTheme() { |
| 1479 | var toggle = document.getElementById('themeToggle'); |
| 1480 | var stored = localStorage.getItem('mojollama-theme'); |
| 1481 | if (stored) { |
| 1482 | document.documentElement.setAttribute('data-theme', stored); |
| 1483 | } |
| 1484 | if (toggle) { |
| 1485 | toggle.addEventListener('click', function() { |
| 1486 | var current = document.documentElement.getAttribute('data-theme'); |
| 1487 | var next = current === 'dark' ? 'light' : 'dark'; |
| 1488 | document.documentElement.setAttribute('data-theme', next); |
| 1489 | localStorage.setItem('mojollama-theme', next); |
| 1490 | }); |
| 1491 | } |
| 1492 | } |
| 1493 | |
| 1494 | /* ── Mobile hamburger ── */ |
| 1495 | function initMobileMenu() { |
| 1496 | var btn = document.getElementById('hamburgerBtn'); |
| 1497 | var overlay = document.getElementById('mobileOverlay'); |
| 1498 | var drawer = document.getElementById('mobileDrawer'); |
| 1499 | if (!btn || !overlay || !drawer) return; |
| 1500 | |
| 1501 | function openMenu() { |
| 1502 | btn.classList.add('open'); |
| 1503 | overlay.classList.add('open'); |
| 1504 | drawer.classList.add('open'); |
| 1505 | overlay.style.display = 'block'; |
| 1506 | document.body.style.overflow = 'hidden'; |
| 1507 | } |
| 1508 | function closeMenu() { |
| 1509 | btn.classList.remove('open'); |
| 1510 | overlay.classList.remove('open'); |
| 1511 | drawer.classList.remove('open'); |
| 1512 | document.body.style.overflow = ''; |
| 1513 | setTimeout(function() { overlay.style.display = 'none'; }, 300); |
| 1514 | } |
| 1515 | |
| 1516 | btn.addEventListener('click', function() { |
| 1517 | if (drawer.classList.contains('open')) closeMenu(); |
| 1518 | else openMenu(); |
| 1519 | }); |
| 1520 | overlay.addEventListener('click', closeMenu); |
| 1521 | |
| 1522 | var links = drawer.querySelectorAll('a'); |
| 1523 | for (var i = 0; i < links.length; i++) { |
| 1524 | links[i].addEventListener('click', closeMenu); |
| 1525 | } |
| 1526 | } |
| 1527 | |
| 1528 | /* ── Scroll reveal (IntersectionObserver) ── */ |
| 1529 | function initScrollReveal() { |
| 1530 | var els = document.querySelectorAll('.reveal'); |
| 1531 | if (!('IntersectionObserver' in window)) { |
| 1532 | for (var i = 0; i < els.length; i++) els[i].classList.add('visible'); |
| 1533 | return; |
| 1534 | } |
| 1535 | var observer = new IntersectionObserver(function(entries) { |
| 1536 | for (var i = 0; i < entries.length; i++) { |
| 1537 | if (entries[i].isIntersecting) { |
| 1538 | entries[i].target.classList.add('visible'); |
| 1539 | observer.unobserve(entries[i].target); |
| 1540 | } |
| 1541 | } |
| 1542 | }, { threshold: 0.1, rootMargin: '0px 0px -40px 0px' }); |
| 1543 | for (var i = 0; i < els.length; i++) observer.observe(els[i]); |
| 1544 | } |
| 1545 | |
| 1546 | /* ── Animated metric counters ── */ |
| 1547 | function initCounters() { |
| 1548 | var metrics = document.querySelectorAll('.metric-value[data-count]'); |
| 1549 | if (!('IntersectionObserver' in window)) { |
| 1550 | for (var i = 0; i < metrics.length; i++) { |
| 1551 | var m = metrics[i]; |
| 1552 | if (m.getAttribute('data-text')) { |
| 1553 | m.textContent = m.getAttribute('data-text'); |
| 1554 | } else { |
| 1555 | m.textContent = m.getAttribute('data-count') + (m.getAttribute('data-suffix') || ''); |
| 1556 | } |
| 1557 | } |
| 1558 | return; |
| 1559 | } |
| 1560 | var observed = new Set(); |
| 1561 | var observer = new IntersectionObserver(function(entries) { |
| 1562 | for (var i = 0; i < entries.length; i++) { |
| 1563 | if (entries[i].isIntersecting && !observed.has(entries[i].target)) { |
| 1564 | observed.add(entries[i].target); |
| 1565 | animateCounter(entries[i].target); |
| 1566 | observer.unobserve(entries[i].target); |
| 1567 | } |
| 1568 | } |
| 1569 | }, { threshold: 0.5 }); |
| 1570 | for (var i = 0; i < metrics.length; i++) observer.observe(metrics[i]); |
| 1571 | } |
| 1572 | |
| 1573 | function animateCounter(el) { |
| 1574 | var target = parseFloat(el.getAttribute('data-count')); |
| 1575 | var suffix = el.getAttribute('data-suffix') || ''; |
| 1576 | var text = el.getAttribute('data-text'); |
| 1577 | if (text) { el.textContent = text; return; } |
| 1578 | |
| 1579 | var isFloat = String(target).indexOf('.') !== -1; |
| 1580 | var duration = 1200; |
| 1581 | var start = performance.now(); |
| 1582 | |
| 1583 | function step(now) { |
| 1584 | var progress = Math.min((now - start) / duration, 1); |
| 1585 | var eased = 1 - Math.pow(1 - progress, 3); |
| 1586 | var val = target * eased; |
| 1587 | el.textContent = (isFloat ? val.toFixed(1) : Math.round(val)) + suffix; |
| 1588 | if (progress < 1) requestAnimationFrame(step); |
| 1589 | } |
| 1590 | requestAnimationFrame(step); |
| 1591 | } |
| 1592 | |
| 1593 | /* ── Terminal typing animation ── */ |
| 1594 | function initTerminal() { |
| 1595 | var terminal = document.getElementById('heroTerminal'); |
| 1596 | if (!terminal) return; |
| 1597 | var lines = terminal.querySelectorAll('.term-line'); |
| 1598 | if (!('IntersectionObserver' in window)) { |
| 1599 | for (var i = 0; i < lines.length; i++) lines[i].classList.add('typed'); |
| 1600 | return; |
| 1601 | } |
| 1602 | var observer = new IntersectionObserver(function(entries) { |
| 1603 | for (var i = 0; i < entries.length; i++) { |
| 1604 | if (entries[0].isIntersecting) { |
| 1605 | revealTerminal(lines); |
| 1606 | observer.unobserve(terminal); |
| 1607 | } |
| 1608 | } |
| 1609 | }, { threshold: 0.3 }); |
| 1610 | observer.observe(terminal); |
| 1611 | } |
| 1612 | |
| 1613 | function revealTerminal(lines) { |
| 1614 | for (var i = 0; i < lines.length; i++) { |
| 1615 | (function(line, idx) { |
| 1616 | var delay = parseInt(line.getAttribute('data-delay') || idx * 200, 10); |
| 1617 | setTimeout(function() { line.classList.add('typed'); }, delay); |
| 1618 | })(lines[i], i); |
| 1619 | } |
| 1620 | } |
| 1621 | |
| 1622 | /* ── Active nav highlighting on scroll ── */ |
| 1623 | function initNavHighlight() { |
| 1624 | var sections = document.querySelectorAll('div.section[id], div.section-alt[id]'); |
| 1625 | var navLinks = document.querySelectorAll('nav .nav-links a[href^="#"]'); |
| 1626 | if (!sections.length || !navLinks.length) return; |
| 1627 | |
| 1628 | function update() { |
| 1629 | var scrollY = window.scrollY + 100; |
| 1630 | for (var i = sections.length - 1; i >= 0; i--) { |
| 1631 | if (sections[i].offsetTop <= scrollY) { |
| 1632 | var id = sections[i].getAttribute('id'); |
| 1633 | for (var j = 0; j < navLinks.length; j++) { |
| 1634 | navLinks[j].classList.toggle('active', navLinks[j].getAttribute('href') === '#' + id); |
| 1635 | } |
| 1636 | break; |
| 1637 | } |
| 1638 | } |
| 1639 | } |
| 1640 | window.addEventListener('scroll', update, { passive: true }); |
| 1641 | update(); |
| 1642 | } |
| 1643 | |
| 1644 | /* ── Back to top button ── */ |
| 1645 | function initBackToTop() { |
| 1646 | var btn = document.getElementById('backToTop'); |
| 1647 | if (!btn) return; |
| 1648 | window.addEventListener('scroll', function() { |
| 1649 | btn.classList.toggle('visible', window.scrollY > 400); |
| 1650 | }, { passive: true }); |
| 1651 | btn.addEventListener('click', function() { |
| 1652 | window.scrollTo({ top: 0, behavior: 'smooth' }); |
| 1653 | }); |
| 1654 | } |
| 1655 | |
| 1656 | /* ── Timeline (preserved) ── */ |
| 1657 | function PRESTimeline(el) { |
| 1658 | this.base = el; |
| 1659 | this.periodContainer = el.querySelector('.periods-container'); |
| 1660 | this.cardContainer = el.querySelector('.cards-container'); |
| 1661 | this.timelineNodeContainer = el.querySelector('.timeline-container .timeline'); |
| 1662 | this.periodData = []; |
| 1663 | this.cardData = []; |
| 1664 | this.activePeriodIndex = 0; |
| 1665 | this.activeCardIndex = 0; |
| 1666 | this.timelineData = []; |
| 1667 | this._parseData(); |
| 1668 | this._generateTimeline(); |
| 1669 | this._setStateClasses(); |
| 1670 | this._assignButtons(); |
| 1671 | this._adjustPeriodContainer(); |
| 1672 | this._adjustCardContainer(); |
| 1673 | } |
| 1674 | |
| 1675 | PRESTimeline.prototype._parseData = function() { |
| 1676 | var periods = this.periodContainer.querySelectorAll('section.period-single'); |
| 1677 | for (var i = 0; i < periods.length; i++) { |
| 1678 | periods[i].period = periods[i].getAttribute('period'); |
| 1679 | periods[i].index = i; |
| 1680 | this.periodData.push(periods[i]); |
| 1681 | } |
| 1682 | var cards = this.cardContainer.querySelectorAll('section.card-single'); |
| 1683 | for (var i = 0; i < cards.length; i++) { |
| 1684 | cards[i].period = cards[i].getAttribute('period'); |
| 1685 | cards[i].index = i; |
| 1686 | this.cardData.push(cards[i]); |
| 1687 | } |
| 1688 | this.activePeriod = this.periodData[0]; |
| 1689 | this.activeCard = this.cardData[0]; |
| 1690 | }; |
| 1691 | |
| 1692 | PRESTimeline.prototype._setStateClasses = function() { |
| 1693 | var i, s, periodEls = this.periodContainer.querySelectorAll('section.period-single'), |
| 1694 | cardEls = this.cardContainer.querySelectorAll('section.card-single'); |
| 1695 | |
| 1696 | for (i = 0; i < periodEls.length; i++) { |
| 1697 | periodEls[i].classList.remove('active', 'prev', 'next'); |
| 1698 | } |
| 1699 | this.activePeriod.classList.add('active'); |
| 1700 | if (this.activePeriod.previousElementSibling && this.activePeriod.previousElementSibling.tagName === 'SECTION') { |
| 1701 | this.activePeriod.previousElementSibling.classList.add('prev'); |
| 1702 | } |
| 1703 | if (this.activePeriod.nextElementSibling && this.activePeriod.nextElementSibling.tagName === 'SECTION') { |
| 1704 | this.activePeriod.nextElementSibling.classList.add('next'); |
| 1705 | } |
| 1706 | |
| 1707 | for (i = 0; i < cardEls.length; i++) { |
| 1708 | cardEls[i].classList.remove('active', 'prev', 'next'); |
| 1709 | } |
| 1710 | this.activeCard.classList.add('active'); |
| 1711 | var prevCard = this._prevCard(); |
| 1712 | if (prevCard) prevCard.classList.add('prev'); |
| 1713 | var nextCard = this._nextCard(); |
| 1714 | if (nextCard) nextCard.classList.add('next'); |
| 1715 | |
| 1716 | for (i = 0; i < this.timelineData.length; i++) { |
| 1717 | this.timelineData[i].classList.remove('active'); |
| 1718 | } |
| 1719 | this.timelineData[this.activeCardIndex].classList.add('active'); |
| 1720 | |
| 1721 | var tlB = this.base.querySelectorAll('.btn-back'); |
| 1722 | var tlN = this.base.querySelectorAll('.btn-next'); |
| 1723 | for (i = 0; i < tlB.length; i++) { |
| 1724 | tlB[i].classList.toggle('hide', this.activeCardIndex === 0); |
| 1725 | } |
| 1726 | for (i = 0; i < tlN.length; i++) { |
| 1727 | tlN[i].classList.toggle('hide', this.activeCardIndex >= this.cardData.length - 1); |
| 1728 | } |
| 1729 | }; |
| 1730 | |
| 1731 | PRESTimeline.prototype._prevCard = function() { |
| 1732 | var idx = this.activeCardIndex; |
| 1733 | for (var i = idx - 1; i >= 0; i--) { |
| 1734 | return this.cardData[i]; |
| 1735 | } |
| 1736 | return null; |
| 1737 | }; |
| 1738 | |
| 1739 | PRESTimeline.prototype._nextCard = function() { |
| 1740 | var idx = this.activeCardIndex; |
| 1741 | for (var i = idx + 1; i < this.cardData.length; i++) { |
| 1742 | return this.cardData[i]; |
| 1743 | } |
| 1744 | return null; |
| 1745 | }; |
| 1746 | |
| 1747 | PRESTimeline.prototype._generateTimeline = function() { |
| 1748 | var html = '<ol></ol>'; |
| 1749 | this.timelineNodeContainer.innerHTML = html; |
| 1750 | var wrap = this.timelineNodeContainer.querySelector('ol'); |
| 1751 | var numNode = this.cardData.length; |
| 1752 | for (var i = 0; i < numNode; i++) { |
| 1753 | var li = document.createElement('li'); |
| 1754 | li.className = this.cardData[i].period; |
| 1755 | li.style.borderColor = COLORS[this.cardData[i].period]; |
| 1756 | wrap.appendChild(li); |
| 1757 | } |
| 1758 | var nodeW = 200; |
| 1759 | wrap.style.width = (nodeW * numNode - 16) + 'px'; |
| 1760 | this.timelineData = wrap.querySelectorAll('li'); |
| 1761 | }; |
| 1762 | |
| 1763 | PRESTimeline.prototype._assignButtons = function() { |
| 1764 | var self = this; |
| 1765 | var periodPrev = this.base.querySelector('.periods-container .btn-back'); |
| 1766 | var periodNext = this.base.querySelector('.periods-container .btn-next'); |
| 1767 | |
| 1768 | periodPrev.addEventListener('click', function() { |
| 1769 | if (self.activePeriodIndex > 0) { |
| 1770 | self.activePeriodIndex--; |
| 1771 | self.activePeriod = self.periodData[self.activePeriodIndex]; |
| 1772 | self._chainActions('period'); |
| 1773 | self._setStateClasses(); |
| 1774 | } |
| 1775 | self._adjustPeriodContainer(); |
| 1776 | }); |
| 1777 | periodNext.addEventListener('click', function() { |
| 1778 | if (self.activePeriodIndex < self.periodData.length - 1) { |
| 1779 | self.activePeriodIndex++; |
| 1780 | self.activePeriod = self.periodData[self.activePeriodIndex]; |
| 1781 | self._chainActions('period'); |
| 1782 | self._setStateClasses(); |
| 1783 | } |
| 1784 | self._adjustPeriodContainer(); |
| 1785 | }); |
| 1786 | |
| 1787 | var tlPrev = this.base.querySelector('.timeline-container .btn-back'); |
| 1788 | var tlNext = this.base.querySelector('.timeline-container .btn-next'); |
| 1789 | tlPrev.addEventListener('click', function() { |
| 1790 | if (self.activeCardIndex > 0) { |
| 1791 | self.activeCardIndex--; |
| 1792 | self.activeCard = self.cardData[self.activeCardIndex]; |
| 1793 | self._chainActions('timeline'); |
| 1794 | self._setStateClasses(); |
| 1795 | } |
| 1796 | self._adjustCardContainer(); |
| 1797 | self._adjustPeriodContainer(); |
| 1798 | }); |
| 1799 | tlNext.addEventListener('click', function() { |
| 1800 | if (self.activeCardIndex < self.cardData.length - 1) { |
| 1801 | self.activeCardIndex++; |
| 1802 | self.activeCard = self.cardData[self.activeCardIndex]; |
| 1803 | self._chainActions('timeline'); |
| 1804 | self._setStateClasses(); |
| 1805 | } |
| 1806 | self._adjustCardContainer(); |
| 1807 | self._adjustPeriodContainer(); |
| 1808 | }); |
| 1809 | |
| 1810 | for (var i = 0; i < this.timelineData.length; i++) { |
| 1811 | (function(idx) { |
| 1812 | self.timelineData[idx].addEventListener('click', function() { |
| 1813 | self.activeCardIndex = self.cardData[idx].index; |
| 1814 | self.activeCard = self.cardData[self.activeCardIndex]; |
| 1815 | self._chainActions('timeline'); |
| 1816 | self._setStateClasses(); |
| 1817 | self._adjustCardContainer(); |
| 1818 | self._shiftTimeline(); |
| 1819 | }); |
| 1820 | })(i); |
| 1821 | } |
| 1822 | |
| 1823 | var sbstyle = document.createElement('style'); |
| 1824 | document.head.appendChild(sbstyle); |
| 1825 | for (var p in COLORS) { |
| 1826 | sbstyle.sheet.insertRule('li.' + p + '.active { background-color: ' + COLORS[p] + ' !important }', 0); |
| 1827 | sbstyle.sheet.insertRule('li.' + p + '::before { background-color: ' + COLORS[p] + ' }', 0); |
| 1828 | sbstyle.sheet.insertRule('li.' + p + '::after { background-color: ' + COLORS[p] + ' }', 0); |
| 1829 | } |
| 1830 | |
| 1831 | var allCards = this.cardContainer.querySelectorAll('section.card-single'); |
| 1832 | for (var c = 0; c < allCards.length; c++) { |
| 1833 | var items = allCards[c].querySelectorAll('.items li'); |
| 1834 | var dotColor = COLORS[allCards[c].getAttribute('period')] || '#6C3CE1'; |
| 1835 | for (var li = 0; li < items.length; li++) { |
| 1836 | items[li].style.setProperty('--dot-color', dotColor); |
| 1837 | } |
| 1838 | } |
| 1839 | }; |
| 1840 | |
| 1841 | PRESTimeline.prototype._adjustPeriodContainer = function() { |
| 1842 | var activeH = this.activePeriod.offsetHeight; |
| 1843 | this.periodContainer.style.height = activeH + 'px'; |
| 1844 | }; |
| 1845 | |
| 1846 | PRESTimeline.prototype._adjustCardContainer = function() { |
| 1847 | var activeH = this.activeCard.offsetHeight + 32; |
| 1848 | this.cardContainer.style.height = activeH + 'px'; |
| 1849 | }; |
| 1850 | |
| 1851 | PRESTimeline.prototype._shiftTimeline = function() { |
| 1852 | var timelineW = this.base.querySelector('.timeline-container').offsetWidth; |
| 1853 | var timelinePadding = 210; |
| 1854 | var activeNode = this.timelineData[this.activeCardIndex]; |
| 1855 | var activeNodeX = activeNode ? activeNode.offsetLeft : 0; |
| 1856 | var finalPos = -activeNodeX + timelinePadding; |
| 1857 | this.timelineNodeContainer.style.left = Math.min(0, finalPos) + 'px'; |
| 1858 | }; |
| 1859 | |
| 1860 | PRESTimeline.prototype._chainActions = function(state) { |
| 1861 | if (state === 'period') { |
| 1862 | if (this.activePeriod.period !== this.activeCard.period) { |
| 1863 | for (var i = 0; i < this.cardData.length; i++) { |
| 1864 | if (this.activePeriod.period === this.cardData[i].period) { |
| 1865 | this.activeCard = this.cardData[i]; |
| 1866 | this.activeCardIndex = this.cardData[i].index; |
| 1867 | break; |
| 1868 | } |
| 1869 | } |
| 1870 | } |
| 1871 | } else if (state === 'timeline') { |
| 1872 | if (this.activeCard.period !== this.activePeriod.period) { |
| 1873 | for (var i = 0; i < this.periodData.length; i++) { |
| 1874 | if (this.activeCard.period === this.periodData[i].period) { |
| 1875 | this.activePeriod = this.periodData[i]; |
| 1876 | this.activePeriodIndex = this.periodData[i].index; |
| 1877 | break; |
| 1878 | } |
| 1879 | } |
| 1880 | } |
| 1881 | } |
| 1882 | this._shiftTimeline(); |
| 1883 | this._adjustCardContainer(); |
| 1884 | }; |
| 1885 | |
| 1886 | /* ── Init everything ── */ |
| 1887 | document.addEventListener('DOMContentLoaded', function() { |
| 1888 | initTheme(); |
| 1889 | initMobileMenu(); |
| 1890 | initScrollReveal(); |
| 1891 | initCounters(); |
| 1892 | initTerminal(); |
| 1893 | initNavHighlight(); |
| 1894 | initBackToTop(); |
| 1895 | var timeline = document.getElementById('mojoTimeline'); |
| 1896 | if (timeline) new PRESTimeline(timeline); |
| 1897 | }); |
| 1898 | })(); |
| 1899 | </script> |
| 1900 | </body> |
| 1901 | </html> |