:root {
	--site-bg: #f3ede3;
	--site-bg-secondary: #fbf7f1;
	--surface: rgba(255, 251, 245, 0.82);
	--surface-strong: rgba(255, 252, 247, 0.94);
	--surface-dark: rgba(18, 29, 43, 0.82);
	--surface-dark-strong: rgba(21, 34, 48, 0.92);
	--ink: #223648;
	--ink-soft: #617283;
	--accent: #a75e36;
	--accent-2: #2f6f73;
	--border-soft: rgba(34, 54, 72, 0.12);
	--border-strong: rgba(34, 54, 72, 0.18);
	--hero-line: rgba(255, 255, 255, 0.14);
	--rainbow-soft: linear-gradient(
		90deg,
		rgba(255, 107, 107, 0.82),
		rgba(255, 179, 71, 0.82),
		rgba(255, 230, 109, 0.82),
		rgba(93, 214, 150, 0.82),
		rgba(80, 164, 255, 0.82),
		rgba(176, 122, 255, 0.82)
	);
	--shadow-soft: 0 24px 64px rgba(15, 23, 34, 0.08);
	--shadow-lift: 0 28px 80px rgba(15, 23, 34, 0.12);
	--heading-font:
		"Iowan Old Style", "Palatino Linotype", "Noto Serif SC", "Songti SC", serif;
	--body-font:
		"Avenir Next", "Segoe UI", "PingFang SC", "Hiragino Sans GB",
		"Microsoft YaHei", sans-serif;
}

html[data-user-color-scheme="dark"] {
	--site-bg: #0f1722;
	--site-bg-secondary: #132030;
	--surface: var(--surface-dark);
	--surface-strong: var(--surface-dark-strong);
	--ink: #d8dee6;
	--ink-soft: #97a5b5;
	--border-soft: rgba(148, 163, 184, 0.18);
	--border-strong: rgba(148, 163, 184, 0.26);
	--hero-line: rgba(255, 255, 255, 0.08);
	--shadow-soft: 0 24px 64px rgba(2, 6, 23, 0.3);
	--shadow-lift: 0 28px 80px rgba(2, 6, 23, 0.42);
}

@media (prefers-color-scheme: dark) {
	html:not([data-user-color-scheme]) {
		--site-bg: #0f1722;
		--site-bg-secondary: #132030;
		--surface: var(--surface-dark);
		--surface-strong: var(--surface-dark-strong);
		--ink: #d8dee6;
		--ink-soft: #97a5b5;
		--border-soft: rgba(148, 163, 184, 0.18);
		--border-strong: rgba(148, 163, 184, 0.26);
		--hero-line: rgba(255, 255, 255, 0.08);
		--shadow-soft: 0 24px 64px rgba(2, 6, 23, 0.3);
		--shadow-lift: 0 28px 80px rgba(2, 6, 23, 0.42);
	}
}

html,
body {
	background:
		radial-gradient(
			circle at top left,
			rgba(202, 160, 120, 0.2),
			transparent 28rem
		),
		radial-gradient(
			circle at right 18%,
			rgba(47, 111, 115, 0.14),
			transparent 24rem
		),
		linear-gradient(180deg, var(--site-bg-secondary), var(--site-bg));
	font-family: var(--body-font);
}

body {
	color: var(--ink);
}

::selection {
	background: rgba(167, 94, 54, 0.18);
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand strong,
.banner-text .h2,
.index-header a,
.about-name {
	font-family: var(--heading-font);
	letter-spacing: -0.02em;
}

#navbar {
	background: rgba(18, 29, 43, 0.7) !important;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	box-shadow: 0 10px 40px rgba(15, 23, 34, 0.12);
	backdrop-filter: blur(18px);
}

.navbar .nav-link {
	font-size: 0.93rem;
	letter-spacing: 0.04em;
	opacity: 0.92;
	transition:
		color 0.2s ease,
		opacity 0.2s ease,
		transform 0.2s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
	opacity: 1;
	transform: translateY(-1px);
}

.navbar-brand strong {
	font-size: 1.2rem;
	font-weight: 600;
}

#banner {
	position: relative;
	overflow: hidden;
}

#banner::before,
#banner::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
}

#banner::before {
	background:
		radial-gradient(
			circle at 20% 20%,
			rgba(255, 235, 205, 0.24),
			transparent 20rem
		),
		radial-gradient(
			circle at 80% 35%,
			rgba(47, 111, 115, 0.22),
			transparent 18rem
		),
		linear-gradient(135deg, rgba(10, 18, 30, 0.18), rgba(10, 18, 30, 0.46));
}

