/* ======================================
   Custom Styles for Unified Page Design
   AI-themed with modern card layouts
   Enhanced with cool visual effects
   ====================================== */

/* AI-themed gradient backgrounds */
.ai-gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Floating animation for subtle motion */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Glow effect */
@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px rgba(102, 126, 234, 0.3); }
    50% { box-shadow: 0 0 20px rgba(102, 126, 234, 0.6), 0 0 30px rgba(118, 75, 162, 0.4); }
}

/* Unified purple-themed accent colors */
:root {
    --ai-primary: #667eea;
    --ai-secondary: #764ba2;
    --ai-accent: #8b7fc8;
    --ai-light: #f0f4ff;
    --ai-dark: #1a1a2e;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #8b7fc8 0%, #9d8cc9 100%);
    --gradient-3: linear-gradient(135deg, #7a6fb5 0%, #8b7fc8 100%);
    --gradient-4: linear-gradient(135deg, #9d8cc9 0%, #b3a5d6 100%);
}

/* Publication Card Styles */
.publication-card {
    background: #ffffff;
    border-radius: 15px;
    padding: 25px;
    margin: 25px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 5px solid var(--ai-primary);
    position: relative;
    overflow: hidden;
}

.publication-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.03) 0%, rgba(118, 75, 162, 0.03) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.publication-card:hover {
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.25);
    transform: translateY(-8px) scale(1.01);
    border-left-color: var(--ai-secondary);
}

.publication-card:hover::before {
    opacity: 1;
}

.publication-card img {
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.12);
    transition: all 0.4s ease;
}

.publication-card img:hover {
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    transform: scale(1.05);
}

/* News Section Styles */
.news-section {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8ecff 100%);
    border-radius: 15px;
    padding: 30px;
    margin: 25px 0;
    border-left: 5px solid var(--ai-accent);
    box-shadow: 0 4px 15px rgba(139, 127, 200, 0.15);
    transition: all 0.3s ease;
}

.news-section:hover {
    box-shadow: 0 8px 25px rgba(139, 127, 200, 0.25);
}

.news-section ul {
    list-style: none;
    padding-left: 0;
}

.news-section li {
    padding: 15px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
    transition: all 0.3s ease;
    border-radius: 8px;
}

.news-section li:last-child {
    border-bottom: none;
}

.news-section li:hover {
    padding-left: 20px;
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.08) 0%, transparent 100%);
    transform: translateX(5px);
}

/* Card Container Styles with enhanced effects */
.card-container {
    background: #ffffff;
    border-radius: 15px;
    padding: 28px;
    margin: 25px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 5px solid var(--ai-secondary);
    position: relative;
    overflow: hidden;
}

.card-container::after {
    content: '';
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: right 0.6s ease;
}

.card-container:hover {
    box-shadow: 0 10px 30px rgba(118, 75, 162, 0.18);
    transform: translateY(-5px);
}

.card-container:hover::after {
    right: 100%;
}

