@font-face {
	font-family: "JetBrains Mono NF";
	src: url("/assets/fonts/jetbrains-mono-nf.woff2") format("woff2");
	font-style: normal;
	font-weight: 400;
	font-display: swap;
}


/*
 * Light palette: the base foreground/background and primary accents come
 * from the user's local Otty One Light theme. Small semantic text uses the
 * paired high-contrast fish colors so it stays legible at website sizes.
 */
:root {
	color-scheme: light;
	--paper: #f8f8f8;
	--ink: #2a2b33;
	--muted: #6a737d;
	--faint: #959da5;
	--hairline: #d9d9dc;
	--soft: #eef0f3;
	--surface: #ffffff;
	--surface-raised: #ffffff;
	--surface-hover: #e8edf6;
	--surface-even: #fbfbfb;
	--border-soft: #dedee1;
	--border-strong: #bbbbbb;
	--line-number: #959da5;
	--body-muted: #4f515b;
	--muted-strong: #555862;
	--ascii: #555862;
	--ascii-strong: #2a2b33;
	--mark-fill: #f8f8f8;
	--mark-stroke: #6a737d;
	--selection-bg: #dbeafe;
	--selection-text: #24292e;
	--success-bg: #eaf5ea;
	--success-text: #176f2c;
	--accent-cyan: #2f5af3;
	--accent-iris: #a00095;
	--tree-open-label: var(--accent-cyan);
	--accent-gold: #8a5a00;
	--accent-love: #b31d28;
	--math-filter: none;
	--theme-bg: var(--paper);
	--theme-text: var(--ink);
	--theme-heading: var(--ink);
	--theme-code-bg: var(--surface);
	--theme-code-text: var(--ink);
	--theme-code-border: var(--border-soft);
	--theme-pre-bg: var(--surface);
	--theme-pre-border: var(--border-soft);
	--theme-line-numbers-border: var(--hairline);
	--theme-line-numbers-text: var(--line-number);
	--theme-copy-btn-bg: var(--surface-raised);
	--theme-copy-btn-text: var(--muted);
	--theme-copy-btn-border: var(--border-strong);
	--theme-copy-btn-hover-bg: var(--surface-hover);
	--theme-copy-btn-hover-text: var(--ink);
	--theme-copy-btn-copied-bg: var(--success-bg);
	--theme-copy-btn-copied-text: var(--success-text);
	--theme-copy-btn-copied-border: var(--success-text);
	--theme-table-border: var(--hairline);
	--theme-table-header-bg: var(--surface);
	--theme-table-row-even: var(--surface-even);
	--theme-table-row-hover: var(--surface-hover);
	--theme-math-filter: var(--math-filter);
	--theme-back-to-top: var(--muted);
	--theme-back-to-top-hover: var(--ink);
	--highlight-weak: #eef0f3;
	--highlight-strong: #dbeafe;
	font-synthesis: none;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
}

/*
 * Dark palette: Rosé Pine supplies the page/surface hierarchy, while the
 * semantic cyan, purple and yellow come from the user's fish Dracula theme.
 * The page deliberately avoids pure black and pure white.
 */
html[data-theme="dark"] {
	color-scheme: dark;
	--paper: #191724;
	--ink: #e0def4;
	--muted: #908caa;
	--faint: #6e6a86;
	--hairline: #403d52;
	--soft: #26233a;
	--surface: #1f1d2e;
	--surface-raised: #26233a;
	--surface-hover: #2a273f;
	--surface-even: #211f31;
	--border-soft: #403d52;
	--border-strong: #524f67;
	--line-number: #6e6a86;
	--body-muted: #c8c5dc;
	--muted-strong: #b4b0c8;
	--ascii: #6e6a86;
	--ascii-strong: #908caa;
	--mark-fill: #c4a7e7;
	--mark-stroke: #908caa;
	--selection-bg: #403d52;
	--selection-text: #e0def4;
	--success-bg: #21352e;
	--success-text: #50fa7b;
	--accent-cyan: #8be9fd;
	--accent-iris: #bd93f9;
	--tree-open-label: var(--accent-iris);
	--accent-gold: #f1fa8c;
	--accent-love: #ff5555;
	--math-filter: invert(1) hue-rotate(180deg);
	--theme-bg: var(--paper);
	--theme-text: var(--ink);
	--theme-heading: var(--ink);
	--theme-code-bg: var(--surface);
	--theme-code-text: var(--ink);
	--theme-code-border: var(--border-soft);
	--theme-pre-bg: var(--surface);
	--theme-pre-border: var(--border-soft);
	--theme-line-numbers-border: var(--hairline);
	--theme-line-numbers-text: var(--line-number);
	--theme-copy-btn-bg: var(--surface-raised);
	--theme-copy-btn-text: var(--muted);
	--theme-copy-btn-border: var(--border-strong);
	--theme-copy-btn-hover-bg: var(--surface-hover);
	--theme-copy-btn-hover-text: var(--ink);
	--theme-copy-btn-copied-bg: var(--success-bg);
	--theme-copy-btn-copied-text: var(--success-text);
	--theme-copy-btn-copied-border: var(--success-text);
	--theme-table-border: var(--hairline);
	--theme-table-header-bg: var(--surface);
	--theme-table-row-even: var(--surface-even);
	--theme-table-row-hover: var(--surface-hover);
	--theme-math-filter: var(--math-filter);
	--theme-back-to-top: var(--muted);
	--theme-back-to-top-hover: var(--ink);
	--highlight-weak: #26233a;
	--highlight-strong: #403d52;
}

