@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,400;0,500;1,400&display=swap');

/* ─── 变量 ─── */
:root {
  --c-bg: #0d0d0d;
  --c-bg2: #111111;
  --c-bg3: #181818;
  --c-bg4: #222222;
  --c-yellow: #e0fe50;
  --c-teal: #3dffc0;
  --c-text: #e8e8e8;
  --c-muted: #888888;
  --c-border: #2a2a2a;
  --c-border2: #333333;
  --font-mono: 'JetBrains Mono', 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
  --radius: 10px;
  --nav-h: 100px;
  --max-w: 1200px;
  --prose-w: 780px;
}

/* ─── 重置 ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--c-yellow); text-decoration: none; transition: color .2s; }
a:hover { color: var(--c-teal); }
ul { list-style: none; }

/* ─── 滚动条 ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--c-bg); }
::-webkit-scrollbar-thumb { background: var(--c-border2); border-radius: 3px; }

/* ─── 布局包裹 ─── */
.site-wrap { min-height: 100vh; display: flex; flex-direction: column; }

/* ─── 导航 ─── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,13,13,.97);
  border-bottom: 1px solid var(--c-border);
  backdrop-filter: blur(8px);
}
.header-brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 14px 24px 10px;
  position: relative;
}
.brand-center {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-logo { width: 32px; height: 32px; border-radius: 6px; }
.brand-name {
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: .06em;
  color: var(--c-yellow);
}
.brand-name:hover { color: var(--c-teal); }
.brand-text { display: inline-block; }

.header-search {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
}
.search-form { display: flex; align-items: center; gap: 0; }
.search-input {
  background: var(--c-bg3);
  border: 1px solid var(--c-border2);
  border-right: none;
  color: var(--c-text);
  font-family: var(--font-mono);
  font-size: .85rem;
  padding: 7px 12px;
  border-radius: var(--radius) 0 0 var(--radius);
  width: 180px;
  outline: none;
  transition: border-color .2s;
}
.search-input:focus { border-color: var(--c-yellow); }
.search-input::placeholder { color: var(--c-muted); }
.search-btn {
  background: var(--c-yellow);
  border: none;
  color: var(--c-bg);
  font-family: var(--font-mono);
  font-size: 1rem;
  padding: 7px 13px;
  border-radius: 0 var(--radius) var(--radius) 0;
  cursor: pointer;
  transition: background .2s;
  min-height: 40px;
  min-width: 40px;
}
.search-btn:hover { background: var(--c-teal); }

.site-nav {
  border-top: 1px solid var(--c-border);
}
.site-nav ul {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  padding: 0 16px;
}
.site-nav ul li a {
  display: block;
  font-size: .82rem;
  letter-spacing: .04em;
  color: var(--c-muted);
  padding: 10px 14px;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
  white-space: nowrap;
  min-height: 40px;
  line-height: 1.5;
}
.site-nav ul li a:hover,
.site-nav ul li[aria-current="page"] a {
  color: var(--c-yellow);
  border-bottom-color: var(--c-yellow);
}

/* ─── 面包屑 ─── */
.breadcrumb {
  font-size: .8rem;
  color: var(--c-muted);
  letter-spacing: .03em;
  margin-bottom: 16px;
}
.breadcrumb a { color: var(--c-muted); }
.breadcrumb a:hover { color: var(--c-yellow); }
.breadcrumb span[aria-hidden] { margin: 0 6px; }
.breadcrumb [aria-current] { color: var(--c-text); }

