body {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}
body::before {
  content: '';
  position: fixed;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  background-image: radial-gradient(1px 1px at 25% 25%, rgba(255, 255, 255, 0.9) 50%, transparent), radial-gradient(2px 2px at 50% 50%, rgba(255, 255, 255, 0.8) 50%, transparent), radial-gradient(3px 3px at 75% 75%, rgba(255, 255, 255, 0.7) 50%, transparent);
  background-size: 200px 200px, 300px 300px, 400px 400px;
  animation: twinkle 4s ease-in-out infinite alternate;
  z-index: 0;
  pointer-events: none;
}
@keyframes twinkle {
  0% {
    opacity: 0.3;
  }
  100% {
    opacity: 0.7;
  }
}
/* Breadcrumbs */
.breadcrumbs {
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid rgba(255, 255, 255, 0.7);
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}
.breadcrumbs-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  color: #222;
}
.breadcrumbs a {
  color: #333;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}
.breadcrumbs a:hover {
  color: #007a7a;
  text-decoration: underline;
}
.breadcrumbs .separator {
  color: #666;
  margin: 0 0.25rem;
}
.breadcrumbs .current {
  color: #111;
  font-weight: 500;
}
/* Search Button */
.search-button {
  margin-left: auto;
  background: none;
  border: 1px solid #ddd;
  color: #333;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.search-button:hover {
  background: #f5f5f5;
  border-color: #007a7a;
  color: #007a7a;
}
.search-button:focus {
  outline: 2px solid #007a7a;
  outline-offset: 2px;
}
.search-button .search-icon-text {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.search-button svg {
  width: 16px;
  height: 16px;
}
/* Feed Dropdown */
.feed-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-right: 0.5rem;
}
.feed-dropdown-toggle {
  background: none;
  border: none;
  color: #333;
  font-size: 1rem;
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 4px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.feed-dropdown-toggle:hover {
  background: rgba(0, 122, 122, 0.1);
  color: #007a7a;
}
.feed-dropdown-toggle:focus {
  outline: 2px solid #007a7a;
  outline-offset: 2px;
}
.feed-dropdown-toggle i {
  font-size: 1rem;
}
.feed-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 0.5rem;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 150px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
}
.feed-dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.feed-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-right: none;
  border-bottom: none;
  transform: translateX(-50%) rotate(45deg);
}
.feed-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: #333;
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}
.feed-dropdown-item:first-child {
  border-radius: 8px 8px 0 0;
}
.feed-dropdown-item:last-child {
  border-radius: 0 0 8px 8px;
}
.feed-dropdown-item:hover {
  background: #f5f5f5;
  color: #007a7a;
}
.feed-dropdown-item:hover i {
  color: #007a7a;
}
.feed-dropdown-item i {
  color: #ff8800;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}
.feed-dropdown-item span {
  font-weight: 500;
}
/* Remove old feed links styles */
.feed-links {
  display: none;
}
/* Blog Index */
.blog-index {
  padding: 2rem 0;
  max-width: 1200px;
  margin: 0 auto;
}
.blog-index h1 {
  font-family: var(--font-family);
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--text-primary);
}
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}
.post-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.4s, box-shadow 0.4s;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
  height: 100%;
  display: flex;
  flex-direction: column;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}
