/* Shared Styles for All Subsites */

/*
 * This file contains shared styles used across:
 * - Main blog (app.py)
 * - HLC webcomic subsite (hlc_app.py) 
 * - Design notes section
 * 
 * Includes:
 * - Theme variables and color schemes
 * - Base typography and headings
 * - Layout components (header, footer, navigation)
 * - Shared UI components (cards, badges, tags)
 * - Post content base styling
 * - Interactive features (lightbox, ToC, etc.)
 */

/* Linux Libertine and Biolinum fonts (Libertinus) */
@import url('https://fonts.cdnfonts.com/css/libertinus-serif');
@import url('https://fonts.cdnfonts.com/css/libertinus-sans');
/* Fallback Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&display=swap');
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&display=swap');

:root {
  /* Background colors - Gruvbox Light */
  --bg-primary: #fbf1c7;
  --bg-secondary: #f2e5bc;
  --bg-tertiary: #ebdbb2;
  --bg-accent: #d5c4a1;
  --bg-light: #f9f5d7;
  
  /* Background RGB values for transparency */
  --bg-primary-rgb: 251, 241, 199;
  --bg-secondary-rgb: 242, 229, 188;
  --bg-tertiary-rgb: 235, 219, 178;
  --bg-accent-rgb: 213, 196, 161;
  
  /* Foreground colors */
  --fg-primary: #3c3836;
  --fg-secondary: #504945;
  --fg-tertiary: #665c54;
  --fg-accent: #7c6f64;
  
  /* Text colors */
  --text-color: var(--fg-primary);
  --text-muted: var(--fg-tertiary);
  --border-color: var(--bg-accent);
  
  /* Gruvbox accent colors */
  --red: #cc241d;
  --green: #98971a;
  --yellow: #d79921;
  --blue: #458588;
  --purple: #b16286;
  --aqua: #689d6a;
  --orange: #d65d0e;
  
  /* Primary colors */
  --primary-color: var(--blue);
  --primary-color-rgb: 69, 133, 136;
  --secondary-color: var(--fg-tertiary);
  --accent-color: var(--aqua);
  
  /* Typography */
  --font-body: 'Libertinus Serif', 'Linux Libertine O', 'Libre Baskerville', 'Times New Roman', serif;
  --font-heading: 'Libertinus Sans', 'Linux Biolinum O', 'IBM Plex Sans', 'Liberation Sans', sans-serif;
  
  /* Shadows */
  --shadow: 0 2px 4px rgba(60, 56, 54, 0.1);
  --shadow-lg: 0 8px 16px rgba(60, 56, 54, 0.15);
  
  /* Badges */
  --badge-dark-color: var(--fg-primary);
  --badge-light-color: var(--bg-accent);
  --badge-category-text: var(--text-color);
  --badge-subcategory-text: var(--text-muted);
  
  /* Layout */
  --header-height: 80px;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Background colors - Gruvbox Dark */
    --bg-primary: #282828;
    --bg-secondary: #32302f;
    --bg-tertiary: #3c3836;
    --bg-accent: #504945;
    --bg-light: #1d2021;
    
    /* Background RGB values for transparency */
    --bg-primary-rgb: 40, 40, 40;
    --bg-secondary-rgb: 50, 48, 47;
    --bg-tertiary-rgb: 60, 56, 54;
    --bg-accent-rgb: 80, 73, 69;
    
    /* Foreground colors */
    --fg-primary: #ebdbb2;
    --fg-secondary: #d5c4a1;
    --fg-tertiary: #bdae93;
    --fg-accent: #a89984;
    
    /* Gruvbox accent colors - dark variants */
    --red: #fb4934;
    --green: #b8bb26;
    --yellow: #fabd2f;
    --blue: #83a598;
    --purple: #d3869b;
    --aqua: #8ec07c;
    --orange: #fe8019;
    
    /* Primary colors */
    --primary-color-rgb: 131, 165, 152;
    
    /* Shadows */
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.4);
  }
}

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

/* Restore list styling for content areas */
.post-content ul, 
.note-content ul,
.page-content ul,
.ai-disclosure-content ul,
.coi-disclosure-content ul,
.tools-disclosure-content ul,
.acknowledgements-disclosure-content ul,
.endnotes-disclosure-content ul {
  padding-left: 2rem;
  margin-bottom: 1.5rem;
}

.post-content ol, 
.note-content ol,
.page-content ol,
.ai-disclosure-content ol,
.coi-disclosure-content ol,
.tools-disclosure-content ol,
.acknowledgements-disclosure-content ol,
.endnotes-disclosure-content ol {
  padding-left: 2rem;
  margin-bottom: 1.5rem;
}

.post-content li,
.note-content li,
.page-content li,
.ai-disclosure-content li,
.coi-disclosure-content li,
.tools-disclosure-content li,
.acknowledgements-disclosure-content li,
.endnotes-disclosure-content li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.post-content ul li,
.note-content ul li,
.page-content ul li,
.ai-disclosure-content ul li,
.coi-disclosure-content ul li,
.tools-disclosure-content ul li,
.acknowledgements-disclosure-content ul li,
.endnotes-disclosure-content ul li {
  list-style-type: disc;
}

.post-content ol li,
.note-content ol li,
.page-content ol li,
.ai-disclosure-content ol li,
.coi-disclosure-content ol li,
.tools-disclosure-content ol li,
.acknowledgements-disclosure-content ol li,
.endnotes-disclosure-content ol li {
  list-style-type: decimal;
}

/* Remove underlines from all links */
a, a:hover, a:focus, a:active, a:visited {
  text-decoration: none !important;
}
html, body { 
  font-family: var(--font-body); 
  font-size: 18px; 
  line-height: 1.7; 
  color: var(--text-color); 
  background-color: var(--bg-primary); 
  margin: 0; 
  padding: 0; 
  min-height: 100vh; 
}

