/* PROJECTS */
.projects { background-color: #ffffff; }
.projects .container { max-width: 1400px; margin: 0 auto; padding: 0 100px; }
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; align-items: stretch; }
@media (max-width: 1200px) { .projects-grid { grid-template-columns: repeat(2, 1fr); } }

/* Reduce side padding on smaller screens to remove left/right gaps */
@media (max-width: 1024px) {
    .projects .container { padding: 0 48px; }
}

@media (max-width: 768px) {
    .projects .container { padding: 0 20px; }
}

@media (max-width: 480px) {
    .projects .container { padding: 0 12px; }
}

/* Filters toolbar */
.projects-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0 2rem; align-items: center; }
.filter-chip { border: 1px solid #e5e7eb; background: #fff; color: #374151; padding: 8px 14px; border-radius: 999px; font-size: 0.9rem; cursor: pointer; transition: all 0.2s ease; }
.filter-chip:hover { background: #f3f4f6; }
.filter-chip.active, .filter-chip[aria-pressed="true"] { background: #111827; color: #fff; border-color: #111827; }

/* Project visibility control */
.project-card[data-project] {
    display: none;
}

.project-card[data-project="1"],
.project-card[data-project="2"],
.project-card[data-project="3"],
.project-card[data-project="4"],
.project-card[data-project="5"],
.project-card[data-project="6"] {
    display: flex;
}

/* Load more button */
.projects-load-more {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.load-more-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.load-more-btn:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.load-more-btn i {
    transition: transform 0.3s ease;
}

.load-more-btn.expanded i {
    transform: rotate(180deg);
}

/* Responsive design for load more button */
@media (max-width: 768px) {
    .load-more-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .projects-load-more {
        margin-top: 1.5rem;
    }
}
.project-card { background: #ffffff; border-radius: 14px; box-shadow: 0 6px 16px rgba(17, 24, 39, 0.06); border: 1px solid #e5e7eb; transition: transform 0.25s ease, box-shadow 0.25s ease; display: flex; flex-direction: column; height: 100%; overflow: hidden; padding: 0; position: relative; }
.project-media { width: 100%; aspect-ratio: 16/9; background: #f3f4f6; overflow: hidden; margin: 0; border-radius: 14px 14px 0 0; }
.project-image { width: 100%; height: 100%; }
.project-image img { width: 100%; height: 100%; object-fit: cover; display: block; object-position: center; transition: transform 0.35s ease; }
.project-video { width: 100%; height: 100%; display: block; background: #000; transition: transform 0.35s ease; }
.project-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(17, 24, 39, 0.12); }
.project-card:hover .project-image img, .project-card:hover .project-video { transform: scale(1.03); }
.project-header { margin: 0; padding: 0.9rem 1rem 0; border: none; }
.project-header h3 { color: #0f172a; font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; }
.project-date { color: #6b7280; font-size: 0.85rem; padding: 4px 12px; }
.project-content { flex: 1; display: flex; flex-direction: column; gap: 0.65rem; padding: 0.75rem 1rem 1rem; }
.project-summary p { display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.project-content p { color: #4b5563; margin-bottom: 0.5rem; line-height: 1.6; }
.project-content h4 { color: #374151; font-size: 1.1rem; font-weight: 600; margin: 1rem 0 0.4rem 0; }
.project-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.see-more-btn { background: transparent; color: #111827; border: 1px solid #e5e7eb; padding: 6px 12px; border-radius: 8px; font-size: 0.9rem; font-weight: 500; cursor: pointer; transition: all 0.2s ease; display: flex; align-items: center; gap: 0.4rem; }
.see-more-btn:hover { background: #f3f4f6; }
.see-more-btn:focus { outline: 2px solid #2563eb; outline-offset: 2px; }
/* quick-view removed */
.project-content ul { margin-left: 1.5rem; color: #4b5563; }
.project-content li { margin-bottom: 0.5rem; }
.tech-stack { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.1rem; margin-bottom: 0.25rem; }
.project-demo { position: absolute; top: 10px; right: 10px; display: flex; gap: 10px; z-index: 2; margin: 0; justify-content: flex-end; }
.demo-link { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #ffffff; text-decoration: none; border-radius: 999px; font-size: 1rem; transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease; cursor: pointer; box-shadow: 0 6px 14px rgba(102, 126, 234, 0.35); border: 1px solid rgba(255,255,255,0.6); }
.demo-link:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(102, 126, 234, 0.45); filter: saturate(1.1); }
.demo-link:focus { outline: 2px solid #2563eb; outline-offset: 2px; }
.demo-link i { font-size: 1.05rem; }
.demo-link span { display: none; }
.project-summary { margin-bottom: 0rem; }
.project-summary p { color: #4b5563; font-size: 1rem; line-height: 1.6; }
.project-details { margin-top: 0rem; }
@media (max-width: 640px) {
    .project-media { width: 100%; border-radius: 0; }
}

/* Modal */
.project-modal { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; z-index: 1000; }
.project-modal[aria-hidden="false"] { display: flex; }
.project-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(2px); }
.project-modal-content { position: relative; width: min(920px, 92vw); max-height: 86vh; background: #fff; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,0.25); overflow: hidden; display: flex; flex-direction: column; }
.project-modal-close { position: absolute; top: 10px; right: 10px; border: none; background: #111827; color: #fff; width: 36px; height: 36px; border-radius: 999px; display: grid; place-items: center; cursor: pointer; }
.project-modal-body { padding: 1rem 1.25rem 1.25rem; overflow: auto; }
.project-modal-body h3 { margin: 0 0 0.5rem; }
.project-modal-media { aspect-ratio: 16/9; background: #f1f5f9; border-radius: 8px; overflow: hidden; }
.project-modal-media img, .project-modal-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.project-modal-summary { color: #4b5563; margin: 0.75rem 0; }
.project-modal-details { margin-top: 0.5rem; }
.project-modal-actions { display: flex; gap: 0.75rem; margin-top: 0.75rem; flex-wrap: wrap; }