@media (prefers-color-scheme: dark) {
	html:not([data-theme]) {
		color-scheme: dark;
		--paper: #191724;
		--ink: #e0def4;
		--muted: #908caa;
		--faint: #6e6a86;
		--hairline: #403d52;
		--soft: #26233a;
		--surface: #1f1d2e;
		--surface-raised: #26233a;
		--surface-hover: #2a273f;
		--surface-even: #211f31;
		--border-soft: #403d52;
		--border-strong: #524f67;
		--line-number: #6e6a86;
		--body-muted: #c8c5dc;
		--muted-strong: #b4b0c8;
		--ascii: #6e6a86;
		--ascii-strong: #908caa;
		--mark-fill: #c4a7e7;
		--mark-stroke: #908caa;
		--selection-bg: #403d52;
		--selection-text: #e0def4;
		--success-bg: #21352e;
		--success-text: #50fa7b;
		--accent-cyan: #8be9fd;
		--accent-iris: #bd93f9;
		--tree-open-label: var(--accent-iris);
		--accent-gold: #f1fa8c;
		--accent-love: #ff5555;
		--math-filter: invert(1) hue-rotate(180deg);
		--theme-bg: var(--paper);
		--theme-text: var(--ink);
		--theme-heading: var(--ink);
		--theme-code-bg: var(--surface);
		--theme-code-text: var(--ink);
		--theme-code-border: var(--border-soft);
		--theme-pre-bg: var(--surface);
		--theme-pre-border: var(--border-soft);
		--theme-line-numbers-border: var(--hairline);
		--theme-line-numbers-text: var(--line-number);
		--theme-copy-btn-bg: var(--surface-raised);
		--theme-copy-btn-text: var(--muted);
		--theme-copy-btn-border: var(--border-strong);
		--theme-copy-btn-hover-bg: var(--surface-hover);
		--theme-copy-btn-hover-text: var(--ink);
		--theme-copy-btn-copied-bg: var(--success-bg);
		--theme-copy-btn-copied-text: var(--success-text);
		--theme-copy-btn-copied-border: var(--success-text);
		--theme-table-border: var(--hairline);
		--theme-table-header-bg: var(--surface);
		--theme-table-row-even: var(--surface-even);
		--theme-table-row-hover: var(--surface-hover);
		--theme-math-filter: var(--math-filter);
		--theme-back-to-top: var(--muted);
		--theme-back-to-top-hover: var(--ink);
		--highlight-weak: #26233a;
		--highlight-strong: #403d52;
	}
}

html,
body {
	min-height: 100%;
	background: var(--paper) !important;
	color: var(--ink) !important;
}

body {
	width: 100%;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	font-family: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", STSong, SimSun, serif;
	font-size: 16px;
}

::selection {
	background: var(--selection-bg);
	color: var(--selection-text);
}

/* ---------- fixed shell ---------- */

header.site-header:first-of-type {
	position: fixed;
	top: 52px;
	left: 68px;
	z-index: 30;
	margin: 0;
	padding: 0;
}

.site-mark {
	color: var(--mark-fill);
	font-family: "JetBrains Mono NF", monospace;
	font-size: 11px;
	line-height: 1;
	letter-spacing: 0.03em;
	-webkit-text-stroke: 0.55px var(--mark-stroke);
	user-select: none;
}

header.site-header:nth-of-type(2) {
	position: fixed;
	top: 100px;
	left: 68px;
	z-index: 30;
	margin: 0;
	padding: 0;
	font-family: "JetBrains Mono NF", monospace;
}

.site-nav {
	width: 150px;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0;
}

.site-nav::before {
	content: "~/";
	display: block;
	height: 24px;
	color: var(--muted);
	font-size: 11px;
	line-height: 24px;
}

.site-nav a:any-link {
	position: relative;
	height: 24px;
	padding: 0 0 0 35px;
	display: flex;
	align-items: center;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	background: transparent;
	color: var(--muted);
	font-family: "JetBrains Mono NF", monospace;
	font-size: 11px;
	line-height: 24px;
	text-decoration: none;
	transition: color 120ms ease, background-color 120ms ease;
}

.site-nav a::before {
	content: "├──";
	position: absolute;
	left: 0;
	width: 29px;
	color: var(--faint);
	text-align: right;
}

