.xmla-portfolio-instance {
    --xmla-bg: #11151b;
    --xmla-panel: rgba(18, 24, 32, 0.84);
    --xmla-panel-strong: rgba(13, 17, 23, 0.96);
    --xmla-border: rgba(148, 163, 184, 0.22);
    --xmla-text: #f5f7fb;
    --xmla-muted: rgba(226, 232, 240, 0.74);
    --xmla-cyan: #00bcd4;
    --xmla-blue: #2d7ff9;
    --xmla-magenta: #d946ef;
    --xmla-green: #46b450;
    --xmla-danger: #ef4444;
    color: var(--xmla-text);
    font-family: inherit;
    margin: 10px 0 24px;
}

.xmla-portfolio-instance *,
.xmla-portfolio-instance *::before,
.xmla-portfolio-instance *::after {
    box-sizing: border-box;
}

.xmla-portfolio-instance [hidden] {
    display: none !important;
}

.xmla-favorites-bar,
.xmla-advanced-filter,
.xmla-advanced-actions {
    text-align: left;
}

.xmla-favorites-bar {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 10px;
}

.xmla-favorites-toggle,
.xmla-advanced-toggle,
.xmla-clear-filters-btn,
.xmla-filter-btn,
.xmla-tech-tag,
.xmla-service-tag,
.xmla-pagination button,
.xmla-view-btn,
.xmla-slider-nav,
.xmla-favorite-btn,
.xmla-lightbox-close,
.xmla-lightbox-nav,
.xmla-enlarge-btn,
.xmla-expand-btn {
    appearance: none;
    border: 1px solid var(--xmla-border);
    border-radius: 8px;
    cursor: pointer;
    font: inherit;
    letter-spacing: 0;
}

.xmla-favorites-toggle,
.xmla-advanced-toggle,
.xmla-clear-filters-btn {
    align-items: center;
    background: rgba(15, 23, 42, 0.72);
    border-color: rgba(148, 163, 184, 0.22);
    color: rgba(245, 247, 251, 0.88);
    display: inline-flex;
    font-size: 14px;
    font-weight: 500;
    gap: 7px;
    justify-content: center;
    line-height: 1;
    min-height: 36px;
    padding: 8px 13px;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.xmla-favorites-toggle,
.xmla-advanced-toggle {
    border-radius: 999px;
}

.xmla-favorites-toggle:hover,
.xmla-advanced-toggle:hover,
.xmla-clear-filters-btn:hover {
    background: rgba(30, 41, 59, 0.86);
    border-color: rgba(0, 188, 212, 0.48);
    color: #fff;
}

.xmla-favorites-toggle[aria-pressed="true"] {
    background: rgba(217, 70, 239, 0.18);
    border-color: rgba(217, 70, 239, 0.5);
    color: #f5d0fe;
}

.xmla-advanced-toggle[aria-expanded="true"] {
    background: rgba(0, 188, 212, 0.12);
    border-color: rgba(0, 188, 212, 0.54);
    color: #8be9f4;
}

.xmla-heart-icon {
    line-height: 1;
}

.xmla-filter-bar-2077,
.xmla-advanced-panel {
    background: rgba(15, 23, 42, 0.36);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    justify-content: flex-start;
    margin: 0 0 10px;
    padding: 10px;
}

.xmla-advanced-panel {
    display: block;
    margin-top: 10px;
    padding: 14px;
}

.xmla-advanced-filter {
    margin: 0 0 20px;
}

.xmla-filter-btn,
.xmla-tech-tag,
.xmla-service-tag {
    background: rgba(15, 23, 42, 0.56);
    border-color: rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    color: rgba(226, 232, 240, 0.82);
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    min-height: 34px;
    padding: 8px 12px;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
    white-space: nowrap;
}

.xmla-filter-btn:hover,
.xmla-tech-tag:hover,
.xmla-service-tag:hover {
    transform: translateY(-1px);
}

.xmla-filter-btn:hover,
.xmla-filter-btn.active,
.xmla-filter-btn[aria-pressed="true"],
.xmla-tech-tag:hover,
.xmla-tech-tag.active,
.xmla-tech-tag[aria-pressed="true"],
.xmla-service-tag:hover,
.xmla-service-tag.active,
.xmla-service-tag[aria-pressed="true"] {
    background: rgba(0, 188, 212, 0.12);
    border-color: rgba(0, 188, 212, 0.54);
    color: #8be9f4;
}

.xmla-filter-section {
    margin-bottom: 14px;
    width: 100%;
}

.xmla-filter-section:last-child {
    margin-bottom: 0;
}

.xmla-filter-section h4 {
    align-items: center;
    color: var(--xmla-cyan);
    display: flex;
    font-size: 13px;
    font-weight: 700;
    gap: 8px;
    justify-content: flex-start;
    letter-spacing: 0;
    margin: 0 0 10px;
}

.xmla-pulse-dot {
    background: var(--xmla-cyan);
    border-radius: 999px;
    display: inline-block;
    height: 8px;
    width: 8px;
}

.xmla-filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    justify-content: flex-start;
}