.post-thumbnail {
  width: 100%;
  height: 200px;
  overflow: hidden;
}
.post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s;
}
.post-card:hover .post-thumbnail img {
  transform: scale(1.05);
}
.post-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
.post-content h2 {
  font-family: var(--font-family);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  line-height: 1.3;
}
.post-content h2 a {
  color: var(--text-primary);
  text-decoration: none;
}
.post-content h2 a:hover {
  color: var(--primary);
}
.post-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.description {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.6;
  flex-grow: 1;
}
.tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: auto;
}
.tag {
  background: var(--background3);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  transition: background-color 0.4s;
}
.tag:hover {
  background: var(--primary);
}
.pagination {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 3rem;
}
.pagination a {
  padding: 0.8rem 1.5rem;
  background: var(--background3);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  transition: background-color 0.4s;
}
.pagination a:hover {
  background: var(--primary);
}
@media (max-width: 768px) {
  .posts-grid {
    grid-template-columns: 1fr;
  }
  .blog-index {
    padding: 1rem;
  }
  .blog-index h1 {
    font-size: 2.5rem;
  }
  .post-meta {
    flex-direction: column;
    gap: 0.5rem;
  }
}
/* Post metadata */
.post-meta .author,
.post-meta .date {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #555;
}
.post-meta i {
  color: #999;
  font-size: 0.85rem;
}
/* Tags styling */
.tags-container {
  position: relative;
  margin-bottom: 2rem;
}
.tags {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 2rem;
  transition: all 0.3s ease;
}
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #fff;
  border-radius: 0 999px 999px 0;
  transition: all 0.4s ease;
  text-decoration: none;
  width: fit-content;
  cursor: pointer;
}
/* Hide tags beyond the 5th by default */
.tag-hidden {
  display: none;
}
/* Show all tags on hover */
.tags-container:hover .tag-hidden {
  display: inline-flex;
  animation: fadeIn 0.3s ease forwards;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
/* Expand hint */
.tags-expand-hint {
  display: inline-block;
  font-size: 0.7rem;
  color: #666;
  margin-top: 0.5rem;
  font-style: italic;
  transition: opacity 0.3s ease;
}
.tags-container:hover .tags-expand-hint {
  opacity: 0;
  pointer-events: none;
}
.tag:nth-child(1) {
  background: #00b3b3;
}
/* Teal */
.tag:nth-child(2) {
  background: #6366f1;
}
/* Indigo */
.tag:nth-child(3) {
  background: #f59e0b;
}
/* Amber */
.tag:nth-child(4) {
  background: #ec4899;
}
/* Pink */
.tag:nth-child(5) {
  background: #10b981;
}
/* Emerald */
.tag:nth-child(6) {
  background: #8b5cf6;
}
/* Purple */
.tag:nth-child(7) {
  background: #ef4444;
}
/* Red */
.tag:nth-child(8) {
  background: #3b82f6;
}
/* Blue */
.tag:nth-child(9) {
  background: #06b6d4;
}
/* Cyan */
.tag:nth-child(10) {
  background: #f97316;
}
/* Orange */
.tag:hover {
  transform: translateX(3px);
  opacity: 0.9;
  color: #fff;
}
/* Blog Post */
.blog-post {
  max-width: 900px;
  margin: 0 auto;
  padding: 4rem 2rem;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 12px;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.7);
  position: relative;
  z-index: 1;
}
/* Post Header */
.post-header {
  text-align: center;
  max-width: 1100px;
  margin: 0 auto 3rem;
  padding: 5rem 2rem;
  position: relative;
  z-index: 1;
}
.post-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}
.post-header h1 {
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: #fff;
  letter-spacing: -0.02em;
  animation: fadeSlideDown 0.8s ease-out;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
  padding: 0 1rem;
  display: inline-block;
}
.subtitle {
  font-size: 1.6rem;
  color: #fff;
  line-height: 1.4;
  margin-bottom: 2rem;
  font-weight: 400;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeSlideUp 0.8s ease-out 0.2s backwards;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
  padding: 0 1rem;
  display: inline-block;
}
@keyframes fadeSlideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.post-content {
  font-size: 1.2rem;
  line-height: 1.8;
  color: #1a1a1a;
}
.post-content p {
  margin-bottom: 1.8rem;
}
.post-content h2 {
  font-size: 2rem;
  font-weight: 600;
  margin: 3rem 0 1.5rem;
  color: #111;
}
.post-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 2.5rem 0 1.25rem;
  color: #111;
}
.post-content ul,
.post-content ol {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
  color: #1a1a1a;
}
.post-content li {
  margin-bottom: 0.75rem;
}
.post-content img {
  max-width: 100%;
  height: auto;
  margin: 2.5rem auto;
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
}
.post-footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.7);
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
}
/* Share buttons */
.share-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}
.share-buttons a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  color: #fff;
  font-weight: 500;
  font-size: 1rem;
  transition: all 0.4s;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}
.share-buttons a:first-child {
  background: #000;
}
.share-buttons a:last-child {
  background: #0A66C2;
}
.share-buttons a:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
}
/* Progress Bar */
.progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 8px;
  z-index: 1000;
  background: transparent;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #00b3b3, #6366f1);
  width: 0%;
  transition: width 0.2s ease;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}
