/* Custom animations and utilities */

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

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

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

::-webkit-scrollbar-track {
    background: transparent;
}

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

.dark ::-webkit-scrollbar-thumb {
    background-color: #475569;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #94a3b8;
}

/* Line clamp utility */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Print styles */
@media print {
    body {
        background: white !important;
        color: black !important;
    }
    
    nav, footer, .no-print {
        display: none !important;
    }
    
    main {
        padding-top: 0 !important;
    }
    
    a {
        text-decoration: none !important;
        color: black !important;
    }
    
    .dark\:bg-slate-950 {
        background-color: white !important;
    }
    
    .dark\:text-white {
        color: black !important;
    }
    
    .dark\:text-slate-400 {
        color: #4b5563 !important;
    }
    
    .dark\:text-slate-300 {
        color: #374151 !important;
    }
    
    .dark\:border-slate-800 {
        border-color: #e5e7eb !important;
    }
}

/* Code block styling enhancements */
pre {
    overflow-x: auto;
    position: relative;
}

pre code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.7;
}

/* Table styling */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.dark th, .dark td {
    border-bottom-color: #334155;
}

th {
    font-weight: 600;
    background-color: #f8fafc;
}

.dark th {
    background-color: #1e293b;
}

/* Selection color */
::selection {
    background-color: #3b82f6;
    color: white;
}