.xmla-portfolio-2077 {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr;
    margin: 24px 0;
}

@media (min-width: 720px) {
    .xmla-portfolio-2077 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1040px) {
    .xmla-portfolio-2077 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .xmla-favorites-bar {
        justify-content: flex-start;
    }

    .xmla-filter-bar-2077,
    .xmla-filter-tags {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 12px;
        scrollbar-width: thin;
    }

    .xmla-filter-bar-2077::-webkit-scrollbar,
    .xmla-filter-tags::-webkit-scrollbar {
        height: 6px;
    }
}

.xmla-card-2077 {
    background: var(--xmla-panel);
    border: 1px solid rgba(77, 208, 225, 0.22);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    position: relative;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.xmla-card-2077:hover,
.xmla-card-2077:focus-visible {
    border-color: rgba(0, 188, 212, 0.66);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(0, 188, 212, 0.12);
    outline: none;
    transform: translateY(-3px);
}

.xmla-favorite-btn {
    align-items: center;
    aspect-ratio: 1 / 1;
    background: rgba(17, 21, 27, 0.78);
    border-radius: 999px;
    color: var(--xmla-muted);
    display: flex;
    height: 32px;
    justify-content: center;
    padding: 0;
    position: absolute;
    right: 10px;
    top: 10px;
    width: 32px;
    z-index: 4;
}

.xmla-favorite-btn[aria-pressed="true"],
.xmla-favorite-btn.active {
    background: rgba(217, 70, 239, 0.22);
    border-color: rgba(217, 70, 239, 0.72);
    color: #f5d0fe;
}

.xmla-favorite-btn.xmla-favorite-pulse {
    animation: xmla-heartbeat 0.45s ease;
}

@keyframes xmla-heartbeat {
    0%, 100% { transform: scale(1); }
    35% { transform: scale(1.24); }
    70% { transform: scale(1.08); }
}

.xmla-image-container {
    aspect-ratio: var(--xmla-image-aspect-ratio, 16 / 9);
    background: #0d1117;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.xmla-ratio-16-9 .xmla-image-container { aspect-ratio: 16 / 9; }
.xmla-ratio-4-3 .xmla-image-container { aspect-ratio: 4 / 3; }
.xmla-ratio-1-1 .xmla-image-container { aspect-ratio: 1 / 1; }
.xmla-ratio-3-4 .xmla-image-container { aspect-ratio: 3 / 4; }
.xmla-ratio-9-16 .xmla-image-container { aspect-ratio: 9 / 16; }
.xmla-ratio-auto .xmla-image-container {
    aspect-ratio: auto;
    min-height: 0;
}

.xmla-project-image {
    display: block;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.25s ease;
    width: 100%;
}

.xmla-ratio-auto .xmla-project-image,
.xmla-image-container.xmla-scroll-enabled .xmla-project-image {
    height: auto;
    min-height: 100%;
}

.xmla-image-container.xmla-scroll-enabled .xmla-project-image {
    object-fit: contain;
    transform: translateY(0);
}

.xmla-card-2077:hover .xmla-image-container:not(.xmla-scroll-enabled) .xmla-project-image {
    transform: scale(1.035);
}

.xmla-image-container.xmla-sheen::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.24), transparent);
    content: "";
    height: 100%;
    left: -100%;
    pointer-events: none;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 2;
}

.xmla-card-2077:hover .xmla-sheen::before {
    animation: xmla-sheen 1.2s ease;
}

@keyframes xmla-sheen {
    from { left: -100%; }
    to { left: 100%; }
}

