.projects {
    position: relative;
    width: 100%;
    padding: 100px 20px;
    background: radial-gradient(circle at top left, #08293a 0%, #031722 45%, #020d14 100%);
    overflow: hidden;
    color: #ffffff;
}

.projects .projects-container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
}

.projects .projects-header {
    max-width: 760px;
    margin: 0 auto 55px;
    text-align: center;
}

.projects .eyebrow {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #00d9ff;
    margin-bottom: 14px;
}

.projects h2 {
    font-size: 48px;
    font-weight: 900;
    line-height: 1.08;
    margin: 0 0 18px;
    color: #ffffff;
}

.projects .projects-subtitle {
    font-size: 17px;
    line-height: 1.8;
    color: rgba(226, 242, 248, 0.78);
    margin: 0;
}

.projects .project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    min-height: 420px;
}

.projects .project-card {
    display: none;
    background: rgba(255, 255, 255, 0.075);
    border: 1px solid rgba(0, 217, 255, 0.18);
    border-radius: 24px;
    overflow: hidden;
    backdrop-filter: blur(18px);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
    opacity: 0;
    transform: translateY(35px) scale(0.96);
    transition:
        opacity 0.55s ease,
        transform 0.55s ease,
        box-shadow 0.35s ease,
        border-color 0.35s ease,
        background 0.35s ease;
}

.projects .project-card.is-visible {
    display: block;
}

.projects .project-card.animate-in {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.projects .project-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(0, 217, 255, 0.55);
    background: rgba(255, 255, 255, 0.105);
    box-shadow: 0 32px 90px rgba(0, 217, 255, 0.16);
}

.projects .project-image {
    position: relative;
    width: 100%;
    height: 230px;
    overflow: hidden;
}

.projects .project-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(2, 13, 20, 0.75));
    pointer-events: none;
}

.projects .project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.65s ease, filter 0.35s ease;
}

.projects .project-card:hover .project-image img {
    transform: scale(1.1);
    filter: saturate(1.15);
}

.projects .project-content {
    padding: 24px;
}

.projects .project-content small {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #00d9ff;
    margin-bottom: 12px;
}

.projects .project-content small::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00d9ff;
    box-shadow: 0 0 18px rgba(0, 217, 255, 0.85);
}

.projects .project-content h3 {
    font-size: 22px;
    font-weight: 850;
    line-height: 1.25;
    color: #ffffff;
    margin: 0 0 12px;
}

.projects .project-content p {
    font-size: 15px;
    line-height: 1.75;
    color: rgba(226, 242, 248, 0.78);
    margin: 0;
}

.projects .projects-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin-top: 45px;
}

.projects .pagination-numbers {
    display: flex;
    align-items: center;
    gap: 10px;
}

.projects .pagination-btn,
.projects .pagination-number {
    min-width: 44px;
    height: 44px;
    padding: 0 16px;
    border: 1px solid rgba(0, 217, 255, 0.35);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
}

.projects .pagination-btn:hover,
.projects .pagination-number:hover,
.projects .pagination-number.active {
    background: #00d9ff;
    color: #021018;
    border-color: #00d9ff;
    box-shadow: 0 0 24px rgba(0, 217, 255, 0.45);
}

.projects .pagination-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.projects .projects-empty {
    grid-column: 1 / -1;
    padding: 45px 20px;
    text-align: center;
    border: 1px dashed rgba(0, 217, 255, 0.35);
    border-radius: 22px;
    color: #ffffff;
}

.projects .projects-empty h3 {
    font-size: 26px;
    margin-bottom: 10px;
}

.projects .projects-empty p {
    color: rgba(226, 242, 248, 0.75);
}

/* Live motion background */
.projects .projects-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.projects .projects-bg span {
    position: absolute;
    display: block;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 1px solid rgba(0, 217, 255, 0.12);
    background: radial-gradient(circle, rgba(0, 217, 255, 0.16), transparent 65%);
    animation: projectsFloat 12s linear infinite;
}

.projects .projects-bg span:nth-child(1) {
    top: 12%;
    left: 8%;
    animation-duration: 13s;
}

.projects .projects-bg span:nth-child(2) {
    top: 60%;
    left: 18%;
    width: 240px;
    height: 240px;
    animation-duration: 18s;
}

.projects .projects-bg span:nth-child(3) {
    top: 20%;
    right: 12%;
    width: 110px;
    height: 110px;
    animation-duration: 11s;
}

.projects .projects-bg span:nth-child(4) {
    bottom: 8%;
    right: 20%;
    width: 210px;
    height: 210px;
    animation-duration: 16s;
}

.projects .projects-bg span:nth-child(5) {
    bottom: 18%;
    left: 48%;
    width: 90px;
    height: 90px;
    animation-duration: 10s;
}

@keyframes projectsFloat {
    0% {
        transform: translate3d(0, 0, 0) scale(1);
        opacity: 0.35;
    }

    50% {
        transform: translate3d(35px, -45px, 0) scale(1.15);
        opacity: 0.75;
    }

    100% {
        transform: translate3d(0, 0, 0) scale(1);
        opacity: 0.35;
    }
}

/* Tablet */
@media (max-width: 992px) {
    .projects {
        padding: 85px 18px;
    }

    .projects h2 {
        font-size: 38px;
    }

    .projects .project-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .projects .project-image {
        height: 220px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .projects {
        padding: 70px 16px;
    }

    .projects .projects-header {
        margin-bottom: 38px;
    }

    .projects .eyebrow {
        font-size: 12px;
        letter-spacing: 2px;
    }

    .projects h2 {
        font-size: 32px;
    }

    .projects .projects-subtitle {
        font-size: 15px;
    }

    .projects .project-grid {
        grid-template-columns: 1fr;
        gap: 22px;
        min-height: auto;
    }

    .projects .project-image {
        height: 215px;
    }

    .projects .project-content {
        padding: 21px;
    }

    .projects .project-content h3 {
        font-size: 20px;
    }

    .projects .projects-pagination {
        flex-wrap: wrap;
        gap: 10px;
        margin-top: 35px;
    }

    .projects .pagination-btn,
    .projects .pagination-number {
        min-width: 40px;
        height: 40px;
        padding: 0 13px;
        font-size: 13px;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .projects {
        padding: 60px 14px;
    }

    .projects h2 {
        font-size: 28px;
    }

    .projects .project-image {
        height: 195px;
    }

    .projects .project-content {
        padding: 18px;
    }

    .projects .pagination-numbers {
        gap: 7px;
    }

    .projects .projects-bg span {
        opacity: 0.35;
    }
}