/* ============================================
   Nostalgic Archive Theme (Monochrome Edition)
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:ital,wght@0,400;0,700;1,400&family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400&display=swap');

:root {
  /* Colors - Light Mode (Monochrome) */
  --kb-bg-light: #ffffff;
  /* Pure White */
  --kb-card-light: #ffffff;
  /* Pure White */
  --kb-text-primary-light: #000000;
  /* Pure Black */
  --kb-text-secondary-light: #4a4a4a;
  /* Dark Gray */
  --kb-border-light: #000000;
  /* Pure Black */
  --kb-accent-light: #000000;
  /* Pure Black */
  --kb-link-light: #000000;
  /* Pure Black */

  /* Colors - Dark Mode (Monochrome Inverse) */
  --kb-bg-dark: #000000;
  /* Pure Black */
  --kb-card-dark: #000000;
  /* Pure Black */
  --kb-text-primary-dark: #ffffff;
  /* Pure White */
  --kb-text-secondary-dark: #a0a0a0;
  /* Light Gray */
  --kb-border-dark: #ffffff;
  /* Pure White */
  --kb-accent-dark: #ffffff;
  /* Pure White */
  --kb-link-dark: #ffffff;
  /* Pure White */

  /* Default to Light */
  --kb-bg: var(--kb-bg-light);
  --kb-card: var(--kb-card-light);
  --kb-text-primary: var(--kb-text-primary-light);
  --kb-text-secondary: var(--kb-text-secondary-light);
  --kb-border: var(--kb-border-light);
  --kb-accent: var(--kb-accent-light);
  --kb-link: var(--kb-link-light);

  /* Code Blocks (High Contrast) */
  --kb-code-bg: #000000;
  /* Black background for Light Mode */
  --kb-code-text: #ffffff;
  /* White text for Light Mode */
}

/* ============================================
   Language Dropdown Styles
   ============================================ */
.lang-dropdown {
  position: relative;
}

.lang-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-family: 'Courier Prime', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: transparent;
  color: var(--kb-text-primary);
  border: 2px solid var(--kb-border);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 3px 3px 0px var(--kb-border);
}

.lang-toggle-btn:hover {
  transform: translateY(-2px);
  box-shadow: 4px 4px 0px var(--kb-accent);
  border-color: var(--kb-accent);
}

.lang-toggle-btn .flag {
  font-size: 1.1rem;
}

.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 160px;
  background: var(--kb-bg);
  border: 2px solid var(--kb-border);
  box-shadow: 5px 5px 0px var(--kb-border);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
}

.lang-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: 'Courier Prime', monospace;
  font-size: 0.85rem;
  background: transparent;
  color: var(--kb-text-primary);
  border: none;
  border-bottom: 1px dashed var(--kb-border);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.lang-option:last-child {
  border-bottom: none;
}

.lang-option:hover {
  background: var(--kb-border);
  padding-left: 1.25rem;
}

.lang-option .flag {
  font-size: 1.2rem;
}

.lang-option .lang-name {
  flex: 1;
}

.lang-option .check {
  opacity: 0;
  color: var(--kb-accent);
}

.lang-option.active .check {
  opacity: 1;
}

/* Mobile Top Bar Optimization */
@media (max-width: 640px) {
  .kb-top-bar {
    padding: 0.5rem 0.75rem;
    height: auto;
    min-height: 3.5rem;
  }

  .kb-top-bar .title-section {
    max-width: 50vw;
  }

  .kb-top-bar .title-section .page-title {
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .lang-toggle-btn {
    padding: 0.3rem 0.5rem;
    font-size: 0.7rem;
    box-shadow: none;
    border-width: 1px;
  }

  .lang-toggle-btn .flag {
    font-size: 0.9rem;
  }

  /* Theme toggle - show sun/moon icons */
  #theme-toggle {
    padding: 0.3rem 0.5rem;
    font-size: 1.1rem;
  }

  #theme-toggle span:first-child,
  #theme-toggle span:nth-child(2) {
    display: inline !important;
  }

  /* Hide "Mode" text on mobile (it already has hidden class but ensure it) */
  #theme-toggle span:last-child {
    display: none !important;
  }

  /* Terminal toggle - show icon */
  #terminal-toggle {
    font-size: 0.85rem;
  }

  .terminal-icon {
    display: inline !important;
  }

  .buttons-container {
    gap: 0.35rem;
  }

  /* Hide favorite text on mobile, show only icon */
  .favorite-btn .favorite-text {
    display: none !important;
  }
}

html.dark {
  --kb-bg: var(--kb-bg-dark);
  --kb-card: var(--kb-card-dark);
  --kb-text-primary: var(--kb-text-primary-dark);
  --kb-text-secondary: var(--kb-text-secondary-dark);
  --kb-border: var(--kb-border-dark);
  --kb-accent: var(--kb-accent-dark);
  --kb-link: var(--kb-link-dark);

  /* Code Blocks (Inverse High Contrast) */
  --kb-code-bg: #ffffff;
  /* White background for Dark Mode */
  --kb-code-text: #000000;
  /* Black text for Dark Mode */
}

