.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: 28px;
    max-width: 1550px;
    margin: 0 auto;
    padding: 0 20px;
}

.case-card {
    background: #0a0a0a;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.06);
}

.case-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 45px -10px rgba(0, 0, 0, 0.8);
    border-color: rgba(255,255,255,0.15);
}

.image-area {
    height: 235px;
    position: relative;
    background: #111;
}

.image-area img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.75);
    transition: transform 0.5s ease, filter 0.5s ease;
}

.case-card:hover .image-area img {
    transform: scale(1.07);
    filter: brightness(1);
}

.content-area {
    padding: 26px 28px 30px 28px;
    position: relative;
}

.case-title {
    font-size: 1.72rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 8px;
}

.case-desc {
    color: #999;
    font-size: 0.95rem;
    line-height: 1.45;
}

/* ===================== SHOWCASE GRID ===================== */
.showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.showcase-card {
    background: #111;
    border-radius: 24px;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.08);
    display: block;
    text-decoration: none;
    /* NO forced aspect-ratio — card now automatically matches the image's natural ratio */
}

.showcase-card img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;   /* keeps original proportions (square, rectangle or panoramic) */
}

/* ===================== PURE CSS LIGHTBOX (unchanged) ===================== */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.98);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.lightbox:target {
    display: flex;
}

.lightbox-content {
    max-width: 95%;
    max-height: 95vh;
    position: relative;
}

.lightbox-content img {
    max-width: 80%;
    max-height: 95vh;
    border-radius: 16px;
    box-shadow: 0 0 80px rgba(0,0,0,0.9);
    object-fit: contain;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.15);
    color: white;
    font-size: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    text-decoration: none;
    transition: all 0.3s ease;
    z-index: 10;
}

.lightbox-nav:hover {
    background: rgba(255,255,255,0.35);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev { left: -80px; }
.lightbox-next { right: 90px; }

.lightbox-close {
    position: absolute;
    top: -50px;
    left: 700px;
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.1);
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    text-decoration: none;
    transition: all 0.2s ease;
}

.lightbox-close:hover {
    background: rgba(255,255,255,0.25);
    transform: rotate(90deg);
}

.lightbox-counter {
    position: absolute;
    bottom: -50px;
    left: 40%;
    transform: translateX(-50%);
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 18px;
    padding: 6px 18px;
    border-radius: 9999px;
    font-weight: 600;
}

/* ===================== INLINE CAROUSEL (banner pages) ===================== */

/*
 * Radio-button driven carousel — no JS, no scroll jump.
 *
 * HTML structure required:
 *   <input type="radio" id="banner-s1" name="banner-slider" checked class="hidden">
 *   <input type="radio" id="banner-s2" name="banner-slider" class="hidden">
 *   <div class="inline-carousel-wrapper">
 *     <label for="banner-s1" class="inline-carousel__nav inline-carousel__prev">‹</label>
 *     <div class="inline-carousel">
 *       <div class="inline-carousel__track">
 *         <div class="inline-carousel__slide">...</div>
 *         <div class="inline-carousel__slide">...</div>
 *       </div>
 *     </div>
 *     <label for="banner-s2" class="inline-carousel__nav inline-carousel__next">›</label>
 *   </div>
 *   <div class="inline-carousel__dots">
 *     <label for="banner-s1" class="inline-carousel__dot"></label>
 *     <label for="banner-s2" class="inline-carousel__dot"></label>
 *   </div>
 */

/* Outer wrapper: arrow | image box | arrow, all in a row */
.inline-carousel-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.inline-carousel {
    flex: 1;
    overflow: hidden;
    border-radius: 24px;
}

/* ↓ CHANGED: was * 2 */
.inline-carousel__track {
    display: flex;
    width: calc(100% * 10);
    align-items: flex-start;
    transition: transform 0.5s ease;
}

/* ↓ CHANGED: was / 2 */
.inline-carousel__slide {
    width: calc(100% / 10);
    flex-shrink: 0;
}

.inline-carousel__slide img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 24px;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
}

