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

/* ===== 基础变量 ===== */
:root {
  --ice: #c8e0f4;
  --blush: #f5e0e8;
  --ink: #171f26;
  --ink-80: rgba(23,31,38,0.8);
  --ink-40: rgba(23,31,38,0.4);
  --ink-10: rgba(23,31,38,0.1);
  --ice-dark: #a8c4e0;
  --blush-dark: #e0c0cc;
  --surface: #1e2832;
  --surface-2: #232e3a;
  --surface-3: #2a3644;
  --text-primary: #e8f0f8;
  --text-secondary: #a8bccf;
  --text-muted: #6a7f93;
  --radius-card: 18px;
  --radius-btn: 12px;
  --radius-sm: 8px;
  --shadow-raise:
    -5px -5px 15px rgba(255,255,255,0.05),
    5px 5px 15px rgba(0,0,0,0.4),
    -2px -2px 6px rgba(200,224,244,0.06);
  --shadow-raise-hover:
    -7px -7px 20px rgba(255,255,255,0.07),
    7px 7px 20px rgba(0,0,0,0.5),
    -3px -3px 8px rgba(200,224,244,0.08);
  --shadow-inset:
    inset 3px 3px 8px rgba(0,0,0,0.4),
    inset -3px -3px 8px rgba(255,255,255,0.04);
  --shadow-btn:
    -3px -3px 8px rgba(255,255,255,0.06),
    3px 3px 10px rgba(0,0,0,0.45);
  --nav-width: 220px;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition: 0.15s ease;
}

/* ===== 重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--ice); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--blush); }
ul { list-style: none; }

/* ===== 布局骨架：左侧固定导航 + 内容区 ===== */
.sidebar-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--nav-width);
  height: 100vh;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  box-shadow: 4px 0 24px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  z-index: 100;
  overflow-y: auto;
  padding-bottom: 24px;
}

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 72px;
  border-bottom: 1px solid rgba(200,224,244,0.08);
  flex-shrink: 0;
}

.brand-icon {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--ice);
  background: linear-gradient(135deg, var(--ice), var(--blush));
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-raise);
  text-shadow: none;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-mark { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; }

.sidebar-nav nav {
  flex: 1;
  padding: 16px 0;
}

.sidebar-nav nav ul {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 12px;
}

.sidebar-nav nav ul li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
  min-height: 44px;
  line-height: 1.3;
}

.sidebar-nav nav ul li a:hover,
.sidebar-nav nav ul li a[aria-current="page"] {
  background: linear-gradient(135deg, rgba(200,224,244,0.12), rgba(245,224,232,0.08));
  color: var(--text-primary);
  box-shadow: var(--shadow-inset);
}

.nav-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ice), var(--blush));
  flex-shrink: 0;
  opacity: 0.6;
  transition: opacity var(--transition);
}

.sidebar-nav nav ul li a:hover .nav-dot,
.sidebar-nav nav ul li a[aria-current="page"] .nav-dot {
  opacity: 1;
}

.nav-label {
  flex: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ===== 主内容区包裹 ===== */
body {
  padding-left: var(--nav-width);
}

.page-wrap {
  display: flex;
  align-items: flex-start;
  min-height: 100vh;
  padding: 0;
}

main {
  flex: 1;
  min-width: 0;
  padding: 40px 32px 60px;
}

.right-aside {
  width: 280px;
  flex-shrink: 0;
  padding: 40px 24px 60px 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

footer {
  background: var(--surface-2);
  border-top: 1px solid rgba(200,224,244,0.08);
  padding: 24px 32px;
  text-align: center;
  margin-left: 0;
}

footer p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

footer small {
  font-size: 12px;
  color: var(--text-muted);
}

footer small a {
  color: var(--text-muted);
}
footer small a:hover { color: var(--ice); }

/* ===== Neumorphism 组件 ===== */
.neu-card {
  background: linear-gradient(145deg, var(--surface-2), var(--surface-3));
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-raise);
  padding: 24px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.neu-card:hover {
  box-shadow: var(--shadow-raise-hover);
  transform: translateY(-2px);
}

.neu-inset {
  background: linear-gradient(145deg, var(--surface-3), var(--surface-2));
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-inset);
  padding: 20px 24px;
}

.neu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius-btn);
  background: linear-gradient(135deg, var(--ice-dark), var(--ice));
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-btn);
  border: none;
  cursor: pointer;
  transition: box-shadow var(--transition), transform var(--transition);
  min-height: 44px;
  text-decoration: none;
}

