.portfolio-hero::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    inset-inline-start: 8%;
    inset-block-end: -120px;
    border-radius: 32px;
    transform: rotate(18deg);
    background: linear-gradient(135deg, rgba(25,197,232,.13), rgba(8,120,249,.04));
    border: 1px solid rgba(255,255,255,.08);
}
.portfolio-overview { padding-bottom: 80px; }
.portfolio-stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: var(--shadow-sm);
}
.portfolio-stats article {
    padding: 28px 18px;
    text-align: center;
    border-inline-start: 1px solid var(--line);
}
.portfolio-stats article:first-child { border-inline-start: 0; }
.portfolio-stats strong {
    display: block;
    margin-bottom: 5px;
    color: var(--primary-dark);
    font-size: 2.05rem;
    line-height: 1;
}
.portfolio-stats span { color: var(--muted); font-size: .78rem; font-weight: 750; }
.portfolio-gallery-section { padding-top: 80px; }
.portfolio-toolbar {
    position: sticky;
    top: 94px;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 34px;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255,255,255,.93);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(16px);
}
.portfolio-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.portfolio-filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 9px 13px;
    border: 1px solid transparent;
    border-radius: 11px;
    color: #42566e;
    background: transparent;
    font-size: .8rem;
    font-weight: 800;
    transition: color .2s ease, background .2s ease, border-color .2s ease;
}
.portfolio-filter small {
    min-width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #64758a;
    background: var(--surface-2);
    font-size: .66rem;
}
.portfolio-filter:hover { color: var(--primary-dark); border-color: #c9ddf5; }
.portfolio-filter.active { color: #fff; background: var(--primary); box-shadow: 0 8px 20px rgba(8,120,249,.22); }
.portfolio-filter.active small { color: #fff; background: rgba(255,255,255,.18); }
.portfolio-results { margin: 0; white-space: nowrap; color: var(--muted); font-size: .78rem; }
.portfolio-results strong { color: var(--primary-dark); font-size: 1rem; }
.portfolio-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.portfolio-logo-card {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(7,20,38,.045);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, opacity .25s ease;
}
.portfolio-logo-card:hover { transform: translateY(-6px); border-color: #bad8f7; box-shadow: var(--shadow-md); }
.portfolio-logo-card.is-hidden { display: none; }
.portfolio-logo-image {
    height: 150px;
    display: grid;
    place-items: center;
    padding: 18px;
    overflow: hidden;
    border-radius: 13px;
    background: linear-gradient(145deg, #f8fafc, #eef3f8);
}
.portfolio-logo-image img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.portfolio-logo-meta { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 14px 4px 0; }
.portfolio-logo-meta span { color: var(--muted); font-size: .72rem; font-weight: 750; }
.portfolio-logo-meta small { color: #a2afbf; font-size: .66rem; }
.portfolio-engagement-icon { margin-bottom: 23px; color: #fff; background: rgba(85,180,255,.12); }
.noscript-note { margin-top: 20px; color: var(--muted); text-align: center; }

@media (max-width: 1050px) {
    .portfolio-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .portfolio-stats { grid-template-columns: repeat(3, 1fr); }
    .portfolio-stats article:nth-child(4) { border-inline-start: 0; border-top: 1px solid var(--line); }
    .portfolio-stats article:nth-child(5) { border-top: 1px solid var(--line); }
}
@media (max-width: 800px) {
    .portfolio-toolbar { position: static; align-items: flex-start; flex-direction: column; }
    .portfolio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .portfolio-stats { grid-template-columns: repeat(2, 1fr); }
    .portfolio-stats article:nth-child(3),
    .portfolio-stats article:nth-child(5) { border-inline-start: 0; }
    .portfolio-stats article:nth-child(n+3) { border-top: 1px solid var(--line); }
    .portfolio-grid { grid-template-columns: 1fr; }
    .portfolio-logo-image { height: 175px; }
    .portfolio-filter { flex: 1 1 calc(50% - 8px); justify-content: space-between; }
}
