* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Light mode (default) */
  --bg-primary: #f4f4f4;
  --bg-secondary: #ffffff;
  --text-primary: #333333;
  --text-heading: #2c3e50;
  --link-color: #3498db;
  --link-hover: #2980b9;
  --border-color: #dddddd;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --error-color: #e74c3c;
  --sidebar-bg: #2c3e50;
  --sidebar-text: #ffffff;
  --sidebar-link-bg: #34495e;
  --sidebar-link-hover: #3498db;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;
    --text-primary: #e0e0e0;
    --text-heading: #ffffff;
    --link-color: #5dade2;
    --link-hover: #85c1e9;
    --border-color: #444444;
    --shadow-color: rgba(0, 0, 0, 0.4);
    --error-color: #e74c3c;
    --sidebar-bg: #1a2e1a;
    --sidebar-text: #e0e0e0;
    --sidebar-link-bg: #243d24;
    --sidebar-link-hover: #4a7c4a;
  }
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
}

/* Top Navigation Bar */
.navbar {
  background-color: var(--sidebar-bg);
  padding: 0 40px;
  display: flex;
  align-items: center;
  height: 60px;
  box-shadow: 0 2px 4px var(--shadow-color);
  position: relative;
}

.navbar-brand {
  position: absolute;
  left: 40px;
  display: flex;
  align-items: center;
  height: 100%;
}

.navbar-brand img {
  height: 45px;
  width: 45px;
  border-radius: 50%;
}

.navbar-nav {
  display: flex;
  list-style: none;
  gap: 8px;
  margin: 0 auto;
}

.navbar-nav a {
  color: var(--sidebar-text);
  padding: 8px 16px;
  border-radius: 4px;
  transition: background-color 0.3s;
  text-decoration: none;
}

.navbar-nav a:hover {
  background-color: var(--sidebar-link-hover);
  color: var(--sidebar-text);
  text-decoration: none;
}

.navbar-nav a.active {
  background-color: var(--sidebar-link-bg);
}

.navbar-nav .logout-link {
  color: var(--error-color);
}

/* Hamburger menu button */
.navbar-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

/* Mobile page title (hidden on desktop) */
.navbar-title {
  display: none;
  color: var(--sidebar-text);
  font-size: 1rem;
  font-weight: 500;
}

.navbar-toggle span {
  display: block;
  width: 24px;
  height: 3px;
  background-color: var(--sidebar-text);
  margin: 5px 0;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.navbar-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}

.navbar-toggle.active span:nth-child(2) {
  opacity: 0;
}

.navbar-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* Mobile styles */
@media (max-width: 768px) {
  .navbar {
    flex-wrap: wrap;
    height: auto;
    padding: 15px 20px;
    gap: 0;
    justify-content: space-between;
  }

  .navbar-brand {
    position: static;
    flex: 0 0 auto;
    order: 1;
  }

  .navbar-brand img {
    height: 40px;
    width: 40px;
  }

  .navbar-title {
    display: block;
    flex: 1 1 auto;
    text-align: center;
    order: 2;
  }

  .navbar-toggle {
    display: block;
    position: static;
    transform: none;
    flex: 0 0 auto;
    order: 3;
  }

  .navbar-nav {
    display: none;
    flex-direction: column;
    width: 100%;
    padding-top: 15px;
    gap: 4px;
    margin: 0;
    order: 4;
  }

  .navbar-nav.active {
    display: flex;
  }

  .navbar-nav li {
    width: 100%;
  }

  .navbar-nav a {
    display: block;
    text-align: center;
    padding: 12px 16px;
  }

  .main-content {
    padding: 0 20px;
    margin: 20px auto;
  }

  .photo-gallery,
  .photo-grid {
    grid-template-columns: 1fr;
  }

  .photo-section {
    margin-bottom: 40px;
    padding-bottom: 40px;
  }

  .photo-section-title {
    font-size: 1.4rem;
  }

  .photo-section-meta {
    flex-direction: column;
    gap: 6px;
  }

  .page-subtitle {
    font-size: 1rem;
    margin-bottom: 30px;
  }

  .photo-section-toggle {
    width: 100%;
    justify-content: center;
  }

  /* Detail view mobile - default expanded */
  .photo-detail-item {
    grid-template-columns: 1fr;
    gap: 12px;
    padding-bottom: 40px;
  }

  .photo-detail-item.expanded {
    /* Already single column on mobile, just ensure good spacing */
    gap: 12px;
  }

  .photo-detail-item.expanded .photo-detail-image {
    box-shadow: none;
    border-radius: 0;
    margin: 0 -20px;
    width: calc(100% + 40px);
  }

  .photo-detail-item.expanded .photo-detail-image img {
    border-radius: 0;
  }

  .photo-detail-list {
    gap: 40px;
  }

  .photo-detail-title {
    font-size: 1.1rem;
  }

  .photo-detail-caption {
    font-size: 0.95rem;
  }

  .photo-meta-tags {
    flex-direction: column;
    gap: 4px;
  }

  /* Mobile expand hint - subtle tap indicator */
  .expand-hint {
    opacity: 0.6;
    font-size: 0.75rem;
    padding: 4px 10px;
  }

  .container {
    margin: 20px;
    padding: 15px;
  }
}

