:root {
  /* Default theme (light) */
  --bg-color: #ffffff;
  --text-color: #333333;
  --link-color: #00609b;
  --link-visited-color: #551a8b;
  --border-color: #ddd;
  --code-bg: #f9f9f9;
  --blockquote-bg: #f9f9f9;
  --table-bg: #eee;
  --table-border: #666;
  --secondary-bg: rgb(247, 248, 252);
  --tag-color: #2b343a7c;
  --transition-duration: 0.3s;
}

html,
body,
main,
article,
.content {
  background-color: var(--bg-color);
  color: var(--text-color);
}

.enable-transitions,
.enable-transitions * {
    transition: background-color var(--transition-duration), color var(--transition-duration);
}

body {
  max-width: 768px;
  margin: auto;
  padding: 1em;
  line-height: 1.7;
  font-size: 1.125rem;
  font-family: 'Inter', sans-serif;
}

/* Links */
a {
  color: var(--link-color);
  text-decoration: none;
  transition: color var(--transition-duration);
  font-weight: 400;
}

a:visited {
  color: var(--link-visited-color);
  font-weight: 400;
}

a:hover {
  text-decoration: underline;
  font-weight: 400;
}



/* Visually hidden class for accessibility */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}


/* Font size controls */
.font-size-controls {
  margin: 1em 0;
  display: flex;
  gap: 0.25em;
  justify-content: center;
  align-items: center;
}

.font-size-controls button {
  font-size: 1em;
  cursor: pointer;
}

