/* Modern Portfolio Badge Styles */

.profile-panel {
    max-width: 760px;
    margin: 0 auto 3.5rem;
    float: none;
}

.profile-panel h3,
.skills-panel h3 {
    text-align: center;
}

.profile-panel .info-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 40px;
}

.skills-panel {
    clear: both;
    float: none;
}

.skills-heading {
    max-width: 760px;
    margin: 0 auto 3rem;
    text-align: center;
}

.skills-heading p {
    color: #6e6e6e;
    font-size: 1.6rem;
    line-height: 1.85;
    margin: 0;
}

.skill-box-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin: 0 0 3rem;
}

.skill-box {
    min-height: 210px;
    padding: 24px;
    border: 1px solid #e5e5e5;
    border-top: 4px solid #ff0077;
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfbfb 100%);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.06);
}

.skill-box h4 {
    margin: 0 0 16px;
    color: #313131;
    font-family: "poppins-bold", sans-serif;
    font-size: 14px;
    line-height: 1.4;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.skill-tags span {
    display: inline-block;
    padding: 7px 10px;
    border: 1px solid #dddddd;
    border-radius: 6px;
    background: #ffffff;
    color: #555555;
    font-family: "poppins-regular", sans-serif;
    font-size: 12px;
    line-height: 1.3;
}

#portfolio .section-intro .lead {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.portfolio-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    justify-content: center;
}

/* Smooth Fade-in for Portfolio Items */
.folio-item {
    animation: fadeIn 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
    opacity: 0;
}

/* Portfolio Card UI Stability & Placeholder */
.item-wrap {
    position: relative;
    background: #fdfdfd;
    background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
    min-height: 250px;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
}

.item-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
    display: block;
}

/* Error State Blur */
.item-wrap img.img-error {
    filter: blur(25px) grayscale(0.5) brightness(0.9);
    /* Lighter blur for white theme */
    opacity: 0.3;
}

.item-wrap::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255, 0, 119, 0.05) 0%, transparent 80%);
    z-index: 0;
}

.item-wrap .placeholder-content {
    opacity: 0;
    pointer-events: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -40%);
    /* Subtle offset for entrance */
    text-align: center;
    z-index: 1;
    /* Lower than overlay */
    width: 85%;
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.item-wrap.has-error .placeholder-content {
    opacity: 1;
    transform: translate(-50%, -50%);
}

.placeholder-content i {
    font-size: 36px;
    color: #ff0077;
    /* Matching Pink */
    margin-bottom: 15px;
    display: block;
    text-shadow: 0 0 20px rgba(255, 0, 119, 0.6);
    filter: drop-shadow(0 0 5px rgba(255, 0, 119, 0.3));
}

.placeholder-content span {
    font-size: 15px;
    color: #333;
    /* Darker text for white theme */
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    display: block;
}

/* Hover-Only Overlay Control */
.item-wrap .overlay {
    opacity: 0;
    visibility: hidden;
    z-index: 5;
    /* Higher than placeholder */
    background: rgba(255, 255, 255, 0.95);
    /* Slightly solid white background */
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.item-wrap:hover .overlay {
    opacity: 1;
    visibility: visible;
}

/* Ensure images don''"t zoom or distort on hover, just the overlay */
.item-wrap:hover img:not(.img-error) {
    transform: scale(1.05);
}

.placeholder-content small {
    color: #ff0077;
    opacity: 0.8;
    font-weight: 500;
    margin-top: 5px;
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.portfolio-badge {
    font-family: "poppins-bold", sans-serif;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 4px 10px;
    border-radius: 100px;
    display: inline-block;
    transition: all 0.3s ease;
    cursor: default;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Language Badges - Subtle Blue/Cool Tones */
.badge-language {
    background: rgba(82, 166, 255, 0.15);
    color: #8cc3ff;
}

/* Project Type Badges - Subtle Emerald/Warm Tones */
.badge-project-type {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
}

/* Specific Badge Content Colors (Optional Enhancement) */
.portfolio-badge:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Portfolio Tabs Reordered Styles */
.portfolio-tabs {
    text-align: center;
    margin-bottom: 48px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.portfolio-tabs button {
    background: transparent;
    border: 2px solid transparent;
    color: #666;
    padding: 8px 24px;
    font-family: "poppins-bold", sans-serif;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.portfolio-tabs button.active {
    color: #ff0077;
    border-color: #ff0077;
}

.portfolio-tabs button:hover:not(.active) {
    color: #313131;
}

/* Responsive adjustments */
@media only screen and (max-width: 900px) {
    .skill-box-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media only screen and (max-width: 600px) {
    .profile-panel .info-list,
    .skill-box-grid {
        grid-template-columns: 1fr;
    }

    .skill-box-grid {
        gap: 14px;
    }

    .skill-box {
        min-height: auto;
        padding: 20px;
    }

    .portfolio-badges {
        gap: 6px;
    }

    .portfolio-badge {
        font-size: 9px;
        padding: 3px 8px;
    }
}

/* Prevent scrolling when Magnific Popup is open */
.mfp-active body {
    overflow: hidden;
    height: 100%;
}

.mfp-wrap {
    overflow: auto !important;
    /* Ensure the modal content itself is scrollable if tall */
}


/* GitHub Repository Metadata Link */
.github-repo-link {
    margin-top: 15px;
    font-size: 13px;
    font-family: "poppins-bold", sans-serif;
}

.github-repo-link a {
    color: #ff0077 !important;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.github-repo-link a:hover {
    color: #313131 !important;
    text-decoration: underline;
}

.github-repo-link i {
    margin-right: 8px;
    font-size: 16px;
}
