/* fadeInUp keyframes (portfolio.css may already have it) */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* reusable fadeInUp utility */
.fadeInUp {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s forwards;
}

/* Base padding for the blog page */
.blog {
  padding: 2em;
}

/* Center header & cards in the same column */
.blog-header,
.blog-cards {
  max-width: 800px;
  margin: 0 auto 1.5em;   /* center + bottom gap */
  padding: 0 1em;         /* inner gutter */
}

/* Blog header styling */
.blog-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
} 
.blog-header h1 {
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 0.3em;
}
.blog-header .subtitle {
  color: #ccc;
  font-size: 1rem;
}

/* === Two cards per row === */
.blog-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5em;
  align-items: stretch;
}

/* Card styling */
.card-link {
  display: block;           /* make the link act like a grid item */
  text-decoration: none;
  color: inherit;
  height: 100%;
}
.card {
  height: 100%;             /* fill the grid cell */
  max-width: 650px;
  background: #181818;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  opacity: 0;               /* for fadeInUp */
  transition: transform 0.2s;
}
.card-link:hover .card {
  transform: translateY(-4px);
}

.card img {
  width: 100%;
  height: auto;
} 
.card-content {
  padding: 1em;
  flex: 1;
} 
.card-content h2 {
  font-size: 1.2rem;
  color: #f0e68c;
  margin-bottom: 0.5em;
} 
.card-content p {
  color: #ddd;
  font-size: 0.95rem;
  line-height: 1.4;
}

#backToTop {
  position: fixed;
  right: 24px;
  bottom: 90px;                 /* clears your sticky footer */
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
  cursor: pointer;

  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, background .2s ease;
  z-index: 950;                 /* below your menu/lightbox overlays */
}

#backToTop:hover {
  background: rgba(255,255,255,0.15);
}

#backToTop.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Mobile: 1 card per row */
@media (max-width: 768px) {
  .blog { padding: 1em; }
  .blog-header h1 { font-size: 1.6rem; }
  .card-content h2 { font-size: 1rem; }
  .blog-header, .blog-cards {
    max-width: none;
    padding: 0 1em;
    margin-bottom: 1em;
  }
  .blog-cards {
    grid-template-columns: 1fr;
  }
}


  
  
  
  