/* Main content area for pages with navbar */
.main-content {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 40px;
}

.main-content h1 {
  margin-bottom: 30px;
  color: var(--text-heading);
}

/* Page Subtitle */
.page-subtitle {
  color: var(--text-primary);
  opacity: 0.8;
  font-size: 1.1rem;
  margin-bottom: 40px;
  margin-top: -20px;
}

/* Photo Sections */
.photo-section {
  margin-bottom: 60px;
  padding-bottom: 60px;
  border-bottom: 1px solid var(--border-color);
}

.photo-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.photo-section-header {
  margin-bottom: 24px;
}

/* Clickable section title with arrow */
.photo-section-title-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}

.photo-section-title-link:hover {
  color: var(--link-color);
  text-decoration: none;
}

.photo-section-title-link:hover .section-arrow {
  transform: translateX(4px);
}

.section-arrow {
  font-size: 1.5rem;
  font-weight: 300;
  opacity: 0.6;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.photo-section-title-link:hover .section-arrow {
  opacity: 1;
}

.photo-section-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 0;
}

.photo-section-header .photo-section-description {
  margin-top: 0;
}

.photo-section-description {
  color: var(--text-primary);
  opacity: 0.85;
  font-size: 1rem;
  line-height: 1.6;
  max-width: 700px;
}

/* Section metadata (gear, locations, timeline) */
.photo-section-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 8px;
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: var(--text-primary);
  opacity: 0.75;
}

.photo-section-meta .meta-item {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.photo-section-meta .meta-item strong {
  font-weight: 600;
  opacity: 0.9;
}

.photo-section-loading {
  color: var(--text-primary);
  opacity: 0.7;
  padding: 20px 0;
}

.photo-section-loading.error {
  color: var(--error-color);
}

.no-photos {
  color: var(--text-primary);
  opacity: 0.7;
}

/* Photo Grid */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

/* Hidden photos (beyond preview count) */
.photo-hidden {
  display: none;
}

.photo-hidden.photo-visible {
  display: block;
  animation: fadeInUp 0.4s ease forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Toggle Button (link styled as button) */
.photo-section-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding: 12px 24px;
  background-color: transparent;
  border: 2px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.photo-section-toggle:hover {
  background-color: var(--sidebar-bg);
  border-color: var(--sidebar-bg);
  color: var(--sidebar-text);
  text-decoration: none;
}

.toggle-count {
  opacity: 0.7;
  font-weight: 400;
}

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-primary);
  opacity: 0.8;
  text-decoration: none;
  font-size: 0.95rem;
  margin-bottom: 16px;
  transition: opacity 0.2s ease;
}

.back-link:hover {
  opacity: 1;
  text-decoration: none;
  color: var(--link-color);
}

/* Detail View - Photo List */
.photo-detail-list {
  display: flex;
  flex-direction: column;
  gap: 48px;
  margin-top: 32px;
}