.site-nav a:last-of-type::before {
	content: "└──";
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a.is-active {
	background: transparent;
	color: var(--ink);
	outline: none;
}

.site-nav a.is-active {
	color: var(--accent-cyan);
	font-weight: 600;
}

.site-nav a:hover::before,
.site-nav a:focus-visible::before,
.site-nav a.is-active::before {
	color: var(--muted);
}

html.has-bilingual .lang-toggle-btn {
	width: max-content;
	height: 22px;
	margin: 13px 0 0 9px;
	padding: 0;
	display: flex;
	align-items: center;
	gap: 6px;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var(--muted);
	font-family: "JetBrains Mono NF", monospace;
	font-size: 10px;
	line-height: 22px;
}

.theme-toggle-btn {
	width: max-content;
	height: 22px;
	margin: 13px 0 0 9px;
	padding: 0;
	display: flex !important;
	align-items: center;
	gap: 6px;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var(--muted);
	font-family: "JetBrains Mono NF", monospace;
	font-size: 10px;
	line-height: 22px;
	cursor: pointer;
}

html.has-bilingual .theme-toggle-btn {
	margin-top: 4px;
}

.lang-toggle-btn::before,
.theme-toggle-btn::before {
	color: var(--faint);
}

.lang-toggle-btn::before {
	content: "lang:";
}

.theme-toggle-btn::before {
	content: "theme:";
}

.lang-toggle-btn .toggle-icon {
	display: none;
}

.theme-toggle-btn .toggle-icon {
	width: 18px;
	height: 18px;
	color: currentColor !important;
}

.theme-toggle-btn.is-dark {
	color: var(--accent-gold);
}

html[data-theme="dark"] .theme-toggle-btn .ui-icon-tint {
	fill: var(--accent-iris);
	opacity: 0.28;
}

.lang-toggle-btn:hover,
.lang-toggle-btn:focus-visible,
.theme-toggle-btn:hover,
.theme-toggle-btn:focus-visible {
	background: transparent;
	outline: 0;
}

.lang-toggle-btn:hover,
.lang-toggle-btn:focus-visible {
	color: var(--ink);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.theme-toggle-btn:hover,
.theme-toggle-btn:focus-visible {
	color: var(--accent-cyan);
}

.lang-toggle-btn:focus-visible,
.theme-toggle-btn:focus-visible {
	outline: 1px solid var(--accent-cyan);
	outline-offset: 3px;
}

footer {
	position: fixed;
	left: 68px;
	bottom: 52px;
	z-index: 20;
	margin: 0;
	padding: 0;
	color: var(--muted);
	font-family: "JetBrains Mono NF", monospace;
	font-size: 10px;
	line-height: 1.5;
}

footer a:any-link {
	color: inherit;
	text-decoration: none;
}

footer a:hover {
	color: var(--ink);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.page-jump-btn {
	display: none !important;
}

/* ---------- generic reading layout ---------- */

body:not(:has(.hub-page)) {
	--rail: 68px;
	--content-left: 400px;
}

body > article {
	width: min(720px, calc(100vw - var(--content-left, 400px) - 48px));
	max-width: none;
	margin: 0 0 0 var(--content-left, 400px);
	padding: 100px 0 130px;
}

article:has(.cv-page),
article:has(.blog-index),
article:has(.travel-page),
article:has(.status-page) {
	width: min(820px, calc(100vw - var(--content-left, 400px) - 48px));
}

body:has(.hub-page) {
	overflow-x: hidden;
}

body:has(.hub-page) footer {
	display: none;
}

/* 首页保留极小的全局主题入口，但不显示或折叠一级导航。 */
body:has(.hub-page) header.site-header:nth-of-type(2) {
	display: block;
	position: fixed;
	top: clamp(3rem, 8vh, 5rem);
	left: auto;
	right: clamp(2rem, 6vw, 6rem);
}

body:has(.hub-page) .site-nav {
	width: max-content;
}

body:has(.hub-page) .site-nav::before,
body:has(.hub-page) .site-nav a,
body:has(.hub-page) .lang-toggle-btn {
	display: none !important;
}

body:has(.hub-page) .theme-toggle-btn {
	margin: 0;
}

body:has(.hub-page) header.site-header:first-of-type {
	top: clamp(3rem, 8vh, 5rem);
	left: clamp(4rem, 8.5vw, 9rem);
}

body:has(.hub-page) article {
	width: min(1400px, calc(100vw - 48px));
	height: min(840px, calc(100svh - 48px));
	min-height: 420px;
	margin: 24px auto;
	padding: 0;
}

body:has(.hub-page) article > section {
	height: 100%;
}

article section {
	padding: 0 !important;
}

article section > p,
article section > div,
article section > ul,
article section > ol,
article section > blockquote,
article section > pre,
article section > figure,
article section > h2,
article section > h3,
article section > h4 {
	width: 100%;
	max-width: none;
}

article p,
article li,
.bilingual-panel {
	font-family: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", STSong, SimSun, serif;
	font-size: 1.06rem;
	line-height: 1.9;
	text-align: left;
}

article p {
	margin: 1.2rem 0;
}

article h2,
article h3,
article h4 {
	font-family: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", STSong, SimSun, serif;
	font-style: normal;
	font-weight: 400;
	letter-spacing: 0.01em;
}

article section > h2:first-of-type {
	margin: 0 0 1.25rem;
	font-size: clamp(1.7rem, 2.3vw, 2.15rem);
	line-height: 1.35;
}

article h3 {
	margin: 3.4rem 0 1.1rem;
	font-size: 1.38rem;
	line-height: 1.4;
}

article h4 {
	margin: 2.6rem 0 0.9rem;
	font-size: 1.16rem;
}

article a:any-link {
	color: inherit;
	background: none;
	text-shadow: none;
	text-decoration-line: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}

article a:hover,
article a:focus-visible {
	background: var(--soft);
	outline: none;
}

.article-byline {
	margin: -0.4rem 0 2.8rem;
	color: var(--muted);
	font-family: "JetBrains Mono NF", monospace;
	font-size: 10px;
	line-height: 1.6;
}

.bilingual {
	width: 100%;
	margin: 1.2rem 0;
}

.bilingual-panel {
	font-size: 1.06rem;
	line-height: 1.9;
}

pre:not(.ascii-art) {
	margin: 1.8rem 0;
	padding: 1.25rem 1.35rem;
	border: 1px solid var(--hairline);
	border-radius: 0;
	background: var(--theme-pre-bg) !important;
	font-family: "JetBrains Mono NF", ui-monospace, monospace;
	font-size: 0.78rem;
	line-height: 1.75;
}

code,
kbd,
samp {
	font-family: "JetBrains Mono NF", ui-monospace, monospace;
	font-size: 0.82em;
}

blockquote {
	margin: 2rem 0;
	padding-left: 1.2rem;
	border-left: 1px solid var(--ink);
	font-style: normal;
}

hr {
	border: 0;
	border-top: 1px solid var(--hairline);
}

img,
img[src$="-ink.webp"] {
	filter: none !important;
}

figure,
article section > img,
article section > p > img {
	max-width: 100%;
}

.marginnote,
.sidenote {
	width: 210px;
	margin-right: -260px;
	color: var(--muted);
	font-family: "Songti SC", STSong, SimSun, serif;
	font-size: 0.76rem;
	line-height: 1.7;
}

.toc-sidebar {
	left: auto;
	right: 4vw;
	top: 14rem;
	width: 180px;
	color: var(--faint);
	font-family: "JetBrains Mono NF", monospace;
}

.toc-sidebar::before {
	content: "on this page";
	display: block;
	margin-bottom: 0.8rem;
	color: var(--muted);
	font-size: 10px;
}

.toc-sidebar a:any-link {
	padding-left: 0.7rem;
	border-left: 1px solid var(--hairline);
	font-size: 9px;
	line-height: 1.35;
}

.toc-sidebar a:hover,
.toc-sidebar a:focus-visible,
.toc-sidebar a.is-active {
	color: var(--ink);
	border-left-color: var(--ink);
}

/* ---------- shared terminal components ---------- */

.mono,
.page-path,
.section-path,
.file-tree,
.file-row,
.page-meta,
.cv-kicker,
.cv-focus,
.cv-stats,
.cv-contact,
.blog-meta,
.key-hints,
.travel-locations {
	font-family: "JetBrains Mono NF", ui-monospace, monospace;
}

.page-path {
	margin-bottom: 28px;
	color: var(--muted);
	font-size: 11px;
	line-height: 24px;
}

.ascii-art,
pre.ascii-art {
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent !important;
	color: var(--ascii);
	font-family: "JetBrains Mono NF", monospace;
	font-weight: 400;
	line-height: 0.9;
	letter-spacing: 0;
	white-space: pre;
	overflow: visible;
	cursor: crosshair;
	user-select: none;
	transition: color 160ms ease;
}

.ascii-art.is-interacting {
	color: var(--ascii-strong);
}

.section-path {
	margin: 0 0 12px;
	color: var(--muted);
	font-size: 11px;
	font-weight: 600;
}

/* ---------- collapsible second-level trees ---------- */

.tree-section {
	margin: 0;
	padding: 0;
	border: 0;
}

.tree-summary {
	min-height: 24px;
	display: flex;
	align-items: center;
	gap: 8px;
	list-style: none;
	color: var(--muted);
	cursor: pointer;
	user-select: none;
	transition: color 120ms ease, background-color 120ms ease;
}

.tree-summary::-webkit-details-marker {
	display: none;
}

.tree-summary::before {
	content: "";
	width: 0;
	height: 0;
	margin-inline: 3px;
	flex: 0 0 auto;
	border-top: 4px solid transparent;
	border-bottom: 4px solid transparent;
	border-left: 6px solid var(--faint);
	transform-origin: center;
	transition: transform 150ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.tree-section[open] > .tree-summary::before {
	transform: rotate(90deg);
}

.tree-section[open] > .tree-summary .tree-label {
	color: var(--tree-open-label);
}

.tree-summary:hover {
	color: var(--ink);
	background: var(--soft);
}

.tree-summary:focus-visible {
	color: var(--accent-cyan);
	outline: 1px solid var(--accent-cyan);
	outline-offset: 3px;
}

.tree-section:not([open]) > .tree-summary {
	margin-bottom: 0;
}

.tree-panel {
	min-width: 0;
}

html.theme-anim-ready .site-mark,
html.theme-anim-ready .site-nav a,
html.theme-anim-ready .lang-toggle-btn,
html.theme-anim-ready .theme-toggle-btn,
html.theme-anim-ready .tree-summary,
html.theme-anim-ready .ascii-art,
html.theme-anim-ready footer {
	transition:
		background-color 240ms ease,
		color 240ms ease,
		border-color 240ms ease;
}

/* ---------- standalone hub home ---------- */

.hub-page {
	position: relative;
	width: 100%;
	height: 100%;
	min-height: 420px;
}

.hub-ascii {
	position: absolute;
	top: clamp(8rem, 27.5vh, 15rem);
	left: clamp(7rem, 14vw, 14rem);
	font-size: clamp(7.5px, 0.7vw, 10px);
}

.hub-tree {
	position: absolute;
	top: clamp(9rem, 33vh, 18.5rem);
	left: 40%;
	width: 12.5rem;
	font-family: "JetBrains Mono NF", monospace;
	font-size: 0.7rem;
	line-height: 1.75;
}

.hub-root {
	display: block;
	margin: 0 0 0.15rem 0.05rem;
	color: var(--muted-strong);
}

.hub-link {
	width: 100%;
	padding: 4px 6px 4px 0;
	display: grid;
	grid-template-columns: 34px 1fr;
	align-items: baseline;
	column-gap: 10px;
	color: var(--muted) !important;
	font-family: "JetBrains Mono NF", monospace;
	font-size: 11px;
	line-height: 1.6;
	text-decoration: none !important;
	transition: color 120ms ease, background-color 120ms ease;
}

.hub-link .branch {
	color: var(--faint);
	text-align: right;
}

.hub-link:hover,
.hub-link:focus-visible,
.hub-link.is-keyed {
	background: var(--soft) !important;
	color: var(--ink) !important;
	outline: none;
}

.hub-link:hover .branch,
.hub-link:focus-visible .branch {
	color: var(--muted);
}

.hub-note {
	position: absolute;
	left: clamp(1rem, 2.25vw, 2.25rem);
	bottom: clamp(0.75rem, 5vh, 2.5rem);
	margin: 0;
	color: var(--muted-strong);
	font-family: "Songti SC", STSong, SimSun, serif;
	font-size: clamp(0.75rem, 0.95vw, 0.9rem);
	line-height: 1.9;
	letter-spacing: 0.035em;
}

/* ---------- CV page ---------- */

.cv-page {
	position: relative;
	min-height: 760px;
}

.cv-ascii {
	position: fixed;
	/* 六项导航后还有语言与主题两行开关，人物与整组控件保持 35px。 */
	top: 364px;
	left: var(--rail, 68px);
	z-index: 1;
	font-size: 8px;
}

.cv-sheet {
	position: relative;
	z-index: 2;
	width: 100%;
	margin-left: 0;
}

.cv-sheet h1 {
	margin: 0;
	font-family: "JetBrains Mono NF", monospace;
	font-size: 23px;
	font-weight: 400;
	line-height: 1.15;
	letter-spacing: -0.04em;
}

.cv-section {
	margin-top: 42px;
}

.cv-section > .tree-summary,
.blog-year > .tree-summary,
.cloud-tree-branch > .tree-summary {
	font-family: "JetBrains Mono NF", ui-monospace, monospace;
}

.cv-row {
	min-height: 32px;
	display: grid;
	grid-template-columns: 38px 152px minmax(0, 1fr) max-content;
	align-items: baseline;
	column-gap: 10px;
	padding-block: 4px;
	font-size: 12px;
	line-height: 1.6;
}

.cv-row > * {
	min-width: 0;
}

.cv-branch {
	color: var(--faint);
	font-family: "JetBrains Mono NF", monospace;
}

.cv-row.cv-row-link {
	width: calc(100% + 0.85rem);
	margin: 0 -0.4rem 0 -0.45rem;
	padding: 4px 0.4rem 4px 0.45rem;
	color: inherit;
	text-decoration: none !important;
	transition: background-color 120ms ease;
}

.cv-row.cv-row-link:hover,
.cv-row.cv-row-link:focus-visible,
.cv-row.cv-row-link.is-keyed,
.cv-row.cv-row-link.is-active {
	background: var(--soft);
	outline: none;
}

.cv-name,
.cv-name a {
	color: var(--ink);
	font-family: "JetBrains Mono NF", monospace;
	font-weight: 600;
	text-decoration: none;
}

.cv-description {
	padding-right: 20px;
	color: var(--body-muted);
	font-family: "Songti SC", STSong, SimSun, serif;
	font-size: 13px;
	line-height: 1.5;
}

.cv-tag {
	color: var(--muted);
	font-family: "JetBrains Mono NF", monospace;
	font-size: 10px;
	text-align: right;
	white-space: nowrap;
}

.cv-stats {
	margin: 0 0 15px;
	color: var(--muted);
	font-size: 10px;
}

.cv-page #github-graph {
	width: 530px;
	max-width: 100%;
	margin: 0;
	overflow: hidden;
	clip-path: inset(0 100% 0 0);
	opacity: 0.52;
	transition:
		clip-path 920ms cubic-bezier(0.33, 1, 0.68, 1),
		opacity 560ms ease;
}

.cv-page #github-graph.is-revealed {
	clip-path: inset(0 0 0 0);
	opacity: 1;
}

.cv-page #github-graph .gh-chart {
	width: 100%;
	max-width: 100%;
	/* custom.css 遗留的移动端 min-width: 660px 会把图撑出容器，
		而这里 overflow: hidden 没法滚动，手机上只能看到前一半；
		用同属性更高优先级压掉，让整图缩进容器宽度 */
	min-width: 0;
	height: auto;
}

/* Light: goes to grey; Dark: Rosé Pine SVG already carries iris tint, keep native */
html[data-theme="dark"] .cv-page #github-graph .gh-chart {
	filter: none;
}

