@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700&family=Syne:wght@400;500;600;700&display=swap');

/* ===== 基础重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --c-white: #ffffff;
  --c-light: #f5f5f5;
  --c-dark: #1f1f1f;
  --c-mid: #3a3a3a;
  --c-muted: #6b6b6b;
  --c-border: #e0e0e0;
  --c-accent: #1f1f1f;
  --c-accent2: #444444;
  --shadow-sm: 0 2px 6px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.16);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.22);
  --radius: 10px;
  --header-h: 64px;
  --font-body: 'Manrope', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-head: 'Syne', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--c-light);
  color: var(--c-dark);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== 站点容器 ===== */
.site-wrap {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ===== 顶部导航 ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--c-white);
  border-bottom: 1px solid var(--c-border);
  box-shadow: var(--shadow-md);
  height: var(--header-h);
  backdrop-filter: blur(10px);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  gap: 16px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-left { justify-content: flex-start; }
.nav-right { justify-content: flex-end; }

.nav-link {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--c-muted);
  padding: 10px 10px;
  border-radius: 6px;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.nav-link:hover {
  color: var(--c-dark);
  background: var(--c-light);
  text-decoration: none;
}

.brand-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-mark {
  height: 32px;
  width: auto;
}

.brand-name {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  color: var(--c-dark);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

/* ===== 主内容 ===== */
main#main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ===== Hero 区域 ===== */
.hero-section {
  position: relative;
  min-height: 70vh;
  background: var(--c-dark);
  display: flex;
  align-items: center;
  overflow: hidden;
  z-index: 2;
}

.hero-skew {
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 80px;
  background: var(--c-light);
  clip-path: polygon(0 60%, 100% 0, 100% 100%, 0 100%);
  z-index: 3;
}

.hero-content {
  position: relative;
  z-index: 4;
  max-width: 680px;
  padding: 80px 48px 120px;
  color: var(--c-white);
}

.hero-aside {
  margin-bottom: 16px;
}

.hero-eyebrow {
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 4px 12px;
  border-radius: 4px;
  display: inline-block;
}

.hero-h1 {
  font-family: var(--font-head);
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 700;
  line-height: 1.15;
  color: var(--c-white);
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.hero-lead {
  font-size: 17px;
  line-height: 1.7;
  color: rgba(255,255,255,0.75);
  margin-bottom: 32px;
  max-width: 520px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  background: var(--c-white);
  color: var(--c-dark);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  transition: transform 0.2s, box-shadow 0.2s;
  min-height: 48px;
  text-decoration: none;
}

.hero-cta:hover {
  transform: translateY(-2px) translateZ(0);
  box-shadow: var(--shadow-xl);
  text-decoration: none;
}

.hero-fig {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 45%;
  z-index: 2;
  overflow: hidden;
}

.hero-fig .hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
}

/* ===== 页面横幅（内页）===== */
.page-banner {
  position: relative;
  background: var(--c-dark);
  color: var(--c-white);
  padding: 64px 48px 80px;
  overflow: hidden;
  z-index: 2;
}

.page-banner::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 48px;
  background: var(--c-light);
  clip-path: polygon(0 60%, 100% 0, 100% 100%, 0 100%);
}

.banner-aside {
  margin-bottom: 12px;
}

.banner-eyebrow {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,0.18);
  padding: 3px 10px;
  border-radius: 4px;
  display: inline-block;
}

.page-h1 {
  font-family: var(--font-head);
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 700;
  color: var(--c-white);
  line-height: 1.2;
  margin-bottom: 12px;
}

.page-date {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}

/* ===== 内容区布局（prose + sidebar）===== */
.content-section {
  position: relative;
  z-index: 3;
}

.prose-section {
  display: grid;
  grid-template-columns: 1fr 280px;
  grid-template-rows: auto 1fr;
  gap: 0 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px 40px;
  width: 100%;
}

.section-deco {
  grid-column: 1 / -1;
  margin-bottom: 24px;
}

.deco-line {
  display: block;
  height: 3px;
  width: 60px;
  background: var(--c-dark);
  border-radius: 2px;
}

.prose-wrap {
  grid-column: 1;
  min-width: 0;
}

/* ===== 正文排版 ===== */
.prose-wrap h2,
.prose-wrap h3,
.prose-wrap h4 {
  font-family: var(--font-head);
  font-weight: 700;
  margin: 1.6em 0 0.6em;
  line-height: 1.25;
  color: var(--c-dark);
}

.prose-wrap h2 { font-size: 22px; }
.prose-wrap h3 { font-size: 18px; }
.prose-wrap h4 { font-size: 16px; }

.prose-wrap p {
  font-size: 16px;
  line-height: 1.75;
  margin-bottom: 1.2em;
  color: var(--c-mid);
}

.prose-wrap ul, .prose-wrap ol {
  padding-left: 1.4em;
  margin-bottom: 1.2em;
}

