#projects {
    align-items: normal;
    align-self: center;
    background: #16213E;
    margin-inline: 0;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
    gap: clamp(14px, 2vw, 20px);
    justify-content: center;
    --bg: #0f1222; --card: #0f1b2d; --ink: #d7e3ff; --muted: #9ab0c9;
    --primary: #00bfff; --border: #317AC1;
    color: var(--ink);
    background: var(--bg);
    padding: clamp(.5rem, 2vw, 1rem);
}
#projects > h1 {
    margin: 0 0 1rem;
    font-size: clamp(1.2rem, 1rem + 1.2vw, 1.8rem);
    letter-spacing: .3px;
}

/* Card */
.projectCard {
    display: grid;
    width: calc(100% - 12px); /* leaves room for the offset shadow */
    min-width: 0;
    justify-self: center;
    grid-template-rows: auto auto auto 1fr auto auto;
    gap: .2rem;
    background: #0D1A2AFF;
    border: 1px solid var(--border);
    padding: clamp(12px, 2vw, 18px);
    box-shadow: #317AC1 6px 6px 1px;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
    margin-bottom: 2.5vh;
}
.projectCard:hover {
    transform: translateY(-2px);
    border-color: #6a6abb;
    box-shadow: #317AC1 12px 12px 1px ;
}

/* Title + status */
.projectTitle h2 {
    margin: 0;
    font-size: 1.15rem;
    color: #00bfff;
}
.projectTimeStatus p {
    margin: 0; color: #c2bdbd; font-size: .9rem;
}

/* Image */
.projectImage h3 {
    margin: 0 0 .4rem; font-size: .95rem; color: var(--muted);
}
.projectImage img {
    width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: contain;
    border-radius: 10px; border: 1px solid var(--border);
    background: #0c1526;
}

/* Description */
.projectDescription p {
    margin: 0; color: #cfe1f8; line-height: 1.55; font-size: .95rem;
}

/* Tech badges */
.techTools {
    display: flex; flex-wrap: wrap; gap: 1rem;
    list-style: none; padding: 0; margin: .4rem 0 .4rem ;
}
.techTools li {
    font-size: .85rem;
    letter-spacing: .2px;
    color: #00bfff;
    background: #1A1A2E;
    border: 1px solid #317AC1;
    padding: .22rem .55rem;
    box-shadow: #317AC1 2px 2px 1px;
}

/* Card footer (links/CTA) */
.projectLink {
    display: flex; gap: .6rem; align-items: center;
    justify-content: center;
}
.projectLink a {
    width: 90%;
    overflow-wrap: anywhere; font-size: .9rem;
    color: #cfe6ff; text-decoration: none;
    border: 1px solid rgba(255,255,255,0.14);
    padding: .45rem .7rem; border-radius: 10px;
    transition: border-color .15s ease, color .15s ease;
}
.projectLink a:hover { border-color: var(--primary); color: #eafffb; }

/* Focus and accessibility */
.projectCard:focus-within { outline: 2px solid var(--primary); outline-offset: 2px; }

.projectDescriptionUl{
    list-style: none;
    padding-left: 0;
    margin: .5rem 0;
}
.projectDescriptionUl li p {
    text-align: left;
    margin-bottom: 0.5vh;
}
/* Project image block */
.projectImage {
    display: grid;
    gap: .5rem;
}

/* Carousel */
.projectImage .carousel {
    display: grid;
    grid-template-rows: auto 36px auto; /* viewport, buttons row, dots */
    gap: .5rem;
}

/* Visible window and track */
.projectImage .viewport {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;

    border-radius: 10px;
    border: 1px solid var(--border);
    background: #0c1526;
    box-shadow: #317AC1 2px 2px 1px;
}

.projectImage .track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 100%; /* 1 image = 100% of the visible width */
    /* Keeps the track from overflowing grid/flex parents */
    min-width: 100%;
}

/* Slides */
.projectImage .track img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;   /* height proportional to the card width */
    object-fit: contain;
    scroll-snap-align: start;
    border-radius: 10px;     /* consistent with the viewport */
}

/* Buttons row: centered below the image */
.projectImage .controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .6rem;
}

/* Buttons */
.projectImage .nav {
    border: 1px solid var(--border);
    background: #1A1A2E;
    color: #cfe6ff;
    height: 36px; min-width: 36px;
    padding: 0 .8rem;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: #317AC1 2px 2px 1px;
    transition: transform .1s ease, border-color .15s ease, color .15s ease;
}
.projectImage .nav:hover { border-color: #6a6abb; color: #eafffb; }
.projectImage .nav:active { transform: scale(.96); }
.projectImage .nav:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Dots (pagination) below the buttons */
.projectImage .dots {
    display: flex;
    justify-content: center;
    gap: .4rem;
}
.projectImage .dots button {
    width: 8px; height: 8px; border-radius: 999px;
    border: 0; background: rgba(255,255,255,0.35);
    box-shadow: #317AC1 1px 1px 0;
    cursor: pointer;
}
.projectImage .dots button[aria-current="true"] { background: var(--primary); }
/*
Source - https://stackoverflow.com/a
Posted by PsiKai, modified by community. See post 'Timeline' for change history
Retrieved 2026-01-21, License - CC BY-SA 4.0
*/

/* BEGIN ANIMATION STYLES */
.box{
    cursor: pointer;
}
.full-screen {
    position: fixed;
    animation: go-full-screen forwards 500ms ease-in-out;
    inset: var(--inset);
}

.shrink-down {
    animation: go-full-screen reverse backwards 500ms ease-in-out !important;
}

@keyframes go-full-screen {
    from {
        inset: var(--inset);
    }
    to {
        height: 100%;
        width: 100%;
        inset: 0;
    }
}
@media (min-width: 1500px) {
    #projects { grid-template-columns: repeat(3, 1fr); }
}


