/*
 * OpenCode Theme - Hexo
 * Inspired by opencode.ai design
 * 
 * Design Philosophy:
 * - Monospace typography (terminal aesthetic)
 * - Minimalist black & white color scheme
 * - Clean, uncluttered layout
 * - Flat design with subtle interactions
 */

/* ==========================================
   CSS Variables (Design Tokens)
   ========================================== */

:root {
  /* Colors - Light Mode */
  --color-bg: #fdfcfc;
  --color-bg-secondary: #f5f5f5;
  --color-bg-tertiary: #eeeeee;
  --color-text: #1d1d1f;
  --color-text-secondary: #666666;
  --color-text-muted: #999999;
  --color-border: #e8e8e8;
  --color-border-light: #f0f0f0;
  --color-accent: #1d1d1f;
  --color-accent-hover: #3d3d3f;
  --color-link: #1d1d1f;
  --color-link-hover: #666666;

  /* Code Colors */
  --color-code-bg: #1d1d1f;
  --color-code-text: #e8e8e8;
  --color-code-border: #333333;

  /* Typography */
  --font-mono: 'IBM Plex Mono', 'SFMono-Regular', 'Menlo', 'Monaco', 'Consolas', monospace;
  --font-size-base: 16px;
  --font-size-sm: 14px;
  --font-size-xs: 12px;
  --font-size-lg: 18px;
  --font-size-xl: 24px;
  --font-size-2xl: 32px;
  --font-size-3xl: 42px;
  --line-height: 1.7;
  --line-height-tight: 1.4;

  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;
  --spacing-3xl: 64px;
  --spacing-4xl: 96px;

  /* Layout */
  --container-max: 1200px;
  --content-max: 800px;
  --sidebar-width: 280px;
  --toc-width: 240px;
  --header-height: 60px;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.35s ease;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Dark Mode */
[data-theme="dark"] {
  --color-bg: #0a0a0a;
  --color-bg-secondary: #141414;
  --color-bg-tertiary: #1d1d1d;
  --color-text: #e8e8e8;
  --color-text-secondary: #a0a0a0;
  --color-text-muted: #666666;
  --color-border: #2a2a2a;
  --color-border-light: #1f1f1f;
  --color-accent: #ffffff;
  --color-accent-hover: #cccccc;
  --color-link: #e8e8e8;
  --color-link-hover: #a0a0a0;

  --color-code-bg: #141414;
  --color-code-text: #e8e8e8;
  --color-code-border: #2a2a2a;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* ==========================================
   Base & Reset
   ========================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-mono);
  font-size: var(--font-size-base);
  line-height: var(--line-height);
  color: var(--color-text);
  background-color: var(--color-bg);
  min-height: 100vh;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

a {
  color: var(--color-link);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-link-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul,
ol {
  list-style: none;
}

button {
  font-family: inherit;
  font-size: inherit;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
}

::selection {
  background-color: var(--color-text);
  color: var(--color-bg);
}

/* ==========================================
   App Layout
   ========================================== */

.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

/* ==========================================
   Header & Navigation
   ========================================== */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.header-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  font-weight: 600;
  font-size: var(--font-size-lg);
  color: var(--color-text);
}

.logo:hover {
  color: var(--color-text);
}

.logo-text {
  white-space: nowrap;
}

/* Navigation */
.nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  gap: var(--spacing-sm);
}

.nav-item {
  display: flex;
}

.nav-link {
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-text);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.rss-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  height: 36px;
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  line-height: 1;
}

.rss-link:hover {
  background-color: var(--color-bg-secondary);
  color: var(--color-text);
}

.rss-icon {
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
}

.theme-toggle {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: background-color var(--transition-fast);
  padding: 0;
  line-height: 1;
}

.theme-toggle:hover {
  background-color: var(--color-bg-secondary);
}

.theme-icon {
  display: none;
  font-size: var(--font-size-sm);
  line-height: 1;
}

[data-theme="light"] .theme-icon.light {
  display: block;
}

[data-theme="dark"] .theme-icon.dark {
  display: block;
}

.menu-toggle {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  padding: 0;
  line-height: 1;
}

.menu-toggle:hover {
  background-color: var(--color-bg-secondary);
}

