/* Portfolio-specific styles */
.portfolio-hero {
    min-height: auto;
    padding: 10rem 2rem 4rem;
    text-align: center;
}

.portfolio-hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--accent), var(--primary));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientFlow 3s linear infinite;
}

.portfolio-hero > p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 3rem;
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.filter-tab {
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-family: inherit;
    font-size: 0.95rem;
}

.filter-tab:hover,
.filter-tab.active {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
}

/* Portfolio Grid */
.portfolio-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 6rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

/* Project Cards - Style matching service cards */
.project-card {
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.project-card:hover::before {
    transform: translateX(100%);
}

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
}

/* Card category colors on hover */
.project-card.cat-neural:hover { border-color: var(--neural-color); box-shadow: 0 30px 60px rgba(139, 92, 246, 0.2); }
.project-card.cat-bot:hover { border-color: var(--bots-color); box-shadow: 0 30px 60px rgba(16, 185, 129, 0.2); }
.project-card.cat-web:hover { border-color: var(--web-color); box-shadow: 0 30px 60px rgba(236, 72, 153, 0.2); }
.project-card.cat-api:hover { border-color: var(--mobile-color); box-shadow: 0 30px 60px rgba(6, 182, 212, 0.2); }
.project-card.cat-crm:hover { border-color: var(--crm-color); box-shadow: 0 30px 60px rgba(245, 158, 11, 0.2); }
.project-card.cat-monitoring:hover { border-color: var(--infra-color); box-shadow: 0 30px 60px rgba(239, 68, 68, 0.2); }

.project-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.project-card:hover .project-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Icon gradients by category */
.project-card.cat-neural .project-icon { background: linear-gradient(135deg, var(--neural-color), #a78bfa); }
.project-card.cat-bot .project-icon { background: linear-gradient(135deg, var(--bots-color), #34d399); }
.project-card.cat-web .project-icon { background: linear-gradient(135deg, var(--web-color), #f472b6); }
.project-card.cat-api .project-icon { background: linear-gradient(135deg, var(--mobile-color), #67e8f9); }
.project-card.cat-crm .project-icon { background: linear-gradient(135deg, var(--crm-color), #fbbf24); }
.project-card.cat-monitoring .project-icon { background: linear-gradient(135deg, var(--infra-color), #f87171); }

.project-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text);
    position: relative;
    z-index: 1;
}

.project-card > p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    flex-grow: 1;
    font-size: 0.95rem;
    position: relative;
    z-index: 1;
}

/* Project Tags */
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.tag {
    padding: 0.4rem 0.85rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    cursor: pointer;
    user-select: none;
}

.tag:hover {
    transform: scale(1.1);
    filter: brightness(1.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.tag.neural { background: rgba(139, 92, 246, 0.15); color: var(--neural-color); border: 1px solid rgba(139, 92, 246, 0.3); }
.tag.bot { background: rgba(16, 185, 129, 0.15); color: var(--bots-color); border: 1px solid rgba(16, 185, 129, 0.3); }
.tag.web { background: rgba(236, 72, 153, 0.15); color: var(--web-color); border: 1px solid rgba(236, 72, 153, 0.3); }
.tag.api { background: rgba(6, 182, 212, 0.15); color: var(--mobile-color); border: 1px solid rgba(6, 182, 212, 0.3); }
.tag.crm { background: rgba(245, 158, 11, 0.15); color: var(--crm-color); border: 1px solid rgba(245, 158, 11, 0.3); }
.tag.monitoring { background: rgba(239, 68, 68, 0.15); color: var(--infra-color); border: 1px solid rgba(239, 68, 68, 0.3); }

/* Project Link Button */
.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.project-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: -1;
}

.project-link:hover::before {
    width: 300px;
    height: 300px;
}

.project-link:hover {
    color: white;
    border-color: var(--primary);
    transform: translateX(5px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.project-link svg {
    transition: transform 0.3s ease;
}

.project-link:hover svg {
    transform: translateX(5px);
}

/* Stats section for portfolio */
.portfolio-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}

.portfolio-stat {
    text-align: center;
}

.portfolio-stat-number {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.portfolio-stat-label {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

/* Animation keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .portfolio-hero {
        padding: 8rem 1rem 3rem;
    }

    .filter-tabs {
        gap: 0.5rem;
        padding: 0 1rem;
    }

    .filter-tab {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem 4rem;
    }

    .portfolio-stats {
        gap: 2rem;
    }

    .portfolio-stat-number {
        font-size: 2.5rem;
    }
}