/* FastHTML Blog Custom Styles - Blog-Specific Only */

/*
 * This file contains only blog-specific styles that are not shared
 * between the main blog and other subsites (HLC, design notes).
 * 
 * Shared styles are in shared.css including:
 * - Theme variables and overrides
 * - Base typography and headings  
 * - Layout (header, footer, navigation)
 * - Common components (cards, badges, etc.)
 * - Post content base styles
 */

/* ===========================================
   BLOG-SPECIFIC CONFIGURATION
   =========================================== */

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

/* ===========================================
   PAGE-SPECIFIC COMPONENTS
   =========================================== */

/* Page titles */
.page-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 2.5rem;
  color: var(--text-color);
  font-family: var(--font-heading);
  border-bottom: 3px solid var(--accent-color);
  padding-bottom: 0.5rem;
  display: inline-block;
}

/* About page specific styling */
.about-page {
  text-align: justify;
}

.about-page p {
  text-align: justify;
  line-height: 1.7;
}

/* Note: All content link styles are now unified in shared.css */

/* ===========================================
   BLOG POST COMPONENTS
   =========================================== */

/* Featured post cards (blog-specific styling) */

.post-card.featured {
  border-left: 6px solid var(--accent-color);
  background: var(--bg-secondary);
}

/* ===========================================
   POST CONTENT TYPOGRAPHY
   =========================================== */

/* Detailed post content styling (blog-specific) */

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text-color);
  font-family: var(--font-heading);
}

.post-content h2 {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.post-content h3 {
  color: var(--primary-color);
}

.post-content p {
  margin-bottom: 1.2rem;
}

.post-content blockquote {
  border-left: 4px solid var(--accent-color);
  background: var(--bg-secondary);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--fg-secondary);
}

.post-content pre {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1.5rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.4;
}

.post-content code {
  background: var(--bg-tertiary);
  color: var(--orange);
  padding: 0.2rem 0.4rem;
  border-radius: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.post-content pre code {
  background: transparent;
  color: var(--text-color);
  padding: 0;
  font-size: 0.9rem;
}

.post-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--border-color);
}

.post-tags {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.tag {
  background: var(--bg-tertiary);
  color: var(--text-color);
  padding: 0.4rem 0.8rem;
  border-radius: 1rem;
  font-size: 0.8rem;
  font-weight: 500;
  font-family: var(--font-heading);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.tag:hover {
  background: var(--primary-color);
  color: var(--bg-primary);
  border-color: var(--primary-color);
}

.read-more {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  font-family: var(--font-heading);
  padding: 0.5rem 1rem;
  border: 2px solid var(--primary-color);
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.read-more:hover {
  background: var(--primary-color);
  color: var(--bg-primary);
}

/* Single post */
.single-post .post-card {
  margin-bottom: 0;
}

/* ===========================================
   PAGE NAVIGATION
   =========================================== */

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin: 4rem 0;
}

.pagination a {
  padding: 0.75rem 1.25rem;
  text-decoration: none;
  color: var(--text-color);
  background: var(--bg-light);
  border: 2px solid var(--border-color);
  border-radius: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 500;
  transition: all 0.2s ease;
}

.pagination a:hover {
  background: var(--primary-color);
  color: var(--bg-primary);
  border-color: var(--primary-color);
  transform: translateY(-1px);
}

.pagination-current {
  background: var(--primary-color) !important;
  color: var(--bg-primary) !important;
  border-color: var(--primary-color) !important;
}

/* ===========================================
   ARCHIVE & LISTING PAGES
   =========================================== */

/* Archive */
.year-section {
  margin-bottom: 4rem;
  background: var(--bg-light);
  border-radius: 0.75rem;
  padding: 2rem;
  border: 2px solid var(--border-color);
}

.year-heading {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
  font-family: var(--font-heading);
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 0.5rem;
  display: inline-block;
}

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

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

.archive-list li:last-child {
  border-bottom: none;
}

.archive-list li:hover {
  background-color: var(--bg-secondary);
  margin: 0 -1rem;
  padding: 1rem;
  border-radius: 0.5rem;
}

.archive-list a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  font-family: var(--font-body);
  transition: color 0.2s ease;
  flex: 1;
}

.archive-list a:hover {
  color: var(--primary-color);
}

.archive-date {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-family: var(--font-heading);
  font-weight: 500;
}

/* Tags */
.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 2rem;
}

.tag-link {
  background: var(--bg-light);
  color: var(--text-color);
  padding: 0.75rem 1.5rem;
  border-radius: 2rem;
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 500;
  transition: all 0.3s ease;
  border: 2px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.tag-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.tag-link:hover::before {
  left: 100%;
}

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

/* ===========================================
   UI STATES
   =========================================== */

/* Empty states */
.empty-state {
  text-align: center;
  padding: 6rem 2rem;
  color: var(--text-muted);
  background: var(--bg-light);
  border-radius: 1rem;
  border: 2px dashed var(--border-color);
}

.empty-state h1 {
  color: var(--text-muted);
  font-family: var(--font-heading);
}

/* Responsive design */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  .nav-container {
    flex-direction: column;
    gap: 1.5rem;
    padding: 0 1rem;
  }

  .nav-links {
    gap: 1.5rem;
  }

  .nav-links a {
    font-size: 1rem;
  }

  .brand h1 {
    font-size: 1.5rem;
  }

  .page-title {
    font-size: 2rem;
  }

  .post-card {
    padding: 1.5rem;
    margin-bottom: 2rem;
  }

  .post-title {
    font-size: 1.5rem;
  }

  .post-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .pagination {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .pagination a {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }

  .archive-list li {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .archive-list li:hover {
    margin: 0 -0.5rem;
    padding: 1rem 0.5rem;
  }

  .year-section {
    padding: 1.5rem;
  }

  .year-heading {
    font-size: 1.5rem;
  }

  .tags-cloud {
    gap: 1rem;
  }

  .tag-link {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  body {
    font-size: 16px;
  }

  h1 { font-size: 1.8em; }
  h2 { font-size: 1.5em; }
  h3 { font-size: 1.3em; }
}

/* ===========================================
   INTERACTIVE FEATURES
   =========================================== */

/* HTMX loading states */
.htmx-indicator {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.htmx-request .htmx-indicator {
  opacity: 1;
}

.htmx-request.htmx-indicator {
  opacity: 1;
}

/* Loading spinner with Gruvbox colors */
.spinner {
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  border: 3px solid var(--bg-accent);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===========================================
   ERROR PAGES
   =========================================== */

/* Error page styling */
.error-page {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-light);
  border-radius: 1rem;
  border: 2px solid var(--red);
}

.error-page h1 {
  color: var(--red);
  font-family: var(--font-heading);
}

/* End of blog-specific styles */