.neu-btn:hover {
  box-shadow:
    -4px -4px 12px rgba(255,255,255,0.08),
    4px 4px 14px rgba(0,0,0,0.5);
  color: var(--ink);
  transform: translateY(-1px);
}

.neu-btn:active {
  box-shadow: var(--shadow-inset);
  transform: scale(0.98);
}

.neu-btn-ghost {
  background: transparent;
  color: var(--ice);
  border: 1px solid rgba(200,224,244,0.3);
  box-shadow: var(--shadow-btn);
}

.neu-btn-ghost:hover { color: var(--blush); border-color: rgba(245,224,232,0.4); }

.neu-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(200,224,244,0.15), rgba(245,224,232,0.1));
  color: var(--ice);
  font-size: 12px;
  font-weight: 500;
  box-shadow:
    -2px -2px 6px rgba(255,255,255,0.04),
    2px 2px 6px rgba(0,0,0,0.35);
  border: 1px solid rgba(200,224,244,0.15);
  transition: all var(--transition);
  min-height: 32px;
}

.neu-tag:hover {
  background: linear-gradient(135deg, rgba(200,224,244,0.25), rgba(245,224,232,0.2));
  color: var(--blush);
}

/* ===== 文字排版 ===== */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.25;
  color: var(--text-primary);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; margin-bottom: 16px; }
h2 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); font-weight: 600; margin-bottom: 10px; }
h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: 8px; }

p { margin-bottom: 14px; color: var(--text-secondary); font-size: 16px; line-height: 1.75; }

.subtitle {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text-muted);
  font-weight: 400;
  margin-bottom: 20px;
  line-height: 1.6;
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--blush);
  margin-bottom: 12px;
}

.meta-date {
  display: inline-block;
  font-size: 12px;
  color: var(--text-muted);
  margin-right: 16px;
  margin-bottom: 12px;
}

.meta-modified { color: var(--blush-dark); }

.breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--ice); }
.breadcrumb span { margin: 0 6px; opacity: 0.5; }

.label-text {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ===== 内容正文 ===== */
.content-body {
  max-width: 720px;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-secondary);
}

.content-body h2 { margin-top: 32px; margin-bottom: 12px; }
.content-body h3 { margin-top: 24px; margin-bottom: 10px; }
.content-body p { margin-bottom: 16px; }
.content-body ul, .content-body ol { padding-left: 20px; margin-bottom: 16px; }
.content-body li { margin-bottom: 6px; line-height: 1.7; }
.content-body a { color: var(--ice); text-decoration: underline; text-underline-offset: 3px; }
.content-body a:hover { color: var(--blush); }
.content-body strong { color: var(--text-primary); font-weight: 600; }
.content-body blockquote {
  border-left: 3px solid var(--blush);
  padding: 12px 20px;
  margin: 20px 0;
  background: rgba(245,224,232,0.04);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-muted);
  font-style: italic;
}

/* ===== 首页 Hero ===== */
.hero-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  min-height: 100vh;
  padding: 60px 0 40px;
}

.hero-media {
  position: relative;
  height: 520px;
}

.hero-img {
  border-radius: var(--radius-card);
  object-fit: cover;
  position: absolute;
}

.hero-img-1 {
  width: 72%;
  height: 78%;
  top: 0;
  left: 0;
  box-shadow: var(--shadow-raise);
  z-index: 2;
}

.hero-img-2 {
  width: 60%;
  height: 65%;
  bottom: 0;
  right: 0;
  box-shadow: var(--shadow-raise-hover);
  z-index: 1;
  border: 3px solid var(--surface-2);
}

.hero-badge {
  position: absolute;
  bottom: 32px;
  left: 12px;
  z-index: 10;
  background: linear-gradient(135deg, var(--blush), var(--ice));
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 6px 14px;
  border-radius: 999px;
  box-shadow:
    -2px -2px 6px rgba(255,255,255,0.1),
    2px 2px 8px rgba(0,0,0,0.5);
}

.hero-badge-2 {
  bottom: auto;
  top: 12px;
  left: auto;
  right: 8px;
  background: linear-gradient(135deg, rgba(200,224,244,0.2), rgba(245,224,232,0.15));
  color: var(--text-secondary);
  border: 1px solid rgba(200,224,244,0.2);
  font-size: 10px;
}

