/*
 * CSS CONVENTIONS & ARCHITECTURE
 * ==============================
 * 
 * NAMING CONVENTIONS:
 * - Components: .component-part (dash-separated, e.g., .vibe-panel, .toc-list)
 * - States: .is-active, .is-visible, .is-expanded, .is-hidden (standardized with .is-* prefix)
 * - Utilities: .mb-4, .hidden, .text-xl (single-purpose helpers)
 * - JavaScript hooks: Use IDs or data attributes (no styling on js-* classes)
 * 
 * FILE STRUCTURE:
 * - Line 20: Import variables from css/variables.css
 * - Lines 21-44: Reset (minified - DO NOT EDIT)
 * - Lines 45-111: Utilities (minified but functional)
 * - Lines 112+: Components (readable, organized by feature)
 * 
 * COMPONENT SECTIONS:
 * Each component section is marked with ========== comments
 * Add new components at the END of the file with proper section marking
 * 
 * RULES:
 * - Never style .js- prefixed classes (JavaScript hooks only)
 * - Components should be max 2 levels deep (.panel-header is OK, .panel-header-title-text is not)
 * - All new styles go in their appropriate section
 * - Comment your new component sections
 * - Preserve existing minified sections for performance
 * 
 * RESPONSIVE DESIGN:
 * - Mobile-first approach (base styles = mobile)
 * - Breakpoints: 640px (tablet), 1024px (desktop)
 * - Use CSS custom properties for consistent theming
 * 
 * TEAM COLLABORATION:
 * - Read CSS-GUIDE.md for detailed guidance
 * - Ask before adding new utility classes
 * - Test in both light and dark themes
 * - Verify accessibility (keyboard navigation, focus states)
 */

/* Import centralized CSS variables */
@import 'css/variables.css';

/* Optimized CSS - Critical sections minified, complex sections readable */

/* Critical Above-the-fold Styles - Minified for Performance */
*,*:before,*:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content:""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}