.menu-icon {
  font-size: var(--font-size-sm);
  line-height: 1;
}

/* Mobile Navigation */
.mobile-nav {
  display: none;
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  padding: var(--spacing-lg);
}

.mobile-nav.active {
  display: block;
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.mobile-nav-link {
  padding: var(--spacing-sm) 0;
  font-size: var(--font-size-base);
  color: var(--color-text);
}

@media (max-width: 768px) {
  .nav {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }
}

/* ==========================================
   Hero Section
   ========================================== */

.hero {
  padding: var(--spacing-4xl) 0;
  text-align: center;
  border-bottom: 1px solid var(--color-border);
}

.hero-content {
  max-width: var(--content-max);
  margin: 0 auto;
}

.hero-title {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  margin-bottom: var(--spacing-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
}

.hero-prompt {
  color: var(--color-text-secondary);
}

.hero-cursor {
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.hero-subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-xl);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: var(--spacing-lg);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

@media (max-width: 768px) {
  .hero {
    padding: var(--spacing-2xl) 0;
  }

  .hero-title {
    font-size: var(--font-size-xl);
    flex-wrap: wrap;
  }
}

/* ==========================================
   Home Sections (New)
   ========================================== */

.home-section {
  padding: var(--spacing-2xl) var(--spacing-lg);
  max-width: 800px;
  margin: 0 auto;
}

.section-title {
  font-size: var(--font-size-xl);
  font-weight: 600;
  margin-bottom: var(--spacing-xl);
  color: var(--color-text);
  border-bottom: 2px dashed var(--color-border);
  padding-bottom: var(--spacing-sm);
  display: inline-block;
}

/* Intro Section */
.intro-section .section-content {
  font-size: var(--font-size-md);
  line-height: 1.8;
  color: var(--color-text-secondary);
}

.intro-section p {
  margin-bottom: var(--spacing-md);
}

.highlight-text {
  color: var(--color-text);
  font-weight: 600;
  background-color: var(--color-bg-secondary);
  padding: 2px 6px;
  border-radius: 4px;
}

.intro-actions {
  margin-top: var(--spacing-xl);
  display: flex;
  gap: var(--spacing-md);
}

.action-btn {
  display: inline-block;
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  transition: all var(--transition-fast);
}

.action-btn:hover {
  background-color: var(--color-text);
  color: var(--color-bg);
  border-color: var(--color-text);
}

/* Skills Section (fastfetch Style) */
.terminal-card {
  /* Match Bash code block style */
  background: #f8f7f7;
  border: 1px solid #d9d8d8;
  border-radius: 6px;
  overflow: hidden;
  /* Remove shadow to be flat like code blocks */
  /* box-shadow: var(--shadow-sm); */
}

/* Dark mode adjustment for terminal card */
[data-theme="dark"] .terminal-card {
  background: #1a1a1a;
  border-color: #333333;
}

.terminal-header {
  /* Match Bash code block header color */
  background: transparent;
  padding: 10px 16px;
  /* Add bottom border to fully match figure.highlight.bash style */
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 10px;
  height: 10px;
  /* Slightly smaller to match code block dots */
  border-radius: 50%;
  background-color: #d1d5da;
}

[data-theme="dark"] .dot {
  background-color: #4a4a4a;
}

.terminal-title {
  display: block;
  margin-left: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--color-text-muted);
  /* Grey text */
  font-weight: 500;
}

[data-theme="dark"] .terminal-title {
  color: #8b949e;
}

.terminal-body {
  padding: 16px;
  /* Removed padding-top: 0 to give space below the new separator line */
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 14px;
  line-height: 1.6;
}

.skill-row {
  display: flex;
  flex-wrap: wrap;
  /* Allow wrapping on small screens */
  margin-bottom: 4px;
  /* Tighter spacing like terminal output */
}

.skill-row:last-child {
  margin-bottom: 0;
}

.skill-label {
  /* Make label color dark/neutral instead of blue */
  color: #24292e;
  font-weight: bold;
  min-width: 120px;
  margin-right: 16px;
}

[data-theme="dark"] .skill-label {
  color: #e0e0e0;
}

.skill-value {
  color: #24292e;
}

[data-theme="dark"] .skill-value {
  color: #e0e0e0;
}

/* Social Section */
.social-grid {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.social-card {
  display: flex;
  flex-direction: row;
  /* Horizontal alignment */
  align-items: center;
  /* Vertically center items */
  padding: var(--spacing-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  background: var(--color-bg);
  /* Explicit background */
}

.social-card:hover {
  border-color: var(--color-text);
  background-color: var(--color-bg-secondary);
  transform: translateX(4px);
  /* Slide right instead of up */
}

.social-icon {
  font-weight: bold;
  color: var(--color-text);
  margin-right: var(--spacing-md);
  /* Space between icon and text */
  margin-bottom: 0;
  /* Remove bottom margin from previous layout */
  min-width: 80px;
  /* Fixed width for alignment */
}

.social-link {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==========================================
   Post List Section
   ========================================== */

.post-list-section {
  padding: var(--spacing-2xl) var(--spacing-lg);
}

.section-title {
  font-size: var(--font-size-xl);
  font-weight: 600;
  margin-bottom: var(--spacing-xl);
  color: var(--color-text);
}

.post-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xl);
}

/* Post Card */
.post-card {
  padding: var(--spacing-lg);
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.post-card:hover {
  border-color: var(--color-text-muted);
  box-shadow: var(--shadow-sm);
}

.post-card.compact {
  padding: var(--spacing-md);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.post-date {
  color: var(--color-text-secondary);
}

.post-category a {
  color: var(--color-text-muted);
}

.post-category a:hover {
  color: var(--color-text);
}

.post-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
}

.post-link {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-sm);
  color: var(--color-text);
}

.post-link:hover {
  color: var(--color-text-secondary);
}

.post-symbol {
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.post-excerpt {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: var(--line-height);
  margin-bottom: var(--spacing-md);
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

.tag {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  padding: var(--spacing-xs) var(--spacing-sm);
  background-color: var(--color-bg-secondary);
  border-radius: var(--radius-sm);
  transition: background-color var(--transition-fast);
}

.tag:hover {
  background-color: var(--color-bg-tertiary);
  color: var(--color-text);
}

.post-footer {
  display: flex;
  justify-content: flex-end;
}

.read-more {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
}

.read-more:hover {
  color: var(--color-text);
}

/* ==========================================
   Post Page
   ========================================== */

.post-page {
  padding: var(--spacing-2xl) var(--spacing-lg);
}

.post-layout {
  display: grid;
  grid-template-columns: 1fr var(--toc-width);
  gap: var(--spacing-2xl);
  max-width: calc(var(--content-max) + var(--toc-width) + var(--spacing-2xl));
  margin: 0 auto;
}

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

  .post-toc {
    display: none;
  }
}

.post {
  max-width: var(--content-max);
  /* Fix grid item overflow issue in responsive layout */
  min-width: 0;
}

.post-header {
  margin-bottom: var(--spacing-2xl);
  padding-bottom: var(--spacing-xl);
  border-bottom: 1px solid var(--color-border);
}

.post-header .post-title {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  margin-bottom: var(--spacing-lg);
  line-height: var(--line-height-tight);
}

.post-meta-detail {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-lg);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.meta-label {
  color: var(--color-text-muted);
}

.meta-item a {
  color: var(--color-text-secondary);
}

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

/* Post Content */
.post-content {
  font-size: var(--font-size-base);
  line-height: var(--line-height);
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
  margin-top: var(--spacing-2xl);
  margin-bottom: var(--spacing-md);
  font-weight: 600;
  line-height: var(--line-height-tight);
}

.post-content h1 {
  font-size: var(--font-size-2xl);
}

.post-content h2 {
  font-size: var(--font-size-xl);
}

.post-content h3 {
  font-size: var(--font-size-lg);
}

.post-content h4 {
  font-size: var(--font-size-base);
}

.post-content p {
  margin-bottom: var(--spacing-lg);
}

.post-content ul,
.post-content ol {
  margin-bottom: var(--spacing-lg);
  padding-left: var(--spacing-xl);
}

.post-content ul {
  list-style: none;
}

.post-content ul li::before {
  content: ">";
  color: var(--color-text-muted);
  margin-right: var(--spacing-sm);
  margin-left: calc(var(--spacing-xl) * -1);
}

.post-content ol {
  list-style: decimal;
}

.post-content li {
  margin-bottom: var(--spacing-sm);
}

.post-content blockquote {
  margin: var(--spacing-lg) 0;
  padding: var(--spacing-md) var(--spacing-lg);
  border-left: 3px solid var(--color-text-muted);
  background-color: var(--color-bg-secondary);
  font-style: italic;
  color: var(--color-text-secondary);
}

.post-content blockquote p:last-child {
  margin-bottom: 0;
}

.post-content a {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-content a:hover {
  color: var(--color-text-secondary);
}

.post-content hr {
  margin: var(--spacing-2xl) 0;
  border: none;
  border-top: 1px solid var(--color-border);
}

.post-content table {
  width: 100%;
  margin: var(--spacing-lg) 0;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}

.post-content th,
.post-content td {
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid var(--color-border);
  text-align: left;
}

.post-content th {
  background-color: var(--color-bg-secondary);
  font-weight: 600;
}

.post-content img {
  display: block;
  margin: var(--spacing-lg) auto;
  max-width: 100%;
  height: auto;
  border-radius: 0;
  border: none;
}

/* Code Blocks */
.post-content code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 2px 6px;
  background-color: var(--color-bg-tertiary);
  border-radius: var(--radius-sm);
}

.post-content pre {
  margin: var(--spacing-lg) 0;
  padding: var(--spacing-lg);
  background-color: var(--color-code-bg);
  border-radius: var(--radius-md);
  overflow-x: auto;
  font-size: var(--font-size-sm);
  line-height: 1.6;
}

.post-content pre code {
  padding: 0;
  background: transparent;
  color: var(--color-code-text);
}

.code-wrapper {
  position: relative;
}

.code-copy-btn {
  position: absolute;
  top: var(--spacing-sm);
  right: var(--spacing-sm);
  padding: var(--spacing-xs) var(--spacing-sm);
  font-size: var(--font-size-xs);
  color: var(--color-code-text);
  background-color: var(--color-code-border);
  border-radius: var(--radius-sm);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.code-wrapper:hover .code-copy-btn {
  opacity: 1;
}

.code-copy-btn:hover {
  background-color: var(--color-text-secondary);
}

/* Post Footer & Navigation */
.post-footer-section {
  margin-top: var(--spacing-2xl);
  padding-top: var(--spacing-xl);
  border-top: 1px solid var(--color-border);
}

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-lg);
}

.post-nav-link {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
  padding: var(--spacing-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast);
}

.post-nav-link:hover {
  border-color: var(--color-text-muted);
}

.post-nav-link.empty {
  border: none;
}

.post-nav-link.next {
  text-align: right;
}

.nav-label {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.nav-title {
  font-size: var(--font-size-sm);
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* TOC Sidebar */
.post-toc {
  position: sticky;
  top: calc(var(--header-height) + var(--spacing-xl));
  max-height: calc(100vh - var(--header-height) - var(--spacing-2xl));
  overflow-y: auto;
}

.toc-wrapper {
  padding: var(--spacing-md);
  background-color: var(--color-bg-secondary);
  border-radius: var(--radius-md);
}

.toc-title {
  font-size: var(--font-size-sm);
  font-weight: 600;
  margin-bottom: var(--spacing-md);
  color: var(--color-text);
}

.toc {
  font-size: var(--font-size-sm);
}

.toc ol {
  list-style: none;
}

.toc li {
  margin-bottom: var(--spacing-xs);
}

.toc a {
  display: block;
  padding: var(--spacing-xs) 0;
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
}

.toc a:hover,
.toc a.active {
  color: var(--color-text);
}

.toc .toc-child {
  padding-left: var(--spacing-md);
}

/* ==========================================
   Archive Page
   ========================================== */

.archive-page,
.category-page,
.tag-page {
  padding: var(--spacing-2xl) var(--spacing-lg);
  max-width: var(--content-max);
  margin: 0 auto;
}

.page-header {
  margin-bottom: var(--spacing-2xl);
  padding-bottom: var(--spacing-lg);
  border-bottom: 1px solid var(--color-border);
}

.page-title {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-sm);
}

.title-prompt {
  color: var(--color-text-muted);
}

.page-desc {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.archive-timeline {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xl);
}

.archive-year-section {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.archive-year {
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  color: var(--color-text);
}

.archive-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-sm) 0;
}

.archive-date {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  flex-shrink: 0;
  width: 60px;
}

.archive-link {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  color: var(--color-text);
  font-size: var(--font-size-sm);
}

.archive-link:hover {
  color: var(--color-text-secondary);
}

.archive-symbol {
  color: var(--color-text-muted);
}

/* ==========================================
   Category & Tag Pages
   ========================================== */

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--spacing-md);
}