html:not([data-theme="dark"]) .cv-page #github-graph .gh-chart,
html[data-theme="light"] .cv-page #github-graph .gh-chart {
	filter: grayscale(1);
}

@media (prefers-reduced-motion: reduce) {
	.cv-page #github-graph {
		clip-path: none;
		transition: none;
		opacity: 1;
	}
}

.cv-contact {
	margin-top: 24px;
	color: var(--muted);
	font-size: 10px;
}

.cv-contact a:any-link {
	color: inherit;
	text-decoration: none;
}

/* ---------- blog index ---------- */

.blog-index {
	position: relative;
	min-height: 760px;
}

.blog-index h1,
.travel-page h1 {
	margin: 0;
	font-family: "JetBrains Mono NF", monospace;
	font-size: 13px;
	font-weight: 600;
	line-height: 24px;
}

.index-intro {
	margin: 27px 0 0;
	color: var(--body-muted);
	font-family: "Songti SC", STSong, SimSun, serif;
	font-size: 15px;
}

.blog-meta {
	margin: 14px 0 0;
	color: var(--muted);
	font-size: 10px;
}

.blog-tree {
	width: min(730px, 100%);
	margin-top: 52px;
}

.blog-year + .blog-year {
	margin-top: 18px;
}

.blog-file-row {
	min-height: 36px;
	display: grid;
	grid-template-columns: 38px 80px minmax(0, 1fr) max-content;
	align-items: baseline;
	column-gap: 10px;
	padding-block: 4px;
	color: inherit;
	font-size: 12px;
	line-height: 1.6;
	text-decoration: none !important;
}