/* Utility Classes - Minified for performance */
*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));font-family:"Newsreader",Georgia,Times New Roman,serif;color:hsl(var(--foreground));-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-display:swap;font-optical-sizing:auto}h1,h2,h3,h4,h5,h6{font-family:"Newsreader",Georgia,Times New Roman,serif}h2{font-weight:bold}.academic-link{color:var(--link);text-decoration-line:underline;text-decoration-thickness:1px;text-underline-offset:4px;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s}.academic-link:hover{color:var(--link-hover)}.content-section{margin-bottom:2rem}.content-section:last-child{margin-bottom:0}.skip-link{position:absolute;top:-40px;left:6px;background:hsl(var(--foreground));color:hsl(var(--background));padding:8px 16px;border-radius:4px;text-decoration:none;font-weight:600;z-index:1000;transition:top var(--transition-slow) ease}.skip-link:focus{top:6px;outline:2px solid hsl(var(--link));outline-offset:2px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.hidden{display:none!important}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.flex-grow{flex-grow:1}.min-h-screen{min-height:100vh}.max-w-2xl{max-width:42rem}.max-w-none{max-width:none}.mx-auto{margin-left:auto;margin-right:auto}.mb-4{margin-bottom:1rem}.mb-8{margin-bottom:2rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-3{gap:.75rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.font-serif{font-family:"Newsreader",Georgia,Times New Roman,serif}.text-foreground{color:hsl(var(--foreground))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.bg-background{background-color:hsl(var(--background))}.bg-muted{background-color:hsl(var(--muted))}.bg-foreground{background-color:hsl(var(--foreground))}

/* ========================================================================== */
/* POST CONTENT COMPONENT - Blog post typography and layout                   */
/* ========================================================================== */
.prose {
  color: var(--tw-prose-body);
  max-width: 65ch;
}

.prose-lg {
  font-size: 1.25rem;
  line-height: 1.75rem;
}

.leading-relaxed {
  line-height: 1.625;
}

.post-content {
  font-size: 1.25rem;
  line-height: 1.75;
  color: hsl(var(--foreground));
  max-width: 70ch;
  text-align: left;
}

.post-meta h1 {
  font-size: 3rem;
  line-height: 1.2;
  font-weight: 400;
  margin-bottom: 1rem;
}

.post-content p {
  margin-bottom: 1.5rem;
  line-height: 1.75;
}

.post-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  line-height: 1.3;
  border-top: 1px solid hsl(var(--border));
  padding-top: 2rem;
}

.post-content h2:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 1.5rem;
}

/* Theme Toggle - Minified for performance */
.relative{position:relative}.h-6{height:1.5rem}.w-11{width:2.75rem}.h-4{height:1rem}.w-4{width:1rem}.w-6{width:1.5rem}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-1{--tw-translate-x:.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-6{--tw-translate-x:1.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rounded-full{border-radius:9999px}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-ring:focus{--tw-ring-color:hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px}.hover\:text-link:hover{color:var(--link)}

/* ============================================================================ */
/* READABLE RESPONSIVE SECTIONS - Complex media queries kept readable          */
/* ============================================================================ */

/* Screen Reader Only Content - Accessible but visually hidden */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}

/* Global Loading Indicator */
.global-loading {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1050;
  background-color: hsl(var(--background));
  border: 1px solid hsl(var(--border));
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.global-loading:not(.is-hidden) {
  opacity: 1;
  pointer-events: auto;
}

.global-loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid hsl(var(--muted));
  border-top: 3px solid hsl(var(--primary));
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.global-loading-text {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  font-weight: 500;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Reduced Motion Support - Important for accessibility */
/* Respects user's system preference for reduced motion (macOS, Windows, etc.) */
@media (prefers-reduced-motion: reduce) {
  /* Disable all transitions and animations globally */
  /* Uses !important to override any other transition declarations */
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }
  
  /* Specifically target theme system elements */
  .vibe-panel,
  .vibe-backdrop,
  .vibe-image,
  .vibe-panel-close,
  .vibe-panel-esc-hint,
  .vibe-panel-handle,
  .global-loading,
  .global-loading-spinner,
  .vibe-check-button,
  .linkedin-link,
  .skip-link,
  .academic-link,
  .transition,
  .transition-colors,
  #toggle-slider,
  .toc-panel,
  .toc-overlay,
  .hamburger-line,
  .close-line,
  .bio-expand-btn {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }
  
  /* Disable smooth scrolling */
  html {
    scroll-behavior: auto !important;
  }
  
  /* Disable the loading spinner animation */
  .global-loading-spinner {
    animation: none !important;
    transform: none !important;
  }
  
  /* Ensure theme panels appear instantly */
  .vibe-panel.is-visible {
    transform: translateY(0) !important;
  }
  
  .vibe-panel.is-hidden {
    transform: translateY(100%) !important;
  }
  
  /* Remove hover effects that rely on transitions */
  .vibe-check-button:active {
    transform: none !important;
  }
}

/* Posts List Styling */
.posts-list {
  font-size: 1.25rem; /* 20px to match rest of page */
  line-height: 1.5;
  list-style-type: disc; /* Show bullet points */
  padding-left: 1.5rem; /* Add indentation for bullets */
}

/* TOC Typography & Spacing Improvements */
.toc-panel .toc-header h3 {
  font-size: 1.5rem; /* 24px - larger, more prominent header */
  font-weight: 600;
  color: hsl(var(--foreground));
  margin: 0;
}

.toc-list {
  font-size: 1.25rem; /* 20px - larger, more readable list items */
  line-height: 1.5;
  margin: 0;
  padding: 0;
  list-style: none; /* Remove any default list styling */
}

.toc-list li {
  margin-bottom: 0.5rem; /* 8px - more generous spacing between items */
}

.toc-list a {
  display: block;
  color: hsl(var(--foreground));
  text-decoration: none;
  padding: 0.25rem 0;
  transition: color 0.1s ease;
  touch-action: manipulation; /* Eliminates 300ms delay on mobile */
}

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

/* Mobile-specific touch feedback for TOC links */
@media (max-width: 1023px) {
  .toc-list a {
    padding: 0.5rem 0; /* Larger touch targets */
  }
  
  .toc-list a:active {
    color: var(--link);
    transform: scale(0.98); /* Subtle scale-down for mobile tap feedback */
  }
}

/* TOC Active Highlighting */
.toc-list a.is-active {
  color: var(--link);
  font-weight: 600;
  background-color: hsl(var(--muted));
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  position: relative;
  display: inline-block;
  text-decoration: none;
  margin: -0.25rem -0.5rem;
}

/* Toggle Slider Fix - Ensure transform works */
#toggle-slider {
  transition: transform 0.2s ease;
}

#toggle-slider.translate-x-1 {
  transform: translateX(0.25rem);
}

#toggle-slider.translate-x-6 {
  transform: translateX(1.5rem);
}

/* Simple Responsive Utilities - Can stay minified */
@media (min-width: 640px) {
  .sm\:mb-12 { margin-bottom: 3rem; }
  .sm\:py-12 { padding-top: 3rem; padding-bottom: 3rem; }
  .sm\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
}

@media (min-width: 768px) {
  .post-meta h1 { font-size: 3.875rem; }
}

/* ========================================================================== */
/* TABLE OF CONTENTS COMPONENT - Navigation and scroll tracking               */
/* ========================================================================== */

/* Base TOC Toggle Styles */
.toc-toggle {
  position: fixed;
  z-index: 1000;
  width: 2.5rem;
  height: 2.5rem;
  background-color: hsl(var(--background));
  border: 1px solid hsl(var(--border));
  border-radius: .375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
}

.toc-toggle:hover {
  background-color: #a84d2b;
  border-color: #a84d2b;
}

.toc-toggle:focus {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

/* Desktop TOC Toggle Positioning */
@media (min-width: 1024px) {
  .toc-toggle {
    top: 2rem;
    left: 2rem;
    width: 3rem;
    height: 3rem;
  }
}

/* Mobile TOC Toggle - Complex responsive behavior */
@media (max-width: 1023px) {
  .toc-toggle {
    position: relative;
    top: auto;
    left: auto;
    width: 2.5rem;
    height: 2.5rem;
    box-shadow: none;
    border: 1px solid hsl(var(--border));
    background-color: hsl(var(--background));
    border-radius: .375rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .post-header .toc-toggle:hover {
    background-color: #a84d2b;
    border-color: #a84d2b;
  }
}

/* TOC Icon States */
.toc-icon {
  position: relative;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: .25rem;
}

.toc-icon.is-hidden {
  display: none !important;
}

.hamburger-line {
  width: 1.25rem;
  height: 2px;
  background-color: hsl(var(--foreground));
  transition: all .3s ease;
  transform-origin: center;
}

.close-line {
  position: absolute;
  width: 1.25rem;
  height: 2px;
  background-color: hsl(var(--foreground));
  transition: all .3s ease;
}

.close-line:first-child {
  transform: rotate(45deg);
}

.close-line:last-child {
  transform: rotate(-45deg);
}

/* TOC Panel - Complex responsive layout */
.toc-panel {
  position: fixed;
  z-index: 999;
  background-color: hsl(var(--background));
  border: none;
  border-radius: 0;
  padding: 0;
  
  /* Hidden by default - JavaScript controls visibility */
  opacity: 0;
  visibility: hidden;
  transition: opacity .15s ease, visibility .15s ease;
  
  /* Mobile-first: Full screen overlay that covers entire viewport */
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100vh;
  overflow-y: hidden; /* Prevent body scroll when panel is open */
  display: flex;
  flex-direction: column; /* Stack header and content vertically */
}

.toc-panel.is-visible {
  opacity: 1;
  visibility: visible;
}

/* Desktop TOC Panel - Complex positioning and sizing */
@media (min-width: 1024px) {
  .toc-panel {
    /* Desktop: Positioned sidebar instead of fullscreen overlay */
    top: var(--toc-top-desktop);    /* Distance from top (6rem) */
    left: var(--toc-left-desktop);  /* Distance from left (1rem) */
    right: auto;                    /* Remove mobile right positioning */
    bottom: var(--toc-gap-desktop); /* Distance from bottom (1rem) */
    width: var(--toc-width-desktop); /* Fixed width (16rem) */
    height: auto;                   /* Height determined by content */
    max-height: calc(100vh - 10rem); /* Prevent overflow off-screen */
    overflow-y: auto;               /* Allow scrolling within panel if needed */
    display: block;                 /* Standard block instead of flex */
    flex-direction: unset;          /* Remove mobile flex direction */
  }
}

/* TOC Content Layout - Complex responsive adjustments */
.toc-panel .toc-header {
  padding: 5rem 1.5rem 1.5rem 1.5rem;
  margin-bottom: 0;
  flex-shrink: 0;
}

.toc-panel .toc-list {
  padding: 0 1.5rem 2rem 1.5rem;
  flex-grow: 1;
  overflow-y: auto;
}

/* Desktop TOC Content Adjustments */
@media (min-width: 1024px) {
  .toc-panel .toc-header {
    padding: 0 0 0 1.5rem !important; /* Left padding to align with close button */
    margin-bottom: 1rem;
    margin-left: 0;
    border-bottom: none;
    flex-shrink: unset;
  }
  
  .toc-panel .toc-list {
    padding: 0 0 0 1.5rem !important; /* Left padding to align with close button */
    margin: 0;
    flex-grow: unset;
    overflow-y: visible;
  }
}

/* TOC Overlay - Mobile only */
.toc-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, .5);
  z-index: 998;
  transition: opacity .3s ease;
  opacity: 0;
  pointer-events: none;
}

.toc-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

@media (min-width: 1024px) {
  .toc-overlay {
    display: none;
  }
}

/* ============================================================================ */
/* VIBE CHECK COMPONENT - Homepage easter egg functionality                   */
/* ============================================================================ */

/* ========================================================================== */
/* FOOTER COMPONENT - Vibe Check button and social links                      */
/* ========================================================================== */
.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 0 2rem 0;
  gap: 1rem;
}

/* LinkedIn Link - Prominent Positioning */
.linkedin-link {
  color: hsl(var(--muted-foreground));
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0.625rem; /* Ensure 44px touch target */
}

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

