/* ============================================================================
   PORTFOLIO SECTION & HOVER EFFECTS
   ============================================================================ */

/* Portfolio Section */
.portfolio {
    background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.8) 0%,
    rgba(249, 250, 251, 0.6) 50%,
    rgba(240, 253, 244, 0.8) 100%);
    backdrop-filter: blur(10px);
}
/* Portfolio Item Content Centering */
.portfolio-item .project-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Positions content with space */
    height: 100%; /* Ensures full height of card container */
}

/* Specifically center the project-link within project-info */
.portfolio-item .project-info {
    position: relative;
}
.portfolio-item .project-link {
    /* Remove any margin transforms and allow flex to center it */
    margin: 0 auto;
    /* Optional: if needed, override existing positioning */
}

/* Alternatively: wrap project-link in its own centered container */
.link-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-top: 80px;
}

/* Base portfolio item style */
.portfolio-item {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 36px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 50px var(--shadow-light);
    backdrop-filter: blur(20px);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
}

/* Glare-hover integration */
.portfolio-item.glare-hover {
    --gh-bg: rgb(0, 0, 0);
    --gh-br: 200px;
    --gh-border: var(--border-color);
}

/* Retain existing before pseudoelement for top bar */
.portfolio-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.portfolio-item:hover::before {
    transform: scaleX(1);
}

/* Hover elevation with subtle floating motion */
@keyframes floatUp {
    0% {
        transform: translateY(-8px) scale(1.02);
    }
    50% {
        transform: translateY(-12px) scale(1.03);
    }
    100% {
        transform: translateY(-8px) scale(1.02);
    }
}

.portfolio-item.glare-hover:hover {
    animation: floatUp 1s ease-in-out forwards;
}

/* Hover transforms & border color effect */
.portfolio-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 70px var(--shadow-medium);
    border-color: rgba(16, 185, 129, 0.3);
}

/* Common child elements */
.company-name {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 12px;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.3s ease;
}

.project-date {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.rating {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.stars {
    color: var(--secondary-color);
    font-size: 18px;
    filter: drop-shadow(0 2px 4px rgba(16, 185, 129, 0.3));
}

.rating-text {
    font-size: 14px;
    color: var(--text-muted);
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}

.review {
    font-size: 16px;
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 24px;
    font-family: 'Montserrat', sans-serif;
    font-style: italic;
    position: relative;
    padding: 0 20px;
}

.review::before {
    content: '"';
    position: absolute;
    left: 0;
    top: -5px;
    font-size: 24px;
    color: var(--secondary-color);
    font-weight: bold;
}

.review::after {
    content: '"';
    position: absolute;
    right: 0;
    bottom: -10px;
    font-size: 24px;
    color: var(--secondary-color);
    font-weight: bold;
}

.project-link {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 14px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(30, 58, 138, 0.2);
    position: relative;
    overflow: hidden;
}

.project-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    transition: all 0.3s ease;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.project-link:hover::before {
    width: 200px;
    height: 200px;
}

.project-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 64, 64, 0.3);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .portfolio-item {
        padding: 30px 25px;
    }
    .company-name {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .portfolio-item {
        padding: 25px 20px;
    }
    .company-name {
        font-size: 20px;
    }
    .review {
        font-size: 15px;
        padding: 0 15px;
    }
}