.prose-wrap li {
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 0.4em;
  color: var(--c-mid);
}

.prose-wrap a {
  color: var(--c-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose-wrap blockquote {
  border-left: 3px solid var(--c-dark);
  margin: 1.5em 0;
  padding: 12px 20px;
  background: var(--c-white);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--c-muted);
}

/* ===== 侧边栏 ===== */
.sidebar {
  grid-column: 2;
  grid-row: 2;
  position: sticky;
  top: calc(var(--header-h) + 16px);
  align-self: start;
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-md);
  z-index: 4;
}

.sidebar-title {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 16px;
}

.sidebar-sub {
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--c-muted);
  margin-top: 20px;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-list dt {
  font-size: 14px;
  font-weight: 600;
}

.sidebar-list dt a {
  color: var(--c-dark);
  display: block;
  padding: 6px 0;
  border-bottom: 1px solid var(--c-border);
  transition: color 0.15s;
  text-decoration: none;
}

.sidebar-list dt a:hover {
  color: var(--c-muted);
}

.sidebar-list dd {
  font-size: 12px;
  color: var(--c-muted);
  padding: 2px 0 8px;
  line-height: 1.4;
}

.sidebar-nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-nav-list dt {
  font-size: 14px;
  font-weight: 600;
}

.sidebar-nav-list dt a {
  color: var(--c-dark);
  display: block;
  padding: 6px 0;
  border-bottom: 1px solid var(--c-border);
  text-decoration: none;
  transition: color 0.15s;
}

.sidebar-nav-list dt a:hover { color: var(--c-muted); }

.sidebar-nav-list dd {
  font-size: 12px;
  color: var(--c-muted);
  padding: 2px 0 8px;
}

/* ===== 卡片网格 ===== */
.cards-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 60px;
  width: 100%;
}

.section-heading {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  color: var(--c-dark);
  margin-bottom: 28px;
  letter-spacing: 0.02em;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  background: var(--c-white);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: staggerIn 0.4s ease both;
  animation-delay: calc(var(--stagger, 0) * 0.06s);
}

.card.layer-1 { box-shadow: var(--shadow-sm); }
.card.layer-2 { box-shadow: var(--shadow-md); }
.card.layer-3 { box-shadow: var(--shadow-lg); }
.card.layer-4 { box-shadow: var(--shadow-xl); }

.card:hover {
  transform: translateY(-4px) translateZ(0);
  box-shadow: var(--shadow-xl);
}

.card-fig {
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--c-light);
}

.card-fig .card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card:hover .card-thumb {
  transform: scale(1.04);
}

.card-body {
  padding: 20px;
}

.card-title {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  color: var(--c-dark);
  margin-bottom: 8px;
  line-height: 1.3;
}

.card-desc {
  font-size: 14px;
  color: var(--c-muted);
  line-height: 1.6;
  margin-bottom: 12px;
}

.card-date {
  font-size: 12px;
  color: var(--c-muted);
  display: block;
  margin-bottom: 12px;
}

.card-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--c-dark);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.15s;
}

.card-link:hover {
  gap: 8px;
  text-decoration: none;
}

/* ===== 条目列表（category 页）===== */
.entries-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 60px;
  width: 100%;
}

.entries-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.entry-dt {
  animation: staggerIn 0.35s ease both;
  animation-delay: calc(var(--stagger, 0) * 0.07s);
}

.entry-link {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  background: var(--c-white);
  border-radius: var(--radius);
  margin-bottom: 4px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
}

.entry-link:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.entry-fig {
  width: 80px;
  height: 54px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  background: var(--c-light);
}

.entry-fig .entry-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.entry-title {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  color: var(--c-dark);
}

.entry-dd {
  padding: 0 24px 16px;
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}

.entry-desc {
  font-size: 14px;
  color: var(--c-muted);
  flex: 1;
  min-width: 0;
}

.entry-date {
  font-size: 12px;
  color: var(--c-muted);
  white-space: nowrap;
}

/* ===== entry 英雄区 ===== */
.entry-hero-section {
  position: relative;
  background: var(--c-dark);
  color: var(--c-white);
  padding: 48px;
  overflow: hidden;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  z-index: 2;
}

.entry-hero-section::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 40px;
  background: var(--c-light);
  clip-path: polygon(0 50%, 100% 0, 100% 100%, 0 100%);
}

.entry-hero-fig {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.entry-hero-fig .entry-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
}

.entry-meta-aside {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.breadcrumb-link {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: color 0.15s;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 4px;
}

.breadcrumb-link:hover { color: var(--c-white); }

.entry-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 3px 10px;
  border-radius: 4px;
}

.entry-meta-aside time {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}

.entry-h1 {
  position: relative;
  z-index: 1;
  font-family: var(--font-head);
  font-size: clamp(22px, 4vw, 36px);
  font-weight: 700;
  color: var(--c-white);
  line-height: 1.2;
}