body {
  background-color: var(--kb-bg);
  color: var(--kb-text-primary);
  font-family: 'Courier Prime', monospace;
  /* Typewriter feel */
  transition: background-color 0.5s ease, color 0.5s ease;
  line-height: 1.6;
  background-image: linear-gradient(#00000005 1px, transparent 1px), linear-gradient(90deg, #00000005 1px, transparent 1px);
  background-size: 20px 20px;
  /* Subtle grid */
}

/* ============================================
   Layout Components (Sidebar & Header)
   ============================================ */

.kb-sidebar {
  background-color: var(--kb-card);
  border-right: 1px solid var(--kb-border);
  font-family: 'Courier Prime', monospace;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
}

/* Custom Scrollbar for Sidebar */
.kb-sidebar nav::-webkit-scrollbar {
  width: 4px;
}

.kb-sidebar nav::-webkit-scrollbar-track {
  background: transparent;
}

.kb-sidebar nav::-webkit-scrollbar-thumb {
  background-color: var(--kb-border);
  border-radius: 4px;
}

.kb-sidebar nav::-webkit-scrollbar-thumb:hover {
  background-color: var(--kb-text-secondary);
}

.kb-sidebar-title {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  color: var(--kb-text-primary);
  border-bottom: 2px double var(--kb-border);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

/* ============================================
   Clean Navigation Styles
   ============================================ */
.kb-nav-category {
  font-family: 'Courier Prime', monospace;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--kb-text-primary);
  margin-bottom: 0.75rem;
  margin-top: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: none;
  opacity: 0.7;
  font-weight: 400;
}

.kb-nav-category:first-child {
  margin-top: 0;
}

.kb-nav-link {
  display: block;
  padding: 0.5rem 0.75rem;
  color: var(--kb-text-primary);
  text-decoration: none;
  transition: all 0.15s ease;
  border: none;
  border-radius: 4px;
  font-size: 0.85rem;
  line-height: 1.4;
  font-weight: 500;
  margin-bottom: 0.25rem;
  background: transparent;
}

.kb-nav-link:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--kb-text-primary);
  transform: none;
  box-shadow: none;
}

html.dark .kb-nav-link:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

.kb-nav-link-active {
  background-color: var(--kb-accent) !important;
  color: var(--kb-bg) !important;
  font-weight: 600;
}

/* Collapsible Navigation Sections */
.kb-nav-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  color: var(--kb-text-primary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: transparent;
  transition: all 0.15s ease;
  border-radius: 4px;
  width: 100%;
  letter-spacing: 0;
  text-transform: none;
  margin-bottom: 0.25rem;
}

.kb-nav-section:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--kb-text-primary);
}

html.dark .kb-nav-section:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

.kb-nav-section.active {
  color: var(--kb-accent);
  background-color: transparent;
}

.kb-nav-section .subnav-arrow {
  transition: transform 0.2s ease;
  flex-shrink: 0;
  opacity: 0.5;
}

.kb-nav-section:hover .subnav-arrow {
  opacity: 1;
}

.kb-nav-section.active .subnav-arrow {
  transform: rotate(180deg);
  opacity: 1;
}

/* Subnav Items */
.subnav-items {
  margin-left: 0.75rem;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: all 0.25s ease;
  border-left: 2px solid rgba(0, 0, 0, 0.1);
  padding-left: 0.75rem;
}

html.dark .subnav-items {
  border-left-color: rgba(255, 255, 255, 0.15);
}

.subnav-items.show {
  max-height: 500px;
  opacity: 1;
  margin-top: 0.25rem;
  margin-bottom: 0.5rem;
}

.kb-nav-sublink {
  display: block;
  padding: 0.4rem 0.6rem;
  color: var(--kb-text-secondary);
  text-decoration: none;
  font-size: 0.8rem;
  transition: all 0.15s ease;
  border-radius: 4px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.15rem;
}

.kb-nav-sublink:hover {
  color: var(--kb-text-primary);
  background-color: rgba(0, 0, 0, 0.04);
  padding-left: 0.6rem;
}

html.dark .kb-nav-sublink:hover {
  background-color: rgba(255, 255, 255, 0.06);
}

.kb-nav-sublink.kb-nav-link-active {
  color: var(--kb-bg);
  background-color: var(--kb-accent);
  font-weight: 500;
}

.kb-top-bar {
  background-color: var(--kb-bg);
  border-bottom: 1px solid var(--kb-border);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* ============================================
   Header & Filters
   ============================================ */

.kb-header-section {
  margin-bottom: 4rem;
  border-bottom: 2px double var(--kb-border);
  padding-bottom: 2rem;
  text-align: center;
}

.kb-main-title {
  font-family: 'Playfair Display', serif;
  font-size: 4rem;
  font-weight: 700;
  color: var(--kb-text-primary);
  letter-spacing: -0.05em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  text-shadow: 2px 2px 0px var(--kb-bg);
  /* Retro shadow */
}

.kb-title-math {
  color: var(--kb-accent);
  font-style: italic;
  font-family: 'Cormorant Garamond', serif;
}

/* Language Toggle (Retro Switch) */
.kb-language-toggle {
  display: inline-flex;
  background: transparent;
  border: 2px solid var(--kb-border);
  padding: 0.25rem;
  margin: 1rem auto;
  box-shadow: 4px 4px 0px var(--kb-border);
  /* Hard shadow */
}

.kb-lang-btn {
  padding: 0.5rem 1.5rem;
  font-family: 'Courier Prime', monospace;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--kb-text-secondary);
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
}

