* {margin: 0;padding: 0;box-sizing: border-box;}
body {font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;background: #0f0f12;color: #e5e5e5;padding: 2rem 1rem 5rem;}
.container {max-width: 1280px;margin: 0 auto;margin-top: 60px;}
.search-wrap {max-width: 480px;margin: 0 auto 1.5rem;position: relative;}
.search-wrap input {width: 100%;padding: 0.85rem 1.25rem 0.85rem 2.75rem;border: 1px solid #27272a;border-radius: 999px;background: #18181b;color: #fff;font-size: 1rem;outline: none;transition: border-color 0.2s, box-shadow 0.2s;}
.search-wrap input:focus {border-color: #6366f1;box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);}
.search-wrap svg {position: absolute;left: 1rem;top: 50%;transform: translateY(-50%);width: 18px;height: 18px;color: #71717a;pointer-events: none;}

/* IBcat-buttons */
/*.filters {display: flex;flex-wrap: wrap;justify-content: center;gap: 0.55rem;margin-bottom: 2.25rem;}
.filter-btn {padding: 0.45rem 1.1rem;border: 1px solid #3f3f46;background: transparent;color: #a1a1aa;border-radius: 999px;font-size: 0.88rem;cursor: pointer;transition: all 0.2s;}
.filter-btn:hover {border-color: #6366f1;color: #c7d2fe;}
.filter-btn.active {background: #6366f1;border-color: #6366f1;color: #fff;} */

/* IBgrid-421 */
.portfolio-grid {display: grid;grid-template-columns: repeat(4, 1fr);gap: 1.5rem;}
@media (max-width: 900px) {.portfolio-grid {grid-template-columns: repeat(2, 1fr);}}
@media (max-width: 480px) {.portfolio-grid {grid-template-columns: 1fr;gap: 1.25rem;}}

/* IBcard */
.portfolio-item {background: #18181b;border-radius: 12px;overflow: hidden;border: 1px solid #27272a;transition: transform 0.25s, box-shadow 0.25s;display: flex;flex-direction: column;}
.portfolio-item:hover {transform: translateY(-5px);box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45);}
.img-wrap {position: relative;aspect-ratio: 4 / 3;overflow: hidden;cursor: pointer;}
.img-wrap img {width: 100%;height: 100%;object-fit: cover;transition: transform 0.4s ease;}
.portfolio-item:hover .img-wrap img {transform: scale(1.07);}
.portfolio-item:hover .img-wrap::after {opacity: 1;}
.card-body {padding: 1.05rem 1.15rem 1.3rem;flex: 1;display: flex;flex-direction: column;}
.card-body h3 {font-size: 1.08rem;font-weight: 600;margin-bottom: 0.9rem;color: #fafafa;}
.links {display: flex;flex-wrap: wrap;gap: 0.45rem;margin-top: auto;}
.links a {font-size: 0.78rem;padding: 0.35rem 0.7rem;border-radius: 6px;text-decoration: none;background: #27272a;color: yellow;transition: background 0.2s, color 0.2s;}
.links a:hover {background: #6366f1;color: #fff;}
.no-results {grid-column: 1 / -1;text-align: center;padding: 3.5rem 1rem;color: #71717a;display: none;font-size: 1.05rem;}
.no-results.show {display: block;}

/* IBlightbox */
.lightbox {position: fixed;inset: 0;background: rgba(0, 0, 0, 0.93);z-index: 9999;display: flex;align-items: center;justify-content: center;padding: 1.25rem;opacity: 0;visibility: hidden;transition: opacity 0.3s, visibility 0.3s;}
.lightbox.open {opacity: 1;visibility: visible;}
.lightbox-content {position: relative;max-width: 860px;width: 100%;max-height: 92vh;background: #18181b;border-radius: 14px;overflow: hidden;display: flex;flex-direction: column;box-shadow: 0 25px 50px rgba(0, 0, 0, 0.55);}
.lightbox-img-wrap {background: #000;max-height: 78vh;display: flex;align-items: center;justify-content: center;position: relative;}
.lightbox-img-wrap img {max-width: 100%;max-height: 78vh;object-fit: contain;}

.lightbox-body {padding: 1.25rem 1.5rem 0.9rem;overflow-y: auto;flex: 1;}
.lightbox-body h2 {font-size: 1.25rem;margin-bottom: 0.55rem;color: #fafafa;}
.lightbox-body .desc {color: #a1a1aa;font-size: 0.8rem;}
.lightbox-body .desc a {color: #818cf8;}
.lightbox-body .desc ul {margin: 0.5rem 0 0.5rem 1.2rem;}

/* IBbutton-under-desc */
.lightbox-controls {display: flex;justify-content: center;align-items: center;gap: 0.75rem;padding: 0.9rem 1.5rem 1.3rem;border-top: 1px solid #27272a;background: #141416;}
.lightbox-controls button {padding: 0.55rem 1.25rem;border: none;border-radius: 8px;font-size: 0.9rem;font-weight: 500;cursor: pointer;transition: background 0.2s, transform 0.15s;}
.lightbox-controls button:active {transform: scale(0.97);}
.btn-prev, .btn-next {background: #27272a;color: #e4e4e7;}
.btn-prev:hover, .btn-next:hover {background: #3f3f46;}
.btn-prev:disabled, .btn-next:disabled {opacity: 0.4;cursor: not-allowed;}
.btn-close {background: #ef4444;color: #fff;}
.btn-close:hover {background: #dc2626;}

@media (max-width: 480px) {
.lightbox-img-wrap {max-height: 78vh;}
.lightbox-controls {flex-wrap: wrap;gap: 0.5rem;}
.lightbox-controls button {flex: 1 1 30%;min-width: 90px;}}

/* IBscroll-to-top */
.scroll-top {position: fixed;bottom: 1.75rem;right: 1.75rem;width: 48px;height: 48px;border: none;border-radius: 50%;background: #6366f1;color: #fff;font-size: 1.35rem;cursor: pointer;z-index: 900;display: flex;align-items: center;
  justify-content: center;opacity: 0;visibility: hidden;transform: translateY(12px);transition: opacity 0.3s, visibility 0.3s, transform 0.3s, background 0.2s;box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);}
.scroll-top.visible {opacity: 1;visibility: visible;transform: translateY(0);}
.scroll-top:hover {background: #4f46e5;}