/* zixuann 记忆终端 v3 */
:root {
  --bg: #f4f7fb;
  --paper: #ffffff;
  --ink: #2a3140;
  --muted: #7a8499;
  --accent: #5b9bd5;
  --accent-2: #ff4655;
  --accent-soft: #e8f2fc;
  --line: #e6ecf4;
  --radius: 16px;
  --shadow: 0 8px 28px rgba(42, 49, 64, 0.07);
  --font: "LXGW WenKai", "霞鹜文楷", "Noto Serif SC", "Source Han Serif SC", "STSong", serif;
  --font-ui: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --font-code: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  --max: 1120px;
  --read: 46rem;
}

html.dark {
  --bg: #121622;
  --paper: #1a2030;
  --ink: #e6ecf7;
  --muted: #9aa6bc;
  --accent: #7eb6ff;
  --accent-soft: rgba(126, 182, 255, 0.14);
  --line: rgba(154, 166, 188, 0.18);
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* 明暗切换：柔和渐变 */
html.theme-anim,
html.theme-anim body,
html.theme-anim .site-nav,
html.theme-anim .card,
html.theme-anim .toc,
html.theme-anim .echo,
html.theme-anim .article-card,
html.theme-anim .about-card,
html.theme-anim .icon-btn,
html.theme-anim .tag-chip,
html.theme-anim .search-box,
html.theme-anim .post-cover,
html.theme-anim .stat-row,
html.theme-anim .side-note,
html.theme-anim .hero-wave path,
html.theme-anim .article-body pre,
html.theme-anim .article-body code,
html.theme-anim .series-nav {
  transition:
    background-color 0.55s ease,
    color 0.55s ease,
    border-color 0.55s ease,
    box-shadow 0.55s ease,
    fill 0.55s ease !important;
}

body {
  margin: 0;
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.85;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* progress */
.progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  z-index: 100;
}

/* nav */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 22px;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.05rem; color: var(--ink);
  font-family: var(--font-ui);
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px; overflow: hidden;
  display: inline-flex; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.brand-mark img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.nav-links { display: flex; gap: 4px; flex-wrap: wrap; }
.nav-links a {
  padding: 6px 12px; border-radius: 999px; color: var(--muted); font-size: 0.92rem;
}
.nav-links a:hover, .nav-links a.active {
  background: var(--accent-soft); color: var(--accent); text-decoration: none;
}
.nav-actions { display: flex; gap: 8px; }
.icon-btn {
  border: 1px solid var(--line); background: var(--paper); color: var(--muted);
  width: 36px; height: 36px; border-radius: 10px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0;
}
.icon-btn:hover {
  border-color: var(--accent); color: var(--accent);
  background: var(--accent-soft);
}
.icon {
  width: 18px; height: 18px; display: block;
}
.menu-btn { display: none; }
.mobile-nav {
  display: none; flex-wrap: wrap; gap: 8px; padding: 12px 16px;
  background: var(--paper); border-bottom: 1px solid var(--line);
}
.mobile-nav.open { display: flex; }

/* hero */
.hero {
  position: relative; min-height: 54vh; display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  background: #1a2233 url("valorant/hero-jett.jpg") center/cover no-repeat;
}
.hero-shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,16,28,0.25), rgba(10,16,28,0.45));
}
.hero-copy {
  position: relative; z-index: 2; text-align: center; padding: 96px 20px 120px; max-width: 860px;
}
.hero-kicker {
  margin: 0 0 10px; letter-spacing: 0.28em; font-size: 0.78rem;
  color: rgba(255,255,255,0.78); font-family: var(--font-ui);
}
.hero-title {
  margin: 0 0 12px; font-family: var(--font);
  font-size: clamp(2.1rem, 5vw, 3.3rem); font-weight: 800; letter-spacing: 0.05em;
  color: #fff; text-shadow: 0 12px 40px rgba(0,0,0,0.35);
}
.hero-sub {
  margin: 0 auto 22px; max-width: 28em; color: rgba(255,255,255,0.9);
  letter-spacing: 0.08em; font-family: var(--font-ui);
}
.hero-stats {
  display: flex; justify-content: center; gap: 18px; flex-wrap: wrap;
  color: rgba(255,255,255,0.85); font-size: 0.9rem;
}
.hero-stats b { color: #fff; }
.hero-wave { position: absolute; left: 0; right: 0; bottom: -1px; line-height: 0; z-index: 3; }
.hero-wave svg { display: block; width: 100%; height: 80px; }

/* layout */
.page {
  max-width: var(--max); margin: -28px auto 72px; padding: 0 18px;
  display: grid; grid-template-columns: 236px minmax(0, 1fr) 248px;
  gap: 18px; align-items: start; position: relative; z-index: 4;
}
.page.single, .page.article-page { grid-template-columns: 236px minmax(0, 1fr) 248px; }
.page.single { grid-template-columns: minmax(0, 1fr); max-width: 860px; margin-top: 28px; }
.page.article-page { margin-top: 28px; }
.stack { display: grid; gap: 16px; }

.card {
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; border: 1px solid var(--line);
}
.card.pad { padding: 28px 30px; }
.center { text-align: center; }

/* profile */
.profile { text-align: center; padding: 24px 16px 20px; }
.profile-avatar {
  width: 104px; height: 104px; margin: 0 auto 12px; border-radius: 28px; overflow: hidden;
  box-shadow: 0 12px 28px rgba(126,182,255,0.25);
}
.profile-name { margin: 0; font-size: 1.25rem; font-family: var(--font); }
.profile-name::after {
  content: ""; display: block; width: 28px; height: 3px; margin: 10px auto 12px;
  border-radius: 99px; background: var(--accent);
}
.profile-bio { margin: 0 0 14px; color: var(--muted); font-size: 0.88rem; }
.profile-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.profile-links a {
  padding: 6px 12px; border-radius: 999px; background: var(--accent-soft);
  color: var(--accent); font-size: 0.82rem;
}

/* chips / badges */
.tagbar { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-chip {
  padding: 7px 12px; border-radius: 999px; background: var(--paper);
  color: var(--muted); font-size: 0.84rem; border: 1px solid var(--line);
}
.tag-chip:hover, .tag-chip.active {
  background: var(--accent-soft); color: var(--accent); text-decoration: none; border-color: transparent;
}
.tag-chip b { margin-left: 4px; color: inherit; }
.badges { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.badge {
  font-size: 0.75rem; padding: 3px 10px; border-radius: 999px;
  background: rgba(255,70,85,0.12); color: var(--accent-2); font-family: var(--font-ui);
}
.badge.series { background: var(--accent-soft); color: var(--accent); }

.section-title {
  font-family: var(--font); font-size: 1.25rem; margin: 8px 4px 14px;
  display: flex; align-items: center; gap: 10px;
}
.section-title::before {
  content: ""; width: 4px; height: 18px; border-radius: 99px; background: var(--accent);
}
.section-title small { color: var(--muted); font-weight: 400; }

/* post cards */
.post-card {
  display: grid; grid-template-columns: minmax(0,1fr) 168px; gap: 16px;
  margin-bottom: 16px; transition: transform .18s ease, box-shadow .18s ease;
}
.post-card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(42,49,64,0.12); }
.post-title { margin: 0 0 8px; font-size: 1.22rem; line-height: 1.4; font-family: var(--font); }
.post-title a { color: var(--ink); }
.post-title a:hover { color: var(--accent); text-decoration: none; }
.post-meta {
  display: flex; flex-wrap: wrap; gap: 10px; color: var(--muted);
  font-size: 0.82rem; margin-bottom: 8px; font-family: var(--font-ui);
}
.post-summary { margin: 0; color: var(--muted); font-size: 0.95rem; }
.post-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.post-tags span, .post-tags a {
  font-size: 0.78rem; color: var(--accent); background: var(--accent-soft);
  padding: 3px 10px; border-radius: 999px;
}
.post-cover {
  border-radius: 12px; overflow: hidden; min-height: 112px; border: 1px solid var(--line);
  background: linear-gradient(160deg, #cfe4f7, #a78bfa);
}
.post-cover img { width: 100%; height: 100%; min-height: 112px; object-fit: cover; }

/* sidebar */
.side-title {
  margin: 0 0 14px; font-size: 1rem; display: flex; align-items: center; gap: 8px;
  font-family: var(--font);
}
.side-title::before {
  content: ""; width: 4px; height: 16px; border-radius: 99px; background: var(--accent);
}
.stat-row {
  display: flex; justify-content: space-between; padding: 9px 2px;
  border-bottom: 1px dashed var(--line); font-size: 0.9rem; color: var(--muted);
}
.stat-row:last-child { border-bottom: none; }
.stat-row b { color: var(--ink); font-variant-numeric: tabular-nums; }
.side-note {
  margin-top: 12px; padding: 12px; border-radius: 12px;
  background: var(--accent-soft); color: var(--muted); font-size: 0.82rem;
}

/* lists */
.arch-list { list-style: none; margin: 0 0 22px; padding: 0; }
.arch-list li {
  display: flex; gap: 14px; padding: 10px 2px; border-bottom: 1px solid var(--line);
}
.arch-list span { color: var(--muted); font-size: 0.86rem; min-width: 6.5em; font-family: var(--font-ui); }
.arch-list a { color: var(--ink); }
.arch-list a:hover { color: var(--accent); text-decoration: none; }

/* article */
.article-shell { display: grid; gap: 16px; }
.article-card {
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 36px 34px 28px; border: 1px solid var(--line);
}
.article-header h1 {
  margin: 0 0 12px; font-family: var(--font); font-size: 2rem; line-height: 1.35;
}
.article-header .post-meta {
  margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--line);
}
.article-body {
  font-family: var(--font); font-size: 1.06rem; max-width: var(--read);
}
.article-body h2 { font-size: 1.45rem; margin: 1.8em 0 0.7em; }
.article-body h3 { font-size: 1.2rem; margin: 1.5em 0 0.55em; }
.article-body p { margin: 0 0 1.15em; }
.article-body ul, .article-body ol { margin: 0 0 1.15em; padding-left: 1.4em; }
.article-body blockquote {
  margin: 1.3em 0; padding: 0.6em 1em; border-left: 3px solid var(--accent);
  color: var(--muted); background: var(--accent-soft); border-radius: 0 12px 12px 0;
}
.article-body code {
  font-family: var(--font-code); font-size: 0.88em;
  background: var(--accent-soft); padding: 0.15em 0.4em; border-radius: 6px;
}
.article-body pre {
  background: #1a2030; color: #e8eef8; padding: 14px 16px; border-radius: 12px; overflow-x: auto;
}
html.dark .article-body pre { background: #0d111c; }
.article-body pre code { background: none; color: inherit; padding: 0; font-size: 0.88rem; }
.article-foot {
  margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line);
}
.copyright { color: var(--muted); font-size: 0.85rem; margin: 14px 0 0; }

.series-nav {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin: 0 0 18px; padding: 12px 14px; border-radius: 12px;
  background: var(--accent-soft); font-size: 0.9rem;
}

/* TOC */
.toc {
  position: sticky; top: 76px; padding: 16px; border-radius: var(--radius);
  background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow);
  font-family: var(--font-ui); font-size: 0.88rem;
}
.toc-title { font-weight: 700; margin-bottom: 10px; }
.toc a { display: block; color: var(--muted); padding: 5px 0; border-left: 2px solid transparent; padding-left: 10px; }
.toc a:hover, .toc a.active { color: var(--accent); border-left-color: var(--accent); text-decoration: none; }
.toc-h3 { padding-left: 22px !important; font-size: 0.84rem; }

/* echo / comments */
.echo {
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px 24px; border: 1px solid var(--line);
}
.echo-title { margin: 0 0 6px; font-family: var(--font); font-size: 1.15rem; }
.echo-note { margin: 0 0 14px; color: var(--muted); font-size: 0.9rem; }

/* buttons / 404 */
.btn {
  display: inline-block; padding: 10px 18px; border-radius: 999px;
  background: var(--accent); color: #fff; font-family: var(--font-ui);
}
.btn:hover { text-decoration: none; filter: brightness(1.05); }

/* footer */
.site-footer {
  text-align: center; padding: 28px 16px 48px; color: var(--muted);
  font-size: 0.86rem; border-top: 1px solid var(--line);
}
.footer-meta {
  margin-top: 8px; display: flex; justify-content: center; gap: 14px; flex-wrap: wrap;
}

/* search */
.search-modal {
  position: fixed; inset: 0; z-index: 80; background: rgba(10,16,28,0.45);
  display: flex; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px;
}
.search-modal[hidden] { display: none !important; }
.search-box {
  width: min(640px, 100%); background: var(--paper); border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25); overflow: hidden;
}
#search-input {
  width: 100%; border: 0; padding: 16px 18px; font-size: 1rem;
  background: transparent; color: var(--ink); outline: none;
}
#search-results { max-height: 50vh; overflow: auto; border-top: 1px solid var(--line); }
#search-results a {
  display: block; padding: 12px 18px; color: var(--ink); border-bottom: 1px solid var(--line);
}
#search-results a:hover { background: var(--accent-soft); text-decoration: none; }
#search-results .meta { color: var(--muted); font-size: 0.82rem; }

/* responsive */
@media (max-width: 980px) {
  .page, .page.article-page, .page.single {
    grid-template-columns: 1fr; max-width: 760px;
  }
  .side-col { order: 3; }
  .toc { position: static; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .menu-btn { display: inline-block; }
  .hero-title { font-size: 1.75rem; }
  .post-card { grid-template-columns: 1fr; }
  .post-cover { min-height: 160px; order: -1; }
  .article-card { padding: 22px 16px; }
}