/* header and footer areas */
.menu {
  padding: 0;
  margin: 1.5rem 0 0.5rem;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.menu li {
  display: inline-block;
  margin: 0;
}

.menu a {
  text-decoration: none;
  background: transparent;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  color: var(--text-color);
  transition: all 0.2s ease;
  font-weight: 500;
  opacity: 0.8;
  margin-bottom: 0rem;
  display: block;
}

.article-meta {
  background: none;
  padding: 0;
  margin-bottom: 2rem;
  text-align: left;
}

.menu a:hover {
  background: transparent;
  color: var(--link-color);
  opacity: 1;
}

.menu,
.article-meta,
footer {
  text-align: center;
}

.title {
  font-size: 1.1em;
}

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

hr {
  border-style: dashed;
  color: var(--border-color);
  transition: border-color var(--transition-duration);
}

/* code */
pre {
  border: 1px solid var(--border-color);
  box-shadow: none;
  padding: 1em;
  overflow-x: auto;
  background-color: var(--code-bg);
  transition: border-color var(--transition-duration), background-color var(--transition-duration), box-shadow var(--transition-duration);
  border-radius: 0.5rem;
}

code {
  background: var(--code-bg);
  font-family: 'Menlo', 'Monaco', 'Consolas', "Courier New", monospace;
  transition: background-color var(--transition-duration);
}

pre code {
  background: none;
}

/* misc elements */
img,
iframe,
video {
  max-width: 100%;
}

main {
  hyphens: auto;
}

blockquote {
  background: var(--blockquote-bg);
  border-left: 5px solid var(--border-color);
  padding: 3px 1em 3px;
  transition: background-color var(--transition-duration), border-color var(--transition-duration);
}

table {
  margin: auto;
  border-top: 1px solid var(--table-border);
  border-bottom: 1px solid var(--table-border);
  transition: border-color var(--transition-duration);
}

table thead th {
  border-bottom: 1px solid var(--border-color);
}

th,
td {
  padding: 5px;
}

thead,
tfoot,
tr:nth-child(even) {
  background: var(--table-bg);
  transition: background-color var(--transition-duration);
}

.date {
  font-weight: normal;
}

/* Utility Classes */
.center {
  text-align: center;
}

.left {
  text-align: left;
}

.right {
  text-align: right;
}

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.flex-between {
  display: flex;
  justify-content: space-between;
}

.flex-wrap {
  display: flex;
  flex-wrap: wrap;
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.6em;
  font-weight: 700;
  text-transform: none;
  text-align: left;
  color: var(--text-color);
  letter-spacing: 0.5px;
  padding: 0;
  transform: none;
  transition: color var(--transition-duration), text-shadow 0.3s ease;
  margin: 0;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}

.logo>a {
  text-decoration: none;
  color: var(--text-color);
  transition: color var(--transition-duration);
}

.logo>a:hover {
  text-decoration: none;
  color: var(--link-color);
}

.subtitle {
  font-weight: normal;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  padding: 0;
  margin: 0;
  font-weight: 700;
}

h1,
.article-meta .title {
  font-size: 2.25rem;
  line-height: 1.2;
  margin-bottom: 1rem;
  font-weight: 700;
}

h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

h3:not(.title) {
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.article-meta .date {
  font-size: 0.875rem;
  color: #9ca3af;
  font-weight: 400;
  margin-top: 0;
}

.post-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.post-navigation a {
  padding: 10px;
  text-decoration: none;
  background: var(--secondary-bg);
  border-radius: 5px;
  color: var(--text-color);
  transition: background-color var(--transition-duration), color var(--transition-duration);
}

.post-navigation .prev {
  text-align: right;
}

.post-navigation .next {
  text-align: left;
}

.tags {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.tags li {
  list-style-type: none;
  padding: 0;
  margin: 5px 5px;
  margin-left: 0;
}

.tags a {
  padding: 1.5px 2.5px;
  font-size: 1rem;
  color: var(--tag-color);
  text-decoration: none;
  transition: color var(--transition-duration);
}

.tags a:hover {
  font-weight: bold;
  cursor: pointer;
}

.tags a::before {
  content: "#";
}

/* Theme styles */
html.light-theme {
  --bg-color: #FAF9F6;
  /* Alabaster */
  --text-color: #2E2E2E;
  /* Charcoal Grey */
  --link-color: #005A6E;
  /* Deeper Muted Teal Blue */
  --link-visited-color: #5A5A8D;
  /* Deeper Dusty Lavender */
  --border-color: #E0E0E0;
  --code-bg: #F0EBE3;
  /* Warm Beige */
  --blockquote-bg: #F0EBE3;
  /* Warm Beige */
  --table-bg: #F0EBE3;
  /* Warm Beige */
  --table-border: #D1C7B7;
  --secondary-bg: #F0EBE3;
  /* Warm Beige */
  --tag-color: #6A7A8F;
  /* Grey-Blue */
}

html.dark-theme {
  --bg-color: #111827;
  --text-color: #d1d5db;
  --link-color: #60a5fa;
  --link-visited-color: #60a5fa;
  --border-color: #374151;
  --code-bg: #1f2937;
  --blockquote-bg: #1f2937;
  --table-bg: #1f2937;
  --table-border: #374151;
  --secondary-bg: #1f2937;
  --tag-color: #9ca3af;
}

html.sepia-theme {
  --bg-color: #F5ECD9;
  /* Classic Sepia */
  --text-color: #4B4237;
  /* Ink Brown */
  --link-color: #5D493A;
  /* Darker Cool Coffee Brown */
  --link-visited-color: #7D6B5F;
  /* Darker Soft Sand */
  --border-color: #EDE4D1;
  --code-bg: #EDE4D1;
  /* Pale Parchment */
  --blockquote-bg: #EDE4D1;
  /* Pale Parchment */
  --table-bg: #EDE4D1;
  /* Pale Parchment */
  --table-border: #D4C9B8;
  --secondary-bg: #EDE4D1;
  /* Pale Parchment */
  --tag-color: #8C7B6A;
  /* Darker Muted Brown */
}

.reading-time {
  font-size: 0.9em;
  color: var(--text-color);
  opacity: 0.7;
  margin-left: 0.5em;
}

.progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  z-index: 1000;
}

.progress-bar {
  height: 100%;
  background: var(--link-color);
  width: 0%;
  transition: width 0.1s ease-out;
}


/* Share buttons */
.share-buttons {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
  justify-content: center;
}

.share-button {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  color: var(--text-color);
  opacity: 0.8;
}

.share-button:hover {
  background-color: var(--secondary-bg);
  opacity: 1;
  transform: translateY(-1px);
}

.share-icon {
  fill: currentColor;
}

/* Content preview styles */
.content-preview {
  position: fixed;
  display: none;
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  max-width: 400px;
  width: 100%;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.content-preview.visible {
  opacity: 1;
}

.preview-content {
  padding: 1rem;
}

.preview-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  color: var(--text-color);
}

.preview-excerpt {
  font-size: 0.9rem;
  color: var(--text-color);
  opacity: 0.8;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.preview-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-color);
  opacity: 0.6;
}

/* Bookmark Button Styles */
.bookmark-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.bookmark-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: var(--text-color);
  transition: color 0.2s ease;
}