/* ========================================================================== */
/* VIBE CHECK COMPONENT - Interactive theme cycling system                    */
/* ========================================================================== */
.vibe-check-button {
  /* Pill shape optimized for touch */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.8rem;
  min-height: 2.75rem; /* 44px minimum for touch accessibility */
  min-width: 6rem;
  
  /* Styling */
  background-color: hsl(var(--muted));
  border: 1px solid hsl(var(--border));
  border-radius: 9999px;
  color: hsl(var(--foreground));
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  
  /* Interactions */
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  
  /* Touch-friendly */
  -webkit-tap-highlight-color: transparent;
}

.vibe-check-button:hover {
  background-color: hsl(var(--accent));
  border-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

.vibe-check-button:focus {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

/* Active/pressed state for mobile */
.vibe-check-button:active {
  transform: translateY(1px);
}

/* Slide-up Theme Panel - Modern slide-up design */
.vibe-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: hsl(var(--background));
  border-top: 1px solid hsl(var(--border));
  border-radius: 1rem 1rem 0 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  transform: translateY(100%); /* Initially hidden below viewport */
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* Material Design easing curve for natural motion */
  max-height: 50vh; /* Limit to half viewport height for good UX */
  overflow: hidden;
}

.vibe-panel.is-visible {
  transform: translateY(0);
}

.vibe-panel.is-hidden {
  transform: translateY(100%);
}

.vibe-panel-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  position: relative;
}

/* Swipe handle indicator (mobile only) */
.vibe-panel-handle {
  width: 40px;
  height: 4px;
  background-color: hsl(var(--muted-foreground));
  border-radius: 2px;
  opacity: 0.4;
  margin: -0.5rem auto 0.5rem auto;
  display: none;
  transition: opacity 0.2s ease;
}

/* Show handle only on mobile/tablet where swipe is available */
@media (max-width: 1023px) {
  .vibe-panel-handle {
    display: block;
  }
}

/* Subtle hover effect for the handle */
.vibe-panel-content:hover .vibe-panel-handle {
  opacity: 0.6;
}

.vibe-panel-header {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 1001;
}

.vibe-panel-esc-hint {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  opacity: 0.7;
  font-family: ui-monospace, SFMono-Regular, "Menlo", Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  letter-spacing: 0.025em;
  transition: opacity 0.2s ease;
}

/* Hide Esc hint on mobile/tablet where keyboards are less common */
@media (max-width: 1023px) {
  .vibe-panel-esc-hint {
    display: none;
  }
}

.vibe-panel-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  padding: 0.5rem; /* 8px padding for easier touch */
  line-height: 1;
  transition: color 0.2s ease;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.25rem; /* Slight rounding for better touch feedback */
}

.vibe-panel-close:hover {
  color: hsl(var(--foreground));
}

.vibe-panel-header:hover .vibe-panel-esc-hint {
  opacity: 1;
}

.vibe-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  text-align: center;
  margin: 0;
}

.vibe-image {
  max-width: 280px;
  max-height: 200px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0.75rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: opacity 0.3s ease, filter 0.3s ease;
}

.vibe-error {
  font-size: 0.875rem;
  color: hsl(var(--destructive));
  text-align: center;
  padding: 0.75rem;
  background-color: hsl(var(--destructive) / 0.1);
  border-radius: 0.5rem;
  border: 1px solid hsl(var(--destructive) / 0.2);
  max-width: 280px;
}

.vibe-error.is-hidden {
  display: none;
}

/* Help Text for Interaction Methods */
.vibe-help {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  text-align: center;
  margin-top: 0.75rem;
  opacity: 0.8;
  font-style: italic;
}

.vibe-help-desktop {
  display: inline;
}

.vibe-help-mobile {
  display: none;
}

/* Show mobile help and hide desktop help on smaller viewports */
@media (max-width: 1023px) {
  .vibe-help-desktop {
    display: none;
  }
  
  .vibe-help-mobile {
    display: inline;
  }
}

/* Panel Backdrop */
.vibe-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.3);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.vibe-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.vibe-backdrop.is-hidden {
  opacity: 0;
  pointer-events: none;
}

/* Responsive adjustments for slide-up panel */
@media (max-width: 640px) {
  .vibe-panel {
    max-height: 60vh;
  }
  
  .vibe-panel-content {
    padding: 1rem;
  }
  
  .vibe-image {
    max-width: 240px;
    max-height: 160px;
  }
}

@media (max-width: 320px) {
  .vibe-panel {
    max-height: 70vh;
  }
  
  .vibe-image {
    max-width: 200px;
    max-height: 140px;
  }
  
  .footer-container {
    padding: 1.5rem 0;
    gap: 0.75rem;
  }
}

/* ============================================================================ */
/* DEFAULT CONTENT SECTION STYLING - Consistent with vibe themes              */
/* ============================================================================ */

/* Content Sections - CSS Variables approach to prevent layout shift */
.content-section {
  border: var(--content-border, 1px solid hsl(var(--border)));
  border-left: var(--content-border-left, 1px solid hsl(var(--border)));
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  background: var(--content-background, hsl(var(--card)));
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

/* Default Header Name - Same dimensions as vibe themes to prevent layout shift */
h1 a {
  border-bottom: 2px solid transparent; /* Reserve space for Texas Wildflower theme border */
  padding-bottom: 2px; /* Same as Texas Wildflower theme */
  transition: all 0.3s ease;
}

/* ============================================================================ */
/* SYNTHWAVE THEME ENHANCEMENTS - SYSTEMATIC TESTING: Adding rules one by one */
/* ============================================================================ */

/* TEST 1: Synthwave Background Gradient - ✅ NO SHIFT */
body.synthwave-active {
  background: linear-gradient(135deg, 
    hsl(240, 45%, 8%) 0%, 
    hsl(260, 40%, 12%) 50%, 
    hsl(280, 35%, 10%) 100%
  ) !important;
  
  /* Content Section Variables - CSS Variable approach to prevent layout shift */
  --content-border: 1px solid rgba(0, 229, 255, 0.2);
  --content-border-left: 1px solid rgba(0, 229, 255, 0.2);
  --content-background: hsl(var(--card));
}

/* TEST 2: Synthwave Content Sections - ❌ CAUSES SHIFT (removed) */

/* TEST 3: Synthwave Heading Styling - ✅ NO SHIFT (keeping) */
body.synthwave-active h1 a {
  color: #FF1493 !important;
  transition: all 0.3s ease;
}

body.synthwave-active h1 a:hover {
  text-shadow: 
    0 0 5px #FF1493,
    0 0 10px #FF1493;
}

body.synthwave-active #posts-heading {
  color: #FF1493 !important;
}

