/* Dynamic Glow Effect Styles */

.glass-card {
    /* Ensure overflow is hidden so glow doesn't spill out, but if 3D elements inside pop out, we might need a wrapper */
    overflow: hidden;
    position: relative;
    /* Smooth out the box shadow changes */
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.glow-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    
    /* Dynamic Radial Gradient acting as a flashlight.
       Using CSS variables set by JS (--mouse-x, --mouse-y).
       Colors are neutral/white matching the theme.
    */
    background: radial-gradient(
        circle 250px at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(255, 255, 255, 0.12),
        transparent 80%
    );
}

.glass-card:hover .glow-effect {
    opacity: 1;
}

/* Ensure contents of glass-card sit above the glow */
.glass-card > * {
    position: relative;
    z-index: 1;
}

/* Enhancing the border glow on hover using the same variables */
.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    padding: 1px;
    background: radial-gradient(
        circle 300px at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(255, 255, 255, 0.4),
        rgba(255, 255, 255, 0.05)
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.glass-card:hover::before {
    opacity: 1;
}

/* Adjust project card specific elements so they don't break 3D */
.project-card .project-img-placeholder {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s ease;
}

.project-card:hover .project-img-placeholder {
    transform: scale(1.08) translateZ(20px);
    filter: brightness(1.2);
}
