/* =============================================
   ExCAE Design System — Modern Minimal
   基于 Oklch 色彩空间 + SF Pro / PingFang SC
   ============================================= */

/* --- CSS Variables --- */
:root {
  --bg:      oklch(99% 0.002 240);
  --surface: oklch(100% 0 0);
  --fg:      oklch(18% 0.012 250);
  --muted:   oklch(54% 0.012 250);
  --border:  oklch(92% 0.005 250);
  --accent:  oklch(58% 0.18 255);
  --accent-hover: oklch(50% 0.20 255);
  --accent-subtle: oklch(96% 0.01 255);
  --accent-glow: oklch(58% 0.18 255 / 0.15);
  --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Cascadia Code', ui-monospace, monospace;
  --letter-spacing-display: -0.02em;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-card: 0 1px 3px oklch(0% 0 0 / 0.04), 0 1px 2px oklch(0% 0 0 / 0.06);
  --shadow-elevated: 0 4px 16px oklch(0% 0 0 / 0.06), 0 1px 4px oklch(0% 0 0 / 0.04);
}

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

body {
  font-family: var(--font-body);
  background: oklch(97% 0.005 250);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* =============================================
   NAVIGATION
   ============================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: oklch(100% 0 0 / 0.82);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(90deg, transparent, var(--accent-subtle), var(--accent), var(--accent-subtle), transparent) 1;
}

.site-header .container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: var(--fg);
  letter-spacing: var(--letter-spacing-display);
}

.site-logo:hover { text-decoration: none; }

.logo-mark {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 0 12px var(--accent-glow), 0 2px 8px oklch(58% 0.18 255 / 0.2);
}

.site-nav {
  display: flex;
  align-items: center;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  background: var(--fg);
  border-radius: 999px;
}

.site-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s, box-shadow 0.2s;
  position: relative;
}

.site-nav a:hover { color: var(--fg); background: var(--accent-subtle); text-decoration: none; box-shadow: 0 2px 8px -2px var(--accent-glow); }

.nav-cta {
  background: var(--accent) !important;
  color: white !important;
  font-weight: 600 !important;
  padding: 8px 20px !important;
  border-radius: var(--radius-sm) !important;
}

.nav-cta:hover { background: var(--accent-hover) !important; color: white !important; }

/* --- Language Switcher --- */
.lang-switch-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 12px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted) !important;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}

.lang-switch.current {
  color: white !important;
  background: var(--accent) !important;
  border-color: var(--accent);
  cursor: default;
  font-size: 14px;
  font-weight: 500;
  padding: 7px 14px;
}

.lang-switch:not(.current):hover {
  color: var(--accent) !important;
  border-color: var(--accent);
  background: var(--accent-subtle);
  text-decoration: none;
}

/* --- 子菜单 (Dropdown) --- */
.site-nav .has-submenu { position: relative; }

.nav-link-row {
  display: flex;
  align-items: center;
}

.submenu-toggle {
  display: none;
  width: 34px;
  height: 34px;
  margin-left: 2px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.submenu-toggle:hover {
  background: var(--accent-subtle);
  color: var(--fg);
}

.submenu-arrow {
  font-size: 10px;
  margin-left: 4px;
  opacity: 0.6;
}

.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 160px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-elevated);
  padding: 6px 0;
  flex-direction: column;
  gap: 0;
  z-index: 200;
}

.has-submenu:hover .submenu {
  display: flex;
}

.submenu li {
  width: 100%;
}

.submenu a {
  display: block;
  padding: 8px 16px !important;
  font-size: 13px !important;
  white-space: nowrap;
  border-radius: 0 !important;
}

.submenu a:hover {
  background: var(--accent-subtle) !important;
  color: var(--fg) !important;
}

/* =============================================
   SITE MAIN
   ============================================= */
.site-main {
  min-height: 60vh;
}

/* =============================================
   HERO
   ============================================= */
.hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 100px 40px 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.hero-content { max-width: 560px; }

.hero-kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 20px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: var(--letter-spacing-display);
  color: var(--fg);
  margin-bottom: 24px;
}

.hero-title span { color: var(--accent); }

.hero-desc {
  font-size: 17px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 480px;
}

.seo-topics-section {
  padding-top: 0;
}

.seo-topic-groups {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 28px;
}