/* TEST 4: Synthwave Vibe Check Button - ✅ NO SHIFT (keeping) */
body.synthwave-active .vibe-check-button {
  background: linear-gradient(45deg, #FF1493, #FF00FF) !important;
  border-color: #FF1493 !important;
  color: #FFFFFF !important;
  box-shadow: 
    0 0 10px rgba(255, 20, 147, 0.5),
    0 0 20px rgba(255, 20, 147, 0.3),
    0 0 30px rgba(255, 20, 147, 0.1);
}

body.synthwave-active .vibe-check-button:hover {
  background: linear-gradient(45deg, #FF00FF, #FF1493) !important;
  box-shadow: 
    0 0 15px rgba(255, 20, 147, 0.7),
    0 0 25px rgba(255, 20, 147, 0.5),
    0 0 35px rgba(255, 20, 147, 0.3);
  transform: translateY(-1px);
}

/* TEST 5: Synthwave Academic Links - ✅ NO SHIFT (keeping) */
body.synthwave-active .academic-link {
  color: #00E5FF !important;
  text-shadow: 0 0 3px #00E5FF;
  transition: all 0.3s ease;
}

body.synthwave-active .academic-link:hover {
  color: #FF1493 !important;
  text-shadow: 
    0 0 5px #FF1493,
    0 0 10px #FF1493,
    0 0 15px #FF1493;
}

/* TEST 6: Synthwave Theme Toggle - ✅ NO SHIFT (keeping) */
body.synthwave-active #theme-toggle {
  box-shadow: 
    0 0 10px rgba(0, 229, 255, 0.3),
    0 0 20px rgba(0, 229, 255, 0.2);
  border-color: #FF1493 !important;
  background-color: rgba(255, 20, 147, 0.1) !important;
}

body.synthwave-active #theme-toggle:hover {
  box-shadow: 
    0 0 15px rgba(0, 229, 255, 0.5),
    0 0 25px rgba(0, 229, 255, 0.3);
}

body.synthwave-active #toggle-slider {
  background-color: #FF1493 !important;
}

/* TEST 7: Synthwave Posts & Bio - Testing remaining styling */
body.synthwave-active .posts-list a {
  color: #FF1493 !important;
  transition: all 0.3s ease;
}

body.synthwave-active .posts-list a:hover {
  color: #00E5FF !important;
  text-shadow: 0 0 5px #00E5FF;
}

body.synthwave-active .bio-content p {
  color: hsl(var(--foreground)) !important;
}

body.synthwave-active .bio-content .academic-link {
  color: #FF1493 !important;
}

body.synthwave-active .bio-content .academic-link:hover {
  color: #00E5FF !important;
  text-shadow: 0 0 3px #00E5FF;
}

body.synthwave-active .bio-expand-btn {
  color: #FF1493 !important;
}

body.synthwave-active .bio-expand-btn:hover {
  color: #00E5FF !important;
}



/* ============================================================================ */
/* DESERT PINON THEME ENHANCEMENTS - Southwest/American desert aesthetics     */
/* ============================================================================ */

/* Desert Pinon Background - Warm Sandy Tone */
body.desert-pinon-active {
  background: linear-gradient(135deg, 
    hsl(35, 25%, 92%) 0%, 
    hsl(30, 30%, 90%) 50%, 
    hsl(40, 20%, 94%) 100%
  ) !important;
  
  /* Content Section Variables - CSS Variable approach to prevent layout shift */
  --content-border: 1px solid rgba(227, 115, 94, 0.3);
  --content-border-left: 4px solid #40E0D0;
  --content-background: rgba(208, 181, 154, 0.1);
}

/* Desert Pinon Name Styling - Turquoise (Southwest Jewelry Color) */
body.desert-pinon-active h1 a {
  color: #40E0D0 !important;
  transition: all 0.3s ease;
}

body.desert-pinon-active h1 a:hover {
  color: #E3735E !important;
}

/* Desert Pinon Section Headings - Turquoise (Southwest Accent) */
body.desert-pinon-active #posts-heading {
  color: #40E0D0 !important;
}

/* Desert Pinon Vibe Check Button - Turquoise with Terracotta Accent */
body.desert-pinon-active .vibe-check-button {
  background: linear-gradient(45deg, #40E0D0, #48D1CC) !important;
  border-color: #40E0D0 !important;
  color: #FFFFFF !important;
}

body.desert-pinon-active .vibe-check-button:hover {
  background: linear-gradient(45deg, #E3735E, #CC5500) !important;
  border-color: #E3735E !important;
}

/* Desert Pinon Links - Terracotta (Adobe/Clay Feel) */
body.desert-pinon-active .academic-link {
  color: #E3735E !important;
  transition: all 0.3s ease;
}

body.desert-pinon-active .academic-link:hover {
  color: #40E0D0 !important;
}

/* Desert Pinon Theme Toggle - Turquoise with Terracotta Outline */
body.desert-pinon-active #theme-toggle {
  border: 2px solid #E3735E !important;
  background-color: rgba(64, 224, 208, 0.2) !important;
  box-shadow: 
    0 0 8px rgba(64, 224, 208, 0.3),
    0 0 0 1px #E3735E;
}

body.desert-pinon-active #theme-toggle:hover {
  border-color: #CC5500 !important;
  box-shadow: 
    0 0 12px rgba(64, 224, 208, 0.4),
    0 0 0 1px #CC5500;
}

body.desert-pinon-active #toggle-slider {
  background-color: #40E0D0 !important;
}

/* Desert Pinon Content Sections - TESTING: Completely removed to test layout shift theory */
/* body.desert-pinon-active .content-section {
  border: 1px solid rgba(227, 115, 94, 0.3);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  background: rgba(208, 181, 154, 0.1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
} */

/* Desert Pinon Posts List - Terracotta by Default */
body.desert-pinon-active .posts-list a {
  color: #E3735E !important;
  transition: all 0.3s ease;
}

body.desert-pinon-active .posts-list a:hover {
  color: #40E0D0 !important;
}

/* Desert Pinon Bio Links - Mix of Turquoise and Terracotta */
body.desert-pinon-active .bio-content .academic-link:nth-child(1),
body.desert-pinon-active .bio-content .academic-link:nth-child(3) {
  color: #40E0D0 !important;
}

body.desert-pinon-active .bio-content .academic-link:nth-child(2),
body.desert-pinon-active .bio-content .academic-link:nth-child(4) {
  color: #E3735E !important;
}

body.desert-pinon-active .bio-content .academic-link:hover {
  color: #CC5500 !important;
}

/* Desert Pinon Bio Expand Button - Burnt Orange */
body.desert-pinon-active .bio-expand-btn {
  color: #CC5500 !important;
}

body.desert-pinon-active .bio-expand-btn:hover {
  color: #40E0D0 !important;
}

/* ============================================================================ */
/* TEXAS WILDFLOWER THEME ENHANCEMENTS - Texas flag + wildflower field colors */
/* ============================================================================ */

/* Texas Wildflower Background - Warm Cream Wildflower Field */
body.texas-wildflower-active {
  background: linear-gradient(135deg, 
    hsl(60, 20%, 97%) 0%, 
    hsl(55, 25%, 95%) 50%, 
    hsl(50, 30%, 96%) 100%
  ) !important;
  
  /* Content Section Variables - CSS Variable approach to prevent layout shift */
  --content-border: 1px solid rgba(0, 45, 98, 0.2);
  --content-border-left: 4px solid #002D62;
  --content-background: rgba(0, 45, 98, 0.03);
}