/* Link styling with rounded background for body text links only */
/* Unified content link styles - applies to all content areas */
.post-content a, 
.about-page a, 
.note-content a, 
.page-content a,
.ai-disclosure-content a,
.coi-disclosure-content a,
.tools-disclosure-content a,
.acknowledgements-disclosure-content a,
.post-footer .read-more { 
    color: var(--blue) !important; 
    text-decoration: none !important; 
    transition: all 0.2s ease !important; 
    background-color: rgba(69, 133, 136, 0.1) !important; /* Light blue background */
    padding: 0.2rem 0.4rem !important; 
    border-radius: 0.3rem !important; 
}

.post-content a:hover, 
.about-page a:hover, 
.note-content a:hover, 
.page-content a:hover,
.ai-disclosure-content a:hover,
.coi-disclosure-content a:hover,
.tools-disclosure-content a:hover,
.acknowledgements-disclosure-content a:hover,
.post-footer .read-more:hover { 
    color: var(--aqua) !important; 
    background-color: rgba(142, 192, 124, 0.25) !important; /* Stronger green on hover */
    text-decoration: none !important; 
    transform: translateY(-1px) !important; /* Subtle lift effect */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important; /* Subtle shadow */
}

/* Note: All content area link styles (.note-content, .ai-disclosure-content, etc.) 
   are now handled by the unified content link styles above */

/* Tag Badge Styles */
.tag-badge {
  display: inline-flex;
  align-items: stretch;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 500;
  border-radius: 0.4rem;
  overflow: hidden;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: var(--shadow);
  margin: 0.15rem 0.25rem 0.15rem 0;
  max-width: fit-content;
  border: none;
}

.tag-badge:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.tag-badge-category {
  background-color: var(--bg-accent);
  color: var(--text-color);
  padding: 0.2rem 0.4rem;
  font-weight: 600;
  border-top-left-radius: 0.3rem;
  border-bottom-left-radius: 0.3rem;
  border: none;
  outline: none;
  display: flex;
  align-items: center;
}

.tag-badge-subcategory {
  background-color: var(--bg-secondary);
  color: var(--text-muted);
  padding: 0.2rem 0.4rem;
  font-weight: 500;
  border: none;
  outline: none;
  display: flex;
  align-items: center;
}

.tag-badge-count {
  background-color: var(--bg-accent);
  color: var(--text-color);
  padding: 0.2rem 0.4rem;
  font-weight: 600;
  border-top-right-radius: 0.3rem;
  border-bottom-right-radius: 0.3rem;
  font-size: 0.65rem;
  min-width: 1.2rem;
  text-align: center;
  border: none;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Large tag badge for titles */
.tag-badge-large {
  font-size: 1rem;
  border-radius: 0.5rem;
  margin: 0 0.5rem;
  vertical-align: middle;
  display: inline-flex;
}

.tag-badge-large .tag-badge-category {
  padding: 0.4rem 0.6rem;
  border-radius: 0.4rem 0 0 0.4rem;
}

.tag-badge-large .tag-badge-subcategory {
  padding: 0.4rem 0.6rem;
  border-radius: 0 0.4rem 0.4rem 0;
}

.tag-badge-large .tag-badge-count {
  padding: 0.4rem 0.6rem;
  border-radius: 0 0.4rem 0.4rem 0;
}

/* Hyphenation, word wrapping, and ligatures */
html { 
    hyphens: auto; 
    -webkit-hyphens: auto; 
    -moz-hyphens: auto; 
    -ms-hyphens: auto;
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-feature-settings: "liga" 1, "clig" 1, "dlig" 1;
    -webkit-font-feature-settings: "liga" 1, "clig" 1, "dlig" 1;
    -moz-font-feature-settings: "liga" 1, "clig" 1, "dlig" 1;
    font-variant-ligatures: common-ligatures discretionary-ligatures;
    -webkit-font-variant-ligatures: common-ligatures discretionary-ligatures;
}
h1, h2, h3, h4, h5, h6 { 
  font-family: var(--font-heading); 
  margin-top: 1.5em; 
  margin-bottom: 0.5em; 
  font-variant: small-caps; 
  font-weight: normal; 
}
.post-content h1, .post-content h2, .post-content h3, .post-content h4, .post-content h5, .post-content h6,
.note-content h1, .note-content h2, .note-content h3, .note-content h4, .note-content h5, .note-content h6 { 
  text-align: left; 
}

/* Ensure post content headings inherit proper colors */
.post-content h1, .note-content h1 { color: var(--red); }
.post-content h2, .note-content h2 { color: var(--orange); }
.post-content h3, .note-content h3 { color: var(--yellow); }
.post-content h4, .note-content h4 { color: var(--green); }
.post-content h5, .note-content h5 { color: var(--blue); }
.post-content h6, .note-content h6 { color: var(--purple); }
h1 { font-size: 2.2em; color: var(--red); font-weight: normal; }
h2 { font-size: 1.8em; color: var(--orange); font-weight: normal; }
h3 { font-size: 1.5em; color: var(--yellow); font-weight: normal; }
h4 { font-size: 1.3em; color: var(--green); font-weight: normal; }
h5 { font-size: 1.1em; color: var(--blue); font-weight: normal; }
h6 { font-size: 1em; color: var(--purple); font-weight: normal; }
.blog-layout { min-height: 100vh; display: flex; flex-direction: column; background-color: var(--bg-primary); }
.container { max-width: 800px; margin: 0 auto; padding: 2rem 1.5rem 0 1.5rem; flex: 1; }
.site-header { 
  background: rgba(var(--bg-secondary-rgb), 0.8);
  border-bottom: 2px solid var(--border-color); 
  box-shadow: var(--shadow); 
  position: sticky; 
  top: 0; 
  z-index: 1000; 
  backdrop-filter: blur(12px); 
  -webkit-backdrop-filter: blur(12px);
}

.site-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='1' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.8 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  opacity: 0.3;
  pointer-events: none;
  z-index: 1;
}
.navbar { padding: 1.2rem 0; position: relative; z-index: 2; }
.nav-container { 
  max-width: 1200px; 
  margin: 0 auto; 
  padding: 0 1.5rem; 
  display: grid; 
  grid-template-columns: 1fr auto 1fr; 
  align-items: center; 
  gap: 1rem;
}
.brand { 
  text-decoration: none; 
  color: var(--text-color); 
  display: flex; 
  align-items: center; 
  justify-self: start;
}
.brand img { transition: transform 0.2s ease; }
.brand:hover img { transform: scale(1.05); }
.nav-links { 
  display: flex; 
  gap: 2.5rem; 
  list-style: none; 
  justify-self: center;
}