.hero-copy { padding-left: 16px; }
.hero-copy h1 { margin-bottom: 20px; }
.hero-desc { font-size: 16px; color: var(--text-secondary); margin-bottom: 28px; line-height: 1.7; }
.hero-cta { margin-top: 8px; }

/* ===== 首页专栏格 ===== */
.sections-grid-section { margin-top: 60px; }

.sections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.section-card { position: relative; overflow: hidden; }
.section-card h2 { font-size: 1.1rem; margin-bottom: 8px; }
.section-card .subtitle { font-size: 13px; margin-bottom: 12px; }

.section-card-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: linear-gradient(135deg, rgba(200,224,244,0.15), rgba(245,224,232,0.1));
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(200,224,244,0.12);
}

.section-latest {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.section-latest a { color: var(--ice); font-size: 13px; }

.card-link {
  display: inline-flex;
  padding: 8px 18px;
  font-size: 13px;
  min-height: 40px;
}

/* ===== 首页近期文章 ===== */
.recent-stories-section { margin-top: 52px; }

.story-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.story-item { transition: all var(--transition); }

.story-item a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  color: var(--text-secondary);
  font-size: 14px;
}

.story-item a:hover { color: var(--text-primary); }

.story-title { flex: 1; font-weight: 500; }
.story-date { font-size: 12px; color: var(--text-muted); flex-shrink: 0; }

/* ===== 侧栏块 ===== */
.aside-block { padding: 20px; }
.aside-block h2 { font-size: 1rem; margin-bottom: 6px; }
.aside-block .subtitle { font-size: 12px; margin-bottom: 14px; }

.aside-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.aside-links li a {
  display: block;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-secondary);
  transition: all var(--transition);
  min-height: 40px;
  display: flex;
  align-items: center;
}

.aside-links li a:hover {
  background: rgba(200,224,244,0.08);
  color: var(--text-primary);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

/* ===== 栏目页 Hero ===== */
.section-hero {
  padding: 40px 0 32px;
  border-bottom: 1px solid rgba(200,224,244,0.08);
  margin-bottom: 36px;
  max-width: 680px;
}

.section-lead { font-size: 16px; color: var(--text-secondary); }

/* ===== 栏目页文章列表表格 ===== */
.section-index { margin-top: 40px; }

.table-wrap {
  overflow-x: auto;
  margin-top: 20px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

thead th {
  text-align: left;
  padding: 12px 16px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(200,224,244,0.1);
}

tbody tr {
  border-bottom: 1px solid rgba(200,224,244,0.05);
  transition: background var(--transition);
}

tbody tr:hover { background: rgba(200,224,244,0.04); }

tbody td {
  padding: 14px 16px;
  vertical-align: top;
  color: var(--text-secondary);
  line-height: 1.5;
}

.table-title-link {
  color: var(--ice);
  font-weight: 500;
  font-size: 14px;
}

.table-title-link:hover { color: var(--blush); }
.table-desc { color: var(--text-muted); font-size: 13px; max-width: 280px; }
.table-date { color: var(--text-muted); font-size: 12px; white-space: nowrap; }
.empty-tip { color: var(--text-muted); font-size: 14px; margin-top: 16px; }

/* ===== 文章页 ===== */
.story-header-section {
  padding: 32px 0 28px;
  max-width: 720px;
  border-bottom: 1px solid rgba(200,224,244,0.08);
  margin-bottom: 32px;
}

.story-lead { font-size: 16px; color: var(--text-secondary); margin-bottom: 16px; }

.story-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.story-hero-wrap {
  margin-top: 20px;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-raise);
  max-height: 420px;
}

.story-hero-img {
  width: 100%;
  height: 420px;
  object-fit: cover;
}

.story-content { max-width: 700px; }

.story-footer-section {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(200,224,244,0.08);
}

/* ===== 标签页 ===== */
.tag-header-section {
  padding: 40px 0 24px;
  max-width: 600px;
  border-bottom: 1px solid rgba(200,224,244,0.08);
  margin-bottom: 32px;
}

.tag-lead { font-size: 16px; }

.tag-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.tag-result-card h2 { font-size: 1rem; margin-bottom: 8px; }
.tag-result-card h2 a { color: var(--text-primary); }
.tag-result-card h2 a:hover { color: var(--ice); }
.tag-result-card .subtitle { font-size: 13px; margin-bottom: 10px; }
.card-date { font-size: 12px; color: var(--text-muted); }

/* ===== 关于页 ===== */
.about-header-section {
  padding: 40px 0 28px;
  max-width: 640px;
  border-bottom: 1px solid rgba(200,224,244,0.08);
  margin-bottom: 36px;
}

.about-lead { font-size: 16px; }

.about-nav-section { margin-top: 48px; }

.about-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.about-nav-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  border-radius: var(--radius-card);
  background: linear-gradient(145deg, var(--surface-2), var(--surface-3));
  box-shadow: var(--shadow-raise);
  transition: all 0.2s ease;
  color: var(--text-primary);
}