.blog-file-row:hover,
.blog-file-row:focus-visible,
.blog-file-row.is-keyed {
	background: var(--soft);
	outline: none;
}

.blog-file-row .branch {
	color: var(--faint);
	font-family: "JetBrains Mono NF", monospace;
}

.blog-file-row .date {
	font-family: "JetBrains Mono NF", monospace;
	font-weight: 600;
}

.blog-file-row .title {
	padding-right: 18px;
	font-family: "Songti SC", STSong, SimSun, serif;
	font-size: 13px;
}

.blog-file-row .tag {
	color: var(--muted);
	font-family: "JetBrains Mono NF", monospace;
	font-size: 10px;
}

.blog-divider {
	width: min(730px, 100%);
	margin: 7px 0 0;
	border-top: 1px solid var(--hairline);
}

.key-hints {
	margin-top: 28px;
	color: var(--muted);
	font-size: 9px;
}

.blog-ascii {
	position: absolute;
	top: 405px;
	right: 18px;
	font-size: 8px;
	color: var(--muted-strong);
}

/* ---------- travel ---------- */

.travel-page {
	min-height: 760px;
}

.travel-layout {
	margin-top: 54px;
	display: grid;
	grid-template-columns: minmax(430px, 500px) minmax(300px, 1fr);
	gap: 48px;
	align-items: start;
}