.nav-links a { 
  color: var(--text-color); 
  font-family: var(--font-heading); 
  text-decoration: none; 
  font-weight: 500; 
  transition: color 0.2s ease;
  border: none;
  outline: none;
  background: none;
}

.nav-links a:hover,
.nav-links a:focus { 
  color: var(--red); 
  text-decoration: none;
  outline: none;
}

/* Dropdown menu styling */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-trigger {
  color: var(--text-color);
  font-family: var(--font-heading);
  font-weight: 500;
  cursor: pointer;
  padding: 0.5rem 1rem;
  transition: color 0.2s ease;
  user-select: none;
}

.dropdown-trigger:hover {
  color: var(--red);
}

.dropdown-trigger::after {
  content: " ▼";
  font-size: 0.7rem;
  margin-left: 0.5rem;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-light);
  border: 2px solid var(--border-color);
  border-radius: 0.5rem;
  box-shadow: var(--shadow-lg);
  min-width: 160px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  padding: 0;
  margin: 0;
  list-style: none;
}

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

.dropdown-menu li {
  margin: 0;
  padding: 0;
}

.dropdown-menu a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text-color);
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  border-radius: 0;
}

.dropdown-menu a:hover {
  background: var(--bg-secondary);
  color: var(--red);
}

.dropdown-menu li:first-child a {
  border-top-left-radius: 0.375rem;
  border-top-right-radius: 0.375rem;
}

.dropdown-menu li:last-child a {
  border-bottom-left-radius: 0.375rem;
  border-bottom-right-radius: 0.375rem;
}

.nav-links a::before,
.nav-links a::after {
  display: none;
}
.theme-toggle {
  justify-self: end;
}

/* Mobile responsive navigation */
@media (max-width: 768px) {
  .site-header {
    position: relative; /* Remove sticky positioning on mobile */
  }
  
  .navbar {
    padding: 1rem 0;
  }
  
  .nav-container {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 1rem;
    text-align: center;
  }
  
  .brand {
    justify-self: center;
    order: 1;
  }
  
  .nav-links {
    justify-self: center;
    order: 2;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
  }
  
  .theme-toggle {
    justify-self: center;
    order: 3;
  }
  
  /* Adjust dropdown positioning for mobile */
  .dropdown-menu {
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
  }
  
  .dropdown:hover .dropdown-menu {
    transform: translateX(-50%) translateY(0);
  }
}
.page-title { font-size: 2.5rem; font-weight: normal; margin-bottom: 1rem; color: var(--text-color); font-family: var(--font-heading); 
             border-bottom: 3px solid var(--accent-color); padding-bottom: 0.5rem; display: inline-block; }
.post-card { border: 2px solid var(--border-color); border-radius: 0.75rem; padding: 2.5rem; margin-bottom: 3rem; 
            background: var(--bg-light); box-shadow: var(--shadow); }
.post-card.preview { transition: all 0.3s ease; }
.post-card.preview:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); border-color: var(--primary-color); }

/* Ensure full article containers have no hover effects */
.post-card:not(.preview) {
  transition: none !important;
}
.post-card:not(.preview):hover {
  box-shadow: var(--shadow) !important;
  transform: none !important;
  border-color: var(--border-color) !important;
}
.post-card.featured { border-left: 6px solid var(--accent-color); background: var(--bg-secondary); }
.post-card.featured:not(.preview) { background: var(--bg-light); border-left: 2px solid var(--border-color); }
.post-title { margin: 0 0 0.75rem 0; font-size: 1.8rem; font-weight: normal; font-family: var(--font-heading); text-align: center !important; }
.post-title a { text-decoration: none; color: var(--red) !important; transition: color 0.2s ease; }
.post-title a:hover { color: var(--primary-color) !important; text-decoration: none !important; }
.post-meta { display: flex; align-items: center; justify-content: center; gap: 0.75rem; color: var(--text-muted); font-size: 0.9rem; 
            font-family: var(--font-heading); font-weight: 400; margin-bottom: 1rem; }
/* Author profile social media link widgets */
.author-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--bg-tertiary);
  color: var(--text-color);
  padding: 0.4rem 0.8rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
  margin: 0.2rem 0.3rem 0.2rem 0;
}

.author-link:hover {
  background: var(--primary-color);
  color: var(--bg-primary);
  border-color: var(--primary-color);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.author-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 1rem;
  justify-content: center;
}

/* Post author link (for author name in post meta) */
.post-author-link { color: var(--primary-color); text-decoration: none; transition: color 0.2s ease; }
.post-author-link:hover { color: var(--accent-color); text-decoration: none !important; }

