/* Custom CSS for My Musings Blog */

/* Main color variables - edit these to change the color scheme */
:root {
  --primary-color: #000000;
  --secondary-color: #666666;
  --accent-color: #FFD700;
  --background-color: #000000;
  --text-color: #ffffff;
  --link-color: #FFD700;
  --card-background: #111111;
  --card-hover: #1a1a1a;
  --nav-text-color: rgba(255, 255, 255, 0.9);
  --footer-background: #0a0a0a;
  --footer-text: rgba(255, 255, 255, 0.85);
}

/* Body styles */
body {
  background-color: var(--background-color);
  color: var(--text-color);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

/* Header and navigation styling */
.navbar {
  background-color: var(--primary-color) !important;
  border-radius: 0;
  padding: 1rem 0;
  position: fixed;
  width: 100%;
  z-index: 1000;
  transition: background-color 0.3s ease, padding 0.3s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.navbar.scrolled {
  padding: 0.5rem 0;
  background-color: rgba(0, 0, 0, 0.95) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Add padding to body to account for fixed navbar */
body {
  padding-top: 60px;
}

/* Style the navbar brand/logo */
.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-color) !important;
}

/* Navigation links */
.navbar .nav-link {
  color: var(--nav-text-color) !important;
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  transition: color 0.3s ease;
}

.navbar .nav-link:hover {
  color: var(--accent-color) !important;
}

.navbar-brand {
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Link styling */
a {
  color: var(--link-color);
  transition: color 0.3s ease;
}

a:hover {
  color: var(--accent-color);
  text-decoration: none;
}

/* Navigation links */
.navbar-dark .navbar-nav .nav-link {
  color: var(--nav-text-color);
  font-weight: 500;
  padding: 0.5rem 1rem;
}

.navbar-dark .navbar-nav .nav-link:hover {
  color: white;
}

/* Title banner integration */
.quarto-title-banner {
  background-color: var(--primary-color) !important;
  margin: 0;
  padding-top: 6rem !important;
  padding-bottom: 2rem !important;
}

.quarto-title-banner .quarto-title {
  margin-bottom: 1rem;
}

.quarto-title-banner .quarto-title .title {
  color: white;
  font-weight: 700;
}

/* Main content area */
main {
  background-color: var(--background-color);
  position: relative;
  z-index: 1;
  padding-top: 2rem;
}

/* Container adjustments */
.content-block {
  padding-top: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Post cards styling */
.quarto-grid-item {
  background-color: var(--card-background);
  border-radius: 15px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: none !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.quarto-grid-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  background-color: var(--card-hover);
}

.quarto-grid-item .card-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 1.5rem;
}

.listing-description {
  flex-grow: 1;
  margin-bottom: 1rem;
  color: var(--text-color);
  opacity: 0.9;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Read More button */
.read-more-link {
  display: inline-block;
  background-color: var(--accent-color);
  color: var(--background-color) !important;
  padding: 0.5rem 1.2rem;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  text-align: center;
  margin-top: auto;
  align-self: flex-start;
}

.read-more-link:hover {
  background-color: var(--link-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Post thumbnails */
.card-img-top {
  border-radius: 15px 15px 0 0;
  object-fit: cover;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-color);
}

/* Categories section styling */
.quarto-listing-category {
  font-size: 0.85rem;
  margin: 1rem 0 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.quarto-listing-category .category-count {
  font-size: 0.75rem;
  opacity: 0.7;
}

/* Category pills */
.quarto-category {
  color: var(--footer-text);
  text-decoration: none;
  padding: 0.2rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 400;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  position: relative;
  border-radius: 12px;
}

/* Yellow highlight effect */
.quarto-category::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--accent-color);
  border-radius: 12px;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.3s ease;
  z-index: -1;
}

.quarto-category:hover {
  color: var(--background-color);
}

.quarto-category:hover::before {
  opacity: 1;
  transform: scale(1);
}

.quarto-category:hover .category-count {
  opacity: 1;
}

/* Animation for category hover */
@keyframes subtle-bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-1px);
  }
}

.quarto-category {
  animation: none;
}

.quarto-category:hover {
  animation: subtle-bounce 0.5s ease;
}

/* Code blocks */
pre {
  border-radius: 10px;
  padding: 1.2em;
  background-color: var(--primary-color) !important;
}

code {
  font-family: 'Fira Code', 'JetBrains Mono', monospace;
  font-size: 0.9em;
}

/* Blockquotes */
blockquote {
  border-left: 4px solid var(--accent-color);
  padding-left: 1em;
  margin-left: 0;
  font-style: italic;
  color: var(--secondary-color);
}

/* Tables */
table {
  border-radius: 10px;
  overflow: hidden;
  margin: 2em 0;
}

th {
  background-color: var(--primary-color);
}

/* Images */
img {
  border-radius: 10px;
  max-width: 100%;
  height: auto;
}

/* Footer */
.footer {
  background-color: var(--footer-background);
  padding: 2rem 0;
  margin-top: 4rem;
  color: var(--footer-text);
  font-size: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.footer a {
  color: var(--footer-text);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer a:hover {
  color: var(--accent-color);
  text-decoration: none;
}

.footer-left {
  flex: 1;
  opacity: 0.8;
}

.footer-center {
  flex: 1;
  text-align: center;
}

.footer-right {
  flex: 1;
  text-align: right;
}

.footer .social-link {
  font-size: 1.2rem;
  padding: 0.5rem;
}

.footer .social-link:hover {
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .footer-left,
  .footer-center,
  .footer-right {
    flex: none;
    text-align: center;
  }
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--background-color);
}

::-webkit-scrollbar-thumb {
  background: var(--secondary-color);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-color);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .navbar {
    border-radius: 0;
  }
  
  .quarto-grid-item {
    margin-bottom: 1.5em;
  }
  
  footer {
    border-radius: 0;
  }
