/* Theme & App Settings */
.adplist-iframe {
    color-scheme: light;
    touch-action: auto;
}

.dark .adplist-iframe {
    color-scheme: dark;
}

/* Glassmorphism Cards with high contrast */
.bento-card {
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(203, 213, 225, 0.8);
    border-radius: 1.5rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.04);
}

.bento-card:hover {
    transform: translateY(-4px);
    background: #ffffff;
    border-color: rgba(20, 184, 166, 0.4);
    box-shadow: 0 20px 35px -10px rgba(15, 23, 42, 0.12), 0 0 25px -5px rgba(20, 184, 166, 0.1);
}

/* Dark Mode Glassmorphism Overrides */
.dark .bento-card {
    background: rgba(17, 20, 26, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

.dark .bento-card:hover {
    background: rgba(25, 30, 40, 0.5);
    border-color: rgba(20, 184, 166, 0.3);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.7), 0 0 20px -5px rgba(20, 184, 166, 0.1);
}

.card-content {
    position: relative;
    z-index: 10;
}

@keyframes ping-slow {
    75%, 100% { transform: scale(2); opacity: 0; }
}

.animate-ping-slow {
    animation: ping-slow 2.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* Custom Scrollbars */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
.dark ::-webkit-scrollbar-thumb { background: #333; }
.dark ::-webkit-scrollbar-thumb:hover { background: #555; }

.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Ultra-Smooth Organic Micro-Tremble Keyframes for Hovered Title */
@keyframes title-vibrate {
    0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
    20% { transform: translate3d(calc(-0.8px * var(--shake-amp, 0)), calc(0.5px * var(--shake-amp, 0)), 0) rotate(calc(-0.15deg * var(--shake-amp, 0))); }
    40% { transform: translate3d(calc(1.0px * var(--shake-amp, 0)), calc(-0.4px * var(--shake-amp, 0)), 0) rotate(calc(0.2deg * var(--shake-amp, 0))); }
    60% { transform: translate3d(calc(-0.7px * var(--shake-amp, 0)), calc(-0.5px * var(--shake-amp, 0)), 0) rotate(calc(-0.1deg * var(--shake-amp, 0))); }
    80% { transform: translate3d(calc(0.6px * var(--shake-amp, 0)), calc(0.6px * var(--shake-amp, 0)), 0) rotate(calc(0.15deg * var(--shake-amp, 0))); }
}

.animate-title-vibrate {
    animation: title-vibrate 0.32s infinite ease-in-out;
    display: inline-block;
    will-change: transform;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
}

/* Smooth Marquee Animation */
@keyframes marquee-rtl {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.animate-marquee {
    animation: marquee-rtl 30s linear infinite;
    display: flex;
    flex-direction: row;
    width: max-content;
    will-change: transform;
}

.animate-marquee:hover { animation-play-state: paused; }

.mask-edges {
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

/* Review Carousel 3D Coverflow */
.review-wrapper {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    opacity: 0;
    pointer-events: none;
    z-index: 0;
}

.review-wrapper.active {
    transform: translateX(0) scale(1);
    opacity: 1;
    z-index: 20;
    pointer-events: auto;
}

.review-wrapper.next {
    transform: translateX(-65%) scale(0.85);
    opacity: 0.15;
    z-index: 10;
    pointer-events: auto;
    cursor: pointer;
    filter: blur(3px);
}

.review-wrapper.prev {
    transform: translateX(65%) scale(0.85);
    opacity: 0.15;
    z-index: 10;
    pointer-events: auto;
    cursor: pointer;
    filter: blur(3px);
}

.review-wrapper.next:hover, .review-wrapper.prev:hover {
    opacity: 0.4;
    transform: translateX(var(--hover-translate)) scale(0.88);
    filter: blur(1px);
}

.review-wrapper.next { --hover-translate: -60%; }
.review-wrapper.prev { --hover-translate: 60%; }

.review-wrapper:not(.active) > div { pointer-events: none; -webkit-user-select: none; user-select: none; }

@media (max-width: 767px) {
    .review-wrapper.next, .review-wrapper.prev {
        opacity: 0 !important;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.3s;
    }
    .review-wrapper.active {
        width: 100% !important;
        transform: translateX(0) scale(1) !important;
    }
}

.review-scroll::-webkit-scrollbar { width: 4px; height: 4px; }
.review-scroll::-webkit-scrollbar-track { background: transparent; }
.review-scroll::-webkit-scrollbar-thumb { background: rgba(20, 184, 166, 0.4); border-radius: 4px !important; }

@media (prefers-reduced-motion: reduce) {
    .animate-float, .animate-ping-slow, .animate-marquee { animation: none !important; }
}

/* Styling Interactive Content Hub Buttons */
.hub-nav-btn {
    background: rgba(226, 232, 240, 0.6);
    border: 1px solid rgba(203, 213, 225, 0.8);
    color: #475569;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none !important;
    box-shadow: none !important;
}

.hub-nav-btn:hover {
    color: #0d9488;
    background: rgba(20, 184, 166, 0.08);
    border-color: rgba(20, 184, 166, 0.3);
}

.hub-nav-btn.active {
    color: #0d9488;
    background: rgba(20, 184, 166, 0.14);
    border-color: rgba(20, 184, 166, 0.4);
    box-shadow: 0 4px 12px -2px rgba(20, 184, 166, 0.18) !important;
}

.dark .hub-nav-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: #94a3b8;
}

.dark .hub-nav-btn:hover {
    color: #14b8a6;
    background: rgba(20, 184, 166, 0.08);
    border-color: rgba(20, 184, 166, 0.25);
}

.dark .hub-nav-btn.active {
    color: #14b8a6;
    background: rgba(20, 184, 166, 0.15);
    border-color: rgba(20, 184, 166, 0.4);
    box-shadow: 0 0 20px -3px rgba(20, 184, 166, 0.25) !important;
}

@media (max-width: 1023px) {
    .hub-scroll-container {
        -webkit-mask-image: linear-gradient(to right, transparent 0%, black 20px, black calc(100% - 20px), transparent 100%);
        mask-image: linear-gradient(to right, transparent 0%, black 20px, black calc(100% - 20px), transparent 100%);
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

@media (min-width: 1024px) {
    .hub-scroll-container {
        direction: ltr;
    }
    .hub-scroll-container > button {
        direction: rtl;
    }
    .hub-scroll-container::-webkit-scrollbar {
        width: 3px;
    }
    .hub-scroll-container::-webkit-scrollbar-thumb {
        background: rgba(20, 184, 166, 0.2);
        border-radius: 9px;
    }
    .hub-scroll-container::-webkit-scrollbar-thumb:hover {
        background: rgba(20, 184, 166, 0.5);
    }

    .hub-nav-btn:not(.active) {
        border-color: transparent;
    }
    .hub-nav-btn:not(.active):hover {
        border-color: rgba(20, 184, 166, 0.3);
    }
    .dark .hub-nav-btn:not(.active) {
        border-color: transparent;
    }
    .dark .hub-nav-btn:not(.active):hover {
        border-color: rgba(20, 184, 166, 0.25);
    }
}

@media (max-width: 1023px) {
    .review-scroll::-webkit-scrollbar {
        height: 2.5px !important;
        width: 2.5px !important;
    }
    .review-scroll::-webkit-scrollbar-thumb {
        background: rgba(20, 184, 166, 0.4) !important;
        border-radius: 4px !important;
    }
}

/* Strict Hide Scrollbar Utility */
.hide-scrollbar {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* Inline style replacements for better maintainability */

/* Content Hub Section - transition delay */
#content-hub-section {
    transition-delay: 150ms;
}

/* Hub Viewer Container - direction ltr */
#hub-viewer-container {
    direction: ltr;
}

/* ADPList Section - transition delay */
#adplist-section {
    transition-delay: 200ms;
}

/* ADPList Reviews Container - overflow scrolling and isolation */
.adplist-reviews-container {
    transform: translateZ(0);
    isolation: isolate;
}

/* LinkedIn Recommendations Section - transition delay */
#linkedin-recommendations-section {
    transition-delay: 300ms;
}

/* Social Nav Grid - transition delay */
.social-nav-grid {
    transition-delay: 400ms;
}

/* Footer - transition delay */
.site-footer {
    transition-delay: 500ms;
}