.photo-detail-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border-color);
}

.photo-detail-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.photo-detail-image {
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px var(--shadow-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.photo-detail-image:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--shadow-color);
}

.photo-detail-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

/* Expand hint */
.expand-hint {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.8rem;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.photo-detail-image:hover .expand-hint {
  opacity: 1;
}

/* Expanded state */
.photo-detail-item.expanded {
  grid-template-columns: 1fr;
}

.photo-detail-item.expanded .photo-detail-image {
  transform: none;
  box-shadow: 0 8px 32px var(--shadow-color);
}

.photo-detail-item.expanded .photo-detail-info {
  padding-top: 16px;
}

.photo-detail-info {
  padding-top: 8px;
}

.photo-detail-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 8px;
}

/* Photo metadata tags (date, location, gear) */
.photo-meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-bottom: 12px;
  font-size: 0.85rem;
  color: var(--text-primary);
  opacity: 0.75;
}

.photo-meta-tag {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.photo-meta-tag strong {
  font-weight: 600;
  opacity: 0.9;
}

.photo-detail-caption {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-primary);
  opacity: 0.85;
}

/* Section loading */
.section-loading {
  color: var(--text-primary);
  opacity: 0.7;
  padding: 20px 0;
}

/* Photo Gallery (legacy - keeping for compatibility) */
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 30px;
}

.photo-card {
  background-color: var(--bg-secondary);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px var(--shadow-color);
  transition: transform 0.3s, box-shadow 0.3s;
}

.photo-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px var(--shadow-color);
}

.photo-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

.container {
  max-width: 600px;
  margin: 100px auto;
  padding: 20px;
  background-color: var(--bg-secondary);
  border-radius: 5px;
  box-shadow: 0 2px 5px var(--shadow-color);
}

h1 {
  margin-bottom: 20px;
  color: var(--text-heading);
}

p {
  margin-bottom: 15px;
}

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

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

.form-group {
  margin-bottom: 15px;
}

label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 14px;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

button {
  background-color: var(--sidebar-bg);
  color: var(--sidebar-text);
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
}

button:hover {
  background-color: var(--sidebar-link-hover);
}

.error {
  color: var(--error-color);
  margin-top: 10px;
}

.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 250px;
  background-color: var(--sidebar-bg);
  color: var(--sidebar-text);
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.sidebar h2 {
  margin-bottom: 20px;
  font-size: 20px;
}

.sidebar nav ul {
  list-style: none;
}

.sidebar nav li {
  margin-bottom: 10px;
}

.sidebar nav a {
  color: var(--sidebar-text);
  display: block;
  padding: 10px;
  background-color: var(--sidebar-link-bg);
  border-radius: 4px;
  transition: background-color 0.3s;
}

.sidebar nav a:hover {
  background-color: var(--sidebar-link-hover);
  text-decoration: none;
}

.logout {
  margin-top: auto;
  padding-top: 20px;
}

.logout a {
  color: var(--error-color);
}

.content {
  flex: 1;
  padding: 40px;
  background-color: var(--bg-secondary);
}

.content h1 {
  margin-bottom: 20px;
}

/* Photo Gallery Items */
.photo-item {
  background-color: var(--bg-secondary);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px var(--shadow-color);
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
}

.photo-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px var(--shadow-color);
}

.photo-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90%;
  max-height: 80%;
  object-fit: contain;
}

/* Lightbox info overlay */
.lightbox-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  padding: 40px 24px 24px;
  text-decoration: none;
  color: white;
  cursor: pointer;
  transition: background 0.2s ease;
}

.lightbox-info:hover {
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
  text-decoration: none;
  color: white;
}

.lightbox-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: white;
}