.kb-lang-btn:hover {
  background-color: var(--kb-border);
  color: var(--kb-text-primary);
}

.kb-lang-btn.kb-lang-active {
  background-color: var(--kb-text-primary);
  color: var(--kb-bg);
  text-decoration: underline;
}

/* Topic Filters (Index Tabs) */
.kb-topic-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
  justify-content: center;
}

.kb-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1.25rem;
  font-family: 'Courier Prime', monospace;
  font-size: 0.85rem;
  font-weight: 600;
  background-color: var(--kb-card);
  color: var(--kb-text-secondary);
  border: 1px solid var(--kb-border);
  border-radius: 4px;
  box-shadow: 2px 2px 0px var(--kb-border);
  transition: all 0.25s ease;
  min-width: auto;
  justify-content: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
}

.kb-filter-btn .kb-filter-icon {
  font-size: 1rem;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.kb-filter-btn:hover {
  transform: translateY(-2px);
  box-shadow: 3px 4px 0px var(--kb-accent);
  border-color: var(--kb-accent);
  color: var(--kb-accent);
}

.kb-filter-btn:hover .kb-filter-icon {
  opacity: 1;
}

.kb-filter-btn.kb-filter-active {
  background-color: var(--kb-accent);
  color: var(--kb-bg);
  border-color: var(--kb-accent);
  box-shadow: 1px 1px 0px var(--kb-text-primary);
}

.kb-filter-btn.kb-filter-active .kb-filter-icon {
  opacity: 1;
}


/* ============================================
   Article List (Card Catalog)
   ============================================ */

.kb-section-header {
  margin-top: 3rem;
  margin-bottom: 2rem;
  text-align: center;
  border-bottom: 1px dashed var(--kb-border);
  line-height: 0.1em;
  margin: 10px 0 20px;
}

.kb-section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--kb-text-primary);
  background: var(--kb-bg);
  padding: 0 15px;
  font-style: italic;
}

.kb-post-list {
  display: grid;
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.kb-post-card {
  background: var(--kb-card);
  border: 1px solid var(--kb-border);
  padding: 2rem;
  position: relative;
  transition: all 0.3s ease;
  box-shadow: 5px 5px 0px rgba(0, 0, 0, 0.05);
}

.kb-post-card::before {
  /* Hole punch effect */
  content: '';
  position: absolute;
  top: 50%;
  left: 10px;
  width: 12px;
  height: 12px;
  background: var(--kb-bg);
  border-radius: 50%;
  box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.2);
  transform: translateY(-50%);
}

.kb-post-card:hover {
  transform: translateY(-3px) rotate(0.5deg);
  box-shadow: 8px 8px 0px var(--kb-border);
  border-color: var(--kb-accent);
}

.kb-post-meta {
  font-family: 'Courier Prime', monospace;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--kb-text-secondary);
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--kb-border);
  padding-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
}

.kb-post-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.kb-post-link {
  color: var(--kb-text-primary);
  text-decoration: none;
  background-image: linear-gradient(var(--kb-accent), var(--kb-accent));
  background-position: 0% 100%;
  background-repeat: no-repeat;
  background-size: 0% 2px;
  transition: background-size .3s;
}

.kb-post-link:hover {
  background-size: 100% 2px;
  color: var(--kb-accent);
}

.kb-post-excerpt {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  color: var(--kb-text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.kb-post-tags {
  display: flex;
  gap: 0.5rem;
}

.kb-tag {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--kb-border);
  color: var(--kb-text-secondary);
  font-family: 'Courier Prime', monospace;
  text-transform: uppercase;
}

/* ============================================
   Article Content (Old Document)
   ============================================ */

.kb-prose {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--kb-text-primary);
  max-width: 70ch;
  margin: 0 auto;
  background: var(--kb-card);
  padding: 3rem;
  border: 1px solid var(--kb-border);
  box-shadow: 10px 10px 0px rgba(0, 0, 0, 0.05);
  position: relative;
}



.kb-prose h1 {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  text-align: center;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--kb-text-primary);
  padding-bottom: 1rem;
}

.kb-prose h2 {
  font-family: 'Courier Prime', monospace;
  font-size: 1.8rem;
  border-bottom: 1px dashed var(--kb-border);
  padding-bottom: 0.5rem;
  margin-top: 3rem;
}

.kb-prose h3 {
  font-family: 'Courier Prime', monospace;
  font-size: 1.4rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--kb-accent);
  border-left: 4px solid var(--kb-border);
  padding-left: 1rem;
  background: transparent;
  box-shadow: none;
}

.kb-prose p {
  margin-bottom: 1.5rem;
  text-align: left;
  line-height: 1.9;
}

.kb-prose ul,
.kb-prose ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

.kb-prose ul {
  list-style-type: disc;
}

.kb-prose ol {
  list-style-type: decimal;
}

.kb-prose li {
  margin-bottom: 0.5rem;
  line-height: 1.8;
  color: var(--kb-text-primary);
}

.kb-prose li::marker {
  color: var(--kb-text-primary);
}

.kb-prose blockquote {
  border-left: 4px solid var(--kb-accent);
  padding-left: 1.5rem;
  font-style: italic;
  color: var(--kb-text-secondary);
  background: rgba(0, 0, 0, 0.02);
  padding: 1rem;
  margin: 2rem 0;
}

