/* ===================================
   AI Technology Section - DEPRECATED
   Replaced by editorial-sections.css (.eit-*)
   =================================== */
/* stylelint-disable */
.ai-tech-header,
.ai-tech-container,
.ai-tech-section-title,
.ai-tech-icon,
.ai-tech-grid,
.ai-tech-card,
.ai-tech-card-content,
.ai-tech-card-header,
.ai-tech-badge,
.ai-tech-card-title,
.ai-tech-card-desc,
.ai-tech-card-meta,
.ai-tech-date,
.ai-tech-reading-time,
.ai-tech-list,
.ai-tech-list-item,
.ai-tech-list-content,
.ai-tech-list-title,
.ai-tech-list-meta,
.ai-tech-list-date,
.ai-tech-list-category,
.ai-tech-list-tags,
.ai-tech-recommended,
.ai-tech-latest { display: none !important; }

/* AI Tech Header */
.ai-tech-header {
  background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 50%, #ede9fe 100%);
  padding: 2.5rem 2rem;
  border-radius: 20px;
  margin-bottom: 2rem;
  border: 1px solid rgba(139, 92, 246, 0.15);
}

.ai-tech-header h1 {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ai-tech-header .post-description {
  color: #6b7280;
  font-size: 1rem;
  margin-top: 0.75rem;
}

.dark .ai-tech-header {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(168, 85, 247, 0.06) 50%, rgba(124, 58, 237, 0.05) 100%);
  border-color: rgba(139, 92, 246, 0.25);
}

.dark .ai-tech-header .post-description {
  color: #9ca3af;
}

/* AI Tech Container */
.ai-tech-container {
  display: grid;
  gap: 2.5rem;
  margin-top: 2rem;
}

/* AI Tech Section Title */
.ai-tech-section-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-left: 1rem;
  border-left: 4px solid #8b5cf6;
}

.dark .ai-tech-section-title {
  color: #f3f4f6;
}

/* AI Tech Icon */
.ai-tech-icon {
  font-size: 1.3rem;
}

/* AI Tech Grid - Dual Column */
.ai-tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .ai-tech-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* AI Tech Card */
.ai-tech-card {
  background: #ffffff;
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.dark .ai-tech-card {
  background: rgba(31, 41, 55, 0.8);
  border-color: rgba(139, 92, 246, 0.25);
}

.ai-tech-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(139, 92, 246, 0.15), 0 4px 12px rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.35);
}

.ai-tech-card-content {
  padding: 1.25rem;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* AI Tech Card Header */
.ai-tech-card-header {
  margin-bottom: 0.75rem;
}

.ai-tech-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(168, 85, 247, 0.1));
  color: #7c3aed;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.dark .ai-tech-badge {
  color: #a78bfa;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(168, 85, 247, 0.15));
}

/* AI Tech Card Title */
.ai-tech-card-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  line-height: 1.5;
}

.ai-tech-card-title a {
  color: #1f2937;
  text-decoration: none;
  transition: color 0.2s ease;
}

.dark .ai-tech-card-title a {
  color: #f3f4f6;
}

.ai-tech-card-title a:hover {
  color: #7c3aed;
}

/* AI Tech Card Description */
.ai-tech-card-desc {
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.6;
  margin: 0;
  flex-grow: 1;
}

.dark .ai-tech-card-desc {
  color: #9ca3af;
}

/* AI Tech Card Meta */
.ai-tech-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(139, 92, 246, 0.1);
  font-size: 0.75rem;
}

.ai-tech-date {
  color: #9ca3af;
}

.ai-tech-reading-time {
  color: #9ca3af;
}

/* AI Tech List */
.ai-tech-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ai-tech-list-item {
  background: #ffffff;
  border: 1px solid rgba(139, 92, 246, 0.1);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  transition: all 0.2s ease;
}

.dark .ai-tech-list-item {
  background: rgba(31, 41, 55, 0.5);
  border-color: rgba(139, 92, 246, 0.15);
}

.ai-tech-list-item:hover {
  border-color: rgba(139, 92, 246, 0.25);
  background: rgba(249, 245, 255, 0.5);
  transform: translateX(4px);
}

.dark .ai-tech-list-item:hover {
  background: rgba(139, 92, 246, 0.08);
}

.ai-tech-list-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ai-tech-list-title {
  font-size: 1rem;
  font-weight: 500;
  margin: 0;
}

.ai-tech-list-title a {
  color: #1f2937;
  text-decoration: none;
  transition: color 0.2s ease;
}

.dark .ai-tech-list-title a {
  color: #f3f4f6;
}

.ai-tech-list-title a:hover {
  color: #7c3aed;
}

.ai-tech-list-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.8rem;
}

.ai-tech-list-date {
  color: #9ca3af;
}

.ai-tech-list-category {
  color: #7c3aed;
  font-weight: 500;
}

.ai-tech-list-tags {
  color: #6b7280;
}

/* ===================================
   Growth Section - DEPRECATED
   Replaced by editorial-sections.css (.eig-*)
   =================================== */
.growth-header,
.growth-container,
.growth-section-title,
.growth-icon,
.growth-grid,
.growth-card,
.growth-card-content,
.growth-card-header,
.growth-badge,
.growth-card-title,
.growth-card-desc,
.growth-card-meta,
.growth-date,
.growth-list,
.growth-list-item,
.growth-list-content,
.growth-list-title,
.growth-list-meta,
.growth-list-date,
.growth-list-category,
.growth-list-tags,
.growth-subcategory,
.growth-subcategory-title,
.growth-recommended,
.growth-all { display: none !important; }

/* Growth Header */
.growth-header {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 50%, #fde68a 100%);
  padding: 2.5rem 2rem;
  border-radius: 20px;
  margin-bottom: 2rem;
  border: 1px solid rgba(217, 119, 6, 0.15);
}

.growth-header h1 {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.growth-header .post-description {
  color: #78716c;
  font-size: 1rem;
  margin-top: 0.75rem;
}

.dark .growth-header {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.08) 0%, rgba(245, 158, 11, 0.06) 50%, rgba(251, 191, 36, 0.04) 100%);
  border-color: rgba(217, 119, 6, 0.25);
}

.dark .growth-header .post-description {
  color: #9ca3af;
}

/* Growth Container */
.growth-container {
  display: grid;
  gap: 2.5rem;
  margin-top: 2rem;
}

/* Growth Section Title */
.growth-section-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-left: 1rem;
  border-left: 4px solid #d97706;
}

.dark .growth-section-title {
  color: #f3f4f6;
}

/* Growth Icon */
.growth-icon {
  font-size: 1.3rem;
}

/* Growth Grid - Dual Column */
.growth-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .growth-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Growth Card */
.growth-card {
  background: #ffffff;
  border: 1px solid rgba(217, 119, 6, 0.15);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.dark .growth-card {
  background: rgba(31, 41, 55, 0.8);
  border-color: rgba(217, 119, 6, 0.25);
}

.growth-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(217, 119, 6, 0.15), 0 4px 12px rgba(217, 119, 6, 0.1);
  border-color: rgba(217, 119, 6, 0.35);
}

.growth-card-content {
  padding: 1.25rem;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Growth Card Header */
.growth-card-header {
  margin-bottom: 0.75rem;
}

.growth-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.growth-badge--growth {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.1), rgba(245, 158, 11, 0.1));
  color: #d97706;
  border: 1px solid rgba(217, 119, 6, 0.2);
}

.growth-badge--travel {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(14, 165, 233, 0.1));
  color: #06b6d4;
  border: 1px solid rgba(6, 182, 212, 0.2);
}

.dark .growth-badge--growth {
  color: #fbbf24;
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.15), rgba(245, 158, 11, 0.15));
}

.dark .growth-badge--travel {
  color: #22d3ee;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(14, 165, 233, 0.15));
}

/* Growth Card Title */
.growth-card-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  line-height: 1.5;
}

.growth-card-title a {
  color: #1f2937;
  text-decoration: none;
  transition: color 0.2s ease;
}

.dark .growth-card-title a {
  color: #f3f4f6;
}

.growth-card-title a:hover {
  color: #d97706;
}

/* Growth Card Description */
.growth-card-desc {
  font-size: 0.875rem;
  color: #78716c;
  line-height: 1.6;
  margin: 0;
  flex-grow: 1;
}

.dark .growth-card-desc {
  color: #9ca3af;
}

/* Growth Card Meta */
.growth-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(217, 119, 6, 0.1);
  font-size: 0.75rem;
}

.growth-date {
  color: #a8a29e;
}

/* Growth List */
.growth-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.growth-list-item {
  background: #ffffff;
  border: 1px solid rgba(217, 119, 6, 0.1);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  transition: all 0.2s ease;
}

.dark .growth-list-item {
  background: rgba(31, 41, 55, 0.5);
  border-color: rgba(217, 119, 6, 0.15);
}

.growth-list-item:hover {
  border-color: rgba(217, 119, 6, 0.25);
  background: rgba(255, 251, 235, 0.5);
  transform: translateX(4px);
}

.dark .growth-list-item:hover {
  background: rgba(217, 119, 6, 0.08);
}

.growth-list-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.growth-list-title {
  font-size: 1rem;
  font-weight: 500;
  margin: 0;
}

.growth-list-title a {
  color: #1f2937;
  text-decoration: none;
  transition: color 0.2s ease;
}

.dark .growth-list-title a {
  color: #f3f4f6;
}

.growth-list-title a:hover {
  color: #d97706;
}

.growth-list-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.8rem;
}

.growth-list-date {
  color: #a8a29e;
}

.growth-list-category {
  color: #d97706;
  font-weight: 500;
}

.growth-list-tags {
  color: #78716c;
}

/* Growth Subcategory */
.growth-subcategory {
  margin-bottom: 1.5rem;
}

.growth-subcategory-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-left: 0.75rem;
  border-left: 3px solid #f59e0b;
}

.dark .growth-subcategory-title {
  color: #f3f4f6;
}

.post-entry {
  padding: 1.5rem;
  margin-bottom: 1rem;
  border-radius: 12px;
  background: var(--entry);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.post-entry:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.post-entry-header {
  margin-bottom: 0.75rem;
}

.post-entry-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.5;
}

.post-entry-title a {
  color: var(--color-text-heading, var(--primary));
  text-decoration: none;
  transition: color 0.2s ease;
}

.post-entry-title a:hover {
  color: var(--color-accent, var(--primary));
  text-decoration: underline;
}

body.dark .post-entry-title a {
  color: var(--color-ink, #e2e3e1);
}

body.dark .post-entry-title a:hover {
  color: var(--color-accent, #7dd3fc);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--secondary);
  margin-top: 0.5rem;
}

.post-entry-description {
  font-size: 0.9rem;
  color: var(--secondary);
  line-height: 1.6;
  margin: 0.75rem 0;
}

.post-entry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.post-tag,
.post-category {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.post-tag {
  background: rgba(148, 163, 184, 0.1);
  color: var(--secondary);
}

.post-tag:hover {
  background: rgba(148, 163, 184, 0.2);
  color: var(--entry);
}

.post-category {
  background: var(--primary);
  color: #fff;
}

.dark .post-category {
  color: #000;
}

/* ===================================
   P0: Typography & Readability Improvements
   =================================== */

/* Post Content - editorial serif prose */
.post-single .post-content {
  max-width: none;
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.125rem; /* 18px */
  line-height: 1.78;
  color: var(--color-text);
  font-variation-settings: "opsz" 14;
}

.post-content p {
  margin: 0 0 2rem;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.post-content p + p {
  margin-top: 0;
}

.post-content a {
  color: var(--color-text);
  text-decoration: underline;
  text-decoration-color: rgba(var(--theme-rgb), 0);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  background-image: linear-gradient(transparent 65%, rgba(20, 184, 166, 0.22) 65%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  transition: background-size 0.2s ease, color 0.2s ease;
}

.post-content a:hover {
  background-size: 100% 40%;
  color: var(--color-accent);
}

/* Headings use the sans-serif UI face for contrast against serif body */
.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
  font-family: var(--font-sans);
  color: var(--color-text-heading);
  letter-spacing: -0.01em;
}

.post-content h2 {
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1.3;
  margin-top: var(--space-12);
  margin-bottom: var(--space-5);
  padding-left: 0;
  border-left: none;
  position: relative;
}

.post-content h2::before {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  background: var(--color-accent);
  margin-bottom: var(--space-4);
  opacity: 0.85;
}

.dark .post-content h2 {
  border-left-color: transparent;
}

.post-content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.35;
  margin-top: var(--space-10);
  margin-bottom: var(--space-3);
}

.post-content h4 {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}

/* Emphasis: let italics lean on the serif's cursive variant */
.post-content em {
  font-style: italic;
  font-variation-settings: "opsz" 14;
}

.post-content strong {
  font-weight: 600;
}

/* Blockquote — pull-quote feel */
.post-content blockquote {
  margin: var(--space-10) 0;
  padding: 1rem 3rem;
  border-left: 2px solid var(--color-accent);
  background: rgba(238, 238, 236, 0.3);
  color: var(--color-text-muted);
  font-style: italic;
  font-size: 1.25rem;
  line-height: 1.7;
}

.dark .post-content blockquote {
  background: rgba(30, 35, 30, 0.4);
}

/* Lists — tighter vertical rhythm */
.post-content ul,
.post-content ol {
  margin: 0 0 1.4em;
  padding-left: 1.35em;
}

.post-content li {
  margin-bottom: 0.4em;
}

.post-content li > p {
  margin-bottom: 0.5em;
}

/* Inline code — subtle pill */
.post-content :not(pre) > code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 0.1em 0.4em;
  border-radius: var(--radius-sm);
  background: rgba(20, 184, 166, 0.08);
  color: var(--color-text);
  border: 1px solid rgba(20, 184, 166, 0.15);
}

.dark .post-content :not(pre) > code {
  background: rgba(20, 184, 166, 0.12);
  border-color: rgba(20, 184, 166, 0.2);
}

/* Horizontal rule — deferred to article-typography.css */

/* Breadcrumb - More visible */
.breadcrumbs {
  font-size: 0.85rem;
}

.breadcrumbs a {
  color: #6b7280;
}

.dark .breadcrumbs a {
  color: #9ca3af;
}

/* ===================================
   Global Typography — Editorial Baseline
   =================================== */
body {
  font-family: var(--font-sans);
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

code, pre, kbd, samp, tt {
  font-family: var(--font-mono);
  font-feature-settings: "liga" 0; /* keep code literal */
}

/* ===================================
   Blog AI Inline Chat - Modern Design
   =================================== */

/* Remove old floating widget styles */
.blog-ai-widget { display: none !important; }

/* Inline AI Chat Container */
.blog-ai-inline {
  margin-top: 20px;
  border-radius: 20px;
  background: linear-gradient(145deg, #ffffff, #f8fafc);
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.03);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-ai-inline:hover {
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
  border-color: rgba(148, 163, 184, 0.3);
}

/* Status Indicator */
.blog-ai-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  background: rgba(148, 163, 184, 0.1);
  transition: all 0.3s ease;
}

.blog-ai-status__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
  transition: all 0.3s ease;
}

.blog-ai-status--online {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.blog-ai-status--online .blog-ai-status__dot {
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
  animation: pulse-green 2s infinite;
}

.blog-ai-status--offline {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
}

.blog-ai-status--offline .blog-ai-status__dot {
  background: #94a3b8;
}

@keyframes pulse-green {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.9); }
}

/* Welcome Message */
.blog-ai-welcome {
  padding: 20px 24px;
  color: #64748b;
  font-size: 0.95rem;
  text-align: center;
  background: rgba(248, 250, 252, 0.8);
  border-radius: 12px;
  margin: 10px 20px;
}

/* Header */
.blog-ai-header {
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(14, 116, 144, 0.06), rgba(20, 184, 166, 0.06));
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.blog-ai-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.blog-ai-icon {
  font-size: 2.2rem;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.blog-ai-title h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  background: linear-gradient(135deg, #0e7490, #14b8a6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.blog-ai-title p {
  margin: 3px 0 0;
  font-size: 0.82rem;
  color: #64748b;
  font-weight: 400;
}

/* Messages Area */
.blog-ai-messages {
  max-height: 360px;
  min-height: 140px;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: rgba(248, 250, 252, 0.6);
}

.blog-ai-messages::-webkit-scrollbar {
  width: 6px;
}

.blog-ai-messages::-webkit-scrollbar-track {
  background: transparent;
}

.blog-ai-messages::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.4);
  border-radius: 3px;
}

