/* Portfolio */
.portfolio-filter { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1.5rem; }
.filter-btn { padding: 0.5rem 1rem; border-radius: 999px; border: 1px solid var(--muted-border-2); background: transparent; color: var(--text-color); cursor: pointer; transition: background 0.18s, transform 0.18s; }
.filter-btn.active, .filter-btn:hover { background: linear-gradient(90deg, rgba(79,70,229,0.08), rgba(16,185,129,0.06)); color: var(--primary-color); transform: translateY(-2px); }

.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.25rem; }
.portfolio-item { border-radius: 12px; overflow: hidden; background: var(--surface-1); transition: transform 0.25s ease, opacity 0.25s ease; }
.portfolio-item.hidden { opacity: 0; transform: scale(0.98); pointer-events: none; }
.portfolio-image { height: 220px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, rgba(79,70,229,0.12), rgba(16,185,129,0.06)); color: var(--text-on-primary); font-size: 2rem; position: relative; overflow: hidden; }
.portfolio-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.portfolio-image i { position: relative; z-index: 2; opacity: 0.85; }
.portfolio-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 0.75rem; background: rgba(0,0,0,0.5); opacity: 0; transition: opacity 0.18s ease; }
.portfolio-item:hover .portfolio-overlay { opacity: 1; }
.portfolio-link { width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(90deg, var(--primary-color), var(--accent-color)); color: #fff; text-decoration: none; }
.portfolio-info { padding: 1rem; background: transparent; }
.portfolio-tag { display: inline-block; padding: 4px 8px; border-radius: 999px; background: rgba(79,70,229,0.08); color: var(--text-on-primary); font-size: 0.8rem; margin-right: 6px; margin-top: 6px; }

/* Small favicon thumbnail over the preview */
.favicon-badge { position: absolute; top: 8px; left: 8px; width: 24px; height: 24px; border-radius: 6px; background: #fff; padding: 2px; box-shadow: 0 6px 14px rgba(2,6,23,0.12); z-index: 3; object-fit: contain; }

/* Brand badge (e.g., MLM or Laeconomica) */
.brand-badge { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 6px; background: #fff; padding: 2px; box-shadow: 0 6px 14px rgba(2,6,23,0.12); z-index: 3; object-fit: contain; }
