/* =========================================
   PROJECTS SECTION
========================================= */

.projects {
    position: relative;
    width: 100%;
    min-height: 100vh;
    padding: 140px 8% 100px;
    box-sizing: border-box;
    z-index: 1;
}


/* =========================================
   PROJECT HEADER
========================================= */

.projects-header {
    position: relative;
    z-index: 5;
    text-align: center;
    margin-bottom: 60px;
}

.projects-header h2 {
    margin: 0;
    font-size: 3rem;
    line-height: 1.2;
    color: #ffffff;
}

.projects-header p {
    margin: 15px auto 0;
    max-width: 650px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 18px;
    line-height: 1.6;
}


/* =========================================
   PROJECT GRID
========================================= */

.projects-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
    align-items: stretch;
}


/* =========================================
   PROJECT CARD
========================================= */

.project-card {
    position: relative;

    display: flex;
    flex-direction: column;

    width: 100%;
    min-width: 0;
    min-height: 680px;

    overflow: hidden;
    box-sizing: border-box;

    background: rgba(255, 255, 255, 0.05);

    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 25px;

    transition:
        transform 0.4s ease,
        box-shadow 0.4s ease;

    animation: projectFloat 5s ease-in-out infinite;
}


/* =========================================
   GRADIENT BORDER
========================================= */

.project-card::before {
    content: "";

    position: absolute;
    inset: 0;

    padding: 1px;

    border-radius: 25px;

    background: linear-gradient(
        130deg,
        rgba(0, 191, 255, 0.6),
        transparent,
        rgba(123, 77, 255, 0.6)
    );

    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);

    -webkit-mask-composite: xor;
    mask-composite: exclude;

    opacity: 0;

    pointer-events: none;

    transition: opacity 0.4s ease;
}

.project-card:hover::before {
    opacity: 1;
}


/* =========================================
   LIGHT SWEEP
========================================= */

.project-card::after {
    content: "";

    position: absolute;

    top: -120%;
    left: -40%;

    width: 40%;
    height: 250%;

    background: rgba(255, 255, 255, 0.08);

    transform: rotate(25deg);

    transition: left 0.8s ease;

    pointer-events: none;
}

.project-card:hover::after {
    left: 120%;
}


/* =========================================
   HOVER EFFECT
========================================= */

.project-card:hover {
    transform: translateY(-10px);

    box-shadow:
        0 0 25px rgba(0, 191, 255, 0.3),
        0 0 60px rgba(123, 77, 255, 0.2);
}


/* =========================================
   FLOAT ANIMATION
========================================= */

@keyframes projectFloat {

    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }

    100% {
        transform: translateY(0);
    }

}


/* =========================================
   PROJECT IMAGE
========================================= */

.project-image {
    position: relative;

    width: 100%;
    height: 220px;

    flex-shrink: 0;

    overflow: hidden;

    z-index: 1;
}

.project-image img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.06);
}


/* =========================================
   PROJECT INFORMATION
========================================= */

.project-info {
    position: relative;

    z-index: 2;

    display: flex;
    flex-direction: column;

    flex: 1;

    padding: 25px;
}


/* =========================================
   PROJECT TITLE
========================================= */

.project-info h3 {
    margin: 0 0 15px;

    padding: 0;

    text-align: center;

    font-size: 1.45rem;
    line-height: 1.3;

    font-weight: 700;

    color: #5acd71;
}


/* =========================================
   PROJECT DESCRIPTION
========================================= */

.project-info p {
    margin: 0;

    min-height: 75px;

    color: #00ffff;

    font-size: 14px;
    line-height: 1.6;

    font-weight: 600;
}


/* =========================================
   TECHNOLOGY STACK
========================================= */

.tech {
    display: flex;

    flex-wrap: wrap;

    align-content: flex-start;

    gap: 8px;

    margin-top: 20px;

    min-height: 190px;
}