.bookmark-button:hover {
  color: var(--accent-color);
}

.bookmark-button.active {
  color: var(--accent-color);
}

.bookmark-icon {
  width: 1.2rem;
  height: 1.2rem;
  vertical-align: middle;
}

.view-reading-list {
  font-size: 0.9rem;
  color: var(--text-color);
  opacity: 0.8;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.view-reading-list:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Reading List Page Styles */
.reading-list {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

.reading-list h1 {
  margin-bottom: 2rem;
  text-align: center;
}

.reading-list-container {
  background: var(--content-bg);
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.reading-list-loading {
  text-align: center;
  padding: 2rem;
  color: var(--secondary-text);
}

.reading-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.2s ease;
}

.reading-list-item:last-child {
  border-bottom: none;
}

.reading-list-item:hover {
  background-color: var(--hover-bg);
}

.reading-list-item .title {
  flex: 1;
  margin-right: 1rem;
}

.reading-list-item .title a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
}

.reading-list-item .title a:hover {
  color: var(--accent-color);
}

.reading-list-item .meta {
  font-size: 0.9rem;
  color: var(--secondary-text);
  margin-top: 0.5rem;
}

.reading-list-item .remove-button {
  background: none;
  border: none;
  color: var(--text-color);
  cursor: pointer;
  padding: 0.5rem;
  font-size: 1.2rem;
  opacity: 0.6;
  transition: all 0.2s ease;
}

.reading-list-item .remove-button:hover {
  opacity: 1;
  color: var(--accent-color);
}

.reading-list-empty {
  text-align: center;
  padding: 2rem;
  color: var(--secondary-text);
  font-style: italic;
}

/* Footer Navigation */
.footer-nav {
  margin: 1.5rem 0;
  text-align: center;
  /* background: var(--secondary-bg); */
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  display: inline-block;
  width: 100%;
}

@media (max-width: 768px) {
  .footer-nav {
    width: auto;
  }
}

.footer-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: center;
  align-content: center;
}

.footer-menu li {
  display: inline-block;
  margin: 0;
  padding: 0;
}

.footer-menu a {
  color: var(--text-color);
  opacity: 0.8;
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  white-space: nowrap;
}

.footer-menu a:hover {
  opacity: 1;
  text-decoration: underline;
  color: var(--link-color);
}

.footer-description {
  color: var(--text-color);
  opacity: 0.8;
  font-size: 0.9rem;
  margin: 0;
}

.footer-version {
  color: var(--text-color);
  opacity: 0.5;
  font-size: 0.8rem;
  margin: 0;
}

.footer-copyright {
  color: var(--text-color);
  opacity: 0.8;
  font-size: 0.9rem;
  margin: 0;
}

/* 404 Page Styles */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.error-content {
  max-width: 600px;
  margin: 0 auto;
}

.error-content h1 {
  font-size: 8rem;
  margin: 0;
  line-height: 1;
  color: var(--link-color);
  opacity: 0.8;
  font-weight: 700;
}

.error-content h2 {
  font-size: 2rem;
  margin: 1rem 0;
  color: var(--text-color);
}

.error-content p {
  font-size: 1.2rem;
  color: var(--text-color);
  opacity: 0.8;
  margin-bottom: 2rem;
}

.error-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 3rem;
}

.error-button {
  background: var(--secondary-bg);
  color: var(--text-color);
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: 500;
}

.error-button:hover {
  background: var(--link-color);
  color: var(--bg-color);
  transform: translateY(-1px);
}

.error-suggestions {
  text-align: left;
  max-width: 400px;
  margin: 0 auto;
  background: var(--secondary-bg);
  padding: 1.5rem;
  border-radius: 4px;
}

.error-suggestions h3 {
  margin: 0 0 1rem 0;
  font-size: 1.2rem;
  color: var(--text-color);
}

.error-suggestions ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
}

.error-suggestions li {
  margin: 0;
}

.error-suggestions a {
  color: var(--text-color);
  opacity: 0.8;
  text-decoration: none;
  transition: all 0.2s ease;
  display: block;
  padding: 0.5rem;
  border-radius: 4px;
}

.error-suggestions a:hover {
  opacity: 1;
  background: var(--bg-color);
  color: var(--link-color);
}

/* Taxonomy Folders */
.taxonomy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
  padding: 15px 0;
}

