/* ========================================
   RESOURCES — index filter strip + card grid,
   detail article typography, related grid
   ======================================== */

/* --- Index hero spacing --- */
.res-hero {
  padding-bottom: 48px;
}

/* --- Filter strip --- */
.res-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 0 auto 56px;
  max-width: 820px;
}

.res-filter {
  display: inline-block;
  padding: 9px 20px;
  border: 1px solid var(--paper-border);
  border-radius: 100px;
  background: var(--white);
  color: var(--ink-light);
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.res-filter:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.res-filter.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}

/* --- Card grid --- */
.res-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.res-grid--related {
  margin-top: 0;
}

.res-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--paper-border);
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.res-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 12px 30px rgba(26, 23, 20, 0.08);
}

.res-card.is-hidden {
  display: none;
}

.res-card-thumb {
  aspect-ratio: 16 / 9;
  background: var(--paper-dark);
  overflow: hidden;
}

.res-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.res-card-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  flex: 1;
}

.res-card-cat {
  align-self: flex-start;
  font-size: 0.75rem;
}

.res-card-title {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: var(--ink);
  margin: 0;
}

.res-card-summary {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink-light);
  margin: 0;
}

.res-card-meta {
  margin-top: auto;
  padding-top: 8px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-muted);
}

.res-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--ink-muted);
}

/* --- Detail: article hero --- */
.res-article-hero {
  padding: 100px 0 40px;
  border-bottom: 1px solid var(--paper-border);
}

.res-article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.res-article-readtime {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-muted);
}

.res-article-title {
  font-family: var(--serif);
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
  color: var(--ink);
  margin: 0;
}

.res-article-lead {
  margin-top: 24px;
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--ink-light);
}

/* --- Detail: article body typography --- */
.res-article {
  padding: 64px 0 96px;
}

.res-block-heading {
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--ink);
  margin: 48px 0 20px;
}

.res-block-heading:first-child {
  margin-top: 0;
}

.res-block-paragraph {
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--ink-light);
  margin: 0 0 24px;
}

.res-block-paragraph a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.res-block-paragraph ul,
.res-block-paragraph ol {
  margin: 0 0 24px;
  padding-left: 24px;
}

.res-block-paragraph li {
  margin-bottom: 8px;
}

.res-block-image {
  margin: 40px 0;
}

.res-block-image img {
  width: 100%;
  border-radius: 6px;
  border: 1px solid var(--paper-border);
  display: block;
}

.res-block-image figcaption {
  margin-top: 12px;
  font-size: 0.875rem;
  color: var(--ink-muted);
  text-align: center;
}

.res-block-quote {
  margin: 48px 0;
  padding: 8px 0 8px 28px;
  border-left: 3px solid var(--accent);
}

.res-block-quote p {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 16px;
}

.res-block-quote cite {
  font-style: normal;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-muted);
}

/* --- Detail: related --- */
.res-related {
  background: var(--paper-dark);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .res-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .res-filters {
    margin-bottom: 40px;
  }

  .res-article-hero {
    padding: 72px 0 32px;
  }

  .res-article {
    padding: 40px 0 72px;
  }

  .res-block-quote p {
    font-size: 1.25rem;
  }
}
