/* ==============================================
   LLF工作站 · 暗黑编辑风 × 现代中式
   配色: 墨黑 #0a0a08 | 朱红 #c93c2a | 琥珀金 #b8860b
   ============================================== */

/* --- 字体 --- */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;700;900&family=Noto+Sans+SC:wght@300;400;700&family=EB+Garamond:ital,wght@0,400;0,500;0,600;1,400&display=swap');

/* --- CSS Variables --- */
:root {
  --bg: #0a0a08;
  --bg-surface: #121210;
  --bg-card: #181816;
  --text: #e8e6e3;
  --text-muted: #8a8680;
  --text-dim: #5a5650;
  --accent: #c93c2a;
  --accent-hover: #e0503e;
  --gold: #b8860b;
  --gold-light: #d4a853;
  --border: rgba(232, 230, 227, 0.06);
  --border-hover: rgba(232, 230, 227, 0.12);
  --radius: 0;
  --font-display: 'Noto Serif SC', 'Source Han Serif SC', serif;
  --font-body: 'Noto Serif SC', serif;
  --font-english: 'EB Garamond', Georgia, serif;
  --font-ui: 'Noto Sans SC', sans-serif;
  --transition: 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
  min-height: 100vh;
  overflow-x: hidden;
}

/* --- Grain Texture Overlay --- */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

/* --- Container --- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
}

@media (max-width: 768px) {
  .container { padding: 0 20px; }
}

/* --- Top accent bar --- */
.top-bar {
  height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent) 30%, var(--gold) 70%, transparent 100%);
}

/* ============ HEADER ============ */
.site-header {
  padding: 32px 0 24px;
  margin-bottom: 64px;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* --- Logo / Site Title --- */
.site-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 900;
  text-decoration: none;
  color: var(--text);
  letter-spacing: 0.08em;
  position: relative;
  padding-left: 20px;
  line-height: 1;
}

.site-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  transform: skewX(-10deg);
}

.site-title:hover {
  color: var(--accent-hover);
}

/* --- Navigation --- */
.main-nav {
  display: flex;
  gap: 4px;
}

.main-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  padding: 8px 18px;
  text-transform: uppercase;
  position: relative;
  transition: color var(--transition);
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 18px;
  right: 18px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform var(--transition);
}

.main-nav a:hover {
  color: var(--text);
}

.main-nav a:hover::after,
.main-nav a.active::after {
  transform: scaleX(1);
}

.main-nav a.active {
  color: var(--text);
}

/* ============ HERO / FEATURED ============ */
.hero {
  margin-bottom: 80px;
  position: relative;
  padding-top: 16px;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
  padding: 4px 0;
}

.hero-label::before {
  content: '';
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--accent);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: 0.02em;
  margin-bottom: 20px;
}

.hero h1 a {
  text-decoration: none;
  color: var(--text);
  position: relative;
  background-image: linear-gradient(to right, var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 3px;
  transition: background-size 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  padding-bottom: 2px;
}

.hero h1 a:hover {
  background-size: 100% 3px;
}

.hero-excerpt {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 65%;
  margin-bottom: 20px;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

.hero-meta .divider {
  width: 1px;
  height: 12px;
  background: var(--text-dim);
}

.hero-tag {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  padding: 3px 10px;
  background: rgba(201, 60, 42, 0.08);
  color: var(--accent);
  border: 1px solid rgba(201, 60, 42, 0.15);
}

/* --- Decorative oversized character --- */
.hero-decor {
  position: absolute;
  right: 0;
  top: -20px;
  font-family: var(--font-display);
  font-size: 14rem;
  font-weight: 900;
  color: rgba(232, 230, 227, 0.015);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  z-index: -1;
}

/* ============ SECTION DIVIDER ============ */
.section-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 40px;
}

.section-head h2 {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--text-dim);
  white-space: nowrap;
}

.section-head .line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}

/* ============ POST CARDS ============ */
.posts-grid {
  display: grid;
  gap: 2px;
  background: var(--border);
  border: 1px solid var(--border);
}

.post-card {
  background: var(--bg-card);
  padding: 36px 40px;
  position: relative;
  transition: background var(--transition);
  cursor: default;
  animation: cardIn 0.6s ease both;
}

.post-card:nth-child(2) { animation-delay: 0.08s; }
.post-card:nth-child(3) { animation-delay: 0.16s; }
.post-card:nth-child(4) { animation-delay: 0.24s; }

.post-card:hover {
  background: #1e1e1c;
}

.post-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 0;
  background: var(--accent);
  transition: height 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.post-card:hover::before {
  height: 100%;
}

.post-card-number {
  font-family: var(--font-english);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.post-card-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 10px;
}

.post-card-title a {
  text-decoration: none;
  color: var(--text);
  transition: color var(--transition);
}

.post-card-title a:hover {
  color: var(--accent-hover);
}

.post-card-excerpt {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 14px;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  color: var(--text-dim);
}

.post-card-tags {
  display: flex;
  gap: 6px;
}

/* --- Tag style --- */
.tag {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: 2px 10px;
  background: transparent;
  color: var(--gold-light);
  border: 1px solid rgba(184, 134, 11, 0.2);
  text-decoration: none;
  transition: all var(--transition);
}

.tag:hover {
  background: rgba(184, 134, 11, 0.1);
  border-color: rgba(184, 134, 11, 0.4);
}

.tag-red {
  color: var(--accent);
  border-color: rgba(201, 60, 42, 0.2);
}

