/* ==========================================================================
   OddWired Dark Terminal Theme - Main Stylesheet
   ========================================================================== */

/* CSS Variables
   ========================================================================== */
:root {
  /* Colors */
  --color-background: #0d1117;
  --color-surface: #161b22;
  --color-primary: #58a6ff;
  --color-secondary: #39d353;
  --color-text-primary: #c9d1d9;
  --color-text-secondary: #8b949e;
  --color-border: #30363d;
  --color-link-hover: #6cb6ff;
  
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  
  /* Spacing */
  --spacing-unit: 8px;
  --container-max: 1200px;
  --content-max: 720px;
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  
  /* Header */
  --header-height: 64px;
  
  /* Z-index */
  --z-progress: 1000;
  --z-header: 900;
  --z-mobile-menu: 950;
  --z-modal: 1100;
}

/* Reset & Base Styles
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text-primary);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-text-primary);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1.125rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin-bottom: 1.5rem;
}

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

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

strong, b {
  font-weight: 600;
}

em, i {
  font-style: italic;
}

/* Code Styling
   ========================================================================== */
code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--color-primary);
}

pre {
  background: var(--color-background);
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  border: 1px solid var(--color-border);
}

pre code {
  background: transparent;
  border: none;
  padding: 0;
  color: var(--color-text-primary);
  font-size: 0.875rem;
}

/* Blockquotes
   ========================================================================== */
blockquote {
  border-left: 3px solid var(--color-primary);
  padding-left: 20px;
  background: var(--color-surface);
  margin: 2rem 0;
  padding: 1rem 1.25rem;
  border-radius: 0 4px 4px 0;
  color: var(--color-text-secondary);
}

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

/* Lists
   ========================================================================== */
ul, ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

li {
  margin-bottom: 0.5rem;
}

ul li::marker {
  color: var(--color-primary);
}

/* Images
   ========================================================================== */
img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

figure {
  margin: 2rem 0;
}

figcaption {
  text-align: center;
  font-style: italic;
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* Horizontal Rule
   ========================================================================== */
hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2rem 0;
}

/* Tables
   ========================================================================== */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  display: block;
}

th, td {
  padding: 12px;
  text-align: left;
  border: 1px solid var(--color-border);
}

th {
  background: var(--color-surface);
  font-weight: 600;
}

/* Layout Containers
   ========================================================================== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 24px;
}

.site-main {
  min-height: calc(100vh - var(--header-height) - 200px);
  padding-top: calc(var(--header-height) + 48px);
  padding-bottom: 48px;
}

/* Reading Progress Bar
   ========================================================================== */
.reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--color-secondary);
  width: 0%;
  z-index: var(--z-progress);
  transition: width 100ms ease;
}

/* Header Navigation
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(13, 17, 23, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  z-index: var(--z-header);
}

.navbar-container {
  max-width: var(--container-max);
  margin: 10px auto;
  padding: 0 32px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand .site-logo {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
}

.navbar-brand .site-logo:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.site-logo-image {
  height: 32px;
  width: auto;
  display: block;
}

.site-logo-text {
  display: inline-block;
}

.navbar-nav {
  display: flex;
  gap: 32px;
  align-items: center;
}

.navbar-nav ul {
  display: flex;
  gap: 32px;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.navbar-nav li {
  margin: 0;
  padding: 0;
}

.navbar-nav a {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.navbar-nav a:hover,
.navbar-nav a.nav-current {
  color: var(--color-primary);
}

.navbar-social {
  display: flex;
  gap: 16px;
  align-items: center;
}

.social-link {
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
  display: flex;
  align-items: center;
  text-decoration: none;
}

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

.social-link .icon {
  width: 20px;
  height: 20px;
}

.search-toggle {
  background: none;
  border: none;
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color var(--transition-fast);
}

.search-toggle:hover {
  color: var(--color-primary);
}

/* Mobile Menu
   ========================================================================== */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.hamburger-line {
  width: 24px;
  height: 2px;
  background: var(--color-text-secondary);
  transition: var(--transition-base);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(13, 17, 23, 0.98);
  backdrop-filter: blur(10px);
  z-index: var(--z-mobile-menu);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.mobile-menu.active {
  opacity: 1;
  pointer-events: all;
}

.mobile-menu-content {
  padding: 32px 24px;
}

.mobile-menu-content ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-menu-content li {
  margin: 0;
  padding: 0;
}

.mobile-menu-content a {
  display: block;
  padding: 16px 0;
  font-size: 1.125rem;
  color: var(--color-text-primary);
  border-bottom: 1px solid var(--color-border);
  text-decoration: none;
}

.mobile-menu-content a:hover,
.mobile-menu-content a.nav-current {
  color: var(--color-primary);
}

.mobile-menu-social {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Hero Featured Post
   ========================================================================== */
.hero-post {
  margin-bottom: 48px;
  border-radius: 8px;
  overflow: hidden;
  transition: transform var(--transition-base);
}

.hero-post:hover {
  transform: scale(1.02);
}

.hero-post-link {
  text-decoration: none;
  display: block;
}

.hero-post-background {
  height: 500px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.hero-post-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13, 17, 23, 0.95), rgba(13, 17, 23, 0.3));
  display: flex;
  align-items: flex-end;
  padding: 48px;
}