.kb-prose code {
  font-family: 'Courier Prime', monospace;
  background: #000000;
  color: #ffffff;
  padding: 0.2em 0.4em;
  font-size: 0.9em;
  border-radius: 2px;
}

html.dark .kb-prose code {
  background: #ffffff;
  color: #000000;
}

.kb-prose pre {
  background: var(--kb-code-bg);
  color: var(--kb-code-text);
  padding: 1.5rem;
  border-radius: 4px;
  overflow-x: auto;
  border: 1px solid var(--kb-border);
  box-shadow: 5px 5px 0px rgba(0, 0, 0, 0.05);
  margin: 2rem 0;
}

.kb-prose pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  border-radius: 0;
}

.kb-prose img {
  max-width: 100%;
  border: 5px solid var(--kb-card);
  box-shadow: 0 0 0 1px var(--kb-border), 5px 5px 10px rgba(0, 0, 0, 0.1);
  margin: 2rem auto;
  display: block;
  filter: sepia(20%);
  /* Slight vintage photo effect */
  transition: filter 0.3s;
}

.kb-prose img:hover {
  filter: sepia(0%);
}

/* Responsive */
@media (max-width: 768px) {
  .kb-main-title {
    font-size: 2rem;
  }

  .kb-prose {
    padding: 1.25rem;
    font-size: 1.05rem;
  }

  .kb-prose h1 {
    font-size: 2rem;
  }

  .kb-prose h2 {
    font-size: 1.4rem;
  }

  .kb-prose h3 {
    font-size: 1.2rem;
    padding-left: 0.75rem;
  }

  .kb-prose pre {
    padding: 1rem;
    font-size: 0.85rem;
    margin: 1.5rem -1.25rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .kb-prose img {
    margin: 1.5rem -1.25rem;
    max-width: calc(100% + 2.5rem);
    border-radius: 0;
  }

  /* Header section mobile */
  .kb-header-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
  }

  /* Filter buttons mobile */
  .kb-topic-filters {
    gap: 0.5rem;
    margin-top: 1.5rem;
  }

  .kb-filter-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    gap: 0.4rem;
    min-width: auto;
    flex: 0 0 auto;
  }

  .kb-filter-btn .kb-filter-icon {
    font-size: 0.9rem;
  }

  /* Language toggle mobile */
  .kb-language-toggle {
    padding: 0.15rem;
    box-shadow: 2px 2px 0px var(--kb-border);
  }

  .kb-lang-btn {
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
  }

  /* Post cards mobile */
  .kb-post-card {
    padding: 1.25rem;
    padding-left: 2rem;
  }

  .kb-post-card::before {
    left: 6px;
    width: 10px;
    height: 10px;
  }

  .kb-post-title {
    font-size: 1.3rem;
  }

  .kb-post-excerpt {
    font-size: 1rem;
  }

  /* Comments section mobile */
  .kb-comments {
    margin-top: 2rem;
    padding-top: 1.5rem;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  .kb-main-title {
    font-size: 1.6rem;
  }

  .kb-filter-btn {
    padding: 0.4rem 0.6rem;
    font-size: 0.7rem;
  }

  .kb-prose {
    padding: 1rem;
    font-size: 1rem;
  }

  .kb-prose::after {
    display: none;
  }
}


/* Additional styles for Index Page */
.kb-section-divider {
  display: none;
  /* We use the header border instead */
}

.kb-post-thumbnail {
  margin-bottom: 1rem;
  border: 1px solid var(--kb-border);
  padding: 0.5rem;
  background: var(--kb-bg);
  box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.05);
}

.kb-post-thumbnail img {
  width: 100%;
  height: auto;
  display: block;
  filter: sepia(30%) contrast(1.1);
  transition: filter 0.3s;
}

.kb-post-thumbnail:hover img {
  filter: sepia(0%) contrast(1);
}

.kb-no-results {
  text-align: center;
  padding: 4rem;
  font-family: 'Courier Prime', monospace;
  color: var(--kb-text-secondary);
  border: 2px dashed var(--kb-border);
  margin-top: 2rem;
}

.kb-no-results-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* ============================================
   MathJax Styling
   ============================================ */
mjx-container[display="true"] {
  margin: 1.5em 0 !important;
}

/* Adjust math font size to match text better */
.MathJax,
mjx-container {
  font-size: 0.95em !important;
  color: var(--kb-text-primary);
}

/* Make inline math slightly smaller to fit line height */
mjx-container:not([display="true"]) {
  font-size: 0.9em !important;
}

/* ============================================
   References Section
   ============================================ */
.kb-references {
  margin-top: 4rem;
  padding: 2rem;
  background-color: rgba(0, 0, 0, 0.02);
  border: 1px solid var(--kb-border);
  border-radius: 4px;
  font-family: 'Courier Prime', monospace;
}

.kb-references-title {
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--kb-accent);
}

.kb-references-title::before {
  content: '#';
  opacity: 0.5;
}

.kb-references-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.kb-references-item {
  margin-bottom: 0.8rem;
  padding-left: 1.5rem;
  position: relative;
  font-size: 0.9rem;
  color: var(--kb-text-secondary);
  line-height: 1.5;
}

