/* Global Overrides & Utilities */
:root {
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-bg-hover: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
    --glass-border-glow: rgba(225, 75, 75, 0.4);
    --glass-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.5),
        inset 0 1px 1.5px 0 rgba(255, 255, 255, 0.35),
        inset 0 -1px 2px 0 rgba(0, 0, 0, 0.3);
    --glass-blur: blur(20px) saturate(190%) contrast(105%);
}

html {
    scrollbar-gutter: stable;
    overflow-y: scroll;
    background-color: #0a0a0a;
}

body {
    background-color: #0a0a0a;
    overflow-x: hidden;
    font-family: 'Space Grotesk', sans-serif;
}

/* Lock scroll while preloader is active */
body.preloader-active {
    overflow: hidden !important;
    height: 100vh !important;
    touch-action: none !important;
}

/* Custom Sleek Dark Glass Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 9999px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: #e14b4b;
}

/* Liquid Glass Generic Utility Class */
.liquid-glass {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 50%, rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    position: relative;
}

.liquid-glass::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.02) 40%, rgba(225, 75, 75, 0.3) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* Global Navigation - Liquid Glass Upgrade */
nav {
    background: linear-gradient(180deg, rgba(10, 10, 10, 0.75) 0%, rgba(10, 10, 10, 0.35) 100%) !important;
    backdrop-filter: blur(24px) saturate(190%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(190%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}


/* --- HERO SECTION STYLES --- */

#hero {
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

#hero.hero-hidden {
    opacity: 0;
    transform: scale(0.96);
}

#hero.hero-anim-active {
    opacity: 1;
    transform: scale(1);
}

/* Grainy Texture Overlay (Disabled to keep hero section background 100% crisp & clear) */
.grain {
    display: none !important;
}

/* Liquid Typography Effect Base */
.liquid-text {
    position: relative;
    display: inline-block;
    transition: transform 0.3s ease-out;
    filter: url(#liquid-filter);
    overflow: visible !important;
}

/* Floating Glass Shards (Sharp & Clear without foggy backdrop blur) */
.shard {
    position: absolute;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.01) 100%);
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 1.5px 2px rgba(255, 255, 255, 0.4), inset 0 -1.5px 2px rgba(0, 0, 0, 0.4), 0 20px 40px rgba(0, 0, 0, 0.4);
    border-radius: 24px;
    z-index: 5;
    transition: box-shadow 0.5s ease;
    overflow: hidden;
    will-change: transform;
}

.shard::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 45%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.25) 0%, transparent 100%);
    pointer-events: none;
}

.shard-1 {
    width: 150px;
    height: 150px;
    top: 15%;
    left: 10%;
    transform: rotate(45deg);
}

.shard-2 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    right: 15%;
    transform: rotate(45deg);
}

.shard-3 {
    width: 80px;
    height: 80px;
    top: 60%;
    left: 20%;
    transform: rotate(45deg);
}

/* Custom Scroll Indicator Line */
.scroll-line {
    width: 1px;
    height: 80px;
    background: linear-gradient(to bottom, #e14b4b, transparent);
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    transform: translatey(-100%);
    animation: scroll-anim 2s infinite cubic-bezier(0.7, 0, 0.3, 1);
}

@keyframes scroll-anim {
    0% {
        transform: translateY(-100%);
    }

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

/* Glow effects */
.glow {
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(225, 75, 75, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}


/* --- ABOUT & SKILLS SECTION STYLES --- */

.orbit-container {
    perspective: 1000px;
}

.orbit-path {
    position: absolute;
    border: 1px dashed rgba(225, 75, 75, 0.2);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Orbit skill node precise rules (Original Orbit & Magnetic positioning preserved) */
.skill-node {
    position: absolute;
    transition: transform 0.3s ease-out, filter 0.3s ease;
    will-change: transform;
}

.skill-node::before {
    content: '';
    position: absolute;
    inset: -30px;
}

.skill-node:hover {
    z-index: 50;
    filter: drop-shadow(0 0 20px rgba(225, 75, 75, 0.5));
}

.glow-core {
    box-shadow: 0 0 60px 20px rgba(225, 75, 75, 0.4);
}

/* Liquid Glass Cards */
.glass-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.02) 100%);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.35),
        inset 0 -1px 1px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    pointer-events: none;
}

