.project-section-nav {
    position: static;
    inset: auto;
    z-index: auto;
    width: 100%;
    border-bottom: 1px solid var(--border);
    background: var(--navbar-bg);
}

.project-section-nav-inner {
    display: flex;
    max-width: 80rem;
    margin: 0 auto;
    padding: 0.55rem 1rem;
    gap: 0.25rem;
    overflow-x: auto;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
}

.project-section-nav-inner::-webkit-scrollbar {
    display: none;
}

.project-section-nav a {
    flex: 0 0 auto;
    padding: 0.58rem 0.75rem;
    border-radius: 0.5rem;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
}

.project-section-nav a:hover,
.project-section-nav a:focus-visible {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.055);
    outline: none;
}

.project-section-nav a.active {
    color: #dbeafe;
    background: rgba(47, 111, 237, 0.15);
}

.project-page {
    min-height: calc(100vh - var(--header-height));
    padding: clamp(1.5rem, 3vw, 2.5rem) 1rem 4rem;
    background: var(--page-bg);
}

.project-page-container {
    width: min(100%, 80rem);
    margin-inline: auto;
}

.project-page-header {
    position: static;
    inset: auto;
    z-index: auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 2rem;
    padding: 0 0 1.75rem;
    border-bottom: 1px solid var(--border);
    background: transparent;
}

@media (min-width: 768px) {
    .project-page-header {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
    }
}

.project-list-hero {
    position: static;
    inset: auto;
    z-index: auto;
    padding: 0 0 1.75rem;
    background: radial-gradient(circle at 15% 10%, rgba(47, 111, 237, 0.08), transparent 42%);
}

.project-filter-panel {
    position: static;
    inset: auto;
    z-index: auto;
    overflow: visible;
    border-color: var(--border);
    background: var(--surface);
}

.project-filter-reset {
    flex: 0 0 auto;
    padding: 0.55rem 0.75rem;
    border-radius: 0.55rem;
    color: #bfdbfe;
    background: transparent;
    font-size: 0.78rem;
    font-weight: 650;
    text-decoration: none;
}

.project-filter-reset:hover,
.project-filter-reset:focus-visible {
    color: #fff;
    background: rgba(47, 111, 237, 0.2);
}

.project-filter-primary,
.project-filter-secondary {
    display: grid;
    gap: 0.75rem;
    align-items: start;
}

.project-filter-field {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.project-filter-label {
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 650;
    line-height: 1rem;
}

.project-filter-label-note {
    color: var(--text-muted);
    font-weight: 400;
}

.project-filter-panel .bst-field,
.project-filter-panel .bst-multiselect-control {
    min-height: 2.8rem;
    border-color: rgba(112, 135, 172, 0.42) !important;
    background-color: var(--input-bg) !important;
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.project-filter-panel .bst-field {
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
}

.project-filter-panel .bst-multiselect-control {
    min-width: 0;
    padding: 0.35rem 2.25rem 0.35rem 0.55rem;
    overflow: hidden;
}

.project-filter-panel .bst-multiselect-search {
    min-width: 3.5rem;
    flex: 1 1 3.5rem;
}

.project-filter-panel .bst-multiselect-chip {
    min-width: 0;
    max-width: 6.5rem;
    flex: 0 1 auto;
    padding: 0.28rem 0.45rem;
    font-size: 0.75rem;
}

.project-filter-panel .bst-multiselect-chip-summary {
    flex: 0 0 auto;
    padding-inline: 0.48rem;
    background: rgba(148, 163, 184, 0.13);
    color: var(--text-secondary);
}

.project-filter-panel .bst-field:hover,
.project-filter-panel .bst-multiselect-control:hover {
    border-color: rgba(125, 161, 219, 0.62) !important;
}

.project-filter-submit-field {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
    align-self: end;
    min-height: 2.8rem;
}

.project-filter-results {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1rem;
    margin-bottom: 1rem;
}

.project-filter-results p {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.project-filter-results strong {
    color: var(--text-primary);
    font-size: 0.95rem;
}

.project-filter-submit {
    min-height: 2.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(96, 165, 250, 0.4);
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #2563eb, #3478ed);
    color: #fff;
    box-shadow: none;
    font-size: 0.88rem;
    font-weight: 700;
    transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

.project-filter-submit:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.project-filter-submit:focus-visible {
    outline: 3px solid rgba(96, 165, 250, 0.35);
    outline-offset: 2px;
}

@media (min-width: 768px) {
    .project-filter-primary,
    .project-filter-secondary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .project-filter-search {
        grid-column: 1 / -1;
    }

    .project-filter-submit-field {
        grid-column: 1 / -1;
    }
}

@media (min-width: 1024px) {
    .project-filter-primary {
        grid-template-columns: minmax(0, 2fr) minmax(12rem, 1fr) minmax(13rem, 1fr) auto;
    }

    .project-filter-search,
    .project-filter-submit-field {
        grid-column: auto;
    }

    .project-filter-secondary {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

.project-surface {
    border-color: var(--border) !important;
    background: var(--surface) !important;
}

@media (max-width: 480px) {
    .project-page {
        padding-inline: 0.9rem;
        padding-top: 1.35rem;
    }

    .project-section-nav-inner {
        padding-inline: 0.75rem;
    }
}

.project-more-filters summary {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.25rem;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    cursor: pointer;
    color: #93c5fd;
    font-size: 0.8rem;
    font-weight: 600;
    list-style: none;
    transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.project-more-filters summary::-webkit-details-marker {
    display: none;
}

.project-more-filters summary:hover {
    color: #dbeafe;
    background: rgba(47, 111, 237, 0.08);
    border-color: rgba(96, 165, 250, 0.16);
}

.project-filter-summary-icon {
    width: 0.48rem;
    height: 0.48rem;
    flex: 0 0 auto;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    transition: transform 160ms ease;
}

.project-more-filters[open] .project-filter-summary-icon {
    transform: rotate(45deg) translateY(-2px);
}

.project-more-filters {
    margin-top: 0.65rem;
}

.project-more-filters[open] summary {
    margin-bottom: 0.65rem;
    color: #dbeafe;
    background: rgba(47, 111, 237, 0.08);
    border-color: rgba(96, 165, 250, 0.16);
}

@media (max-width: 639px) {
    .project-filter-submit-field,
    .project-filter-submit {
        width: 100%;
    }

    .project-filter-reset {
        flex: 1 1 auto;
        text-align: center;
    }
}

.project-more-filters summary:focus-visible {
    border-radius: 0.25rem;
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}
