/* =======================================================================
   Labs page — layered on top of the shared theme in ../styles.css.
   ======================================================================= */

/* Brand mark is a link on this page — strip the default anchor styling. */
a.brand__mark { text-decoration: none; }

/* Content column, clear of the fixed brand mark. */
.labs {
  position: relative;
  z-index: 3;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 120px max(24px, 5vw) 96px;
}

.labs__head {
  max-width: 60ch;
}
.labs__eyebrow {
  display: inline-block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.9rem;
}
.labs__title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(2.4rem, 8vw, 4.5rem);
  line-height: 0.98;
  margin: 0;
  letter-spacing: -0.02em;
  background: linear-gradient(100deg, #ffffff 30%, var(--accent) 70%, var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.labs__intro {
  margin: 1.2rem 0 0;
  font-size: clamp(0.95rem, 1.5vw, 1.12rem);
  line-height: 1.6;
  color: #d7dbe8;
}

/* ---- Grid of project cards ---- */
.lab-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: clamp(1rem, 2.5vw, 1.6rem);
  margin: 3rem 0 0;
  padding: 0;
}

.lab-card {
  display: flex;
  flex-direction: column;
  background: rgba(12, 15, 26, 0.6);
  border: 1px solid rgba(94, 234, 212, 0.12);
  border-radius: 16px;
  padding: 1.5rem;
  backdrop-filter: blur(8px);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.lab-card:hover {
  transform: translateY(-4px);
  border-color: rgba(94, 234, 212, 0.4);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.45);
}

.lab-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}
.lab-card__era {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}
.lab-card__status {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(94, 234, 212, 0.3);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  white-space: nowrap;
}

.lab-card__title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 1.35rem;
  line-height: 1.15;
  margin: 0 0 0.5rem;
  color: var(--ink);
}
.lab-card__desc {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--muted);
}

.lab-card__tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1.1rem 0 0;
  padding: 0;
}
.lab-card__tags li {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--faint);
  background: rgba(129, 140, 248, 0.1);
  border: 1px solid rgba(129, 140, 248, 0.18);
  border-radius: 6px;
  padding: 0.22rem 0.5rem;
}

.lab-card__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  /* Push links to the bottom so cards of different heights align. */
  margin-top: auto;
  padding-top: 1.3rem;
}
.lab-link {
  display: inline-flex;
  align-items: center;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid rgba(138, 146, 173, 0.3);
  border-radius: 8px;
  padding: 0.4rem 0.8rem;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.lab-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.lab-link--primary {
  border-color: rgba(94, 234, 212, 0.5);
  color: var(--accent);
  background: rgba(94, 234, 212, 0.08);
}
.lab-link--primary:hover {
  background: rgba(94, 234, 212, 0.16);
}

/* ---- Back link ---- */
.labs__back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 2.4rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}
.labs__back:hover { color: var(--accent); }

@media (max-width: 640px) {
  .labs { padding-top: 24px; }
  .lab-grid { grid-template-columns: 1fr; }
}