#travel-globe {
	width: 100%;
	margin: 0;
}

.globe-svg {
	width: 100%;
	max-width: 480px;
	margin: 0;
	color: var(--ink);
}

.globe-ocean {
	fill: transparent;
}

.globe-graticule {
	stroke-width: 0.5;
	opacity: 0.16;
}

.globe-land {
	stroke-width: 0.8;
	opacity: 0.72;
}

.globe-rim {
	stroke-width: 0.8;
	opacity: 0.42;
}

.globe-marker-dot {
	fill: var(--ink);
}

.globe-marker-halo {
	fill: var(--ink);
	opacity: 0.1;
}

.globe-marker-ring {
	stroke: var(--ink);
	opacity: 0.45;
}

.globe-marker-label {
	font-family: "Songti SC", STSong, SimSun, serif;
	font-size: 12px;
	stroke: var(--paper);
	stroke-width: 3px;
}

.globe-legend {
	display: none;
}

.travel-tree {
	padding-top: 24px;
	font-family: "JetBrains Mono NF", monospace;
	font-size: 11px;
}

.travel-group,
.travel-link {
	min-height: 32px;
	display: grid;
	grid-template-columns: 38px 130px minmax(0, 1fr);
	align-items: baseline;
	column-gap: 10px;
	padding-block: 4px;
	line-height: 1.6;
}

summary.travel-group.tree-summary::before {
	grid-column: 1;
	justify-self: center;
}

summary.travel-group.tree-summary .tree-label {
	grid-column: 2 / -1;
}

.travel-group {
	color: var(--ink);
	font-weight: 600;
}

.travel-link {
	margin: 0;
	padding-left: 24px;
	color: inherit;
	text-indent: 0;
	text-decoration: none !important;
}

.trip-link.travel-link::before,
.trip-link.travel-link:hover::before,
.trip-link.travel-link:focus-visible::before,
.trip-link.travel-link.is-active::before {
	content: none !important;
	display: none !important;
}

.travel-link:hover,
.travel-link:focus-visible,
.travel-link.is-active {
	background: var(--soft);
	outline: none;
}

.travel-group .branch,
.travel-link .branch {
	color: var(--faint);
}

.travel-link .label {
	font-family: "Songti SC", STSong, SimSun, serif;
	font-size: 12px;
}

.travel-hints {
	margin-top: 24px;
	color: var(--muted);
	font-family: "JetBrains Mono NF", monospace;
	font-size: 9px;
}

.travel-locations {
	margin-top: 50px;
	color: var(--muted);
	font-size: 9px;
	line-height: 2.4;
}

/* ---------- docs index ---------- */

.docs-index {
	min-height: 650px;
}

.docs-tree {
	width: min(620px, 100%);
	margin-top: 42px;
	font-family: "JetBrains Mono NF", ui-monospace, monospace;
}

.docs-tree-section + .docs-tree-section {
	margin-top: 18px;
}

.docs-link {
	min-height: 32px;
	display: grid;
	grid-template-columns: 38px minmax(0, 1fr);
	align-items: baseline;
	column-gap: 10px;
	padding: 4px 0 4px 12px;
	color: var(--body-muted) !important;
	font-size: 11px;
	line-height: 1.6;
	text-decoration: none !important;
}

.docs-link .branch {
	color: var(--faint);
}

.docs-link:hover,
.docs-link:focus-visible,
.docs-link.is-keyed {
	background: var(--soft);
	color: var(--ink) !important;
	outline: none;
}

/* ---------- live server status ---------- */

.status-page {
	width: 100%;
	min-height: 760px;
	font-family: "JetBrains Mono NF", ui-monospace, monospace;
}

.status-header {
	padding: 0 0 28px;
	border-bottom: 1px solid var(--hairline);
}

.status-header .page-path {
	margin-bottom: 17px;
}

.status-title-line {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.status-title-line h1 {
	margin: 0;
	color: var(--ink);
	font-family: "JetBrains Mono NF", ui-monospace, monospace;
	font-size: 18px;
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: -0.025em;
}

.status-connection {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--muted);
	font-size: 10px;
	line-height: 1;
	text-transform: lowercase;
}

.status-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--faint);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--faint) 14%, transparent);
}

.status-page[data-connection="live"] .status-connection {
	color: var(--success-text);
}

.status-page[data-connection="live"] .status-dot {
	background: var(--success-text);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--success-text) 16%, transparent);
	animation: status-pulse 2s ease-in-out infinite;
}