.blog-ai-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.6);
}

/* Message Bubbles */
.blog-ai-message {
  max-width: 82%;
  padding: 14px 18px;
  border-radius: 16px;
  line-height: 1.65;
  font-size: 0.93rem;
  animation: messageSlide 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes messageSlide {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.blog-ai-message-user {
  align-self: flex-end;
  background: linear-gradient(135deg, #0891b2, #06b6d4);
  color: white;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 12px rgba(8, 145, 178, 0.25);
}

.blog-ai-message-ai {
  align-self: flex-start;
  background: #ffffff;
  color: #334155;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Error Message Style */
.blog-ai-error {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.08);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  border: 1px solid rgba(220, 38, 38, 0.15);
}

/* Markdown Styles in AI Messages */
.blog-ai-message-ai h1,
.blog-ai-message-ai h2,
.blog-ai-message-ai h3 {
  margin: 12px 0 8px;
  font-size: 1em;
  color: #1e293b;
  font-weight: 600;
}

.blog-ai-message-ai h1:first-child,
.blog-ai-message-ai h2:first-child,
.blog-ai-message-ai h3:first-child {
  margin-top: 0;
}

.blog-ai-message-ai p {
  margin: 0 0 8px;
}

.blog-ai-message-ai p:last-child {
  margin-bottom: 0;
}

.blog-ai-message-ai code {
  background: rgba(148, 163, 184, 0.15);
  padding: 2px 8px;
  border-radius: 6px;
  font-family: 'Fira Code', 'JetBrains Mono', monospace;
  font-size: 0.85em;
  color: #0e7490;
}

.blog-ai-message-ai pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 14px;
  border-radius: 10px;
  overflow-x: auto;
  margin: 10px 0;
  font-size: 0.85rem;
}

.blog-ai-message-ai pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

.blog-ai-message-ai ul,
.blog-ai-message-ai ol {
  margin: 8px 0;
  padding-left: 20px;
}

.blog-ai-message-ai li {
  margin: 5px 0;
}

.blog-ai-message-ai a {
  color: #0891b2;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s;
  font-weight: 500;
}

.blog-ai-message-ai a:hover {
  color: #0e7490;
  border-bottom-color: #0891b2;
}

/* Loading Animation */
.blog-ai-loading {
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 18px !important;
}

.blog-ai-dot {
  width: 9px;
  height: 9px;
  background: linear-gradient(135deg, #14b8a6, #06b6d4);
  border-radius: 50%;
  animation: bounce 1.4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.blog-ai-dot:nth-child(2) {
  animation-delay: 0.16s;
}

.blog-ai-dot:nth-child(3) {
  animation-delay: 0.32s;
}

@keyframes bounce {
  0%, 80%, 100% {
    transform: scale(0.6);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Form */
.blog-ai-form {
  padding: 0 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.blog-ai-input {
  width: 100%;
  padding: 16px 18px;
  border: 2px solid rgba(148, 163, 184, 0.25);
  background: #ffffff;
  border-radius: 14px;
  resize: none;
  font-family: inherit;
  font-size: 0.93rem;
  color: #334155;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
  line-height: 1.5;
}

.blog-ai-input:focus {
  outline: none;
  border-color: #14b8a6;
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12), 0 2px 8px rgba(20, 184, 166, 0.08);
}

.blog-ai-input::placeholder {
  color: #94a3b8;
}

/* Actions */
.blog-ai-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
}

.blog-ai-submit,
.blog-ai-clear {
  padding: 10px 22px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
}

.blog-ai-submit {
  background: linear-gradient(135deg, #0891b2, #06b6d4);
  color: white;
  box-shadow: 0 4px 14px rgba(8, 145, 178, 0.25);
}

.blog-ai-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(8, 145, 178, 0.35);
}

.blog-ai-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.blog-ai-clear {
  background: rgba(241, 245, 249, 0.8);
  color: #64748b;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.blog-ai-clear:hover {
  background: rgba(226, 232, 240, 0.9);
  color: #475467;
}

/* Dark Mode */
.dark .blog-ai-inline {
  background: linear-gradient(145deg, #1e293b, #0f172a);
  border-color: rgba(148, 163, 184, 0.2);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2), 0 1px 4px rgba(0, 0, 0, 0.1);
}

.dark .blog-ai-inline:hover {
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25), 0 2px 8px rgba(0, 0, 0, 0.1);
  border-color: rgba(148, 163, 184, 0.3);
}

.dark .blog-ai-header {
  background: linear-gradient(135deg, rgba(14, 116, 144, 0.15), rgba(20, 184, 166, 0.15));
  border-bottom-color: rgba(148, 163, 184, 0.25);
}

.dark .blog-ai-title h3 {
  background: linear-gradient(135deg, #22d3ee, #14b8a6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.dark .blog-ai-title p {
  color: #94a3b8;
}

.dark .blog-ai-messages {
  background: rgba(15, 23, 42, 0.5);
}

.dark .blog-ai-welcome {
  background: rgba(30, 41, 59, 0.5);
  color: #94a3b8;
}

.dark .blog-ai-status {
  background: rgba(148, 163, 184, 0.1);
}

.dark .blog-ai-status--online {
  background: rgba(34, 197, 94, 0.2);
}

.dark .blog-ai-status--offline {
  background: rgba(148, 163, 184, 0.15);
}

.dark .blog-ai-message-user {
  background: linear-gradient(135deg, #06b6d4, #22d3ee);
  color: #0f172a;
}

.dark .blog-ai-message-ai {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(148, 163, 184, 0.15);
  color: #e2e8f0;
}

.dark .blog-ai-message-ai code {
  background: rgba(148, 163, 184, 0.2);
  color: #22d3ee;
}

.dark .blog-ai-message-ai pre {
  background: #0f172a;
}

.dark .blog-ai-message-ai a {
  color: #22d3ee;
}

.dark .blog-ai-message-ai a:hover {
  color: #67e8f9;
}

.dark .blog-ai-input {
  background: rgba(15, 23, 42, 0.8);
  border-color: rgba(148, 163, 184, 0.25);
  color: #e2e8f0;
}

.dark .blog-ai-input:focus {
  border-color: #14b8a6;
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.15);
}

.dark .blog-ai-clear {
  background: rgba(51, 65, 85, 0.5);
  color: #cbd5e0;
  border-color: rgba(148, 163, 184, 0.15);
}

.dark .blog-ai-clear:hover {
  background: rgba(71, 85, 105, 0.6);
  color: #e2e8f0;
}

.dark .blog-ai-error {
  color: #fca5a5;
  background: rgba(220, 38, 38, 0.15);
  border-color: rgba(220, 38, 38, 0.3);
}

/* Responsive */
@media (max-width: 640px) {
  .blog-ai-inline {
    margin-top: 16px;
    border-radius: 12px;
  }

  .blog-ai-messages {
    max-height: 280px;
    min-height: 100px;
    padding: 12px 14px;
  }

  .blog-ai-message {
    max-width: 90%;
    font-size: 0.9rem;
  }

  .blog-ai-title h3 {
    font-size: 1rem;
  }

  .blog-ai-icon {
    font-size: 1.6rem;
  }

  .blog-ai-actions {
    flex-direction: row-reverse;
  }

  .blog-ai-submit,
  .blog-ai-clear {
    padding: 8px 14px;
    font-size: 0.85rem;
  }
}

/* ===================================
   AI 项目学习按钮样式
   =================================== */
.ai-project-button {
  position: relative;
  display: inline-block;
  padding: 10px 20px;
  background: linear-gradient(45deg, #6b46c1, #3b82f6);
  color: white !important;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  animation: pulse 2s infinite;
  margin: 10px 0;
}

.ai-project-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
  animation: none;
  background: linear-gradient(45deg, #805ad5, #4299e1);
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(107, 70, 193, 0.6); }
  70% { box-shadow: 0 0 0 10px rgba(107, 70, 193, 0); }
  100% { box-shadow: 0 0 0 0 rgba(107, 70, 193, 0); }
}

.widget-ai-projects {
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(107, 70, 193, 0.1), rgba(59, 130, 246, 0.1));
  border-left: 4px solid #6b46c1;
}

.widget-ai-projects h3 {
  color: #6b46c1;
  font-size: 1.2rem;
  margin-top: 0;
}

.widget-ai-projects ul {
  padding-left: 20px;
}

.widget-ai-projects li {
  margin: 8px 0;
}

/* TOC font weight - 仅压制 TOC 内部不需要加粗的元素，保留标题层级感 */
.toc a,
.toc li,
.toc span,
details summary,
.toc .details {
  font-weight: normal !important;
}

/* 自定义页脚样式 */
.footer {
  padding: 30px 0;
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.8;
  transition: opacity 0.3s;
}

.footer:hover {
  opacity: 1;
}

.footer a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s;
  border-bottom: 1px dotted transparent;
}

.footer a:hover {
  border-bottom: 1px dotted var(--primary);
}

.dark .footer a {
  color: var(--primary);
}

/* 回到顶部按钮美化 */
.top-link {
  bottom: 60px;
  right: 30px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
  transition: all 0.3s cubic-bezier(.25,.8,.25,1);
}

.top-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
}

.dark .top-link {
  background: var(--primary);
}

.top-link svg {
  width: 20px;
  height: 20px;
  margin: auto;
  display: block;
  margin-top: 11px;
}

/* About page styles moved to assets/css/extended/about.css */


/* ===================================
   RSS Subscription Card — "Signal Tower" redesign
   =================================== */

/* ── Pulse ring animation ── */
@keyframes signal-ring {
  0%   { transform: scale(1);   opacity: 0.6; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* ── Decorative background grid ── */
.signal-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(14, 116, 144, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 116, 144, 0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  border-radius: inherit;
  z-index: 0;
}

.dark .signal-bg {
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.05) 1px, transparent 1px);
}

/* ── Card shell ── */
.rss-subscribe-card {
  position: relative;
  margin: 0;
  border-radius: 18px;
  border: 1.5px solid rgba(14, 116, 144, 0.32);
  background: linear-gradient(135deg, rgba(14, 116, 144, 0.10) 0%, rgba(20, 184, 166, 0.07) 100%);
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.rss-subscribe-card:hover {
  border-color: rgba(14, 116, 144, 0.35);
  box-shadow: 0 8px 36px rgba(14, 116, 144, 0.12);
}

.dark .rss-subscribe-card {
  border-color: rgba(34, 211, 238, 0.15);
  background: linear-gradient(135deg, rgba(14, 116, 144, 0.09) 0%, rgba(20, 184, 166, 0.05) 100%);
}

.dark .rss-subscribe-card:hover {
  border-color: rgba(34, 211, 238, 0.32);
  box-shadow: 0 8px 36px rgba(14, 116, 144, 0.18);
}

/* ── Teaser: two-column layout ── */
.rss-subscribe-card__teaser {
  position: relative;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 40px 48px;
  z-index: 1;
}

/* ── Left column ── */
.signal-left {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  flex: 1;
  min-width: 0;
}

/* ── Pulse icon ── */
.signal-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
}

.signal-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid #22d3ee;
  animation: signal-ring 2.4s ease-out infinite;
}

.signal-pulse--2 { animation-delay: 0.8s; }
.signal-pulse--3 { animation-delay: 1.6s; }

.signal-icon {
  position: relative;
  z-index: 1;
  width: 28px;
  height: 28px;
  color: #0e7490;
  filter: drop-shadow(0 0 6px rgba(14, 116, 144, 0.5));
}

.dark .signal-icon {
  color: #22d3ee;
  filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.5));
}