.tech span {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding: 7px 13px;

    border-radius: 30px;

    background: rgba(0, 191, 255, 0.12);

    color: #7ed7ff;

    border: 1px solid rgba(0, 191, 255, 0.3);

    font-size: 13px;
    line-height: 1;

    margin: 0;

    white-space: nowrap;

    transition:
        background 0.3s ease,
        transform 0.3s ease;
}

.tech span:hover {
    background: rgba(0, 191, 255, 0.25);

    transform: translateY(-3px);
}


/* =========================================
   PROJECT BUTTONS
========================================= */

.project-links {
    display: flex;

    gap: 12px;

    margin-top: auto;

    padding-top: 25px;
}

.project-links a {
    flex: 1;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 9px;

    padding: 11px 15px;

    border-radius: 50px;

    text-decoration: none;

    font-weight: 600;

    font-size: 14px;

    color: white;

    border: 1px solid rgba(255, 255, 255, 0.15);

    background: rgba(255, 255, 255, 0.05);

    transition:
        transform 0.35s ease,
        background 0.35s ease,
        color 0.35s ease,
        border-color 0.35s ease,
        box-shadow 0.35s ease;
}

.project-links a i {
    font-size: 16px;
}


/* =========================================
   GITHUB BUTTON
========================================= */

.github-btn:hover {
    background: #24292e;

    border-color: #24292e;

    transform: translateY(-4px);

    box-shadow:
        0 0 20px rgba(36, 41, 46, 0.6);
}


/* =========================================
   LIVE BUTTON
========================================= */

.live-btn:hover {
    background: #00bfff;

    color: #000;

    border-color: #00bfff;

    transform: translateY(-4px);

    box-shadow:
        0 0 20px rgba(0, 191, 255, 0.7);
}


/* =========================================
   LARGE TABLET
========================================= */

@media (max-width: 1100px) {

    .projects {
        padding: 130px 40px 90px;
    }

    .projects-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));

        gap: 30px;
    }

    .project-card {
        min-height: 680px;
    }

}


/* =========================================
   TABLET / MOBILE
========================================= */

@media (max-width: 768px) {

    .projects {
        padding: 120px 20px 80px;
    }

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

    .projects-header h2 {
        font-size: 2.4rem;
    }

    .projects-header p {
        font-size: 16px;
    }

    .projects-grid {
        grid-template-columns: 1fr;

        gap: 30px;
    }

    .project-card {
        width: 100%;

        max-width: 700px;

        min-height: auto;

        margin: 0 auto;
    }

    .project-image {
        height: 220px;
    }

    .project-info {
        padding: 25px;
    }

    .project-info h3 {
        font-size: 1.5rem;
    }

    .project-info p {
        min-height: auto;
    }

    .tech {
        min-height: auto;

        gap: 8px;
    }

    .tech span {
        font-size: 14px;

        padding: 7px 13px;
    }

    .project-links {
        margin-top: 25px;

        padding-top: 0;

        flex-direction: column;

        gap: 12px;
    }

    .project-links a {
        width: 100%;

        flex: none;
    }

}


/* =========================================
   SMALL MOBILE
========================================= */

@media (max-width: 480px) {

    .projects {
        padding: 100px 15px 60px;
    }

    .projects-header h2 {
        font-size: 2rem;
    }

    .projects-header p {
        font-size: 14px;

        line-height: 1.6;
    }

    .project-card {
        border-radius: 20px;
    }

    .project-card::before {
        border-radius: 20px;
    }

    .project-image {
        height: 180px;
    }

    .project-info {
        padding: 20px;
    }

    .project-info h3 {
        font-size: 1.3rem;

        margin-bottom: 12px;
    }

    .project-info p {
        font-size: 14px;

        line-height: 1.6;
    }

    .tech {
        gap: 7px;
    }

    .tech span {
        font-size: 12px;

        padding: 6px 11px;
    }

    .project-links a {
        padding: 11px 18px;

        font-size: 14px;
    }

}