.kb-references-item::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--kb-accent);
  font-weight: bold;
}

.kb-references-item a {
  color: var(--kb-text-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ============================================
   Copy Code Button
   ============================================ */
.kb-copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.4rem 0.8rem;
  font-family: 'Courier Prime', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background-color: var(--kb-bg);
  color: var(--kb-text-primary);
  border: 1px solid var(--kb-border);
  border-radius: 4px;
  cursor: pointer;
  opacity: 0;
  transition: all 0.25s ease;
  z-index: 10;
  box-shadow: 2px 2px 0px var(--kb-border);
}

/* Show button on hover over code block wrapper */
div:has(> pre):hover .kb-copy-btn,
.kb-copy-btn:focus {
  opacity: 1;
}

.kb-copy-btn:hover {
  transform: translateY(-2px);
  box-shadow: 3px 4px 0px var(--kb-accent);
  border-color: var(--kb-accent);
  color: var(--kb-accent);
}

.kb-copy-btn:active {
  transform: translateY(0);
  box-shadow: 1px 1px 0px var(--kb-border);
}

/* Success state */
.kb-copy-btn.kb-copy-success {
  background-color: var(--kb-accent);
  color: var(--kb-bg);
  border-color: var(--kb-accent);
  opacity: 1;
}

/* Mobile: always show button */
@media (max-width: 768px) {
  .kb-copy-btn {
    opacity: 1;
    padding: 0.3rem 0.6rem;
    font-size: 0.7rem;
  }
}

/* ============================================
   Binary Rain Animation (Matrix Style)
   ============================================ */
.binary-rain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
  opacity: 0.03;
}

.binary-column {
  position: absolute;
  top: -100%;
  font-family: 'Courier Prime', monospace;
  font-size: 14px;
  line-height: 1;
  color: var(--kb-text-primary);
  animation: fall linear infinite;
  white-space: nowrap;
}

@keyframes fall {
  0% {
    transform: translateY(-100%);
  }

  100% {
    transform: translateY(100vh);
  }
}

/* ============================================
   Enhanced Hover Effects
   ============================================ */

/* Glowing accent on hover */
.kb-post-card:hover {
  transform: translateY(-5px) rotate(0.3deg);
  box-shadow:
    8px 8px 0px var(--kb-border),
    0 0 20px rgba(0, 0, 0, 0.1);
  border-color: var(--kb-accent);
}

.kb-post-card:hover .kb-post-title {
  text-shadow: 0 0 1px var(--kb-text-primary);
}

/* Smooth link underline animation */
.kb-prose a {
  color: var(--kb-text-primary);
  text-decoration: none;
  background-image: linear-gradient(var(--kb-accent), var(--kb-accent));
  background-position: 0% 100%;
  background-repeat: no-repeat;
  background-size: 0% 2px;
  transition: background-size 0.3s ease, color 0.3s ease;
}

.kb-prose a:hover {
  background-size: 100% 2px;
  color: var(--kb-accent);
}

/* Nav link - Clean style (no animation) */

/* Button hover glow */
#theme-toggle:hover,
#lang-toggle:hover {
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

#theme-toggle:active,
#lang-toggle:active {
  transform: translateY(0);
}

/* ============================================
   Typing Effect for Headers
   ============================================ */
@keyframes blink {

  0%,
  50% {
    opacity: 1;
  }

  51%,
  100% {
    opacity: 0;
  }
}

.kb-main-title {
  position: relative;
}

.typing-cursor::after {
  content: '|';
  animation: blink 1s infinite;
  margin-left: 2px;
}

/* ============================================
   Code Block Enhancements
   ============================================ */
.kb-prose pre {
  position: relative;
  transition: all 0.3s ease;
}

.kb-prose pre:hover {
  transform: translateY(-2px);
  box-shadow:
    8px 8px 0px rgba(0, 0, 0, 0.1),
    0 0 20px rgba(0, 0, 0, 0.05);
}

/* Scanline effect for code blocks */
.kb-prose pre::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(0deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.03) 2px,
      rgba(0, 0, 0, 0.03) 4px);
  pointer-events: none;
  border-radius: 4px;
}

/* ============================================
   Image Hover Effects
   ============================================ */
.kb-prose img {
  transition: all 0.4s ease;
}

.kb-prose img:hover {
  filter: sepia(0%) contrast(1.05);
  transform: scale(1.02);
  box-shadow:
    0 0 0 1px var(--kb-border),
    10px 10px 20px rgba(0, 0, 0, 0.15);
}

/* ============================================
   Scroll Progress Indicator
   ============================================ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--kb-accent), var(--kb-text-secondary));
  z-index: 9999;
  transition: width 0.1s ease;
}

/* ============================================
   Page Load Animation
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.kb-prose {
  animation: fadeInUp 0.6s ease-out;
}

.kb-post-card {
  animation: fadeInUp 0.5s ease-out;
  animation-fill-mode: both;
}

.kb-post-card:nth-child(1) {
  animation-delay: 0.1s;
}

.kb-post-card:nth-child(2) {
  animation-delay: 0.2s;
}

.kb-post-card:nth-child(3) {
  animation-delay: 0.3s;
}

.kb-post-card:nth-child(4) {
  animation-delay: 0.4s;
}

.kb-post-card:nth-child(5) {
  animation-delay: 0.5s;
}

/* ============================================
   Smooth Scrolling
   ============================================ */