.dark .signal-pulse {
  border-color: rgba(34, 211, 238, 0.5);
}

/* ── Copy block ── */
.signal-copy {
  flex: 1;
  min-width: 0;
}

.signal-headline {
  margin: 0 0 6px !important;
  font-size: 1.75rem !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
  letter-spacing: -0.03em !important;
  color: #0c5e75 !important;
}

.dark .signal-headline {
  color: #e0f7ff !important;
}

.signal-subtitle {
  margin: 0 0 10px !important;
  font-size: 0.9rem !important;
  color: var(--secondary) !important;
  line-height: 1.6 !important;
}

.signal-proof {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  background: rgba(14, 116, 144, 0.08);
  border: 1px solid rgba(14, 116, 144, 0.15);
  font-size: 0.78rem;
  font-weight: 600;
  color: #0e7490;
  letter-spacing: 0.01em;
}

.dark .signal-proof {
  background: rgba(34, 211, 238, 0.08);
  border-color: rgba(34, 211, 238, 0.18);
  color: #67e8f9;
}

/* ── Right column ── */
.signal-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
  width: 210px;
}

.signal-actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
  width: 100%;
}

.signal-no-spam {
  margin: 0;
  font-size: 0.72rem;
  color: var(--secondary);
  text-align: right;
  opacity: 0.75;
}

/* ── Panel hidden state ── */
.rss-subscribe-card__panel[hidden] {
  display: none !important;
}

/* ── Panel inner section ── */
.rss-subscribe-card__section {
  position: relative;
  z-index: 1;
  padding: 28px 30px;
  border-top: 1px solid rgba(14, 116, 144, 0.12);
}

.dark .rss-subscribe-card__section {
  border-top-color: rgba(34, 211, 238, 0.1);
}

.rss-subscribe-card__section h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 700 !important;
  letter-spacing: -0.01em;
  color: #0e7490;
}

.dark .rss-subscribe-card__section h3 {
  color: #22d3ee;
}

.rss-subscribe-card__panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.rss-subscribe-card__section p {
  margin: 0 0 18px;
  color: var(--secondary);
  font-size: 0.9rem;
  line-height: 1.65;
}

.rss-subscribe-card__back {
  border: 0;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(14, 116, 144, 0.08);
  color: #0e7490;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.rss-subscribe-card__back:hover {
  background: rgba(14, 116, 144, 0.16);
  color: #0c5e75;
}

.dark .rss-subscribe-card__back {
  background: rgba(34, 211, 238, 0.1);
  color: #22d3ee;
}

.dark .rss-subscribe-card__back:hover {
  background: rgba(34, 211, 238, 0.2);
  color: #67e8f9;
}

/* Kill PaperMod h3 decorators inside this card */
.rss-subscribe-card h3::before {
  content: none !important;
  display: none !important;
}

/* ── Subscribe Buttons ── */
.rss-subscribe-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 22px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #0e7490 0%, #0891b2 100%);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  box-shadow: 0 3px 14px rgba(14, 116, 144, 0.28);
  white-space: nowrap;
}

.rss-subscribe-button:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #0891b2 0%, #14b8a6 100%);
  box-shadow: 0 8px 24px rgba(14, 116, 144, 0.35);
}

.rss-subscribe-button--ghost {
  background: transparent;
  color: #0e7490;
  border: 1.5px solid rgba(14, 116, 144, 0.28);
  border-radius: 999px;
  box-shadow: none;
}

.rss-subscribe-button--ghost:hover {
  background: rgba(14, 116, 144, 0.08);
  border-color: rgba(14, 116, 144, 0.45);
  color: #0c5e75;
  box-shadow: none;
  transform: translateY(-1px);
}

.dark .rss-subscribe-button--ghost {
  color: #22d3ee;
  border-color: rgba(34, 211, 238, 0.25);
}

.dark .rss-subscribe-button--ghost:hover {
  background: rgba(34, 211, 238, 0.08);
  border-color: rgba(34, 211, 238, 0.45);
  color: #67e8f9;
}

.rss-subscribe-button svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* ── Channel list (subscribe by section, JSON Feed, OPML) ── */
.rss-channels {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--border, rgba(148, 163, 184, 0.25));
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rss-channels__label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--secondary, #94a3b8);
  margin: 0 0 6px;
}

.rss-channels__row {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 8px;
  transition: background 0.12s ease;
}
.rss-channels__row:hover {
  background: rgba(148, 163, 184, 0.08);
}

.rss-channels__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ch-color, #94a3b8);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.04);
}

.rss-channels__name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--primary);
  letter-spacing: 0.005em;
}
.rss-channels__name--link {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.12s ease;
}
.rss-channels__name--link:hover {
  color: var(--ch-color, #f97316);
}

.rss-channels__formats {
  display: inline-flex;
  gap: 4px;
}

.rss-channels__chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--secondary, #64748b);
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid transparent;
  transition: color 0.12s ease, background 0.12s ease, border-color 0.12s ease;
  min-width: 38px;
  line-height: 1.4;
}
.rss-channels__chip:hover {
  background: rgba(148, 163, 184, 0.18);
  border-color: currentColor;
}
.rss-channels__chip--rss:hover  { color: #f97316; }
.rss-channels__chip--json:hover { color: #3b82f6; }
.rss-channels__chip--opml:hover { color: #a855f7; }

.dark .rss-channels__chip {
  background: rgba(148, 163, 184, 0.12);
  color: var(--secondary);
}
.dark .rss-channels__chip:hover {
  background: rgba(148, 163, 184, 0.22);
}

@media (max-width: 480px) {
  .rss-channels__row  { padding: 5px 6px; gap: 8px; }
  .rss-channels__name { font-size: 0.8rem; }
  .rss-channels__chip { padding: 2px 7px; min-width: 34px; font-size: 0.6rem; }
}

/* ── Newsletter Form ── */
.newsletter-form {
  display: grid;
  gap: 14px;
}

.newsletter-form__field {
  display: grid;
  gap: 6px;
}

.newsletter-form__label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.newsletter-form__input,
.newsletter-form__select {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--theme) 94%, white 6%);
  color: var(--primary);
  font-size: 0.9rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.newsletter-form__input:focus,
.newsletter-form__select:focus {
  outline: none;
  border-color: #0e7490;
  box-shadow: 0 0 0 3px rgba(14, 116, 144, 0.14);
}

.newsletter-form__checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--secondary);
}

.newsletter-form__checkbox input[type="checkbox"] {
  margin-top: 4px;
  accent-color: #0e7490;
}

.newsletter-form__honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

.newsletter-form__submit {
  width: 100%;
}

.newsletter-form__submit[disabled] {
  opacity: 0.7;
  cursor: wait;
}

.newsletter-form__status {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--secondary);
}

.newsletter-form__status[data-state="success"] { color: #15803d; }
.newsletter-form__status[data-state="warning"]  { color: #b45309; }
.newsletter-form__status[data-state="error"]    { color: #b91c1c; }

/* ── Desktop: wider newsletter form layout ── */
@media (min-width: 860px) {
  .newsletter-form {
    grid-template-columns: minmax(0, 1.6fr) minmax(180px, 0.8fr);
    align-items: end;
  }

  .newsletter-form__checkbox,
  .newsletter-form__status,
  .newsletter-form__submit {
    grid-column: 1 / -1;
  }

  /* Two-column teaser on wider panels */
  .signal-right {
    min-width: 200px;
  }

  .signal-actions .rss-subscribe-button {
    width: 100%;
  }
}

/* ── Mobile: stack everything vertically ── */
@media (max-width: 640px) {
  .rss-subscribe-card__teaser {
    flex-direction: column;
    padding: 24px 20px;
    gap: 20px;
  }

  .signal-left {
    flex-direction: row;
    align-items: flex-start;
    width: 100%;
  }

  .signal-icon-wrap {
    width: 46px;
    height: 46px;
  }

  .signal-icon {
    width: 22px;
    height: 22px;
  }

  .signal-headline {
    font-size: 1.3rem !important;
  }

  .signal-right {
    width: 100%;
    align-items: stretch;
  }

  .signal-actions {
    flex-direction: column;
  }

  .signal-actions .rss-subscribe-button {
    width: 100%;
  }

  .signal-no-spam {
    text-align: center;
  }

  .rss-subscribe-card__section {
    padding: 22px 20px;
  }

  .rss-subscribe-card__panel-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
}

/* ===================================
   Compact RSS Icon (for footer or minimal placement)
   =================================== */

.rss-icon-compact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(14, 116, 144, 0.1), rgba(20, 184, 166, 0.1));
  color: #0e7490;
  font-size: 1.2rem;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(14, 116, 144, 0.2);
}

.rss-icon-compact:hover {
  background: linear-gradient(135deg, rgba(14, 116, 144, 0.2), rgba(20, 184, 166, 0.2));
  color: #0c5e75;
  border-color: rgba(14, 116, 144, 0.4);
  transform: scale(1.1) rotate(15deg);
  box-shadow: 0 4px 12px rgba(14, 116, 144, 0.25);
}

.dark .rss-icon-compact {
  background: linear-gradient(135deg, rgba(14, 116, 144, 0.15), rgba(20, 184, 166, 0.15));
  color: #22d3ee;
  border-color: rgba(34, 211, 238, 0.3);
}

.dark .rss-icon-compact:hover {
  background: linear-gradient(135deg, rgba(14, 116, 144, 0.25), rgba(20, 184, 166, 0.25));
  color: #67e8f9;
  border-color: rgba(34, 211, 238, 0.5);
  box-shadow: 0 4px 16px rgba(14, 116, 144, 0.35);
}

/* ===================================
   RSS Panel in Bento Grid
   =================================== */

.profile_panel--rss {
  padding: 0;
  overflow: hidden;
  background: linear-gradient(145deg, #ffffff 0%, #fafafa 100%);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06), 0 1px 4px rgba(15, 23, 42, 0.04);
}

.profile_panel--rss:hover {
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 8px 40px rgba(15, 23, 42, 0.1), 0 2px 8px rgba(15, 23, 42, 0.06);
}

.dark .profile_panel--rss {
  background: linear-gradient(145deg, #1e2535 0%, #161d2d 100%);
  border-color: rgba(255, 255, 255, 0.08);
}

.dark .profile_panel--rss:hover {
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 8px 40px rgba(15, 23, 42, 0.32);
}

/* ===================================
   AI Chat Context Indicator
   =================================== */

.blog-ai-context-indicator {
  font-size: 0.75rem;
  color: #94a3b8;
  text-align: center;
  padding: 8px;
  background: rgba(148, 163, 184, 0.1);
  border-radius: 8px;
  margin: 8px 0;
  animation: contextFadeIn 0.3s ease;
}

@keyframes contextFadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dark .blog-ai-context-indicator {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e0;
}

/* ===================================
   Profile Knowledge Grid Layout
   =================================== */

.profile_knowledge_grid {
    grid-column: 1 / -1;                                  /* 在父 grid 中跨满 12 列 */
    display: grid;
    grid-template-columns: repeat(2, 1fr);                /* 内部 2 列布局 */
    gap: 20px;
    margin-top: 24px;
}

@media (max-width: 960px) {
    .profile_knowledge_grid {
        grid-column: 1 / -1;
        grid-template-columns: 1fr;                       /* 移动端 1 列 */
    }
}

/* ===================================
   Profile Performance Tuning
   =================================== */

.profile_title,
.profile_panel h2,
.profile_panel h3,
.profile_panel__topline h2,
.profile_panel__topline h3,
.rss-subscribe-card__section h2,
.rss-subscribe-card__section h3 {
  font-weight: 600 !important;
}

/* Normalize H2 size inside profile panels to match original H3 visual size */
.profile_panel h2,
.profile_panel__topline h2 {
  font-size: 1.1rem !important;
  margin: 0 0 4px !important;
  line-height: 1.4 !important;
}

.profile_copy,
.profile_sidecard,
.profile_panel {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.profile_copy {
  background: rgba(255, 255, 255, 0.97);
}

.profile_sidecard {
  background: rgba(255, 255, 255, 0.97);
}

.profile_panel {
  background: rgba(255, 255, 255, 0.98);
}

.dark .profile_copy,
.dark .profile_sidecard {
  background: rgba(22, 25, 36, 0.98);
}

.dark .profile_panel {
  background: rgba(20, 23, 32, 0.99);
}

.profile_terminal__cursor,
.blog-ai-status__dot {
  transform: translateZ(0);
}

/* ===================================
   Reading Experience Optimizations
   =================================== */

/* 1. Sticky Navigation with Glass Effect */
.header-wrapper {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(249, 249, 247, 0.82);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--color-rule, rgba(30, 35, 30, 0.08));
    transition: background-color 200ms ease, border-color 200ms ease;
}

.dark .header-wrapper {
    background: rgba(18, 20, 19, 0.88);
    border-bottom-color: rgba(226, 227, 225, 0.08);
}

/* Main Navigation Container */
.nav {
    gap: 16px;
    position: relative;
    z-index: 1;
}

/* 3. Image Height Optimization */
.post-content img {
    max-height: 500px;
    max-width: 100%;
    width: auto;
    object-fit: cover;
    margin: 1.5rem auto;
    display: block;
    border-radius: 4px;
}

/* SVGs are diagrams, not photos — don't crop, don't cap height, let them
   breathe to the full content width. The src$=".svg" hook is selector-only;
   the image-lightbox JS overwrites role="img" → role="button", so don't
   match on role here. */
.post-content img[src$=".svg"],
.post-content img[src*=".svg?"] {
    max-height: none !important;
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    border-radius: 8px;
}

/* Allow users to override with data attributes */
.post-content img[data-full-height="true"] {
    max-height: none;
    object-fit: contain;
}

/* For images that should be full width but constrained height */
.post-content figure img {
    max-height: 500px;
    object-fit: cover;
}

/* ===================================
   Post Header — Editorial Rhythm
   =================================== */

.post-header {
    padding-bottom: 0;
    margin-bottom: var(--space-10);
}

.post-header .breadcrumbs {
    margin-bottom: var(--space-6);
    opacity: 0.65;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    letter-spacing: 0.02em;
}

.post-title {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin: 0 0 var(--space-5);
    font-variation-settings: "opsz" 96;
    color: var(--color-text-heading);
}

/* post-description — see article-typography.css */

.post-meta {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    color: var(--secondary);
    opacity: 0.7;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-variant-numeric: tabular-nums;
    margin-bottom: 0;
}

.post-meta a {
    color: inherit;
    border-bottom: 1px solid currentColor;
    opacity: 0.8;
}

/* Separator line below header — hairline */
.post-header-rule {
    height: 1px;
    background: var(--border);
    margin-top: var(--space-8);
    opacity: 0.4;
}

/* ===================================
   Cover Image — 16:9 with rounded corners (aesthetic design)
   =================================== */
.post-single .entry-cover {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--radius-md, 8px);
    margin: 0 0 var(--space-16) 0;
    background: var(--color-accent-soft, #dde5da);
}

.post-single .entry-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md, 8px);
    margin: 0;
    max-height: none;
}

.post-single .entry-cover p {
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 0.7rem;
    text-align: center;
    color: var(--color-ink-muted, #5e5e63);
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-top: 0.75rem;
}

/* ===================================
   Reading Content Width (US-013)
   =================================== */

/* Article body: 760px for readable ~72ch line length on desktop.
   Images and code blocks bleed out to a wider column via negative margins. */
@media (min-width: 900px) {
    /* Constrain prose elements to readable width */
    .post-single .post-content > p,
    .post-single .post-content > ul,
    .post-single .post-content > ol,
    .post-single .post-content > blockquote,
    .post-single .post-content > table,
    .post-single .post-content > h1,
    .post-single .post-content > h2,
    .post-single .post-content > h3,
    .post-single .post-content > h4,
    .post-single .post-content > h5,
    .post-single .post-content > h6 {
        max-width: 760px;
    }

    /* Images may bleed wider for visual impact; code blocks stay aligned
       with the prose column so they don't feel oversized. */
    .post-single .post-content > figure {
        max-width: 960px;
    }

    .post-single .post-content > .highlight,
    .post-single .post-content > pre {
        max-width: 760px;
    }
}


/* Legacy left TOC fully retired */
.toc-sidebar {
    display: none !important;
}

/* ===================================
   Inline TOC — Fine-line Style (mobile / < 1500px)
   =================================== */

.toc-inline {
    display: none; /* hidden by default, shown on small screens */
    margin: 0 0 40px;
    padding-left: 20px;
    border-left: 1.5px solid var(--border);
}

.toc-inline__label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--secondary);
    opacity: 0.6;
    margin-bottom: 12px;
}