/* Texas Wildflower Name Styling - Deep Navy Blue (Texas Flag) */
body.texas-wildflower-active h1 a {
  color: #002D62 !important;
  text-shadow: 0 0 1px rgba(0, 45, 98, 0.3);
  border-bottom: 2px solid rgba(0, 45, 98, 0.2);
  padding-bottom: 2px;
  transition: all 0.3s ease;
}

body.texas-wildflower-active h1 a:hover {
  color: #B22222 !important;
  border-bottom-color: #B22222;
}

/* Texas Wildflower Section Headings - Golden Yellow (Wildflower Blooms) */
body.texas-wildflower-active #posts-heading {
  color: #FFC513 !important;
  font-weight: 700;
}

/* Texas Wildflower Vibe Check Button - Navy with Golden Accent */
body.texas-wildflower-active .vibe-check-button {
  background: linear-gradient(45deg, #002D62, #1a4480) !important;
  border-color: #FFC513 !important;
  color: #FAF9F6 !important;
}

body.texas-wildflower-active .vibe-check-button:hover {
  background: linear-gradient(45deg, #B22222, #d63333) !important;
  border-color: #FFC513 !important;
}

/* Texas Wildflower Links - Golden Yellow (Wildflowers) */
body.texas-wildflower-active .academic-link {
  color: #FFC513 !important;
  transition: all 0.3s ease;
}

body.texas-wildflower-active .academic-link:hover {
  color: #B22222 !important;
}

/* Texas Wildflower Theme Toggle - Prominent Bluebonnet Blue */
body.texas-wildflower-active #theme-toggle {
  border: 2px solid #002D62 !important;
  background-color: rgba(0, 45, 98, 0.1) !important;
  box-shadow: 
    0 0 8px rgba(0, 45, 98, 0.2),
    0 0 0 1px rgba(0, 45, 98, 0.1);
}

body.texas-wildflower-active #theme-toggle:hover {
  border-color: #002D62 !important;
  background-color: rgba(0, 45, 98, 0.15) !important;
  box-shadow: 
    0 0 12px rgba(0, 45, 98, 0.3),
    0 0 0 1px rgba(0, 45, 98, 0.2);
}

body.texas-wildflower-active #toggle-slider {
  background-color: #002D62 !important;
  box-shadow: 0 0 4px rgba(0, 45, 98, 0.4);
}

/* Texas Wildflower Content Sections - TESTING: Completely removed to test layout shift theory */
/* body.texas-wildflower-active .content-section {
  border: 1px solid rgba(0, 45, 98, 0.2);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  background: rgba(0, 45, 98, 0.03);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
} */

/* Texas Wildflower Posts List - Mix of Texas Colors */
body.texas-wildflower-active .posts-list a {
  color: #B22222 !important;
  transition: all 0.3s ease;
}

body.texas-wildflower-active .posts-list a:hover {
  color: #4F7942 !important;
}

/* Texas Wildflower Bio Links - Alternating Texas Flag & Nature Colors */
body.texas-wildflower-active .bio-content .academic-link:nth-of-type(odd) {
  color: #B22222 !important;
}

body.texas-wildflower-active .bio-content .academic-link:nth-of-type(even) {
  color: #4F7942 !important;
}

body.texas-wildflower-active .bio-content .academic-link:hover {
  color: #FFC513 !important;
}

/* Texas Wildflower Bio Expand Button - Forest Green */
body.texas-wildflower-active .bio-expand-btn {
  color: #4F7942 !important;
}

body.texas-wildflower-active .bio-expand-btn:hover {
  color: #FFC513 !important;
}

/* ============================================================================ */
/* FALLING WATER THEME ENHANCEMENTS - Frank Lloyd Wright inspired natural flow */
/* ============================================================================ */

/* Falling Water Background - Soft cream like flowing water foam */
body.falling-water-active {
  background: linear-gradient(135deg, 
    hsl(42, 35%, 98%) 0%, 
    hsl(42, 35%, 96%) 50%, 
    hsl(42, 30%, 94%) 100%
  ) !important;
  
  /* Content Section Variables - CSS Variable approach to prevent layout shift */
  --content-border: 1px solid rgba(155, 43, 40, 0.2);
  --content-border-left: 4px solid #7C936E;
  --content-background: rgba(124, 147, 110, 0.05);
}

/* Falling Water Name Styling - Cherokee Red (Natural stone) */
body.falling-water-active h1 a {
  color: #9B2B28 !important;
  text-shadow: 0 0 1px rgba(155, 43, 40, 0.2);
  border-bottom: 2px solid rgba(124, 147, 110, 0.3);
  padding-bottom: 2px;
  transition: all 0.3s ease;
}

body.falling-water-active h1 a:hover {
  color: #7C936E !important;
  border-bottom-color: #F0C034;
}

/* Falling Water Section Headings - Sage Green (Natural foliage) */
body.falling-water-active #posts-heading {
  color: #7C936E !important;
  font-weight: 700;
}

/* Falling Water Change Vibe Button - Golden Yellow with natural accents */
body.falling-water-active .vibe-check-button {
  background: linear-gradient(45deg, #F0C034, #E6B82E) !important;
  border-color: #7C936E !important;
  color: #4A4C47 !important;
  box-shadow: 0 2px 6px rgba(124, 147, 110, 0.2);
}

body.falling-water-active .vibe-check-button:hover {
  background: linear-gradient(45deg, #9B2B28, #8A2725) !important;
  border-color: #F0C034 !important;
  color: #F5F5F0 !important;
  box-shadow: 0 3px 8px rgba(155, 43, 40, 0.3);
}

/* Falling Water Links - Golden Yellow (Warm sunlight) */
body.falling-water-active .academic-link {
  color: #F0C034 !important;
  transition: all 0.3s ease;
}

body.falling-water-active .academic-link:hover {
  color: #9B2B28 !important;
  text-shadow: 0 0 2px rgba(155, 43, 40, 0.3);
}

/* Falling Water Theme Toggle - Natural integration */
body.falling-water-active #theme-toggle {
  border: 2px solid #7C936E !important;
  background-color: rgba(240, 192, 52, 0.1) !important;
  box-shadow: 
    0 0 8px rgba(124, 147, 110, 0.2),
    0 0 0 1px rgba(240, 192, 52, 0.1);
}

body.falling-water-active #theme-toggle:hover {
  border-color: #F0C034 !important;
  background-color: rgba(240, 192, 52, 0.15) !important;
  box-shadow: 
    0 0 12px rgba(124, 147, 110, 0.3),
    0 0 0 1px rgba(240, 192, 52, 0.2);
}

body.falling-water-active #toggle-slider {
  background-color: #9B2B28 !important;
  box-shadow: 0 0 4px rgba(155, 43, 40, 0.4);
}

/* Falling Water Posts List - Natural color alternation */
body.falling-water-active .posts-list a {
  color: #7C936E !important;
  transition: all 0.3s ease;
}

body.falling-water-active .posts-list a:hover {
  color: #9B2B28 !important;
}