html {
  scroll-behavior: smooth;
}

/* ============================================
   Selection Color
   ============================================ */
::selection {
  background: var(--kb-text-primary);
  color: var(--kb-bg);
}

/* ============================================
   Focus States (Accessibility)
   ============================================ */
a:focus,
button:focus {
  outline: 2px dashed var(--kb-accent);
  outline-offset: 3px;
}

/* ============================================
   Binary Rain Animation (Matrix Style)
   ============================================ */
.binary-rain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  opacity: 0.15;
}

.binary-column {
  position: absolute;
  top: -100%;
  font-family: 'Courier Prime', monospace;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 2px;
  color: #000000;
  animation: binaryFall linear infinite;
  white-space: nowrap;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  text-shadow: 0 0 1px rgba(0, 0, 0, 0.3);
}

@keyframes binaryFall {
  0% {
    transform: translateY(-100%);
    opacity: 0;
  }

  5% {
    opacity: 1;
  }

  95% {
    opacity: 1;
  }

  100% {
    transform: translateY(100vh);
    opacity: 0;
  }
}

/* ============================================
   Dark Mode Specific Enhancements
   ============================================ */
html.dark .kb-post-card:hover {
  box-shadow:
    8px 8px 0px var(--kb-border),
    0 0 30px rgba(255, 255, 255, 0.05);
}

html.dark .kb-prose pre:hover {
  box-shadow:
    8px 8px 0px rgba(255, 255, 255, 0.1),
    0 0 30px rgba(255, 255, 255, 0.03);
}

html.dark .binary-rain {
  opacity: 0.2;
}

html.dark .binary-column {
  color: #ffffff;
  text-shadow: 0 0 2px rgba(255, 255, 255, 0.5);
}

/* ============================================
   Mobile Responsive Styles
   ============================================ */

/* Tablet and below (max-width: 1024px) */
@media screen and (max-width: 1024px) {
  .kb-main-title {
    font-size: 2.5rem;
  }

  .kb-header-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
  }

  .kb-topic-filters {
    gap: 0.5rem;
  }

  .kb-filter-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
  }
}

/* Mobile Sidebar - Pure Black/White Theme */
.kb-sidebar,
#mobile-sidebar {
  background-color: var(--kb-bg) !important;
  color: var(--kb-text-primary);
}

html.dark .kb-sidebar,
html.dark #mobile-sidebar {
  background-color: #000000 !important;
  color: #ffffff;
}

html:not(.dark) .kb-sidebar,
html:not(.dark) #mobile-sidebar {
  background-color: #ffffff !important;
  color: #000000;
}

/* Mobile devices (max-width: 768px) */
@media screen and (max-width: 768px) {

  /* Typography - Larger and more readable */
  .kb-prose {
    font-size: 1rem;
    line-height: 1.8;
  }

  .kb-prose h1 {
    font-size: 1.75rem;
    line-height: 1.3;
    margin-bottom: 1rem;
  }

  .kb-prose h2 {
    font-size: 1.5rem;
    line-height: 1.3;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
  }

  .kb-prose h3 {
    font-size: 1.25rem;
    line-height: 1.4;
  }

  .kb-prose p {
    margin-bottom: 1.25rem;
  }

  /* Images - Full width on mobile */
  .kb-prose img {
    width: 100%;
    height: auto;
    margin: 1rem 0;
    border-radius: 4px;
  }

  .kb-prose figure {
    margin: 1.5rem 0;
  }

  .kb-prose figcaption {
    font-size: 0.85rem;
    padding: 0.5rem;
    text-align: center;
  }

  /* Code blocks - Horizontal scroll */
  .kb-prose pre {
    padding: 1rem;
    font-size: 0.8rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 6px;
    margin: 1rem 0;
  }

  .kb-prose code {
    font-size: 0.85rem;
    padding: 0.15rem 0.4rem;
  }

  /* Tables - Scrollable */
  .kb-prose table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 0.85rem;
  }

  .kb-prose th,
  .kb-prose td {
    padding: 0.5rem;
    white-space: nowrap;
  }

  /* Header and Title */
  .kb-main-title {
    font-size: 2rem;
  }

  .kb-header-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
  }

  /* Topic Filters - Wrap nicely */
  .kb-topic-filters {
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
  }

  .kb-filter-btn {
    padding: 0.4rem 0.6rem;
    font-size: 0.7rem;
    flex-shrink: 0;
  }

  /* Post Cards */
  .kb-post-card {
    padding: 1rem;
  }

  .kb-post-title {
    font-size: 1.1rem;
    line-height: 1.4;
  }

  .kb-post-excerpt {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .kb-post-meta {
    font-size: 0.75rem;
    flex-wrap: wrap;
    gap: 0.3rem;
  }

  /* Language Toggle */
  .lang-toggle-btn {
    padding: 0.4rem 0.6rem;
    font-size: 0.7rem;
  }

  .lang-menu {
    min-width: 140px;
  }

  /* Navigation */
  .kb-nav-section {
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
  }

  .kb-nav-sublink {
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem;
  }

  /* Blockquotes */
  .kb-prose blockquote {
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    font-size: 0.95rem;
  }

  /* Lists */
  .kb-prose ul,
  .kb-prose ol {
    padding-left: 1.25rem;
  }

  .kb-prose li {
    margin-bottom: 0.5rem;
  }
}