/* Exclude .skill-node from hover transform so orbit positioning is never broken */
.glass-card:not(.skill-node) {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:not(.skill-node):hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(225, 75, 75, 0.08) 100%);
    border-color: rgba(225, 75, 75, 0.4);
    box-shadow: 0 16px 45px rgba(225, 75, 75, 0.25),
        inset 0 1px 2px rgba(255, 255, 255, 0.6),
        inset 0 -1px 2px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px) scale(1.02);
}


/* --- WORKS GALLERY SECTION STYLES --- */

.outline-text {
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.15);
    color: transparent;
    font-size: 20vw;
    line-height: 1;
    white-space: nowrap;
}

.horizontal-scroll-container {
    display: flex;
    overflow-x: auto;
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.horizontal-scroll-container::-webkit-scrollbar {
    display: none;
}

.project-card {
    scroll-snap-align: center;
    flex: 0 0 auto;
    perspective: 1000px;
}

/* Liquid Glass Parallax Cards */
.parallax-inner {
    transform: rotateY(-5deg) rotateX(2deg);
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.5s ease, box-shadow 0.5s ease;
    background: linear-gradient(145deg, rgba(14, 14, 16, 0.95) 0%, rgba(6, 6, 8, 0.98) 100%) !important;
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6),
        inset 0 1.5px 2px rgba(255, 255, 255, 0.35),
        inset 0 -1.5px 2px rgba(0, 0, 0, 0.5) !important;
    position: relative;
    overflow: hidden;
}

.parallax-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    z-index: 30;
    pointer-events: none;
}

.project-card:hover .parallax-inner {
    transform: rotateY(0deg) rotateX(0deg) scale(1.02);
    border-color: rgba(225, 75, 75, 0.4) !important;
    box-shadow: 0 25px 65px rgba(225, 75, 75, 0.22),
        0 15px 35px rgba(0, 0, 0, 0.7),
        inset 0 1.5px 2.5px rgba(255, 255, 255, 0.6) !important;
}

.project-card:hover~.bg-layer {
    opacity: 0.1;
}

.dynamic-bg {
    transition: background-color 0.8s ease;
}

/* Liquid Navigation Buttons */
#works-prev-btn,
#works-next-btn {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.03) 100%) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.4) !important;
}

#works-prev-btn:hover,
#works-next-btn:hover {
    background: linear-gradient(135deg, rgba(225, 75, 75, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%) !important;
    border-color: rgba(225, 75, 75, 0.5) !important;
    box-shadow: 0 10px 25px rgba(225, 75, 75, 0.35), inset 0 1px 1.5px rgba(255, 255, 255, 0.6) !important;
}


/* --- CONTACT SECTION STYLES --- */

/* Scanline Effect */
.scanline {
    width: 100%;
    height: 1px;
    background: rgba(225, 75, 75, 0.1);
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    pointer-events: none;
    box-shadow: 0 0 10px rgba(225, 75, 75, 0.2);
    animation: scan 8s linear infinite;
}

@keyframes scan {
    0% {
        top: 0%;
    }

    100% {
        top: 100%;
    }
}

/* Particle Overlay Simulation */
.particle-field {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(225, 75, 75, 0.05) 0%, transparent 70%);
    z-index: 1;
}

/* Liquid Glass Form Container */
#contact-form {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(13, 14, 20, 0.65) 100%) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5),
        inset 0 1px 1.5px rgba(255, 255, 255, 0.3) !important;
    position: relative;
    overflow: hidden;
}

#contact-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    pointer-events: none;
}

/* Glowing Liquid Inputs */
.neon-input {
    background: rgba(255, 255, 255, 0.03) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border-bottom: 2px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3) !important;
    border-radius: 8px 8px 0 0;
    transition: all 0.3s ease !important;
}

.neon-input:focus {
    background: rgba(255, 255, 255, 0.07) !important;
    box-shadow: 0 4px 20px rgba(225, 75, 75, 0.25), inset 0 1px 2px rgba(255, 255, 255, 0.35) !important;
    border-color: #e14b4b !important;
}