/* Falling Water Bio Links - Natural flow of colors */
body.falling-water-active .bio-content .academic-link:nth-of-type(odd) {
  color: #F0C034 !important;
}

body.falling-water-active .bio-content .academic-link:nth-of-type(even) {
  color: #7C936E !important;
}

body.falling-water-active .bio-content .academic-link:hover {
  color: #9B2B28 !important;
  text-shadow: 0 0 2px rgba(155, 43, 40, 0.2);
}

/* Falling Water Bio Expand Button - Accent Brown */
body.falling-water-active .bio-expand-btn {
  color: #7B543D !important;
}

body.falling-water-active .bio-expand-btn:hover {
  color: #F0C034 !important;
}

/* ============================================================================ */
/* PARK RANGER THEME ENHANCEMENTS - WPA National Park poster inspired design  */
/* ============================================================================ */

/* Park Ranger Background - Warm Cream from actual poster image */
body.park-ranger-active {
  background: linear-gradient(135deg, 
    #F3EAD3 0%, 
    hsl(44, 43%, 94%) 50%, 
    hsl(44, 40%, 90%) 100%
  ) !important;
  
  /* Content Section Variables - CSS Variable approach to prevent layout shift */
  --content-border: 1px solid rgba(29, 96, 103, 0.3);
  --content-border-left: 4px solid #84D2E4;
  --content-background: rgba(132, 210, 228, 0.05);
}

/* Park Ranger Name Styling - Deep Brown from actual poster */
body.park-ranger-active h1 a {
  color: #52342C !important;
  text-shadow: 0 0 1px rgba(82, 52, 44, 0.3);
  border-bottom: 2px solid rgba(212, 166, 87, 0.5);
  padding-bottom: 2px;
  transition: all 0.3s ease;
  font-weight: 600;
}

body.park-ranger-active h1 a:hover {
  color: #DE8C41 !important;
  border-bottom-color: #1D6067;
  text-shadow: 0 0 2px rgba(222, 140, 65, 0.4);
}

/* Park Ranger Section Headings - Forest Green from actual poster */
body.park-ranger-active #posts-heading {
  color: #1D6067 !important;
  font-weight: 700;
  text-shadow: 0 0 1px rgba(29, 96, 103, 0.3);
}

/* Park Ranger Change Vibe Button - Authentic poster colors */
body.park-ranger-active .vibe-check-button {
  background: linear-gradient(45deg, #DE8C41, #D4A657) !important;
  border: 2px solid #1D6067 !important;
  color: #F3EAD3 !important;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(82, 52, 44, 0.4);
  box-shadow: 
    0 3px 8px rgba(29, 96, 103, 0.2),
    inset 0 1px 2px rgba(243, 234, 211, 0.3);
}

body.park-ranger-active .vibe-check-button:hover {
  background: linear-gradient(45deg, #84D2E4, #1D6067) !important;
  border-color: #DE8C41 !important;
  color: #52342C !important;
  text-shadow: 0 1px 2px rgba(243, 234, 211, 0.6);
  box-shadow: 
    0 4px 12px rgba(132, 210, 228, 0.3),
    inset 0 1px 3px rgba(243, 234, 211, 0.4);
  transform: translateY(-1px);
}

/* Park Ranger Links - Muted Orange from actual poster */
body.park-ranger-active .academic-link {
  color: #DE8C41 !important;
  transition: all 0.3s ease;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

body.park-ranger-active .academic-link:hover {
  color: #1D6067 !important;
  text-shadow: 0 0 3px rgba(29, 96, 103, 0.4);
  text-decoration-color: #84D2E4;
}

/* Park Ranger Theme Toggle - Authentic poster aesthetic */
body.park-ranger-active #theme-toggle {
  border: 2px solid #1D6067 !important;
  background: linear-gradient(45deg, 
    rgba(243, 234, 211, 0.9), 
    rgba(212, 166, 87, 0.8)
  ) !important;
  box-shadow: 
    0 0 10px rgba(29, 96, 103, 0.2),
    inset 0 1px 3px rgba(243, 234, 211, 0.4),
    0 0 0 1px rgba(82, 52, 44, 0.1);
}

body.park-ranger-active #theme-toggle:hover {
  border-color: #84D2E4 !important;
  background: linear-gradient(45deg, 
    rgba(222, 140, 65, 0.2), 
    rgba(132, 210, 228, 0.2)
  ) !important;
  box-shadow: 
    0 0 15px rgba(132, 210, 228, 0.3),
    inset 0 1px 4px rgba(243, 234, 211, 0.5),
    0 0 0 1px rgba(29, 96, 103, 0.2);
}

body.park-ranger-active #toggle-slider {
  background: linear-gradient(45deg, #52342C, #1D6067) !important;
  box-shadow: 
    0 0 6px rgba(82, 52, 44, 0.4),
    inset 0 1px 2px rgba(243, 234, 211, 0.2);
}

/* Park Ranger Posts List - Authentic poster colors */
body.park-ranger-active .posts-list a {
  color: #1D6067 !important;
  transition: all 0.3s ease;
  font-weight: 500;
}

body.park-ranger-active .posts-list a:hover {
  color: #DE8C41 !important;
  text-shadow: 0 0 2px rgba(222, 140, 65, 0.3);
}

/* Park Ranger Bio Links - Authentic poster color scheme */
body.park-ranger-active .bio-content .academic-link:nth-of-type(odd) {
  color: #DE8C41 !important;
}

body.park-ranger-active .bio-content .academic-link:nth-of-type(even) {
  color: #84D2E4 !important;
}

body.park-ranger-active .bio-content .academic-link:hover {
  color: #1D6067 !important;
  text-shadow: 0 0 3px rgba(29, 96, 103, 0.4);
}

/* Park Ranger Bio Expand Button - Deep Brown from poster */
body.park-ranger-active .bio-expand-btn {
  color: #52342C !important;
  font-weight: 500;
}

body.park-ranger-active .bio-expand-btn:hover {
  color: #D4A657 !important;
  text-shadow: 0 0 2px rgba(212, 166, 87, 0.3);
}

/* ============================================================================ */
/* CRAFTSMAN COMFORT THEME - Arts & Crafts movement inspired handcrafted design */
/* ============================================================================ */

/* Craftsman Comfort Background - Warm cream like cozy craftsman interiors */
body.craftsman-comfort-active {
  background: linear-gradient(135deg, 
    #F5F5DC 0%, 
    hsl(60, 56%, 93%) 50%, 
    hsl(60, 50%, 90%) 100%
  ) !important;
  
  /* Content Section Variables - CSS Variable approach to prevent layout shift */
  --content-border: 1px solid rgba(92, 64, 51, 0.2);
  --content-border-left: 4px solid #8B4513;
  --content-background: rgba(139, 69, 19, 0.04);
}

/* Craftsman Name Styling - Dark Oak (handcrafted furniture) */
body.craftsman-comfort-active h1 a {
  color: #5C4033 !important;
  text-shadow: 0 0 1px rgba(92, 64, 51, 0.3);
  border-bottom: 2px solid rgba(184, 115, 51, 0.4);
  padding-bottom: 2px;
  transition: all 0.3s ease;
  font-weight: 600;
  letter-spacing: 0.5px;
}

body.craftsman-comfort-active h1 a:hover {
  color: #B87333 !important;
  border-bottom-color: #556B2F;
  text-shadow: 0 0 2px rgba(184, 115, 51, 0.4);
}

/* Craftsman Section Headings - Medium Wood (natural warmth) */
body.craftsman-comfort-active #posts-heading {
  color: #8B4513 !important;
  font-weight: 700;
  text-shadow: 0 0 1px rgba(139, 69, 19, 0.2);
  letter-spacing: 0.3px;
}