/* Author page styling */
.author-page {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

/* Structured author page layout */
.author-page-structured {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.author-profile-container {
  border: 2px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 2.5rem;
  background: var(--bg-light);
  box-shadow: var(--shadow);
}

/* Inline header with avatar and name */
.author-header-inline {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.author-avatar-inline {
  width: 80px;
  height: 80px;
  object-fit: cover;
  flex-shrink: 0;
}

.author-name-inline {
  margin: 0;
  font-size: 2.5rem;
  font-weight: normal;
  color: var(--red);
  font-family: var(--font-heading);
}

/* Justified bio with hyphenation */
.author-bio-justified {
  color: var(--text-color);
  line-height: 1.7;
  margin-bottom: 2rem;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
  -moz-hyphens: auto;
  font-family: var(--font-body);
}

/* Links container without title */
.author-links-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Author card styling */
.author-card {
  background: var(--bg-light);
  border: 2px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 2.5rem;
  box-shadow: var(--shadow);
  text-align: center;
  transition: all 0.3s ease;
}


.author-card-full {
  max-width: 700px;
  margin: 0 auto;
}

.author-card-compact {
  padding: 1.5rem;
}

.author-card-minimal {
  padding: 1rem;
  border: 1px solid var(--border-color);
}

/* Author avatar */
.author-avatar {
  margin-bottom: 1.5rem;
}

.author-avatar img {
  display: inline-block;
  animation: slowRotate 80s linear infinite;
}

@keyframes slowRotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Author info section */
.author-info {
  text-align: center;
}

.author-name {
  color: var(--red);
  margin-bottom: 1rem;
  font-family: var(--font-heading);
  font-weight: 600;
}

.author-bio {
  color: var(--text-color);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.author-bio.compact {
  font-size: 1rem;
  margin-bottom: 1rem;
}

/* Author badge styling (for inline usage) */
.author-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.5rem;
  background: var(--bg-secondary);
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
}

.author-badge-avatar {
  display: inline-block;
  vertical-align: middle;
}

.author-badge-name {
  font-weight: 500;
  color: var(--text-color);
}

.author-badge-link {
  text-decoration: none;
  transition: all 0.2s ease;
}

.author-badge-link:hover {
  background: var(--bg-tertiary);
  border-radius: 0.5rem;
}

/* Author list styling */
.author-list-container {
  margin: 2rem 0;
}

.author-list-count {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.author-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.author-list-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.author-list-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.separator { color: var(--accent-color); font-weight: bold; }

/* Urbit address widgets */
.urbit-address {
  display: inline;
  color: var(--text-color);
  font-family: var(--font-mono, 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace);
  font-size: inherit;
  text-decoration: none;
  border-bottom: 1px dashed var(--text-muted);
  cursor: help;
}

.urbit-emoji {
  margin-right: 0.2rem;
  font-size: 0.8em;
}

.urbit-text {
  font-family: inherit;
}

/* Specific styling for different Urbit types */
.urbit-galaxy .urbit-emoji {
  font-size: 0.9em; /* Slightly larger for galaxy */
}

.urbit-star .urbit-emoji {
  font-size: 0.8em;
}

.urbit-planet .urbit-emoji {
  font-size: 0.8em;
}
.post-content { 
    color: var(--text-color); 
    line-height: 1.7; 
    margin-top: 1.5rem;
    margin-bottom: 1.5rem; 
    font-family: var(--font-body); 
    hyphens: auto !important; 
    -webkit-hyphens: auto !important; 
    -moz-hyphens: auto !important; 
    -ms-hyphens: auto !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    text-align: justify;
    hyphenate-limit-chars: 6 3 2;
    -webkit-hyphenate-limit-before: 3;
    -webkit-hyphenate-limit-after: 2;
}

/* Center excerpts in post cards */
.post-card.preview .post-content {
    text-align: center;
}

.post-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
    margin-top: 1.5rem;
}

/* Center tags in posts */
.post-tags {
    text-align: center;
    margin-bottom: 1rem;
}

.tag-badges-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.post-tags .tag-badges-container,
.post-footer .tag-badges-container {
    justify-content: center;
}

/* Hero Image Styles */
.post-card.has-hero {
  overflow: hidden;
  position: relative;
}

/* Preview card hero image */
.card-hero-container {
  position: relative;
  width: calc(100% + 5rem);
  margin: -2.5rem -2.5rem 1.5rem -2.5rem;
  height: 200px;
  overflow: hidden;
  border-radius: 0.625rem 0.625rem 0 0;
}

.card-hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-fade-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(to bottom, 
    transparent 0%, 
    transparent 40%, 
    var(--bg-light) 90%, 
    var(--bg-light) 100%);
  pointer-events: none;
}

.post-card.featured .hero-fade-overlay {
  background: linear-gradient(to bottom, 
    transparent 0%, 
    transparent 40%, 
    var(--bg-secondary) 90%, 
    var(--bg-secondary) 100%);
}

.chapter-card .hero-fade-overlay {
  background: linear-gradient(to bottom, 
    transparent 0%, 
    transparent 40%, 
    var(--bg-secondary) 90%, 
    var(--bg-secondary) 100%);
}

/* Full post hero image */
.post-hero-container {
  margin: -2.5rem -2.5rem 2rem -2.5rem;
  width: calc(100% + 5rem);
  max-height: 400px;
  overflow: hidden;
  position: relative;
  border-radius: 0.625rem 0.625rem 0 0;
}

.post-hero-image {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: cover;
  object-position: center;
}

/* Adjust header spacing when hero image is present */
.post-header {
  text-align: center;
}

.post-card.has-hero .post-header {
  margin-top: -1rem;
  position: relative;
}
.post-content p { margin-bottom: 1.5rem; }
.post-content p:last-child { margin-bottom: 0; }
.post-content h1, .post-content h2, .post-content h3, .post-content h4, .post-content h5, .post-content h6 { 
    word-break: break-word !important; }
.site-footer { border-top: 2px solid var(--border-color); background: var(--bg-primary); margin-top: 4rem; }
.footer-content { max-width: 800px; margin: 0 auto; padding: 2rem 1.5rem; text-align: center; color: var(--text-muted); font-family: var(--font-body); font-size: 0.9em; }

/* Design note specific styling */
.note-title { margin: 0 0 0.75rem 0; font-size: 1.8rem; font-weight: normal; font-family: var(--font-heading); text-align: center !important; color: var(--red) !important; }
.note-meta { display: flex; align-items: center; justify-content: center; gap: 0.75rem; color: var(--text-muted); font-size: 0.9rem; 
            font-family: var(--font-heading); font-weight: 400; margin-bottom: 1rem; }
.note-content { 
    color: var(--text-color); 
    line-height: 1.7; 
    margin-top: 1.5rem;
    margin-bottom: 1.5rem; 
    font-family: var(--font-body); 
    hyphens: auto !important; 
    -webkit-hyphens: auto !important; 
    -moz-hyphens: auto !important; 
    -ms-hyphens: auto !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    text-align: justify;
    hyphenate-limit-chars: 6 3 2;
    -webkit-hyphenate-limit-before: 3;
    -webkit-hyphenate-limit-after: 2;
}
.note-content p { margin-bottom: 1.5rem; }
.note-content p:last-child { margin-bottom: 0; }
.note-content h1, .note-content h2, .note-content h3, .note-content h4, .note-content h5, .note-content h6 { 
    word-break: break-word !important; }

.note-header { text-align: center; margin-bottom: 2rem; }
.note-footer { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border-color); }

/* Design note full view uses same styling as post cards */
.design-note-full {
  border: 2px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 2.5rem;
  margin-bottom: 3rem;
  background: var(--bg-light);
  box-shadow: var(--shadow);
}

/* Section styling */
.posts-section { margin-bottom: 2rem; }
.section-title { margin-bottom: 2rem; color: var(--fg-primary); font-variant: small-caps; font-size: 1.5rem; text-align: center; }

/* Disclosures section styling */
.disclosures-section {
  margin: 2rem 0;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border-color);
}

