/* assets/css/3d_effects.css - Modern 3D & Glassmorphic Engine for CAIML */

:root {
    --glass-bg: rgba(255, 255, 255, 0.78);
    --glass-bg-hover: rgba(255, 255, 255, 0.92);
    --glass-border: rgba(255, 255, 255, 0.85);
    --glass-border-subtle: rgba(15, 23, 42, 0.08);
    --glass-glow: rgba(16, 185, 129, 0.15);
    --emerald-glow: rgba(5, 150, 105, 0.2);
    --gold-glow: rgba(245, 158, 11, 0.25);
    --shadow-soft-3d: 0 15px 35px -10px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
    --shadow-hover-3d: 0 25px 50px -12px rgba(15, 23, 42, 0.14), 0 0 25px rgba(16, 185, 129, 0.15);
}

/* Crisp Surface Cards - No Blur */
.glass-panel {
    background: #ffffff;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--shadow-soft-3d);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card {
    background: #ffffff;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--shadow-soft-3d);
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease;
}

.glass-card:not(.text-white):not([style*="background"]):hover {
    background: var(--glass-bg-hover);
    border-color: rgba(16, 185, 129, 0.35);
    box-shadow: var(--shadow-hover-3d);
}

.glass-card.text-white:hover,
.glass-card[style*="background"]:hover {
    box-shadow: var(--shadow-hover-3d);
    border-color: rgba(16, 185, 129, 0.35);
}

/* 3D Tilt Container & Glare Layer */
.tilt-card {
    transform-style: preserve-3d;
    transform: perspective(1000px);
    will-change: transform;
    transition: transform 0.25s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.25s ease;
}

.tilt-glare {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    pointer-events: none;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 5;
}

.tilt-card:hover .tilt-glare {
    opacity: 1;
}

/* 3D Depth Layers inside Cards */
.tilt-card > * {
    transform-style: preserve-3d;
}

.tilt-depth-1 {
    transform: translateZ(15px);
    display: inline-block;
}

.tilt-depth-2 {
    transform: translateZ(30px);
    display: inline-block;
}

.tilt-depth-3 {
    transform: translateZ(45px);
    display: inline-block;
}

/* Floating Animations */
@keyframes floatGentle {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-8px) rotate(1.5deg);
    }
}

.floating-element {
    animation: floatGentle 5s ease-in-out infinite;
}

.floating-element-delayed {
    animation: floatGentle 6s ease-in-out infinite 1.5s;
}

/* 3D Icon Badge Container */
.icon-box-3d {
    width: 68px;
    height: 68px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(245, 158, 11, 0.12) 100%);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-emerald, #059669);
    font-size: 1.85rem;
    margin-bottom: 1.25rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateZ(25px);
}

.glass-card:hover .icon-box-3d {
    transform: translateZ(35px) scale(1.08);
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: #ffffff;
    box-shadow: 0 12px 28px rgba(5, 150, 105, 0.28);
}

/* Radiant Text Gradients (Agri Slate-Navy to Emerald - No Blue Cast) */
.gradient-text-navy-indigo {
    background: linear-gradient(135deg, #0f241d 0%, #065f46 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.gradient-text-emerald {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.gradient-text-gold {
    color: #d97706 !important;
    font-weight: 800;
    display: inline-block;
}

/* Glowing Border Utilities */
.glow-border-indigo:hover,
.glow-border-emerald:hover {
    border-color: rgba(5, 150, 105, 0.4) !important;
    box-shadow: 0 0 25px rgba(5, 150, 105, 0.2);
}

/* Reveal on scroll base classes */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal-on-scroll.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger entrance delays for reveal-on-scroll elements */
.stagger-1 { transition-delay: 0.08s; }
.stagger-2 { transition-delay: 0.16s; }
.stagger-3 { transition-delay: 0.24s; }
.stagger-4 { transition-delay: 0.32s; }
.stagger-5 { transition-delay: 0.40s; }
.stagger-6 { transition-delay: 0.48s; }
.stagger-7 { transition-delay: 0.56s; }
.stagger-8 { transition-delay: 0.64s; }

/* Avatar Pulse Ring Effect */
.avatar-pulse-container {
    position: relative;
    display: inline-block;
}

.avatar-pulse-ring {
    position: relative;
    border-radius: 50%;
    padding: 6px;
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.4), rgba(245, 158, 11, 0.4));
    box-shadow: 0 10px 30px rgba(5, 150, 105, 0.2);
}

.avatar-pulse-ring::before,
.avatar-pulse-ring::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid rgba(5, 150, 105, 0.45);
    animation: pulseRing 3.6s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
    pointer-events: none;
}

.avatar-pulse-ring::after {
    animation-delay: 1.8s;
    border-color: rgba(245, 158, 11, 0.35);
}

@keyframes pulseRing {
    0% {
        transform: scale(0.96);
        opacity: 0.85;
    }
    60% {
        transform: scale(1.15);
        opacity: 0;
    }
    100% {
        transform: scale(1.22);
        opacity: 0;
    }
}

