.portfolio-hero {
    background-color: #20cd8d;
    padding: 80px 20px;
    text-align: center;
    color: white;
}

.portfolio-hero h1 {
    font-size: 3.5em;
    margin-bottom: 20px;
}

.portfolio-grid {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.portfolio-item {
    background: white;
    border: 4px solid #20cd8d;
    border-radius: 0px;
    overflow: hidden;
    transition: transform 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.portfolio-item:hover {
    transform: translateY(-5px);
}

.portfolio-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.portfolio-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.portfolio-content h3 {
    color: #20cd8d;
    font-size: 1.5em;
    margin-bottom: 15px;
}

.portfolio-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.tech-stack {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.tech-stack span {
    background: rgba(32, 205, 141, 0.1);
    color: #20cd8d;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9em;
}

.portfolio-buttons {
    display: flex;
    gap: 15px;
    margin-top: auto;
}

.btn {
    padding: 12px 25px;
    border-radius: 0px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    flex: 1;
}

.btn-primary {
    background-color: #20cd8d;
    color: white;
    border: 2px solid #20cd8d;
}

.btn-primary:hover {
    background-color: #1ba876;
    border-color: #1ba876;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(32, 205, 141, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: #20cd8d;
    border: 2px solid #20cd8d;
}

.btn-secondary:hover {
    background-color: rgba(32, 205, 141, 0.1);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 30px;
    }
}

@media (max-width: 768px) {
    .portfolio-hero h1 {
        font-size: 2.5em;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        padding: 0 20px;
        margin: 40px auto;
    }

    .portfolio-item img {
        height: 200px;
    }

    .portfolio-content {
        padding: 20px;
    }

    .portfolio-content h3 {
        font-size: 1.3em;
    }

    .portfolio-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        padding: 10px 20px;
    }

    .tech-stack {
        gap: 6px;
    }

    .tech-stack span {
        font-size: 0.8em;
        padding: 4px 12px;
    }
}

@media (max-width: 480px) {
    .portfolio-hero {
        padding: 60px 15px;
    }

    .portfolio-hero h1 {
        font-size: 2em;
    }

    .portfolio-grid {
        gap: 30px;
        margin: 30px auto;
    }

    .portfolio-item img {
        height: 180px;
    }

    .portfolio-content {
        padding: 15px;
    }

    .portfolio-content h3 {
        font-size: 1.2em;
    }

    .portfolio-content p {
        font-size: 0.9em;
    }
}

/* Image Loading Animation */
.portfolio-item img {
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Optional: Add lazy loading for images */
.portfolio-item img.lazy {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-item img.lazy.loaded {
    opacity: 1;
}