/* Blog Layout */
.blog-container {
  background: #fff;
}
.blog-layout {
  display: flex;
  gap: 4rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  min-height: calc(100vh - 300px);
  position: relative;
  z-index: 1;
}
.blog-content {
  flex: 1;
  max-width: 800px;
  background: rgba(255, 255, 255, 0.98);
  padding: 2rem;
  margin-bottom: 2rem;
  border-radius: 12px;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.7);
}
.toc-sidebar {
  position: sticky;
  top: 100px;
  align-self: flex-start;
  width: 280px;
  height: calc(100vh - 150px);
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.98);
  margin-top: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #666 #f1f1f1;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.7);
}
.toc-title {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #444;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  overflow-y: auto;
}
.toc-list li {
  margin-bottom: 0.75rem;
  line-height: 1.4;
}
.toc-list a {
  color: #555;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.4s;
  display: block;
  padding: 0.25rem 0;
}
.toc-list a:hover {
  color: #00b3b3;
  padding-left: 0.5rem;
}
.toc-list a.active {
  color: #00b3b3;
  font-weight: 500;
  position: relative;
}
.toc-list a.active::before {
  content: "";
  position: absolute;
  left: -1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 1rem;
  background: #00b3b3;
  border-radius: 2px;
}
/* Customize scrollbar for ToC */
.toc-sidebar::-webkit-scrollbar {
  width: 4px;
}
.toc-sidebar::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 2px;
}
.toc-sidebar::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 2px;
}
.toc-sidebar::-webkit-scrollbar-thumb:hover {
  background: #999;
}
/* Hero Image */
.hero-image {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto 4rem;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}
.hero-image img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.7);
}
/* Update responsive styles */
@media (max-width: 1200px) {
  .post-header h1 {
    font-size: 2.8rem;
  }
  .subtitle {
    font-size: 1.3rem;
  }
  .toc-sidebar {
    display: none;
  }
  .blog-layout {
    padding: 1rem;
  }
  .blog-content {
    max-width: 100%;
  }
}
@media (max-width: 768px) {
  .post-header {
    padding: 2rem 1rem;
  }
  .post-header h1 {
    font-size: 2.5rem;
  }
  .subtitle {
    font-size: 1.2rem;
  }
  .hero-image {
    padding: 0 1rem;
    margin-bottom: 2rem;
  }
  .blog-layout {
    padding: 0 1rem;
  }
  .tags {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 1.5rem;
  }
  .tag {
    border-radius: 12px;
  }
  .posts-grid {
    grid-template-columns: 1fr;
  }
}
/* Consolidated styling for post header container 
   (moved from inline styles in post.njk) */
.post-header-container {
  display: block;
  margin-top: 94px;
}
/* If there were blog-index.css styles that are exclusive to the index page,
   they should be merged here. For example:
   
   .blog-index {
     padding: 2rem 0;
     max-width: 1200px;
     margin: 0 auto;
   }
   
   (Add additional merged styles here as needed.)
*/
/* ... rest of existing CSS ... */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
}
.back-link {
  display: inline-block;
  margin-top: 2rem;
  color: #fff;
  text-decoration: none;
  transition: all 0.4s;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  background: rgba(0, 179, 179, 0.7);
  backdrop-filter: blur(10px);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.4);
  font-weight: 600;
}
.back-link:hover {
  color: #fff;
  background: rgba(0, 179, 179, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
}
.post-content a {
  color: #007a7a;
  text-decoration: underline;
  font-weight: 500;
  transition: color 0.4s;
}
.post-content a:hover {
  color: #00b3b3;
}
/* Improve list visibility */
.post-content ul,
.post-content ol {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
  color: #1a1a1a;
}
.post-content li {
  margin-bottom: 0.75rem;
}
/* Improve code block contrast */
.post-content pre,
.post-content code {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
  padding: 0.2em 0.4em;
  border: 1px solid rgba(0, 0, 0, 0.1);
  font-family: monospace;
}
/* Responsive adjustments */
@media (max-width: 768px) {
  .breadcrumbs {
    padding: 1rem;
  }
  .breadcrumbs-container {
    font-size: 0.9rem;
    gap: 0.25rem;
  }
  .feed-dropdown-toggle {
    padding: 0.3rem;
  }
  .search-button {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
  }
  .search-button span {
    display: none;
  }
  .feed-dropdown-menu {
    right: -10px;
    left: auto;
    transform: translateX(0);
  }
  .feed-dropdown-menu.show {
    transform: translateX(0) translateY(0);
  }
  .feed-dropdown-menu::before {
    right: 20px;
    left: auto;
    transform: translateX(0) rotate(45deg);
  }
}
