/* Custom CSS for Nikhil Srinivasan Website */

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

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

.animate-marquee {
    animation: marquee 30s linear infinite;
}

/* Pause marquee on hover */
.animate-marquee:hover {
    animation-play-state: paused;
}

/* Card hover effects */
.hover\:scale-\[1\.02\]:hover {
    transform: scale(1.02);
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, #BA0C2F 0%, #ff4d6d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glassmorphism nav */
nav {
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

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

/* Focus states for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #BA0C2F;
    outline-offset: 2px;
}

/* Selection color */
::selection {
    background: #BA0C2F;
    color: white;
}

/* Transition for all interactive elements */
a, button {
    transition: all 0.2s ease-in-out;
}

/* Table styles for teaching page */
.course-table {
    width: 100%;
    border-collapse: collapse;
}

.course-table th,
.course-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.course-table th {
    font-weight: 600;
    color: #374151;
    background: #f9fafb;
}

.course-table tbody tr:hover {
    background: #f9fafb;
}

/* Timeline styles */
.timeline-item {
    position: relative;
    padding-left: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 0.5rem;
    height: 0.5rem;
    background: #BA0C2F;
    border-radius: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: 0.1875rem;
    top: 1.25rem;
    width: 2px;
    height: calc(100% - 0.5rem);
    background: #e5e7eb;
}

.timeline-item:last-child::after {
    display: none;
}

/* Publication card hover */
.publication-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.publication-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Loading animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Hero gradient background option */
.hero-gradient {
    background: linear-gradient(135deg, #fafafa 0%, #f0f0f0 100%);
}

/* Badge styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
}

.badge-red {
    background: rgba(186, 12, 47, 0.1);
    color: #BA0C2F;
}

.badge-blue {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.badge-green {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .animate-marquee {
        animation-duration: 20s;
    }
}

/* Print styles */
@media print {
    nav, footer, .no-print {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    a {
        color: black;
        text-decoration: underline;
    }
}