/* Craftsman Change Vibe Button - Handcrafted aesthetic with rich textures */
body.craftsman-comfort-active .vibe-check-button {
  background: linear-gradient(45deg, #B87333, #8B4513) !important;
  border: 2px solid #5C4033 !important;
  color: #F5F5DC !important;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(92, 64, 51, 0.4);
  box-shadow: 
    0 3px 8px rgba(139, 69, 19, 0.25),
    inset 0 1px 2px rgba(245, 245, 220, 0.2),
    inset 0 -1px 2px rgba(92, 64, 51, 0.1);
  letter-spacing: 0.3px;
}

body.craftsman-comfort-active .vibe-check-button:hover {
  background: linear-gradient(45deg, #556B2F, #8D8478) !important;
  border-color: #B87333 !important;
  color: #F5F5DC !important;
  text-shadow: 0 1px 2px rgba(85, 107, 47, 0.5);
  box-shadow: 
    0 4px 12px rgba(85, 107, 47, 0.3),
    inset 0 1px 3px rgba(245, 245, 220, 0.3),
    inset 0 -1px 3px rgba(92, 64, 51, 0.15);
  transform: translateY(-1px);
}

/* Craftsman Links - Hammered Copper (artisanal metalwork) */
body.craftsman-comfort-active .academic-link {
  color: #B87333 !important;
  transition: all 0.3s ease;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(184, 115, 51, 0.6);
}

body.craftsman-comfort-active .academic-link:hover {
  color: #556B2F !important;
  text-shadow: 0 0 3px rgba(85, 107, 47, 0.4);
  text-decoration-color: #8D8478;
}

/* Craftsman Theme Toggle - Handcrafted hardware aesthetic */
body.craftsman-comfort-active #theme-toggle {
  border: 2px solid #8B4513 !important;
  background: linear-gradient(45deg, 
    rgba(245, 245, 220, 0.95), 
    rgba(141, 132, 120, 0.3)
  ) !important;
  box-shadow: 
    0 0 10px rgba(139, 69, 19, 0.2),
    inset 0 1px 3px rgba(245, 245, 220, 0.4),
    inset 0 -1px 2px rgba(92, 64, 51, 0.1),
    0 0 0 1px rgba(184, 115, 51, 0.1);
}

body.craftsman-comfort-active #theme-toggle:hover {
  border-color: #B87333 !important;
  background: linear-gradient(45deg, 
    rgba(184, 115, 51, 0.2), 
    rgba(85, 107, 47, 0.15)
  ) !important;
  box-shadow: 
    0 0 15px rgba(184, 115, 51, 0.3),
    inset 0 1px 4px rgba(245, 245, 220, 0.5),
    inset 0 -1px 3px rgba(92, 64, 51, 0.15),
    0 0 0 1px rgba(139, 69, 19, 0.2);
}

body.craftsman-comfort-active #toggle-slider {
  background: linear-gradient(45deg, #5C4033, #8B4513) !important;
  box-shadow: 
    0 0 6px rgba(92, 64, 51, 0.4),
    inset 0 1px 2px rgba(245, 245, 220, 0.2),
    inset 0 -1px 1px rgba(139, 69, 19, 0.3);
}

/* Craftsman Posts List - Natural wood tone progression */
body.craftsman-comfort-active .posts-list a {
  color: #8B4513 !important;
  transition: all 0.3s ease;
  font-weight: 500;
}

body.craftsman-comfort-active .posts-list a:hover {
  color: #B87333 !important;
  text-shadow: 0 0 2px rgba(184, 115, 51, 0.3);
}

/* Craftsman Bio Links - Arts & Crafts color harmony */
body.craftsman-comfort-active .bio-content .academic-link:nth-of-type(odd) {
  color: #B87333 !important;
}

body.craftsman-comfort-active .bio-content .academic-link:nth-of-type(even) {
  color: #8D8478 !important;
}

body.craftsman-comfort-active .bio-content .academic-link:hover {
  color: #556B2F !important;
  text-shadow: 0 0 3px rgba(85, 107, 47, 0.4);
}

/* Craftsman Bio Expand Button - Stone Gray (natural materials) */
body.craftsman-comfort-active .bio-expand-btn {
  color: #8D8478 !important;
  font-weight: 500;
}

body.craftsman-comfort-active .bio-expand-btn:hover {
  color: #B87333 !important;
  text-shadow: 0 0 2px rgba(184, 115, 51, 0.3);
}

/* ============================================================================ */
/* BIO COLLAPSE COMPONENT - Complex mobile responsive behavior                 */
/* ============================================================================ */

.bio-content {
  position: relative;
}

.bio-expanded {
  display: inline;
}

.bio-ellipsis,
.bio-expand-btn {
  display: none;
}

.bio-break {
  display: block;
  margin: 1rem 0;
  content: "";
}

/* Complex Mobile Bio Collapse Behavior */
@media (max-width: 768px) {
  /* Immediate button feedback for mobile */
  .bio-expand-btn {
    touch-action: manipulation; /* Removes 300ms delay on mobile tap */
  }
  
  /* Collapsed state styles - Using :not(.is-expanded) for specificity */
  .bio-content:not(.is-expanded) .bio-expanded {
    display: none; /* Hide the full bio text when collapsed */
  }
  
  .bio-content:not(.is-expanded) .bio-ellipsis {
    display: inline; /* Show the "..." ellipsis when collapsed */
  }
  
  .bio-content:not(.is-expanded) .bio-expand-btn {
    display: inline-block;
    background: none;
    border: none;
    color: var(--link);
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
    margin-left: .5em;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: color 0.1s ease; /* Faster button feedback */
  }
  
  .bio-content:not(.is-expanded) .bio-expand-btn:hover {
    color: var(--link-hover);
  }
  
  .bio-content:not(.is-expanded) .bio-expand-btn:active {
    transform: scale(0.98); /* Immediate visual feedback on tap */
    color: var(--link-hover);
  }
  
  .bio-content:not(.is-expanded) .bio-expand-btn:focus {
    outline: 2px solid hsl(var(--ring));
    outline-offset: 2px;
    border-radius: 2px;
  }
  
  /* Expanded state styles - immediate display change */
  .bio-content.is-expanded .bio-ellipsis,
  .bio-content.is-expanded .bio-expand-btn {
    display: none;
  }
  
  .bio-content.is-expanded .bio-expanded {
    display: inline;
  }
  
  .bio-content.is-expanded .bio-break {
    display: block;
    margin: 1rem 0;
    content: "";
  }
}

