.projects-wrap {
    width: min(1220px, calc(100% - 24px));
    margin: 0 auto;
    padding: .5rem 0 0rem;
    position: relative;
    z-index: 2;
}

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

.project-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(9,15,28,.72);
    backdrop-filter: blur(10px);
    box-shadow: 0 14px 32px rgba(0,0,0,.20);
    transition: .25s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    border-color: rgba(86,215,255,.25);
    box-shadow: 0 20px 40px rgba(0,0,0,.28);
}

.project-card.featured {
    display: grid;
    grid-template-columns: 1.05fr .9fr;
    margin-bottom: 1rem;
}

.project-preview {
    position: relative;
    min-height: 320px;
    padding: .95rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background:
        linear-gradient(180deg, rgba(6,10,20,.08), rgba(6,10,20,.88)),
        radial-gradient(circle at 12% 20%, rgba(0,212,255,.15), transparent 28%),
        radial-gradient(circle at 80% 18%, rgba(142,84,233,.16), transparent 26%),
        linear-gradient(135deg, #09111f 0%, #121b31 100%);
}

.project-preview-sm {
    min-height: 190px;
}

.project-preview::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: .45;
}

.project-meta,
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    position: relative;
    z-index: 1;
}

.project-actions {
    display: flex;
    gap: .7rem;
    width: 100%;
    margin-top: auto;
    padding-top: .2rem;
    position: relative;
    z-index: 1;
}

.project-actions .btn-project {
    flex: 1 1 0;
    min-width: 0;
}

.pill,
.chip,
.btn-project {
    color: #fff;
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(255,255,255,.04);
}

.pill,
.chip {
    min-height: 20px;
    padding: 0 .75rem;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: .7rem;
    line-height: 1;
}

.pill {
    font-weight: 600;
}

.pill-accent {
    color: #7fe7ff;
    border-color: rgba(0,212,255,.22);
    background: rgba(0,212,255,.11);
}

.chip {
    font: .62rem/1 "Fira Code", monospace;
}

.project-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    gap: .85rem;
    padding: 1.1rem;
}

.project-title {
    margin: 0;
    color: #fff;
    font-size: 1.08rem;
    line-height: 1.2;
    font-weight: 700;
}

.project-title-lg {
    font-size: clamp(1.9rem, 2.6vw, 2.9rem);
    line-height: 1.05;
    letter-spacing: -.02em;
}

.project-text {
    margin: 0;
    color: rgba(255,255,255,.72);
    font-size: .96rem;
    line-height: 1.65;
    min-height: 4.8rem;
    overflow: hidden;
    hyphens: auto;
}

.preview-note {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: .32rem;
    color: #fff;
}

.preview-note span {
    color: var(--secondary);
    font-size: .78rem;
    font-weight: 700;
}

.preview-note strong {
    font-size: 1rem;
    line-height: 1.3;
}

.play-btn {
    width: 68px;
    height: 68px;
    align-self: center;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    z-index: 1;
    background: linear-gradient(135deg, #a45cff 0%, #ff8d75 100%);
    box-shadow: 0 12px 26px rgba(164,92,255,.22);
    transition: .25s ease;
}

.play-btn:hover {
    transform: scale(1.03);
}

.play-btn-sm {
    width: 54px;
    height: 54px;
}

.play-icon {
    width: 0;
    height: 0;
    margin-left: 4px;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 12px solid #141414;
}

.btn-project {
    min-height: 34px;
    padding: 0 .8rem;
    border-radius: 12px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    font-size: .78rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0;
    transition: .22s ease;
}

.btn-project:hover {
    color: var(--secondary);
    border-color: var(--secondary);
    transform: translateY(-1px);
}

.btn-project-primary {
    background: linear-gradient(135deg, #18c7f0 0%, #4f7cff 100%);
    border-color: transparent;
}

.btn-project-primary:hover {
    color: #fff;
    border-color: transparent;
    filter: brightness(1.05);
}

.project-code {
    padding: .95rem 1rem;
    border-radius: 16px;
    background: rgba(3,7,16,.78);
    border: 1px solid rgba(255,255,255,.07);
    overflow-x: auto;
}

.project-code pre {
    margin: 0;
    color: rgba(255,255,255,.88);
    font: .82rem/1.6 "Fira Code", monospace;
}

@media (max-width: 1100px) {
    .project-card.featured {
        grid-template-columns: 1fr;
    }

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

    .project-preview {
        min-height: 270px;
    }
}

@media (max-width: 768px) {
    .projects-wrap {
        width: calc(100% - 16px);
    }

    .projects-head .name-glow {
        font-size: 1.7rem;
    }

    .projects-lead {
        font-size: .72rem;
        line-height: 1.55;
    }

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

    .project-card,
    .project-card.featured {
        border-radius: 17px;
    }

    .project-preview,
    .project-body {
        padding: .95rem;
    }

    .project-preview {
        min-height: 220px;
    }

    .project-preview-sm {
        min-height: 168px;
    }

    .project-title {
        font-size: 1rem;
    }

    .project-title-lg {
        font-size: 1.8rem;
        line-height: 1.08;
    }

    .project-text {
        font-size: .9rem;
        line-height: 1.58;
    }

    .preview-note strong {
        font-size: .96rem;
    }

    .preview-note span,
    .pill,
    .chip {
        min-height: 18px;
        font-size: .65rem;
        padding: 0 .6rem;
    }

    .project-actions {
        gap: .55rem;
    }

    .btn-project {
        min-height: 32px;
        padding: 0 .72rem;
        font-size: .76rem;
    }

    .play-btn {
        width: 60px;
        height: 60px;
    }

    .play-btn-sm {
        width: 48px;
        height: 48px;
    }

    .project-code pre {
        font-size: .74rem;
    }
}

.project-actions {
    display: flex;
    gap: .7rem;
    width: 100%;
    margin-top: auto;
    padding-top: .85rem;
    border-top: 1px solid rgba(255,255,255,.08);
    position: relative;
    z-index: 1;
}