/* ─── 首页 Hero ─── */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.hero__bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(13,13,13,.92) 0%, rgba(13,13,13,.6) 60%, rgba(13,13,13,.8) 100%);
  z-index: 1;
}
.hero__body {
  position: relative;
  z-index: 2;
  padding: 60px 48px 56px;
  max-width: var(--max-w);
  width: 100%;
}
.hero__eyebrow { margin-bottom: 16px; }
.type-label {
  font-size: .78rem;
  letter-spacing: .15em;
  color: var(--c-teal);
  text-transform: uppercase;
  border: 1px solid var(--c-teal);
  padding: 3px 10px;
  border-radius: 4px;
}
.hero__h1 {
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -.01em;
  color: var(--c-yellow);
  margin-bottom: 20px;
  background: linear-gradient(120deg, var(--c-yellow) 0%, var(--c-teal) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero__sub {
  font-size: 1.05rem;
  color: var(--c-text);
  max-width: 560px;
  margin-bottom: 24px;
  opacity: .85;
}
.hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}
.badge {
  font-size: .78rem;
  letter-spacing: .08em;
  color: var(--c-bg);
  background: var(--c-yellow);
  padding: 4px 12px;
  border-radius: 4px;
  font-weight: 500;
}
.hero__cta {
  display: inline-block;
  font-size: .9rem;
  letter-spacing: .06em;
  color: var(--c-bg);
  background: var(--c-teal);
  padding: 12px 28px;
  border-radius: var(--radius);
  font-weight: 500;
  transition: background .2s, transform .15s;
  min-height: 44px;
  line-height: 1.4;
}
.hero__cta:hover { background: var(--c-yellow); color: var(--c-bg); transform: translateY(-2px); }

/* ─── 页面主体 ─── */
.page-body {
  flex: 1;
  padding: 48px 24px;
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
}
.page-body--cat,
.page-body--entry { padding-top: 40px; }
.page-body--about,
.page-body--privacy { padding-top: 40px; }

/* ─── 正文容器 ─── */
.content-section { margin-bottom: 56px; }
.content-inner {
  max-width: var(--prose-w);
  font-size: 1rem;
  line-height: 1.8;
  color: var(--c-text);
}
.content-inner--wide { max-width: 900px; }
.content-inner--prose { max-width: 680px; }

.content-inner h2 {
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--c-yellow);
  margin: 2.2em 0 .8em;
  letter-spacing: .02em;
  border-left: 3px solid var(--c-teal);
  padding-left: 12px;
}
.content-inner h3 {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--c-teal);
  margin: 1.8em 0 .6em;
}
.content-inner p { margin-bottom: 1.1em; }
.content-inner ul, .content-inner ol {
  margin: .8em 0 1.2em 1.4em;
  list-style: disc;
}
.content-inner li { margin-bottom: .4em; }
.content-inner a { color: var(--c-teal); }
.content-inner a:hover { color: var(--c-yellow); }
.content-inner strong { color: var(--c-yellow); font-weight: 500; }
.content-inner code {
  font-family: var(--font-mono);
  font-size: .9em;
  background: var(--c-bg3);
  color: var(--c-teal);
  padding: 2px 6px;
  border-radius: 4px;
}
.content-inner blockquote {
  border-left: 3px solid var(--c-border2);
  padding: 12px 20px;
  margin: 1.5em 0;
  background: var(--c-bg2);
  color: var(--c-muted);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.content-inner time {
  color: var(--c-teal);
  font-size: .88em;
}

/* ─── 区块标题 ─── */
.section-header { margin-bottom: 28px; }
.section-label {
  display: inline-block;
  font-size: .75rem;
  letter-spacing: .15em;
  color: var(--c-teal);
  border-bottom: 1px solid var(--c-teal);
  padding-bottom: 2px;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.section-title {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--c-text);
  letter-spacing: .01em;
}

/* ─── 分类卡片（首页） ─── */
.cats-section { margin-bottom: 56px; }
.cats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.cat-card {
  background: var(--c-bg2);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  border-bottom: 3px solid var(--c-yellow);
  transition: border-color .2s, transform .2s;
  overflow: hidden;
}
.cat-card:hover { border-bottom-color: var(--c-teal); transform: translateY(-3px); }
.cat-card__inner { padding: 24px; }
.cat-card__num {
  display: block;
  font-size: .72rem;
  letter-spacing: .18em;
  color: var(--c-muted);
  margin-bottom: 10px;
}
.cat-card__title {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 10px;
}
.cat-card__title a { color: var(--c-text); }
.cat-card__title a:hover { color: var(--c-yellow); }
.cat-card__desc {
  font-size: .88rem;
  color: var(--c-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}
.cat-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tag-count {
  font-size: .75rem;
  color: var(--c-teal);
  letter-spacing: .06em;
}
.cat-card__enter {
  font-size: .82rem;
  color: var(--c-yellow);
  letter-spacing: .04em;
}

/* ─── 近期更新行 ─── */
.recent-section { margin-bottom: 40px; }
.entry-list { display: flex; flex-direction: column; gap: 0; }
.entry-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--c-border);
  flex-wrap: wrap;
}
.entry-row:last-child { border-bottom: none; }
.entry-row__cat {
  font-size: .72rem;
  letter-spacing: .1em;
  color: var(--c-bg);
  background: var(--c-teal);
  padding: 2px 8px;
  border-radius: 3px;
  white-space: nowrap;
}
.entry-row__title { flex: 1; min-width: 0; font-size: .95rem; color: var(--c-text); }
.entry-row__title:hover { color: var(--c-yellow); }
.entry-row__date { font-size: .75rem; color: var(--c-muted); white-space: nowrap; }