.seo-topic-group {
  background: linear-gradient(180deg, oklch(100% 0 0), oklch(98% 0.006 250));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.seo-topic-group h3 {
  font-family: var(--font-display);
  font-size: 18px;
  margin-bottom: 16px;
}

.seo-topic-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-visual-inner {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-visual-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 2px;
  padding: 20px;
  width: 100%;
  height: 100%;
}

.hero-visual-cell {
  background: var(--accent-subtle);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
}

.hero-visual-cell.accent { background: var(--accent); color: white; }
.hero-visual-cell.muted { background: var(--border); color: var(--muted); }

/* =============================================
   BUTTONS
   ============================================= */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  background: var(--accent);
  color: white;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
}

.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); color: white; text-decoration: none; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  background: transparent;
  color: var(--fg);
  font-size: 15px;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}

.btn-secondary:hover { border-color: var(--fg); background: var(--surface); text-decoration: none; color: var(--fg); }

/* =============================================
   SECTIONS (通用)
   ============================================= */
.section { padding: 100px 40px; }

.section-inner { max-width: 1280px; margin: 0 auto; }

.section-label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 700;
  letter-spacing: var(--letter-spacing-display);
  color: var(--fg);
  margin-bottom: 16px;
}

.section-desc {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 640px;
  margin-bottom: 56px;
}

/* =============================================
   FEATURED RESEARCH TOPICS
   ============================================= */
.featured-topics-section {
  padding-top: 24px;
}

.featured-topics-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
}

.featured-topics-header .section-desc {
  margin-bottom: 0;
  max-width: 520px;
}

.featured-topics-grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.featured-topic-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 240px;
  padding: 28px;
  background:
    linear-gradient(180deg, oklch(100% 0 0) 0%, oklch(98% 0.01 250) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}

.featured-topic-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-elevated);
  border-color: oklch(86% 0.03 250);
  text-decoration: none;
}

.featured-topic-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.featured-topic-label {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--accent-subtle);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.featured-topic-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.featured-topic-card h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 650;
  line-height: 1.3;
  color: var(--fg);
}

.featured-topic-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  flex: 1;
}

.featured-topic-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

/* =============================================
   SOFTWARE CARDS (3-col)
   ============================================= */
.software-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.software-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  transition: box-shadow 0.2s, border-color 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.software-card:hover {
  box-shadow: var(--shadow-elevated);
  border-color: transparent;
  text-decoration: none;
}

.software-card-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-subtle);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 18px;
}

.software-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
  color: var(--fg);
}

.software-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

/* =============================================
   SERVICES GRID (4-col, bordered cells)
   ============================================= */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.service-item {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 28px 24px;
  transition: background 0.15s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.service-item:hover { background: var(--accent-subtle); }

.service-item h4 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--fg);
}

.service-item p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.service-item .tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-subtle);
  padding: 3px 8px;
  border-radius: 4px;
  margin-top: 12px;
}

/* =============================================
   CASE STUDIES (4-col cards)
   ============================================= */
.case-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.case-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.case-card:hover { box-shadow: var(--shadow-elevated); text-decoration: none; }

.case-card-img {
  aspect-ratio: 16 / 10;
  background: var(--accent-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.case-card-body { padding: 20px; }

.case-card-body h4 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--fg);
}

.case-card-body p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

/* =============================================
   STATS BAR
   ============================================= */
.stats-bar {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 48px 0;
}

.stats-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}

.stat-item { text-align: center; }

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: var(--letter-spacing-display);
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 14px;
  color: var(--muted);
  margin-top: 6px;
}

/* =============================================
   CTA SECTION
   ============================================= */
.cta-section {
  text-align: center;
  padding: 100px 40px;
}

.cta-section .section-title { margin-bottom: 12px; }
.cta-section .section-desc { margin: 0 auto 36px; }

/* =============================================
   PAGE / POST CONTENT (内页通用)
   ============================================= */
.page-header,
.post-header {
  padding: 0 0 28px;
  margin-bottom: 36px;
  border-bottom: 1px solid var(--border);
}

.page-header h1,
.post-header h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  letter-spacing: var(--letter-spacing-display);
  line-height: 1.2;
  text-shadow: 0 0 40px var(--accent-glow);
}

