/* 
   AI Journey Timeline and Project Showcase Styles
   Author: Manus AI
   Date: April 4, 2025
*/

/* ===== AI JOURNEY SECTION ===== */
.ai-journey {
    padding: var(--spacing-xl) 0;
    background: linear-gradient(135deg, #1a2a6c 0%, #b21f1f 50%, #fdbb2d 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.ai-journey::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect fill="none" width="100" height="100"/><path fill="rgba(255,255,255,0.05)" d="M30,10L70,10L70,90L30,90Z"/><circle fill="rgba(255,255,255,0.05)" cx="50" cy="50" r="30"/><path fill="rgba(255,255,255,0.05)" d="M10,30L90,30L90,70L10,70Z"/></svg>');
    opacity: 0.1;
}

.ai-journey .section-title {
    color: white;
}

.ai-journey .section-title::after {
    background-color: white;
}

/* Timeline Container */
.timeline-container {
    position: relative;
    padding: var(--spacing-xl) 0;
}

/* Horizontal Timeline */
.timeline-horizontal {
    position: relative;
    width: 100%;
    margin: 0 auto;
    height: 400px;
    overflow-x: auto;
    overflow-y: hidden;
}

.timeline-horizontal::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%);
}

.timeline-track {
    display: flex;
    position: relative;
    min-width: 1200px;
    height: 100%;
}

.timeline-item {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 var(--spacing-md);
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-top: 60px;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-bottom: 60px;
    order: -1;
}

.timeline-dot {
    position: absolute;
    top: 50%;
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 50%;
    transform: translateY(-50%);
    z-index: 2;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.timeline-dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    transition: all var(--transition-normal);
}

.timeline-item.active .timeline-dot {
    background-color: var(--accent-color);
    transform: translateY(-50%) scale(1.2);
}

.timeline-item.active .timeline-dot::before {
    background-color: rgba(255, 107, 107, 0.3);
    width: 50px;
    height: 50px;
}

.timeline-content {
    background-color: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    padding: var(--spacing-md);
    border-radius: var(--border-radius-md);
    width: 100%;
    max-width: 300px;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.timeline-item.active .timeline-content {
    transform: scale(1.05);
    background-color: rgba(0, 0, 0, 0.4);
}

.timeline-date {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: var(--spacing-xs);
}

.timeline-title {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
    color: white;
}

.timeline-description {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--spacing-sm);
}

.timeline-tech {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-sm);
}

.timeline-tech-tag {
    padding: 0.15rem 0.4rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-sm);
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.9);
}

.timeline-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: var(--spacing-sm);
    font-size: 1.5rem;
    color: white;
}

/* Timeline Navigation */
.timeline-nav {
    display: flex;
    justify-content: center;
    margin-top: var(--spacing-lg);
    gap: var(--spacing-md);
}

.timeline-nav-btn {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.timeline-nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.timeline-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== AI PROJECT SHOWCASE ===== */
.ai-projects {
    padding: var(--spacing-xl) 0;
    background-color: var(--bg-light);
}

.ai-project-card {
    background-color: var(--bg-color);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.ai-project-badge {
    position: absolute;
    top: 0;
    right: 0;
    background-color: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-bottom-left-radius: var(--border-radius-sm);
    z-index: 1;
}

.ai-project-header {
    padding: var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.ai-project-header h3 {
    margin-bottom: 0;
    font-size: 1.25rem;
}

.ai-project-date {
    font-size: 0.875rem;
    color: var(--text-light);
}

.ai-project-body {
    padding: var(--spacing-md);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.ai-project-image {
    margin-bottom: var(--spacing-md);
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-light);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    position: relative;
}

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

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

.ai-project-image .image-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 0;
    background-color: var(--bg-dark);
    font-size: 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--primary-color);
}

.ai-project-description {
    margin-bottom: var(--spacing-md);
    font-size: 0.95rem;
}

.ai-project-features {
    margin-bottom: var(--spacing-md);
}

.ai-project-features h4 {
    font-size: 1rem;
    margin-bottom: var(--spacing-sm);
}

.ai-project-features ul {
    padding-left: var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
}

.ai-project-features li {
    font-size: 0.875rem;
    margin-bottom: var(--spacing-xs);
}

.ai-project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-top: auto;
    padding-top: var(--spacing-md);
}

.ai-tech-tag {
    padding: 0.25rem 0.5rem;
    background-color: var(--bg-light);
    border-radius: var(--border-radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

.ai-project-footer {
    padding: var(--spacing-md);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.ai-project-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 0.875rem;
    color: var(--primary-color);
}

.ai-project-link i {
    font-size: 1rem;
}

.ai-project-achievement {
    font-size: 0.875rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.ai-project-achievement i {
    color: var(--warning-color);
}

/* Flip Card Effect */
.flip-card {
    perspective: 1000px;
    height: 100%;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: var(--border-radius-md);
    overflow: hidden;
}

.flip-card-back {
    transform: rotateY(180deg);
    background-color: var(--bg-color);
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
}

.flip-card-back h3 {
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.technical-details {
    flex-grow: 1;
    overflow-y: auto;
}

.technical-details h4 {
    font-size: 1rem;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-color);
}

.technical-details p {
    font-size: 0.875rem;
    margin-bottom: var(--spacing-md);
}

.technical-details code {
    display: block;
    background-color: var(--bg-light);
    padding: var(--spacing-sm);
    border-radius: var(--border-radius-sm);
    font-family: monospace;
    font-size: 0.875rem;
    margin-bottom: var(--spacing-md);
    white-space: pre-wrap;
}

.flip-btn {
    position: absolute;
    bottom: var(--spacing-md);
    right: var(--spacing-md);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 2;
    transition: background-color var(--transition-fast);
}

.flip-btn:hover {
    background-color: var(--primary-dark);
}

/* ===== RESPONSIVE DESIGN FOR AI JOURNEY ===== */
@media (max-width: 992px) {
    .timeline-horizontal {
        height: 500px;
    }
}

@media (max-width: 768px) {
    /* Switch to vertical timeline on mobile */
    .timeline-horizontal {
        height: auto;
        overflow-x: visible;
        overflow-y: visible;
        padding: 0 var(--spacing-md);
    }
    
    .timeline-horizontal::before {
        top: 0;
        left: 20px;
        width: 4px;
        height: 100%;
        transform: none;
    }
    
    .timeline-track {
        flex-direction: column;
        min-width: auto;
        height: auto;
    }
    
    .timeline-item {
        flex: none;
        width: 100%;
        min-height: 200px;
        padding: var(--spacing-md) 0;
        align-items: flex-start;
    }
    
    .timeline-dot {
        left: 20px;
        top: var(--spacing-md);
        transform: translateX(-50%);
    }
    
    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        margin: 0 0 0 50px;
        order: 0;
        max-width: calc(100% - 70px);
    }
    
    .timeline-item.active .timeline-dot {
        transform: translateX(-50%) scale(1.2);
    }
    
    .ai-projects .projects-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .timeline-content {
        padding: var(--spacing-sm);
    }
    
    .timeline-title {
        font-size: 1.1rem;
    }
    
    .timeline-description {
        font-size: 0.8rem;
    }
    
    .ai-project-image {
        height: 150px;
    }
}