.disclosures-section > * {
  margin-bottom: 1.5rem;
}

.disclosures-section > *:last-child {
  margin-bottom: 0;
}

/* Theme Toggle Button */
.theme-toggle { background: rgba(255, 255, 255, 0.5) !important; 
               backdrop-filter: blur(8px) !important;
               -webkit-backdrop-filter: blur(8px) !important;
               border: 1px solid rgba(255, 255, 255, 0.6) !important; 
               border-radius: 2rem !important; padding: 0.5rem 1rem !important; cursor: pointer !important; font-family: var(--font-heading) !important; font-weight: 500 !important; 
               color: var(--text-color) !important; transition: all 0.2s ease !important; display: flex !important; align-items: center !important; 
               position: static !important; font-size: inherit !important; min-width: auto !important; text-align: left !important; z-index: auto !important; line-height: normal !important; }
.theme-toggle:hover { background: rgba(255, 255, 255, 0.7) !important; 
                     color: var(--text-color) !important; 
                     border-color: rgba(255, 255, 255, 0.8) !important; 
                     transform: none !important; box-shadow: none !important; }

/* Dark mode theme toggle */
.theme-dark .theme-toggle { 
  background: rgba(0, 0, 0, 0.2) !important; 
  border-color: rgba(255, 255, 255, 0.15) !important; 
}
.theme-dark .theme-toggle:hover { 
  background: rgba(0, 0, 0, 0.3) !important; 
  border-color: rgba(255, 255, 255, 0.25) !important; 
}

/* Theme classes for manual override */
.theme-light { color-scheme: light; }
.theme-dark { color-scheme: dark; }

/* Force light theme */
.theme-light {
  /* Background colors */
  --bg-primary: #fbf1c7 !important;
  --bg-secondary: #f2e5bc !important;
  --bg-tertiary: #ebdbb2 !important;
  --bg-accent: #d5c4a1 !important;
  --bg-light: #f9f5d7 !important;
  
  /* Background RGB values for transparency */
  --bg-primary-rgb: 251, 241, 199 !important;
  --bg-secondary-rgb: 242, 229, 188 !important;
  --bg-tertiary-rgb: 235, 219, 178 !important;
  --bg-accent-rgb: 213, 196, 161 !important;
  
  /* Foreground colors */
  --fg-primary: #3c3836 !important;
  --fg-secondary: #504945 !important;
  --fg-tertiary: #665c54 !important;
  --fg-accent: #7c6f64 !important;
  
  /* Text colors */
  --text-color: var(--fg-primary) !important;
  --text-muted: var(--fg-tertiary) !important;
  --border-color: var(--bg-accent) !important;
  
  /* Accent colors */
  --red: #cc241d !important;
  --green: #98971a !important;
  --yellow: #d79921 !important;
  --blue: #458588 !important;
  --purple: #b16286 !important;
  --aqua: #689d6a !important;
  --orange: #d65d0e !important;
  
  /* Primary colors */
  --primary-color: var(--blue) !important;
  --accent-color: var(--aqua) !important;
  
  /* Shadows */
  --shadow: 0 2px 4px rgba(60, 56, 54, 0.1) !important;
  --shadow-lg: 0 8px 16px rgba(60, 56, 54, 0.15) !important;
}

/* Force dark theme */
.theme-dark {
  /* Background colors */
  --bg-primary: #282828 !important;
  --bg-secondary: #32302f !important;
  --bg-tertiary: #3c3836 !important;
  --bg-accent: #504945 !important;
  --bg-light: #1d2021 !important;
  
  /* Background RGB values for transparency */
  --bg-primary-rgb: 40, 40, 40 !important;
  --bg-secondary-rgb: 50, 48, 47 !important;
  --bg-tertiary-rgb: 60, 56, 54 !important;
  --bg-accent-rgb: 80, 73, 69 !important;
  
  /* Foreground colors */
  --fg-primary: #ebdbb2 !important;
  --fg-secondary: #d5c4a1 !important;
  --fg-tertiary: #bdae93 !important;
  --fg-accent: #a89984 !important;
  
  /* Text colors */
  --text-color: var(--fg-primary) !important;
  --text-muted: var(--fg-tertiary) !important;
  --border-color: var(--bg-accent) !important;
  
  /* Accent colors */
  --red: #fb4934 !important;
  --green: #b8bb26 !important;
  --yellow: #fabd2f !important;
  --blue: #83a598 !important;
  --purple: #d3869b !important;
  --aqua: #8ec07c !important;
  --orange: #fe8019 !important;
  
  /* Primary colors */
  --primary-color: var(--blue) !important;
  --accent-color: var(--aqua) !important;
  
  /* Shadows */
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.4) !important;
}

/* AI Disclosure Card Styles */
.ai-disclosure-card {
  border: 2px solid var(--border-color);
  border-radius: 0.75rem;
  margin: 2rem 0;
  background: var(--bg-light);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.ai-disclosure-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.2s ease;
}