.post-meta {
  display: flex;
  gap: 16px;
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 12px;
}

.post-meta time {
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.post-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.post-tags .tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: var(--accent-subtle);
  padding: 4px 10px;
  border-radius: 4px;
}

.page-content,
.post-content {
  max-width: 800px;
  font-size: 16px;
  line-height: 1.85;
}

.page-content h1,
.post-content h1 { font-size: 2rem; margin: 40px 0 20px; }
.page-content h2,
.post-content h2 {
  font-size: 1.4rem;
  margin: 32px 0 16px;
  padding-left: 14px;
  border-left: 3px solid var(--accent);
}
.page-content h3,
.post-content h3 { font-size: 1.15rem; margin: 28px 0 12px; }

.page-content p,
.post-content p { margin-bottom: 20px; }

.page-content ul,
.post-content ul,
.page-content ol,
.post-content ol { margin: 0 0 20px 24px; }

.page-content li,
.post-content li { margin-bottom: 8px; }

.page-content blockquote,
.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 14px 24px;
  margin: 28px 0;
  background: var(--accent-subtle);
  color: var(--muted);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.page-content code,
.post-content code {
  font-family: var(--font-mono);
  background: var(--accent-subtle);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

.page-content pre,
.post-content pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 20px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 24px 0;
  line-height: 1.5;
}

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

.page-content table,
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
}

.page-content th,
.page-content td,
.post-content th,
.post-content td {
  border: 1px solid var(--border);
  padding: 10px 14px;
  text-align: left;
}

.page-content th,
.post-content th {
  background: var(--accent-subtle);
  font-weight: 600;
}

.page-content img,
.post-content img {
  max-width: 100%;
  border-radius: var(--radius-md);
}

.page-content hr,
.post-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

/* =============================================
   POST LAYOUT + RELATED SIDEBAR
   ============================================= */
.post-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
  align-items: start;
  max-width: 1280px;
  margin: 0 auto;
}

.post-main {
  min-width: 0;
  background: var(--surface);
  padding: 32px 36px 36px;
  border-radius: 0  var(--radius-md) var(--radius-md)0;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
  position: relative;
}

.post-main::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-subtle), transparent);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.related-sidebar {
  position: sticky;
  top: 100px;
}

.sidebar-section {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  border-top-left-radius: 0;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.sidebar-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-subtle));
}

.sidebar-section:last-child {
  margin-bottom: 0;
}

.sidebar-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: var(--letter-spacing-display);
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(90deg, var(--accent) 0%, var(--border) 100%) 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-title::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-glow);
}

/* Category navigation */
.category-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.category-nav-item {
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}

.category-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  font-size: 0.85rem;
  color: var(--fg);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background 0.15s, color 0.15s;
}

.category-nav-link:hover {
  background: var(--accent-subtle);
  color: var(--accent);
}

.category-nav-item.is-active .category-nav-link {
  background: var(--accent-subtle);
  color: var(--accent);
  font-weight: 600;
  border-left: 2px solid var(--accent);
  padding-left: 8px;
}

.category-nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-right: 8px;
  flex-shrink: 0;
  color: var(--muted);
  transition: color 0.15s;
}

.category-nav-icon svg {
  width: 16px;
  height: 16px;
}

.category-nav-item:hover .category-nav-icon,
.category-nav-item.is-active .category-nav-icon {
  color: var(--accent);
}

.category-nav-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-nav-count {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  margin-left: 8px;
  flex-shrink: 0;
}

/* Related posts list */
.related-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.related-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.related-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.related-item:first-child {
  padding-top: 0;
}

.related-link {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--fg);
  text-decoration: none;
  line-height: 1.4;
  transition: color 0.15s;
}

.related-link:hover {
  color: var(--accent);
}

.related-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--muted);
}

.related-tags {
  display: flex;
  gap: 4px;
}

.tag--small {
  font-size: 9px;
  padding: 2px 5px;
}

@media (max-width: 1024px) {
  .post-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .related-sidebar {
    position: static;
  }
}

/* =============================================
   POST LIST (博客列表)
   ============================================= */
.post-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.post-card:hover {
  box-shadow: var(--shadow-elevated);
  border-color: transparent;
}

.post-card h2,
.post-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
}

.post-card h2 a,
.post-card h3 a {
  color: var(--fg);
  text-decoration: none;
}

