/* Modal Styles */
.project-modal, .article-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 122, 0, 0.2);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    position: relative;
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: var(--gray-custom);
}

.modal-close:hover {
    background: rgba(255, 122, 0, 0.1);
    color: var(--secondary);
    transform: rotate(90deg);
}

.modal-category {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    display: block;
}

.modal-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin: 0;
    line-height: 1.2;
}

.modal-body {
    padding: 2rem;
}

.project-description {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--gray-custom);
    margin-bottom: 2rem;
}

.project-impact {
    background: linear-gradient(135deg, 
        rgba(16, 185, 129, 0.1) 0%, 
        rgba(59, 130, 246, 0.1) 100%);
    padding: 1.5rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    border-left: 4px solid var(--secondary);
}

.project-impact h4 {
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.project-technologies h4 {
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 1rem;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    background: linear-gradient(135deg, var(--secondary), #ff9533);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.875rem;
    box-shadow: 0 4px 12px rgba(255, 122, 0, 0.3);
}

.project-cta {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    text-align: center;
}

/* Filter Styles */
.filter-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 122, 0, 0.2);
    padding: 0.75rem 1.5rem;
    border-radius: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--gray-custom);
    font-size: 0.9rem;
}

.filter-btn:hover {
    background: rgba(255, 122, 0, 0.1);
    border-color: var(--secondary);
    color: var(--secondary);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--secondary), #ff9533);
    color: white;
    border-color: var(--secondary);
    box-shadow: 0 8px 25px rgba(255, 122, 0, 0.4);
}

/* Project Preview Cards */
.category-projects {
    margin-top: 1.5rem;
    display: grid;
    gap: 1rem;
}

.project-preview {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 122, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.project-preview:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--secondary);
}

.project-preview h4 {
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.project-preview p {
    color: var(--gray-custom);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.project-tags .tag {
    background: rgba(255, 122, 0, 0.1);
    color: var(--secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Article Modal Specific Styles */
.article-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: relative;
}

.article-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--gray-custom);
    flex-wrap: wrap;
}

.article-category {
    background: linear-gradient(135deg, var(--secondary), #ff9533);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.article-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin: 0 0 1rem 0;
    line-height: 1.2;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.article-tag {
    background: rgba(255, 122, 0, 0.1);
    color: var(--secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
}

.article-content {
    padding: 2rem;
    line-height: 1.8;
    color: var(--gray-custom);
}

.article-content h1,
.article-content h2,
.article-content h3 {
    color: var(--primary);
    font-weight: 700;
    margin: 2rem 0 1rem 0;
}

.article-content h1 {
    font-size: 2rem;
}

.article-content h2 {
    font-size: 1.5rem;
}

.article-content h3 {
    font-size: 1.25rem;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content strong {
    color: var(--primary);
    font-weight: 700;
}

.article-footer {
    padding: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.9) 0%, 
        rgba(248, 250, 252, 0.9) 100%);
}

.article-cta {
    text-align: center;
}

.article-cta h4 {
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

/* Stats Animation Styles */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.stat-item {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    border: 1px solid rgba(255, 122, 0, 0.1);
    transition: all 0.4s ease;
}

.stat-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--gray-custom);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-content {
        margin: 1rem;
        max-height: 85vh;
        border-radius: 16px;
    }
    
    .modal-header,
    .modal-body,
    .article-header,
    .article-content,
    .article-footer {
        padding: 1.5rem;
    }
    
    .article-title,
    .modal-title {
        font-size: 1.75rem;
    }
    
    .filter-container {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
    
    .filter-btn {
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .stat-item {
        padding: 1.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}