.ai-disclosure-header:hover {
  background: var(--bg-tertiary);
}

.ai-disclosure-header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ai-disclosure-icon {
  font-size: 1.2rem;
}

.ai-disclosure-title {
  font-weight: 600;
  color: var(--text-color);
  font-family: var(--font-heading);
}

.ai-disclosure-header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.ai-disclosure-summary-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ai-disclosure-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-color);
  font-size: 1rem;
  cursor: pointer;
  padding: 0.25rem;
  transition: transform 0.2s ease;
}

.ai-disclosure-toggle-btn:hover {
  transform: scale(1.1);
}

.ai-disclosure-content {
  padding: 1.5rem;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-disclosure-content.collapsed {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  margin-top: 0;
  margin-bottom: 0;
}

.ai-disclosure-content.expanded {
  max-height: 1000px;
  opacity: 1;
}

.ai-disclosure-field {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.ai-disclosure-field:last-child {
  margin-bottom: 0;
}

.ai-disclosure-empty {
  color: var(--text-muted);
  font-style: italic;
}

/* CoI Disclosure Card Styles */
.coi-disclosure-card {
  border: 2px solid var(--border-color);
  border-radius: 0.75rem;
  margin: 2rem 0;
  background: var(--bg-light);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.coi-disclosure-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.2s ease;
}

.coi-disclosure-header:hover {
  background: var(--bg-tertiary);
}

.coi-disclosure-header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.coi-disclosure-icon {
  font-size: 1.2rem;
}

.coi-disclosure-title {
  font-weight: 600;
  color: var(--text-color);
  font-family: var(--font-heading);
}

.coi-disclosure-header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.coi-disclosure-summary-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.coi-disclosure-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-color);
  font-size: 1rem;
  cursor: pointer;
  padding: 0.25rem;
  transition: transform 0.2s ease;
}

.coi-disclosure-toggle-btn:hover {
  transform: scale(1.1);
}

.coi-disclosure-content {
  padding: 1.5rem;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.coi-disclosure-content.collapsed {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  margin-top: 0;
  margin-bottom: 0;
}

.coi-disclosure-content.expanded {
  max-height: 1000px;
  opacity: 1;
}

.coi-disclosure-field {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.coi-disclosure-field:last-child {
  margin-bottom: 0;
}

.coi-disclosure-empty {
  color: var(--text-muted);
  font-style: italic;
}

/* Tools Disclosure Card Styles */
.tools-disclosure-card {
  border: 2px solid var(--border-color);
  border-radius: 0.75rem;
  margin: 2rem 0;
  background: var(--bg-light);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.tools-disclosure-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.2s ease;
}

.tools-disclosure-header:hover {
  background: var(--bg-tertiary);
}

.tools-disclosure-header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tools-disclosure-title {
  font-weight: 600;
  color: var(--text-color);
  font-family: var(--font-heading);
}

.tools-disclosure-header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.tools-disclosure-summary-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tools-disclosure-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-color);
  font-size: 1rem;
  cursor: pointer;
  padding: 0.25rem;
  transition: transform 0.2s ease;
}

.tools-disclosure-toggle-btn:hover {
  transform: scale(1.1);
}

.tools-disclosure-content {
  padding: 1.5rem;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tools-disclosure-content.collapsed {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  margin-top: 0;
  margin-bottom: 0;
}

.tools-disclosure-content.expanded {
  max-height: 1000px;
  opacity: 1;
}

/* Tool Widget Styles */
.tools-widgets-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tool-widget {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background: var(--bg-tertiary);
  color: var(--text-color);
  text-decoration: none;
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.tool-widget:hover {
  background: var(--primary-color);
  color: var(--bg-primary);
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.tool-widget-name {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Table of Contents Sidebar */
.toc-sidebar {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 250px;
  height: auto;
  max-height: 70vh;
  z-index: 100;
  transition: transform 0.3s ease;
  overflow-y: auto;
  padding: 1rem;
}

.toc-sidebar.hidden {
  transform: translateY(-50%) translateX(-100%);
}

.toc-header {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-color);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

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

.toc-item {
  margin-bottom: 0.25rem;
}

.toc-link {
  display: block;
  padding: 0.25rem 0.5rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1.3;
  border-radius: 0.25rem;
  transition: all 0.2s ease;
  word-wrap: break-word;
  hyphens: auto;
}

.toc-link:hover {
  background: var(--bg-tertiary);
  opacity: 0.8;
}

.toc-link.active {
  background: rgba(var(--primary-color-rgb, 69, 133, 136), 0.2);
  font-weight: 600;
}

.toc-link.level-1 { 
  padding-left: 0.5rem; 
  font-weight: 600; 
  color: var(--red) !important;
}
.toc-link.level-2 { 
  padding-left: 1rem; 
  font-weight: 500;
  color: var(--orange) !important;
}
.toc-link.level-3 { 
  padding-left: 1.5rem; 
  color: var(--yellow) !important;
}
.toc-link.level-4 { 
  padding-left: 2rem; 
  color: var(--green) !important;
}
.toc-link.level-5 { 
  padding-left: 2.5rem; 
  color: var(--blue) !important;
}
.toc-link.level-6 { 
  padding-left: 3rem; 
  color: var(--purple) !important;
}

/* Hide ToC on small screens */
@media (max-width: 1200px) {
  .toc-sidebar {
    transform: translateY(-50%) translateX(-100%);
  }
}

/* Image Widget Styles */
.image-widget {
  margin: 2rem auto;
  text-align: center;
  max-width: 100%;
}

.content-image {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid var(--border-color);
}

.content-image:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: var(--primary-color);
}

.image-caption {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--red);
  font-style: italic;
  font-family: var(--font-heading);
  line-height: 1.4;
}

/* Lightbox Styles */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(var(--primary-color-rgb), 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: none;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease;
}

.lightbox-overlay.active {
  display: flex;
}

.lightbox-content {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  max-width: 90vw;
  max-height: 90vh;
  background: transparent;
  border-radius: 0.75rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  animation: zoomIn 0.3s ease;
}

.lightbox-image {
  max-width: 90vw;
  max-height: 75vh;
  display: block;
  object-fit: contain;
  border-radius: 0.75rem 0.75rem 0 0;
}

.lightbox-info {
  padding: 1.5rem;
  background: var(--bg-secondary);
  border-top: 2px solid var(--border-color);
  text-align: center;
  margin: 0;
  box-sizing: border-box;
  border-radius: 0 0 0.75rem 0.75rem;
}

.lightbox-caption {
  margin: 0;
  font-size: 1rem;
  color: var(--red);
  font-family: var(--font-heading);
  line-height: 1.5;
}

.lightbox-download-icon {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--bg-secondary);
  color: var(--text-color);
  border: 2px solid var(--border-color);
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-family: Arial, sans-serif;
  box-shadow: var(--shadow);
}

.lightbox-download-icon:hover {
  background: var(--bg-accent);
  transform: scale(1.1);
  color: var(--text-color);
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--bg-secondary);
  color: var(--text-color);
  border: 2px solid var(--border-color);
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-family: Arial, sans-serif;
  z-index: 10001;
  box-shadow: var(--shadow);
}