/* ─── 分类页 Hero ─── */
.cat-hero {
  position: relative;
  padding: 56px 48px 48px;
  border-bottom: 1px solid var(--c-border);
  overflow: hidden;
  background: linear-gradient(160deg, var(--c-bg2) 0%, var(--c-bg) 100%);
}
.cat-hero__inner { position: relative; z-index: 2; max-width: var(--max-w); margin: 0 auto; }
.cat-hero__h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 500;
  color: var(--c-yellow);
  letter-spacing: -.01em;
  margin-bottom: 14px;
  line-height: 1.2;
}
.cat-hero__desc { font-size: 1rem; color: var(--c-muted); max-width: 600px; margin-bottom: 20px; }
.stat-badge {
  font-size: .78rem;
  letter-spacing: .1em;
  color: var(--c-teal);
  border: 1px solid var(--c-teal);
  padding: 4px 12px;
  border-radius: 4px;
}
.cat-hero__deco {
  position: absolute;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  pointer-events: none;
}
.deco-text {
  font-size: clamp(4rem, 12vw, 10rem);
  font-weight: 500;
  letter-spacing: .1em;
  color: transparent;
  -webkit-text-stroke: 1px var(--c-border2);
  line-height: 1;
  user-select: none;
}
.deco-text--lg { font-size: clamp(5rem, 15vw, 13rem); }

/* ─── 子页卡片（分类页） ─── */
.children-section { margin-bottom: 40px; }
.children-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.child-card {
  background: var(--c-bg2);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  border-bottom: 3px solid var(--c-border2);
  overflow: hidden;
  transition: border-bottom-color .2s, transform .2s;
}
.child-card:hover { border-bottom-color: var(--c-teal); transform: translateY(-3px); }
.child-card__media { overflow: hidden; max-height: 180px; }
.child-card__media img { width: 100%; height: 180px; object-fit: cover; transition: transform .4s; }
.child-card:hover .child-card__media img { transform: scale(1.04); }
.child-card__body { padding: 20px; }
.child-card__num {
  display: block;
  font-size: .7rem;
  letter-spacing: .18em;
  color: var(--c-muted);
  margin-bottom: 8px;
}
.child-card__title { font-size: 1rem; font-weight: 500; margin-bottom: 8px; }
.child-card__title a { color: var(--c-text); }
.child-card__title a:hover { color: var(--c-yellow); }
.child-card__desc { font-size: .85rem; color: var(--c-muted); line-height: 1.55; margin-bottom: 14px; }
.child-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: .78rem;
}
.child-card__meta time { color: var(--c-muted); }
.child-card__link { color: var(--c-yellow); }