.xmla-visit-site-btn {
    align-items: center;
    background: rgba(45, 127, 249, 0.92);
    border-radius: 8px;
    bottom: 10px;
    color: #fff;
    display: inline-flex;
    font-size: 13px;
    gap: 5px;
    opacity: 0;
    padding: 8px 12px;
    position: absolute;
    right: 10px;
    text-decoration: none;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
    z-index: 3;
}

.xmla-card-2077:hover .xmla-visit-site-btn,
.xmla-visit-site-btn:focus-visible {
    opacity: 1;
    transform: translateY(0);
}

.xmla-visit-site-btn:hover {
    background: rgba(0, 188, 212, 0.94);
}

.xmla-card-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 9px;
    padding: 14px;
}

.xmla-card-title {
    color: var(--xmla-text);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.25;
    margin: 0;
}

.xmla-category-badge,
.xmla-tech-badge,
.xmla-lb-tag {
    border: 1px solid rgba(77, 208, 225, 0.28);
    border-radius: 999px;
    display: inline-flex;
    font-size: 12px;
    line-height: 1.2;
    padding: 4px 9px;
}

.xmla-category-badge {
    align-self: flex-start;
    background: rgba(0, 188, 212, 0.13);
    color: #8be9f4;
}

.xmla-card-excerpt {
    color: var(--xmla-muted);
    font-size: 14px;
    line-height: 1.45;
    margin: 0;
}

.xmla-card-tags,
.xmla-lb-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.xmla-tech-badge,
.xmla-lb-tag {
    background: rgba(255, 255, 255, 0.05);
    color: var(--xmla-muted);
}

.xmla-view-btn {
    background: rgba(0, 188, 212, 0.13);
    color: var(--xmla-cyan);
    margin-top: auto;
    padding: 10px 12px;
    width: 100%;
}

.xmla-view-btn:hover,
.xmla-view-btn:focus-visible {
    background: rgba(0, 188, 212, 0.22);
    border-color: rgba(0, 188, 212, 0.72);
    outline: none;
}

.xmla-pagination {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 26px;
}

.xmla-pagination button {
    background: var(--xmla-panel);
    color: var(--xmla-cyan);
    padding: 9px 14px;
}

.xmla-pagination button:disabled {
    cursor: not-allowed;
    opacity: 0.46;
}

.xmla-pagination-info {
    color: var(--xmla-muted);
    font-weight: 700;
}

.xmla-view-all-link {
    text-decoration: none;
}

.xmla-slider-container {
    margin: 24px 0;
    overflow: hidden;
    position: relative;
}

.xmla-slider-wrapper {
    overflow: hidden;
    padding: 4px 0;
}

.xmla-portfolio-2077.xmla-slider-mode {
    display: flex;
    gap: 20px;
    transition: transform 0.35s ease;
}

.xmla-portfolio-2077.xmla-slider-mode .xmla-card-2077 {
    flex: 0 0 100%;
}

@media (min-width: 720px) {
    .xmla-portfolio-2077.xmla-slider-mode .xmla-card-2077 {
        flex-basis: calc(50% - 10px);
    }
}

@media (min-width: 1040px) {
    .xmla-portfolio-2077.xmla-slider-mode .xmla-card-2077 {
        flex-basis: calc(33.333% - 14px);
    }
}

.xmla-slider-nav {
    align-items: center;
    background: rgba(17, 21, 27, 0.85);
    border-radius: 999px;
    color: var(--xmla-cyan);
    display: flex;
    height: 44px;
    justify-content: center;
    opacity: 0;
    padding: 0;
    pointer-events: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    transition: opacity 0.2s ease, background 0.2s ease;
    width: 44px;
    z-index: 5;
}

.xmla-slider-container:hover .xmla-slider-nav,
.xmla-slider-container:focus-within .xmla-slider-nav {
    opacity: 1;
    pointer-events: auto;
}

.xmla-slider-prev { left: 10px; }
.xmla-slider-next { right: 10px; }

.xmla-lightbox-2077 {
    align-items: center;
    background: rgba(0, 0, 0, 0.86);
    display: none;
    inset: 0;
    justify-content: center;
    padding: 18px;
    position: fixed;
    z-index: 999999;
}

.xmla-lightbox-2077.active {
    display: flex;
}