.taxonomy-folder {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px;
  background: var(--secondary-bg);
  border-radius: 6px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  color: var(--text-color);
}

.taxonomy-folder:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.folder-icon {
  width: 36px;
  height: 36px;
  margin-bottom: 8px;
  color: var(--link-color);
}

.folder-icon svg {
  width: 100%;
  height: 100%;
}

.folder-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.folder-name {
  font-size: 0.95em;
  font-weight: 500;
  color: var(--text-color);
  text-decoration: none;
}

.folder-count {
  font-size: 0.85em;
  color: var(--tag-color);
}

/* Adjust title size for taxonomy pages */
.taxonomy-page h1.taxonomy-title {
  font-size: 1.2em;
  margin-bottom: 0.5em;
}

/* Spotify Embed Styles */
.spotify-embed-container {
  margin: 1.5rem 0;
  max-width: 100%;
}

.spotify-embed-title {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  color: var(--text-color);
  font-weight: 600;
}

.spotify-embed {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 0.5rem;
}

.spotify-embed iframe {
  display: block;
  width: 100%;
  border: none;
}

.spotify-embed-note {
  margin: 0.5rem 0 0 0;
  text-align: right;
  color: var(--text-color);
  opacity: 0.7;
  font-size: 0.75rem;
  font-style: italic;
}

/* Audio indicator in post lists */
.episode-indicator {
  display: inline-flex;
  align-items: center;
  margin-left: 0.4em;
  color: var(--link-color);
  opacity: 0.85;
  transition: all 0.2s ease;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

.episode-indicator:hover {
  opacity: 1;
  transform: scale(1.15);
  color: var(--link-color);
}

.episode-indicator svg {
  display: block;
  width: 18px;
  height: 18px;
  stroke-width: 2.5px;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.1));
}

/* Audio quality note */
.audio-quality-note {
  margin: 1rem 0 0 0;
  padding: 0.75rem;
  background-color: rgba(var(--link-color-rgb), 0.05);
  border-left: 3px solid var(--link-color);
  border-radius: 0 4px 4px 0;
}

.audio-quality-note p {
  margin: 0;
  color: var(--text-color);
  font-size: 0.85rem;
  line-height: 1.5;
}

.audio-quality-note small {
  opacity: 0.9;
  display: block;
}

/* --- Subtle Background Highlight for in-content links --- */
.content a {
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
  border-radius: 3px;
  padding: 1px 3px;
  margin: -1px -3px;
}

.content a:hover {
  background-color: rgba(0, 96, 155, 0.1);
  /* Light theme highlight */
  color: var(--link-color);
}

html.dark-theme .content a:hover {
  background-color: rgba(171, 207, 255, 0.15);
  /* Dark theme highlight */
}

html.sepia-theme .content a:hover {
  background-color: rgba(112, 66, 20, 0.15);
  /* Sepia theme highlight */
}

/* Related Posts */
.related-posts {
  margin-top: 2rem;
  margin-bottom: 1rem;
  padding: 1.5rem;
  background: var(--secondary-bg);
  border-radius: 4px;
}

.related-posts h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.1em;
  text-align: center;
}

.related-posts ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.related-posts li {
  margin-bottom: 0.5rem;
  text-align: center;
}

.related-posts li:last-child {
  margin-bottom: 0;
}

.related-posts a {
  text-decoration: none;
  color: var(--text-color);
  opacity: 0.9;
  transition: all 0.2s ease;
}

.related-posts a:hover {
  color: var(--link-color);
  opacity: 1;
  text-decoration: underline;
}


/* --- Modern Navigation Styles --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background-color: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  transition: background-color var(--transition-duration), border-color var(--transition-duration);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  /* Reduced gap */
}

.main-navigation .menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.5rem;
}

.main-navigation .menu a {
  display: block;
  padding: 0.5rem 0.75rem;
  text-decoration: none;
  color: var(--text-color);
  opacity: 0.8;
  font-weight: 500;
  position: relative;
  transition: opacity 0.2s ease;
}

.main-navigation .menu a:hover {
  opacity: 1;
  text-decoration: none;
}

.main-navigation .menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--link-color);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.main-navigation .menu a:hover::after {
  width: 100%;
}

/* Search Styles (integrated with nav) */
.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-toggle-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  opacity: 0.8;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.search-toggle-button:hover {
  opacity: 1;
  color: var(--link-color);
}

.search-icon {
  width: 20px;
  height: 20px;
}

