/* Portfolio Specific Styles */

/* Page Header */
.page-header {
    background: var(--gradient);
    padding: 120px 0 80px;
    text-align: center;
    color: var(--text-white);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="1" fill="%23ffffff" opacity="0.1"/></svg>');
    background-size: 50px 50px;
    animation: float 20s infinite linear;
}

.header-content {
    position: relative;
    z-index: 1;
}

.header-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: var(--text-white);
}

.header-content p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Portfolio Filters */
@media (max-width: 768px) {
    .page-header {
        padding: 100px 0 60px;
    }
    
    .page-header h1 {
        font-size: 2.8rem;
    }
    
    .header-content p {
        font-size: 1.1rem;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 2.2rem;
        line-height: 1.2;
    }
    
    .header-content p {
        font-size: 1.1rem;
    }
}

/* Portfolio Filters */
.portfolio-filters {
    padding: 80px 0 40px;
    background: var(--bg-secondary);
}

.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-btn {
    background: var(--bg-primary);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 14px 28px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: var(--shadow-sm);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: var(--text-white);
    transform: translateY(-3px);
    box-shadow: 0 0 15px rgba(165, 0, 0, 0.5);
}

/* Portfolio Grid */
.portfolio-grid {
    padding: 40px 0 80px;
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.project-card {
    background: var(--bg-primary);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    opacity: 1;
    transform: translateY(0);
    border: 1px solid var(--border-light);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.project-card.fade-out {
    opacity: 0;
    transform: translateY(30px) scale(0.8);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Enhanced card reveal animation */
.project-card {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.project-image {
    position: relative;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.project-icon {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    color: var(--text-white);
}

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

.project-card:hover .project-icon {
    transform: scale(1.2);
    color: rgba(255, 255, 255, 0.8);
}

.project-overlay h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.project-overlay p {
    font-size: 1rem;
    opacity: 0.9;
}

.project-content {
    padding: 25px;
}

.project-content h3 {
    font-size: 1.4rem;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.project-content p {
    color: var(--text-dark);
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.tag {
    background: var(--bg-tertiary);
    color: var(--primary-color);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid var(--border-light);
}

.project-client {
    color: var(--text-dark);
    font-size: 0.9rem;
    padding-top: 15px;
    border-top: 1px solid var(--border-light);
}

.project-client strong {
    color: var(--text-dark);
}

/* Portfolio Stats */
.portfolio-stats {
    background: var(--bg-primary);
    color: var(--text-dark);
    padding: 80px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    text-align: center;
}

.stat-item {
    background: var(--primary-color);
    padding: 40px 20px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

@keyframes countUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-number {
    font-size: 3rem;
    font-weight: bold;
    color: var(--text-white);
    margin-bottom: 10px;
    line-height: 1;
}

.stat-label {
    font-size: 1.1rem;
    color: var(--text-white);
}

/* CTA Section */
.cta-section {
    background: var(--gradient);
    color: var(--text-white);
    padding: 80px 0;
    text-align: center;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--text-white);
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.95;
    color: var(--text-white);
}

.cta-button {
    display: inline-block;
    background: var(--text-white);
    color: var(--primary-color);
    padding: 16px 40px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    background: var(--bg-secondary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2.5rem;
    }

    .header-content p {
        font-size: 1.1rem;
    }

    .projects-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .filter-buttons {
        justify-content: center;
        gap: 10px;
    }

    .filter-btn {
        padding: 10px 18px;
        font-size: 0.9rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .cta-section h2 {
        font-size: 2rem;
    }

    .cta-section p {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 100px 0 60px;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .header-content p {
        font-size: 1rem;
    }

    .project-content {
        padding: 20px;
    }

    .project-content h3 {
        font-size: 1.2rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-number {
        font-size: 2rem;
    }
}

/* Enhanced animations inspired by Keshav Infotech */
.project-card {
    animation: slideInUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform, opacity;
    backface-visibility: hidden;
}

@keyframes slideInUp {
    0% {
        opacity: 0;
        transform: translateY(60px) scale(0.95);
    }
    50% {
        opacity: 0.8;
        transform: translateY(-10px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Advanced stagger animation */
.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.15s; }
.project-card:nth-child(3) { animation-delay: 0.2s; }
.project-card:nth-child(4) { animation-delay: 0.25s; }
.project-card:nth-child(5) { animation-delay: 0.3s; }
.project-card:nth-child(6) { animation-delay: 0.35s; }
.project-card:nth-child(7) { animation-delay: 0.4s; }
.project-card:nth-child(8) { animation-delay: 0.45s; }
.project-card:nth-child(9) { animation-delay: 0.5s; }
.project-card:nth-child(10) { animation-delay: 0.55s; }

/* Card hover effects with advanced transforms */
.project-card:hover {
    transform: translateY(-15px) rotateY(5deg) scale(1.03);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
}

/* Project image advanced animations */
.project-image {
    overflow: hidden;
    position: relative;
}

.project-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        rgba(139, 0, 0, 0.1) 0%, 
        rgba(165, 42, 42, 0.2) 50%, 
        rgba(139, 0, 0, 0.1) 100%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.project-card:hover .project-image::before {
    transform: translateX(100%);
}

/* Icon pulse animation */
.project-icon {
    transition: all 0.3s ease;
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-5px) rotate(3deg); }
    50% { transform: translateY(-8px) rotate(0deg); }
    75% { transform: translateY(-5px) rotate(-3deg); }
}

.project-card:hover .project-icon {
    transform: scale(1.3) rotate(360deg);
    color: rgba(255, 255, 255, 1);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

/* Tag animation effects */
.tag {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.project-card:hover .tag::before {
    left: 100%;
}

.project-card:hover .tag {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(139, 0, 0, 0.3);
}

/* Filter button enhanced animations */
.filter-btn {
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    transition: all 0.4s ease;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.filter-btn:hover::before,
.filter-btn.active::before {
    width: 300px;
    height: 300px;
}

/* Statistics counter enhancement */
.stat-number {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: statGlow 2s ease-in-out infinite alternate;
}

@keyframes statGlow {
    0% { filter: brightness(1); }
    100% { filter: brightness(1.2); }
}

/* Project content animation */
.project-content {
    position: relative;
}

.project-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    transition: height 0.4s ease;
}

.project-card:hover .project-content::before {
    height: 100%;
}

/* Loading shimmer effect for cards */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.project-card.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Scroll reveal enhancement */
.project-card[data-reveal="true"] {
    opacity: 0;
    transform: translateY(50px) rotateX(10deg);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.project-card[data-reveal="true"].revealed {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
}