/* Specular Shimmer Effect on Buttons & Badges */
.btn-shimmer {
    position: relative;
    overflow: hidden;
}

.btn-shimmer::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -70%;
    width: 50%;
    height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: rotate(25deg);
    pointer-events: none;
    transition: none;
}

.btn-shimmer:hover::after {
    animation: shimmerSweep 1s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes shimmerSweep {
    0% { left: -70%; }
    100% { left: 150%; }
}

/* Interactive Research Focus Tags & Pills */
.research-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 16px;
    border-radius: 50px;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-dark, #0f172a);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(5, 150, 105, 0.2);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    user-select: none;
}

.research-pill i {
    color: var(--accent-emerald, #059669);
    font-size: 0.85rem;
    transition: transform 0.3s ease;
}

.research-pill:hover {
    transform: translateY(-2px);
    border-color: var(--accent-emerald, #059669);
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.08), rgba(16, 185, 129, 0.12));
    box-shadow: 0 6px 16px rgba(5, 150, 105, 0.15);
    color: #065f46;
}

.research-pill:hover i {
    transform: scale(1.15) rotate(5deg);
}

/* Academic Milestone & Education Timeline */
.milestone-timeline {
    position: relative;
    padding-left: 28px;
}

.milestone-timeline::before {
    content: '';
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: 10px;
    width: 2px;
    background: linear-gradient(to bottom, #059669 0%, #10b981 70%, rgba(16, 185, 129, 0.15) 100%);
    border-radius: 2px;
}

.milestone-item {
    position: relative;
    margin-bottom: 22px;
    transition: transform 0.3s ease;
}

.milestone-item:last-child {
    margin-bottom: 0;
}

.milestone-dot {
    position: absolute;
    left: -28px;
    top: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.milestone-item:hover .milestone-dot {
    transform: scale(1.22);
    background: #059669;
    box-shadow: 0 0 0 5px rgba(5, 150, 105, 0.25);
}

/* Interactive Animated Back Button */
.btn-back-animated {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: var(--text-secondary, #334155);
    font-weight: 600;
    font-size: 0.88rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    text-decoration: none;
}

.btn-back-animated i {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-back-animated:hover {
    background: #ffffff;
    color: var(--accent-emerald, #059669);
    border-color: rgba(5, 150, 105, 0.3);
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.15);
    transform: translateX(-4px);
}

.btn-back-animated:hover i {
    transform: translateX(-4px);
}

/* Copy-to-Clipboard Interactive Button */
.copy-btn-interactive {
    cursor: pointer;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid transparent;
    transition: all 0.25s ease;
}

.copy-btn-interactive:hover {
    background: rgba(5, 150, 105, 0.08);
    border-color: rgba(5, 150, 105, 0.2);
    color: var(--accent-emerald, #059669) !important;
}

.copy-btn-interactive.copied {
    background: rgba(5, 150, 105, 0.15);
    border-color: var(--accent-emerald, #059669);
    color: #059669 !important;
}

/* Luxury Search Input */
.search-input-luxury {
    background: rgba(255, 255, 255, 0.95);
    border: 1.5px solid rgba(15, 23, 42, 0.1);
    border-radius: 50px;
    padding: 12px 24px 12px 48px;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.search-input-luxury:focus {
    border-color: var(--accent-emerald, #059669);
    box-shadow: 0 8px 24px rgba(5, 150, 105, 0.18), 0 0 0 3px rgba(5, 150, 105, 0.1);
    outline: none;
    background: #ffffff;
}

/* Smooth Tab Transitions */
.tab-content > .tab-pane {
    display: none;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.tab-content > .active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Luxury Quote Callout */
.quote-callout {
    position: relative;
    padding: 1.5rem 1.75rem;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.04) 0%, rgba(245, 158, 11, 0.04) 100%);
    border-left: 4px solid var(--accent-emerald, #059669);
}

.quote-callout::before {
    content: '\201C';
    position: absolute;
    top: -10px;
    left: 12px;
    font-size: 4rem;
    line-height: 1;
    font-family: Georgia, serif;
    color: rgba(5, 150, 105, 0.12);
    pointer-events: none;
}

/* Luxury Public Pagination */
.luxury-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 2.5rem;
    list-style: none;
    padding: 0;
}

.luxury-pagination .page-item .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(15, 23, 42, 0.1);
    color: var(--text-dark, #0f172a);
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
}

.luxury-pagination .page-item .page-link:hover {
    background: #ffffff;
    color: var(--accent-emerald, #059669);
    border-color: rgba(5, 150, 105, 0.35);
    box-shadow: 0 6px 18px rgba(5, 150, 105, 0.18);
    transform: translateY(-2px);
}

.luxury-pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: #ffffff !important;
    border-color: transparent;
    box-shadow: 0 6px 18px rgba(5, 150, 105, 0.35);
    transform: translateY(-2px);
}

.luxury-pagination .page-item.disabled .page-link {
    background: rgba(241, 245, 249, 0.7);
    color: #94a3b8 !important;
    border-color: rgba(15, 23, 42, 0.05);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}