.hero-post-content {
  max-width: 800px;
}

.hero-post-tag {
  display: inline-block;
  background: var(--color-secondary);
  color: var(--color-background);
  padding: 6px 16px;
  border-radius: 16px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 16px;
}

.hero-post-title {
  font-size: 2.5rem;
  color: var(--color-text-primary);
  margin-bottom: 16px;
  line-height: 1.2;
}

.hero-post-excerpt {
  font-size: 1.125rem;
  color: var(--color-text-secondary);
  margin-bottom: 16px;
  line-height: 1.6;
}

.hero-post-meta {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.hero-post-action .btn {
  display: inline-block;
}

/* Posts Grid
   ========================================================================== */
.posts-section {
  margin-bottom: 48px;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Post Card
   ========================================================================== */
.post-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-2px);
}

.post-card-link {
  text-decoration: none;
  color: inherit;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--color-background);
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-base);
}

.post-card:hover .post-card-image img {
  transform: scale(1.05);
}

.post-card-content {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card-tag {
  display: inline-block;
  color: var(--color-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.post-card-title {
  font-size: 1.25rem;
  margin-bottom: 12px;
  color: var(--color-text-primary);
  line-height: 1.4;
}

.post-card-excerpt {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  margin-bottom: 16px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-meta {
  color: var(--color-text-secondary);
  font-size: 0.85rem;
  display: flex;
  gap: 8px;
  align-items: center;
}

.meta-separator {
  color: var(--color-border);
}

.post-card-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--color-border);
}

.post-card-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Tag Pills
   ========================================================================== */
.tag-pill {
  display: inline-block;
  background: var(--color-border);
  color: var(--color-secondary);
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 0.85rem;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.tag-pill:hover {
  background: var(--color-secondary);
  color: var(--color-background);
  text-decoration: none;
}

/* Buttons
   ========================================================================== */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
  cursor: pointer;
  text-decoration: none;
  border: none;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-background);
}

.btn-primary:hover {
  background: var(--color-link-hover);
  transform: scale(1.02);
  text-decoration: none;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
}

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

/* Post Page
   ========================================================================== */
.post-hero {
  height: 400px;
  background-size: cover;
  background-position: center;
  position: relative;
  margin-bottom: 48px;
  border-radius: 8px;
  overflow: hidden;
}

.post-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13, 17, 23, 0.9), rgba(13, 17, 23, 0.3));
  display: flex;
  align-items: flex-end;
}

.post-hero-title {
  font-size: 3rem;
  color: var(--color-text-primary);
  padding: 48px;
  margin: 0;
}

.post-header {
  margin-bottom: 48px;
  padding-top: 48px;
}

.post-title {
  font-size: 2.5rem;
  margin-bottom: 24px;
  text-align: center;
}

.post-meta {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
}

.post-meta-items {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}

.post-meta-tag {
  color: var(--color-primary);
  text-decoration: none;
}

.post-meta-tag:hover {
  text-decoration: underline;
}