.lightbox-close:hover {
  background: var(--bg-accent);
  transform: scale(1.1);
  color: var(--text-color);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes zoomIn {
  from { 
    opacity: 0;
    transform: scale(0.8);
  }
  to { 
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 768px) {
  .lightbox-content {
    max-width: 95vw;
    max-height: 95vh;
  }
  
  .lightbox-image {
    max-height: 70vh;
  }
  
  .lightbox-info {
    padding: 1rem;
  }
  
  .lightbox-download-icon {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1rem;
  }
  
  .lightbox-close {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.2rem;
  }
}

/* Tags page styles */
.tags-section {
  max-width: 900px;
  margin: 0 auto;
}

.category-container {
  margin-bottom: 3rem;
  padding: 0.75rem 1.5rem 1.5rem 1.5rem;
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  box-shadow: var(--shadow);
}

.category-container-header {
  margin-bottom: 1.5rem;
}

.category-container-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-color);
  margin: 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
  font-family: var(--font-heading);
}

.subcategory-badges-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-start;
}

.subcategory-badge {
  display: inline-flex;
  align-items: stretch;
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 0.4rem;
  overflow: hidden;
  transition: all 0.2s ease;
  box-shadow: var(--shadow);
  border: none;
  max-width: fit-content;
}

.subcategory-badge:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}

.subcategory-badge-name {
  background-color: var(--badge-light-color, var(--bg-secondary));
  color: var(--badge-subcategory-text, var(--text-color));
  padding: 0.4rem 0.6rem;
  font-weight: 500;
  border-top-left-radius: 0.3rem;
  border-bottom-left-radius: 0.3rem;
  border: none;
  outline: none;
  display: flex;
  align-items: center;
  font-size: 0.8rem;
}

.subcategory-badge-count {
  background-color: var(--badge-dark-color, var(--bg-accent));
  color: var(--badge-count-text, var(--text-color));
  padding: 0.4rem 0.6rem;
  font-weight: 600;
  border-top-right-radius: 0.3rem;
  border-bottom-right-radius: 0.3rem;
  font-size: 0.75rem;
  min-width: 2rem;
  text-align: center;
  border: none;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .subcategory-badges-grid {
    gap: 0.5rem;
  }
  
  .category-container {
    padding: 0.5rem 1rem 1rem 1rem;
    margin-bottom: 2rem;
  }
}

/* Archive page styles */
.archive-section {
  max-width: 800px;
  margin: 0 auto;
}

.year-section {
  margin-bottom: 3rem;
}

.year-heading {
  font-size: 1.8rem;
  font-weight: normal;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
  font-family: var(--font-heading);
}

.archive-widgets {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.post-widget {
  display: inline-flex;
  align-items: stretch;
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 0.4rem;
  overflow: hidden;
  transition: all 0.2s ease;
  box-shadow: var(--shadow);
  margin-bottom: 0.5rem;
  max-width: fit-content;
  border: none;
}

.post-widget:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}

.post-widget-content {
  display: inline-flex;
  align-items: stretch;
}

.post-widget-type {
  background-color: var(--bg-accent);
  color: var(--text-color);
  padding: 0.3rem 0.5rem;
  font-weight: 600;
  border-top-left-radius: 0.3rem;
  border-bottom-left-radius: 0.3rem;
  border: none;
  outline: none;
  display: flex;
  align-items: center;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.post-widget-title {
  background-color: var(--bg-secondary);
  color: var(--text-color);
  padding: 0.3rem 0.5rem;
  font-weight: 500;
  border: none;
  outline: none;
  display: flex;
  align-items: center;
  flex: 1;
  font-size: 0.8rem;
}

.post-widget-date {
  background-color: var(--bg-accent);
  color: var(--text-muted);
  padding: 0.3rem 0.5rem;
  font-weight: 500;
  border-top-right-radius: 0.3rem;
  border-bottom-right-radius: 0.3rem;
  font-size: 0.7rem;
  min-width: 3rem;
  text-align: center;
  border: none;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Series indicator and navigation styles */
.series-indicator {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0.75rem !important;
  margin: 1rem auto !important;
  padding: 0.75rem 1rem !important;
  background: var(--bg-secondary) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 0.5rem !important;
  font-family: var(--font-heading) !important;
  font-size: 0.9rem !important;
  color: var(--text-color) !important;
  box-shadow: var(--shadow) !important;
  min-height: 3rem !important;
  width: 100% !important;
  text-align: left !important;
}

.series-indicator .series-info {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.25rem !important;
  flex: 1 !important;
  text-align: center !important;
}

.series-indicator .series-name {
  font-weight: 600 !important;
  color: var(--text-color) !important;
  font-size: 1rem !important;
}

.series-indicator .series-part {
  font-size: 0.8rem !important;
  color: var(--text-muted) !important;
  font-weight: 500 !important;
}

.series-indicator .series-nav-arrow {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 2rem !important;
  height: 2rem !important;
  background: var(--bg-tertiary) !important;
  color: var(--text-color) !important;
  text-decoration: none !important;
  border-radius: 0.25rem !important;
  font-weight: bold !important;
  font-size: 1rem !important;
  transition: all 0.2s ease !important;
  border: 1px solid var(--border-color) !important;
}

.series-indicator .series-nav-arrow:hover {
  background: var(--primary-color) !important;
  color: white !important;
  transform: translateY(-1px) !important;
  box-shadow: var(--shadow) !important;
}

/* Disabled arrow styles removed - arrows are now hidden when not relevant */

.series-navigation {
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--bg-light);
  border: 2px solid var(--border-color);
  border-radius: 0.75rem;
}

.series-nav-heading {
  margin: 0 0 1rem 0;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--text-color);
  text-align: center;
}