.status-page[data-connection="stale"] .status-connection,
.status-page[data-connection="connecting"] .status-connection {
	color: var(--accent-gold);
}

.status-page[data-connection="stale"] .status-dot,
.status-page[data-connection="connecting"] .status-dot {
	background: var(--accent-gold);
}

.status-page[data-connection="offline"] .status-connection {
	color: var(--accent-love);
}

.status-page[data-connection="offline"] .status-dot {
	background: var(--accent-love);
}

@keyframes status-pulse {
	50% {
		opacity: 0.45;
		transform: scale(0.82);
	}
}

article .status-intro {
	max-width: 620px;
	margin: 20px 0 0;
	color: var(--body-muted);
	font-family: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", STSong, SimSun, serif;
	font-size: 14px;
	line-height: 1.75;
}

article .status-command,
article .status-packet {
	margin: 15px 0 0;
	color: var(--muted);
	font-family: "JetBrains Mono NF", ui-monospace, monospace;
	font-size: 9px;
	line-height: 1.6;
}

article .status-packet {
	margin-top: 5px;
	color: var(--faint);
}

.status-fleet {
	margin-top: 36px;
}

.status-fleet-title {
	margin: 0 0 18px;
	color: var(--tree-open-label);
	font-family: "JetBrains Mono NF", ui-monospace, monospace;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.5;
}

.status-node-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: 52px;
	row-gap: 46px;
}

.status-node {
	min-width: 0;
	padding: 0;
}

.status-node-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	min-height: 22px;
}

.status-node-header h2 {
	min-width: 0;
	margin: 0;
	color: var(--ink);
	font-family: "JetBrains Mono NF", ui-monospace, monospace;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.5;
}

.status-node-branch {
	display: inline-block;
	width: 42px;
	color: var(--faint);
	font-weight: 400;
}

.status-node-state {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	color: var(--muted);
	font-size: 9px;
	line-height: 1;
	text-transform: lowercase;
}

.status-node-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--faint);
}

.status-node[data-node-state="up"] .status-node-state {
	color: var(--success-text);
}

.status-node[data-node-state="up"] .status-node-dot {
	background: var(--success-text);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--success-text) 13%, transparent);
}

.status-node[data-node-state="paused"] .status-node-state,
.status-node[data-node-state="pending"] .status-node-state,
.status-node[data-node-state="stale"] .status-node-state {
	color: var(--accent-gold);
}

.status-node[data-node-state="paused"] .status-node-dot,
.status-node[data-node-state="pending"] .status-node-dot,
.status-node[data-node-state="stale"] .status-node-dot {
	background: var(--accent-gold);
}

.status-node[data-node-state="down"] .status-node-state,
.status-node[data-node-state="unknown"] .status-node-state {
	color: var(--accent-love);
}

.status-node[data-node-state="down"] .status-node-dot,
.status-node[data-node-state="unknown"] .status-node-dot {
	background: var(--accent-love);
}

article .status-node-packet {
	margin: 7px 0 0 42px;
	width: calc(100% - 42px);
	color: var(--faint);
	font-family: "JetBrains Mono NF", ui-monospace, monospace;
	font-size: 8px;
	line-height: 1.5;
}

.status-node-meters {
	margin: 20px 0 23px;
	width: 100%;
	padding-top: 10px;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 2px;
	border-top: 1px solid var(--hairline);
}

.status-meter {
	min-width: 0;
	min-height: 25px;
	padding: 4px 0;
	display: grid;
	grid-template-columns: 42px minmax(0, 1fr) 44px;
	align-items: center;
	column-gap: 8px;
	color: var(--muted);
}

.status-meter-head {
	display: contents;
	font-size: 8px;
	line-height: 1.4;
}

.status-meter-head > span {
	grid-column: 1;
	grid-row: 1;
}

.status-meter-value {
	grid-column: 3;
	grid-row: 1;
	color: var(--ink);
	font: inherit;
	text-align: right;
}

.status-bar {
	--meter-value: 0%;
	grid-column: 2;
	grid-row: 1;
	min-width: 0;
	margin: 0;
	display: grid;
	grid-template-columns: max-content minmax(0, 1fr) max-content;
	align-items: center;
	column-gap: 2px;
	color: var(--accent-cyan);
	font-size: 8px;
	line-height: 1;
}

.status-bar::before {
	content: "[";
}

.status-bar::after {
	content: "]";
}

.status-bar-text {
	position: relative;
	min-width: 0;
	height: 6px;
	display: block;
	background: repeating-linear-gradient(
		to right,
		color-mix(in srgb, var(--faint) 62%, transparent) 0 3px,
		transparent 3px 5px
	);
	overflow: hidden;
}

.status-bar-text::after {
	content: "";
	position: absolute;
	inset: 0 auto 0 0;
	width: var(--meter-value);
	background: repeating-linear-gradient(
		to right,
		currentColor 0 3px,
		transparent 3px 5px
	);
}

.status-meter.is-warning .status-bar,
.status-meter.is-warning .status-meter-value {
	color: var(--accent-gold);
}

.status-meter.is-critical .status-bar,
.status-meter.is-critical .status-meter-value {
	color: var(--accent-love);
}

.status-meter.is-unavailable {
	color: var(--faint);
}

.status-tree {
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
	font-size: 9px;
	line-height: 1.55;
}

.status-row {
	min-height: 25px;
	display: grid;
	grid-template-columns: minmax(102px, 0.72fr) minmax(0, 1.28fr);
	align-items: baseline;
	column-gap: 16px;
	padding-block: 4px;
}

.status-row dt {
	min-width: 0;
	display: grid;
	grid-template-columns: 32px minmax(0, 1fr);
	color: var(--muted);
}

