/* ===== Hermes Journal · 公共样式（电光蓝 + 古典抖动网点风格） ===== */
:root {
	--blue: #0000f2;
	--blue-dk: #000091;
	--blue-md: #0000c2;
	--blue-lt: #3b3bff;
	--paper: #f2f2f2;
	--white: #fff;
	--ink: #14143a;
	--line-l: rgba(242, 242, 242, .28);
	--line-b: rgba(0, 0, 242, .2);
	--display: "Antonio", "Noto Sans SC", sans-serif;
	--sans: "Space Grotesk", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
	--mono: "JetBrains Mono", "Noto Sans SC", monospace;
	--ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--paper); color: var(--blue); font-family: var(--sans); font-weight: 400; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
svg, canvas { display: block; }
button { font: inherit; background: none; border: 0; color: inherit; cursor: pointer; }
::selection { background: var(--blue); color: var(--paper); }
.on-blue { background: var(--blue); color: var(--paper); }
.on-blue ::selection { background: var(--paper); color: var(--blue); }

/* 字体工具 */
.display { font-family: var(--display); font-weight: 200; letter-spacing: -.01em; line-height: .92; text-transform: none; }
.label { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.cn-thin { font-family: "Noto Sans SC", sans-serif; font-weight: 200; }

/* 按钮：白底蓝字 / 浅蓝底白字 */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 11px 16px; font-family: var(--display); font-weight: 400; font-size: 17px; letter-spacing: .02em; text-transform: uppercase; border-radius: 3px; transition: transform .4s var(--ease), background .3s, color .3s, box-shadow .4s; }
.btn svg { width: 18px; height: 18px; }
.btn-w { background: var(--white); color: var(--blue); }
.btn-l { background: rgba(255, 255, 255, .18); color: var(--white); }
.btn-b { background: var(--blue); color: var(--white); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 0 -4px rgba(0, 0, 0, .18); }
.btn-l:hover { background: rgba(255, 255, 255, .28); }

/* ===== 导航：蓝底白字，滚动后变浅底蓝字 ===== */
.header { position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: 120px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 clamp(16px, 5vw, 64px); color: var(--white); transition: height .5s var(--ease), background .4s, color .4s, border-color .4s; border-bottom: 1px solid transparent; }
.header.scrolled { height: 64px; background: rgba(242, 242, 242, .96); color: var(--blue); border-color: var(--line-b); backdrop-filter: blur(8px); }
.nav { display: flex; gap: clamp(18px, 4vw, 64px); font-family: var(--display); font-weight: 400; font-size: 17px; letter-spacing: .08em; text-transform: uppercase; }
.nav.r { justify-content: flex-end; align-items: center; }
.nav a { position: relative; }
.nav a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease); }
.nav a:not(.btn):hover::after, .nav a.on::after { transform: scaleX(1); transform-origin: left; }
.header .btn { padding: 8px 12px; font-size: 16px; }
.header:not(.scrolled) .btn-b { background: rgba(255, 255, 255, .18); }
.logo { position: relative; display: grid; place-items: center; text-align: center; width: 120px; height: 64px; }
.logo .txt { font-family: var(--display); font-weight: 300; font-size: 30px; line-height: .86; letter-spacing: -.01em; transition: opacity .35s, transform .5s var(--ease); }
.logo .glyph { position: absolute; width: 40px; opacity: 0; transform: translateY(10px) scale(.8); transition: opacity .35s, transform .5s var(--ease); }
.header.scrolled .logo .txt { opacity: 0; transform: translateY(-10px) scale(.8); }
.header.scrolled .logo .glyph { opacity: 1; transform: none; }
.socials { position: absolute; top: calc(100% - 22px); left: 50%; translate: -50% 0; display: flex; gap: 14px; transition: opacity .3s; }
.socials svg { width: 17px; height: 17px; fill: currentColor; }
.header.scrolled .socials { opacity: 0; pointer-events: none; }
.burger { display: none; width: 28px; height: 14px; position: relative; }
.burger span { position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; transition: transform .4s var(--ease); }
.burger span:last-child { bottom: 0; }
@media (max-width: 860px) {
	.nav.l a, .nav.r a:not(.btn) { display: none; }
	.burger { display: block; }
	.header { height: 80px; }
	.socials { display: none; }
}

/* 移动端全屏菜单 */
.menu { position: fixed; inset: 0; z-index: 60; background: var(--blue); color: var(--white); padding: 100px 24px 30px; display: flex; flex-direction: column; gap: 6px; clip-path: inset(0 0 100% 0); transition: clip-path .7s var(--ease); }
.menu.open { clip-path: inset(0 0 0 0); }
.menu a { font-family: var(--display); font-weight: 200; font-size: 56px; line-height: 1.05; transform: translateY(30px); opacity: 0; transition: transform .7s var(--ease), opacity .7s; }
.menu.open a { transform: none; opacity: 1; }
.menu a:nth-child(3) { transition-delay: .05s; } .menu a:nth-child(4) { transition-delay: .1s; } .menu a:nth-child(5) { transition-delay: .15s; }
.menu-close { position: absolute; top: 28px; right: 24px; }