#banner::after {
	background-image:
		linear-gradient(var(--hero-line) 1px, transparent 1px),
		linear-gradient(90deg, var(--hero-line) 1px, transparent 1px);
	background-size: 34px 34px;
	mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), transparent 78%);
	opacity: 0.52;
}

.full-bg-img,
.mask,
.banner-text {
	position: relative;
	z-index: 1;
}

.header-inner .mask.flex-center {
	display: flex;
	align-items: flex-start !important;
	justify-content: center;
	min-height: 100%;
	padding-top: clamp(8.5rem, 18vh, 12rem);
	box-sizing: border-box;
}

.banner-text {
	width: min(92vw, 980px);
	margin: 0 auto;
	padding: 0 1rem;
}

.banner-text .h2 {
	max-width: 14ch;
	margin: 0 auto;
	font-size: clamp(2.4rem, 6vw, 5rem);
	line-height: 0.98;
	text-wrap: balance;
}

#subtitle {
	display: inline-block;
	text-shadow: 0 10px 40px rgba(15, 23, 34, 0.35);
}

.scroll-down-bar {
	bottom: 2rem;
}

#board {
	position: relative;
	background: var(--surface);
	border: 1px solid var(--border-soft);
	border-radius: 30px 30px 0 0;
	box-shadow: var(--shadow-lift);
	backdrop-filter: blur(22px);
}

#board::before {
	content: "";
	position: absolute;
	top: 0;
	left: 2rem;
	right: 2rem;
	height: 2px;
	border-radius: 999px;
	background: var(--rainbow-soft);
	opacity: 0.72;
}

.index-card {
	position: relative;
	margin-bottom: 1.35rem !important;
	border: 1px solid var(--border-soft);
	border-radius: 24px;
	background: var(--surface-strong);
	box-shadow: var(--shadow-soft);
	transition:
		transform 0.24s ease,
		box-shadow 0.24s ease,
		border-color 0.24s ease;
	overflow: hidden;
}

.index-card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 1.1rem;
	width: 8.5rem;
	height: 3px;
	border-radius: 999px;
	background: var(--rainbow-soft);
	opacity: 0.52;
	transition:
		width 0.24s ease,
		opacity 0.24s ease;
}

.index-card:hover {
	transform: translateY(-4px);
	border-color: rgba(167, 94, 54, 0.22);
	box-shadow: 0 32px 70px rgba(15, 23, 34, 0.14);
}

.index-card:hover::before {
	width: 12rem;
	opacity: 0.88;
}

.index-info {
	padding: 2rem 2rem 1.5rem !important;
}

.index-header {
	margin-bottom: 1rem;
}

.index-header a {
	color: var(--ink) !important;
	font-size: clamp(1.45rem, 2vw, 1.8rem);
	line-height: 1.2;
	background-image:
		linear-gradient(transparent calc(100% - 0.1em), rgba(255, 179, 71, 0.26) 0),
		linear-gradient(transparent calc(100% - 0.1em), rgba(80, 164, 255, 0.2) 0);
	background-repeat: no-repeat;
	background-size:
		100% 100%,
		0 100%;
	transition:
		background-size 0.22s ease,
		color 0.22s ease;
}

.index-header a:hover {
	background-size:
		0 100%,
		100% 100%;
}

.index-excerpt {
	color: var(--ink-soft) !important;
	font-size: 1rem;
	line-height: 1.8;
}

.index-btm {
	margin-top: 1.3rem;
	padding-top: 1rem;
	border-top: 1px solid var(--border-soft);
}

.post-meta,
.post-meta a,
.post-meta time {
	color: var(--ink-soft) !important;
}

.post-meta i {
	color: var(--accent);
}

.post-meta a {
	display: inline-flex;
	align-items: center;
	min-height: 1.8rem;
	margin-right: 0.45rem;
	padding: 0 0.65rem;
	border-radius: 999px;
	background: rgba(167, 94, 54, 0.1);
	text-decoration: none !important;
}

.post-meta a:hover {
	background: rgba(47, 111, 115, 0.14);
	color: var(--accent-2) !important;
}

.about-info {
	position: relative;
	margin-top: -1rem;
	padding: 2.4rem 2rem 2rem;
	border: 1px solid var(--border-soft);
	border-radius: 28px;
	background:
		linear-gradient(145deg, rgba(255, 255, 255, 0.24), transparent),
		var(--surface-strong);
	box-shadow: var(--shadow-soft);
}