.search-container {
  display: none;
  /* Hidden by default */
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 300px;
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 1002;
}

.search-container.is-active {
  display: block;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  border-bottom: 1px solid var(--border-color);
  border-radius: 4px 4px 0 0;
  background: transparent;
  color: var(--text-color);
  font-size: 1rem;
  box-sizing: border-box;
}

.search-input:focus {
  outline: none;
  border-color: var(--link-color);
}

.search-results {
  max-height: 300px;
  overflow-y: auto;
}

.search-result-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background-color: var(--secondary-bg);
}

.search-result-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text-color);
}

.search-result-excerpt {
  font-size: 0.9rem;
  color: var(--text-color);
  opacity: 0.8;
}

/* Mobile Menu Toggle (Hamburger) */
.mobile-menu-toggle {
  display: none;
  /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  width: 30px;
  height: 30px;
  position: relative;
  z-index: 1001;
}

.hamburger-icon {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--text-color);
  position: absolute;
  left: 3px;
  top: 14px;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.hamburger-icon::before,
.hamburger-icon::after {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  background-color: var(--text-color);
  position: absolute;
  transition: transform 0.3s ease;
}

.hamburger-icon::before {
  transform: translateY(-8px);
}

.hamburger-icon::after {
  transform: translateY(8px);
}

/* Hamburger to 'X' transition */
.mobile-menu-toggle.is-active .hamburger-icon {
  background-color: transparent;
}

.mobile-menu-toggle.is-active .hamburger-icon::before {
  transform: translateY(0) rotate(45deg);
}

.mobile-menu-toggle.is-active .hamburger-icon::after {
  transform: translateY(0) rotate(-45deg);
}

/* Body class when mobile menu is open */
body.mobile-menu-open {
  overflow: hidden;
}


.post-list-heading {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 1rem;
  color: var(--text-color);
  text-align: left;
  /* border: 1px solid var(--border-color); */
  margin-left: 0.5rem;
  padding: 0.5rem 1rem;
}


/* Responsive Styles */
@media (max-width: 768px) {
  .main-navigation {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .main-navigation.is-open {
    transform: translateX(0);
    z-index: 2001;
  }

  .main-navigation .menu {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
    align-items: center;
    justify-content: center;
  }

  .main-navigation .menu a {
    font-size: 1.5rem;
    padding: 1rem;
  }

  .mobile-menu-toggle {
    display: block;
  }

  /* Mobile search overlay */
  .search-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* width: 100%; */
    height: 100%;
    border-radius: 0;
    display: none;
    /* still hidden by default */
    flex-direction: column;
    padding-top: 60px;
    /* space for header */
    background-color: var(--bg-color);
  }

  .search-container.is-active {
    display: flex;
  }

  .search-input {
    border-radius: 0;
    padding: 1.5rem;
    font-size: 1.2rem;
    border-bottom: 1px solid var(--border-color);
  }
}


/* Mobile Menu Close Button */
.mobile-menu-close {
  display: none;
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 2002;
}

.mobile-menu-close .close-icon {
  position: relative;
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--tag-color);
  transform: rotate(45deg);
}

.mobile-menu-close .close-icon::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--tag-color);
  transform: rotate(90deg);
}

@media (max-width: 768px) {
  .main-navigation.is-open .mobile-menu-close {
    display: block;
  }
}

/* --- Fancy List Styles --- */
.fancy-list {
  border-top: 1px solid var(--border-color);
  margin-top: 2rem;
}

.fancy-list-item {
  display: flex;
  align-items: center;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--border-color);
  text-decoration: none;
  color: var(--text-color);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.fancy-list-item:hover {
  background-color: var(--secondary-bg);
  transform: translateX(5px);
  text-decoration: none;
}

.fancy-list-date {
  font-family: 'Menlo', 'Monaco', 'Consolas', "Courier New", monospace;
  font-size: 0.875rem;
  color: var(--tag-color);
  min-width: 120px;
}

.fancy-list-title {
  flex-grow: 1;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s ease;
}

.fancy-list-item:hover .fancy-list-title {
  color: var(--link-color);
}

.fancy-list-arrow {
  margin-left: 1rem;
  color: var(--tag-color);
  opacity: 0.5;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.fancy-list-item:hover .fancy-list-arrow {
  opacity: 1;
  transform: translateX(5px);
}

.fancy-list-arrow svg {
  width: 20px;
  height: 20px;
}