/* ---- Slide positions ---- */
/* Formula: -(slideIndex) * 10%  because each slide = 10% of the track */
#banner-s1:checked  ~ .inline-carousel-wrapper .inline-carousel__track { transform: translateX(0%);   }
#banner-s2:checked  ~ .inline-carousel-wrapper .inline-carousel__track { transform: translateX(-10%); }
#banner-s3:checked  ~ .inline-carousel-wrapper .inline-carousel__track { transform: translateX(-20%); }
#banner-s4:checked  ~ .inline-carousel-wrapper .inline-carousel__track { transform: translateX(-30%); }
#banner-s5:checked  ~ .inline-carousel-wrapper .inline-carousel__track { transform: translateX(-40%); }
#banner-s6:checked  ~ .inline-carousel-wrapper .inline-carousel__track { transform: translateX(-50%); }
#banner-s7:checked  ~ .inline-carousel-wrapper .inline-carousel__track { transform: translateX(-60%); }
#banner-s8:checked  ~ .inline-carousel-wrapper .inline-carousel__track { transform: translateX(-70%); }
#banner-s9:checked  ~ .inline-carousel-wrapper .inline-carousel__track { transform: translateX(-80%); }
#banner-s10:checked ~ .inline-carousel-wrapper .inline-carousel__track { transform: translateX(-90%); }

/* ---- Per-slide nav visibility ---- */
/* Hide ALL per-slide prev/next buttons by default */


/* Show only the pair that belongs to the active slide */
#banner-s1:checked  ~ .inline-carousel-wrapper .inline-carousel__prev--1,
#banner-s1:checked  ~ .inline-carousel-wrapper .inline-carousel__next--1  { display: flex; }

#banner-s2:checked  ~ .inline-carousel-wrapper .inline-carousel__prev--2,
#banner-s2:checked  ~ .inline-carousel-wrapper .inline-carousel__next--2  { display: flex; }

#banner-s3:checked  ~ .inline-carousel-wrapper .inline-carousel__prev--3,
#banner-s3:checked  ~ .inline-carousel-wrapper .inline-carousel__next--3  { display: flex; }

#banner-s4:checked  ~ .inline-carousel-wrapper .inline-carousel__prev--4,
#banner-s4:checked  ~ .inline-carousel-wrapper .inline-carousel__next--4  { display: flex; }

#banner-s5:checked  ~ .inline-carousel-wrapper .inline-carousel__prev--5,
#banner-s5:checked  ~ .inline-carousel-wrapper .inline-carousel__next--5  { display: flex; }

#banner-s6:checked  ~ .inline-carousel-wrapper .inline-carousel__prev--6,
#banner-s6:checked  ~ .inline-carousel-wrapper .inline-carousel__next--6  { display: flex; }

#banner-s7:checked  ~ .inline-carousel-wrapper .inline-carousel__prev--7,
#banner-s7:checked  ~ .inline-carousel-wrapper .inline-carousel__next--7  { display: flex; }

#banner-s8:checked  ~ .inline-carousel-wrapper .inline-carousel__prev--8,
#banner-s8:checked  ~ .inline-carousel-wrapper .inline-carousel__next--8  { display: flex; }

#banner-s9:checked  ~ .inline-carousel-wrapper .inline-carousel__prev--9,
#banner-s9:checked  ~ .inline-carousel-wrapper .inline-carousel__next--9  { display: flex; }

#banner-s10:checked ~ .inline-carousel-wrapper .inline-carousel__prev--10,
#banner-s10:checked ~ .inline-carousel-wrapper .inline-carousel__next--10 { display: flex; }

/* ---- Arrow buttons (style unchanged) ---- */
.inline-carousel__nav {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    backdrop-filter: blur(4px);
    user-select: none;
}

.inline-carousel__nav:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.1);
}

[class*="inline-carousel__prev--"],
[class*="inline-carousel__next--"] {
    display: none;
}

/* ---- Dot navigation (style unchanged) ---- */
.inline-carousel__dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 14px;
    padding: 0 calc(52px + 50px);
}

.inline-carousel__dot {
    width: 10px;
    height: 10px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
    display: block;
}

.inline-carousel__dot:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* ↓ CHANGED: extended to all 10 slides */
#banner-s1:checked  ~ .inline-carousel__dots .inline-carousel__dot:nth-child(1),
#banner-s2:checked  ~ .inline-carousel__dots .inline-carousel__dot:nth-child(2),
#banner-s3:checked  ~ .inline-carousel__dots .inline-carousel__dot:nth-child(3),
#banner-s4:checked  ~ .inline-carousel__dots .inline-carousel__dot:nth-child(4),
#banner-s5:checked  ~ .inline-carousel__dots .inline-carousel__dot:nth-child(5),
#banner-s6:checked  ~ .inline-carousel__dots .inline-carousel__dot:nth-child(6),
#banner-s7:checked  ~ .inline-carousel__dots .inline-carousel__dot:nth-child(7),
#banner-s8:checked  ~ .inline-carousel__dots .inline-carousel__dot:nth-child(8),
#banner-s9:checked  ~ .inline-carousel__dots .inline-carousel__dot:nth-child(9),
#banner-s10:checked ~ .inline-carousel__dots .inline-carousel__dot:nth-child(10) {
    background: white;
    border-color: white;
}