.toc-inline ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-inline__item {
    margin: 0;
}

.toc-inline__item a {
    display: block;
    font-size: 0.88rem;
    color: var(--secondary);
    text-decoration: none;
    padding: 4px 0;
    line-height: 1.45;
    transition: color 0.15s;
}

.toc-inline__item a:hover {
    color: var(--primary);
}

.toc-inline__item--h3 { padding-left: 14px; }
.toc-inline__item--h4 { padding-left: 28px; }
.toc-inline__item--h5 { padding-left: 42px; }

/* Show inline TOC only when three-column layout is NOT active (< 1280px) */
@media (max-width: 1279px) {
    .toc-inline {
        display: block;
    }
}

/* ≥1280px: editorial-tools panel handles TOC; hide the floating reading-companion from toc.html */
@media (min-width: 1280px) {
    .reading-companion:not(.editorial-tools-panel) {
        display: none !important;
    }
}

/* ===================================
   Reading Companion Panel — Typographic Style
   =================================== */

@media (min-width: 1500px) {
    /* Hide inline TOC */
    .toc-inline {
        display: none;
    }

    /* ── Panel Shell: no box, just typography (floating RC, ≥1500px only) ── */
    /* .editorial-tools-panel is controlled by the grid (article-layout.css), never fixed */
    .reading-companion:not(.editorial-tools-panel) {
        display: none !important;
    }

    /* ── Tab Bar: minimal underline style ── */
    .rc-tabs {
        display: flex;
        flex-shrink: 0;
        border-bottom: 1px solid var(--border);
        opacity: 0.9;
    }
    .rc-tab {
        flex: 1;
        padding: 0 4px 10px;
        font-size: 0.7rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        color: var(--secondary);
        background: none;
        border: none;
        border-bottom: 1.5px solid transparent;
        margin-bottom: -1px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 5px;
        transition: color 0.2s, border-color 0.2s;
    }
    .rc-tab svg {
        width: 13px;
        height: 13px;
        flex-shrink: 0;
        stroke-width: 1.75;
        opacity: 0.7;
    }
    .rc-tab:hover {
        color: var(--primary);
    }
    .rc-tab--active {
        color: var(--primary);
        border-bottom-color: var(--primary);
    }
    .rc-tab--active svg {
        opacity: 1;
    }

    /* ── Panels ── */
    .rc-panel {
        flex: 1;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        min-height: 0;
    }
    .rc-panel[hidden] {
        display: none !important;
    }

    /* ── TOC Panel: fine-line typographic nav ── */
    #rc-panel-toc {
        overflow-y: auto;
        padding: 16px 0 14px;
        scroll-behavior: smooth;
        scrollbar-width: none; /* hide scrollbar for clean look */
    }
    #rc-panel-toc::-webkit-scrollbar {
        display: none;
    }

    .toc-side__nav ul {
        list-style: none;
        padding: 0;
        margin: 0;
        border-left: 1.5px solid var(--border);
        padding-left: 16px;
    }

    .toc-item {
        margin: 0;
    }

    .toc-item--h3,
    .toc-item--h4 {
        padding-left: 12px;
    }

    .toc-side__nav a {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        padding: 4px 0;
        font-size: 0.8rem;
        color: var(--secondary);
        text-decoration: none;
        line-height: 1.5;
        transition: color 0.15s;
        opacity: 0.7;
    }
    .toc-side__nav a:hover {
        color: var(--primary);
        opacity: 1;
    }

    /* Active TOC item: vertical line accent */
    .toc-side__nav a.toc-active {
        color: var(--primary);
        opacity: 1;
        font-weight: 500;
    }

    .rc-empty {
        font-size: 0.75rem;
        color: var(--secondary);
        padding: 16px 0;
        margin: 0;
        opacity: 0.6;
    }

    /* ── AI Panel ── */
    .rc-ai-panel {
        display: flex;
        flex-direction: column;
        flex: 1;
        min-height: 0;
        padding: 14px 0 10px;
        gap: 10px;
    }

    /* Quick chips: minimal pill style */
    .rc-ai-quick {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
        flex-shrink: 0;
    }
    .rc-ai-chip {
        font-size: 0.7rem;
        line-height: 1.3;
        padding: 4px 9px;
        border-radius: 3px;
        border: 1px solid var(--border);
        background: transparent;
        color: var(--secondary);
        cursor: pointer;
        transition: background 0.15s, border-color 0.15s, color 0.15s;
        font-family: inherit;
        opacity: 0.8;
    }
    .rc-ai-chip:hover {
        background: rgba(128, 128, 128, 0.08);
        border-color: var(--primary);
        color: var(--primary);
        opacity: 1;
    }

    /* Messages area */
    .rc-ai-messages {
        flex: 1;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        gap: 8px;
        min-height: 0;
        scrollbar-width: thin;
        scrollbar-color: rgba(148, 163, 184, 0.2) transparent;
    }

    .rc-ai-msg {
        font-size: 0.78rem;
        line-height: 1.65;
        padding: 7px 10px;
        border-radius: 4px;
        animation: rc-fade-in 0.22s ease;
        word-break: break-word;
    }
    .rc-ai-msg p {
        margin: 0 0 5px;
    }
    .rc-ai-msg p:last-child {
        margin-bottom: 0;
    }
    .rc-ai-msg code {
        font-size: 0.7rem;
        background: rgba(0,0,0,0.06);
        padding: 1px 4px;
        border-radius: 2px;
    }
    .dark .rc-ai-msg code {
        background: rgba(255,255,255,0.1);
    }

    @keyframes rc-fade-in {
        from { opacity: 0; transform: translateY(4px); }
        to   { opacity: 1; transform: translateY(0); }
    }

    .rc-ai-msg--user {
        align-self: flex-end;
        background: var(--primary);
        color: var(--theme);
        max-width: 88%;
    }
    .rc-ai-msg--ai {
        align-self: flex-start;
        background: rgba(0, 0, 0, 0.035);
        color: var(--content);
        border-left: 2px solid var(--border);
        border-radius: 0 4px 4px 0;
        max-width: 96%;
    }
    .dark .rc-ai-msg--ai {
        background: rgba(255, 255, 255, 0.04);
        border-left-color: rgba(255, 255, 255, 0.12);
    }

    /* Loading dots */
    .rc-ai-loading {
        display: flex;
        align-items: center;
        gap: 4px;
        padding: 3px 0;
        flex-shrink: 0;
    }
    .rc-ai-loading[hidden] {
        display: none !important;
    }
    .rc-ai-dot {
        width: 5px;
        height: 5px;
        border-radius: 50%;
        background: var(--secondary);
        animation: rc-bounce 1.3s ease-in-out infinite;
        flex-shrink: 0;
    }
    .rc-ai-dot:nth-child(2) { animation-delay: 0.15s; }
    .rc-ai-dot:nth-child(3) { animation-delay: 0.3s; }
    .rc-ai-loading-text {
        font-size: 0.7rem;
        color: var(--secondary);
        margin-left: 3px;
        opacity: 0.7;
    }
    @keyframes rc-bounce {
        0%, 80%, 100% { transform: scale(0.55); opacity: 0.35; }
        40%           { transform: scale(1.0);  opacity: 1; }
    }

    /* Input area */
    .rc-ai-input-area {
        display: flex;
        gap: 5px;
        align-items: flex-end;
        flex-shrink: 0;
        border-top: 1px solid var(--border);
        padding-top: 10px;
    }
    .rc-ai-textarea {
        flex: 1;
        resize: none;
        border: none;
        border-bottom: 1.5px solid var(--border);
        border-radius: 0;
        padding: 5px 2px;
        font-size: 0.78rem;
        font-family: inherit;
        background: transparent;
        color: var(--primary);
        line-height: 1.5;
        transition: border-color 0.18s;
        overflow-y: hidden;
    }
    .rc-ai-textarea::placeholder {
        color: var(--secondary);
        opacity: 0.5;
    }
    .rc-ai-textarea:focus {
        outline: none;
        border-bottom-color: var(--primary);
    }
    .rc-ai-send {
        width: 26px;
        height: 26px;
        flex-shrink: 0;
        border-radius: 3px;
        border: 1px solid var(--border);
        background: transparent;
        color: var(--secondary);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.15s, color 0.15s, border-color 0.15s;
    }
    .rc-ai-send:hover {
        background: var(--primary);
        color: var(--theme);
        border-color: var(--primary);
    }
    .rc-ai-send:disabled {
        opacity: 0.35;
        cursor: not-allowed;
    }
    .rc-ai-send svg {
        width: 12px;
        height: 12px;
        stroke-width: 2;
    }
}

/* Smooth scroll for anchor links */
html {
    scroll-behavior: smooth;
    /* Fallback (72px ≈ sticky header height) keeps anchored jumps clear of
       the bar even before/without the JS that measures --header-height. */
    scroll-padding-top: calc(var(--header-height, 72px) + 20px);
}

/* ===================================
   Reading Progress Bar - Elegant Style
   =================================== */

.reading-progress-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #0891b2, #14b8a6, #2dd4bf);
    z-index: 1000;
    transition: width 0.1s ease-out;
    box-shadow: 0 0 10px rgba(8, 145, 178, 0.5);
    /* Soft, rounded leading edge so the bar reads as a moving cue. */
    border-top-right-radius: 3px;
    border-bottom-right-radius: 3px;
}

/* A brighter glow concentrated at the leading tip, so the eye tracks
   the progress edge rather than the whole bar. Hidden at 0% width. */
.reading-progress-bar::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 0;
    width: 16px;
    height: 16px;
    transform: translate(50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(45, 212, 191, 0.85) 0%, rgba(45, 212, 191, 0) 70%);
    pointer-events: none;
}

