/* Identidade unificada para categorias e stacks de todos os cards. */
html body:is(.single-page-portfolio,.projects-catalog) :is(#portfolio,.projects-page-hero) .home-project-reference-card__badge.home-project-reference-card__badge--category {
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:7px 11px;
  border:1px solid rgba(100,116,139,.32);
  border-radius:8px;
  background:rgba(226,232,240,.96);
  color:#334155;
  font-size:12px;
  font-weight:650;
  line-height:1.35;
  box-shadow:0 3px 12px rgba(13,26,52,.12);
  -webkit-backdrop-filter:blur(10px);
  backdrop-filter:blur(10px);
}
html body:is(.single-page-portfolio,.projects-catalog) :is(#portfolio,.projects-page-hero) .home-project-reference-card__badge--category svg {
  display:block;
  flex:0 0 15px;
  width:15px;
  height:15px;
  color:#475569;
}
html body:is(.single-page-portfolio,.projects-catalog) :is(#portfolio,.projects-page-hero) .home-project-reference-card__tags li.home-project-reference-card__tag--icon {
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:30px;
  padding:5px 9px;
  border-radius:6px;
  line-height:1.25;
}
html body:is(.single-page-portfolio,.projects-catalog) :is(#portfolio,.projects-page-hero) .home-project-reference-card__tag--icon > svg,
html body:is(.single-page-portfolio,.projects-catalog) :is(#portfolio,.projects-page-hero) .home-project-reference-card__tag--icon > img {
  display:block;
  flex:0 0 15px;
  width:15px;
  height:15px;
  object-fit:contain;
}
html body:is(.single-page-portfolio,.projects-catalog) :is(#portfolio,.projects-page-hero) .home-project-reference-card__tag--icon > span {
  min-width:0;
}
@media(max-width:680px) {
  html body:is(.single-page-portfolio,.projects-catalog) :is(#portfolio,.projects-page-hero) .home-project-reference-card__badge.home-project-reference-card__badge--category {
    top:12px;
    left:12px;
    max-width:calc(100% - 24px);
    font-size:11px;
  }
}


/* Mantém a descrição do card curta e as ações visíveis no rodapé. */
html body:is(.single-page-portfolio,.projects-catalog) :is(#portfolio,.projects-page-hero) .home-project-reference-card__body > p {
  display:-webkit-box;
  overflow:hidden;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:3;
  line-clamp:3;
}


/* Layout aprovado para a vitrine: editorial vertical nos cards comuns e hero dividido no destaque. */
html body.single-page-portfolio #portfolio .portfolio-projects-showcase {
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:28px;
}
html body:is(.single-page-portfolio,.projects-catalog) :is(#portfolio,.projects-page-hero) .home-project-reference-card:not(.home-project-reference-card--featured) {
  display:flex;
  flex-direction:column;
}
html body:is(.single-page-portfolio,.projects-catalog) :is(#portfolio,.projects-page-hero) .home-project-reference-card:not(.home-project-reference-card--featured) .home-project-reference-card__media {
  flex:0 0 auto;
  width:100%;
  aspect-ratio:16/8;
}
html body:is(.single-page-portfolio,.projects-catalog) :is(#portfolio,.projects-page-hero) .home-project-reference-card:not(.home-project-reference-card--featured) .home-project-reference-card__body {
  justify-content:flex-start;
  gap:14px;
  padding:22px 24px 24px;
}
html body.single-page-portfolio #portfolio .home-project-reference-card--featured {
  display:grid;
  grid-column:1/-1;
  grid-template-columns:minmax(0,1.04fr) minmax(0,.96fr);
  align-items:stretch;
  min-height:390px;
}
html body.single-page-portfolio #portfolio .home-project-reference-card--featured .home-project-reference-card__media {
  align-self:stretch;
  width:100%;
  height:100%;
  min-height:390px;
  aspect-ratio:auto;
}
html body.single-page-portfolio #portfolio .home-project-reference-card--featured .home-project-reference-card__media img {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
}
html body.single-page-portfolio #portfolio .home-project-reference-card--featured .home-project-reference-card__shade {
  background:linear-gradient(180deg,rgba(13,26,52,.06),rgba(13,26,52,.18));
}
html body.single-page-portfolio #portfolio .home-project-reference-card--featured .home-project-reference-card__body {
  justify-content:center;
  gap:16px;
  padding:clamp(28px,4vw,48px);
}
html body.single-page-portfolio #portfolio .home-project-reference-card--featured .home-project-reference-card__body h3 {
  font-size:clamp(28px,3.2vw,40px);
  line-height:1.16;
}
html body.single-page-portfolio #portfolio .home-project-reference-card--featured .project-cover-fallback {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
}
html body.single-page-portfolio #portfolio .home-project-reference-card--featured .project-cover-fallback > svg {
  display:block;
  width:100%;
  height:100%;
}
@media(max-width:900px) {
  html body.single-page-portfolio #portfolio .home-project-reference-card--featured .home-project-reference-card__body {
    padding:26px;
  }
  html body.single-page-portfolio #portfolio .home-project-reference-card--featured .home-project-reference-card__body h3 {
    font-size:clamp(26px,3vw,32px);
  }
}
@media(max-width:700px) {
  html body.single-page-portfolio #portfolio .portfolio-projects-showcase {
    grid-template-columns:minmax(0,1fr);
    gap:24px;
  }
  html body.single-page-portfolio #portfolio .home-project-reference-card--featured {
    grid-template-columns:minmax(0,1fr);
    min-height:0;
  }
  html body.single-page-portfolio #portfolio .home-project-reference-card--featured .home-project-reference-card__media {
    min-height:0;
    height:auto;
    aspect-ratio:16/8;
  }
  html body.single-page-portfolio #portfolio .home-project-reference-card--featured .home-project-reference-card__body {
    padding:22px;
  }
  html body.single-page-portfolio #portfolio .home-project-reference-card--featured .home-project-reference-card__body h3 {
    font-size:26px;
  }
}

/* Categoria abaixo do título: capas livres e leitura comum à Home e catálogo. */
html body .home-project-reference-card__heading { display:grid; gap:7px; }
html body .home-project-reference-card__heading h3 { margin:0; }
html body .home-project-reference-card__category-label { display:block; width:auto; padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; color:var(--theme-text-soft, #485164); font-family:inherit; font-size:13px; font-weight:500; line-height:1.5; }
html[data-theme="dark"] body .home-project-reference-card__category-label { color:#CFD6DC; }

/* Card actions: keep the repository icon intrinsic and the home footer compact. */
.home-project-reference-card .home-project-reference-card__repository > svg {
  display: block;
  width: 18px;
  height: 18px;
  min-width: 18px;
  max-width: 18px;
  max-height: 18px;
  flex: 0 0 18px;
}
html body.home-page-v2 #portfolio .home-project-reference-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  min-width: 0;
  margin-top: auto;
}
html body.home-page-v2 #portfolio .home-project-reference-card__repository,
html body.home-page-v2 #portfolio .home-project-reference-card__footer .home-project-reference-card__action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 44px;
}
