/* =========================
   SECTION
========================= */
.projects {
    padding: 40px 0;
}

/* =========================
   FEATURED CARD
========================= */
.featured-card {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;

    padding: 30px;
    margin-bottom: 40px;

    border-radius: 16px;
    text-decoration: none;
    color: white;

    background: linear-gradient(145deg, #0f172a, #020617);
    border: 1px solid rgba(255,255,255,0.05);

    transition: 0.3s ease;
    position: relative;
    overflow: hidden;
}

.featured-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}

/* FEATURED VISUAL */
.featured-visual {
    border-radius: 12px;
    background: radial-gradient(circle at 30% 30%, rgba(34,197,94,0.25), transparent 60%),
                linear-gradient(135deg, #0f172a, #020617);
    position: relative;
    overflow: hidden;
}

/* =========================
   GRID
========================= */
.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

/* =========================
   CARD
========================= */
.project-card {
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: white;

    background: linear-gradient(145deg, #0f172a, #020617);
    border: 1px solid rgba(255,255,255,0.05);

    transition: 0.3s ease;
    position: relative;
}

.project-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 25px 60px rgba(0,0,0,0.5);
}

/* =========================
   VISUAL (REPLACES IMAGES)
========================= */
.card-visual {
    height: 180px;
    background: radial-gradient(circle at 20% 20%, rgba(34,197,94,0.2), transparent 60%),
                linear-gradient(135deg, #0f172a, #020617);
    position: relative;
}

/* GLOW LAYER */
.card-visual::before,
.featured-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(34,197,94,0.25), transparent 70%);
    opacity: 0;
    transition: 0.4s ease;
}

/* HOVER GLOW */
.project-card:hover .card-visual::before,
.featured-card:hover .featured-visual::before {
    opacity: 1;
}

/* =========================
   TEXT
========================= */
.project-card h3 {
    padding: 15px 15px 5px;
    font-weight: 600;
}

.project-card p {
    padding: 0 15px 15px;
    color: #22c55e;
    font-weight: 500;
}

/* =========================
   TOP ACCENT LINE
========================= */
.project-card::after,
.featured-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 2px;
    width: 100%;
    background: linear-gradient(90deg, transparent, #22c55e, transparent);
    opacity: 0;
    transition: 0.4s;
}

.project-card:hover::after,
.featured-card:hover::after {
    opacity: 1;
}

/* =========================
   SAFETY (REMOVE OLD IMAGES)
========================= */
.project-card img,
.featured-card img {
    display: none;
}

/* =========================
   POPUP
========================= */
.popup {
    position: fixed;
    inset: 0;
    background: rgba(2,6,23,0.85);

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

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    z-index: 9999;
}

.popup:target {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.popup-box {
    background: #0f172a;
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    position: relative;
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    text-decoration: none;
    color: white;
}

.highlight {
    color: #22c55e;
}

/* =========================
   POPUP CONTENT
========================= */
.popup-points {
    margin-top: 12px;
    padding-left: 18px;
    color: #94a3b8;
    font-size: 14px;
}

.popup-points li {
    margin-bottom: 6px;
}

.popup-actions {
    margin-top: 18px;
}

.github-btn {
    display: inline-block;
    padding: 10px 18px;

    background: #22c55e;
    color: #020617;

    text-decoration: none;
    font-size: 14px;
    font-weight: 600;

    border-radius: 8px;

    transition: 0.3s ease;
}

.github-btn:hover {
    background: #16a34a;
    transform: translateY(-2px);
}


/* VARIATION PER CARD */
.project-card:nth-child(1) .card-visual {
    background: radial-gradient(circle at 20% 20%, rgba(34,197,94,0.25), transparent 60%),
                linear-gradient(135deg, #0f172a, #020617);
}

.project-card:nth-child(2) .card-visual {
    background: radial-gradient(circle at 70% 30%, rgba(59,130,246,0.25), transparent 60%),
                linear-gradient(135deg, #0f172a, #020617);
}

.project-card:nth-child(3) .card-visual {
    background: radial-gradient(circle at 50% 50%, rgba(168,85,247,0.25), transparent 60%),
                linear-gradient(135deg, #0f172a, #020617);
}

.project-card:nth-child(4) .card-visual {
    background: radial-gradient(circle at 30% 70%, rgba(251,191,36,0.25), transparent 60%),
                linear-gradient(135deg, #0f172a, #020617);
}


/* =========================
   ANIMATED GRADIENT SYSTEM
========================= */

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* BASE VISUAL */
.card-visual {
    height: 180px;
    position: relative;
    overflow: hidden;
    border-radius: 0;

    background-size: 200% 200%;
    animation: gradientMove 6s ease infinite;
}

/* DIFFERENT STYLES PER CARD */
.project-card:nth-child(1) .card-visual {
    background-image: linear-gradient(135deg, #22c55e, #020617, #22c55e);
}

.project-card:nth-child(2) .card-visual {
    background-image: linear-gradient(135deg, #3b82f6, #020617, #3b82f6);
}

.project-card:nth-child(3) .card-visual {
    background-image: linear-gradient(135deg, #a855f7, #020617, #a855f7);
}

.project-card:nth-child(4) .card-visual {
    background-image: linear-gradient(135deg, #f59e0b, #020617, #f59e0b);
}

/* =========================
   FLOATING LIGHT EFFECT
========================= */
.card-visual::after {
    content: "";
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;

    background: radial-gradient(circle, rgba(255,255,255,0.08), transparent 60%);
    transform: rotate(25deg);
    opacity: 0.4;
    transition: 0.5s;
}

/* HOVER LIGHT SHIFT */
.project-card:hover .card-visual::after {
    transform: rotate(25deg) translateX(20px) translateY(-20px);
    opacity: 0.6;
}

/* =========================
   FEATURED CARD ANIMATION
========================= */

.featured-visual {
    background: linear-gradient(135deg, #22c55e, #020617, #22c55e);
    background-size: 200% 200%;
    animation: gradientMove 8s ease infinite;
    border-radius: 12px;
}

/* =========================
   HOVER INTENSITY BOOST
========================= */

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}

.featured-card:hover {
    transform: translateY(-8px) scale(1.02);
}