.spm-portfolio .spm-hero {
  padding-bottom: 34px;
}

.spm-portfolio-hero {
  background: radial-gradient(1200px 600px at 20% 0%, rgba(35, 146, 255, 0.12), rgba(0, 0, 0, 0) 60%),
              radial-gradient(900px 500px at 90% 20%, rgba(16, 185, 129, 0.10), rgba(0, 0, 0, 0) 55%);
}

.spm-portfolio-tags {
  margin-top: 22px;
  margin-bottom: 18px;
}

.spm-portfolio-tags-title {
  font-weight: 700;
  font-size: 14px;
  opacity: 0.8;
  margin-bottom: 10px;
}

.spm-portfolio-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.spm-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.10);
}

.spm-portfolio-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
  margin-top: 16px;
}

.spm-portfolio-card {
  grid-column: span 12;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

@media (min-width: 768px) {
  .spm-portfolio-card { grid-column: span 6; }
}

@media (min-width: 1100px) {
  .spm-portfolio-card { grid-column: span 4; }
}

.spm-portfolio-media {
  display: block;
  width: 100%;
  padding-top: 62%;
  background-size: cover;
  background-position: center;
  background-color: #f3f4f6;
  position: relative;
}

.spm-portfolio-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.00), rgba(0,0,0,0.06));
}

.spm-portfolio-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(15, 23, 42, 0.60);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.spm-portfolio-body {
  padding: 14px 14px 16px 14px;
}

.spm-portfolio-category {
  font-size: 12px;
  font-weight: 700;
  opacity: 0.70;
  margin-bottom: 6px;
}

.spm-portfolio-title {
  font-size: 18px;
  margin: 0 0 10px 0;
}

.spm-portfolio-details {
  font-size: 14px;
  opacity: 0.9;
  line-height: 1.55;
  margin-bottom: 12px;
}

.spm-portfolio-details p:last-child {
  margin-bottom: 0;
}

.spm-portfolio-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Small button variant using existing spm button base */
.spm-btn.spm-btn-sm {
  padding: 10px 14px;
  font-size: 14px;
}

.spm-portfolio-empty {
  margin-top: 24px;
}

/* New Portfolio showcase (3 rows): 2 logo squares + 1 wide website card */
.spm-portfolio-showcase {
  margin-top: 22px;
}

.spm-portfolio-showcase-head {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.spm-portfolio-showcase-cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.spm-portfolio-row {
  --spm-tile: clamp(140px, 14vw, 200px);
  display: grid;
  grid-template-columns: var(--spm-tile) var(--spm-tile) 1fr;
  gap: 14px;
  align-items: stretch;
  margin-bottom: 14px;
}

@media (max-width: 991px) {
  .spm-portfolio-row {
    grid-template-columns: 1fr;
  }
}

.spm-logo-tile {
  height: var(--spm-tile);
  width: var(--spm-tile);
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background-color: #ffffff;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  text-decoration: none;
  color: inherit;
}

@media (max-width: 991px) {
  .spm-logo-tile {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }
}

.spm-logo-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(800px 250px at 10% 10%, rgba(255, 102, 0, 0.08), rgba(0,0,0,0) 55%);
  pointer-events: none;
}

.spm-logo-caption {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  padding: 10px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 23, 42, 0.10);
  backdrop-filter: blur(6px);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.spm-logo-tile:hover .spm-logo-caption,
.spm-logo-tile:focus .spm-logo-caption,
.spm-logo-tile:focus-visible .spm-logo-caption {
  opacity: 1;
  transform: translateY(0);
}

.spm-logo-name {
  font-weight: 800;
  font-size: 13px;
  line-height: 1.2;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spm-logo-sub {
  margin-top: 3px;
  font-size: 12px;
  opacity: 0.70;
}

.spm-website-card {
  height: var(--spm-tile);
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background-color: #0f172a;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.10);
  text-decoration: none;
  color: #ffffff;
}

@media (max-width: 991px) {
  .spm-website-card {
    height: auto;
    aspect-ratio: 16 / 9;
  }
}

.spm-website-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2,6,23,0.72), rgba(2,6,23,0.18));
}

.spm-website-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px;
}

.spm-website-pill {
  display: inline-flex;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.spm-website-title {
  font-size: 18px;
  font-weight: 900;
  line-height: 1.2;
}

.spm-website-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.spm-website-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  border: 1px solid rgba(15, 23, 42, 0.10);
  text-decoration: none;
}

.spm-website-card:hover .spm-website-btn {
  background: #ffffff;
}
