.discover {
  width: min(1280px, calc(100% - 48px));
  margin: 48px auto 88px;
}

.discover-eyebrow {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.discover h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3.2rem, 6vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.discover-lead {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.discover-bar {
  display: flex;
  align-items: flex-end;
  margin-top: 32px;
}

.discover-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.discover-tabs::-webkit-scrollbar { display: none; }

.discover-tabs button {
  appearance: none;
  position: relative;
  background: none;
  border: 0;
  padding: 10px 12px 12px;
  color: #8a877f;
  font: 500 0.95rem var(--sans);
  white-space: nowrap;
  cursor: pointer;
}

.discover-tabs button.is-active {
  color: var(--ink);
  font-weight: 700;
}

.discover-tabs button.is-active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

.discover-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 28px 16px;
  margin-top: 28px;
}

.portfolio-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  color: inherit;
  background: #fff;
  border: 1px solid rgba(23, 23, 20, 0.06);
  border-radius: 22px;
  padding: 10px 10px 14px;
  box-shadow: 0 8px 24px rgba(23, 23, 20, 0.04);
}

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

.portfolio-cover {
  display: block;
  aspect-ratio: 4 / 4.6;
  border-radius: 16px;
  overflow: hidden;
  background: #e7e1d6;
}

.portfolio-cover img,
.portfolio-cover-fallback {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.portfolio-cover-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 2.4rem;
  color: #fff;
}

.portfolio-meta {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -18px 4px 0;
  padding: 10px 10px 10px 12px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(23, 23, 20, 0.08);
}

.portfolio-avatar {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  background: #efe8de;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
}

.portfolio-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.portfolio-id {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.portfolio-id strong {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.portfolio-id strong span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portfolio-id em {
  font-style: normal;
  color: #8d8a83;
  font-size: 0.8rem;
  line-height: 1.2;
}

.verified {
  flex: none;
  width: 13px;
  height: 13px;
  fill: #2f6bff;
}

.portfolio-go {
  flex: none;
  width: 36px;
  height: 36px;
  margin-left: auto;
  border: 1px solid rgba(23, 23, 20, 0.14);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3a3934;
}

.portfolio-go svg { width: 14px; height: 14px; }

.portfolio-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 6px 2px;
}

.portfolio-tags i {
  font-style: normal;
  font-size: 0.68rem;
  line-height: 1;
  padding: 5px 8px;
  border-radius: 999px;
  background: #f3eee6;
  color: #7a624c;
}

.portfolio-tags i[data-slug="fashion"],
.portfolio-tags i[data-slug="beauty"],
.portfolio-tags i[data-slug="makeup"] { background: #f8e4ea; color: #9a4d62; }
.portfolio-tags i[data-slug="travel"],
.portfolio-tags i[data-slug="photography"] { background: #ece7f6; color: #655a86; }
.portfolio-tags i[data-slug="fitness"],
.portfolio-tags i[data-slug="business"],
.portfolio-tags i[data-slug="growth"] { background: #e7eef8; color: #4d6494; }
.portfolio-tags i[data-slug="health"],
.portfolio-tags i[data-slug="wellness"],
.portfolio-tags i[data-slug="food"] { background: #e6f3ea; color: #3f6b4e; }

.category-empty {
  display: grid;
  grid-template-columns: minmax(220px, 0.85fr) minmax(280px, 1.15fr);
  align-items: center;
  gap: 12px 48px;
  min-height: 300px;
  margin-top: 22px;
  padding: 28px 48px;
  background: #fff;
  border: 1px solid rgba(23, 23, 20, 0.08);
  border-radius: 18px;
}

.category-empty[hidden],
.explore[hidden],
.discover-grid[hidden] { display: none; }

.category-empty img {
  width: 100%;
  max-height: 230px;
  object-fit: contain;
  object-position: center;
}

.category-empty-badge {
  display: inline-flex;
  margin: 0 0 14px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f3eee6;
  color: #6d624e;
  font-size: 0.75rem;
  font-weight: 600;
}

.category-empty h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 3.2vw, 2.7rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.category-empty h2 + p {
  margin: 14px 0 0;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.5;
}

.category-empty-cta {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 18px;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 650;
}

.explore { margin-top: 40px; }

.explore h2 {
  margin: 0 0 18px;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.explore .discover-grid { margin-top: 0; }

@media (max-width: 767px) {
  .portfolios-page { overflow-x: hidden; }
  .portfolios-page .app-nav { --nav-h: 76px; }
  .portfolios-page .app-nav-bar { height: var(--nav-h); }
  .portfolios-page .logo img { height: 32px; }
  .portfolios-page .navcta { padding: 8px 14px; }

  .discover {
    width: calc(100% - 32px);
    max-width: 100%;
    margin: 16px auto 56px;
  }
  .discover-eyebrow { margin: 0 0 6px; }
  .discover h1 { font-size: clamp(2.15rem, 9vw, 2.65rem); line-height: 1; }
  .discover-lead { margin-top: 8px; font-size: 0.95rem; }
  .discover-bar {
    align-items: stretch;
    margin-top: 16px;
    max-width: 100%;
    overflow: hidden;
  }
  .discover-tabs {
    width: 100%;
    max-width: 100%;
    gap: 8px;
    padding: 2px 2px 6px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }
  .discover-tabs button {
    flex: none;
    padding: 8px 14px;
    border: 1px solid rgba(23, 23, 20, 0.12);
    border-radius: 999px;
    background: #fff;
    color: #8a877f;
    font-size: 0.84rem;
  }
  .discover-tabs button.is-active {
    background: var(--ink);
    color: #fff;
    font-weight: 650;
  }
  .discover-tabs button.is-active::after { display: none; }

  .discover-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
  }
  .portfolio-card {
    border-radius: 16px;
    padding: 8px 8px 10px;
  }
  .portfolio-cover {
    aspect-ratio: 4 / 5;
    border-radius: 12px;
  }
  .portfolio-cover-fallback { font-size: 1.6rem; }
  .portfolio-meta {
    gap: 8px;
    margin: -22px 2px 0;
    padding: 6px 8px;
    border-radius: 12px;
  }
  .portfolio-avatar {
    width: 28px;
    height: 28px;
    font-size: 0.55rem;
  }
  .portfolio-id strong { font-size: 0.82rem; }
  .portfolio-id em { font-size: 0.7rem; }
  .portfolio-go {
    width: 28px;
    height: 28px;
  }
  .portfolio-go svg { width: 12px; height: 12px; }
  .portfolio-tags {
    gap: 4px;
    margin: 8px 2px 0;
  }
  .portfolio-tags i {
    font-size: 0.6rem;
    padding: 4px 7px;
  }
  .category-empty {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 22px 18px 26px;
    gap: 8px;
  }
  .category-empty img { max-height: 180px; }
}

@media (max-width: 339px) {
  .discover { width: calc(100% - 24px); margin-top: 12px; }
  .discover-grid { gap: 10px; }
  .portfolio-card { padding: 6px 6px 8px; border-radius: 14px; }
  .portfolio-meta { padding: 5px 6px; gap: 6px; }
  .portfolio-go { display: none; }
  .portfolio-id strong { font-size: 0.76rem; }
}
