diff --git a/global/src/styles/global.css b/global/src/styles/global.css new file mode 100644 index 0000000..9b4455c --- /dev/null +++ b/global/src/styles/global.css @@ -0,0 +1,323 @@ +/* ── Local fonts (no CDN) ─────────────────────────────────────────────────── */ +@font-face { + font-family: 'Inter'; + src: url('/fonts/Inter-Regular.woff2') format('woff2'); + font-weight: 400; + font-style: normal; + font-display: swap; +} +@font-face { + font-family: 'Inter'; + src: url('/fonts/Inter-Medium.woff2') format('woff2'); + font-weight: 500; + font-style: normal; + font-display: swap; +} +@font-face { + font-family: 'Inter'; + src: url('/fonts/Inter-SemiBold.woff2') format('woff2'); + font-weight: 600; + font-style: normal; + font-display: swap; +} +@font-face { + font-family: 'Inter'; + src: url('/fonts/Inter-Bold.woff2') format('woff2'); + font-weight: 700; + font-style: normal; + font-display: swap; +} + +/* ── Reset + base ─────────────────────────────────────────────────────────── */ +*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } +html { + scroll-behavior: smooth; + overflow-x: hidden; + max-width: 100vw; +} +body { + font-family: 'Inter', system-ui, sans-serif; + background: #FAF7F0; + color: #263238; + direction: ltr; + -webkit-font-smoothing: antialiased; + min-height: 100vh; + overflow-x: hidden; + max-width: 100vw; + word-wrap: break-word; + overflow-wrap: break-word; +} +#root { + min-height: 100vh; + overflow-x: hidden; + max-width: 100vw; +} +button, input, select, textarea { font-family: 'Inter', system-ui, sans-serif; } +a { color: inherit; text-decoration: none; } +img { + max-width: 100%; + height: auto; +} +::-webkit-scrollbar { width: 6px; height: 6px; } +::-webkit-scrollbar-track { background: #FAF7F0; } +::-webkit-scrollbar-thumb { background: #E4DDD2; border-radius: 3px; } +::-webkit-scrollbar-thumb:hover { background: #5F6B6D; } + +/* ── Animation keyframes (shared) ─────────────────────────────────────────── */ +@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } } +@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } } +@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } } +@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } +@keyframes float-y { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } } +@keyframes goldShimmer { + 0% { background-position: -200% 0; } + 100% { background-position: 200% 0; } +} +@keyframes pulseRing { + 0% { box-shadow: 0 0 0 0 rgba(15,107,115,0.35); } + 70% { box-shadow: 0 0 0 14px rgba(15,107,115,0); } + 100% { box-shadow: 0 0 0 0 rgba(15,107,115,0); } +} +@keyframes heroReveal { + from { opacity: 0; filter: blur(6px); transform: translateY(18px); } + to { opacity: 1; filter: blur(0); transform: translateY(0); } +} +@keyframes pulse { + 0%, 100% { box-shadow: 0 0 0 3px #D49A2A30; } + 50% { box-shadow: 0 0 0 6px #D49A2A15; } +} + +/* ── Utility classes ──────────────────────────────────────────────────────── */ +.gold-shimmer { + background: linear-gradient(90deg, #A8761B 0%, #D49A2A 30%, #F4C36A 50%, #D49A2A 70%, #A8761B 100%); + background-size: 200% auto; + -webkit-background-clip: text; + background-clip: text; + -webkit-text-fill-color: transparent; + animation: goldShimmer 5s linear infinite; +} +.hero-tilt { transition: transform 0.4s cubic-bezier(.2,.8,.2,1); will-change: transform; } +.lift-on-hover { transition: transform 0.25s ease, box-shadow 0.25s ease; } +.lift-on-hover:hover { transform: translateY(-3px); } + +/* Focus styles for accessibility */ +button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { + outline: 2px solid #0F6B73; + outline-offset: 2px; +} + +/* Mobile nav helper */ +@media (max-width: 768px) { + .desktop-nav { display: none !important; } + .mobile-menu-btn { display: flex !important; } +} + +@media (max-width: 560px) { + body { text-rendering: optimizeLegibility; } + + * { + max-width: 100vw; + word-wrap: break-word; + overflow-wrap: break-word; + } + + pre, code, table { + max-width: 100%; + overflow-x: auto; + } + + .site-header-inner { + height: 56px !important; + padding-inline: 14px !important; + gap: 12px !important; + } + + .site-header-actions { gap: 6px !important; margin-inline-start: auto; } + .site-auth-actions { display: none !important; } + + .site-search-strip { padding: 10px 12px !important; } + + .site-search-form, + .article-search-form { gap: 8px !important; } + + .site-search-form button, + .article-search-form button, + .home-hero-actions button, + .load-more-wrap button { + min-height: 38px !important; + padding: 8px 14px !important; + border-radius: 9px !important; + font-size: 12px !important; + line-height: 1.5 !important; + } + + .mobile-drawer-panel { + width: min(84vw, 300px) !important; + padding: 18px !important; + } + + .home-hero-inner { padding: 44px 16px 48px !important; } + .home-hero-actions { gap: 8px !important; } + .home-section { padding-block: 28px !important; } + + .article-list-page { padding-top: 64px !important; } + .article-list-inner { padding-inline: 16px !important; } + .article-list-head { padding-top: 22px !important; } + .article-list-head h1 { font-size: 24px !important; line-height: 1.35 !important; } + + .filter-bar { margin-bottom: 16px !important; gap: 8px !important; } + .filter-chip-row { + flex-wrap: nowrap !important; + overflow-x: auto; + padding-bottom: 2px; + scrollbar-width: none; + } + .filter-chip-row::-webkit-scrollbar { display: none; } + .filter-chip-row button { padding: 4px 10px !important; font-size: 11px !important; } + + .article-row { + grid-template-columns: 1fr !important; + gap: 10px !important; + padding: 20px 0 !important; + } + .article-row-thumb { display: none !important; } + .article-row h2 { font-size: 17px !important; line-height: 1.65 !important; } + .article-row p { font-size: 13px !important; line-height: 1.8 !important; margin-bottom: 8px !important; } + .article-row-meta, + .article-row-stats { + gap: 8px !important; + font-size: 11px !important; + overflow-x: auto; + flex-wrap: nowrap !important; + scrollbar-width: none; + } + .article-row-meta::-webkit-scrollbar, + .article-row-stats::-webkit-scrollbar { display: none; } + + .article-detail-page { padding-top: 56px !important; } + + .article-breadcrumb { + padding: 9px 14px !important; + font-size: 11px !important; + overflow-x: auto; + white-space: nowrap; + scrollbar-width: none; + -ms-overflow-style: none; + } + .article-breadcrumb::-webkit-scrollbar { display: none; } + + .article-layout { + padding: 22px 16px !important; + gap: 20px !important; + grid-template-columns: 1fr !important; + max-width: 100vw; + overflow-x: hidden; + min-width: 0 !important; + } + + .article-main { + max-width: none !important; + width: 100% !important; + min-width: 0 !important; + overflow-x: hidden; + } + + .article-header { + margin-bottom: 22px !important; + padding-bottom: 18px !important; + overflow-x: hidden; + max-width: 100%; + } + + .article-header h1 { + font-size: clamp(20px, 5vw, 23px) !important; + line-height: 1.4 !important; + word-wrap: break-word !important; + overflow-wrap: break-word !important; + max-width: 100% !important; + } + + .article-content { + font-size: 15px !important; + line-height: 1.9 !important; + max-width: 100% !important; + overflow-x: hidden !important; + word-wrap: break-word !important; + overflow-wrap: break-word !important; + } + + .article-content * { max-width: 100% !important; } + + .article-content pre { + overflow-x: auto !important; + max-width: calc(100vw - 32px) !important; + } + + .article-content table { + display: block !important; + overflow-x: auto !important; + max-width: 100% !important; + } + + .article-author-box { + padding: 16px !important; + gap: 12px !important; + max-width: 100% !important; + flex-wrap: wrap !important; + } + + .article-related { margin-top: 34px !important; max-width: 100% !important; } + + article h2 { + font-size: 19px !important; + line-height: 1.5 !important; + margin: 30px 0 12px !important; + word-wrap: break-word !important; + overflow-wrap: break-word !important; + } + + article p { + margin-bottom: 16px !important; + word-wrap: break-word !important; + overflow-wrap: break-word !important; + } + + article blockquote { + margin: 22px 0 !important; + padding: 12px 14px !important; + font-size: 14px !important; + line-height: 1.9 !important; + max-width: 100% !important; + word-wrap: break-word !important; + overflow-wrap: break-word !important; + } + + .insight-box, + .footnote-box { + padding: 14px !important; + border-radius: 10px !important; + max-width: 100% !important; + word-wrap: break-word !important; + overflow-wrap: break-word !important; + } +} + +/* Loading state */ +#loading { + position: fixed; inset: 0; background: #FAF7F0; + display: flex; align-items: center; justify-content: center; + flex-direction: column; z-index: 9999; font-family: 'Inter', sans-serif; + transition: opacity 0.4s; +} +#loading.hidden { opacity: 0; pointer-events: none; } + +/* Diagram skeleton placeholder */ +.tek-diagram-skeleton { + width: 100%; + height: 100%; + min-height: 120px; + border-radius: 8px; + background: linear-gradient(90deg, #ebe3d2 25%, #f4efe6 50%, #ebe3d2 75%); + background-size: 200% 100%; + animation: shimmer 1.4s infinite; +}