/* ================================================================
   page-articles-home.css — Articles hub (/articles/)
   ================================================================
   Discovery grid. Glass cards, accent purple hover, bold search.
   ================================================================ */

body[data-page="articles-home"] { overflow-x: clip; }

body[data-page="articles-home"] .main-content,
body[data-page="articles-home"] .content-body {
  min-width: 0;
  overflow-x: clip;
}

body[data-page="articles-home"] .content-body {
  width: min(100%, 1120px);
  margin-inline: auto;
}

/* ── Breadcrumbs ── */
body[data-page="articles-home"] .breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  margin: 0 0 var(--space-5);
  padding: 0;
  font-size: var(--text-sm);
}

body[data-page="articles-home"] .breadcrumbs__item {
  display: inline-flex;
  align-items: center;
  color: var(--text-muted);
}

body[data-page="articles-home"] .breadcrumbs__item + .breadcrumbs__item::before {
  content: '/';
  margin: 0 0.5em;
  color: rgba(255, 255, 255, 0.2);
}

body[data-page="articles-home"] .breadcrumbs__item a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 120ms;
}

body[data-page="articles-home"] .breadcrumbs__item a:hover { color: var(--accent); }

/* ── Page header ── */
.listing-page-header {
  margin-bottom: var(--space-6);
}

.listing-page-header .page-header__title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text-primary);
  margin: 0 0 var(--space-2);
}

.listing-page-header__count {
  margin: 0 0 var(--space-2);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
}

.listing-page-header__subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

/* ── Search ── */
.listing-search--articles {
  margin-bottom: var(--space-6);
}

.listing-search--articles .listing-search__input {
  width: 100%;
  min-height: 52px;
  padding: var(--space-3) var(--space-5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-base);
  transition: border-color 150ms, box-shadow 150ms;
}

.listing-search--articles .listing-search__input::placeholder { color: var(--text-muted); }

.listing-search--articles .listing-search__input:focus {
  outline: none;
  border-color: rgba(124, 106, 247, 0.5);
  box-shadow: 0 0 0 3px rgba(124, 106, 247, 0.15);
}

/* ── Tech card grid ── */
.cheatsheet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  gap: var(--space-3);
  min-width: 0;
}

.cheatsheet-card {
  display: flex;
  min-height: 0;
  text-decoration: none;
  color: inherit;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background:
    radial-gradient(circle at 20% 20%, rgba(124, 106, 247, 0.06), transparent 60%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 8px 24px rgba(0, 0, 0, 0.18);
  transition: transform 150ms var(--ease-out), border-color 150ms, box-shadow 150ms;
}

.cheatsheet-card:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 106, 247, 0.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 20px 40px rgba(0, 0, 0, 0.26);
  text-decoration: none;
}

.cheatsheet-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.cheatsheet-card[hidden] { display: none; }

.cheatsheet-card__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  min-width: 0;
  padding: var(--space-4) var(--space-5);
}

.cheatsheet-card__title {
  margin: 0;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
  text-transform: capitalize;
}

.cheatsheet-card__count {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
}

.listing-empty { margin-top: var(--space-6); text-align: center; color: var(--text-muted); }
.listing-empty[hidden] { display: none; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .listing-page-header .page-header__title { font-size: clamp(1.5rem, 7vw, 2rem); }

  .listing-search--articles .listing-search__input {
    min-height: 48px;
    border-radius: 12px;
  }

  .cheatsheet-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cheatsheet-card__body { padding: var(--space-3) var(--space-4); }
}

@media (max-width: 480px) {
  .cheatsheet-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .cheatsheet-card { transition: none; }
  .cheatsheet-card:hover { transform: none; }
}