.category-card {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
  padding: var(--spacing-lg);
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast);
}

.category-card:hover {
  border-color: var(--color-text-muted);
}

.category-name {
  font-weight: 600;
  color: var(--color-text);
}

.category-count {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.tag-cloud-page {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.tag-item {
  padding: var(--spacing-sm) var(--spacing-md);
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  color: var(--color-text);
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.tag-item:hover {
  border-color: var(--color-text-muted);
  background-color: var(--color-bg-secondary);
}

.tag-count {
  color: var(--color-text-muted);
  margin-left: var(--spacing-xs);
}

/* ==========================================
   Page Container
   ========================================== */

.page-container {
  padding: var(--spacing-2xl) var(--spacing-lg);
  max-width: var(--content-max);
  margin: 0 auto;
}

.page-content .page-header {
  margin-bottom: var(--spacing-xl);
}

.page-content .content {
  font-size: var(--font-size-base);
  line-height: var(--line-height);
}

.page-content .content h1,
.page-content .content h2,
.page-content .content h3,
.page-content .content h4 {
  margin-top: var(--spacing-2xl);
  margin-bottom: var(--spacing-md);
  font-weight: 600;
}

.page-content .content p {
  margin-bottom: var(--spacing-lg);
}

/* ==========================================
   Sidebar
   ========================================== */

.sidebar {
  width: var(--sidebar-width);
  padding: var(--spacing-lg);
  border-left: 1px solid var(--color-border);
}

.sidebar-section {
  margin-bottom: var(--spacing-xl);
}

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

.author-card {
  text-align: center;
  padding: var(--spacing-lg);
  background-color: var(--color-bg-secondary);
  border-radius: var(--radius-md);
}

.author-avatar {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--spacing-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-text);
  border-radius: var(--radius-md);
}

.avatar-text {
  color: var(--color-bg);
  font-size: var(--font-size-xl);
  font-weight: 700;
}

.author-name {
  font-size: var(--font-size-base);
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
}

.author-bio {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.sidebar-title {
  font-size: var(--font-size-sm);
  font-weight: 600;
  margin-bottom: var(--spacing-md);
  color: var(--color-text);
}

.sidebar-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-xs) 0;
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.sidebar-link:hover {
  color: var(--color-text);
}

.item-symbol {
  color: var(--color-text-muted);
}

.item-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-count {
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
}

.tag-link {
  padding: var(--spacing-xs) var(--spacing-sm);
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  background-color: var(--color-bg-tertiary);
  border-radius: var(--radius-sm);
  transition: background-color var(--transition-fast);
}

.tag-link:hover {
  background-color: var(--color-text);
  color: var(--color-bg);
}

/* ==========================================
   Footer
   ========================================== */

.footer {
  border-top: 1px solid var(--color-border);
  padding: var(--spacing-2xl) var(--spacing-lg);
  margin-top: auto;
}

.footer-container {
  max-width: var(--container-max);
  margin: 0 auto;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-lg);
  justify-content: center;
  align-items: center;
  margin-bottom: var(--spacing-lg);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.footer-copyright,
.footer-powered {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.footer-symbol {
  color: var(--color-text-muted);
}

.footer-divider {
  color: var(--color-text-muted);
  margin: 0 var(--spacing-xs);
}

.footer-content a {
  color: var(--color-text);
}

.footer-content a:hover {
  color: var(--color-text-secondary);
}

.footer-social {
  display: flex;
  gap: var(--spacing-sm);
}

.social-link {
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
}

.social-link:hover {
  color: var(--color-text);
}

.footer-terminal {
  text-align: center;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.terminal-prompt {
  color: var(--color-text-secondary);
}

.terminal-cursor {
  animation: blink 1s step-end infinite;
}

/* ==========================================
   Pagination
   ========================================== */

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--spacing-2xl);
  padding-top: var(--spacing-lg);
  border-top: 1px solid var(--color-border);
}

.pagination-info {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.pagination-nav {
  display: flex;
  gap: var(--spacing-md);
}

.page-link {
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: var(--font-size-sm);
  color: var(--color-text);
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition-fast);
}

.page-link:hover {
  border-color: var(--color-text-muted);
}

.page-link.disabled {
  color: var(--color-text-muted);
  cursor: not-allowed;
}

.page-link.disabled:hover {
  border-color: var(--color-border);
}

/* ==========================================
   Utility Classes
   ========================================== */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ==========================================
   Print Styles
   ========================================== */

@media print {

  .header,
  .footer,
  .post-toc,
  .sidebar,
  .pagination {
    display: none;
  }

  .post-layout {
    grid-template-columns: 1fr;
  }

  body {
    background: white;
    color: black;
  }
}

/* ==========================================
   Hexo Code Highlight (figure.highlight)
   OpenCode.ai Docs Style - Two Variants:
   1. Simple Border Style (default for code)
   2. Terminal Style (for bash/shell)
   ========================================== */

/* Base Style - Simple Border (no terminal header) */
figure.highlight {
  margin: 16px 0 24px 0;
  padding: 0;
  background: #f8f7f7;
  border: 1px solid #d9d8d8;
  border-radius: 6px;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.6;
  position: relative;
}

/* No terminal header for simple code blocks */
figure.highlight::before,
figure.highlight::after {
  display: none;
}

/* Hide line numbers (gutter) for cleaner look */
figure.highlight table {
  width: 100%;
  margin: 0;
  border: none;
  border-collapse: collapse;
}

figure.highlight td {
  padding: 0;
  border: none;
}

figure.highlight .gutter {
  display: none;
}

figure.highlight .code {
  padding: 12px 16px;
  overflow-x: auto;
}

figure.highlight .code pre {
  margin: 0;
  padding: 0;
  background: transparent;
  color: #24292e;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 14px;
}

figure.highlight .line {
  min-height: 1.5em;
}

/* ==========================================
   Terminal Style - ONLY for bash/shell
   ========================================== */

figure.highlight.bash,
figure.highlight.shell,
figure.highlight.sh,
figure.highlight.zsh {
  padding-top: 32px;
  /* Space for terminal header */
}

/* Terminal Header with three dots - ONLY for bash/shell */
figure.highlight.bash::before,
figure.highlight.shell::before,
figure.highlight.sh::before,
figure.highlight.zsh::before {
  content: "";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 32px;
  background: #f8f7f7;
  border-bottom: 1px solid #d9d8d8;
}

/* Three dots decoration - ONLY for bash/shell */
figure.highlight.bash::after,
figure.highlight.shell::after,
figure.highlight.sh::after,
figure.highlight.zsh::after {
  content: "";
  display: block;
  position: absolute;
  top: 11px;
  left: 16px;
  width: 40px;
  height: 10px;
  background-color: #d1d5da;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 60 16' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Ccircle cx='28' cy='8' r='6'/%3E%3Ccircle cx='48' cy='8' r='6'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 60 16' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Ccircle cx='28' cy='8' r='6'/%3E%3Ccircle cx='48' cy='8' r='6'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

/* Syntax Highlighting Colors - Minimal grayscale for light theme */
figure.highlight .comment,
figure.highlight .quote {
  color: #6a737d;
  font-style: italic;
}

figure.highlight .keyword,
figure.highlight .selector-tag {
  color: #1d1d1f;
  font-weight: 500;
}

figure.highlight .number,
figure.highlight .literal,
figure.highlight .symbol,
figure.highlight .bullet {
  color: #1d1d1f;
}

figure.highlight .string,
figure.highlight .doctag,
figure.highlight .regexp {
  color: #1d1d1f;
}

figure.highlight .title,
figure.highlight .section,
figure.highlight .name,
figure.highlight .selector-id,
figure.highlight .selector-class {
  color: #1d1d1f;
}

figure.highlight .title.function_,
figure.highlight .function {
  color: #1d1d1f;
}

figure.highlight .variable,
figure.highlight .variable.language_,
figure.highlight .template-variable,
figure.highlight .attr,
figure.highlight .attribute {
  color: #1d1d1f;
}

figure.highlight .type,
figure.highlight .params,
figure.highlight .class,
figure.highlight .built_in {
  color: #1d1d1f;
}

figure.highlight .meta,
figure.highlight .tag {
  color: #1d1d1f;
}

figure.highlight .subst {
  color: #1d1d1f;
}

figure.highlight .addition {
  color: #22863a;
  background-color: rgba(34, 134, 58, 0.1);
}

figure.highlight .deletion {
  color: #cb2431;
  background-color: rgba(203, 36, 49, 0.1);
}

/* Dark mode - base style */
[data-theme="dark"] figure.highlight {
  background: #1a1a1a;
  border-color: #333333;
}

/* Dark mode - ALL text is light gray (same as light mode uses dark gray) */
[data-theme="dark"] figure.highlight .code pre,
[data-theme="dark"] figure.highlight .code pre span,
[data-theme="dark"] figure.highlight .line,
[data-theme="dark"] figure.highlight .comment,
[data-theme="dark"] figure.highlight .keyword,
[data-theme="dark"] figure.highlight .string,
[data-theme="dark"] figure.highlight .number,
[data-theme="dark"] figure.highlight .title,
[data-theme="dark"] figure.highlight .function,
[data-theme="dark"] figure.highlight .variable,
[data-theme="dark"] figure.highlight .type,
[data-theme="dark"] figure.highlight .meta,
[data-theme="dark"] figure.highlight .subst,
[data-theme="dark"] figure.highlight .params,
[data-theme="dark"] figure.highlight .attr,
[data-theme="dark"] figure.highlight .tag,
[data-theme="dark"] figure.highlight .name,
[data-theme="dark"] figure.highlight .built_in {
  color: #e0e0e0 !important;
}

/* Dark mode - Terminal style for bash/shell */
[data-theme="dark"] figure.highlight.bash::before,
[data-theme="dark"] figure.highlight.shell::before,
[data-theme="dark"] figure.highlight.sh::before,
[data-theme="dark"] figure.highlight.zsh::before {
  background: #1a1a1a;
  border-bottom-color: #333333;
}

[data-theme="dark"] figure.highlight.bash::after,
[data-theme="dark"] figure.highlight.shell::after,
[data-theme="dark"] figure.highlight.sh::after,
[data-theme="dark"] figure.highlight.zsh::after {
  background-color: #4a4a4a;
}

/* Highlighted/Important code block with red border */
figure.highlight.important,
.post-content .highlight-box {
  border-color: #d73a49;
  border-width: 2px;
}

/* Simple pre/code blocks (non-highlighted) - Simple border style */
.post-content pre:not(.highlight):not(figure pre) {
  margin: 16px 0 24px 0;
  padding: 12px 16px;
  background: #f8f7f7;
  border: 1px solid #d9d8d8;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.6;
}

.post-content pre code {
  padding: 0;
  background: transparent;
  color: #24292e;
  border-radius: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

[data-theme="dark"] .post-content pre:not(.highlight):not(figure pre) {
  background: #1a1a1a;
  border-color: #333333;
}

[data-theme="dark"] .post-content pre code {
  color: #e0e0e0;
}

/* ==========================================
   Categories & Tags Pages (standalone)
   ========================================== */

.categories-page,
.tags-page {
  padding: var(--spacing-2xl) var(--spacing-lg);
  max-width: var(--content-max);
  margin: 0 auto;
}

.empty-state {
  padding: var(--spacing-2xl);
  text-align: center;
}

.empty-text {
  font-size: var(--font-size-lg);
  color: var(--color-text-muted);
}

/* ==========================================
   Additional Hexo Inline Code
   ========================================== */

.post-content code:not(figure code):not(pre code) {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 2px 6px;
  background-color: var(--color-bg-tertiary);
  border-radius: var(--radius-sm);
  color: var(--color-text);
}

[data-theme="dark"] .post-content code:not(figure code):not(pre code) {
  background-color: var(--color-bg-tertiary);
  color: var(--color-text);
}
