:root { color-scheme: dark; --bg: #0b0b0f; --panel: #12121e; --text: #e4e4eb; --muted: #8b8b9e; --border: rgba(255, 255, 255, 0.07); --link: #7db4f5; --codebg: rgba(255, 255, 255, 0.05); --shadow: rgba(0, 0, 0, 0.4); --accent: rgba(125, 180, 245, 0.08); --radius: 10px; --gutter: 16px; --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; --sans: "Geist", -apple-system, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; } @media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { color-scheme: light; --bg: #f8f8fa; --panel: #ffffff; --text: #1a1a2e; --muted: #64648a; --border: rgba(0, 0, 0, 0.08); --link: #2563eb; --codebg: rgba(0, 0, 0, 0.04); --shadow: rgba(0, 0, 0, 0.06); --accent: rgba(37, 99, 235, 0.06); } } :root[data-theme="light"] { color-scheme: light; --bg: #f8f8fa; --panel: #ffffff; --text: #1a1a2e; --muted: #64648a; --border: rgba(0, 0, 0, 0.08); --link: #2563eb; --codebg: rgba(0, 0, 0, 0.04); --shadow: rgba(0, 0, 0, 0.06); --accent: rgba(37, 99, 235, 0.06); } * { box-sizing: border-box; } html, body { height: 100%; } body { margin: 0; font-family: var(--sans); font-weight: 400; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } a { color: var(--link); text-decoration: none; } a:hover { text-decoration: underline; } /* App shell */ .app { min-height: 100%; display: flex; flex-direction: column; } /* Header */ .header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px; padding: 0 var(--gutter); height: 48px; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); max-width: 100%; } .brand { font-family: var(--mono); font-weight: 700; font-size: 14px; color: var(--text); letter-spacing: -0.02em; white-space: nowrap; flex-shrink: 0; } .brand:hover { text-decoration: none; opacity: 0.8; } /* Nav — inline in header */ .nav { display: flex; gap: 2px; margin-left: 12px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; } .nav::-webkit-scrollbar { display: none; } .nav a { padding: 6px 10px; border-radius: 6px; color: var(--muted); font-size: 13px; font-weight: 500; white-space: nowrap; transition: color 0.1s, background 0.1s; } .nav a:hover { color: var(--text); background: var(--codebg); text-decoration: none; } .nav a[aria-current="page"] { color: var(--text); background: var(--accent); } /* Header right */ .header-right { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-shrink: 0; } .header-link { padding: 5px 10px; font-size: 13px; font-weight: 500; border-radius: 6px; color: var(--muted); white-space: nowrap; } .header-link:hover { color: var(--text); background: var(--codebg); text-decoration: none; } /* Theme toggle */ .theme-toggle { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; background: transparent; border: 1px solid var(--border); border-radius: 6px; cursor: pointer; color: var(--muted); transition: color 0.15s, border-color 0.15s; } .theme-toggle:hover { color: var(--text); border-color: var(--muted); } .theme-toggle .icon-moon { display: none; } :root[data-theme="dark"] .theme-toggle .icon-sun { display: none; } :root[data-theme="dark"] .theme-toggle .icon-moon { display: block; } :root[data-theme="light"] .theme-toggle .icon-sun { display: block; } :root[data-theme="light"] .theme-toggle .icon-moon { display: none; } /* Main content */ .main { flex: 1; width: 100%; max-width: 720px; margin: 0 auto; padding: var(--gutter); } .content { border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); padding: 28px 32px; } /* Footer */ .site-footer { padding: 16px var(--gutter); text-align: center; border-top: 1px solid var(--border); } .footer-link { font-size: 12px; color: var(--muted); } .footer-link:hover { color: var(--text); text-decoration: none; } /* Content typography */ .content h1, .content h2, .content h3 { scroll-margin-top: 64px; letter-spacing: -0.01em; } .content h1 { margin-top: 0; font-size: 24px; font-weight: 700; } .content h2 { font-size: 17px; font-weight: 600; margin-top: 36px; padding-top: 16px; border-top: 1px solid var(--border); } .content h2:first-of-type { border-top: none; padding-top: 0; } .content h3 { font-size: 14px; font-weight: 600; margin-top: 24px; color: var(--muted); } .content p, .content li { line-height: 1.7; font-size: 14px; } .content code { font-family: var(--mono); font-size: 0.85em; background: var(--codebg); padding: 2px 5px; border-radius: 4px; border: 1px solid var(--border); } .content pre { overflow-x: auto; padding: 14px 16px; border-radius: 8px; background: var(--codebg); border: 1px solid var(--border); font-size: 13px; line-height: 1.6; } .content pre code { background: transparent; padding: 0; border: none; font-size: inherit; } .content details { margin: 12px 0; border: 1px solid var(--border); border-radius: 8px; } .content details summary { cursor: pointer; padding: 10px 14px; font-size: 14px; border-radius: 8px; } .content details summary:hover { background: var(--accent); } .content details[open] summary { border-bottom: 1px solid var(--border); border-radius: 8px 8px 0 0; } .content details > :not(summary) { padding: 0 14px; } .content hr { border: none; border-top: 1px solid var(--border); margin: 28px 0; } .content blockquote { border-left: 3px solid var(--link); margin: 16px 0; padding: 4px 16px; color: var(--muted); background: var(--accent); border-radius: 0 6px 6px 0; } .content table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 16px 0; } .content th, .content td { padding: 8px 12px; border: 1px solid var(--border); text-align: left; } .content th { background: var(--codebg); font-weight: 600; } .empty { color: var(--muted); } /* Mobile */ @media (max-width: 640px) { .header { gap: 4px; padding: 0 12px; } .nav { margin-left: 8px; gap: 0; } .nav a { padding: 6px 8px; font-size: 12px; } .header-link { font-size: 12px; padding: 5px 8px; } .main { padding: 12px; } .content { padding: 20px 16px; border-radius: 8px; } .content h1 { font-size: 20px; } .content h2 { font-size: 16px; } .content pre { font-size: 12px; padding: 12px; } }