.about-info::before {
	content: "";
	position: absolute;
	top: 1rem;
	right: 1rem;
	width: 6rem;
	height: 5px;
	border-radius: 999px;
	background: var(--rainbow-soft);
	opacity: 0.7;
}

.about-name {
	font-size: clamp(2.2rem, 5vw, 3.6rem);
	line-height: 1;
}

.about-intro {
	max-width: 38rem;
	margin: 1rem auto 0;
	color: var(--ink-soft);
	font-size: 1.02rem;
	line-height: 1.8;
}

.about-icons {
	margin-top: 1.35rem;
}

.about-icons a {
	width: 3rem;
	height: 3rem;
	margin: 0 0.35rem;
	border: 1px solid var(--border-soft);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.24);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
	transition:
		transform 0.2s ease,
		border-color 0.2s ease,
		color 0.2s ease;
}

.about-icons a:hover {
	transform: translateY(-2px);
	border-color: rgba(167, 94, 54, 0.28);
	color: var(--accent);
	box-shadow:
		0 0 0 1px rgba(255, 255, 255, 0.1),
		0 12px 24px rgba(15, 23, 34, 0.1),
		0 0 0 3px rgba(255, 179, 71, 0.08);
}

.about-content.page-content,
.page-content,
.post-content,
.archive-posts,
.category-list,
.tagcloud {
	color: var(--ink);
}

.about-content.page-content {
	padding: 2rem 2.2rem;
	border: 1px solid var(--border-soft);
	border-radius: 24px;
	background: var(--surface-strong);
	box-shadow: var(--shadow-soft);
}

.markdown-body {
	background: transparent !important;
	color: var(--ink) !important;
	font-family: var(--body-font);
}

.markdown-body p,
.markdown-body li {
	line-height: 1.9;
}

.markdown-body h2,
.markdown-body h3 {
	margin-top: 2.2rem;
	padding-bottom: 0.45rem;
	border-bottom: 1px solid var(--border-soft);
}

.markdown-body ul,
.markdown-body ol {
	padding-left: 1.4rem;
}

.markdown-body ul {
	list-style: disc;
}

.markdown-body ol {
	list-style: decimal;
}

.markdown-body blockquote {
	margin: 1.5rem 0;
	padding: 0.9rem 1.1rem;
	border-left: 3px solid var(--accent);
	background: rgba(167, 94, 54, 0.08);
	color: var(--ink-soft);
}

.markdown-body a {
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.14em;
	background-image:
		linear-gradient(
			transparent calc(100% - 0.12em),
			rgba(255, 179, 71, 0.22) 0
		),
		linear-gradient(transparent calc(100% - 0.12em), rgba(80, 164, 255, 0.18) 0);
	background-size:
		100% 100%,
		0 100%;
	background-repeat: no-repeat;
	transition: background-size 0.22s ease;
}

.markdown-body a:hover {
	background-size:
		0 100%,
		100% 100%;
}

.sub-menu {
	display: none;
	position: absolute;
	min-width: 13rem;
	margin-top: 0.8rem;
	padding: 0.7rem;
	list-style: none;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 18px;
	background: rgba(18, 29, 43, 0.88);
	box-shadow: 0 24px 40px rgba(15, 23, 34, 0.28);
	backdrop-filter: blur(18px);
	-webkit-animation: fadeInUp 0.24s 0.04s ease both;
}

.sub-menu li {
	padding: 0;
}

.sub-menu li a {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	padding: 0.65rem 0.8rem;
	border-radius: 12px;
	color: #f8f1e8;
	text-align: left;
}

.sub-menu li a:hover {
	background: rgba(255, 255, 255, 0.08);
	color: #ffffff;
	text-decoration: none;
}

.nav-item:hover .sub-menu {
	display: block;
}

.pagination .page-link,
#scroll-top-button {
	border-radius: 999px !important;
}

footer {
	color: var(--ink-soft);
}

footer a {
	color: var(--ink);
}

@media (max-width: 767.98px) {
	.header-inner .mask.flex-center {
		padding-top: clamp(7rem, 14vh, 9rem);
	}

	.banner-text .h2 {
		max-width: 10ch;
		font-size: clamp(2rem, 10vw, 3rem);
	}

	#board {
		border-radius: 24px 24px 0 0;
	}

	.index-info,
	.about-content.page-content {
		padding: 1.5rem !important;
	}

	.sub-menu {
		position: static;
		min-width: auto;
		margin-top: 0.5rem;
	}
}