/* ============================================================================ */
/* READER BEWARE THEME ENHANCEMENTS - Goosebumps Horror Aesthetic            */
/* ============================================================================ */

/* Reader Beware Background - Deep Horror Black with Subtle Texture */
body.reader-beware-active {
  background: 
    radial-gradient(circle at 20% 80%, rgba(152, 210, 54, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(249, 162, 44, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(44, 138, 141, 0.02) 0%, transparent 50%),
    linear-gradient(135deg, 
      hsl(0, 0%, 6%) 0%, 
      hsl(0, 0%, 4%) 50%, 
      hsl(0, 0%, 8%) 100%
    ) !important;
  
  /* Content Section Variables - Spooky borders with green glow */
  --content-border: 1px solid rgba(152, 210, 54, 0.2);
  --content-border-left: 3px solid #98d236;
  --content-background: rgba(0, 0, 0, 0.3);
}

/* Reader Beware Name Styling - Ominous Orange with Spooky Glow */
body.reader-beware-active h1 a {
  color: #f9a22c !important;
  text-shadow: 
    0 0 5px #f9a22c,
    0 0 10px rgba(249, 162, 44, 0.5),
    0 0 15px rgba(249, 162, 44, 0.3);
  transition: all 0.3s ease;
}

body.reader-beware-active h1 a:hover {
  color: #98d236 !important;
  text-shadow: 
    0 0 8px #98d236,
    0 0 15px rgba(152, 210, 54, 0.7),
    0 0 20px rgba(152, 210, 54, 0.5);
  transform: scale(1.02);
}

/* Reader Beware Section Headings - Slime Green with Eerie Glow */
body.reader-beware-active #posts-heading {
  color: #98d236 !important;
  text-shadow: 
    0 0 3px #98d236,
    0 0 6px rgba(152, 210, 54, 0.4);
}

/* Reader Beware Vibe Check Button - Horror Orange with Pulsing Effect */
body.reader-beware-active .vibe-check-button {
  background: linear-gradient(45deg, #f9a22c, #ff8c00) !important;
  border: 2px solid #98d236 !important;
  color: #000000 !important;
  font-weight: bold;
  box-shadow: 
    0 0 10px rgba(249, 162, 44, 0.5),
    0 0 20px rgba(152, 210, 54, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  animation: reader-beware-pulse 2s ease-in-out infinite alternate;
}

body.reader-beware-active .vibe-check-button:hover {
  background: linear-gradient(45deg, #98d236, #7cb518) !important;
  border-color: #f9a22c !important;
  box-shadow: 
    0 0 15px rgba(152, 210, 54, 0.7),
    0 0 25px rgba(249, 162, 44, 0.5),
    0 0 35px rgba(44, 138, 141, 0.3);
  transform: translateY(-2px) scale(1.05);
}

@keyframes reader-beware-pulse {
  0% { 
    box-shadow: 
      0 0 10px rgba(249, 162, 44, 0.5),
      0 0 20px rgba(152, 210, 54, 0.3);
  }
  100% { 
    box-shadow: 
      0 0 15px rgba(249, 162, 44, 0.7),
      0 0 25px rgba(152, 210, 54, 0.5),
      0 0 35px rgba(44, 138, 141, 0.2);
  }
}

/* Reader Beware Academic Links - Orange with Green Hover (Classic Goosebumps) */
body.reader-beware-active .academic-link {
  color: #f9a22c !important;
  text-shadow: 0 0 3px rgba(249, 162, 44, 0.5);
  transition: all 0.3s ease;
  text-decoration-color: rgba(249, 162, 44, 0.6) !important;
}

body.reader-beware-active .academic-link:hover {
  color: #98d236 !important;
  text-shadow: 
    0 0 5px #98d236,
    0 0 10px rgba(152, 210, 54, 0.6);
  text-decoration-color: #98d236 !important;
}

/* Reader Beware Theme Toggle - Spooky with Multi-Color Glow */
body.reader-beware-active #theme-toggle {
  border: 2px solid #f9a22c !important;
  background: 
    radial-gradient(circle, rgba(152, 210, 54, 0.1) 0%, rgba(249, 162, 44, 0.05) 100%) !important;
  box-shadow: 
    0 0 8px rgba(249, 162, 44, 0.4),
    0 0 15px rgba(152, 210, 54, 0.2),
    inset 0 1px 0 rgba(152, 210, 54, 0.1);
}

body.reader-beware-active #theme-toggle:hover {
  border-color: #98d236 !important;
  box-shadow: 
    0 0 12px rgba(152, 210, 54, 0.6),
    0 0 20px rgba(249, 162, 44, 0.4),
    0 0 25px rgba(44, 138, 141, 0.2);
}

body.reader-beware-active #toggle-slider {
  background: linear-gradient(45deg, #f9a22c, #98d236) !important;
  box-shadow: 0 0 5px rgba(249, 162, 44, 0.5);
}

/* Reader Beware Posts List - Horror Theme Links */
body.reader-beware-active .posts-list a {
  color: #f9a22c !important;
  text-shadow: 0 0 3px rgba(249, 162, 44, 0.4);
  transition: all 0.3s ease;
}

body.reader-beware-active .posts-list a:hover {
  color: #98d236 !important;
  text-shadow: 
    0 0 5px #98d236,
    0 0 8px rgba(152, 210, 54, 0.6);
  transform: translateX(5px);
}

/* Reader Beware Bio Content - Subtle Green Tint with Orange Accents */
body.reader-beware-active .bio-content p {
  color: rgba(152, 210, 54, 0.9) !important;
  text-shadow: 0 0 1px rgba(152, 210, 54, 0.2);
}

body.reader-beware-active .bio-content .academic-link {
  color: #f9a22c !important;
  text-shadow: 0 0 3px rgba(249, 162, 44, 0.5);
}

body.reader-beware-active .bio-content .academic-link:hover {
  color: #98d236 !important;
  text-shadow: 0 0 5px rgba(152, 210, 54, 0.7);
}

body.reader-beware-active .bio-expand-btn {
  color: #f9a22c !important;
  text-shadow: 0 0 2px rgba(249, 162, 44, 0.4);
  transition: all 0.3s ease;
}

body.reader-beware-active .bio-expand-btn:hover {
  color: #98d236 !important;
  text-shadow: 0 0 4px rgba(152, 210, 54, 0.6);
}

/* Reader Beware LinkedIn Icon - Spooky Glow Effect */
body.reader-beware-active .linkedin-link {
  color: #2c8a8d !important;
  transition: all 0.3s ease;
}

body.reader-beware-active .linkedin-link:hover {
  color: #f9a22c !important;
  filter: drop-shadow(0 0 5px rgba(249, 162, 44, 0.6));
  transform: scale(1.1);
}

/* Reader Beware Content Sections - Subtle Horror Styling */
body.reader-beware-active .content-section {
  background: rgba(0, 0, 0, 0.2) !important;
  border: 1px solid rgba(152, 210, 54, 0.2) !important;
  border-left: 3px solid #98d236 !important;
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(152, 210, 54, 0.1);
}