.status-row dd {
	min-width: 0;
	margin: 0;
	color: var(--ink);
	overflow-wrap: anywhere;
}

.status-branch {
	color: var(--faint);
}

html.theme-anim-ready .status-header,
html.theme-anim-ready .status-meter,
html.theme-anim-ready .status-node,
html.theme-anim-ready .status-node-state,
html.theme-anim-ready .status-node-dot,
html.theme-anim-ready .status-dot,
html.theme-anim-ready .status-connection,
html.theme-anim-ready .status-bar,
html.theme-anim-ready .status-bar-text::after,
html.theme-anim-ready .status-row dd {
	transition:
		background-color 240ms ease,
		color 240ms ease,
		border-color 240ms ease,
		box-shadow 240ms ease,
		width 360ms ease;
}

/* ---------- article details ---------- */

body:not(:has(.hub-page, .cv-page, .blog-index, .travel-page)) article section > h2:first-of-type {
	padding-bottom: 24px;
	border-bottom: 1px solid var(--hairline);
}

/* ---------- responsive ---------- */

@media (min-width: 1001px) and (max-width: 1200px) {
	body:not(:has(.hub-page)) {
		--content-left: 300px;
	}

	.travel-layout {
		grid-template-columns: minmax(340px, 1.1fr) minmax(280px, 0.9fr);
		gap: 32px;
	}
}

@media (max-width: 1000px) {
	body:not(:has(.hub-page)) {
		--content-left: 24px;
	}

	header.site-header:first-of-type,
	header.site-header:nth-of-type(2),
	footer {
		position: static;
		margin-left: 24px;
	}

	header.site-header:first-of-type {
		padding-top: 24px;
	}

	header.site-header:nth-of-type(2) {
		margin-top: 30px;
	}

	footer {
		margin-top: 70px;
		padding-bottom: 30px;
	}

	body > article,
	body > article:has(.cv-page),
	body > article:has(.blog-index),
	body > article:has(.travel-page),
	body > article:has(.status-page) {
		width: auto;
		max-width: 760px;
		margin: 0 24px;
		padding: 64px 0 40px;
	}

	.toc-sidebar {
		display: none !important;
	}

	.marginnote,
	.sidenote {
		width: auto;
		margin: 1rem 0;
		float: none;
	}

	body:has(.hub-page) header.site-header:first-of-type {
		position: static;
		margin-left: 24px;
		padding-top: 24px;
	}

	body:has(.hub-page) article {
		width: auto;
		height: auto;
		min-height: calc(100svh - 90px);
		margin: 0;
		padding: 0 24px 24px;
	}

	.hub-page {
		min-height: calc(100svh - 114px);
		display: flex;
		flex-direction: column;
	}

	.hub-ascii,
	.hub-tree,
	.hub-note {
		position: static;
	}

	.hub-ascii {
		width: max-content;
		margin: 10vh auto 0;
		font-size: clamp(7px, 2vw, 8px);
	}

	.hub-tree {
		margin: 4rem auto 0;
	}

	.hub-note {
		margin: auto 0 0 1rem;
		padding-top: 4rem;
	}

	.cv-page {
		display: flex;
		flex-direction: column;
	}

	.cv-ascii {
		position: static;
		order: 2;
		align-self: center;
		margin-top: 58px;
		font-size: 8px;
	}

	.cv-sheet {
		order: 1;
		width: 100%;
		margin: 0;
	}

	.blog-ascii {
		position: static;
		width: max-content;
		margin: 80px auto 0;
	}

	.travel-layout {
		grid-template-columns: 1fr;
		gap: 32px;
	}

	#travel-globe {
		max-width: 520px;
		margin: 0 auto;
	}

	.travel-tree {
		width: min(420px, 100%);
		margin: 0 auto;
	}
}

@media (max-width: 620px) {
	body > article {
		margin-inline: 18px;
	}

	.cv-row {
		grid-template-columns: 30px minmax(0, 1fr) max-content;
		row-gap: 4px;
		margin-bottom: 16px;
	}

	.cv-description {
		grid-column: 2 / -1;
		grid-row: 2;
		padding-right: 0;
	}

	.cv-tag {
		grid-column: 3;
	}

	.blog-file-row {
		grid-template-columns: 30px 62px minmax(0, 1fr);
		row-gap: 5px;
		margin-bottom: 15px;
	}

	.blog-file-row .tag {
		grid-column: 3;
	}

	.travel-group,
	.travel-link {
		grid-template-columns: 30px minmax(0, 1fr);
		row-gap: 3px;
	}

	.travel-link {
		padding-left: 12px;
	}

	.travel-link .label {
		grid-column: 2;
		color: var(--muted);
	}

	article section > h2:first-of-type {
		font-size: 1.65rem;
	}

	pre:not(.ascii-art) {
		overflow-x: auto;
	}

	.status-title-line {
		align-items: flex-start;
		flex-direction: column;
		gap: 12px;
	}

	.status-node-list {
		grid-template-columns: 1fr;
	}

	.status-node-list {
		row-gap: 36px;
	}

	.status-row {
		grid-template-columns: minmax(112px, 0.75fr) minmax(0, 1fr);
		column-gap: 10px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ascii-art,
	.site-nav a,
	.lang-toggle-btn,
	.theme-toggle-btn,
	.tree-summary,
	.tree-summary::before,
	.blog-file-row,
	.travel-link {
		transition: none !important;
	}

	.ascii-art {
		cursor: default;
	}

	.status-page[data-connection="live"] .status-dot {
		animation: none;
	}
}
