/* ============================================================
   PROJECTS.CSS — Projects Page
   Benjamin Yew's Portfolio
   ============================================================ */

#projects {
    background-color: var(--bg-primary);
    min-height: calc(100vh - 70px);
    padding-bottom: 100px;
}

/* ── Banner ── */
.projects-banner {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #0f172a 100%);
    border-bottom: 1px solid var(--border);
    padding: 72px 0 56px;
    position: relative;
    overflow: hidden;
}

.projects-banner::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.07) 0%, transparent 70%);
    top: -100px;
    right: 10%;
    pointer-events: none;
}

.projects-banner-mono {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--accent);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.projects-banner-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 14px;
    line-height: 1.2;
}

.projects-banner-sub {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 520px;
    line-height: 1.8;
    margin-bottom: 0;
}

/* ── Body ── */
.projects-body {
    padding-top: 64px;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

/* ── Meta Row ── */
.project-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.project-year {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--accent);
    font-weight: 600;
}

/* ── Tags ── */
.project-tag {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: var(--radius-sm);
}

.tag-work  { background: rgba(56, 189, 248, 0.1);  color: var(--accent); border: 1px solid rgba(56,189,248,0.2); }
.tag-solo  { background: rgba(134,239,172, 0.1);   color: #86efac; border: 1px solid rgba(134,239,172,0.2); }
.tag-group { background: rgba(167,139,250, 0.1);   color: #a78bfa; border: 1px solid rgba(167,139,250,0.2); }

/* ── Featured Project ── */
.project-featured {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
    position: relative;
    transition: var(--transition);
}

.project-featured:hover {
    border-color: rgba(56, 189, 248, 0.3);
    box-shadow: var(--shadow-accent);
}

.project-featured-badge {
    position: absolute;
    top: -14px;
    left: 32px;
    background: var(--accent);
    color: var(--bg-primary);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 16px;
    border-radius: var(--radius-sm);
    letter-spacing: 0.3px;
}

.project-featured-inner {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 40px;
    align-items: start;
}

.project-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
    line-height: 1.3;
}

.project-org {
    font-size: 0.88rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.project-desc {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
}

/* ── Contributions ── */
.project-contributions {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin-bottom: 20px;
}

.contribution-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-family: var(--font-mono);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.contribution-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contribution-list li {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
    padding-left: 16px;
    position: relative;
}

.contribution-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 0.82rem;
}

/* ── Stack Tags ── */
.project-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.stack-tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.2);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
}

/* ── Note ── */
.project-note {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0;
}

.project-note i {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* ── Featured Image ── */
.project-featured-img {
    position: sticky;
    top: 90px;
}

/* ── Image Placeholder ── */
.img-placeholder {
    background: var(--bg-primary);
    border: 1px dashed var(--border);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 220px;
    color: var(--text-muted);
    text-align: center;
    padding: 24px;
}

.img-placeholder i {
    font-size: 2.5rem;
    color: var(--border);
}

.img-placeholder p {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin: 0;
}

.img-placeholder span {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* ── Project Cards Grid ── */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.project-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    border-color: rgba(56, 189, 248, 0.3);
    box-shadow: var(--shadow-accent);
    transform: translateY(-4px);
}

.project-card-img {
    height: 160px;
    overflow: hidden;
}

.project-card-img .img-placeholder {
    height: 100%;
    min-height: unset;
    border: none;
    border-radius: 0;
    border-bottom: 1px dashed var(--border);
}

.project-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.project-card-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 16px;
    flex: 1;
}

/* ── Scroll Reveal ── */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .project-featured-inner {
        grid-template-columns: 1fr;
    }
    .project-featured-img {
        position: static;
    }
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
    .project-featured {
        padding: 28px 20px;
    }
}


/* ── Project Card Carousel ── */
.project-card-img {
    position: relative;
    height: 160px;
    overflow: hidden;
}

.project-carousel {
    position: relative;
    width: 100%;
    height: 100%;
}

.project-carousel-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

.project-carousel-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.project-carousel-img {
    width: 100%;
    height: 100%;
    object-fit: contain;  
    object-position: center;
    display: block;
    background: var(--bg-primary); 
}

.project-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(6px);
    border: 1px solid var(--border);
    color: var(--text-primary);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
    font-size: 0.75rem;
}

.project-carousel-btn:hover {
    background: rgba(56, 189, 248, 0.2);
    border-color: var(--accent);
    color: var(--accent);
}

.project-carousel-prev { left: 8px; }
.project-carousel-next { right: 8px; }

.project-carousel-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    z-index: 10;
}

.project-carousel-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: var(--transition);
}

.project-carousel-dot.active {
    background: var(--accent);
    width: 14px;
    border-radius: 3px;
}