/* Slide to Verify Liquid Styling */
#slide-verify-container {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.25) !important;
}

#slide-handle {
    background: linear-gradient(135deg, #ea5455 0%, #e14b4b 100%) !important;
    box-shadow: 0 4px 15px rgba(225, 75, 75, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

/* Magnetic Button Base */
.magnetic-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.magnetic-button {
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.magnetic-button:hover {
    box-shadow: 0 0 35px rgba(225, 75, 75, 0.45);
}

/* Floating Label Logic via Tailwind Peer */
.floating-label-input:placeholder-shown~.floating-label {
    top: 1.2rem;
    left: 1rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.4);
}

.floating-label-input:focus~.floating-label,
.floating-label-input:not(:placeholder-shown)~.floating-label {
    top: -0.5rem;
    left: 0.75rem;
    font-size: 0.7rem;
    color: #e14b4b;
    background: #0d0e14;
    /* Match the glass-card backdrop */
    padding: 0 6px;
}


/* --- LOADER STYLES --- */

.grainy-bg::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
    opacity: 0.04;
    background-image: url(https://lh3.googleusercontent.com/aida-public/AB6AXuAwD_0J59r-R1_mE5t9vGQaaRBRTySfr_1cl-TfxsMKtbmll5z5Dbp7v-fdbpBawk2_i5inNM19k9xReev7Lfd6dv-0zRj0Fpr4_sMyPhuKQgBwHSuSq_WHlVhUn-6p1a5dSXDAu80fUJ78evf2CK-jQN3QF7VQA1QmeGoNQZEUvcybCUQ199Mdcsz5gWyO6dvLenYklm5RcMpTnyDNfAGHeduTYFXgrH-FDhbhZ_cyA30_OV2v4kj7fHl6XboAWmYFoehzuakX_uxA);
    mix-blend-mode: overlay;
}

.liquid-fill {
    width: 0%;
    /* Starts at 0, animated by JS */
    transition: width 0.5s ease-out;
    background: linear-gradient(90deg, #e14b4b 0%, #f07d7d 100%);
    box-shadow: 0 0 20px rgba(225, 75, 75, 0.4);
    position: relative;
    overflow: hidden;
}

.liquid-fill::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translatex(-100%);
    animation: liquid-shine 2s infinite;
}

@keyframes liquid-shine {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.morph-box {
    filter: blur(0.5px);
}

.logo-glow {
    filter: drop-shadow(0 0 12px rgba(225, 75, 75, 0.4));
    box-shadow: 0 0 35px rgba(234, 84, 85, 0.3), inset 0 2px 4px rgba(255, 255, 255, 0.4);
}

/* Silky Smooth Loader Exit */
#loader {
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), filter 1.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 1.2s;
    will-change: opacity, transform, filter;
}

#loader.fade-out {
    opacity: 0;
    transform: scale(1.08);
    filter: blur(12px);
    visibility: hidden;
}


/* --- MODAL STYLES & SLIDE-IN TRANSITIONS --- */

.modal-overlay {
    z-index: 100;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    visibility: hidden;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* Glass Panel (Liquid Frosted Glass Text Background - Translucent & Refractive) */
.glass-panel {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(14, 14, 18, 0.85) 50%, rgba(6, 6, 8, 0.92) 100%) !important;
    backdrop-filter: blur(28px) saturate(210%) contrast(105%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(210%) contrast(105%) !important;
    border-left: 1px solid rgba(255, 255, 255, 0.22) !important;
    box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.3), inset 0 1.5px 2px rgba(255, 255, 255, 0.4), 0 25px 50px rgba(0, 0, 0, 0.5) !important;
    position: relative;
    transform: translateX(100%);
    opacity: 0;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
    will-change: transform, opacity;
}

.glass-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0.05) 100%);
    pointer-events: none;
}

.modal-overlay.open .glass-panel {
    transform: translateX(0);
    opacity: 1;
}

/* Enhanced legibility text shadows for frosted glass backdrop */
#modal-title {
    color: #ffffff !important;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}

