/* ===== Custom Fonts ===== */ /* iA Writer Quattro S — self-hosted */ @font-face { font-family: "iA Writer Quattro S"; src: url("/fonts/iAWriterQuattroSRegular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; } /* Noto Sans SC — self-hosted */ @font-face { font-family: "Noto Sans SC"; src: url("/fonts/noto-sans-sc-400.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; } @font-face { font-family: "Noto Sans SC"; src: url("/fonts/noto-sans-sc-500.ttf") format("truetype"); font-weight: 500; font-style: normal; font-display: swap; } @font-face { font-family: "Noto Sans SC"; src: url("/fonts/noto-sans-sc-700.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: swap; } /* Global font stack: English → Chinese → system fallback */ html, body { font-family: "iA Writer Quattro S", "Noto Sans SC", sans-serif; } /* Code blocks keep monospace */ code, pre, kbd { font-family: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", "Noto Sans SC", monospace; } /* 段落:首行缩进两字;段间距比行距略小,段落之间靠空白分开 */ .content p { margin-top: 0.9rem; } /* 引用:不要左侧竖线,行距收紧,段与段之间也只留一点缝 */ .content blockquote { border-left: 0; padding-left: 0; padding-right: 0; line-height: 1.5; } .content blockquote p { margin-top: 0.35rem; line-height: inherit; text-indent: 2em; } .content blockquote p:first-child { margin-top: 0; } /* 正文与引文的段落首行缩进两字;列表页导语、边注不缩进 */ .content.post-body > p { text-indent: 2em; } /* .not-prose 的段落是刻意跳出正文排版的(如 /about/ 顶部那行 Fukun.Net/about),不缩进 */ .content.post-body > p.not-prose { text-indent: 0; } /* /blog/ 列表:标签与第一篇之间留一点距离(原先是
撑开的) */ .blog-index { margin-top: 0.125rem; } /* 文章页:面包屑到标题的间距,与 /blog/ 列表页保持一致(14px) */ .post-title-row { margin-top: 0.875rem; } /* 文章标题与列表标题同一套字:24px、常规字重,不要标题那么大那么重 */ .post-title { font-size: 1.5rem; line-height: 2rem; font-weight: 400; } /* 正文小标题:比主题默认小一号,h2 30px→24px,h3 24px→20px,保持层级差 */ /* 二级标题与正文同字号、加粗并缩进两字,做成文中的粗体小标题 */ .content h2 { font-size: 1rem; font-weight: 700; text-indent: 2em; } /* 三级标题再轻一点,免得比二级还重 */ .content h3 { font-size: 1rem; font-weight: 600; } .content p:first-child { margin-top: 0; } /* Remove navbar bottom border shadow */ .hextra-nav-container-blur { box-shadow: none !important; } /* Shift logo left to compensate for internal whitespace */ nav a:first-of-type img { margin-left: -10px; } /* Unified widths — all sections aligned at 76rem */ :root { --hx-color-dark: #000; --hextra-max-page-width: 76rem; --hextra-max-content-width: 76rem; --hextra-max-navbar-width: 57rem; --hextra-max-footer-width: 57rem; } /* Narrow left sidebar to half width — desktop only */ @media (min-width: 48rem) { .hextra-sidebar-container { width: 8rem !important; } } .dark body, body:where(.dark) { background-color: #000; } /* Footer: #fff light / #000 dark */ .hextra-footer { background-color: #fff !important; } .dark .hextra-footer, .hextra-footer:where(.dark *) { background-color: #000 !important; } /* Theme toggle icon visibility */ .theme-toggle-dark { display: none; } .theme-toggle-light { display: inline; } html.dark .theme-toggle-dark { display: inline; } html.dark .theme-toggle-light { display: none; } /* Poet epigraph keeps its newlines */ #typewriter-text { white-space: pre-wrap; } /* Vim-style block cursor via ::after */ #typewriter-text::after { content: ""; display: inline-block; width: 0.6em; height: 1.1em; background: #999; vertical-align: text-bottom; transform: translateY(-2px); margin-left: 1px; animation: vim-blink 0.8s step-end infinite; } @keyframes vim-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } } .dark #typewriter-text::after { background: #ccc; } /* Hide current page title in breadcrumb */ /* Image caption */ figcaption.post-caption { font-size: 0.85em; color: #888; text-align: center; margin-top: -0.25em; margin-bottom: 1em; } .dark figcaption.post-caption { color: #999; } .mermaid svg { max-width: 100%; height: auto; } .mermaid svg { max-width: 100%; height: auto; } .mermaid svg { width: 100% !important; height: auto !important; } .mermaid svg { max-width: none !important; height: auto; } /* .content .mermaid svg { max-width: 100%; height: auto; } */ /* Footer 3-column grid on desktop */ @media (min-width: 48rem) { .hextra-footer .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } } /* Footer brand column — extra breathing room */ .footer-brand .hx\:whitespace-pre-line { max-width: 18rem; } .footer-nav { padding-left: 1rem; padding-right: 1rem; } .footer-links { padding-left: 2rem; } .footer-roadmap { padding: 1rem 0; } /* ===== Post lists (home + /blog): whole card is one clickable link ===== */ #post-list .post-card { display: block; color: inherit; text-decoration: none; border-radius: 0.5rem; padding: 0.75rem 1rem; margin: 0 -1rem; transition: background-color 0.15s ease; } #post-list .post-card h3 { margin-top: 0; } #post-list .post-card:hover { background-color: rgba(0, 0, 0, 0.04); } html.dark #post-list .post-card:hover { background-color: rgba(255, 255, 255, 0.06); } #post-list .post-card:focus-visible { outline: 2px solid var(--hx-color-primary-500, currentColor); outline-offset: 2px; } /* Home: spacing between cards */ #post-list .home-post-item { margin-bottom: 0.5rem; } /* /blog list: keep the original item rhythm (旧 hx:mb-10 + h3 mt-8 的视觉间距) */ #post-list .blog-post-item { margin-bottom: 1rem; } /* ===== 注释(边注):宽屏显示在左侧留白并用折线连回原文,窄屏虚线框内嵌 ===== */ /* 零尺寸基准点:贴在原文所在行的基线上,用来精确算出「行」的垂直中点 */ .post-note-anchor { display: inline-block; width: 0; height: 1em; vertical-align: baseline; } .post-note-mark { font-size: 0.7em; line-height: 0; vertical-align: super; margin-left: 0.15em; color: #3b82f6; font-weight: 600; } .dark .post-note-mark { color: #60a5fa; } /* 窄屏 / 无 JS:虚线框内嵌在正文中 */ .post-note { display: block; margin: 0.5rem 0; padding: 0.5rem 0.75rem; font-style: normal; /* 引文块里的边注不要跟着斜体 */ border: 1px dashed #dbe0e6; border-radius: 0.375rem; font-size: 0.85rem; line-height: 1.7; color: #9aa1ab; text-indent: 0; } .dark .post-note { border-color: #333; color: #7e848c; } /* 书目边注:一行一项 */ .note-line { display: block; } .note-line + .note-line { margin-top: 0.12em; } .post-note.cite a { text-decoration: underline; text-underline-offset: 2px; word-break: break-word; } /* 边注里的链接跟注释文字同色,靠下划线表示可点,不要主题蓝 */ .post-note a, .dark .post-note a { color: inherit; } /* 注释卡片上的序号 */ .post-note-num { font-size: 0.72em; font-weight: 600; line-height: 0; vertical-align: super; margin-right: 0.45em; color: #b6bcc5; } .dark .post-note-num { color: #6b7078; } /* 宽屏:由 notes.js 接管,放进正文左侧的空白处 */ @media (min-width: 80rem) { html.js .post-note { display: none; } html.js main#content.notes-active { position: relative; } html.js main#content.notes-active .post-note.placed { display: block; position: absolute; z-index: 1; margin: 0; padding: 0 0.75rem; border: 0 solid #e4e8ee; border-right-width: 2px; border-radius: 0; background: none; font-size: 0.875rem; line-height: 1.75; color: #9aa1ab; } html.dark.js main#content.notes-active .post-note.placed { color: #7e848c; border-color: #2a2a2a; } /* 连接原文与注释卡片的折线 */ .post-notes-lines { position: absolute; z-index: 0; pointer-events: none; overflow: visible; } .post-notes-lines path { fill: none; stroke: #d7dce2; stroke-width: 1; } .post-notes-lines circle { fill: #c4cad3; } html.dark .post-notes-lines path { stroke: #353535; } html.dark .post-notes-lines circle { fill: #4a4a4a; } } @media print { .post-notes-lines { display: none !important; } .post-note { display: block !important; position: static !important; width: auto !important; border: 1px dashed #999 !important; padding: 0.5rem 0.75rem !important; } }