/* Small phones (max-width: 480px) */
@media screen and (max-width: 480px) {
  .kb-prose {
    font-size: 0.95rem;
  }

  .kb-prose h1 {
    font-size: 1.5rem;
  }

  .kb-prose h2 {
    font-size: 1.3rem;
  }

  .kb-prose h3 {
    font-size: 1.1rem;
  }

  .kb-prose pre {
    font-size: 0.75rem;
    padding: 0.75rem;
  }

  .kb-main-title {
    font-size: 1.5rem;
  }

  .kb-filter-btn {
    padding: 0.35rem 0.5rem;
    font-size: 0.65rem;
  }

  .kb-post-title {
    font-size: 1rem;
  }

  .kb-section-title {
    font-size: 1.25rem;
  }

  /* Daha fazla padding ana içerik için */
  .kb-article-content {
    padding: 0.5rem;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {

  /* Larger touch targets */
  .kb-filter-btn,
  .lang-toggle-btn,
  .kb-nav-link,
  .kb-nav-section,
  .kb-nav-sublink {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  /* Remove hover effects that don't work well on touch */
  .kb-post-card:hover {
    transform: none;
  }

  .kb-filter-btn:hover {
    transform: none;
  }

  /* Disable binary rain on mobile for performance */
  .binary-rain {
    display: none;
  }
}

/* ============================================
   Cheatsheet Compact Styles
   ============================================ */

/* Target cheatsheet pages using data-topic attribute */
body[data-topic="cheatsheet"] .kb-prose pre {
  font-size: 0.75rem !important;
  line-height: 1.4 !important;
  padding: 0.75rem !important;
  margin: 0.5rem 0 !important;
}

body[data-topic="cheatsheet"] .kb-prose code {
  font-size: 0.75rem !important;
}

body[data-topic="cheatsheet"] .kb-prose h2 {
  font-size: 1.25rem !important;
  margin-top: 1.5rem !important;
  margin-bottom: 0.5rem !important;
}

body[data-topic="cheatsheet"] .kb-prose h3 {
  font-size: 1rem !important;
  margin-top: 1rem !important;
  margin-bottom: 0.25rem !important;
}

body[data-topic="cheatsheet"] .kb-prose p {
  font-size: 0.875rem !important;
  margin: 0.5rem 0 !important;
}

body[data-topic="cheatsheet"] .kb-prose ul,
body[data-topic="cheatsheet"] .kb-prose ol {
  font-size: 0.875rem !important;
  margin: 0.25rem 0 !important;
  padding-left: 1.25rem !important;
}

body[data-topic="cheatsheet"] .kb-prose li {
  margin: 0.125rem 0 !important;
}
/* ============================================
   Resources Widget
   ============================================ */
.kb-resource-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  color: var(--kb-text-secondary);
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.kb-resource-link:hover {
  background-color: var(--kb-border);
  color: var(--kb-bg);
  border-color: var(--kb-border);
}

.kb-resource-link:hover svg {
  color: var(--kb-bg);
}

.kb-resource-link svg {
  flex-shrink: 0;
  transition: color 0.2s ease;
}

/* Dark mode adjustments */
html.dark .kb-resource-link:hover {
  background-color: var(--kb-border-dark);
  color: var(--kb-bg-dark);
}

html.dark .kb-resource-link:hover svg {
  color: var(--kb-bg-dark);
}

/* ============================================
   Social Media Icons
   ============================================ */
.kb-social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px dashed var(--kb-border);
  color: var(--kb-accent);
  text-decoration: none;
  transition: all 0.2s ease;
}

.kb-social-icon:hover {
  background-color: var(--kb-accent);
  color: var(--kb-bg);
  border-color: var(--kb-accent);
  border-style: solid;
  transform: translateY(-2px);
}

.kb-social-icon svg {
  transition: transform 0.2s ease;
}

.kb-social-icon:hover svg {
  transform: scale(1.1);
}

/* ============================================
   Education Widget
   ============================================ */
.kb-edu-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.5rem;
  color: var(--kb-text-secondary);
}

/* ============================================
   Certifications Widget
   ============================================ */
.kb-cert-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.kb-cert-badge {
  font-family: 'Courier Prime', monospace;
  font-size: 0.7rem;
  font-weight: bold;
  padding: 0.2rem 0.5rem;
  border: 1px dashed var(--kb-border);
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--kb-text-primary);
  background: transparent;
  transition: all 0.2s ease;
}

.kb-cert-badge:hover {
  background: var(--kb-border);
  color: var(--kb-bg);
  border-style: solid;
}

.kb-cert-badge.emapt {
  border-color: #e94560;
  color: #e94560;
}

.kb-cert-badge.emapt:hover {
  background: #e94560;
  color: #fff;
}

/* ============================================
   Tabs for Education & Certifications
   ============================================ */
.kb-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}