/* ─── 条目页 Hero ─── */
.entry-hero {
  background: var(--c-bg2);
  border-bottom: 1px solid var(--c-border);
  overflow: hidden;
}
.entry-hero__media { max-height: 400px; overflow: hidden; }
.entry-hero__img { width: 100%; height: 400px; object-fit: cover; }
.entry-hero__body {
  padding: 40px 48px 36px;
  max-width: var(--max-w);
  margin: 0 auto;
}
.entry-hero__h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  font-weight: 500;
  color: var(--c-yellow);
  letter-spacing: -.01em;
  margin-bottom: 16px;
  line-height: 1.25;
}
.entry-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-size: .82rem;
}
.entry-meta__date, .entry-meta__mod { color: var(--c-muted); }
.entry-meta__cat {
  color: var(--c-bg);
  background: var(--c-yellow);
  padding: 2px 10px;
  border-radius: 3px;
  font-size: .78rem;
  letter-spacing: .06em;
}

/* ─── 兄弟推荐（条目页） ─── */
.siblings-section { margin-top: 40px; }
.siblings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.sib-card {
  background: var(--c-bg3);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  border-bottom: 2px solid var(--c-border2);
  transition: border-bottom-color .2s, background .2s;
}
.sib-card:hover { border-bottom-color: var(--c-yellow); background: var(--c-bg2); }
.sib-card__link {
  display: block;
  padding: 18px;
}
.sib-card__title {
  display: block;
  font-size: .92rem;
  color: var(--c-text);
  margin-bottom: 6px;
  font-weight: 500;
}
.sib-card:hover .sib-card__title { color: var(--c-yellow); }
.sib-card__desc { display: block; font-size: .8rem; color: var(--c-muted); line-height: 1.5; }
.siblings-more { margin-top: 4px; }
.back-link { font-size: .88rem; color: var(--c-muted); }
.back-link:hover { color: var(--c-teal); }

/* ─── About Hero ─── */
.about-hero {
  position: relative;
  padding: 64px 48px 48px;
  border-bottom: 1px solid var(--c-border);
  overflow: hidden;
  background: linear-gradient(120deg, var(--c-bg2) 0%, var(--c-bg) 100%);
}
.about-hero__inner { position: relative; z-index: 2; max-width: var(--max-w); margin: 0 auto; }
.about-hero__h1 {
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  font-weight: 500;
  color: var(--c-teal);
  margin-bottom: 14px;
  line-height: 1.2;
}
.about-hero__sub { font-size: 1rem; color: var(--c-muted); max-width: 560px; }
.about-hero__deco {
  position: absolute;
  right: 24px;
  bottom: 0;
  z-index: 1;
  pointer-events: none;
}

/* ─── About 导航格 ─── */
.about-links { margin-top: 16px; }
.about-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.about-nav-item {
  display: block;
  padding: 16px 20px;
  background: var(--c-bg3);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  font-size: .9rem;
  color: var(--c-text);
  text-align: center;
  transition: background .2s, border-color .2s, color .2s;
  min-height: 44px;
  line-height: 1.4;
}
.about-nav-item:hover { background: var(--c-bg2); border-color: var(--c-yellow); color: var(--c-yellow); }

/* ─── Privacy Hero ─── */
.privacy-hero {
  padding: 48px 48px 36px;
  border-bottom: 1px solid var(--c-border);
  background: var(--c-bg2);
}
.privacy-hero__inner { max-width: var(--max-w); margin: 0 auto; }
.privacy-hero__h1 {
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  font-weight: 500;
  color: var(--c-text);
  margin-bottom: 10px;
}
.privacy-hero__date { font-size: .85rem; color: var(--c-muted); }
.privacy-hero__date time { color: var(--c-teal); }
.privacy-nav { margin-top: 24px; font-size: .9rem; color: var(--c-muted); padding-top: 20px; border-top: 1px solid var(--c-border); }
.privacy-nav a { color: var(--c-yellow); }

