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

/* Filter Buttons */
.filter-btn {
    padding: 10px 28px;
    border: 1.5px solid rgba(0,0,0,0.08);
    border-radius: 50px;
    background: rgba(255,255,255,0.5);
    backdrop-filter: blur(20px);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: -0.01em;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(217, 70, 239, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.filter-btn:hover::before {
    width: 200px;
    height: 200px;
}

.filter-btn:hover {
    background: rgba(255,255,255,0.7);
    border-color: rgba(217, 70, 239, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(217, 70, 239, 0.1);
}

.filter-btn.active {
    background: #D946EF;
    color: white;
    border-color: #D946EF;
    box-shadow: 0 8px 25px rgba(217, 70, 239, 0.3);
}

/* Projects Grid - Bento Layout */
#projects-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    grid-auto-flow: dense;
}

/* Card Sizes - Bento Grid */
.project-card-large {
    grid-column: span 8;
    grid-row: span 2;
}

.project-card-medium {
    grid-column: span 4;
    grid-row: span 1;
}

.project-card-small {
    grid-column: span 4;
    grid-row: span 1;
}

/* Responsive Grid */
@media (max-width: 1024px) {
    .project-card-large,
    .project-card-medium,
    .project-card-small {
        grid-column: span 6;
    }
}

@media (max-width: 768px) {
    #projects-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 0 4px;
    }

    .project-card-large,
    .project-card-medium,
    .project-card-small {
        grid-column: span 1;
        grid-row: span 1;
    }
}

/* Project Card Base */
.project-card {
    position: relative;
}

.project-card-inner {
    position: relative;
    height: 100%;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    overflow: hidden;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .project-card-inner {
    background: rgba(26, 26, 26, 0.5);
    border-color: rgba(255, 255, 255, 0.1);
}

.project-card-inner:hover {
    transform: scale(1.02);
}

/* Gradient Border */
.project-gradient-border {
    position: absolute;
    inset: -1px;
    border-radius: 24px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(217, 70, 239, 0.3), rgba(139, 92, 246, 0.3), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.project-card-inner:hover .project-gradient-border {
    opacity: 1;
}

/* Card Content */
.project-card-content {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    z-index: 2;
}

/* Image Container */
.project-image-container {
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.project-card-large .project-image-container {
    height: 350px;
}

.project-card-medium .project-image-container {
    height: 220px;
}

.project-card-small .project-image-container {
    height: 180px;
}

@media (max-width: 768px) {
    .project-card-large .project-image-container,
    .project-card-medium .project-image-container,
    .project-card-small .project-image-container {
        height: 220px;
    }
}

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

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.project-card-inner:hover .project-image {
    transform: scale(1.03);
}

.project-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.4) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.project-card-inner:hover .project-image-overlay {
    opacity: 1;
}

/* Status Badge */
.project-status {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--status-bg);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    border: 1px solid var(--status-color);
    z-index: 3;
}

.status-pulse {
    width: 6px;
    height: 6px;
    background: var(--status-color);
    border-radius: 50%;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.status-text {
    font-size: 11px;
    font-weight: 600;
    color: var(--status-color);
    letter-spacing: 0.02em;
}

/* Year Badge */
.project-year {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    color: white;
    z-index: 3;
}

/* Info Section */
.project-info {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.project-card-large .project-info {
    padding: 32px;
    gap: 16px;
}

.project-category {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #D946EF;
}

.project-title {
    font-family: 'Syne', sans-serif;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    transition: color 0.3s ease;
}

.project-card-large .project-title {
    font-size: 32px;
}

.project-card-inner:hover .project-title {
    color: #D946EF;
}

.project-description {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-card-large .project-description {
    font-size: 15px;
    -webkit-line-clamp: 4;
}

/* Tech Stack */
.project-tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.tech-tag {
    padding: 6px 14px;
    background: rgba(217, 70, 239, 0.08);
    border: 1px solid rgba(217, 70, 239, 0.2);
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.01em;
    transition: background 0.2s ease, border-color 0.2s ease;
}

[data-theme="dark"] .tech-tag {
    background: rgba(217, 70, 239, 0.12);
}

.project-card-inner:hover .tech-tag {
    background: rgba(217, 70, 239, 0.15);
    border-color: rgba(217, 70, 239, 0.4);
}

/* Project Link */
.project-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    position: relative;
    margin-top: 8px;
    width: fit-content;
    transition: color 0.3s ease;
}

.project-link:hover {
    color: #D946EF;
}

.link-icon {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-link:hover .link-icon {
    transform: translate(3px, -3px);
}

.link-underline {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #D946EF;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-link:hover .link-underline {
    width: 100%;
}