.post-card h2 a:hover,
.post-card h3 a:hover { color: var(--accent); }

.post-date {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 4px;
  display: block;
}

.post-excerpt {
  color: var(--muted);
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.6;
}

/* --- 文章列表页容器 --- */
.posts-page { padding: 0; }

/* 文章详情页容器 — 对齐顶部导航 */
.posts-detail {
  padding: 40px 40px 100px;
}

.posts-page .page-header {
  padding: 32px 28px 28px;
  background: var(--accent-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 36px;
  background-image: radial-gradient(circle, oklch(80% 0.06 255 / 0.08) 1px, transparent 1px);
  background-size: 20px 20px;
}

.posts-page .page-header h1 {
  text-shadow: 0 0 40px var(--accent-glow);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.section-label-icon {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

.topics-intro {
  max-width: 760px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
  margin-top: 14px;
}

.topic-category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
}

.topic-category-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--fg);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-card);
  transition: all 0.2s;
}

.topic-category-nav a:hover {
  background: var(--accent-subtle);
  border-color: oklch(88% 0.02 255);
  text-decoration: none;
  box-shadow: 0 0 0 1px var(--accent), 0 0 12px -2px var(--accent-glow);
}

.topic-category-nav a .category-nav-icon {
  display: flex;
  align-items: center;
  color: var(--muted);
  transition: color 0.15s;
}

.topic-category-nav a .category-nav-icon svg {
  width: 14px;
  height: 14px;
}

.topic-category-nav a:hover .category-nav-icon {
  color: var(--accent);
}

.topic-category-nav span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.topic-category-list {
  display: grid;
  gap: 44px;
}

.topic-category-section {
  scroll-margin-top: 84px;
}

.topic-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(90deg, var(--accent), var(--border)) 1;
}

.topic-category-header h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: var(--letter-spacing-display);
  color: var(--fg);
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 14px;
  border-left: 3px solid var(--accent);
}

.topic-category-header h2 .category-nav-icon {
  display: flex;
  align-items: center;
  color: var(--accent);
}

.topic-category-header h2 .category-nav-icon svg {
  width: 20px;
  height: 20px;
}

.topic-category-header span {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

/* Post cards hover effect */
.post-card {
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.post-card h3 a {
  transition: color 0.15s, text-shadow 0.2s;
}

.post-card h3 a:hover {
  text-shadow: 0 0 20px var(--accent-glow);
}

/* --- 首页最新文章区域 --- */
.recent-posts {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.recent-posts h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 700;
  letter-spacing: var(--letter-spacing-display);
  margin-bottom: 24px;
}

.recent-posts .post-card .post-date {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 4px;
  display: block;
}

.recent-posts .post-card .post-tags {
  margin-top: 10px;
}

/* --- 文章页脚 --- */
.post-footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.92rem;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.back-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-subtle);
  text-decoration: none;
}

/* --- 空状态 --- */
.empty-state {
  text-align: center;
  padding: 60px 0;
  color: var(--muted);
}

.empty-state code {
  font-family: var(--font-mono);
  background: var(--accent-subtle);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--accent);
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: var(--fg);
  color: oklch(70% 0.01 250);
  padding: 64px 40px 32px;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}

.footer-brand .site-logo { color: white; margin-bottom: 16px; }

.footer-brand p {
  font-size: 14px;
  line-height: 1.7;
  color: oklch(60% 0.01 250);
  max-width: 320px;
}