/* Working Papers List Styles with gradient accents */
.working-papers-list {
    background: linear-gradient(135deg, #f5f2ff 0%, #ebe5ff 100%);
    border-radius: 15px;
    padding: 30px;
    margin: 25px 0;
    box-shadow: 0 4px 15px rgba(139, 127, 200, 0.15);
    border-left: 5px solid var(--ai-accent);
    transition: all 0.3s ease;
}

.working-papers-list:hover {
    box-shadow: 0 8px 25px rgba(139, 127, 200, 0.25);
}

.working-papers-list ol,
.working-papers-list div > div {
    line-height: 1.9;
    color: #333;
}

/* Projects List Styles with gradient accents */
.projects-list {
    background: linear-gradient(135deg, #f8f6ff 0%, #ede9ff 100%);
    border-radius: 15px;
    padding: 30px;
    margin: 25px 0;
    box-shadow: 0 4px 15px rgba(122, 111, 181, 0.15);
    border-left: 5px solid #7a6fb5;
    transition: all 0.3s ease;
}

.projects-list:hover {
    box-shadow: 0 8px 25px rgba(122, 111, 181, 0.25);
}

.projects-list ol,
.projects-list div > div {
    line-height: 1.9;
    color: #333;
}

/* Conference Papers List with modern styling */
.conference-papers-list {
    background: linear-gradient(135deg, #fbf9ff 0%, #f2edff 100%);
    border-radius: 15px;
    padding: 30px;
    margin: 25px 0;
    box-shadow: 0 4px 15px rgba(157, 140, 201, 0.15);
    border-left: 5px solid #9d8cc9;
}

.conference-papers-list ul {
    list-style: none;
    padding-left: 0;
}

.conference-papers-list li {
    padding: 18px;
    margin: 12px 0;
    background: white;
    border-radius: 10px;
    transition: all 0.4s ease;
    border-left: 4px solid #9d8cc9;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.conference-papers-list li:hover {
    background: linear-gradient(135deg, #ffffff 0%, #f8f6ff 100%);
    box-shadow: 0 6px 20px rgba(157, 140, 201, 0.25);
    transform: translateX(8px) scale(1.02);
    border-left-color: #8b7fc8;
}

/* Section Headers with Icons - enhanced */
.section-header {
    display: flex;
    align-items: center;
    margin: 35px 0 25px;
    padding-bottom: 18px;
    border-bottom: 3px solid transparent;
    background: linear-gradient(to right, var(--ai-primary), var(--ai-secondary)) left bottom no-repeat;
    background-size: 100% 3px;
    animation: fadeInDown 0.6s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header i {
    font-size: 28px;
    margin-right: 15px;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.section-header h2 {
    margin: 0;
    border: none;
    padding: 0;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Icon Styles with modern gradient effects */
.ai-icon {
    display: inline-block;
    width: 48px;
    height: 48px;
    background: var(--gradient-1);
    border-radius: 50%;
    text-align: center;
    line-height: 48px;
    color: white;
    margin-right: 15px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    animation: float 3s ease-in-out infinite;
}

.ai-icon:hover {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6);
}

/* Education Card Styles with enhanced visuals */
.education-item {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border-left: 5px solid var(--ai-primary);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.education-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.6s ease;
}

.education-item:hover {
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.25);
    transform: translateX(8px) scale(1.02);
}

.education-item:hover::before {
    left: 100%;
}

.education-item i {
    color: var(--ai-primary);
    margin-right: 12px;
    font-size: 1.2em;
}

/* Work Experience Card Styles with enhanced visuals */
.work-experience-item {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border-left: 5px solid var(--ai-secondary);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.work-experience-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(118, 75, 162, 0.1), transparent);
    transition: left 0.6s ease;
}

.work-experience-item:hover {
    box-shadow: 0 10px 30px rgba(118, 75, 162, 0.25);
    transform: translateX(8px) scale(1.02);
}

.work-experience-item:hover::before {
    left: 100%;
}

.work-experience-item i {
    color: var(--ai-secondary);
    margin-right: 12px;
    font-size: 1.2em;
}

/* Professional Services Card with modern effects */
.professional-services-item {
    background: white;
    border-radius: 15px;
    padding: 20px 25px;
    margin: 12px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    border-left: 5px solid var(--ai-accent);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.professional-services-item:hover {
    box-shadow: 0 8px 20px rgba(139, 127, 200, 0.25);
    transform: translateX(8px);
    background: linear-gradient(135deg, #ffffff 0%, #f8f6ff 100%);
}

.professional-services-item i {
    color: var(--ai-accent);
    margin-right: 12px;
    font-size: 1.1em;
}

/* Timeline Enhancement with modern styling */
.timeline-entry {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 35px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 5px solid var(--ai-primary);
    position: relative;
}

.timeline-entry::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 20px;
    width: 16px;
    height: 16px;
    background: var(--gradient-1);
    border-radius: 50%;
    box-shadow: 0 0 0 4px white, 0 0 0 6px var(--ai-primary);
}

.timeline-entry:hover {
    box-shadow: 0 10px 35px rgba(102, 126, 234, 0.2);
    transform: translateX(15px);
    border-left-color: var(--ai-secondary);
}

/* AI Background Pattern with enhanced effects */
.ai-background {
    position: relative;
    overflow: hidden;
}

.ai-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(0, 212, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    animation: backgroundPulse 10s ease infinite;
}

@keyframes backgroundPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.ai-background > * {
    position: relative;
    z-index: 1;
}

/* Optional neural network pattern background */
.ai-network-bg {
    background-image: url('/images/ai-network-pattern.svg');
    background-repeat: repeat;
    background-size: 200px 200px;
    opacity: 0.03;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .publication-card table {
        display: block;
    }
    
    .publication-card td {
        display: block;
        width: 100% !important;
        text-align: center !important;
    }
    
    .publication-card img {
        max-width: 100%;
        height: auto;
    }
    
    .card-container {
        padding: 20px;
    }
    
    .section-header i {
        font-size: 22px;
    }
}

/* Badge Styles with modern gradients */
.badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin: 0 5px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.badge:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.badge-primary {
    background: var(--gradient-1);
    color: white;
}

.badge-success {
    background: var(--gradient-4);
    color: white;
}

.badge-warning {
    background: var(--gradient-2);
    color: white;
}

.badge-info {
    background: var(--gradient-3);
    color: white;
}

/* Highlight Effect with modern styling */
.highlight-text {
    background: linear-gradient(120deg, rgba(102, 126, 234, 0.25) 0%, rgba(118, 75, 162, 0.25) 100%);
    background-repeat: no-repeat;
    background-size: 100% 50%;
    background-position: 0 90%;
    padding: 3px 6px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.highlight-text:hover {
    background-size: 100% 100%;
    background-position: 0 0;
}

/* Link Styles with modern effects */
.styled-link {
    color: var(--ai-primary);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    padding-bottom: 2px;
}

.styled-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: width 0.3s ease;
}

.styled-link:hover {
    color: var(--ai-secondary);
}

.styled-link:hover::after {
    width: 100%;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Page fade-in animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page__content {
    animation: fadeInUp 0.6s ease;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--ai-secondary);
}
