/* ============================================================
   Whaletech Research — shared styles
   Used by /research and every /research/<post>/ page.
   ============================================================ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Space Grotesk', 'Noto Sans SC', system-ui, sans-serif;
  color: #1d1d1f;
  background: #faf8f5;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 2rem; }

/* ===== Nav (mirrors landing page) ===== */
nav { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; padding: 1rem 0; transition: 0.3s; }
nav.scrolled { padding: 0.65rem 0; background: rgba(2, 6, 23, 0.95); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid rgba(255,255,255,0.05); }
nav.on-light { background: rgba(250, 248, 245, 0.9); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid rgba(15,23,42,0.05); }
nav.on-light.scrolled { background: rgba(250, 248, 245, 0.97); }
nav .container { display: flex; align-items: center; justify-content: space-between; }
.nav-logo img { height: 72px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 2.2rem; }
.nav-item { position: relative; }
.nav-link {
  position: relative;
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.4rem 0.15rem;
}
.nav-link-cn {
  font-size: 0.88rem; font-weight: 600; letter-spacing: 0.06em;
  color: rgba(226, 232, 240, 0.82);
  transition: color 0.28s ease, text-shadow 0.28s ease;
}
.nav-link-en {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.7);
  transition: color 0.28s ease, text-shadow 0.28s ease;
}
nav.on-light .nav-link-cn { color: rgba(15, 23, 42, 0.82); }
nav.on-light .nav-link-en { color: rgba(71, 85, 105, 0.7); }
.nav-caret {
  width: 10px; height: 10px; flex-shrink: 0;
  color: rgba(148, 163, 184, 0.55);
  transition: transform 0.35s cubic-bezier(0.16,1,0.3,1), color 0.28s, filter 0.28s;
}
nav.on-light .nav-caret { color: rgba(71, 85, 105, 0.55); }
.nav-link::after {
  content: ''; position: absolute;
  left: 50%; bottom: -2px;
  width: 0; height: 1px;
  background: linear-gradient(90deg, transparent, #38bdf8, #a855f7, transparent);
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.75));
  transform: translateX(-50%);
  transition: width 0.4s cubic-bezier(0.16,1,0.3,1);
}
.nav-link:hover::after,
.has-dropdown:hover .nav-link::after,
.has-dropdown:focus-within .nav-link::after { width: 100%; }
.nav-link:hover .nav-link-cn,
.has-dropdown:hover .nav-link-cn,
.has-dropdown:focus-within .nav-link-cn {
  color: #ffffff;
  text-shadow: 0 0 18px rgba(147, 197, 253, 0.55);
}
nav.on-light .nav-link:hover .nav-link-cn,
nav.on-light .has-dropdown:hover .nav-link-cn,
nav.on-light .has-dropdown:focus-within .nav-link-cn {
  color: #0f172a;
  text-shadow: none;
}
.nav-link:hover .nav-link-en,
.has-dropdown:hover .nav-link-en,
.has-dropdown:focus-within .nav-link-en {
  color: #7dd3fc;
  text-shadow: 0 0 14px rgba(56, 189, 248, 0.65), 0 0 28px rgba(56, 189, 248, 0.3);
}
nav.on-light .nav-link:hover .nav-link-en,
nav.on-light .has-dropdown:hover .nav-link-en,
nav.on-light .has-dropdown:focus-within .nav-link-en {
  color: #1d4ed8;
  text-shadow: none;
}
.has-dropdown:hover .nav-caret,
.has-dropdown:focus-within .nav-caret {
  transform: rotate(180deg);
  color: #38bdf8;
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.75));
}

