/*
Theme Name: 青柠博客
Theme URI: https://www.gmtj.cn/
Author: GMTJ
Description: 一款极简风格的个人博客 WordPress 主题。白底 + 墨绿强调色 + 纯黑页脚，内置文章列表、侧边栏小工具、归档 / 搜索 / 404 等标准模板，响应式适配，无外部依赖。
Version: 1.1.0
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: workbuddy
Tags: blog, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, translation-ready
*/

/* ==========================================================================
   基础重置与设计令牌
   墨绿强调色 + 中性灰阶，取白底极简博客风格。
   ========================================================================== */

:root {
	/* ---- 品牌色（实测） ---- */
	--wb-brand: #28b894;          /* 主强调色· 墨绿 */
	--wb-brand-hover: #009273;    /* 深一档 hover */
	--wb-brand-soft: #f3f9f6;     /* 极浅绿底 */
	--wb-brand-soft-2: #ddf0ec;   /* 浅绿纹理 */

	/* ---- 中性色（实测） ---- */
	--wb-black: #0a0a0a;          /* 页脚底 / 标题 */
	--wb-ink: #1a1a1a;            /* 正文主色 */
	--wb-ink-2: #191a23;          /* 次级深色面板 */
	--wb-text: #646464;           /* 辅助文字 */
	--wb-text-2: #a1a1a1;         /* 占位 / 禁用 */
	--wb-border: #e5e5e5;         /* 主边框（实测最高频） */
	--wb-border-2: #ebebeb;        /* 浅边框 */
	--wb-surface: #fafafa;        /* 浅灰面*/
	--wb-surface-2: #f7f8f9;      /* 更浅灰面 */
	--wb-white: #ffffff;

	/* ---- 圆角（实测出现过的全部值） ---- */
	--wb-r-xs: 1px;
	--wb-r-sm: 4px;
	--wb-r-md: 6px;
	--wb-r-lg: 8px;
	--wb-r-xl: 12px;
	--wb-r-2xl: 16px;
	--wb-r-3xl: 20px;
	--wb-r-pill: 999px;

	/* ---- 阴影（实测） ---- */
	--wb-sh-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
	--wb-sh-md: 0 8px 24px rgba(0, 0, 0, 0.14);
	--wb-sh-lg: 0 16px 40px rgba(0, 0, 0, 0.08);
	--wb-sh-xl: 0 24px 64px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.06);

	/* ---- 字体（实测 font-family 链） ---- */
	--wb-font: "PingFang SC", "Microsoft YaHei", "Alimama FangYuanTi VF",
		-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
		sans-serif;
	--wb-font-display: "Alimama ShuHeiTi", "PingFang SC", "Microsoft YaHei", sans-serif;
	--wb-font-mono: "SF Mono", Monaco, "Cascadia Code", Consolas, monospace;

	/* ---- 间距 ---- */
	--wb-s-1: 4px;
	--wb-s-2: 8px;
	--wb-s-3: 12px;
	--wb-s-4: 16px;
	--wb-s-5: 20px;
	--wb-s-6: 24px;
	--wb-s-8: 32px;
	--wb-s-10: 40px;
	--wb-s-12: 48px;
	--wb-s-16: 64px;
	--wb-s-20: 80px;
	--wb-s-24: 96px;

	/* ---- 布局 ---- */
	--wb-container: 1200px;
	--wb-container-wide: 1400px;
	--wb-gutter: 24px;
	--wb-header-h: 64px;

	/* ---- 动效 ---- */
	--wb-ease: cubic-bezier(0.4, 0, 0.2, 1);
	--wb-dur: 0.3s;

	/* ---- 层级 ---- */
	--wb-z-header: 1000;
	--wb-z-mobile: 1100;
	--wb-z-overlay: 1050;
}

*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	font-size: 16px;
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
}

body {
	font-family: var(--wb-font);
	font-weight: 400;
	line-height: 1.6;
	color: var(--wb-ink);
	background-color: var(--wb-white);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}

body.wb-no-scroll {
	overflow: hidden;
}

a {
	text-decoration: none;
	color: inherit;
	transition: color var(--wb-dur) var(--wb-ease);
}

