/* ===== Portfolio Section ===== */
.portfolio-section {
    padding: 6rem 2rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 50%, #f0f4ff 100%);
    position: relative;
    overflow: hidden;
}

.portfolio-background {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.portfolio-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.05;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -200px;
    right: -200px;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: var(--accent);
    bottom: -150px;
    left: 10%;
}

.shape-3 {
    width: 200px;
    height: 200px;
    background: var(--secondary);
    top: 50%;
    left: -100px;
}

.portfolio-container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.portfolio-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.portfolio-item {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(108, 99, 255, 0.1);
}

.portfolio-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 60px rgba(108, 99, 255, 0.15);
}

.portfolio-media {
    position: relative;
    height: 500px;
    overflow: hidden;
    background: #f8f9ff;
    width: 900px;
}
.portfolio-media img {
     max-width: 100%;
    max-height: 100%;
   
    
}



.project-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 10;
}



.portfolio-content {
    padding: 2.5rem;
}

.portfolio-content h3 {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.project-tagline {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.project-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.project-features span {
    background: rgba(108, 99, 255, 0.1);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.show-details {
    background: var(--primary);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.show-details:hover {
    background: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(108, 99, 255, 0.3);
}

.project-details {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(108, 99, 255, 0.1);
    display: none;
}

.project-details.active {
    display: block;
    animation: fadeInUp 0.5s ease;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 1.5rem 0;
}

.detail-item strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.detail-item ul {
    list-style: none;
    padding: 0;
}

.detail-item li {
    padding: 0.3rem 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.2rem;
}

.detail-item li::before {
    content: "•";
    color: var(--primary);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.tech-tags span {
    background: rgba(108, 99, 255, 0.1);
    color: var(--primary);
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
}

.project-cta {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.8rem 1.5rem;
    background: rgba(108, 99, 255, 0.1);
    color: var(--primary);
    border-radius: 20px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.project-cta:hover {
    background: var(--primary);
    color: white !important;
    transform: translateY(-2px);
}

.portfolio-cta {
    text-align: center;
    padding: 3rem;
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.1) 0%, rgba(255, 100, 199, 0.1) 100%);
    border-radius: 20px;
}

.portfolio-cta p {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

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

/* Responsive Design */
@media (max-width: 968px) {
    .detail-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .portfolio-section {
        padding: 4rem 1.5rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
   .portfolio-media {
        width: 100%;        /* use full width on mobile */
        height: auto;       /* let height adjust naturally */
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .portfolio-media img {
        width: 100%;
        height: auto;
        object-fit: contain;
    }
    
    .portfolio-content {
        padding: 2rem;
    }
    .project-features {
        justify-content: center;
        align-items: center;
        text-align: center;
    }
    
    .project-features span {
        justify-content: center;
        text-align: center;
    }
  
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.9rem;
    }
    
    .project-features {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .portfolio-cta {
        padding: 2rem 1.5rem;
    }
    
    .portfolio-cta p {
        font-size: 1.1rem;
    }
    .project-features {
        justify-content: center;
        align-items: center;
        text-align: center;
    }
    
    .project-features span {
        justify-content: center;
        text-align: center;
    }
}