.lightbox-caption {
  font-size: 0.9rem;
  opacity: 0.9;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

.lightbox-info::after {
  content: 'View in collection →';
  display: block;
  margin-top: 10px;
  font-size: 0.8rem;
  opacity: 0.7;
}

/* Highlighted photo (when scrolled to from lightbox) */
.photo-detail-item.highlighted {
  animation: highlightPulse 2s ease;
}

@keyframes highlightPulse {
  0%, 100% {
    box-shadow: none;
  }
  50% {
    box-shadow: 0 0 0 4px var(--link-color);
    border-radius: 8px;
  }
}

/* Visibility badges for dev mode */
.dev-only-badge,
.visibility-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 10;
  pointer-events: none;
}

.dev-only-badge {
  background: rgba(231, 76, 60, 0.9);
}

.visibility-badge.prod {
  background: rgba(52, 152, 219, 0.9);
}

.visibility-badge.family {
  background: rgba(155, 89, 182, 0.9);
}

.photo-item {
  position: relative;
}

/* Lightbox visibility badge */
.lightbox-visibility-badge {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 1001;
}

.lightbox-visibility-badge.dev-only {
  background: rgba(231, 76, 60, 0.9);
}

.lightbox-visibility-badge.prod {
  background: rgba(52, 152, 219, 0.9);
}

.lightbox-visibility-badge.family {
  background: rgba(155, 89, 182, 0.9);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: none;
  font-size: 24px;
  cursor: pointer;
  padding: 12px 18px;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox-close {
  top: 20px;
  right: 20px;
}

.lightbox-prev {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

@media (max-width: 768px) {
  .lightbox-prev,
  .lightbox-next {
    padding: 8px 12px;
    font-size: 18px;
  }

  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }

  .lightbox-info {
    padding: 30px 16px 16px;
  }

  .lightbox-title {
    font-size: 1rem;
  }

  .lightbox-caption {
    font-size: 0.85rem;
    -webkit-line-clamp: 2;
  }
}

/* Hero Section */
.hero {
  margin-bottom: 60px;
}

.hero h1 {
  margin-bottom: 16px;
}

.hero p {
  margin-bottom: 12px;
}

/* Featured Section */
.featured-section {
  margin-top: 40px;
  background-color: var(--bg-secondary);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px var(--shadow-color);
}

.featured-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 16px;
}

.featured-header {
  flex: 1;
}

.featured-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 4px;
}

.featured-subtitle {
  color: var(--text-primary);
  opacity: 0.7;
  font-size: 0.95rem;
  margin: 0;
}

.featured-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.featured-loading {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-primary);
  opacity: 0.7;
  padding: 40px 0;
}

.featured-loading.error {
  color: var(--error-color);
}

/* Featured CTA */
.featured-cta {
  flex-shrink: 0;
}

.featured-cta-link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 20px;
  background-color: transparent;
  border: 2px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.featured-cta-link:hover {
  background-color: var(--sidebar-bg);
  border-color: var(--sidebar-bg);
  color: var(--sidebar-text);
  text-decoration: none;
}

.cta-text {
  font-size: 0.9rem;
  font-weight: 500;
}

.cta-subtext {
  font-size: 0.75rem;
  opacity: 0.7;
  margin-top: 2px;
}

@media (max-width: 768px) {
  .hero {
    margin-bottom: 40px;
  }

  .featured-section {
    padding: 20px;
  }

  .featured-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .featured-cta-link {
    width: 100%;
    padding: 12px 20px;
  }

  .featured-gallery {
    grid-template-columns: 1fr;
  }
}

/* ============ BLOG STYLES ============ */

/* Blog Card (overview list) */
.blog-card {
  background-color: var(--bg-secondary);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px var(--shadow-color);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--shadow-color);
}

.blog-card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}

.blog-card-link:hover {
  color: var(--link-color);
  text-decoration: none;
}

.blog-card-link:hover .section-arrow {
  transform: translateX(4px);
}

.blog-card-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-heading);
  margin: 0;
}

.blog-card-date {
  font-size: 0.9rem;
  color: var(--text-primary);
  opacity: 0.6;
  margin: 8px 0 12px;
}

.blog-card-description {
  color: var(--text-primary);
  opacity: 0.85;
  font-size: 1rem;
  line-height: 1.6;
  margin: 0 0 12px;
}