/* ─── 页脚 ─── */
.site-footer {
  background: var(--c-bg2);
  border-top: 1px solid var(--c-border);
  margin-top: auto;
}
.footer-cta {
  background: linear-gradient(90deg, var(--c-bg3) 0%, var(--c-bg2) 100%);
  border-bottom: 1px solid var(--c-border);
  padding: 40px 48px;
}
.footer-cta__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-cta__text {
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--c-yellow);
  letter-spacing: .02em;
}
.footer-cta__btn {
  display: inline-block;
  font-size: .9rem;
  color: var(--c-bg);
  background: var(--c-yellow);
  padding: 12px 28px;
  border-radius: var(--radius);
  font-weight: 500;
  transition: background .2s;
  min-height: 44px;
  line-height: 1.4;
  white-space: nowrap;
}
.footer-cta__btn:hover { background: var(--c-teal); color: var(--c-bg); }
.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 40px 48px;
}
.footer-col__head {
  font-size: .78rem;
  letter-spacing: .12em;
  color: var(--c-yellow);
  margin-bottom: 14px;
  text-transform: uppercase;
}
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col ul li a {
  font-size: .88rem;
  color: var(--c-muted);
  transition: color .2s;
}
.footer-col ul li a:hover { color: var(--c-text); }
.footer-col__note { font-size: .82rem; color: var(--c-muted); line-height: 1.6; }
.footer-bar {
  border-top: 1px solid var(--c-border);
  padding: 18px 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  font-size: .78rem;
  color: var(--c-muted);
  letter-spacing: .04em;
}
.footer-bar__links a { color: var(--c-muted); margin: 0 4px; }
.footer-bar__links a:hover { color: var(--c-yellow); }

/* ─── 动效：reveal ─── */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .5s ease, transform .5s ease;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ─── 动效：kinetic h1 ─── */
@keyframes kineticIn {
  from { opacity: 0; letter-spacing: .3em; }
  to   { opacity: 1; letter-spacing: -.01em; }
}
[data-kinetic] {
  animation: kineticIn .8s cubic-bezier(.16,1,.3,1) both;
}

/* ─── 动效：typing cursor（brand） ─── */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.brand-text::after {
  content: '_';
  display: inline-block;
  color: var(--c-yellow);
  animation: blink 1s step-end infinite;
  margin-left: 2px;
}

/* ─── prefers-reduced-motion ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* ─── 响应式 ─── */
@media (max-width: 900px) {
  .footer-cols { grid-template-columns: repeat(2, 1fr); padding: 32px 24px; }
  .header-search { position: static; transform: none; }
  .header-brand-row { flex-wrap: wrap; justify-content: space-between; padding: 12px 16px 8px; }
  .brand-center { justify-content: flex-start; }
  .cat-hero, .about-hero, .privacy-hero { padding: 40px 24px 32px; }
  .cat-hero__deco, .about-hero__deco { display: none; }
}

@media (max-width: 600px) {
  :root { --nav-h: 90px; }
  .hero__body { padding: 40px 20px 36px; }
  .hero { min-height: 65vh; }
  .hero__h1 { font-size: clamp(1.8rem, 9vw, 2.6rem); }
  .site-nav ul li a { padding: 8px 10px; font-size: .78rem; }
  .search-input { width: 120px; }
  .footer-cols { grid-template-columns: 1fr; padding: 28px 20px; gap: 24px; }
  .footer-cta { padding: 28px 20px; }
  .footer-cta__inner { flex-direction: column; align-items: flex-start; gap: 16px; }
  .footer-bar { padding: 16px 20px; flex-direction: column; gap: 8px; }
  .cats-grid { grid-template-columns: 1fr; }
  .children-grid { grid-template-columns: 1fr; }
  .siblings-grid { grid-template-columns: 1fr; }
  .about-nav-grid { grid-template-columns: repeat(2, 1fr); }
  .page-body { padding: 32px 16px; }
  .entry-hero__body { padding: 28px 20px 24px; }
  .entry-hero__img { height: 220px; }
  .header-search { width: 100%; }
  .search-input { width: calc(100% - 46px); }
}