.post-content-wrapper {
  margin-bottom: 48px;
}

.post-layout {
  display: grid;
  grid-template-columns: 1fr 250px;
  gap: 48px;
  align-items: start;
}

.post-content {
  max-width: var(--content-max);
}

.post-content > * {
  margin-bottom: 1.5rem;
}

.post-content h2,
.post-content h3,
.post-content h4 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.post-content img {
  margin: 2rem 0;
}

/* Table of Contents
   ========================================================================== */
.table-of-contents {
  position: sticky;
  top: calc(var(--header-height) + 24px);
  max-height: calc(100vh - var(--header-height) - 48px);
  overflow-y: auto;
}

.toc-inner {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 20px;
}

.toc-title {
  font-size: 1rem;
  margin-bottom: 16px;
  color: var(--color-text-primary);
}

.toc-nav {
  font-size: 0.9rem;
}

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

.toc-nav li {
  margin-bottom: 8px;
}

.toc-nav a {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
  display: block;
  padding: 4px 0;
}

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

.toc-nav ul ul {
  padding-left: 16px;
  margin-top: 8px;
}

/* Post Footer
   ========================================================================== */
.post-footer {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--color-border);
}

.post-tags {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Page Template
   ========================================================================== */
.page-hero {
  height: 400px;
  background-size: cover;
  background-position: center;
  position: relative;
  margin-bottom: 48px;
  border-radius: 8px;
  overflow: hidden;
}

.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13, 17, 23, 0.9), rgba(13, 17, 23, 0.3));
  display: flex;
  align-items: flex-end;
}

.page-hero-title {
  font-size: 3rem;
  color: var(--color-text-primary);
  padding: 48px;
  margin: 0;
}

.page-header {
  margin-bottom: 48px;
  text-align: center;
}

.page-title {
  margin-bottom: 16px;
}

.page-excerpt {
  font-size: 1.25rem;
  color: var(--color-text-secondary);
}

.page-content {
  margin-bottom: 48px;
}

