/* Custom Cursor Styles */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border: 1.5px solid #ff3333;
    /* Red Stroke */
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    /* Centered */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.6s cubic-bezier(0.25, 1, 0.5, 1),
        height 0.6s cubic-bezier(0.25, 1, 0.5, 1),
        background-color 0.6s cubic-bezier(0.25, 1, 0.5, 1),
        border-color 0.6s cubic-bezier(0.25, 1, 0.5, 1),
        backdrop-filter 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform, width, height;
    box-sizing: border-box;
    mix-blend-mode: normal;
    /* Standard blending */
}

/* Label Hidden by default */
.cursor-label {
    opacity: 0;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: #000;
    transform: scale(0.8);
    transition: opacity 0.3s ease, transform 0.3s ease;
    font-family: 'Inter', sans-serif;
}

/* HOVER STATE: Blur Refractive */
.custom-cursor.is-hovering {
    width: 80px;
    height: 80px;
    border-color: transparent;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(6px) saturate(140%);
    -webkit-backdrop-filter: blur(6px) saturate(140%);
    /* Warp filter commented out for stability */
    /* filter: url(#cursor-warp); */
}

.custom-cursor.is-hovering .cursor-label {
    opacity: 1;
    transform: scale(1);
}

/* UI Hover (Links/Buttons) - Standard small interaction pointer */
.custom-cursor.is-ui-hover,
.custom-cursor.is-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 50, 50, 0.1);
    border-color: #ff3333;
}

/* Hide default cursor only on homepage where custom cursor is active */
body.view-home,
body.view-home a,
body.view-home button,
body.view-home .tile-project-link {
    cursor: none !important;
}

/* Show normal cursor on project pages */
body.view-project,
body.view-project a,
body.view-project button {
    cursor: auto;
}

/* Mobile check - hide custom cursor on touch */
@media (hover: none) and (pointer: coarse) {
    .custom-cursor {
        display: none;
    }

    body,
    a,
    button {
        cursor: auto !important;
    }
}