/* Page transitions */
.page-transition {
    animation: fadeIn var(--transition-base);
}

/* Active navigation styles */
.nav-link.active {
    color: var(--secondary-color);
}

.nav-link.active::after {
    width: 100%;
}

/* Portfolio specific styles */
.portfolio-filter {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    justify-content: center;
    flex-wrap: wrap;
}

.portfolio-item {
    transition: opacity var(--transition-base);
}

.portfolio-image {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
}

.portfolio-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform var(--transition-base);
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.05);
}

.portfolio-content {
    padding: var(--spacing-sm);
    text-align: center;
}

/* Projects page styles */
.project-filter {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xl);
    flex-wrap: wrap;
}

/* Projects page styles */
.projects-section {
    padding: var(--spacing-3xl) 0;
    min-height: calc(100vh - 200px);
}

.projects-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.projects-header h1 {
    font-size: var(--font-4xl);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--spacing-xs);
    color: var(--text-color);
}

.projects-header p {
    color: var(--text-secondary);
    font-size: var(--font-md);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--spacing-lg);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.project-card {
    background: var(--bg-alt);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.project-image {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
    background: var(--bg-alt);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

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

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-base);
}

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

.project-actions {
    display: flex;
    gap: var(--spacing-sm);
}

.action-btn {
    width: 48px;
    height: 48px;
    background: var(--bg-alt);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
}

.action-btn:hover {
    background: var(--primary-color);
    color: var(--bg-color);
    transform: scale(1.1);
}

.project-info {
    padding: var(--spacing-md);
}

.project-info h3 {
    font-size: var(--font-lg);
    font-weight: var(--font-weight-semibold);
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.project-info p {
    color: var(--text-secondary);
    font-size: var(--font-sm);
    line-height: var(--line-height-relaxed);
}

.project-type {
    color: var(--secondary-color);
    font-weight: var(--font-weight-medium);
    margin: var(--spacing-xs) 0;
}

.project-description {
    margin: var(--spacing-sm) 0;
    color: var(--text-light);
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin: var(--spacing-md) 0;
}

.tech-tag {
    background-color: var(--border-color);
    color: var(--text-color);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: var(--font-sm);
}

.project-links {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

/* Contact page specific styles */
.contact-info .card {
    height: 100%;
}

.contact-details {
    margin: var(--spacing-md) 0;
}

.contact-item {
    margin-bottom: var(--spacing-sm);
}

.contact-item h4 {
    color: var(--secondary-color);
    margin-bottom: var(--spacing-xs);
}

.social-links {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

/* Skills section styles */
.skills-grid {
    display: grid;
    gap: var(--spacing-md);
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.skill-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
}

.skill-card h4 {
    color: var(--secondary-color);
    margin-bottom: var(--spacing-sm);
}

.skill-list {
    list-style: none;
}

.skill-list li {
    padding: var(--spacing-xs) 0;
    border-bottom: 1px solid var(--border-color);
}

.skill-list li:last-child {
    border-bottom: none;
}

/* Footer improvements */
.footer-section h3, .footer-section h4 {
    margin-bottom: var(--spacing-md);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: var(--spacing-xs);
}

.footer-section ul li a {
    transition: color var(--transition-base);
}

.footer-section ul li a:hover {
    color: var(--secondary-color);
}

/* Responsive improvements */
@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: var(--spacing-md);
    }
}

@media (max-width: 768px) {
    .grid-2 {
        gap: var(--spacing-lg);
    }
    
    .portfolio-filter {
        flex-direction: column;
        align-items: stretch;
    }
    
    .contact-info {
        order: 2;
    }
    
    .contact-form-container {
        order: 1;
    }
    
    .projects-section {
        padding: var(--spacing-xl) 0;
    }
    
    .projects-header {
        margin-bottom: var(--spacing-xl);
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
        padding: 0 var(--spacing-sm);
    }
    
    .project-filter {
        flex-direction: column;
        align-items: stretch;
    }
    
    .project-links {
        flex-direction: column;
    }
    
    .project-card {
        max-width: 100%;
        margin: 0 auto;
    }
    
    .project-image {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .projects-section {
        padding: var(--spacing-lg) 0;
    }
    
    .projects-grid {
        padding: 0 var(--spacing-xs);
    }
}