.series-nav-buttons {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.series-nav-btn {
  flex: 1;
  max-width: 45%;
  padding: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  text-decoration: none;
  color: var(--text-color);
  transition: all 0.2s ease;
}

.series-nav-btn:hover {
  background: var(--bg-tertiary);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.series-nav-spacer {
  flex: 1;
  max-width: 45%;
}

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

.nav-direction {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-color);
}

.nav-title {
  font-size: 0.9rem;
  line-height: 1.3;
}

.series-nav-prev .nav-content {
  text-align: left;
}

.series-nav-next .nav-content {
  text-align: right;
}

/* Theme classes already defined earlier in file */

/* Default browser reset styles */
ul, ol {
  list-style: none;
}

button, input, textarea, select {
  font: inherit;
}

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

/* Post Content Styling */
.post-content strong {
  color: var(--orange);
  font-weight: 600;
}

.post-content em {
  color: var(--purple);
  font-style: italic;
}

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

.post-content li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: var(--bg-light);
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.post-content th, .post-content td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.post-content th {
  background: var(--bg-tertiary);
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--text-color);
}

.post-content tr:last-child td {
  border-bottom: none;
}

/* Acknowledgements Disclosure Card Styles */
.acknowledgements-disclosure-card {
  border: 2px solid var(--border-color);
  border-radius: 0.75rem;
  margin: 2rem 0;
  background: var(--bg-light);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.acknowledgements-disclosure-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.2s ease;
}

.acknowledgements-disclosure-header:hover {
  background: var(--bg-tertiary);
}

.acknowledgements-disclosure-header-left {
  flex: 1;
}

.acknowledgements-disclosure-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-color);
  margin: 0;
}

.acknowledgements-disclosure-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.acknowledgements-disclosure-toggle-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-color);
  padding: 0.25rem;
  transition: transform 0.2s ease;
}

.acknowledgements-disclosure-toggle-btn:hover {
  transform: scale(1.1);
}

.acknowledgements-disclosure-content {
  padding: 1.5rem;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1.8;
  color: var(--text-secondary);
}

.acknowledgements-disclosure-content.collapsed {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  margin-top: 0;
  margin-bottom: 0;
}

.acknowledgements-disclosure-content.expanded {
  max-height: 1000px;
  opacity: 1;
}

.acknowledgements-disclosure-content p {
  margin: 0.75rem 0;
}

.acknowledgements-disclosure-content p:first-child {
  margin-top: 0;
}

.acknowledgements-disclosure-content p:last-child {
  margin-bottom: 0;
}

.acknowledgements-disclosure-content a {
  color: var(--link-color);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.acknowledgements-disclosure-content a:hover {
  border-bottom-color: var(--link-color);
}

.acknowledgements-disclosure-content ul,
.acknowledgements-disclosure-content ol {
  margin: 1rem 0;
  padding-left: 2rem;
}

.acknowledgements-disclosure-content li {
  margin: 0.5rem 0;
}

/* Endnotes Disclosure Card Styles */
.endnotes-disclosure-card {
  border: 2px solid var(--border-color);
  border-radius: 0.75rem;
  margin: 2rem 0;
  background: var(--bg-light);
  box-shadow: var(--shadow);
  overflow: hidden;
  border-left-color: #d79921; /* Amber accent for endnotes */
  border-left-width: 4px;
}

.endnotes-disclosure-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.2s ease;
  cursor: pointer;
}

.endnotes-disclosure-header:hover {
  background: var(--bg-tertiary);
}

.endnotes-disclosure-header-left {
  flex: 1;
}

.endnotes-disclosure-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-color);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.endnotes-disclosure-title::before {
  content: "📝";
  font-size: 1.2rem;
}

.endnotes-disclosure-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.endnotes-disclosure-summary {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: #d79921;
  color: var(--bg-primary);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-family: var(--font-mono);
}

.endnotes-disclosure-toggle-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-color);
  padding: 0.25rem;
  transition: transform 0.2s ease;
}

.endnotes-disclosure-toggle-btn:hover {
  transform: scale(1.1);
}

.endnotes-disclosure-content {
  padding: 1.5rem;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1.8;
  color: var(--text-secondary);
}

.endnotes-disclosure-content.collapsed {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  margin-top: 0;
  margin-bottom: 0;
}

.endnotes-disclosure-content.expanded {
  max-height: 2000px; /* Higher for multiple endnotes */
  opacity: 1;
}

/* Individual endnote styling */
.endnote-item {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.endnote-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.endnote-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-color);
  margin: 0 0 0.75rem 0;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.endnote-date {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

.endnote-content {
  line-height: 1.7;
}

.endnote-content p {
  margin: 0.75rem 0;
}

.endnote-content p:first-child {
  margin-top: 0;
}

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

.endnote-content a {
  color: var(--link-color);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.endnote-content a:hover {
  border-bottom-color: var(--link-color);
}

.endnote-content ul,
.endnote-content ol {
  margin: 1rem 0;
  padding-left: 2rem;
}

.endnote-content li {
  margin: 0.5rem 0;
}