/* ===== tag 卡片 ===== */
.tag-banner {
  min-height: 200px;
}

.tag-card {
  background: var(--c-white);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  transition: transform 0.25s, box-shadow 0.25s;
  animation: staggerIn 0.4s ease both;
  animation-delay: calc(var(--stagger, 0) * 0.06s);
}

.tag-card.layer-1 { box-shadow: var(--shadow-sm); }
.tag-card.layer-2 { box-shadow: var(--shadow-md); }
.tag-card.layer-3 { box-shadow: var(--shadow-lg); }
.tag-card.layer-4 { box-shadow: var(--shadow-xl); }

.tag-card:hover {
  transform: translateY(-4px) translateZ(0);
  box-shadow: var(--shadow-xl);
}

.tag-card-fig {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--c-light);
}

.tag-card-fig .tag-card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.tag-card:hover .tag-card-thumb { transform: scale(1.04); }

.tag-card-body {
  padding: 18px;
}

.tag-card-title {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  color: var(--c-dark);
  margin-bottom: 8px;
}

.tag-card-desc {
  font-size: 13px;
  color: var(--c-muted);
  line-height: 1.6;
  margin-bottom: 12px;
}

.tag-card-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--c-dark);
  text-decoration: none;
  transition: letter-spacing 0.15s;
}

.tag-card-link:hover { letter-spacing: 0.04em; text-decoration: none; }

/* ===== About 额外区块 ===== */
.about-extra-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 60px;
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 32px;
}

.about-aside {
  grid-column: 1 / -1;
  background: var(--c-white);
  border-left: 4px solid var(--c-dark);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 28px 32px;
  box-shadow: var(--shadow-md);
  position: relative;
  z-index: 3;
}

.about-aside-title {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}

.about-aside p {
  font-size: 15px;
  color: var(--c-mid);
  line-height: 1.7;
  margin-bottom: 8px;
}

.about-aside p a {
  color: var(--c-dark);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ===== meta section ===== */
.meta-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 48px;
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
}

.meta-aside {
  grid-column: 1 / -1;
  font-size: 13px;
  color: var(--c-muted);
}

.meta-aside time {
  font-weight: 600;
  color: var(--c-mid);
}

/* ===== 页脚 ===== */
.site-footer {
  background: var(--c-dark);
  color: var(--c-white);
  padding: 60px 48px 40px;
  position: relative;
  z-index: 5;
  margin-top: auto;
}

.footer-brand {
  font-family: var(--font-head);
  font-size: clamp(32px, 7vw, 72px);
  font-weight: 700;
  color: var(--c-white);
  line-height: 1;
  margin-bottom: 24px;
  opacity: 0.15;
  letter-spacing: -0.02em;
  pointer-events: none;
  user-select: none;
}

.footer-copy {
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  line-height: 1.6;
  margin-bottom: 8px;
}

.footer-links {
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  display: block;
}

.footer-links a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: color 0.15s;
  padding: 4px 0;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

.footer-links a:hover { color: var(--c-white); }

/* ===== 动画 ===== */
@keyframes staggerIn {
  from {
    opacity: 0;
    transform: translateY(16px) translateZ(0);
  }
  to {
    opacity: 1;
    transform: translateY(0) translateZ(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== 层叠深度辅助 ===== */
.layer-1 { z-index: 1; }
.layer-2 { z-index: 2; }
.layer-3 { z-index: 3; }
.layer-4 { z-index: 4; }

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .prose-section {
    grid-template-columns: 1fr;
  }
  .sidebar {
    grid-column: 1;
    grid-row: auto;
    position: static;
    margin-top: 32px;
  }
  .section-deco {
    grid-column: 1;
  }
}

@media (max-width: 768px) {
  :root { --header-h: 56px; }

  .header-inner {
    padding: 0 16px;
    gap: 8px;
  }

  .nav-link {
    font-size: 11px;
    padding: 8px 6px;
  }

  .brand-name {
    font-size: 12px;
  }

  .hero-content {
    padding: 60px 24px 100px;
  }

  .hero-fig {
    width: 100%;
    opacity: 0.15;
  }

  .page-banner {
    padding: 48px 24px 64px;
  }

  .prose-section {
    padding: 32px 16px 28px;
  }

  .cards-section,
  .entries-section {
    padding: 28px 16px 40px;
  }

  .cards-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .entry-hero-section {
    padding: 32px 24px 56px;
    min-height: 220px;
  }

  .about-extra-section {
    padding: 0 16px 40px;
  }

  .site-footer {
    padding: 40px 24px 32px;
  }
}

@media (max-width: 480px) {
  .header-nav {
    gap: 0;
  }

  .nav-link {
    font-size: 10px;
    padding: 8px 4px;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .entry-link {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
  }

  .entry-fig {
    width: 100%;
    height: 120px;
  }

  .hero-h1 {
    font-size: 26px;
  }
}