ul,
ol {
	list-style: none;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

button {
	font-family: inherit;
	font-size: inherit;
	line-height: inherit;
	border: none;
	background: none;
	cursor: pointer;
	color: inherit;
	transition: all var(--wb-dur) var(--wb-ease);
}

input,
textarea,
select {
	font-family: inherit;
	font-size: inherit;
	line-height: inherit;
	border: 1px solid var(--wb-border);
	border-radius: var(--wb-r-sm);
	padding: 12px;
	background-color: var(--wb-white);
}

input:focus,
textarea:focus,
select:focus {
	outline: none;
	border-color: var(--wb-brand);
	box-shadow: 0 0 0 3px rgba(40, 184, 148, 0.1);
}

code {
	font-family: var(--wb-font-mono);
	background-color: var(--wb-surface);
	padding: 2px 4px;
	border-radius: var(--wb-r-sm);
	font-size: 0.875em;
	color: #e53e3e;
}

pre {
	font-family: var(--wb-font-mono);
	background-color: var(--wb-ink);
	color: var(--wb-border);
	padding: 16px;
	border-radius: var(--wb-r-lg);
	overflow-x: auto;
	margin: 16px 0;
}

blockquote {
	margin: 16px 0;
	padding: 16px 24px;
	border-left: 4px solid var(--wb-brand);
	background-color: var(--wb-surface-2);
	border-radius: 0 var(--wb-r-lg) var(--wb-r-lg) 0;
	color: var(--wb-text);
}

hr {
	border: none;
	height: 1px;
	background-color: var(--wb-border);
	margin: 32px 0;
}

/* ---- 滚动条（实测样式） ---- */
::-webkit-scrollbar {
	width: 8px;
	height: 8px;
}

::-webkit-scrollbar-track {
	background: var(--wb-surface);
	border-radius: var(--wb-r-sm);
}

::-webkit-scrollbar-thumb {
	background: #cbd5e1;
	border-radius: var(--wb-r-sm);
}

::-webkit-scrollbar-thumb:hover {
	background: #94a3b8;
}

/* ==========================================================================
   通用布局工具
   ========================================================================== */

.home-v2-container {
	width: 100%;
	max-width: var(--wb-container);
	margin: 0 auto;
	padding: 0 var(--wb-gutter);
}

.wb2-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: var(--wb-s-10);
	flex-wrap: wrap;
}

.wb2-head__left {
	display: flex;
	flex-direction: column;
	gap: var(--wb-s-4);
}

.wb2-head__tag,
.wb2-download__tag {
	display: inline-flex;
	align-items: center;
	gap: var(--wb-s-2);
}

.wb2-head__tag-cn,
.wb2-download__tag-cn {
	font-style: normal;
	font-size: 13px;
	font-weight: 500;
	color: var(--wb-brand);
	letter-spacing: 0.02em;
}

.wb2-head__tag-en,
.wb2-download__tag-en {
	font-style: normal;
	font-size: 12px;
	font-weight: 500;
	color: var(--wb-text-2);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.wb2-head__title {
	font-family: var(--wb-font-display);
	font-size: 40px;
	font-weight: 700;
	line-height: 1.25;
	color: var(--wb-black);
	letter-spacing: -0.01em;
}

.wb2-head__sub {
	font-size: 15px;
	line-height: 1.75;
	color: var(--wb-text);
	max-width: 460px;
}

.home-v2-section {
	padding-top: var(--wb-s-24);
}

/* ==========================================================================
   按钮系统
   ========================================================================== */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	height: 40px;
	padding: 0 20px;
	border-radius: var(--wb-r-lg);
	font-size: 14px;
	font-weight: 500;
	white-space: nowrap;
	position: relative;
	overflow: hidden;
}

.btn--login {
	background: var(--wb-white);
	color: var(--wb-ink);
	box-shadow: inset 0 0 0 1px var(--wb-border);
}

.btn--login:hover {
	box-shadow: inset 0 0 0 1px var(--wb-ink);
	color: var(--wb-black);
}

.btn--download {
	background: var(--wb-black);
	color: var(--wb-white);
}

.btn--download:hover {
	background: var(--wb-brand);
}

.btn--primary {
	background: var(--wb-black);
	color: var(--wb-white);
	height: 44px;
	padding: 0 24px;
	border-radius: var(--wb-r-lg);
	font-size: 15px;
	font-weight: 500;
}

.btn--primary:hover {
	background: var(--wb-brand);
}

.btn--primary .hover-bg {
	position: absolute;
	inset: 0;
	background: var(--wb-brand);
	transform: translateY(101%);
	transition: transform var(--wb-dur) var(--wb-ease);
}

.btn--primary:hover .hover-bg {
	transform: translateY(0);
}

.btn--primary span {
	position: relative;
	z-index: 1;
}

/* 下划线 hover 效果（实测 .underline-hover） */
.underline-hover {
	position: relative;
	color: var(--wb-brand);
}

.underline-hover::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -2px;
	width: 100%;
	height: 2px;
	border-radius: 2px;
	background: var(--wb-brand);
	transform: scaleX(0);
	transform-origin: right;
	transition: transform var(--wb-dur) var(--wb-ease);
}

.underline-hover:hover::after,
.underline-hover.active::after {
	transform: scaleX(1);
	transform-origin: left;
}

/* ==========================================================================
   工具类
   ========================================================================== */

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border-width: 0;
}

.wb-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

/* 滚动入场动画 */
.wb-reveal {
	opacity: 0;
	transform: translateY(28px);
	transition: opacity 0.7s var(--wb-ease), transform 0.7s var(--wb-ease);
}

.wb-reveal.is-visible {
	opacity: 1;
	transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	.wb-reveal {
		opacity: 1;
		transform: none;
		transition: none;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}