.dark .reading-progress-bar {
    background: linear-gradient(90deg, #14b8a6, #2dd4bf, #5eead4);
    box-shadow: 0 0 10px rgba(20, 184, 166, 0.6);
}
.dark .reading-progress-bar::after {
    background: radial-gradient(circle, rgba(94, 234, 212, 0.9) 0%, rgba(94, 234, 212, 0) 70%);
}

@media (max-width: 1023px) {
    /* Keep the reading-progress bar on mobile: it is the clearest
       scroll-feedback cue on a phone. Pin it to the top, just under
       the sticky header, and make it a touch thinner. */
    .reading-progress-bar {
        top: 0;
        bottom: auto;
        height: 2.5px;
    }

    .top-link {
        display: none !important;
    }
}

/* Heading anchor styles */
.post-content h2:hover .anchor,
.post-content h3:hover .anchor,
.post-content h4:hover .anchor {
    opacity: 1;
}

.post-content .anchor {
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* ===================================
   Homepage 2.0 Aesthetic Upgrades
   =================================== */

/* 1. Typography Hierarchy - Hero Title */
.profile_title {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    letter-spacing: normal;
}

.profile_title__name {
    font-size: 2.8rem !important;
    font-weight: 700 !important;
    margin: 0 !important;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.profile_title__accent {
    font-size: 1.6rem !important;
    color: #0e7490 !important;
    opacity: 0.85;
    font-weight: 400 !important;
}

/* Terminal/Typing text - Chinese font fix */
.profile_terminal {
    font-family: inherit !important;
    margin-bottom: 1.5rem;
}

.profile_terminal__prompt {
    font-family: 'Fira Code', 'JetBrains Mono', monospace;
    color: #0e7490;
    font-weight: 600;
}

#profile-typing-text {
    font-family: inherit !important;
    font-weight: 500;
}

/* 2. Circular Avatar & Sidebar Mini-Grid */
.profile_avatar {
    width: 140px;
    height: 140px;
    margin: 0 auto 24px;
    border-radius: 50% !important;
    overflow: hidden;
    border: 3px solid #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.profile_avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 50% !important;
}

.profile_metrics--grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 0 10px;
}

.profile_metric--reading {
    grid-column: 1 / -1;
    background: rgba(14, 116, 144, 0.05);
    padding: 12px;
    border-radius: 12px;
    border-left: 3px solid #0e7490;
}

.profile_metric__label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--secondary);
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
}

.profile_metric__value {
    font-size: 0.88rem;
    color: var(--primary);
    font-weight: 600;
}

.profile_metric__status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}

.profile_metric__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0e7490;
    box-shadow: 0 0 8px rgba(14, 116, 144, 0.5);
    animation: pulse-teal 2s infinite;
}

@keyframes pulse-teal {
    0% { transform: scale(0.9); opacity: 0.6; }
    50% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.6; }
}

/* 3. Spacing & Section Accents */
.profile-home .profile_bento,
.profile-home .profile_knowledge_grid {
    margin-top: 40px !important;
}

.profile_panel {
    border-top: 3px solid transparent !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s, box-shadow 0.3s;
}

.profile_panel:hover {
    transform: translateY(-2px);
}

.profile_panel--ai-tech { border-top-color: #0e7490 !important; }
.profile_panel--growth-life { border-top-color: #ea580c !important; }
.profile_panel--chat { border-top-color: #0e7490 !important; }
.profile_panel--rss { border-top-color: #0e7490 !important; }

/* Grid Background Polish - softer gradient fade */
.profile-home::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    background-image: radial-gradient(circle at 2px 2px, rgba(148, 163, 184, 0.08) 1px, transparent 0);
    background-size: 32px 32px;
    mask-image: radial-gradient(ellipse at center, black 50%, transparent 90%);
    z-index: -1;
}

/* 4. Featured Article Visuals */
.profile_posts {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.profile_post {
    display: block;
    padding: 14px 16px;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 12px;
    transition: all 0.25s ease;
    text-decoration: none;
}

.profile_post:hover {
    border-color: rgba(14, 116, 144, 0.3);
    background: rgba(14, 116, 144, 0.03);
    transform: translateX(4px);
}

.dark .profile_post {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(148, 163, 184, 0.12);
}

.dark .profile_post:hover {
    background: rgba(14, 116, 144, 0.08);
    border-color: rgba(14, 116, 144, 0.35);
}

.profile_post__date {
    font-size: 0.72rem;
    color: #94a3b8;
    display: block;
    margin-bottom: 6px;
}

.profile_post strong {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 600;
    line-height: 1.4;
    display: block;
}

.profile_post--featured {
    background: linear-gradient(135deg, rgba(14, 116, 144, 0.05), rgba(255, 255, 255, 1)) !important;
    padding: 20px !important;
    border: 1px solid rgba(14, 116, 144, 0.15) !important;
    border-radius: 14px !important;
    display: flex !important;
    flex-direction: column;
    gap: 8px;
}

.profile_post--featured:hover {
    background: linear-gradient(135deg, rgba(14, 116, 144, 0.1), rgba(255, 255, 255, 1)) !important;
    border-color: rgba(14, 116, 144, 0.25) !important;
    transform: translateY(-2px);
}

.dark .profile_post--featured {
    background: linear-gradient(135deg, rgba(14, 116, 144, 0.12), rgba(30, 41, 59, 0.8)) !important;
}

.profile_post--featured strong {
    font-size: 1.1rem !important;
    color: #0e7490 !important;
    font-weight: 700 !important;
}

.profile_post__summary {
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.65;
    margin: 6px 0 0;
    display: block;
}

.dark .profile_post__summary {
    color: #94a3b8;
}

/* View More Button - Ghost Button Style */
.profile_view_more {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 8px 24px !important;
    border-radius: 99px !important;
    border: 1.5px solid rgba(14, 116, 144, 0.35) !important;
    color: #0e7490 !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    margin-top: 8px;
    font-size: 0.78rem !important;
    letter-spacing: 0.03em;
    background: transparent !important;
    align-self: flex-start;
}

.profile_view_more:hover {
    background: rgba(14, 116, 144, 0.08) !important;
    border-color: #0e7490 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14, 116, 144, 0.15);
}

/* 5. Color Consistency - unify button colors */
.blog-ai-submit,
.blog-ai-submit:hover {
    background: linear-gradient(135deg, #0e7490, #14b8a6) !important;
    border: none !important;
}

/* 6. Navigation Improvements - Single Row Layout */
.nav {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;
    flex-wrap: nowrap !important;
}

.logo {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

#menu {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    flex: 1 !important;
    justify-content: center !important;
    margin: 0 auto !important;
}

#menu > li > a {
    padding: 8px 12px !important;
    transition: all 0.2s ease !important;
    border-radius: 8px;
    display: inline-flex !important;
    align-items: center !important;
    font-size: 14px !important;
    color: inherit !important;
}

#menu > li > a:hover {
    color: #0e7490 !important;
    background: rgba(14, 116, 144, 0.06);
}

.logo-switches {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

/* RSS Button - Toned down, consistent with theme */
#menu > li > a[href$="index.xml"] {
    background: transparent !important;
    color: var(--color-primary) !important;
    border: 1px solid rgba(234, 88, 12, 0.3) !important;
    font-weight: 500 !important;
    padding: 6px 12px !important;
    border-radius: 6px !important;
}

#menu > li > a[href$="index.xml"]:hover {
    background: rgba(234, 88, 12, 0.08) !important;
    border-color: rgba(234, 88, 12, 0.5) !important;
    transform: none !important;
}

/* External Link Icon Alignment */
.nav svg, .buttons svg {
    vertical-align: middle !important;
    margin-top: -2px;
}

/* Responsive Navigation */
@media (max-width: 1024px) {
    .nav {
        flex-wrap: wrap !important;
        gap: 12px !important;
    }

    #menu {
        order: 3;
        width: 100% !important;
        justify-content: flex-start !important;
        overflow-x: visible !important;
        padding-bottom: 8px !important;
        scrollbar-width: none !important;
    }

    #menu::-webkit-scrollbar {
        display: none !important;
    }

    .logo-switches {
        margin-left: auto !important;
    }
}

@media (max-width: 768px) {
    .nav {
        flex-wrap: nowrap !important;
    }

    #menu {
        display: none !important;
    }

    #menu.mobile-open {
        display: flex !important;
        flex-direction: column !important;
        position: absolute !important;
        top: 64px !important;
        right: 16px !important;
        left: 16px !important;
        background: var(--theme) !important;
        border: 1px solid var(--border) !important;
        border-radius: 14px !important;
        padding: 12px !important;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
        z-index: 1000 !important;
        gap: 4px !important;
        animation: menuSlideDown 0.2s ease;
    }

    @keyframes menuSlideDown {
        from { opacity: 0; transform: translateY(-8px); }
        to { opacity: 1; transform: translateY(0); }
    }

    #menu.mobile-open > li {
        width: 100% !important;
    }

    #menu.mobile-open > li > a {
        width: 100% !important;
        justify-content: flex-start !important;
        padding: 12px 16px !important;
        border-radius: 10px !important;
        font-size: 15px !important;
    }

    #menu.mobile-open > li > a:hover {
        background: rgba(14, 116, 144, 0.06) !important;
    }

    .hamburger-menu {
        display: flex !important;
        align-items: center;
        justify-content: center;
        order: 99;
    }

    .logo-switches {
        gap: 8px !important;
    }

    .nav-search-trigger__label {
        display: none !important;
    }
}

/* 7. Hero Section Layout - Balance Left/Right */
.profile_hero {
    display: grid;
    grid-template-columns: 62% 35%;
    gap: 3%;
    align-items: stretch;
}