.footer-col h5 {
  font-size: 13px;
  font-weight: 600;
  color: white;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.footer-col a {
  display: block;
  font-size: 14px;
  color: oklch(60% 0.01 250);
  text-decoration: none;
  margin-bottom: 10px;
  transition: color 0.15s;
}

.footer-col a:hover { color: white; text-decoration: none; }

.footer-bottom {
  max-width: 1280px;
  margin: 48px auto 0;
  padding-top: 24px;
  border-top: 1px solid oklch(100% 0 0 / 0.08);
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: oklch(50% 0.01 250);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; gap: 48px; padding: 64px 32px 48px; }
  .hero-content { max-width: 100%; }
  .seo-topic-groups { grid-template-columns: 1fr; }
  .featured-topics-grid { grid-template-columns: repeat(2, 1fr); }
  .software-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .case-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-inner { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .post-list { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .site-header .container { padding: 0 20px; }
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    display: none;
    padding: 0 20px 20px;
    background: oklch(100% 0 0 / 0.96);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
  }
  .site-nav.is-open { display: block; }
  .site-nav ul {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding-top: 12px;
  }
  .site-nav li {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
  }
  .site-nav a {
    display: block;
    width: 100%;
    padding: 12px 14px;
  }
  .site-nav .nav-cta {
    width: auto;
    margin: 8px 12px 12px;
    text-align: center;
    display: block;
  }
  .nav-link-row {
    justify-content: space-between;
    gap: 8px;
  }
  .nav-link-row > a {
    flex: 1;
  }
  .submenu-toggle {
    display: inline-flex;
    margin-right: 10px;
  }
  .submenu {
    position: static;
    min-width: 0;
    display: none;
    border: 0;
    box-shadow: none;
    border-top: 1px solid var(--border);
    border-radius: 0;
    padding: 8px 0 10px;
    background: transparent;
  }
  .has-submenu:hover .submenu {
    display: none;
  }
  .has-submenu.is-open .submenu {
    display: flex;
  }
  .submenu li {
    border: 0;
    background: transparent;
    border-radius: 0;
  }
  .submenu a {
    font-size: 13px !important;
    padding: 10px 18px 10px 22px !important;
  }
  .submenu-arrow {
    margin-left: 0;
    font-size: 12px;
  }
  .has-submenu.is-open .submenu-toggle .submenu-arrow {
    transform: rotate(180deg);
    display: inline-block;
  }
  .hero { padding: 48px 20px 40px; }
  .section { padding: 64px 20px; }
  .featured-topics-header { flex-direction: column; align-items: flex-start; }
  .seo-topic-group { padding: 20px; }
  .featured-topics-grid { grid-template-columns: 1fr; }
  .featured-topic-card { min-height: 0; padding: 24px 20px; }
  .featured-topic-meta { align-items: flex-start; flex-direction: column; gap: 10px; }
  .software-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .case-grid { grid-template-columns: 1fr; }
  .stats-inner { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; }
  .post-list { grid-template-columns: 1fr; }
  .topic-category-header { flex-direction: column; align-items: flex-start; }
}

/* =============================================
   TECH DESIGN ELEMENTS
   ============================================= */

/* Post header — subtle dot grid pattern */
.post-header {
  background-image:
    radial-gradient(circle, oklch(80% 0.06 255 / 0.08) 1px, transparent 1px);
  background-size: 20px 20px;
}

/* Sidebar accent — gradient top border */
.sidebar-section {
  border-top: 2px solid transparent;
  border-image: linear-gradient(90deg, var(--accent), var(--accent-subtle)) 1;
}

/* H2 — subtle glow on accent border */
.post-content h2,
.page-content h2 {
  box-shadow: -4px 0 12px -4px var(--accent-glow);
}

/* Tags — tech-style inset shadow */
.post-tags .tag {
  box-shadow: inset 0 1px 0 oklch(100% 0 0 / 0.5);
}

/* Related link hover — subtle glow */
.related-link:hover {
  text-shadow: 0 0 20px var(--accent-glow);
}

/* Category nav active — left accent glow */
.category-nav-item.is-active .category-nav-link {
  box-shadow: inset 3px 0 8px -4px var(--accent-glow);
}

/* Sidebar title — accent underline gradient */
.sidebar-title {
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(90deg, var(--accent) 0%, var(--border) 100%) 1;
}

/* Back link — tech-style hover */
.back-link:hover {
  box-shadow: 0 0 0 1px var(--accent), 0 0 12px -2px var(--accent-glow);
}

/* Map container */
.map-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-card);
  margin-top: 20px;
  border-top: 2px solid var(--accent);
}

.map-info {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.map-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-subtle);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.map-icon svg {
  width: 22px;
  height: 22px;
}

.map-detail {
  flex: 1;
}

.map-address {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--fg);
  margin: 0 0 4px;
}

.map-coord {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
}

.map-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.map-link:hover {
  background: var(--accent-subtle);
  border-color: var(--accent);
  box-shadow: 0 0 12px -2px var(--accent-glow);
}

/* =============================================
   UTILITY
   ============================================= */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
}
