/* ======================================================
   PROJECTS PAGE
====================================================== */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0 4px 2px;
  margin-bottom: 4px;
}

@media (max-width: 860px) { .projects-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .projects-grid { grid-template-columns: 1fr; } }

.project-card {
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  background: rgba(255,255,255,0.025);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .15s ease, background .15s ease, transform .10s ease;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  opacity: 0;
  transition: opacity .15s ease;
}

.project-card:hover {
  border-color: rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  transform: translateY(-1px);
}

.project-card:hover::before {
  opacity: 1;
}

/* color accent line */
.project-card--green::before  { background: rgba(34,197,94,0.60); }
.project-card--blue::before   { background: rgba(14,165,233,0.60); }
.project-card--cyan::before   { background: rgba(6,182,212,0.60); }
.project-card--yellow::before { background: rgba(245,158,11,0.60); }
.project-card--red::before    { background: rgba(239,68,68,0.60); }
.project-card--purple::before { background: rgba(168,85,247,0.60); }

/* header: name + status */
.project-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.project-name {
  font-size: 14.5px;
  font-weight: 800;
  color: rgba(233,238,248,0.94);
  letter-spacing: -0.2px;
  line-height: 1.3;
}

/* status badge */
.project-status {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .05em;
  white-space: nowrap;
}

.project-status--active   { border: 1px solid rgba(34,197,94,0.35);  background: rgba(34,197,94,0.08);  color: rgba(160,255,190,0.90); }
.project-status--dev      { border: 1px solid rgba(245,158,11,0.35); background: rgba(245,158,11,0.08); color: rgba(255,215,120,0.90); }
.project-status--planned  { border: 1px solid rgba(99,102,241,0.35); background: rgba(99,102,241,0.08); color: rgba(180,182,255,0.90); }
.project-status--archived { border: 1px solid rgba(255,255,255,0.10); background: rgba(255,255,255,0.03); color: rgba(233,238,248,0.38); }

/* description */
.project-desc {
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.6;
  color: rgba(233,238,248,0.52);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* tags */
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.project-tag {
  padding: 2px 7px;
  border-radius: 5px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  font-size: 10.5px;
  font-weight: 700;
  color: rgba(233,238,248,0.42);
  letter-spacing: .02em;
}

/* footer with link */
.project-footer {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(233,238,248,0.40);
  text-decoration: none;
  letter-spacing: .02em;
  transition: color .12s ease;
}

.project-link::after {
  content: '↗';
  font-size: 11px;
  transition: transform .12s ease;
}

.project-link:hover {
  color: rgba(233,238,248,0.85);
  text-decoration: none;
}

.project-link:hover::after {
  transform: translate(1px, -1px);
}

/* discontinued */
.project-status--discontinued {
  border: 1px solid rgba(239,68,68,0.25);
  background: rgba(239,68,68,0.06);
  color: rgba(239,68,68,0.65);
}

.project-card--discontinued {
  opacity: 0.72;
}

.project-name--discontinued {
  text-decoration: line-through;
  text-decoration-color: rgba(233,238,248,0.30);
}

/* sub-paths / children */
.project-children {
  display: flex;
  flex-direction: column;
  gap: 3px;
  border-left: 2px solid rgba(255,255,255,0.06);
  padding-left: 8px;
  margin-top: 2px;
  min-width: 0;
  overflow: hidden;
}

.project-child {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: rgba(233,238,248,0.38);
  text-decoration: none;
  transition: color .12s ease;
  line-height: 1.4;
  min-width: 0;
}

.project-child i {
  font-size: 9px;
  flex-shrink: 0;
  opacity: 0.5;
}

.project-child-name {
  font-weight: 700;
  color: rgba(233,238,248,0.50);
  white-space: nowrap;
  flex-shrink: 0;
}

.project-child-desc {
  font-weight: 500;
  color: rgba(233,238,248,0.28);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

a.project-child:hover {
  color: rgba(233,238,248,0.70);
  text-decoration: none;
}

a.project-child:hover .project-child-name {
  color: rgba(233,238,248,0.75);
}

a.project-child:hover .project-child-desc {
  color: rgba(233,238,248,0.45);
}

.project-child--discontinued {
  text-decoration: line-through;
  text-decoration-color: rgba(233,238,248,0.20);
  opacity: 0.55;
}

/* disabled link (no url but has label) */
.project-link--disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

/* empty state */
.projects-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 8px;
  color: rgba(233,238,248,0.35);
  font-size: 13px;
}

.projects-empty i {
  font-size: 18px;
  opacity: 0.4;
}

.projects-empty code {
  font-family: monospace;
  font-size: 12px;
  color: rgba(233,238,248,0.50);
  background: rgba(255,255,255,0.06);
  padding: 1px 5px;
  border-radius: 4px;
}
