/* Transformers-specific styling additions */ /* Code comparison layout */ .code-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin: 2rem 0; align-items: start; } .code-compare .code-column { background: #ffffff; border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); } .code-compare .code-header { background: #f8f9fa; padding: 0.75rem 1rem; font-weight: 600; color: #495057; border-bottom: 1px solid #e2e8f0; font-size: 0.9em; } .code-compare pre { margin: 0; padding: 1rem; background: #ffffff; overflow-x: auto; font-size: 0.85em; line-height: 1.4; } .code-compare pre code { color: #374151; } /* Mobile responsiveness for code comparison */ @media (max-width: 768px) { .code-compare { grid-template-columns: 1fr; gap: 1rem; } } /* Tenet styling - special highlighting for design principles */ .tenet-list { margin: 3rem 0; } .tenet-list ol { counter-reset: tenet-counter -1; /* Start from 0 */ list-style: none; padding-left: 0; display: grid; grid-template-columns: 1fr; gap: 2.5rem; max-width: 900px; margin: 0 auto; } .tenet-list li.tenet { counter-increment: tenet-counter; background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%); border: 2px solid #e2e8f0; border-radius: 16px; padding: 2rem 2rem 2rem 4rem; margin: 0; position: relative; box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12); transition: all 0.3s ease; cursor: pointer; } .tenet-list li.tenet:hover { transform: translateY(-8px) scale(1.02); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25); border-color: rgba(0, 123, 255, 0.5); background: linear-gradient(135deg, #ffffff 0%, #f0f8ff 100%); } /* Colorful numbering system */ .tenet-list li.tenet:nth-child(1):before { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); } .tenet-list li.tenet:nth-child(2):before { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); } .tenet-list li.tenet:nth-child(3):before { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); } .tenet-list li.tenet:nth-child(4):before { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); } .tenet-list li.tenet:nth-child(5):before { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); } .tenet-list li.tenet:nth-child(6):before { background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%); } .tenet-list li.tenet:nth-child(7):before { background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%); } .tenet-list li.tenet:nth-child(8):before { background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%); } .tenet-list li.tenet:nth-child(9):before { background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%); } .tenet-list li.tenet:before { content: counter(tenet-counter); position: absolute; top: -12px; left: -12px; color: white; width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2em; font-weight: bold; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); border: 3px solid white; } .tenet-list li.tenet strong { color: #1a202c; font-size: 1.1em; display: block; margin-bottom: 0.5rem; } .tenet-list li.tenet em { color: #4a5568; font-size: 0.95em; font-style: italic; display: block; margin-top: 0.75rem; padding: 1rem; background: rgba(0, 0, 0, 0.03); border-radius: 8px; border-left: 3px solid #e2e8f0; } .tenet-list li.tenet p { color: #2d3748; line-height: 1.6; margin: 0.5rem 0; } /* Add a subtle pulse animation for the numbers */ @keyframes pulse-glow { 0% { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); } 50% { box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25); } 100% { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); } } .tenet-list li.tenet:hover:before { animation: pulse-glow 2s ease-in-out infinite; } /* Interactive component styling */ .interactive-demo { border: 1px solid #e2e8f0; border-radius: 12px; background: #ffffff; margin: 2rem 0; overflow: hidden; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07); } /* Model visualization fragment styling */ [id*="plot-model-visualisation"] { margin: 1rem -2rem !important; width: calc(100% + 4rem) !important; } .interactive-demo .demo-header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 1rem 1.5rem; font-weight: 600; } .interactive-demo .demo-content { padding: 1.5rem; } .interactive-demo .demo-footer { background: #f8f9fa; padding: 1rem 1.5rem; border-top: 1px solid #e2e8f0; color: #6c757d; font-size: 0.9em; } /* Button styling for interactive elements */ .btn-primary { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border: none; color: white; padding: 0.75rem 1.5rem; border-radius: 6px; font-weight: 500; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; } .btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3); } .btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; } /* Terminal styling */ .terminal-container { background: #1a202c; border-radius: 8px; padding: 1rem; color: #e2e8f0; font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace; font-size: 0.9em; } .terminal-input { background: #2d3748; border: 1px solid #4a5568; color: #e2e8f0; padding: 0.5rem; border-radius: 4px; width: 100%; font-family: inherit; } .terminal-output { background: #0a0e1a; padding: 1rem; border-radius: 4px; white-space: pre-wrap; word-break: break-all; min-height: 100px; max-height: 300px; overflow-y: auto; } /* Attention visualization styling */ .attention-matrix { font-family: monospace; font-size: 0.8em; border-collapse: collapse; margin: 1rem 0; } .attention-matrix td { border: 1px solid #ddd; padding: 4px 8px; text-align: center; min-width: 50px; } /* Memory chart styling */ .memory-chart-container { background: #f8f9fa; border: 2px solid #e9ecef; border-radius: 8px; padding: 1rem; margin: 1rem 0; } /* Image styling improvements */ img { max-width: 100%; height: auto; border-radius: 8px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); margin: 1.5rem 0; } /* Table of contents styling - Fixed positioning like ultrascale */ @media (min-width: 1200px) { d-article { overflow: visible !important; } d-contents { align-self: start !important; background: white !important; grid-column-start: 1 !important; grid-column-end: 4 !important; grid-row: auto / span 6 !important; justify-self: end !important; margin-top: 0em !important; padding-right: 3em !important; padding-left: 2em !important; position: -webkit-sticky !important; /* For Safari */ position: sticky !important; top: 10px !important; overflow-y: auto !important; height: calc(100vh - 40px) !important; scrollbar-width: none !important; transition: max-height 0.3s ease-out !important; z-index: -100 !important; display: block !important; visibility: visible !important; } } @media (max-width: 1199px) { d-contents { display: none !important; background: white !important; justify-self: start !important; align-self: start !important; padding-bottom: 0.5em !important; margin-bottom: 1em !important; padding-left: 0.25em !important; border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important; overflow-y: scroll !important; height: calc(100vh - 40px) !important; scrollbar-width: none !important; z-index: -100 !important; } } /* Force TOC to be visible and override distill defaults */ d-contents { display: block !important; visibility: visible !important; opacity: 1 !important; } /* TOC Navigation styling */ d-contents .toc-header { margin-bottom: 1.5rem; border-bottom: 2px solid #007bff; padding-bottom: 0.5rem; } d-contents .toc-title { font-weight: bold; font-size: 1.2em; color: #333; } d-contents nav a { color: rgba(0, 0, 0, 0.7); text-decoration: none; border-bottom: none; display: block; padding: 0.3rem 0; font-size: 0.9em; line-height: 1.4; transition: color 0.2s ease; } d-contents nav a:hover { color: #007bff; text-decoration: none; } d-contents nav a.active { color: #007bff; font-weight: 600; } d-contents nav div { margin-bottom: 0.2rem; } /* Smooth scrollbar */ d-contents { scrollbar-width: thin; scrollbar-color: rgba(0, 123, 255, 0.3) transparent; } d-contents::-webkit-scrollbar { width: 6px; } d-contents::-webkit-scrollbar-track { background: transparent; } d-contents::-webkit-scrollbar-thumb { background: rgba(0, 123, 255, 0.3); border-radius: 3px; } d-contents::-webkit-scrollbar-thumb:hover { background: rgba(0, 123, 255, 0.5); } /* Custom tooltip styling for tenet links */ d-contents nav a[title] { position: relative; cursor: help; } d-contents nav a[title]:hover { color: #667eea; } /* Enhanced tooltip using CSS (fallback for title attribute) */ d-contents nav a[title]:after { content: attr(title); position: absolute; left: 100%; top: 50%; transform: translateY(-50%); background: #1a202c; color: white; padding: 0.75rem 1rem; border-radius: 8px; font-size: 0.85em; white-space: normal; width: 300px; line-height: 1.4; z-index: 1001; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; pointer-events: none; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); } d-contents nav a[title]:before { content: ''; position: absolute; left: 100%; top: 50%; transform: translate(-8px, -50%); border: 8px solid transparent; border-right-color: #1a202c; z-index: 1002; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; } d-contents nav a[title]:hover:after, d-contents nav a[title]:hover:before { opacity: 1; visibility: visible; } /* Adjust for smaller screens */ @media (max-width: 1400px) { d-contents nav a[title]:after { left: auto; right: 100%; margin-right: 1rem; width: 250px; } d-contents nav a[title]:before { left: auto; right: 100%; transform: translate(8px, -50%); border-right-color: transparent; border-left-color: #1a202c; } } /* Improve code syntax highlighting with Prism */ pre[class*="language-"] { background: #f8f9fa !important; border: 1px solid #e9ecef !important; border-radius: 8px !important; padding: 1.5rem !important; margin: 1.5rem 0 !important; overflow-x: auto !important; font-size: 0.9em !important; line-height: 1.5 !important; } code[class*="language-"] { background: none !important; font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Courier New', monospace !important; color: #383a42 !important; } /* Inline code */ p code, li code { background: #f1f3f4 !important; padding: 0.2em 0.4em !important; border-radius: 3px !important; font-size: 0.9em !important; color: #d73a49 !important; } /* Distill article improvements */ d-article { max-width: none; font-size: 19px; line-height: 1.7 !important; color: #1a1a1a; padding-top: 1rem !important; grid-row-gap: 0 !important; } d-article > * { grid-column: middle !important; max-width: none; } /* Adjust for TOC on larger screens */ @media (min-width: 1200px) { d-article > * { grid-column: text / page-end !important; max-width: none; } } /* Improve paragraph readability */ d-article p { font-size: 19px; line-height: 1.5; margin-top: 0 !important; color: #1a1a1a; } /* Improve heading sizes */ d-article h1 { font-size: 3rem; line-height: 1.2; margin: 3rem 0 2rem 0; color: #1a202c; font-weight: 700; } d-article h2 { font-size: 2.5rem; line-height: 1.3; margin: 1.5rem 0 0.75rem 0 !important; padding-bottom: 0.5rem !important; color: #1a202c; font-weight: 650; } d-article h3 { font-size: 2rem; line-height: 1.4; margin: 2rem 0 1rem 0; color: #1a202c; font-weight: 600; } d-article h4 { font-size: 1.5rem; line-height: 1.4; margin: 1.5rem 0 1rem 0; color: #2d3748; font-weight: 600; } /* Improve list readability */ d-article ul li, d-article ol li { font-size: 18px; line-height: 1.7; margin-bottom: 0.5rem; } /* Enhanced tenet reference styling with custom tooltips */ a[href^="#source-of-truth"], a[href^="#one-model-one-file"], a[href^="#code-is-product"], a[href^="#standardize-dont-abstract"], a[href^="#do-repeat-yourself"], a[href^="#minimal-user-api"], a[href^="#backwards-compatibility"], a[href^="#consistent-public-surface"], a[href^="#modular-toolbox"] { position: relative; color: #667eea; font-weight: 600; text-decoration: underline; text-decoration-color: rgba(102, 126, 234, 0.3); transition: all 0.3s ease; } a[href^="#source-of-truth"]:hover, a[href^="#one-model-one-file"]:hover, a[href^="#code-is-product"]:hover, a[href^="#standardize-dont-abstract"]:hover, a[href^="#do-repeat-yourself"]:hover, a[href^="#minimal-user-api"]:hover, a[href^="#backwards-compatibility"]:hover, a[href^="#consistent-public-surface"]:hover, a[href^="#modular-toolbox"]:hover { color: #4c51bf; text-decoration-color: #4c51bf; background: rgba(102, 126, 234, 0.1); padding: 2px 4px; border-radius: 4px; } /* Custom tooltip using data-tooltip attribute */ a[data-tooltip]:after { content: attr(data-tooltip); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: #1a202c; color: white; padding: 0.75rem 1rem; border-radius: 8px; font-size: 0.85em; font-weight: 400; white-space: normal; width: 320px; line-height: 1.4; z-index: 1001; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; pointer-events: none; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); margin-bottom: 8px; } a[data-tooltip]:before { content: ''; position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); border: 8px solid transparent; border-top-color: #1a202c; z-index: 1002; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; } a[data-tooltip]:hover:after, a[data-tooltip]:hover:before { opacity: 1; visibility: visible; } /* Breadcrumb navigation styling */ .crumbs { background: linear-gradient(135deg, #f0f4ff 0%, #e6eeff 100%); border-left: 5px solid #667eea; padding: 1.25rem 1.75rem; margin: 2.5rem 0; border-radius: 0 8px 8px 0; box-shadow: 0 2px 8px rgba(102, 126, 234, 0.12); font-size: 0.95em; line-height: 1.6; color: #4a5568; } .crumbs strong { color: #667eea; font-weight: 700; } .crumbs code { background: rgba(102, 126, 234, 0.1); padding: 0.15em 0.4em; border-radius: 3px; font-size: 0.9em; color: #4c51bf; } .crumbs a { color: #667eea; font-weight: 500; } /* Improve blockquote styling */ d-article blockquote { font-size: 19px; line-height: 1.8; padding: 1.5rem 2rem; margin: 2rem 0; border-left: 4px solid #667eea; background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 50%); border-radius: 0 8px 8px 0; font-style: italic; color: #4a5568; } /* Link capsule styling - only for external HTTP(S) links */ d-article a[href^="http://"], d-article a[href^="https://"] { background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%); color: #1565c0; text-decoration: none; padding: 0.15em 0.5em; border-radius: 12px; border: 1px solid #90caf9; display: inline-block; transition: all 0.3s ease; font-weight: 500; box-shadow: 0 1px 3px rgba(21, 101, 192, 0.15); } d-article a[href^="http://"]:hover, d-article a[href^="https://"]:hover { background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%); color: white; border-color: #1565c0; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(21, 101, 192, 0.3); } d-article a[href^="http://"]:active, d-article a[href^="https://"]:active { transform: translateY(0); box-shadow: 0 1px 3px rgba(21, 101, 192, 0.2); } /* Full width elements */ d-article .code-compare, d-article .interactive-demo, d-article .memory-chart-container { max-width: none; width: 100%; margin-left: 0; margin-right: 0; } /* Responsive design improvements */ @media (max-width: 1200px) { d-article .code-compare, d-article .interactive-demo { max-width: 95%; margin-left: auto; margin-right: auto; } } @media (max-width: 768px) { .tenet-list li.tenet { padding: 1rem; } .interactive-demo .demo-content { padding: 1rem; } }