:root { color-scheme: light dark; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

header {
  padding: 44px 18px 22px;
  max-width: 980px;
  margin: 0 auto;
}

h1 {
  margin: 0 0 6px;
  font-size: 36px;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
  opacity: 0.8;
  line-height: 1.5;
}

.lede { 
  margin-top: 6px;
  opacity: 0.75;
  max-width: 72ch; }

main {
  max-width: 980px;
  margin: 0 auto;
  padding: 18px;
}

.section-title {
  font-size: 20px;
  font-weight: 500;
  margin: 12px 0 12px;
  letter-spacing: -0.005em;
  opacity: 0.85;
}

.section-spacer { margin-top: 34px; }

.grid{
  display: grid;
  gap: 14px;

  /* Keep cards from stretching too wide */
  grid-template-columns: repeat(auto-fit, minmax(260px, 320px));

  /* Center the columns instead of stretching */
  justify-content: center;
}

.card {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(127,127,127,0.25);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(127,127,127,0.06);
  text-decoration: none;
  color: inherit;
  transition: transform 120ms ease, border-color 120ms ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(127,127,127,0.45);
}

/* Make cards feel less tall */
.thumb {
  width: 100%;
  height: 128px;            /* was 160px */
  object-fit: cover;
  display: block;
  background: rgba(127,127,127,0.12);
}

.content { 
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 12px 12px 14px; } /* tighter */

.title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.title {
  font-size: 17px;
  margin: 0;
}

/* Subtle badge */
.badge {
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(127,127,127,0.25);
  opacity: 0.85;
  white-space: nowrap;
}

.subtle {
  font-size: 14px;
  opacity: 0.65;
  margin-top: 6px;
}

/* Prevent subtitle/collab from ballooning card height */
.subtitle {
  margin: 0 0 8px;
  opacity: 0.82;
  font-size: 14px;
  line-height: 1.35;

  display: -webkit-box;
  -webkit-line-clamp: 2;    /* max 2 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.collab {
  margin-top: -6px;
  font-size: 13px;
  opacity: 0.72;

  display: -webkit-box;
  -webkit-line-clamp: 1;    /* max 1 line */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tags {
  display: flex;
  margin-top: auto;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 11.5px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(127,127,127,0.25);
  opacity: 0.75;
}

.footer {
  max-width: 980px;
  margin: 0 auto;
  padding: 18px;
  opacity: 0.75;
  font-size: 13px;
}

.row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.btn {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(127,127,127,0.25);
  text-decoration: none;
  color: inherit;
  background: rgba(127,127,127,0.06);
}

/* Optional: gentle entrance */
@media (prefers-reduced-motion: no-preference) {
  .card {
    animation: popIn 200ms ease both;
  }
  @keyframes popIn {
    from { opacity: 0; transform: translateY(5px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

section + section {
  border-top: 1px solid rgba(127,127,127,0.18);
  padding-top: 32px;
}
/* ---------- Polish ---------- */
:root {
  --accent: #3b6ef5;
  --line: rgba(127,127,127,0.22);
}
@media (prefers-color-scheme: dark) { :root { --accent: #7c9bff; } }

body { -webkit-font-smoothing: antialiased; line-height: 1.5; }

header {
  padding: 72px 24px 28px;
  border-bottom: 1px solid var(--line);
  max-width: 980px;
}
h1 { font-size: clamp(34px, 6vw, 52px); font-weight: 700; letter-spacing: -0.03em; }
.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent); opacity: 1; margin-bottom: 10px;
}
.lede { font-size: 18px; opacity: 0.7; }

main { padding: 32px 24px 24px; }
.section-title {
  font-size: 13px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; opacity: 0.6; margin: 0 0 16px;
}
section + section { border-top: none; padding-top: 0; }
.section-spacer { margin-top: 48px; }

.grid { justify-content: start; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { border-radius: 14px; box-shadow: 0 1px 2px rgba(0,0,0,0.05); background: rgba(127,127,127,0.05); }
.card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.thumb { height: 150px; }
.thumb.placeholder {
  display: flex; align-items: center; justify-content: center;
  font-size: 54px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #3b6ef5, #8a4dff);
}
.badge { color: var(--accent); border-color: var(--accent); opacity: 1; font-weight: 500; }
.tag { background: rgba(127,127,127,0.1); border: none; }
.btn { font-size: 14px; font-weight: 500; transition: border-color 120ms; }
.btn:hover { border-color: var(--accent); }
.footer { max-width: 980px; padding: 24px; border-top: 1px solid var(--line); margin-top: 24px; }