.about-nav-card:hover {
  box-shadow: var(--shadow-raise-hover);
  transform: translateY(-2px);
  color: var(--ice);
}

.about-nav-card strong { font-family: var(--font-heading); font-size: 1rem; }
.about-nav-card span { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

/* ===== 隐私页 ===== */
.privacy-header-section {
  padding: 40px 0 28px;
  max-width: 640px;
  border-bottom: 1px solid rgba(200,224,244,0.08);
  margin-bottom: 36px;
}

.privacy-lead { font-size: 16px; }

.privacy-body { max-width: 680px; }

.privacy-links-section { margin-top: 40px; padding-top: 24px; border-top: 1px solid rgba(200,224,244,0.08); }

.privacy-link-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* ===== 首页各内容区间距 ===== */
.home-content-section { margin-top: 24px; }

/* ===== Reveal 动效 ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ===== 大屏微调 ===== */
@media (min-width: 1400px) {
  main { padding: 48px 48px 80px; }
  .right-aside { width: 300px; padding: 48px 32px 80px 0; }
}

/* ===== 平板 ===== */
@media (max-width: 1100px) {
  :root { --nav-width: 64px; }

  .sidebar-nav { width: 64px; align-items: center; }
  .brand-mark { padding: 0; }
  .brand-icon { width: 40px; height: 40px; font-size: 1.4rem; }
  .nav-label { display: none; }
  .sidebar-nav nav ul { padding: 0 8px; }
  .sidebar-nav nav ul li a { justify-content: center; padding: 10px; min-height: 44px; }
  .nav-dot { width: 8px; height: 8px; }

  .right-aside { width: 220px; padding: 32px 16px 60px 0; }
  main { padding: 32px 24px 60px; }

  .hero-section { grid-template-columns: 1fr; min-height: auto; padding: 40px 0; }
  .hero-media { height: 320px; }
  .hero-copy { padding-left: 0; }
}

/* ===== 手机 ===== */
@media (max-width: 768px) {
  :root { --nav-width: 0px; }

  body { padding-left: 0; padding-top: 60px; }

  .sidebar-nav {
    width: 100%;
    height: 60px;
    flex-direction: row;
    align-items: center;
    top: 0;
    left: 0;
    padding: 0 16px;
    padding-bottom: 0;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .brand-mark {
    height: auto;
    border-bottom: none;
    border-right: 1px solid rgba(200,224,244,0.08);
    padding-right: 12px;
    margin-right: 8px;
    flex-shrink: 0;
  }

  .brand-icon { width: 36px; height: 36px; font-size: 1.2rem; }

  .sidebar-nav nav { flex: 1; overflow-x: auto; }
  .sidebar-nav nav ul {
    flex-direction: row;
    padding: 0;
    gap: 2px;
    flex-wrap: nowrap;
    white-space: nowrap;
    overflow-x: auto;
  }

  .sidebar-nav nav ul li a {
    padding: 8px 12px;
    min-height: 44px;
    border-radius: 8px;
  }

  .nav-label { display: inline; font-size: 12px; }
  .nav-dot { display: none; }

  .page-wrap { flex-direction: column; }
  main { padding: 24px 16px 40px; }
  .right-aside {
    width: 100%;
    padding: 0 16px 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .hero-section { grid-template-columns: 1fr; min-height: auto; padding: 24px 0; gap: 28px; }
  .hero-media { height: 260px; }
  .hero-img-1 { width: 75%; height: 80%; }
  .hero-img-2 { width: 55%; height: 60%; }

  .sections-grid { grid-template-columns: 1fr; }
  .tag-results-grid { grid-template-columns: 1fr; }
  .about-nav-grid { grid-template-columns: 1fr 1fr; }
  .privacy-link-row { flex-direction: column; }

  footer { padding: 20px 16px; }

  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.2rem; }

  .table-desc { display: none; }
}

@media (max-width: 480px) {
  .right-aside { grid-template-columns: 1fr; }
  .about-nav-grid { grid-template-columns: 1fr; }
}