.xmla-lightbox-content {
    max-height: 92vh;
    max-width: 1160px;
    position: relative;
    width: min(100%, 1160px);
}

.xmla-lightbox-inner {
    background: var(--xmla-panel-strong);
    border: 1px solid rgba(77, 208, 225, 0.32);
    border-radius: 8px;
    display: grid;
    gap: 20px;
    max-height: 92vh;
    overflow: auto;
    padding: 18px;
}

@media (min-width: 860px) {
    .xmla-lightbox-inner {
        grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.8fr);
        padding: 24px;
    }
}

.xmla-lightbox-close {
    align-items: center;
    background: rgba(17, 21, 27, 0.95);
    border-radius: 999px;
    color: var(--xmla-text);
    display: flex;
    font-size: 26px;
    height: 42px;
    justify-content: center;
    padding: 0;
    position: absolute;
    right: -10px;
    top: -10px;
    width: 42px;
    z-index: 10;
}

.xmla-lightbox-close:hover {
    background: rgba(239, 68, 68, 0.86);
}

.xmla-lightbox-nav {
    align-items: center;
    background: rgba(17, 21, 27, 0.88);
    border-radius: 999px;
    color: var(--xmla-cyan);
    display: flex;
    height: 44px;
    justify-content: center;
    padding: 0;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    z-index: 7;
}

.xmla-lightbox-nav.xmla-prev { left: 10px; }
.xmla-lightbox-nav.xmla-next { right: 10px; }

.xmla-lightbox-2077[data-nav-hidden="true"] .xmla-lightbox-nav {
    display: none;
}

.xmla-lb-image-wrapper {
    min-width: 0;
    position: relative;
}

.xmla-lb-image-container {
    background: #080b10;
    border: 1px solid rgba(77, 208, 225, 0.25);
    border-radius: 8px;
    max-height: min(72vh, 760px);
    overflow: auto;
}

.xmla-lb-image-container.enlarged {
    max-height: none;
    overflow: visible;
}

.xmla-lb-image {
    border-radius: 8px;
    display: block;
    height: auto;
    width: 100%;
}

.xmla-lb-button-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    left: 10px;
    pointer-events: none;
    position: absolute;
    right: 10px;
    top: 10px;
}

.xmla-lb-button-row > * {
    pointer-events: auto;
}

.xmla-site-link,
.xmla-enlarge-btn,
.xmla-expand-btn {
    align-items: center;
    background: rgba(17, 21, 27, 0.86);
    border: 1px solid var(--xmla-border);
    border-radius: 8px;
    color: var(--xmla-text);
    display: inline-flex;
    gap: 6px;
    padding: 9px 12px;
    text-decoration: none;
}

.xmla-site-link:hover,
.xmla-enlarge-btn:hover,
.xmla-expand-btn:hover {
    background: rgba(0, 188, 212, 0.18);
    color: var(--xmla-cyan);
}

.xmla-lightbox-info {
    color: var(--xmla-text);
    min-width: 0;
}

.xmla-lb-title-category {
    align-items: flex-start;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.xmla-lb-title {
    color: var(--xmla-cyan);
    font-size: 26px;
    line-height: 1.2;
    margin: 0;
}

.xmla-lb-excerpt {
    color: var(--xmla-muted);
    font-size: 15px;
    line-height: 1.55;
    margin: 16px 0 10px;
}

.xmla-lb-tech-services-grid {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

@media (min-width: 720px) {
    .xmla-lb-tech-services-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.xmla-lb-technologies,
.xmla-lb-services {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(77, 208, 225, 0.18);
    border-radius: 8px;
    padding: 12px;
}

.xmla-lb-technologies h4,
.xmla-lb-services h4 {
    color: var(--xmla-cyan);
    font-size: 13px;
    margin: 0 0 10px;
}

.xmla-empty-state {
    background: var(--xmla-panel);
    border: 1px solid rgba(77, 208, 225, 0.22);
    border-radius: 8px;
    color: var(--xmla-muted);
    margin: 20px 0;
    padding: 18px;
    text-align: center;
}

.xmla-portfolio-instance :focus-visible {
    outline: 2px solid var(--xmla-cyan);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .xmla-portfolio-instance *,
    .xmla-portfolio-instance *::before,
    .xmla-portfolio-instance *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
