/* Portfolio grid (draft) — cards in a responsive grid with image carousels */

body.portfolio-grid-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
}

body.portfolio-grid-page header { margin-bottom: 32px; }

.proj-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.grid-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    background-color: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.grid-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(45, 52, 235, 0.10);
}

/* Carousel */
.grid-carousel {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background-color: #fff;
    overflow: hidden;
    border-bottom: 1px solid #f0f0f0;
}

.grid-carousel .carousel-track {
    position: absolute;
    inset: 0;
    display: block;
}

.grid-carousel .carousel-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.35s ease;
    display: block;
}

.grid-carousel .carousel-slide.is-active {
    opacity: 1;
}

.grid-carousel .carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.grid-carousel .carousel-link {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    text-decoration: none;
}

.grid-carousel .carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #eee;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 0.9rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease, color 0.2s ease, background 0.2s ease;
    padding: 0;
}

.grid-carousel:hover .carousel-btn,
.grid-carousel:focus-within .carousel-btn {
    opacity: 1;
}

.grid-carousel .carousel-btn:hover {
    color: #2d34eb;
    background: #fff;
}

.grid-carousel .carousel-btn[data-dir="prev"] { left: 8px; }
.grid-carousel .carousel-btn[data-dir="next"] { right: 8px; }

.grid-carousel .carousel-dots {
    position: absolute;
    bottom: 8px;
    left: 0;
    right: 0;
    z-index: 3;
    display: flex;
    justify-content: center;
    gap: 5px;
}

.grid-carousel .carousel-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.18);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.grid-carousel .carousel-dot.is-active {
    background-color: #2d34eb;
}

/* Single-image cards: hide controls */
.grid-carousel[data-count="1"] .carousel-btn,
.grid-carousel[data-count="1"] .carousel-dots {
    display: none;
}

/* Body */
.grid-body {
    padding: 20px 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.grid-body h3 {
    font-size: 0.86rem;
    font-weight: 500;
    color: #000;
    line-height: 1.4;
    margin: 0;
}

.grid-summary {
    font-size: 0.76rem;
    color: #555;
    line-height: 1.6;
    margin: 0;
    flex: 1;
}

.grid-bullets {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.grid-bullets li {
    font-size: 0.76rem;
    color: #555;
    line-height: 1.6;
    position: relative;
    padding-left: 14px;
}

.grid-bullets li::before {
    content: "·";
    position: absolute;
    left: 4px;
    color: #2d34eb;
    font-weight: 700;
}

.grid-links {
    margin: 6px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.76rem;
}

.grid-links a {
    color: #2d34eb;
    text-decoration: none;
}

.grid-links a:hover { color: #dfdddd; }

/* Mobile */
@media (max-width: 600px) {
    body.portfolio-grid-page { padding: 1.5rem 1.25rem; }
    .proj-grid { grid-template-columns: 1fr; gap: 18px; }
    .grid-carousel .carousel-btn { opacity: 1; }
}