.kb-tab {
  font-family: 'Courier Prime', monospace;
  font-size: 0.65rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.5rem;
  border: 1px dashed var(--kb-border);
  background: transparent;
  color: var(--kb-text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  opacity: 0.6;
}

.kb-tab:hover {
  opacity: 1;
}

.kb-tab.active {
  background: var(--kb-border);
  color: var(--kb-bg);
  border-style: solid;
  opacity: 1;
}

.kb-tab-content {
  display: none;
}

.kb-tab-content.active {
  display: block;
}

/* Mini cert badges for tabs */
.kb-cert-mini {
  font-family: 'Courier Prime', monospace;
  font-size: 0.6rem;
  font-weight: bold;
  padding: 0.15rem 0.35rem;
  border: 1px dashed var(--kb-border);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  opacity: 0.8;
}

.kb-cert-mini.emapt {
  border-color: #e94560;
  color: #e94560;
}

/* ============================================
   Favorites Button
   ============================================ */
.favorite-btn {
  position: relative;
}

.favorite-btn .favorite-icon {
  font-size: 1.1rem;
  transition: transform 0.2s ease;
}

.favorite-btn:hover .favorite-icon {
  transform: scale(1.2);
}

.favorite-btn.is-favorited {
  border-color: #f59e0b;
  color: #f59e0b;
}

.favorite-btn.is-favorited .favorite-icon {
  color: #f59e0b;
}

.favorite-btn.is-favorited:hover {
  background-color: #f59e0b;
  color: var(--kb-bg);
}

.favorite-btn.is-favorited:hover .favorite-icon {
  color: var(--kb-bg);
}

/* Dark mode adjustments */
html.dark .favorite-btn.is-favorited {
  border-color: #fbbf24;
  color: #fbbf24;
}

html.dark .favorite-btn.is-favorited .favorite-icon {
  color: #fbbf24;
}

html.dark .favorite-btn.is-favorited:hover {
  background-color: #fbbf24;
  color: #000;
}

html.dark .favorite-btn.is-favorited:hover .favorite-icon {
  color: #000;
}

/* ============================================
   Latest Papers Widget
   ============================================ */
.kb-paper-link {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.4rem 0.5rem;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.15s ease;
  color: var(--kb-text-secondary);
}

.kb-paper-link:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--kb-text-primary);
}

html.dark .kb-paper-link:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

.kb-paper-badge {
  font-family: 'Courier Prime', monospace;
  font-size: 0.5rem;
  font-weight: bold;
  padding: 0.1rem 0.25rem;
  border: 1px solid var(--kb-border);
  border-radius: 3px;
  text-transform: uppercase;
  flex-shrink: 0;
  min-width: 45px;
  text-align: center;
}

/* Category-specific badge colors */
.kb-paper-badge.badge-security {
  border-color: #ef4444;
  color: #ef4444;
}

.kb-paper-badge.badge-ai {
  border-color: #8b5cf6;
  color: #8b5cf6;
}

.kb-paper-badge.badge-math {
  border-color: #10b981;
  color: #10b981;
}

.kb-paper-title {
  font-size: 0.7rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================
   Shares - Clean Algorithmic Style
   ============================================ */

/* Header */
.kb-shares-header {
  margin-bottom: 3rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--kb-border);
}

.kb-shares-header h1 {
  font-family: 'Courier Prime', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.25rem 0;
  color: var(--kb-text-primary);
}

.kb-shares-subtitle {
  font-family: 'Courier Prime', monospace;
  font-size: 0.8rem;
  color: var(--kb-text-secondary);
  margin: 0;
}

/* Shares List */
.kb-shares-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Share Item */
.kb-share-item {
  display: grid;
  grid-template-columns: 2.5rem 6rem 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px dashed var(--kb-border);
}

.kb-share-item:last-child {
  border-bottom: none;
}

.kb-share-index {
  font-family: 'Courier Prime', monospace;
  font-size: 0.75rem;
  color: var(--kb-text-secondary);
}

.kb-share-date {
  font-family: 'Courier Prime', monospace;
  font-size: 0.75rem;
  color: var(--kb-text-secondary);
}

.kb-share-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.kb-share-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--kb-text-primary);
}

.kb-share-text p {
  margin: 0 0 0.5rem 0;
}

.kb-share-text p:last-child {
  margin: 0;
}

.kb-share-text code {
  font-family: 'Courier Prime', monospace;
  font-size: 0.85em;
  background: var(--kb-code-bg);
  color: var(--kb-code-text);
  padding: 0.1em 0.3em;
}

/* Tags */
.kb-share-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.kb-share-tag {
  font-family: 'Courier Prime', monospace;
  font-size: 0.7rem;
  color: var(--kb-text-secondary);
}

.kb-share-tag::before {
  content: '[';
}

.kb-share-tag::after {
  content: ']';
}

/* Link */
.kb-share-link {
  font-family: 'Courier Prime', monospace;
  font-size: 0.75rem;
  color: var(--kb-text-secondary);
  text-decoration: none;
}

.kb-share-link:hover {
  color: var(--kb-text-primary);
}

/* Empty State */
.kb-shares-empty {
  padding: 2rem;
  text-align: center;
  font-family: 'Courier Prime', monospace;
  font-size: 0.85rem;
  color: var(--kb-text-secondary);
}

/* Mobile */
@media (max-width: 640px) {
  .kb-share-item {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .kb-share-index,
  .kb-share-date {
    display: inline;
  }

  .kb-share-item > .kb-share-index::after {
    content: ' · ';
  }

  .kb-share-item > .kb-share-date {
    margin-bottom: 0.5rem;
  }
}
