/* ==========================================================================
   ET.dev — ENHANCEMENT LAYER (cursor, sound UI, motion)
   Pure addition on top of styles.css. Nothing here overrides existing
   colors, fonts, layout or component rules — it only adds new elements
   and new, previously-unused animation behaviour.
   ========================================================================== */

/* ---------- Custom Cursor ---------- */
@media (hover: hover) and (pointer: fine) {
    html.et-cursor-active,
    html.et-cursor-active * {
        cursor: none !important;
    }

    html.et-cursor-active input,
    html.et-cursor-active textarea,
    html.et-cursor-active select {
        cursor: text !important;
    }
}

#etCursorDot {
    position: fixed;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffffff;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.55), 0 0 24px rgba(255, 255, 255, 0.2);
    transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1), height 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
    will-change: transform;
}

#etCursorRing {
    position: fixed;
    top: 0;
    left: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.85);
    pointer-events: none;
    z-index: 9998;
    mix-blend-mode: difference;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), height 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.3s ease, background-color 0.3s ease, opacity 0.25s ease;
    will-change: transform;
}

#etCursorRing .cursor-label {
    font-family: 'IBM Plex Mono', 'Courier New', monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #ffffff;
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
    white-space: nowrap;
}

html.et-cursor-hover #etCursorRing {
    width: 72px;
    height: 72px;
    border-color: rgba(255, 255, 255, 0.95);
    background-color: rgba(255, 255, 255, 0.06);
}

html.et-cursor-hover #etCursorDot {
    opacity: 0;
}

html.et-cursor-hover #etCursorRing .cursor-label {
    opacity: 1;
    transform: scale(1);
}

html.et-cursor-click #etCursorRing {
    width: 28px;
    height: 28px;
}

html.et-cursor-click #etCursorDot {
    width: 5px;
    height: 5px;
}

@media (hover: none), (pointer: coarse) {

    #etCursorDot,
    #etCursorRing {
        display: none !important;
    }
}

/* ---------- Sound Toggle Control ---------- */
#etSoundToggle {
    position: fixed;
    bottom: 32px;
    left: 32px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--bg-secondary, #0d1017);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    color: var(--text-primary, #f7f8fb);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 998;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease, opacity 0.25s ease, border-color 0.25s ease;
}

#etSoundToggle:hover {
    background-color: var(--text-primary, #f7f8fb);
    color: var(--bg-primary, #050408);
    border-color: var(--border-hover, rgba(255, 255, 255, 0.24));
    transform: translateY(-2px);
}

#etSoundToggle:active {
    transform: scale(0.92);
}

#etSoundToggle.muted {
    opacity: 0.55;
}

@media (max-width: 768px) {
    #etSoundToggle {
        width: 42px;
        height: 42px;
        bottom: 20px;
        left: 20px;
    }
}

/* ---------- Idle float on hero portrait (no existing rule touches this transform) ---------- */
@media (prefers-reduced-motion: no-preference) {
    .profile-frame {
        animation: etFloatY 6s ease-in-out infinite;
    }
}

@keyframes etFloatY {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* ---------- Idle breathing on hero background blobs (previously static, no transform/animation set) ---------- */
@media (prefers-reduced-motion: no-preference) {
    .shape-1 {
        animation: etBreathe 8s ease-in-out infinite;
    }

    .shape-2 {
        animation: etBreathe 9s ease-in-out infinite 1.2s;
    }
}

@keyframes etBreathe {

    0%,
    100% {
        opacity: 0.14;
        transform: translate(0, 0) scale(1);
    }

    50% {
        opacity: 0.22;
        transform: translate(0, 0) scale(1.08);
    }
}

/* ---------- Smooth tilt response for the profile card (no pre-existing hover transform to conflict with) ---------- */
.profile-card {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    transform-style: preserve-3d;
}