#modal-desc {
    color: rgba(241, 245, 249, 0.95) !important;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
}

#modal-category {
    color: #e14b4b !important;
    text-shadow: 0 1px 8px rgba(225, 75, 75, 0.4);
}

/* Staggered text elements sliding in from right */
.modal-content-reveal {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

.modal-overlay.open .modal-content-reveal {
    opacity: 1;
    transform: translateX(0);
}

/* Staggered delays for glass-panel children */
.modal-overlay.open .glass-panel #modal-category {
    transition-delay: 0.12s;
}

.modal-overlay.open .glass-panel #modal-title {
    transition-delay: 0.22s;
}

.modal-overlay.open .glass-panel #modal-desc {
    transition-delay: 0.32s;
}

.modal-overlay.open .glass-panel #modal-tags {
    transition-delay: 0.42s;
}

/* Modal Close Button: Single clean SVG ring without inner glass box */
#modal-close-btn {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
    border: none !important;
}

/* Tag / Chip Liquid Glass Styling */
.modal-tag-chip {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.35), 0 4px 12px rgba(0, 0, 0, 0.3);
    border-radius: 9999px;
    padding: 0.4rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

.modal-tag-chip:hover {
    background: linear-gradient(135deg, rgba(225, 75, 75, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    border-color: rgba(225, 75, 75, 0.4);
    box-shadow: inset 0 1px 1.5px rgba(255, 255, 255, 0.5), 0 6px 16px rgba(225, 75, 75, 0.3);
    transform: translateY(-1px);
}

/* Ensure modal content can scroll if needed on smaller screens */

/* --- HERO ANIMATIONS (REFINED) --- */

/* Eyebrow Reveal */
.eyebrow-container {
    overflow: hidden;
    position: relative;
    display: inline-block;
}

.eyebrow-text {
    transform: translateY(110%);
    opacity: 0;
    transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
    will-change: transform;
}

.hero-anim-active .eyebrow-text {
    transform: translateY(0);
    opacity: 1;
    transition-delay: 1.5s;
    /* Appears after main text settles */
}

/* Marquee Animation */
.marquee-container {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
}

.marquee-content {
    display: inline-block;
    animation: marquee-scroll 20s linear infinite;
}

@keyframes marquee-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Character Animation Settings & Liquid Glass Typography */
.hero-char {
    opacity: 0;
    transform: translate(var(--rx), var(--ry)) rotate(var(--rr));
    transition: transform 1.5s cubic-bezier(0.19, 1, 0.22, 1), opacity 1s ease-out;
    will-change: transform, opacity;
    background: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0.88) 50%, rgba(225, 225, 230, 0.75) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.35)) drop-shadow(0 10px 25px rgba(255, 255, 255, 0.25)) drop-shadow(0 2px 10px rgba(0, 0, 0, 0.8));
    padding: 0 0.4rem;
}

.hero-anim-active .hero-char {
    opacity: 1;
    transform: translate(0, 0) rotate(0);
}

/* 
   For the interactive state, we remove the CSS transition on transform 
   because we will handle fluidity via JavaScript (LERP).
*/
.hero-interactive .hero-char {
    transition: opacity 0.5s ease;
    /* verify no transform transition here */
}

.scroll-line-container {
    opacity: 0;
    transform: translate(-50%, 20px);
    transition: opacity 1s ease 2s, transform 1s cubic-bezier(0.16, 1, 0.3, 1) 2s;
}

.hero-anim-active .scroll-line-container {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* --- MODAL TRANSITIONS (FLIP Helper) --- */

.modal-animating {
    transition: none !important;
}

/* --- CLOSE BUTTON ANIMATION --- */

.spin-slow {
    animation: spin-cw 10s linear infinite;
}

.spin-fast {
    animation: spin-cw 2s linear infinite;
}

@keyframes spin-cw {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Enhancing the circle dash animation */
.close-ring {
    stroke-dasharray: 175;
    stroke-dashoffset: 0;
    animation: dash-offset 4s ease-in-out infinite alternate;
}

@keyframes dash-offset {
    0% {
        stroke-dashoffset: 0;
    }

    100% {
        stroke-dashoffset: 175;
    }
}