.nav-dropdown {
  position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%) translateY(8px);
  margin-top: 0.55rem;
  min-width: 210px; padding: 0.5rem;
  background: rgba(10, 22, 40, 0.96); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 10px;
  box-shadow: 0 18px 46px rgba(0,0,0,0.55);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.22s ease, transform 0.28s cubic-bezier(0.16,1,0.3,1), visibility 0.22s;
}
.nav-dropdown::before { content: ''; position: absolute; top: -0.7rem; left: 0; right: 0; height: 0.7rem; }
.has-dropdown:hover .nav-dropdown,
.has-dropdown:focus-within .nav-dropdown {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nav-dropdown a {
  display: block; padding: 0.52rem 0.9rem;
  font-size: 0.82rem; font-weight: 500; color: rgba(226, 232, 240, 0.72); white-space: nowrap;
  border-radius: 6px; transition: background 0.18s, color 0.18s;
}
.nav-dropdown a:hover { background: rgba(56, 189, 248, 0.14); color: #fff; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.nav-toggle span { display: block; width: 20px; height: 1.5px; background: #fff; margin: 5px 0; transition: background 0.3s; }
nav.on-light .nav-toggle span { background: #0f172a; }

/* ===== Section primitives (mirror landing page) ===== */
.sec-label { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: #2e6dba; margin-bottom: 0.6rem; }
.sec-title { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; color: #0f172a; line-height: 1.25; margin-bottom: 1rem; letter-spacing: -0.01em; }
.sec-title-en { font-size: 0.78rem; font-weight: 600; color: #64748b; letter-spacing: 0.26em; text-transform: uppercase; margin-top: 0.45rem; margin-bottom: 0.4rem; }
.sec-desc { font-size: 1rem; color: #6e6e73; max-width: 640px; line-height: 1.85; }

/* ===== Research Index — hero header ===== */
.research-hero {
  position: relative;
  padding: 9rem 0 3.5rem;
  background: #020617;
  color: #f8fafc;
  overflow: hidden;
}
.research-hero::before, .research-hero::after {
  content: ''; position: absolute; border-radius: 50%; filter: blur(120px); z-index: 0;
}
.research-hero::before { width: 40vw; height: 40vw; background: rgba(56, 189, 248, 0.18); top: -30%; left: -10%; }
.research-hero::after  { width: 30vw; height: 30vw; background: rgba(139, 92, 246, 0.15); bottom: -40%; right: -10%; }
.research-hero .container { position: relative; z-index: 1; }
.research-hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 50% 0%, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 70%);
  z-index: 0;
}
.research-hero .sec-title {
  color: #fff;
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  margin-bottom: 0.55rem;
}
.research-hero .sec-title-en {
  color: rgba(148, 163, 184, 0.85);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  margin: 0;
}

/* ===== Blog Index list ===== */
.blog-list { padding: 5rem 0 6rem; }
.blog-list-inner { max-width: 820px; margin: 0 auto; padding: 0 2rem; }
.blog-list-head { margin-bottom: 2.5rem; display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; }
.blog-list-head .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.24em;
  text-transform: uppercase; color: #64748b;
}
.blog-list-head .count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em;
  color: #94a3b8;
}

.post-card {
  display: block;
  padding: 2rem 0 2.2rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  position: relative;
  transition: padding-left 0.4s cubic-bezier(0.16,1,0.3,1);
}
.post-card:last-of-type { border-bottom: 1px solid rgba(15, 23, 42, 0.08); }
.post-card:hover { padding-left: 0.6rem; }
.post-card::before {
  content: ''; position: absolute;
  left: 0; top: 2rem; bottom: 2.2rem;
  width: 2px; border-radius: 2px;
  background: linear-gradient(180deg, #60a5fa, #c084fc);
  opacity: 0; transform: scaleY(0.3); transform-origin: top;
  transition: opacity 0.3s, transform 0.4s cubic-bezier(0.16,1,0.3,1);
}
.post-card:hover::before { opacity: 1; transform: scaleY(1); }

.post-meta-row {
  display: flex; align-items: center; gap: 0.9rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 0.85rem;
}
.post-cat {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.18);
  color: #1d4ed8;
  letter-spacing: 0.16em;
}
.post-cat.cat-paper { background: rgba(139, 92, 246, 0.08); border-color: rgba(139, 92, 246, 0.2); color: #7c3aed; }
.post-cat.cat-model { background: rgba(37, 99, 235, 0.08); border-color: rgba(37, 99, 235, 0.2); color: #1d4ed8; }

.post-title {
  font-size: clamp(1.5rem, 2.8vw, 1.85rem);
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.015em;
  line-height: 1.28;
  margin-bottom: 0.4rem;
  transition: color 0.22s;
}
.post-card:hover .post-title { color: #1d4ed8; }
.post-subtitle {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem; font-weight: 600;
  color: #64748b; letter-spacing: 0.04em;
  margin-bottom: 0.95rem;
}
.post-excerpt {
  color: #475569;
  font-size: 0.98rem;
  line-height: 1.8;
  max-width: 620px;
}
.post-authors {
  margin-top: 0.9rem;
  font-size: 0.82rem; color: #64748b;
}
.post-authors .dot { margin: 0 0.45rem; color: #cbd5e1; }

/* ===== Single post layout ===== */
.post-hero {
  position: relative;
  padding: 9rem 0 4.5rem;
  background: #020617;
  color: #f8fafc;
  overflow: hidden;
}
.post-hero::before {
  content: ''; position: absolute;
  width: 45vw; height: 45vw; border-radius: 50%;
  background: rgba(56, 189, 248, 0.18);
  filter: blur(140px);
  top: -30%; left: -15%; z-index: 0;
}
.post-hero::after {
  content: ''; position: absolute;
  width: 35vw; height: 35vw; border-radius: 50%;
  background: rgba(139, 92, 246, 0.16);
  filter: blur(140px);
  bottom: -40%; right: -10%; z-index: 0;
}
.post-hero-grid {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 50% 0%, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 75%);
}
.post-hero .container { position: relative; z-index: 1; max-width: 880px; }

.post-back {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.8);
  margin-bottom: 1.6rem;
  transition: color 0.22s, gap 0.22s;
}
.post-back:hover { color: #7dd3fc; gap: 0.7rem; }
.post-back svg { width: 12px; height: 12px; }

.post-hero-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.55rem 0.9rem;
  margin-bottom: 1.3rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.9);
}
.post-hero-meta .badge {
  padding: 0.35rem 0.85rem; border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #7dd3fc;
}
.post-hero-meta .badge.cat-paper { background: rgba(192, 132, 252, 0.14); border-color: rgba(192, 132, 252, 0.3); color: #e9d5ff; }
.post-hero-meta .badge.cat-model { background: rgba(96, 165, 250, 0.14); border-color: rgba(96, 165, 250, 0.3); color: #bfdbfe; }
.post-hero-meta .sep { color: rgba(148, 163, 184, 0.4); }

.post-title-main {
  font-size: clamp(2rem, 4.8vw, 3.2rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}
.post-title-main .accent {
  background: linear-gradient(135deg, #60a5fa 0%, #c084fc 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.post-subtitle-main {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem; font-weight: 500;
  color: rgba(191, 219, 254, 0.8);
  letter-spacing: 0.02em;
  margin-bottom: 1.8rem;
}

.post-authors-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 1.1rem;
  margin-bottom: 1.8rem;
  font-size: 0.9rem;
  color: rgba(203, 213, 225, 0.8);
}
.post-authors-row strong { color: #fff; font-weight: 600; }
.post-authors-row .dot { color: rgba(148, 163, 184, 0.45); }

.post-links {
  display: flex; flex-wrap: wrap; gap: 0.6rem;
}
.post-link-btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #cbd5e1;
  font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.04em;
  transition: background 0.22s, border-color 0.22s, transform 0.22s, color 0.22s;
}
.post-link-btn:hover {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.4);
  color: #7dd3fc;
  transform: translateY(-2px);
}
.post-link-btn svg { width: 14px; height: 14px; }

/* ===== Article prose ===== */
.post-body {
  padding: 4rem 0 6rem;
  background: #faf8f5;
}
.prose {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 2rem;
  color: #1f2937;
  font-size: 1.02rem;
  line-height: 1.85;
}
.prose > * + * { margin-top: 1.35rem; }
.prose > h2 + *,
.prose > h3 + *,
.prose > h4 + * { margin-top: 1rem; }

.prose h2 {
  font-size: 1.55rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
  margin-top: 3rem;
  line-height: 1.35;
  position: relative;
  padding-left: 0.95rem;
}
.prose h2::before {
  content: ''; position: absolute;
  left: 0; top: 0.35em; bottom: 0.35em;
  width: 3px; border-radius: 2px;
  background: linear-gradient(180deg, #60a5fa, #2563eb);
}
.prose h2 .en {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #64748b;
  margin-top: 0.35rem;
}

.prose h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.005em;
  margin-top: 2.2rem;
  line-height: 1.4;
}
.prose h3 .en {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #64748b;
  margin-top: 0.35rem;
}
.prose h4 {
  font-size: 1.02rem;
  font-weight: 700;
  color: #0f172a;
  margin-top: 1.8rem;
}
.prose h4 .en {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #64748b;
  margin-top: 0.25rem;
}

/* ===== Bilingual (CN primary + EN muted) paragraph & list ===== */
.prose .bi .cn { display: block; color: #1f2937; }
.prose .bi .en-line {
  display: block;
  color: #64748b;
  font-size: 0.92em;
  font-weight: 400;
  line-height: 1.7;
  margin-top: 0.15em;
  font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
}
.prose .bi strong { color: #0f172a; }
.prose .bi .en-line strong { color: #475569; font-weight: 600; }

.prose ul.bi-list, .prose ol.bi-list { padding-left: 1.35rem; }
.prose .bi-list li { margin-top: 0.65rem; }
.prose .bi-list li .cn { display: block; color: #1f2937; }
.prose .bi-list li .en-line {
  display: block;
  color: #64748b;
  font-size: 0.9em;
  font-weight: 400;
  line-height: 1.65;
  margin-top: 0.1em;
  font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
}
.prose .bi-list li .en-line strong { color: #475569; font-weight: 600; }

.prose blockquote.bi p { margin: 0; }
.prose blockquote.bi p + p {
  color: #64748b;
  font-size: 0.95em;
  font-weight: 500;
  font-style: normal;
  margin-top: 0.3rem;
  font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
}
.prose blockquote.bi p + p strong { color: #475569; }

/* Banner / demo assets from HF README */
.prose .hf-media {
  margin: 1.8rem auto;
  text-align: center;
}
.prose .hf-media img {
  display: inline-block;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 12px 32px -12px rgba(15, 23, 42, 0.2);
  border: 1px solid rgba(15, 23, 42, 0.06);
}
.prose .hf-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
  margin: 1.2rem 0 1.8rem;
}
.prose .hf-badges a { border: none; background: none; padding: 0; }
.prose .hf-badges a:hover { background: none; }
.prose .hf-badges img { height: 22px; width: auto; border-radius: 4px; display: block; }

.prose p { color: #1f2937; }
.prose strong { color: #0f172a; font-weight: 700; }
.prose em { color: #334155; font-style: italic; }

.prose a {
  color: #1d4ed8;
  font-weight: 600;
  border-bottom: 1px solid rgba(37, 99, 235, 0.25);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  padding: 0 0.1em;
}
.prose a:hover {
  color: #1e3a8a;
  border-bottom-color: rgba(37, 99, 235, 0.6);
  background: rgba(37, 99, 235, 0.06);
}

.prose ul, .prose ol { padding-left: 1.35rem; }
.prose li { margin-top: 0.45rem; }
.prose li::marker { color: #94a3b8; }

.prose blockquote {
  border-left: 3px solid #60a5fa;
  padding: 0.75rem 1.2rem;
  background: rgba(37, 99, 235, 0.04);
  color: #334155;
  border-radius: 0 8px 8px 0;
  font-style: italic;
}
.prose blockquote p { margin-top: 0; }
.prose blockquote + p { margin-top: 1.35rem; }

.prose code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88em;
  background: rgba(15, 23, 42, 0.05);
  color: #1d4ed8;
  padding: 0.1em 0.38em;
  border-radius: 5px;
  border: 1px solid rgba(15, 23, 42, 0.06);
}
.prose pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 1.2rem 1.35rem;
  border-radius: 12px;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.7;
  border: 1px solid rgba(15, 23, 42, 0.15);
  box-shadow: 0 4px 20px -8px rgba(15, 23, 42, 0.25);
}
.prose pre code {
  background: none;
  color: inherit;
  padding: 0;
  border: none;
  font-size: inherit;
}

.prose hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(15, 23, 42, 0.15), transparent);
  margin: 2.8rem 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin: 1rem 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
}
.prose thead { background: rgba(15, 23, 42, 0.035); }
.prose th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-weight: 700;
  color: #0f172a;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}
.prose td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
  color: #334155;
}
.prose tr:last-child td { border-bottom: none; }

.prose .callout {
  display: flex; gap: 0.9rem;
  padding: 1rem 1.2rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.08), rgba(139, 92, 246, 0.06));
  border: 1px solid rgba(96, 165, 250, 0.2);
  color: #1e3a8a;
}
.prose .callout .icon {
  flex-shrink: 0;
  width: 22px; height: 22px; color: #2563eb;
}
.prose .callout strong { color: #1e3a8a; }

.prose .pull-quote {
  font-family: 'Space Grotesk', 'Noto Sans SC', system-ui, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.5;
  letter-spacing: -0.01em;
  padding: 1.8rem 0;
  margin: 2rem 0;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  text-align: center;
  position: relative;
}
.prose .pull-quote::before {
  content: '“';
  position: absolute; left: 50%; top: -0.3rem;
  transform: translateX(-50%);
  font-family: Georgia, serif;
  font-size: 2.4rem;
  color: #60a5fa;
  line-height: 1;
  background: #faf8f5;
  padding: 0 0.6rem;
}

/* Key-value spec list */
.prose .spec-grid {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.75rem 1.6rem;
  padding: 1.2rem 1.4rem;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 12px;
  font-size: 0.92rem;
}
.prose .spec-grid dt {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #64748b;
  align-self: center;
}
.prose .spec-grid dd {
  color: #0f172a;
  font-weight: 600;
}

/* ===== PDF Embed ===== */
.pdf-mobile-cta { display: none; }

.pdf-embed {
  max-width: 1100px;
  margin: 0 auto 2rem;
  padding: 0 2rem;
}
.pdf-embed iframe {
  width: 100%;
  height: calc(100vh - 140px);
  min-height: 720px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 14px;
  background: #1a1a1a;
  box-shadow: 0 24px 60px -24px rgba(15, 23, 42, 0.35);
  display: block;
}
.pdf-fallback {
  max-width: 720px;
  margin: 1rem auto 0;
  padding: 0 2rem;
  color: #64748b;
  font-size: 0.9rem;
  text-align: center;
}
.pdf-fallback a {
  color: #1d4ed8;
  font-weight: 600;
  border-bottom: 1px solid rgba(37, 99, 235, 0.25);
}
.pdf-fallback a:hover {
  color: #1e3a8a;
  border-bottom-color: rgba(37, 99, 235, 0.6);
}

@media (max-width: 900px) {
  .pdf-embed { padding: 0 1rem; }
  .pdf-embed iframe { height: calc(100vh - 120px); min-height: 560px; border-radius: 10px; }
  .pdf-fallback { padding: 0 1.4rem; }
}

@media (max-width: 640px) {
  .pdf-embed, .pdf-fallback { display: none; }
  .pdf-mobile-cta {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 420px;
    margin: 0 auto;
    padding: 1rem 1.4rem 2rem;
  }
  .pdf-mobile-cta .hint {
    font-size: 0.85rem;
    color: #64748b;
    text-align: center;
    line-height: 1.65;
    margin-bottom: 0.35rem;
  }
  .pdf-mobile-cta .btn {
    display: flex; align-items: center; justify-content: center; gap: 0.55rem;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: transform 0.22s, box-shadow 0.22s;
  }
  .pdf-mobile-cta .btn svg { width: 16px; height: 16px; }
  .pdf-mobile-cta .btn-primary {
    background: linear-gradient(135deg, #60a5fa, #2563eb);
    color: #fff;
    box-shadow: 0 8px 24px -8px rgba(37,99,235,0.5);
  }
  .pdf-mobile-cta .btn-primary:active { transform: translateY(1px); }
  .pdf-mobile-cta .btn-secondary {
    background: #fff;
    color: #1d4ed8;
    border: 1px solid rgba(37, 99, 235, 0.25);
  }
  .pdf-mobile-cta .btn-secondary:active { transform: translateY(1px); }
}

/* Post footer navigation */
.post-nav {
  max-width: 880px;
  margin: 2.5rem auto 0;
  padding: 2.2rem 2rem 0;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.post-nav .link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #64748b;
  transition: color 0.22s, gap 0.22s;
}
.post-nav .link:hover { color: #1d4ed8; gap: 0.7rem; }
.post-nav .link svg { width: 12px; height: 12px; }

/* ===== Footer ===== */
footer { padding: 2.5rem 0; border-top: 1px solid #e8e5e0; }
footer .container { display: flex; justify-content: center; align-items: center; }
footer span { font-size: 0.8rem; color: #86868b; }

/* Fade-in on scroll */
.fade-up { opacity: 0; transform: translateY(22px); transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1), transform 0.7s cubic-bezier(0.16,1,0.3,1); }
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .nav-logo img { height: 56px; }
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(26,47,74,0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 1.5rem 2rem;
    gap: 0.4rem;
  }
  .nav-item { width: 100%; }
  .nav-link { width: 100%; justify-content: space-between; padding: 0.6rem 0; }
  .nav-link-cn { color: rgba(226, 232, 240, 0.92); }
  .nav-link-en { color: rgba(148, 163, 184, 0.72); }
  .nav-dropdown {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0.15rem 0 0.35rem 0.85rem;
    margin-top: 0;
    min-width: 0;
  }
  .nav-dropdown::before { display: none; }
  .nav-caret { display: none; }
  .nav-dropdown a { padding: 0.4rem 0; font-size: 0.82rem; color: rgba(203,213,225,0.82); }

  .research-hero { padding: 7rem 0 2.5rem; }
  .post-hero { padding: 8rem 0 3.5rem; }
  .blog-list { padding: 3rem 0 5rem; }
  .blog-list-inner { padding: 0 1.4rem; }
  .prose { padding: 0 1.4rem; font-size: 0.98rem; }
  .prose pre { padding: 1rem; border-radius: 10px; font-size: 0.78rem; }
  .post-card { padding: 1.6rem 0 1.7rem; }
  .post-nav { padding: 2rem 1.4rem 0; }
  footer .container { flex-direction: column; gap: 0.75rem; text-align: center; }
}

@media (max-width: 480px) {
  .research-hero { padding: 6.5rem 0 2rem; }
  .research-hero .sec-title { font-size: 2rem; }
  .post-hero { padding: 6.5rem 0 2.5rem; }
  .post-title-main { font-size: 1.75rem; line-height: 1.25; }
  .post-subtitle-main { font-size: 0.85rem; }
  .post-hero-meta { font-size: 0.62rem; letter-spacing: 0.15em; gap: 0.4rem 0.65rem; }
  .post-hero-meta .badge { padding: 0.28rem 0.65rem; }
  .post-authors-row { font-size: 0.82rem; gap: 0.2rem 0.7rem; }
  .post-links { gap: 0.45rem; }
  .post-link-btn { padding: 0.55rem 0.85rem; font-size: 0.76rem; }
  .prose { padding: 0 1.1rem; font-size: 0.95rem; }
  .prose h2 { font-size: 1.3rem; margin-top: 2.2rem; }
  .prose h3 { font-size: 1.08rem; margin-top: 1.8rem; }
  .prose pre { font-size: 0.72rem; padding: 0.85rem; }
  .prose table { font-size: 0.82rem; }
  .prose .spec-grid { padding: 1rem 1.1rem; grid-template-columns: 1fr; gap: 0.2rem 0; }
  .prose .spec-grid dd { margin-bottom: 0.55rem; }
  .blog-list-inner { padding: 0 1.1rem; }
  .post-title { font-size: 1.25rem; }
  .post-subtitle { font-size: 0.76rem; }
  .hf-media img { border-radius: 8px; }
  .hf-badges img { height: 18px; }
}