/* ===== 抖动网点图片 ===== */
.dither { position: relative; overflow: hidden; background: var(--blue); }
.dither canvas { position: absolute; left: 0; top: 0; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; }
.dither[data-speed] canvas { top: -10%; height: 120%; will-change: transform; }
/* 扫描线：悬停时一条亮带扫过 */
.dither::after { content: ""; position: absolute; left: 0; right: 0; top: -30%; height: 30%; background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, .22), transparent); pointer-events: none; opacity: 0; }
a:hover .dither::after, .dither.scan::after { opacity: 1; animation: scan 1.4s linear infinite; }
@keyframes scan { to { top: 100%; } }
.dither .tag-corner { position: absolute; z-index: 2; left: 10px; top: 10px; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; color: var(--white); background: var(--blue); padding: 3px 6px; }

/* ===== Logo：记忆女神抖动头像 ===== */
.mark { display: block; width: 100%; height: auto; }
/* 翅膀扇动 */
.mark .wing { transform-box: fill-box; transform-origin: 100% 100%; animation: flutter 2.4s ease-in-out infinite alternate; }
@keyframes flutter { from { transform: rotate(0); } to { transform: rotate(-12deg); } }
/* 扫描线每隔几秒扫过头像 */
.mark .scan { animation: lscan 6s linear infinite; }
@keyframes lscan { 0% { transform: translateY(0); } 25%, 100% { transform: translateY(112px); } }
/* 悬停时扫描加速 */
a:hover .mark .scan { animation-duration: 1.2s; }

/* 进入视口时显现 */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
/* 标题逐行上滑 */
.lines .ln { display: block; overflow: hidden; padding-bottom: .12em; margin-bottom: -.08em; }
.lines .ln > span { display: inline-block; transform: translateY(105%); transition: transform 1.1s var(--ease); }
.lines.in .ln > span { transform: none; }
.lines.in .ln:nth-child(2) > span { transition-delay: .08s; }
.lines.in .ln:nth-child(3) > span { transition-delay: .16s; }
.lines.in .ln:nth-child(4) > span { transition-delay: .24s; }
/* 文字随滚动点亮 */
[data-fill] .w { opacity: .18; transition: opacity .25s; }
[data-fill] .w.on { opacity: 1; }
.read-bar { position: fixed; left: 0; top: 0; height: 3px; background: var(--blue); width: 0; z-index: 70; }

/* ===== 终端块 ===== */
.term { background: var(--blue-dk); border-radius: 4px; overflow: hidden; font-family: var(--mono); font-size: 13px; color: var(--white); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.term-tabs { display: flex; gap: 2px; padding: 4px 4px 0; }
.term-tabs button { flex: 1; padding: 9px 6px; background: rgba(255, 255, 255, .06); font-size: 12px; position: relative; transition: background .3s; }
.term-tabs button::before, .term-tabs button::after { content: ":"; position: absolute; top: 50%; translate: 0 -50%; opacity: .4; }
.term-tabs button::before { left: 8px; } .term-tabs button::after { right: 8px; }
.term-tabs button.on { background: var(--blue); }
.term-tabs button:not(.on) span { text-decoration: underline; text-underline-offset: 3px; }
.term-body { display: flex; align-items: center; gap: 12px; padding: 16px 14px; white-space: nowrap; overflow: hidden; }
.term-body code { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.term-body code::after { content: "▍"; animation: blink 1s steps(1) infinite; margin-left: 2px; }
.term-body button svg { width: 16px; height: 16px; stroke: currentColor; fill: none; }
@keyframes blink { 50% { opacity: 0; } }

/* ===== 页脚 ===== */
footer { position: relative; overflow: hidden; background: var(--blue); color: var(--white); }
footer .bust { position: absolute; inset: 0; opacity: .55; }
footer .bust canvas { -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 85%); mask-image: linear-gradient(to bottom, #000 30%, transparent 85%); }
.foot-in { position: relative; z-index: 1; padding: clamp(200px, 30vw, 420px) clamp(16px, 5vw, 64px) 40px; }
.foot-big { font-family: var(--display); font-weight: 100; font-size: clamp(72px, 17vw, 300px); line-height: .8; white-space: nowrap; letter-spacing: -.02em; opacity: .35; margin-bottom: -4vw; position: relative; z-index: -1; transform: translateX(calc(var(--fx, 0) * -1px)); }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 24px; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.foot-grid h5 { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; opacity: .7; font-weight: 400; margin-bottom: 8px; }
.foot-grid h6 { font-family: var(--display); font-weight: 300; font-size: 26px; margin-bottom: 18px; }
.foot-grid li { list-style: none; font-family: var(--display); font-weight: 400; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; line-height: 2.1; }
.foot-grid li a { transition: opacity .3s; }
.foot-grid li a:hover { opacity: .6; }
.foot-mark { width: 128px; margin-bottom: 14px; }
.foot-bot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 60px; font-family: var(--display); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.foot-bot .socials-f { display: flex; gap: 16px; }
.foot-bot svg { width: 17px; height: 17px; fill: currentColor; }

/* 页面切换：蓝色像素块 */
.wipe { position: fixed; inset: 0; z-index: 100; pointer-events: none; display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: 1fr; }
.wipe .wmark { position: absolute; left: 50%; top: 50%; width: 90px; translate: -50% -50%; color: var(--white); z-index: 1; transition: opacity .3s; }
.wipe.out .wmark { opacity: 0; }
.wipe i { background: var(--blue); transform: scaleY(1); transform-origin: top; transition: transform .5s var(--ease); }
.wipe.out i { transform: scaleY(0); }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* 导航图标与字标分行，保留原有滚动切换。 */
.header .logo .socials { top: calc(100% + 6px); }