.tag-red:hover {
  background: rgba(201, 60, 42, 0.1);
  border-color: rgba(201, 60, 42, 0.4);
}

/* ============ POST DETAIL PAGE ============ */
.post-article {
  position: relative;
  animation: fadeIn 0.6s ease;
}

.post-header {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.post-header .breadcrumb {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 20px;
}

.post-header .breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}

.post-header .breadcrumb a:hover {
  color: var(--accent);
}

.post-header h1 {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.02em;
  margin-bottom: 20px;
}

.post-header .post-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--text-dim);
  flex-wrap: wrap;
}

/* --- Post content typography --- */
.post-content {
  font-size: 1rem;
  line-height: 2;
  color: var(--text);
  max-width: 720px;
}

.post-content p {
  margin-bottom: 1.6em;
}

.post-content p:first-of-type {
  font-size: 1.08rem;
  color: var(--text-muted);
  line-height: 1.9;
}

.post-content h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 900;
  margin: 2.2em 0 0.6em;
  line-height: 1.3;
  position: relative;
  display: inline-block;
}

.post-content h2::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--accent);
  margin-top: 8px;
}

.post-content h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin: 1.8em 0 0.5em;
  color: var(--gold-light);
}

.post-content blockquote {
  margin: 1.8em 0;
  padding: 24px 32px;
  border-left: none;
  background: rgba(232, 230, 227, 0.02);
  position: relative;
  font-style: italic;
}

.post-content blockquote::before {
  content: '「';
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 2rem;
  font-family: var(--font-display);
  color: var(--accent);
  opacity: 0.3;
  line-height: 1;
}

.post-content blockquote::after {
  content: '」';
  position: absolute;
  bottom: -4px;
  right: 8px;
  font-size: 2rem;
  font-family: var(--font-display);
  color: var(--accent);
  opacity: 0.3;
  line-height: 1;
}

.post-content blockquote p {
  margin-bottom: 0;
  color: var(--text-muted);
}

.post-content ul, .post-content ol {
  margin: 1.2em 0;
  padding-left: 1.5em;
}

.post-content li {
  margin-bottom: 0.4em;
  color: var(--text-muted);
}

.post-content a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(201, 60, 42, 0.25);
  transition: border-color var(--transition);
}

.post-content a:hover {
  border-color: var(--accent);
}

.post-content strong {
  color: var(--text);
  font-weight: 700;
}

.post-content code {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.82em;
  background: rgba(232, 230, 227, 0.04);
  padding: 2px 8px;
  border: 1px solid var(--border);
  color: var(--gold-light);
}

.post-content pre {
  margin: 1.8em 0;
  padding: 24px 28px;
  background: #0e0e0c;
  border: 1px solid var(--border);
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.6;
  position: relative;
}

.post-content pre::before {
  content: 'code';
  position: absolute;
  top: 8px;
  right: 12px;
  font-family: var(--font-ui);
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(232, 230, 227, 0.12);
}

.post-content pre code {
  background: none;
  padding: 0;
  border: none;
  color: inherit;
}

.post-content img {
  max-width: 100%;
  height: auto;
  margin: 2em auto;
  display: block;
  border: 1px solid var(--border);
  filter: grayscale(0.3) contrast(1.1);
  transition: filter var(--transition);
}

.post-content img:hover {
  filter: grayscale(0) contrast(1);
}

.post-content hr {
  border: none;
  margin: 2.5em 0;
  text-align: center;
  color: var(--text-dim);
  font-family: var(--font-english);
  font-size: 0.85rem;
  letter-spacing: 0.5em;
}

.post-content hr::after {
  content: '◆ ◆ ◆';
}

/* --- Post Footer --- */
.post-footer {
  margin-top: 48px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.post-footer-label {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-transform: uppercase;
}

/* ============ POSTS LIST PAGE ============ */
.page-header {
  margin-bottom: 48px;
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.page-header .page-count {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--text-dim);
}

.filter-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.filter-btn {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 16px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
}

.filter-btn:hover {
  color: var(--text);
  border-color: var(--text-dim);
}

.filter-btn.active {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(201, 60, 42, 0.06);
}

/* ============ ABOUT PAGE ============ */
.about-page {
  max-width: 720px;
  animation: fadeIn 0.6s ease;
}

.about-page h1 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 32px;
  position: relative;
  display: inline-block;
}

.about-page h1::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin-top: 12px;
}

.about-content {
  font-size: 1rem;
  line-height: 2;
  color: var(--text-muted);
}

.about-content p {
  margin-bottom: 1.4em;
}

/* ============ SEARCH PAGE ============ */
.search-page {
  animation: fadeIn 0.6s ease;
}

.search-page h1 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 32px;
}

.search-input-wrap {
  margin-bottom: 40px;
  position: relative;
}

.search-input-wrap::before {
  content: '→';
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-family: var(--font-display);
  font-size: 0.9rem;
  z-index: 1;
}

.search-input {
  width: 100%;
  padding: 16px 20px 16px 44px;
  font-family: var(--font-display);
  font-size: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text);
  outline: none;
  transition: border-color var(--transition);
}

.search-input:focus {
  border-color: var(--accent);
}

.search-input::placeholder {
  color: var(--text-dim);
  font-family: var(--font-ui);
  font-size: 0.8rem;
}

.search-results-list {
  list-style: none;
}

.search-result-item {
  padding: 