@media (max-width: 960px) {
    .profile_hero {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* Sidecard compact spacing */
.profile_sidecard {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 24px 20px !important;
}

/* 8. AI Chat Section - Higher Priority Visual */
.profile_panel--chat {
    background: linear-gradient(135deg, rgba(14, 116, 144, 0.02), rgba(255, 255, 255, 1));
    border: 1.5px solid rgba(14, 116, 144, 0.12) !important;
}

.dark .profile_panel--chat {
    background: linear-gradient(135deg, rgba(14, 116, 144, 0.08), rgba(22, 27, 40, 0.9));
    border-color: rgba(14, 116, 144, 0.2) !important;
}

/* ===================================
   P1: Color System & Navigation Cleanup
   =================================== */

/* Unified Color Variables */
:root {
    --color-primary: #0e7490;        /* Teal - Primary CTA */
    --color-primary-hover: #0c5e75;
    --color-accent: #14b8a6;         /* Teal Light - Accent */
    --color-accent-hover: #0891b2;
}

/* Hide AI Chat when Offline - prevent useless UI element */
.blog-ai-status--offline + .blog-ai-welcome,
.blog-ai-inline:has(.blog-ai-status--offline) {
    display: none !important;
}

/* Fallback: If offline, show minimal message or hide completely */
.blog-ai-inline.offline-hidden {
    display: none !important;
}

/* ===================================
   Recent Writing Links in Profile Card
   =================================== */

.profile_recent-posts {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.profile_recent-post {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 0.8rem;
    color: #64748b;
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 5px 8px;
    border-radius: 8px;
    line-height: 1.4;
}

.profile_recent-post:hover {
    color: #0e7490;
    background: rgba(14, 116, 144, 0.05);
    transform: translateX(3px);
}

.profile_recent-post__date {
    font-size: 0.68rem;
    color: #94a3b8;
    white-space: nowrap;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    flex-shrink: 0;
}

.profile_recent-post__title {
    color: inherit;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.dark .profile_recent-post {
    color: #94a3b8;
}

.dark .profile_recent-post:hover {
    color: #22d3ee;
    background: rgba(14, 116, 144, 0.08);
}

/* ===================================
   P2: Article List Improvements
   =================================== */

/* Tag Filter Bar (for future implementation) */
.posts-list-filter {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.posts-list-filter__tag {
    padding: 6px 14px;
    background: rgba(14, 116, 144, 0.08);
    color: #0e7490;
    border: 1px solid rgba(14, 116, 144, 0.2);
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.posts-list-filter__tag:hover {
    background: rgba(14, 116, 144, 0.15);
    border-color: rgba(14, 116, 144, 0.4);
    transform: translateY(-1px);
}

.posts-list-filter__tag.active {
    background: #0e7490;
    color: white;
    border-color: #0e7490;
}

.dark .posts-list-filter__tag {
    background: rgba(14, 116, 144, 0.15);
    color: #22d3ee;
}

.dark .posts-list-filter__tag:hover {
    background: rgba(14, 116, 144, 0.25);
}

.dark .posts-list-filter__tag.active {
    background: #0891b2;
    color: white;
}

/* Entry Footer Tags - More visible */
.entry-footer {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.entry-footer .post-tag {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(14, 116, 144, 0.08);
    color: #0e7490;
    border: 1px solid rgba(14, 116, 144, 0.15);
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.entry-footer .post-tag:hover {
    background: rgba(14, 116, 144, 0.15);
    border-color: rgba(14, 116, 144, 0.3);
    transform: translateY(-1px);
}

.dark .entry-footer .post-tag {
    background: rgba(14, 116, 144, 0.15);
    color: #22d3ee;
}

.dark .entry-footer .post-tag:hover {
    background: rgba(14, 116, 144, 0.25);
}

/* ===================================
   Navigation Bar Fixes
   =================================== */

/* Fix 1: Remove gray scrollbar line from #menu */
#menu {
    overflow-x: visible !important;
}

#menu::-webkit-scrollbar {
    display: none !important;
}

/* Fix 2: Hide the | separator in lang-switch */
.lang-switch li:first-child:not(:has(a)) {
    display: none !important;
}

/* Fix 3: RSS button - subtle style (remove orange border) */
#menu a[title="RSS"],
#menu li:last-child > a[href*="index.xml"] {
    border: none !important;
    background: transparent !important;
    color: var(--secondary) !important;
    padding: 6px 8px !important;
}

#menu a[title="RSS"]:hover,
#menu li:last-child > a[href*="index.xml"]:hover {
    color: #ea580c !important;
    background: rgba(234, 88, 12, 0.08) !important;
}

/* Fix 4: Prevent navigation logo text wrapping on mobile (#149) */
/* 针对手机端导航栏 Logo 文字竖排问题 */
.logo a {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

@media (max-width: 768px) {
    .logo a,
    .lang-switch a,
    .lang-switch__item,
    .lang-switch li {
        white-space: nowrap !important;
    }

    .logo {
        flex-shrink: 0 !important;
        min-width: 0 !important;
    }
}

/* ===================================
   Accessibility & Mobile Fixes
   =================================== */

/* Skip to main content link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    z-index: 10000;
    padding: 8px 16px;
    background: var(--theme);
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 4px;
    font-size: 14px;
    text-decoration: none;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 8px;
}

/* Fix mobile horizontal overflow.
   Use overflow-x:clip on body (not hidden) so body doesn't become a scroll
   container, which would break position:sticky on .header-wrapper. */
html {
    overflow-x: hidden;
}
body {
    overflow-x: clip;
}

.profile_shell,
.profile_hero,
.profile_bento,
.profile_knowledge_grid {
    max-width: 100%;
    overflow-x: hidden;
}

@media (max-width: 768px) {
    .profile_shell {
        padding-left: 12px;
        padding-right: 12px;
    }

    .profile_bento {
        grid-template-columns: 1fr !important;
    }

    .profile_meta_list div {
        word-break: break-word;
    }

    /* Fix hero text truncation on mobile */
    .profile_title {
        flex-direction: column !important;
        gap: 4px !important;
    }

    .profile_title__name {
        font-size: 1.8rem !important;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .profile_title__accent {
        font-size: 1.2rem !important;
    }

    .profile_summary {
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }

    .profile_terminal {
        word-break: break-word;
        overflow-wrap: break-word;
    }

    /* Fix social icons overflow */
    .social-icons {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        justify-content: flex-start !important;
        max-width: 100%;
    }

    /* Improve touch target sizes on mobile */
    .social-icons a {
        min-width: 44px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .buttons .button {
        min-height: 44px;
        padding: 10px 16px;
    }

    #menu li a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .profile_post {
        padding: 12px;
        min-height: 44px;
    }

    .profile_view_more {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    /* Ensure readable font sizes on mobile */
    .profile_code span,
    .profile_meta_list span,
    .profile_metric__label,
    .profile_status span,
    .profile_status_bar,
    .profile_post__date,
    .profile_terminal__prompt,
    .profile_panel p,
    .rss-subscribe-card__compact-note,
    .rss-subscribe-card__choice {
        font-size: 14px !important;
    }

    .profile_summary,
    .profile_intro,
    .profile_panel p {
        font-size: 15px !important;
        line-height: 1.5;
    }

    /* Larger touch targets for profile links */
    .profile_recent-post {
        min-height: 44px;
        display: flex;
        align-items: center;
        padding: 6px 0;
    }

    .profile_chat_hint {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 8px 12px;
    }

    .rss-subscribe-button,
    .rss-subscribe-card__back {
        min-height: 44px;
        min-width: 44px;
    }

    .logo-switches button {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Lang switch: keep the pill compact on mobile but enlarge the tap target
       via the parent <li> so the visual stays elegant while remaining a11y-safe. */
    .lang-switch__item {
        min-height: 44px;
        align-items: center;
    }
    .lang-switch__item > a,
    .lang-switch__item > span {
        min-height: 28px;
        padding: 0 11px;
    }

    .top-link {
        min-width: 44px;
        min-height: 44px;
    }

    /* Fix specific small touch targets */
    .skip-link {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    .hamburger-menu {
        min-width: 44px;
        min-height: 44px;
    }

    .profile_chat_trigger {
        min-height: 44px;
        padding: 8px 12px !important;
    }

    .profile_chat_send {
        min-height: 44px;
        min-width: 44px;
    }

    .footer a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    /* Fix small font sizes */
    .nav-search-trigger__keys {
        font-size: 14px !important;
    }

    .profile_chat_trigger__label {
        font-size: 14px !important;
    }

    .profile_chat_greeting {
        font-size: 14px !important;
    }

    .profile_chat_hint {
        font-size: 14px !important;
    }

    .profile_panel__icon {
        font-size: 14px !important;
    }

    .profile_view_more {
        font-size: 14px !important;
    }
}

/* ===================================
   P0-1: Archives Page - Timeline Design
   =================================== */

.archives-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Banner */
.archives-hero {
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdfa 40%, #ecfeff 100%);
    border: 1px solid rgba(14, 116, 144, 0.15);
    border-radius: 20px;
    padding: 3rem 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.dark .archives-hero {
    background: linear-gradient(135deg, rgba(14, 116, 144, 0.08) 0%, rgba(20, 184, 166, 0.06) 100%);
    border-color: rgba(14, 116, 144, 0.25);
}

.archives-hero__title {
    font-size: 2rem;
    font-weight: 700 !important;
    background: linear-gradient(135deg, #0e7490, #14b8a6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 8px;
}

.archives-hero__desc {
    color: var(--secondary);
    font-size: 1rem;
    margin: 0 0 24px;
    line-height: 1.6;
}

.archives-hero__stats {
    display: inline-flex;
    align-items: center;
    gap: 24px;
    background: rgba(255, 255, 255, 0.8);
    padding: 16px 32px;
    border-radius: 14px;
    border: 1px solid rgba(14, 116, 144, 0.1);
}

.dark .archives-hero__stats {
    background: rgba(15, 23, 42, 0.5);
    border-color: rgba(14, 116, 144, 0.2);
}

.archives-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.archives-stat__number {
    font-size: 1.8rem;
    font-weight: 700 !important;
    color: #0e7490;
    line-height: 1;
}

.archives-stat__label {
    font-size: 0.78rem;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.archives-stat__divider {
    width: 1px;
    height: 40px;
    background: rgba(14, 116, 144, 0.2);
}

/* Year Quick Navigation */
.archives-year-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
    padding: 10px 16px;
    background: rgba(251, 249, 244, 0.60);
    backdrop-filter: saturate(160%) blur(20px);
    -webkit-backdrop-filter: saturate(160%) blur(20px);
    border: 1px solid rgba(30, 35, 30, 0.08);
    border-radius: 14px;
    box-shadow: 0 1px 12px rgba(0, 0, 0, 0.04);
    position: sticky;
    top: var(--sticky-offset, 72px);
    z-index: 50;
    transition: top 0.25s ease;
}

body.dark .archives-year-nav {
    background: rgba(20, 22, 24, 0.60);
    border-color: rgba(226, 227, 225, 0.08);
    box-shadow: 0 1px 12px rgba(0, 0, 0, 0.20);
}

:root { --sticky-offset: 72px; }
body.nav-hidden { --sticky-offset: 0px; }

.archives-year-nav__label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-right: 4px;
    opacity: 0.6;
}

.archives-year-nav__link {
    padding: 5px 13px;
    border-radius: 99px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary);
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.08);
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.archives-year-nav__link:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.16);
    transform: translateY(-1px);
}

.dark .archives-year-nav__link {
    color: var(--primary);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}

/* Timeline */
.archives-timeline {
    position: relative;
    padding-left: 2px;
}

.archives-timeline::before {
    content: '';
    position: absolute;
    left: 18px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, #0e7490 0%, rgba(14, 116, 144, 0.2) 100%);
    border-radius: 1px;
}

/* Year Section */
.archives-year {
    margin-bottom: 3rem;
}

.archives-year__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.5rem;
    position: relative;
    padding-left: 44px;
}

.archives-year__header::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #0e7490;
    border: 3px solid var(--theme);
    box-shadow: 0 0 0 2px #0e7490, 0 0 12px rgba(14, 116, 144, 0.4);
}

.archives-year__title {
    font-size: 1.6rem;
    font-weight: 700 !important;
    color: var(--primary);
    margin: 0;
    line-height: 1;
}

.archives-year__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 99px;
    background: rgba(14, 116, 144, 0.1);
    color: #0e7490;
    font-size: 0.82rem;
    font-weight: 600;
}

/* Month Section */
.archives-month {
    margin-bottom: 1.5rem;
    padding-left: 44px;
}

.archives-month__title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    font-size: 0.9rem;
    font-weight: 600 !important;
    color: var(--secondary);
}

.archives-month__name {
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.archives-month__count {
    font-size: 0.72rem;
    color: #94a3b8;
    background: rgba(148, 163, 184, 0.1);
    padding: 2px 8px;
    border-radius: 99px;
}

/* Post Entry */
.archives-month__posts {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.archives-post {
    position: relative;
    padding-left: 0;
}

.archives-post__dot {
    position: absolute;
    left: -30px;
    top: 14px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(14, 116, 144, 0.4);
    transition: all 0.2s ease;
}

.archives-post:hover .archives-post__dot {
    background: #0e7490;
    box-shadow: 0 0 8px rgba(14, 116, 144, 0.4);
    transform: scale(1.5);
}

.archives-post__link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.archives-post__link:hover {
    background: rgba(14, 116, 144, 0.04);
    border-color: rgba(14, 116, 144, 0.12);
}

.dark .archives-post__link:hover {
    background: rgba(14, 116, 144, 0.08);
    border-color: rgba(14, 116, 144, 0.2);
}

.archives-post__date {
    font-size: 0.82rem;
    color: #94a3b8;
    font-variant-numeric: tabular-nums;
    min-width: 44px;
    flex-shrink: 0;
}

.archives-post__title {
    font-size: 0.95rem;
    color: var(--primary);
    font-weight: 500;
    line-height: 1.4;
    flex: 1;
}

.archives-post__draft {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    background: rgba(234, 179, 8, 0.15);
    color: #b45309;
    font-weight: 600;
    text-transform: uppercase;
}

.archives-post__tags {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.archives-post__tag {
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 99px;
    background: rgba(14, 116, 144, 0.06);
    color: #0e7490;
    border: 1px solid rgba(14, 116, 144, 0.1);
}

.dark .archives-post__tag {
    background: rgba(14, 116, 144, 0.12);
    color: #22d3ee;
    border-color: rgba(14, 116, 144, 0.2);
}

/* Archives Responsive */
@media (max-width: 640px) {
    .archives-hero {
        padding: 2rem 1.5rem;
        border-radius: 16px;
    }

    .archives-hero__title {
        font-size: 1.5rem;
    }

    .archives-hero__stats {
        padding: 12px 20px;
        gap: 16px;
    }

    .archives-stat__number {
        font-size: 1.4rem;
    }

    .archives-timeline::before {
        left: 12px;
    }

    .archives-year__header {
        padding-left: 36px;
    }

    .archives-year__header::before {
        left: 6px;
        width: 12px;
        height: 12px;
    }

    .archives-month {
        padding-left: 36px;
    }

    .archives-post__dot {
        left: -28px;
    }

    .archives-post__link {
        flex-wrap: wrap;
        gap: 4px 12px;
        padding: 8px 10px;
    }

    .archives-post__tags {
        width: 100%;
        padding-left: 56px;
    }

    .archives-year-nav {
        position: static;
        margin-bottom: 2rem;
    }
}

/* ===================================
   P0-3: Posts List Page - Card Layout
   =================================== */

/* Card-style post entries */
.post-entry {
    background: var(--theme);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.post-entry:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
    border-color: rgba(14, 116, 144, 0.25);
}

.dark .post-entry:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
    border-color: rgba(14, 116, 144, 0.35);
}

.post-entry .entry-header {
    padding: 24px 24px 0;
}

.post-entry .entry-header h2 {
    font-size: 1.15rem;
    font-weight: 600 !important;
    line-height: 1.45;
    margin: 0;
}

.post-entry .entry-content {
    padding: 8px 24px 0;
}

.post-entry .entry-content p {
    color: var(--secondary);
    font-size: 0.9rem;
    line-height: 1.65;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-entry .entry-footer {
    padding: 12px 24px 20px;
    margin-top: 8px;
}

/* First/featured entry - larger card */
.first-entry {
    background: linear-gradient(135deg, rgba(14, 116, 144, 0.04), var(--theme));
    border: 1.5px solid rgba(14, 116, 144, 0.15);
    border-radius: 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(14, 116, 144, 0.06);
}

.first-entry:hover {
    border-color: rgba(14, 116, 144, 0.3);
    box-shadow: 0 16px 40px rgba(14, 116, 144, 0.1);
    transform: translateY(-4px);
}

.dark .first-entry {
    background: linear-gradient(135deg, rgba(14, 116, 144, 0.08), rgba(15, 23, 42, 0.9));
    border-color: rgba(14, 116, 144, 0.25);
}

.first-entry .entry-header h2 {
    font-size: 1.35rem;
    font-weight: 700 !important;
}

.first-entry .entry-content p {
    font-size: 0.95rem;
    -webkit-line-clamp: 3;
}

/* Tag entry (term pages) */
.tag-entry {
    border-left: 3px solid rgba(14, 116, 144, 0.3);
}

.tag-entry:hover {
    border-left-color: #0e7490;
}

/* Post metadata improvements */
.post-entry .post-meta,
.first-entry .post-meta {
    font-size: 0.82rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Pagination styling */
.pagination {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.pagination a {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    border-radius: 10px;
    background: rgba(14, 116, 144, 0.06);
    border: 1px solid rgba(14, 116, 144, 0.15);
    color: #0e7490;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination a:hover {
    background: rgba(14, 116, 144, 0.12);
    border-color: rgba(14, 116, 144, 0.3);
    transform: translateY(-1px);
}

.dark .pagination a {
    color: #22d3ee;
    background: rgba(14, 116, 144, 0.12);
    border-color: rgba(14, 116, 144, 0.25);
}

/* Page header for list pages */
.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.page-header h1 {
    font-size: 1.8rem;
    font-weight: 700 !important;
    margin: 0 0 8px;
}

.page-header .post-description {
    color: var(--secondary);
    font-size: 1rem;
    line-height: 1.6;
}

/* Categories/Tags page - better chip display */
.terms-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 1rem 0;
}

.terms-tags a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 12px;
    background: var(--theme);
    border: 1px solid var(--border);
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.terms-tags a:hover {
    border-color: rgba(14, 116, 144, 0.3);
    background: rgba(14, 116, 144, 0.05);
    color: #0e7490;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.terms-tags a sup {
    font-size: 0.72rem;
    color: #94a3b8;
    font-weight: 600;
}

.dark .terms-tags a:hover {
    color: #22d3ee;
    background: rgba(14, 116, 144, 0.1);
}

/* ===================================
   Posts Page — Filter Bar & Grid
   =================================== */

.posts-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero */
.posts-hero {
    text-align: center;
    padding: 2.5rem 2rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdfa 40%, #ecfeff 100%);
    border: 1px solid rgba(14, 116, 144, 0.12);
    border-radius: 20px;
}

.dark .posts-hero {
    background: linear-gradient(135deg, rgba(14, 116, 144, 0.08) 0%, rgba(20, 184, 166, 0.05) 100%);
    border-color: rgba(14, 116, 144, 0.2);
}

.posts-hero__title {
    font-size: 1.8rem;
    font-weight: 700 !important;
    background: linear-gradient(135deg, #0e7490, #14b8a6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 8px;
}

.posts-hero__desc {
    color: var(--secondary);
    font-size: 0.95rem;
    margin: 0 0 16px;
}

.posts-hero__stats {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
}

.posts-hero__count {
    font-size: 2rem;
    font-weight: 700 !important;
    color: #0e7490;
    line-height: 1;
}

.posts-hero__label {
    font-size: 0.85rem;
    color: var(--secondary);
}

/* Filter Bar */
.posts-filter {
    position: sticky;
    top: 64px;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dark .posts-filter {
    background: rgba(15, 23, 42, 0.88);
    border-color: rgba(148, 163, 184, 0.1);
}

/* Filter sections */
.posts-filter__section {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.posts-filter__section--controls {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: space-between;
}

.posts-filter__label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    min-width: 44px;
    flex-shrink: 0;
}

/* Filter chips */
.posts-filter__chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.posts-filter__chips--tags {
    max-height: 72px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.posts-filter__chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 99px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: transparent;
    color: var(--secondary);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.posts-filter__chip:hover {
    border-color: rgba(14, 116, 144, 0.3);
    color: #0e7490;
    background: rgba(14, 116, 144, 0.04);
}

.posts-filter__chip--active {
    background: rgba(14, 116, 144, 0.1) !important;
    color: #0e7490 !important;
    border-color: rgba(14, 116, 144, 0.3) !important;
    font-weight: 600;
}

.dark .posts-filter__chip {
    border-color: rgba(148, 163, 184, 0.15);
}

.dark .posts-filter__chip:hover {
    border-color: rgba(34, 211, 238, 0.3);
    color: #22d3ee;
    background: rgba(14, 116, 144, 0.08);
}

.dark .posts-filter__chip--active {
    background: rgba(14, 116, 144, 0.2) !important;
    color: #22d3ee !important;
    border-color: rgba(34, 211, 238, 0.35) !important;
}

.posts-filter__chip-count {
    font-size: 0.7rem;
    opacity: 0.6;
}

.posts-filter__chip--tag {
    font-size: 0.78rem;
    padding: 4px 12px;
}

/* Sort select */
.posts-filter__sort {
    display: flex;
    align-items: center;
    gap: 8px;
}

.posts-filter__select {
    padding: 6px 28px 6px 12px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: transparent;
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

.posts-filter__select:focus {
    outline: none;
    border-color: #0e7490;
    box-shadow: 0 0 0 2px rgba(14, 116, 144, 0.1);
}

.dark .posts-filter__select {
    border-color: rgba(148, 163, 184, 0.15);
}

/* Clear button */
.posts-filter__clear {
    padding: 6px 14px;
    border-radius: 99px;
    border: 1px solid rgba(220, 38, 38, 0.2);
    background: rgba(220, 38, 38, 0.06);
    color: #dc2626;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.posts-filter__clear:hover {
    background: rgba(220, 38, 38, 0.12);
    border-color: rgba(220, 38, 38, 0.35);
}

.dark .posts-filter__clear {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.2);
    background: rgba(248, 113, 113, 0.08);
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    position: relative;
    min-height: 200px;
}

/* Entry tags within post cards */
.post-entry__tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 8px;
}

/* Smooth hide transition */
.post-entry {
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.posts-entry--hidden {
    display: none !important;
}

/* Empty state */
.posts-grid--empty::after {
    content: attr(data-no-results);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--secondary);
    font-size: 1rem;
    text-align: center;
    padding: 3rem 2rem;
    opacity: 0.7;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .posts-page {
        padding: 0 12px;
    }

    .posts-hero {
        padding: 1.5rem 1.2rem;
        border-radius: 14px;
    }

    .posts-hero__title {
        font-size: 1.4rem;
    }

    .posts-filter {
        position: static;
        padding: 14px 16px;
        border-radius: 14px;
    }

    .posts-filter__section {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
    }

    .posts-filter__section::-webkit-scrollbar {
        display: none;
    }

    .posts-filter__chips {
        flex-wrap: nowrap;
    }

    .posts-filter__chips--tags {
        max-height: none;
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .posts-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .posts-filter__section--controls {
        flex-wrap: wrap;
    }
}

@media (min-width: 640px) and (max-width: 1024px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===================================
   Posts Page — Card Enhancements (Round 3)
   =================================== */

/* Card top row: badge + date */
.post-entry__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.post-entry__date {
    font-size: 0.78rem;
    color: #94a3b8;
    font-variant-numeric: tabular-nums;
}

/* Section badge */
.posts-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.posts-badge--ai {
    background: rgba(139, 92, 246, 0.1);
    color: #7c3aed;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.posts-badge--growth {
    background: rgba(234, 179, 8, 0.1);
    color: #b45309;
    border: 1px solid rgba(234, 179, 8, 0.2);
}

.posts-badge--projects {
    background: rgba(14, 116, 144, 0.1);
    color: #0e7490;
    border: 1px solid rgba(14, 116, 144, 0.2);
}

.dark .posts-badge--ai {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
    border-color: rgba(139, 92, 246, 0.3);
}

.dark .posts-badge--growth {
    background: rgba(234, 179, 8, 0.12);
    color: #fbbf24;
    border-color: rgba(234, 179, 8, 0.25);
}

.dark .posts-badge--projects {
    background: rgba(14, 116, 144, 0.15);
    color: #22d3ee;
    border-color: rgba(14, 116, 144, 0.3);
}

/* Improved filter section spacing */
.posts-filter__section + .posts-filter__section {
    padding-top: 8px;
    border-top: 1px solid rgba(148, 163, 184, 0.08);
}

/* Empty state — more prominent */
.posts-grid--empty {
    min-height: 300px;
}

.posts-grid--empty::after {
    font-size: 1.1rem;
    opacity: 0.5;
    padding: 4rem 2rem;
}

/* Card hover left-border accent by section (pre-set transparent border to avoid layout shift) */
.posts-grid .post-entry {
    border-left: 3px solid transparent;
}

.posts-grid .post-entry:hover {
    border-left-color: rgba(14, 116, 144, 0.4);
}

.posts-grid .post-entry[data-section="ai-technology"]:hover {
    border-left-color: rgba(139, 92, 246, 0.5);
}

.posts-grid .post-entry[data-section="growth"]:hover {
    border-left-color: rgba(234, 179, 8, 0.5);
}

/* ===================================
   Wide Screen Layout (1440px+)
   Increase content width on large monitors to reduce excessive whitespace
   =================================== */

@media (min-width: 1400px) {
    :root {
        --nav-width: 1320px;
        --main-width: 840px;
    }
}

@media (min-width: 1600px) {
    :root {
        --nav-width: 1500px;
        --main-width: 920px;
    }
}

@media (min-width: 1920px) {
    :root {
        --nav-width: 1760px;
        --main-width: 1060px;
    }
}

/* Profile shell: allow wider layout on large screens */
@media (min-width: 1400px) {
    .profile_shell {
        max-width: 1280px;
        margin: 0 auto;
    }

    .profile_hero {
        grid-template-columns: 60% 37%;
        gap: 3%;
    }
}

@media (min-width: 1920px) {
    .profile_shell {
        max-width: 1600px;
    }
}

/* ===================================
   Mobile Text Overflow Fix (375px)
   Fix intro bio overflow on narrow phones
   =================================== */

@media (max-width: 400px) {
    .profile_title__name {
        font-size: 2.2rem !important;
    }

    .profile_title__accent {
        font-size: 1.3rem !important;
    }

    .profile_summary {
        font-size: 0.9rem;
        line-height: 1.6;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .profile_terminal {
        font-size: 0.9rem;
        overflow: hidden;
        white-space: normal;
    }

    #profile-typing-text {
        display: inline;
        white-space: normal;
        word-break: break-word;
    }

    .profile_copy {
        padding: 24px 20px !important;
    }

    .profile_intro {
        font-size: 0.88rem;
        word-break: break-word;
        overflow-wrap: break-word;
    }
}

/* ===================================
   Status Badge - Clickable Link
   =================================== */

.profile_status {
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
    text-decoration: none !important;
}

.profile_status:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

a.profile_status {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* ===================================
   AI Chat Panel Consistency Fixes
   =================================== */

/* Ensure chat panel hints show on open */
.profile_chat_panel.open .profile_chat_hints {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.15s;
}

/* Scrollable messages area */
.profile_chat_messages {
    max-height: 320px;
    overflow-y: auto;
    padding: 4px 0 8px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.3) transparent;
}

.profile_chat_messages::-webkit-scrollbar {
    width: 4px;
}

.profile_chat_messages::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 4px;
}

/* Message bubbles */
.profile_chat_msg {
    padding: 10px 14px;
    border-radius: 12px;
    margin-bottom: 8px;
    font-size: 0.88rem;
    line-height: 1.65;
    max-width: 88%;
    word-break: break-word;
    animation: chatMsgIn 0.25s ease;
}

@keyframes chatMsgIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.profile_chat_msg--user {
    margin-left: auto;
    background: linear-gradient(135deg, #0e7490, #14b8a6);
    color: white;
    border-bottom-right-radius: 4px;
}

.profile_chat_msg--ai {
    margin-right: auto;
    background: color-mix(in srgb, var(--profile-accent, #0e7490) 6%, var(--theme, white));
    color: var(--primary);
    border-left: 3px solid var(--profile-accent, #0e7490);
    border-bottom-left-radius: 4px;
}

.profile_chat_msg--ai a {
    color: var(--profile-accent, #0e7490);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.profile_chat_msg--ai code {
    background: rgba(148, 163, 184, 0.15);
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 0.82rem;
}

.profile_chat_msg--ai strong {
    font-weight: 600;
}

/* Thinking dots */
.profile_chat_thinking_msg {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    max-width: 80px;
}

.profile_chat_dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--profile-accent, #0e7490);
    opacity: 0.4;
    animation: chat-dot-bounce 1.4s ease-in-out infinite;
}

.profile_chat_dot:nth-child(1) { animation-delay: 0s; }
.profile_chat_dot:nth-child(2) { animation-delay: 0.2s; }
.profile_chat_dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes chat-dot-bounce {
    0%, 80%, 100% { opacity: 0.4; transform: scale(0.85); }
    40% { opacity: 1; transform: scale(1.2); }
}

/* Consistent send button with site color palette */
.profile_chat_send {
    padding: 10px 18px;
    background: linear-gradient(135deg, #0e7490, #14b8a6);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    letter-spacing: 0.02em;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.profile_chat_send:hover:not(:disabled) {
    background: linear-gradient(135deg, #0891b2, #0e9f8d);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 116, 144, 0.3);
}

.profile_chat_send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Mobile: compact AI panel */
@media (max-width: 600px) {
    .profile_chat_inner {
        padding: 16px 18px;
    }

    .profile_chat_messages {
        max-height: 240px;
    }

    .profile_chat_send {
        padding: 8px 14px;
        font-size: 12px;
    }

    .profile_chat_msg {
        max-width: 92%;
        font-size: 0.84rem;
    }
}

/* Quick Links in Status Bar */
.profile_quick_links {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
}

.profile_quick_link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: color-mix(in srgb, var(--theme) 80%, transparent);
    color: var(--secondary);
    font: 500 12px/1.4 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    text-decoration: none;
    transition: all 0.18s ease;
    letter-spacing: 0.02em;
    cursor: pointer;
    outline: none;
}

.profile_quick_link:hover {
    color: var(--profile-accent);
    border-color: color-mix(in srgb, var(--profile-accent) 38%, var(--border));
    background: color-mix(in srgb, var(--profile-accent) 8%, transparent);
    transform: translateY(-1px);
}

.profile_quick_link__icon {
    font-size: 14px;
    line-height: 1;
}

/* Nav Tags (compact button row) */
.profile_nav_tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 16px;
}

.profile_nav_tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: transparent;
    color: var(--secondary);
    font: 500 11px/1.4 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    text-decoration: none;
    transition: all 0.15s ease;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.profile_nav_tag:hover {
    color: var(--profile-accent);
    border-color: color-mix(in srgb, var(--profile-accent) 40%, var(--border));
    background: color-mix(in srgb, var(--profile-accent) 6%, transparent);
}

/* Category Panels */
.profile_panel--category {
    grid-column: span 3;
    display: grid;
    gap: 12px;
    align-content: start;
}

.profile_panel--category h3 {
    margin: 0;
    font-size: 1.15rem;
    color: var(--primary);
}

.profile_panel--category p {
    font-size: 0.9rem;
    color: var(--secondary);
    line-height: 1.6;
}

.profile_panel__icon--ai {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));
    border-color: color-mix(in srgb, #6366f1 30%, var(--border));
    color: #6366f1;
}

.profile_panel__icon--growth {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(134, 239, 172, 0.15));
    border-color: color-mix(in srgb, #22c55e 30%, var(--border));
    color: #22c55e;
}

.profile_panel__icon--travel {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.15), rgba(251, 146, 60, 0.15));
    border-color: color-mix(in srgb, #f97316 30%, var(--border));
    color: #f97316;
}

.profile_panel__icon--projects {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.15), rgba(244, 114, 182, 0.15));
    border-color: color-mix(in srgb, #ec4899 30%, var(--border));
    color: #ec4899;
}

.profile_view_all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--profile-accent);
    font: 600 12px/1.4 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    letter-spacing: 0.05em;
    text-decoration: none;
    margin-top: 8px;
    transition: all 0.15s ease;
}

.profile_view_all:hover {
    opacity: 0.85;
    transform: translateX(4px);
}

/* Responsive adjustments for category panels */
@media (max-width: 1200px) {
    .profile_panel--category {
        grid-column: span 6;
    }
}

@media (max-width: 768px) {
    .profile_quick_links {
        width: 100%;
        justify-content: center;
        margin-top: 12px;
        margin-left: 0;
        order: 3;
    }

    .profile_status_bar {
        flex-wrap: wrap;
    }

    .profile_panel--category {
        grid-column: 1 / -1;
    }

    .profile_quick_link {
        padding: 6px 10px;
        font-size: 11px;
    }
}

/* Latest Posts Section Anchor Offset */
#latest-posts, #start-here {
    scroll-margin-top: calc(var(--header-height, 72px) + 20px);
}

/* ===================================
   Homepage CTA (Call-to-Action) Styles
   =================================== */

.home-info {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    text-align: center;
}

.home-info-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.home-info-content {
    margin-bottom: 2rem;
    color: var(--secondary);
    font-size: 1.05rem;
    line-height: 1.7;
}

.home-info-content p {
    margin: 0 0 1rem;
}

.home-info-content p:last-child {
    margin-bottom: 0;
}

/* CTA Button Container */
.home-info-cta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin: 2rem 0;
}

/* CTA Button Base Styles */
.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    white-space: nowrap;
}

.cta-button__icon {
    font-size: 1.2rem;
    line-height: 1;
}

.cta-button__text {
    color: inherit;
}

/* Primary CTA Button */
.cta-button--primary {
    background: linear-gradient(135deg, #0e7490, #14b8a6);
    color: white;
    box-shadow: 0 4px 14px rgba(14, 116, 144, 0.25);
}

.cta-button--primary:hover {
    background: linear-gradient(135deg, #0891b2, #0e9f8d);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(14, 116, 144, 0.35);
}

/* Secondary CTA Button */
.cta-button--secondary {
    background: var(--entry);
    color: var(--primary);
    border-color: var(--border);
}

.cta-button--secondary:hover {
    border-color: color-mix(in srgb, var(--profile-accent, #0e7490) 40%, var(--border));
    background: color-mix(in srgb, var(--profile-accent, #0e7490) 6%, var(--entry));
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

/* Ghost CTA Button */
.cta-button--ghost {
    background: transparent;
    color: var(--primary);
    border-color: var(--border);
    border-style: dashed;
}

.cta-button--ghost:hover {
    border-color: color-mix(in srgb, var(--profile-accent, #0e7490) 40%, var(--border));
    border-style: solid;
    background: color-mix(in srgb, var(--profile-accent, #0e7490) 6%, var(--entry));
    transform: translateY(-2px);
}

/* RSS Subscribe Card Integration */
.rss-subscribe-card {
    margin-top: 2.5rem;
    max-width: none;
}

/* Expanded state for email signup trigger */
.rss-subscribe-card__teaser.expanded {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.2s ease, max-height 0.3s ease;
}

/* Dark mode adjustments */
.dark .cta-button--primary {
    background: linear-gradient(135deg, #14b8a6, #2dd4bf);
    box-shadow: 0 4px 14px rgba(45, 212, 191, 0.3);
}

.dark .cta-button--primary:hover {
    background: linear-gradient(135deg, #2dd4bf, #5eead4);
    box-shadow: 0 8px 24px rgba(45, 212, 191, 0.4);
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .home-info {
        padding: 1.5rem 1rem;
    }

    .home-info-title {
        font-size: 1.5rem;
    }

    .home-info-content {
        font-size: 0.98rem;
    }

    .home-info-cta {
        flex-direction: column;
        gap: 10px;
    }

    .cta-button {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
        font-size: 0.95rem;
    }
}

/* ===================================
   Code Block Copy Button (#153)
   Always visible, not just on hover
   =================================== */
.copy-code {
    display: block !important;
    opacity: 0.55;
    transition: opacity 0.15s ease, color 0.18s ease,
        background-color 0.18s ease, transform 0.12s ease;
}

div.highlight:hover .copy-code,
pre:hover .copy-code {
    opacity: 1;
}

.copy-code:active {
    transform: scale(0.92);
}

/* Success state: brief pop + green tint after copying. */
.copy-code.is-copied {
    opacity: 1;
    color: #fff;
    background-color: #16a34a;
    border-color: #16a34a;
    animation: copy-pop 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.dark .copy-code.is-copied {
    background-color: #22c55e;
    border-color: #22c55e;
    color: #0b1220;
}
@keyframes copy-pop {
    0% { transform: scale(0.82); }
    60% { transform: scale(1.08); }
    100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
    .copy-code.is-copied { animation: none; }
    .copy-code:active { transform: none; }
}

/* ===================================
   AI Sources & Suggestions
   =================================== */
.ai-sources { margin-top: 8px; font-size: 0.8em; opacity: 0.8; }
.ai-source-link { display: inline-block; margin: 2px 4px; padding: 2px 8px; border-radius: 12px; background: rgba(99,102,241,0.15); color: inherit; text-decoration: none; }
.ai-source-link:hover { background: rgba(99,102,241,0.3); }

.search-palette__ai-suggestions { display: flex; gap: 8px; flex-wrap: wrap; padding: 8px 0; }
.search-palette__ai-suggestion { padding: 4px 12px; border-radius: 16px; border: 1px solid rgba(99,102,241,0.3); background: transparent; cursor: pointer; font-size: 0.85em; color: inherit; }
.search-palette__ai-suggestion:hover { background: rgba(99,102,241,0.15); }

.ai-retry-btn { margin-top: 6px; padding: 3px 10px; border-radius: 8px; border: 1px solid currentColor; opacity: 0.7; cursor: pointer; background: transparent; font-size: 0.85em; }
.ai-retry-btn:hover { opacity: 1; }

/* Contact-aware WeChat quick action under an AI answer */
.ai-wechat-cta { margin: 10px 0 4px; }
.ai-wechat-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border: none;
  border-radius: 999px;
  font-size: 0.85em;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #07c160, #06a850);
  box-shadow: 0 6px 16px -8px rgba(7, 193, 96, 0.75);
  transition: transform 0.16s ease, box-shadow 0.16s ease, gap 0.16s ease;
}
.ai-wechat-cta-btn svg { flex: none; }
.ai-wechat-cta-btn:hover { transform: translateY(-1px); gap: 9px; box-shadow: 0 10px 22px -8px rgba(7, 193, 96, 0.8); }
.ai-wechat-cta-btn:active { transform: translateY(0) scale(0.97); }
.ai-wechat-cta-btn:focus-visible { outline: 2px solid #07c160; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .ai-wechat-cta-btn { transition: none; }
  .ai-wechat-cta-btn:hover { transform: none; }
}

/* blog-ai-inline suggestion buttons */
.blog-ai-suggestions { display: flex; gap: 6px; flex-wrap: wrap; padding: 6px 0 4px; }
.blog-ai-suggestion { padding: 3px 10px; border-radius: 14px; border: 1px solid rgba(99,102,241,0.3); background: transparent; cursor: pointer; font-size: 0.82em; color: inherit; transition: background 0.15s; }

/* ===================================
   US-007: Fix body scroll blocked on homepage
   PaperMod profile-mode.css sets .main .profile { overflow: hidden }
   which prevents natural scroll. Override to allow vertical scroll.
   Modal-only body overflow management is handled in share_icons.html
   and search-palette-open class (PaperMod header.css) — both temporary.
   =================================== */
.main .profile {
    overflow: visible;
}

/* Ensure html allows vertical scroll; do NOT set overflow-y on body
   to avoid creating a secondary scroll container that breaks sticky. */
html {
    overflow-y: auto;
}

/* Scrollbar style coordinated with theme */
html {
    scrollbar-width: thin;
    scrollbar-color: var(--color-border, var(--border)) transparent;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--color-border, var(--border));
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-muted, var(--secondary));
}
.blog-ai-suggestion:hover { background: rgba(99,102,241,0.15); }

/* ===================================
   US-017: Mobile responsive fixes (375px / 414px)
   Prevents horizontal scroll and overflow across all pages.
   =================================== */

/* Ensure all top-level page sections don't overflow */
.main,
.post-single,
.post-content,
.post-header {
    max-width: 100%;
    overflow-x: clip;
}

/* Tables: wrap in scrollable container on mobile */
@media (max-width: 768px) {
    /* Make tables scrollable horizontally instead of breaking layout */
    .post-content table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }

    /* Ensure code blocks don't exceed viewport */
    .post-content .highlight,
    .post-content pre {
        max-width: calc(100vw - 2 * var(--gap, 20px));
        overflow-x: auto;
    }

    /* Images respect viewport width */
    .post-content img {
        max-width: 100%;
        height: auto;
    }

    /* Section headers (AI Tech, Growth) padding on mobile */
    .ai-tech-header,
    .growth-header {
        padding: 1.5rem 1rem;
        border-radius: 12px;
    }

    /* Archive/article grid cards don't overflow */
    .post-entry {
        max-width: 100%;
        overflow: hidden;
    }

    /* About page container on mobile */
    .main:has(.about-page) {
        max-width: 100%;
        padding: 0;
    }
}

/* 375px specific: extra-tight viewport fixes */
@media (max-width: 390px) {
    /* Header nav: prevent search keys from squeezing layout */
    .nav-search-trigger__keys {
        display: none !important;
    }

    /* Profile title on tiny screens */
    .profile_title__name {
        font-size: 1.6rem !important;
    }

    /* Reduce horizontal padding in main panels */
    .profile_copy,
    .profile_panel {
        padding: 16px 12px !important;
    }

    /* Reduce newsletter card padding */
    .rss-subscribe-card__teaser {
        padding: 20px 16px !important;
    }

    /* Ensure post entry cards fit */
    .post-entry {
        padding: 16px 12px !important;
    }

    /* Travel stat grid — ensure 4-col doesn't overflow */
    .tp-stats__inner {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Inline TOC on mobile: ensure it doesn't break layout */
@media (max-width: 768px) {
    .toc-inline {
        max-width: 100%;
        overflow-x: hidden;
    }

    /* TOC sidebar must be hidden on mobile (already done, belt-and-suspenders) */
    .toc-sidebar {
        display: none !important;
    }
}

/* Projects grid: single column on mobile */
@media (max-width: 600px) {
    .ai-tech-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Ensure long words/URLs break in post content on mobile */
@media (max-width: 768px) {
    .post-content p,
    .post-content li,
    .post-content blockquote {
        word-break: break-word;
        overflow-wrap: break-word;
    }
}

/* ── Search palette: share conversation button ── */
.search-palette__share-btn {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(140, 110, 75, 0.35);
  border-radius: 4px;
  background: rgba(120, 90, 55, 0.06);
  color: #7a5c40;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
  padding: 0;
}

.search-palette__share-btn:hover {
  background: rgba(120, 90, 55, 0.14);
  border-color: rgba(120, 90, 55, 0.55);
  color: #5a3a20;
}

.dark .search-palette__share-btn {
  border-color: rgba(160, 130, 90, 0.3);
  background: rgba(80, 60, 35, 0.25);
  color: #c8a870;
}

.dark .search-palette__share-btn:hover {
  background: rgba(100, 75, 45, 0.45);
  border-color: rgba(160, 130, 90, 0.55);
  color: #e8c888;
}

/* ─── Related Posts ─────────────────────────────────────────── */
.related-posts {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.related-posts-header {
  margin-bottom: 1.5rem;
}

.related-posts-eyebrow {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--secondary);
  opacity: 0.6;
  margin-bottom: 0.3rem;
}

.related-posts-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--primary);
  margin: 0;
  line-height: 1.3;
}

.related-posts-title-en {
  font-weight: 400;
  color: var(--secondary);
  font-size: 0.95em;
}

/* Grid: 3-col on wide, 1-col stacked list on narrow */
.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

@media (max-width: 720px) {
  .related-posts-grid {
    grid-template-columns: 1fr;
  }
}

/* ─── Related Post Card (rpc) ────────────────────────────────── */
.rpc {
  position: relative;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--primary);
  background: var(--entry);
  padding: 1.25rem 1.1rem 1.1rem;
  transition: background 0.15s ease;
  min-height: 120px;
}

.rpc:hover {
  background: var(--code-bg, rgba(0,0,0,0.03));
  text-decoration: none;
  color: var(--primary);
}

body.dark .rpc:hover {
  background: rgba(226, 227, 225, 0.08);
}

body.dark .related-posts-grid {
  background: rgba(226, 227, 225, 0.06);
  border-color: rgba(226, 227, 225, 0.1);
}

body.dark .rpc {
  background: #1a1c1b;
}


/* Optional cover image strip */
.rpc__cover {
  margin: -1.25rem -1.1rem 0.9rem;
  height: 120px;
  overflow: hidden;
}

.rpc__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.rpc:hover .rpc__cover img {
  transform: scale(1.04);
}

/* Tags row */
.rpc__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.55rem;
}

.rpc__tag {
  font-size: 0.68rem;
  font-weight: 500;
  padding: 0.1rem 0.5rem;
  border-radius: 99px;
  background: var(--border);
  color: var(--secondary);
  text-transform: lowercase;
  letter-spacing: 0.02em;
}

/* Title */
.rpc__title {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.5;
  margin: 0 0 auto;
  padding-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--primary);
}

/* Body wrapper */
.rpc__body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Meta row */
.rpc__meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.6rem;
}

.rpc__date,
.rpc__read {
  font-size: 0.72rem;
  color: var(--secondary);
  opacity: 0.7;
}

.rpc__sep {
  color: var(--secondary);
  opacity: 0.4;
  font-size: 0.72rem;
}

/* Arrow indicator */
.rpc__arrow {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  font-size: 0.9rem;
  color: var(--secondary);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.rpc:hover .rpc__arrow {
  opacity: 0.5;
  transform: translateX(0);
}