.blog-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Tags (shared style) */
.tag {
  display: inline-block;
  padding: 4px 10px;
  background-color: var(--sidebar-bg);
  color: var(--sidebar-text);
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* Blog Post (detail view) */
.blog-post {
  max-width: 800px;
}

.blog-post-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.blog-post-header h1 {
  font-size: 2rem;
  margin-bottom: 16px;
}

.blog-post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.post-date {
  color: var(--text-primary);
  opacity: 0.7;
  font-size: 0.95rem;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Blog Post Content */
.blog-post-content {
  font-size: 1.1rem;
  line-height: 1.8;
}

.blog-post-content h2 {
  font-size: 1.5rem;
  margin-top: 40px;
  margin-bottom: 16px;
  color: var(--text-heading);
}

.blog-post-content h3 {
  font-size: 1.25rem;
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--text-heading);
}

.blog-post-content p {
  margin-bottom: 20px;
}

.blog-post-content ul,
.blog-post-content ol {
  margin-bottom: 20px;
  padding-left: 24px;
}

.blog-post-content li {
  margin-bottom: 8px;
}

.blog-post-content pre {
  background-color: var(--sidebar-bg);
  color: var(--sidebar-text);
  padding: 16px 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 20px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.blog-post-content code {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.blog-post-content blockquote {
  border-left: 4px solid var(--link-color);
  padding-left: 20px;
  margin: 24px 0;
  font-style: italic;
  opacity: 0.9;
}

.blog-post-content blockquote cite {
  display: block;
  margin-top: 8px;
  font-size: 0.9rem;
  font-style: normal;
  opacity: 0.7;
}

.blog-post-content figure.blog-image {
  margin: 32px 0;
}

.blog-post-content figure.blog-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px var(--shadow-color);
}

.blog-post-content figure.blog-image figcaption {
  margin-top: 12px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-primary);
  opacity: 0.7;
}

/* Mobile blog styles */
@media (max-width: 768px) {
  .blog-card {
    padding: 20px;
  }

  .blog-card-title {
    font-size: 1.2rem;
  }

  .blog-post-header h1 {
    font-size: 1.6rem;
  }

  .blog-post-content {
    font-size: 1rem;
  }

  .blog-post-content h2 {
    font-size: 1.3rem;
  }

  .blog-post-content h3 {
    font-size: 1.1rem;
  }

  .blog-post-content pre {
    padding: 12px 16px;
    font-size: 0.85rem;
  }
}

/* ============ BLOG PREVIEW (Landing Page) ============ */

.blog-preview-card {
  position: relative;
  background-color: var(--bg-primary);
  border-radius: 8px;
  padding: 24px;
  overflow: hidden;
}

.blog-preview-content {
  position: relative;
  z-index: 1;
}

.blog-preview-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--link-color);
  margin-bottom: 8px;
}

.blog-preview-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-heading);
  margin: 0 0 8px;
}

.blog-preview-date {
  font-size: 0.85rem;
  color: var(--text-primary);
  opacity: 0.6;
  margin: 0 0 12px;
}

.blog-preview-description {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-primary);
  opacity: 0.85;
  margin: 0 0 16px;
}

.blog-preview-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Overlay for non-authenticated users */
.blog-preview-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(transparent, var(--bg-secondary) 40%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 24px;
  z-index: 2;
}

.blog-preview-overlay p {
  font-size: 0.9rem;
  color: var(--text-primary);
  opacity: 0.7;
  margin: 0;
}

.blog-preview-overlay.authenticated {
  height: auto;
  background: none;
  position: relative;
  padding: 0;
  margin-top: 16px;
  justify-content: flex-start;
}

.blog-read-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--link-color);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.blog-read-link:hover {
  color: var(--link-hover);
  text-decoration: none;
}

.no-posts {
  color: var(--text-primary);
  opacity: 0.7;
  text-align: center;
  padding: 20px 0;
}

@media (max-width: 768px) {
  .blog-preview-card {
    padding: 20px;
  }

  .blog-preview-title {
    font-size: 1.1rem;
  }

  .blog-preview-description {
    font-size: 0.9rem;
  }
}
