/* ----- GRID LAYOUT ----- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 1.5rem;
  }
  
  /* ----- CARD STYLE ----- */
  .project-card {
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,.04);
    transition: transform .18s ease, box-shadow .18s ease;
  }
  
  .project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 24px rgba(0,0,0,.12);
  }

  
  
  /* ----- CARD CONTENT ----- */
  /* Card media container now becomes positioning context */
.card-media {
    position: relative;
    aspect-ratio: 16/9;
    background: #f6f7f9;
    overflow: hidden;
  }
  
  /* Status pill overlay */
  .status-pill {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--status-color, #3b82f6);
    color: #fff;
    font-weight: 600;
    font-size: 0.75rem;
    border-radius: 999px;
    padding: 4px 10px;
    /* text-transform: uppercase;*/ 
    letter-spacing: 0.4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    z-index: 2;
    opacity: 0.95;
  }
  
  /* Optional: slight fade-in on hover */
  .project-card:hover .status-pill {
    opacity: 1;
  }  

  .card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  
  .card-body {
    padding: 14px 16px 16px;
  }
  
  .card-title {
    margin: 0 0 6px;
    font-size: 1.00rem;
    line-height: 1.35;
  }
  
  .card-summary {
    margin: 0 0 10px;
    color: #444;
    font-size: 0.88rem;     /* ↓ slightly smaller text */
    line-height: 1.45;      /* keeps readability */
  }
  
  /* ----- META & LINKS ----- */
  .card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
  }
  
  .badge {
    background: #eef5ff;
    color: #1a56db;
    font-size: .78rem;
    padding: 3px 8px;
    border-radius: 999px;
  }
  
  .dot {
    width: 4px;
    height: 4px;
    background: #bbb;
    border-radius: 50%;
    display: inline-block;
  }
  
  .muted {
    color: #777;
    font-size: .86rem;
  }
  
  .card-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .btn-link {
    font-size: .88rem;
    text-decoration: none;
    color: #1a56db;
    padding: 4px 8px;
    border: 1px solid #dbe7ff;
    border-radius: 8px;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
  }
  
  .btn-link:hover {
    background: #f2f7ff;
    border-color: #cbdfff;
  }
  
  /* Tag pills under summary */
.tag-pills{
    display:flex; flex-wrap:wrap; gap:8px; margin:10px 0 12px;
  }
  .tag-pill{
    background:#f2f3f5; color:#3a3a3a;
    font-size:.82rem; padding:4px 10px; border-radius:999px;
    border:1px solid #e5e7eb; white-space:nowrap;
  }

  .writing-item {
    display: flex;
    justify-content: space-between;
    align-items: stretch;  /* make both columns equal height */
    gap: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid #eee;
  }
  
  .writing-text {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }
  
  .writing-thumb {
    flex: 0 0 200px;          /* sets both width and height of the square */
    height: 200px;            /* explicitly defines height */
    border-radius: 8px;
    overflow: hidden;
    margin-top: 32px;          /* slight visual offset below the title line */
    align-self: flex-start;   /* top-align with the title */
  }
  
  .writing-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* crop to fill the full vertical height */
    display: block;
  }
  
  /* Mobile: stack image below text */
  @media (max-width: 700px) {
    .writing-item {
      flex-direction: column;
    }
    .writing-thumb {
      width: 100%;
      height: 220px;   /* reasonable default height on mobile */
      margin-top: 8px;
    }
  }