/* Cursor Styles */
#cursor-dot,
#cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    border-radius: 50%;
    z-index: 10000;
    pointer-events: none;
    opacity: 1;
    mix-blend-mode: difference;
}

#cursor-dot {
    width: 8px;
    height: 8px;
    background-color: #FF6B00;
    transform: translate(-50%, -50%);
}

#cursor-outline {
    width: 40px;
    height: 40px;
    border: 2px solid #FF6B00;
    background-color: transparent;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-text {
    opacity: 0;
    animation: fadeIn 1.5s ease-out forwards;
}

.fade-in-text.delay {
    animation-delay: 0.3s;
}

/* Glitch Title */
.glitch-wrapper {
    display: inline-block;
}

.glitch {
    position: relative;
    display: inline-block;
    transition: letter-spacing 0.3s ease;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: var(--glitch-opacity, 0);
    background: var(--bg-color);
}

.glitch::before {
    color: #FF6B00;
    z-index: -1;
    transform: translate(var(--glitch-offset-x, -2px), 0) skew(var(--glitch-skew, 0deg));
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
    animation: glitch-anim-1 2.5s infinite linear alternate-reverse;
}

.glitch::after {
    color: #00FFFF;
    z-index: -2;
    transform: translate(var(--glitch-offset-x, 2px), 0) skew(var(--glitch-skew, 0deg));
    clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

.glitch.dispersed {
    letter-spacing: 0.15em;
}

@keyframes glitch-anim-1 {
    0% {
        clip-path: inset(20% 0 80% 0);
    }

    100% {
        clip-path: inset(30% 0 20% 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip-path: inset(10% 0 60% 0);
    }

    100% {
        clip-path: inset(0% 0 80% 0);
    }
}

/* 3D Card Styling - Disruptive Update */
.card {
    position: relative;
    padding: 3rem;
    background: rgba(10, 10, 10, 0.4);
    /* Transparent for backdrop filter */
    border-radius: 4px;
    max-width: 600px;
    width: 90%;

    /* 3D Properties */
    transform-style: preserve-3d;
    transform: perspective(1000px);
    will-change: transform;

    /* Glassmorphism */
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);

    /* Variable Border logic is handled via pseudo or direct border? 
       Using box-shadow or border-image to simulate gradient border that doesn't rotate with content */
    border: 1px solid rgba(255, 107, 0, 0.3);
    box-shadow: 0 0 0 1px transparent;
    /* Placeholder */

    overflow: hidden;
    /* Contain canvas */
}

/* Animated Gradient Border simulation via Pseudo */
.card::before {
    content: "";
    position: absolute;
    inset: 0;
    padding: 1px;
    /* border width */
    border-radius: 4px;
    background: linear-gradient(45deg, #FF6B00, #000000, #FF6B00);
    background-size: 200% 200%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    animation: borderRotate 4s linear infinite;
    z-index: 2;
}

@keyframes borderRotate {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Dynamic Lighting Glow */
.card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
            rgba(255, 107, 0, 0.15),
            transparent 40%);
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.card:hover::after {
    opacity: 1;
}

/* High Z-Index Content */
.card h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;

    /* Floating Effect */
    transform: translateZ(50px);
    text-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.card pre {
    background: rgba(0, 0, 0, 0.8);
    padding: 1.5rem;
    border-radius: 4px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #FF6B00;
    border: 1px solid #222;
    transform: translateZ(30px);
    /* 3D Depth */
}

/* Canvas for Matrix Effect */
.binary-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    /* Behind content */
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}

.card:hover .binary-canvas {
    opacity: 0.6;
    /* Subtle visibility */
}

/* Marquee & Contact Styles (Preserved) */
.marquee-wrapper {
    display: inline-block;
    white-space: nowrap;
    font-size: 0;
}

.marquee-content {
    display: inline-block;
    vertical-align: middle;
    animation: scroll 60s linear infinite;
    padding-right: 0.5em;
}

@keyframes scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-100%);
    }
}

/* Contact Specific */
#contact button[type="submit"] {
    background: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    font-family: monospace;
    font-size: 1.2rem;
    padding: 1rem 3rem;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    width: fit-content;
    display: inline-block;
}

#contact button[type="submit"]:hover {
    background: var(--accent-color);
    color: #000;
    animation: glitch 0.2s cubic-bezier(.25, .46, .45, .94) both infinite;
}

@keyframes glitch {
    0% {
        transform: translate(0)
    }

    20% {
        transform: translate(-2px, 2px)
    }

    40% {
        transform: translate(-2px, -2px)
    }

    60% {
        transform: translate(2px, 2px)
    }

    80% {
        transform: translate(2px, -2px)
    }

    100% {
        transform: translate(0)
    }
}

/* Section Animation State */
.fade-in-section {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

a,
button {
    cursor: none;
}

/* Syllable styles for scroll effect */
.syllable {
    display: inline-block;
    will-change: transform;
    white-space: pre;
    transition: transform 0.1s ease-out;
}

.no-split {
    display: inline-block;
    white-space: nowrap;
    will-change: transform;
}

/* Mobile effect enabled */

/* Ensure container has perspective */
#showcase-2 {
    perspective: 1000px;
    overflow: hidden;
    /* Prevent scrollbars during fly-in */
}