/* Projects Page Styles */
.projects-page {
    padding-top: 80px;
    background: var(--bg-light);
    scroll-behavior: smooth;
}

.projects-hero {
    min-height: 40vh;
    display: flex;
    align-items: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    position: relative;
    overflow: hidden;
    color: white;
}

/* Animated background effect */
.projects-hero::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.15) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.15) 75%,
        transparent 75%
    );
    background-size: 60px 60px;
    animation: heroPattern 30s linear infinite;
    opacity: 0.6;
}

@keyframes heroPattern {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Filter Buttons */
.projects-filter {
    padding: 2rem;
    text-align: center;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 25px;
    background: white;
    color: var(--text-dark);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    z-index: -1;
}

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

.filter-btn:hover,
.filter-btn.active {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(240, 128, 128, 0.2);
}

/* Projects Grid */
.projects-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    animation: cardAppear 0.6s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.project-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.project-content {
    padding: 1.8rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-content h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #2D3436;
}

.project-subtitle {
    color: #636E72;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.project-tech span {
    background: #F0F0F0;
    color: #2D3436;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    animation: tagAppear 0.4s ease backwards;
    transition: all 0.3s ease;
}

.project-tech span:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(240, 128, 128, 0.15);
    background: var(--primary);
    color: white;
}

@keyframes tagAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered animation for tech tags */
.project-tech span:nth-child(1) { animation-delay: 0.1s; }
.project-tech span:nth-child(2) { animation-delay: 0.2s; }
.project-tech span:nth-child(3) { animation-delay: 0.3s; }
.project-tech span:nth-child(4) { animation-delay: 0.4s; }

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    background: white;
    color: #2D3436;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.project-link:hover {
    background: #F08080;
    color: white;
}

/* Case Study Modal */
.case-study-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: 12px;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-dark);
}

/* Responsive Design */
@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-buttons {
        flex-direction: column;
    }
}

/* Project actions container */
.project-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    justify-content: flex-start;
}

/* Source code link styling */
.source-code-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    width: fit-content;
    min-width: 140px;
    justify-content: center;
}

.source-code-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(240, 128, 128, 0.2);
    opacity: 0.9;
}

/* Live demo link styling */
.live-demo-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: var(--secondary);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid var(--primary);
}

.live-demo-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(240, 128, 128, 0.2);
}

.source-code-link i,
.live-demo-link i {
    font-size: 0.9rem;
}

/* Remove overlay links */
.project-overlay {
    display: none;
}

/* Project details styling */
.project-details {
    margin: 1.2rem 0;
}

.project-details ul {
    list-style: none;
    padding: 0;
}

.project-details li {
    position: relative;
    padding-left: 1.2rem;
    margin-bottom: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}

.project-details li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

/* Adjust spacing */
.project-content {
    padding: 1.8rem;
}

.project-tech {
    margin-top: 1.5rem;
}

/* Enhanced Action Buttons */
.project-actions a {
    position: relative;
    overflow: hidden;
}

.project-actions a::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 60%);
    transform: translate(-100%, -100%) rotate(45deg);
    transition: 0.5s ease;
}

.project-actions a:hover::before {
    transform: translate(0, 0) rotate(45deg);
}

/* Loading animation for images */
.project-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: translateX(-100%);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

/* Enhanced Hero Section */
.projects-hero {
    min-height: 40vh;
    display: flex;
    align-items: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    position: relative;
    overflow: hidden;
}

/* Animated background effect */
.projects-hero::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.15) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.15) 75%,
        transparent 75%
    );
    background-size: 60px 60px;
    animation: heroPattern 30s linear infinite;
    opacity: 0.6;
}

@keyframes heroPattern {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Enhanced Filter Buttons */
.filter-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 25px;
    background: white;
    color: var(--text-dark);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    z-index: -1;
}

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

.filter-btn:hover,
.filter-btn.active {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(240, 128, 128, 0.2);
}

/* Enhanced Project Cards */
.project-card {
    animation: cardAppear 0.6s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

@keyframes cardAppear {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered animation for cards */
.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }
.project-card:nth-child(4) { animation-delay: 0.4s; }

/* Enhanced Project Image Hover */
.project-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.project-image img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

/* Enhanced Tech Tags */
.project-tech span {
    animation: tagAppear 0.4s ease backwards;
    transition: all 0.3s ease;
}

.project-tech span:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(240, 128, 128, 0.15);
    background: var(--primary);
    color: white;
}

@keyframes tagAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered animation for tech tags */
.project-tech span:nth-child(1) { animation-delay: 0.1s; }
.project-tech span:nth-child(2) { animation-delay: 0.2s; }
.project-tech span:nth-child(3) { animation-delay: 0.3s; }
.project-tech span:nth-child(4) { animation-delay: 0.4s; }

/* Enhanced Action Buttons */
.project-actions a {
    position: relative;
    overflow: hidden;
}

.project-actions a::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 60%);
    transform: translate(-100%, -100%) rotate(45deg);
    transition: 0.5s ease;
}

.project-actions a:hover::before {
    transform: translate(0, 0) rotate(45deg);
}

/* Smooth scroll behavior */
.projects-page {
    scroll-behavior: smooth;
}

/* Loading animation for images */
.project-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: translateX(-100%);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

/* Projects hero content styling */
.projects-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    text-align: left;
    position: relative;
    z-index: 1;
}

.projects-content h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.projects-content .lead {
    font-size: 1.2rem;
    opacity: 1;
    text-align: right;
    font-style: italic;
    margin-top: 1rem;
    animation: slideInFromRight 0.8s ease-out;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.projects-content .lead:hover {
    transform: translateY(-2px);
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Documentation link styling */
.docs-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: var(--secondary);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid var(--primary);
}

.docs-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(240, 128, 128, 0.2);
}

.docs-link i {
    font-size: 0.9rem;
} 