.page-footer {
  padding-top: 32px;
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.page-updated {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.page-tags {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* Tag Page
   ========================================================================== */
.tag-header {
  margin-bottom: 48px;
  text-align: center;
}

.tag-title {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.tag-prefix {
  color: var(--color-secondary);
}

.tag-description {
  font-size: 1.125rem;
  color: var(--color-text-secondary);
  margin-bottom: 8px;
}

.tag-count {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}

/* Author Page
   ========================================================================== */
.author-header {
  margin-bottom: 48px;
  text-align: center;
}

.author-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 24px;
  border: 3px solid var(--color-border);
}

.author-name {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.author-bio {
  font-size: 1.125rem;
  color: var(--color-text-secondary);
  margin-bottom: 16px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.author-meta {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.author-location,
.author-website {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
}

.author-website {
  text-decoration: none;
}

.author-website:hover {
  color: var(--color-primary);
}

.author-post-count {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}

/* Error Page
   ========================================================================== */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.error-content {
  text-align: center;
  max-width: 600px;
}

.error-code {
  font-size: 6rem;
  color: var(--color-primary);
  margin-bottom: 16px;
}

.error-title {
  font-size: 2rem;
  margin-bottom: 16px;
}

.error-description {
  font-size: 1.125rem;
  color: var(--color-text-secondary);
  margin-bottom: 32px;
}

.error-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
}

/* Pagination
   ========================================================================== */
.pagination {
  margin-top: 48px;
}

.pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.pagination-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  color: var(--color-text-primary);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.pagination-btn:hover:not(.disabled) {
  border-color: var(--color-primary);
  text-decoration: none;
}

.pagination-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.pagination-info {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}

/* Footer
   ========================================================================== */
.site-footer {
  background: var(--color-background);
  border-top: 1px solid var(--color-border);
  padding: 40px 0;
  margin-top: 48px;
}

.footer-content {
  text-align: center;
}

.footer-brand {
  margin-bottom: 16px;
  font-size: 1.125rem;
}

.footer-nav {
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.footer-nav a {
  color: var(--color-text-secondary);
  text-decoration: none;
}

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

.footer-nav .separator {
  margin: 0 12px;
  color: var(--color-border);
}

.footer-copyright {
  color: var(--color-text-secondary);
  font-size: 0.85rem;
}

.footer-copyright p {
  margin-bottom: 8px;
}

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

/* Responsive Design
   ========================================================================== */

/* Tablet */
@media (max-width: 1024px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .post-layout {
    grid-template-columns: 1fr;
  }
  
  .table-of-contents {
    display: none;
  }
  
  .hero-post-title {
    font-size: 2rem;
  }
  
  .hero-post-overlay {
    padding: 32px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  :root {
    --header-height: 56px;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  h3 {
    font-size: 1.25rem;
  }
  
  .container,
  .container-narrow {
    padding: 0 16px;
  }
  
  .navbar-nav,
  .navbar-social .social-link:not(.search-toggle) {
    display: none;
  }
  
  .mobile-menu-toggle,
  .mobile-menu {
    display: flex;
  }
  
  .mobile-menu-content nav ul {
    display: block;
  }
  
  .posts-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-post-background {
    height: 400px;
  }
  
  .hero-post-overlay {
    padding: 24px;
  }
  
  .hero-post-title {
    font-size: 1.75rem;
  }
  
  .hero-post-excerpt {
    font-size: 1rem;
  }
  
  .post-hero {
    height: 300px;
    margin-bottom: 32px;
  }
  
  .post-hero-title {
    font-size: 2rem;
    padding: 24px;
  }
  
  .post-title {
    font-size: 2rem;
  }
  
  .error-code {
    font-size: 4rem;
  }
  
  .pagination-container {
    flex-direction: column;
  }
  
  .pagination-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Icon Helper
   ========================================================================== */
.icon {
  display: inline-block;
  vertical-align: middle;
}

/* Ghost Content Card Widths (Required)
   ========================================================================== */
.kg-width-wide {
  position: relative;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  max-width: 1200px;
}

.kg-width-full {
  position: relative;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

/* Ghost Bookmark Card */
.kg-bookmark-card {
  width: 100%;
  margin: 2rem 0;
}

.kg-bookmark-container {
  display: flex;
  text-decoration: none;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--color-surface);
  transition: border-color var(--transition-fast);
}

.kg-bookmark-container:hover {
  border-color: var(--color-primary);
}

.kg-bookmark-content {
  flex: 1;
  padding: 20px;
}

.kg-bookmark-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 8px;
}

.kg-bookmark-description {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  margin-bottom: 12px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kg-bookmark-metadata {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}

.kg-bookmark-icon {
  width: 16px;
  height: 16px;
}

.kg-bookmark-author::after {
  content: "•";
  margin: 0 8px;
}

.kg-bookmark-publisher {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kg-bookmark-thumbnail {
  flex: 0 0 200px;
  min-height: 160px;
}

.kg-bookmark-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Ghost Gallery Card */
.kg-gallery-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 2rem 0;
}

.kg-gallery-row {
  display: flex;
  gap: 16px;
}

.kg-gallery-image {
  flex: 1;
}

.kg-gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

/* Ghost Image Card */
.kg-image-card {
  margin: 2rem 0;
}

.kg-image {
  max-width: 100%;
  height: auto;
}

.kg-image-card figcaption {
  text-align: center;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  font-style: italic;
  margin-top: 0.5rem;
}

/* Ghost Embed Card */
.kg-embed-card {
  margin: 2rem 0;
}

.kg-embed-card iframe {
  width: 100%;
  border-radius: 8px;
}

/* Ghost Card Responsive */
@media (max-width: 768px) {
  .kg-bookmark-thumbnail {
    display: none;
  }
  
  .kg-gallery-row {
    flex-direction: column;
  }
  
  .kg-width-wide,
  .kg-width-full {
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
  }
}

/* Utility Classes
   ========================================================================== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Print Styles
   ========================================================================== */
@media print {
  .site-header,
  .site-footer,
  .pagination,
  .table-of-contents,
  .reading-progress-bar {
    display: none;
  }
  
  .site-main {
    padding-top: 0;
  }
  
  body {
    background: white;
    color: black;
  }
}
