/* project_list.css */

/* -----------------------------
   Base / viewport sizing
----------------------------- */
html,
body {
  height: 100%;
}

.main-content {
  min-height: 0;
}

/* Optional: set if you use a fixed header */
:root {
  --nav-offset: 0px;

  /* Layout tokens */
  --card-radius: 16px;
  --card-border: rgba(0, 0, 0, 0.10);
  --soft-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  --soft-shadow-hover: 0 14px 40px rgba(0, 0, 0, 0.12);

  /* Text */
  --text: rgba(0, 0, 0, 0.88);
  --muted: rgba(0, 0, 0, 0.62);
  --muted-2: rgba(0, 0, 0, 0.50);

  /* Surfaces */
  --card-bg: #fff;
  --chip-bg: rgba(0, 0, 0, 0.05);
  --chip-border: rgba(0, 0, 0, 0.08);
}

/* -----------------------------
   Page layout
----------------------------- */
.projects-page {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--nav-offset));
  min-height: 0;
}

.projects-header {
  flex: 0 0 auto;
  margin-bottom: 12px;
}

.projects-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 6px;
}

/* -----------------------------
   Grid layout (3 -> 2 -> 1)
----------------------------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-content: start;

  /* Slight breathing room so cards don't touch edges */
  padding: 6px 8px 18px;
}

@media (max-width: 1100px) {
  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

/* -----------------------------
   Card styling (cleaner, calmer)
----------------------------- */
.project-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: var(--soft-shadow);

  padding: 14px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 10px;

  /* Remove the extra left/right margins that make alignment feel uneven */
  margin-left: 0;
  margin-right: 0;

  /* subtle motion */
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--soft-shadow-hover);
  border-color: rgba(0, 0, 0, 0.14);
}

/* Thumbnail */
.project-thumb {
  display: block;
  border-radius: 14px;
  overflow: hidden;
}

.project-thumb img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  display: block;
  transform: scale(1);
  transition: transform 220ms ease;
}

.project-card:hover .project-thumb img {
  transform: scale(1.02);
}

/* -----------------------------
   Title + meta hierarchy
----------------------------- */
.project-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.project-title {
  margin: 0;
  line-height: 1.15;
  font-size: 18px;
  letter-spacing: 0.1px;
  color: var(--text);

  /* Prevent tall cards due to a very long title */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-title a {
  color: inherit;
  text-decoration: none;
}

.project-title a:hover {
  text-decoration: underline;
}

/* Meta chips: smaller, softer, less border-heavy */
.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}

/* -----------------------------
   Compact meta line (replaces pills)
----------------------------- */
.project-meta-line {
  font-size: 13px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.62);
  line-height: 1.3;

  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.project-meta-line .dot {
  opacity: 0.4;
}


.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;

  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  color: rgba(0, 0, 0, 0.70);

  max-width: 100%;
}

/* Slight differentiation per type (still subtle) */
.pill-status {
  color: rgba(0, 0, 0, 0.72);
}

.pill-kind {
  color: rgba(0, 0, 0, 0.68);
}

.pill-category {
  color: rgba(0, 0, 0, 0.68);
}

/* -----------------------------
   Summary (make it scan-friendly)
----------------------------- */
.project-summary {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 14px;

  /* Keep cards uniform; avoids “essay cards” */
  display: -webkit-box;
  -webkit-line-clamp: 3; /* show ~3 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* -----------------------------
   Tags (reduce clutter)
----------------------------- */
.tag-row {
  list-style: none;
  padding: 0;
  margin: 0;

  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Only show first 4 tags by default */
.tag-row .tag:nth-child(n + 5) {
  display: none;
}

.tag {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.62);

  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

/* -----------------------------
   Links (compact "badges")
----------------------------- */
.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

/* You currently use .btn-link for external links in the card */
.btn-link {
  display: inline-flex;
  align-items: center;

  padding: 6px 10px;
  border-radius: 999px;

  text-decoration: none;
  font-size: 12px;
  font-weight: 600;

  background: rgba(0, 0, 0, 0.045);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: rgba(0, 0, 0, 0.72);

  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;

  transition: background 120ms ease, border-color 120ms ease;
}

.btn-link:hover {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.12);
}

/* -----------------------------
   Footer (clean CTA + timestamp)
----------------------------- */
.project-foot {
  margin-top: auto;
  padding-top: 10px;

  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.muted {
  color: var(--muted-2);
  opacity: 1; /* override older opacity-based muting */
}

.small {
  font-size: 12px;
}

/* Primary button used for "View details" */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 9px 12px;
  border-radius: 12px;

  text-decoration: none;
  font-weight: 700;
  font-size: 13px;

  color: rgba(0, 0, 0, 0.86);
  background: rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.12);

  transition: background 120ms ease, border-color 120ms ease;
}

.btn:hover {
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.16);
}


