/**
 * Scolvia Custom Styles
 * Supplement to Tailwind CSS
 */

/* Typography */
body {
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

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

/* Custom Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.animate-slide-in-right {
    animation: slideInRight 0.5s ease-out forwards;
}

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

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Card Hover Effects */
.card-hover {
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}

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

/* Navigation Link Underline */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #4f46e5;
    transition: width 0.3s ease;
}

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

/* Prose Styles for Blog Content */
.prose h1, .prose h2, .prose h3, .prose h4 {
    color: #0f172a;
    font-weight: 700;
    margin-top: 2em;
    margin-bottom: 1em;
}

.prose h1 { font-size: 2.25em; }
.prose h2 { font-size: 1.75em; }
.prose h3 { font-size: 1.375em; }
.prose h4 { font-size: 1.125em; }

.prose p {
    margin-bottom: 1.5em;
    line-height: 1.75;
}

.prose ul, .prose ol {
    margin-bottom: 1.5em;
    padding-left: 1.5em;
}

.prose li {
    margin-bottom: 0.5em;
}

.prose a {
    color: #4f46e5;
    text-decoration: underline;
}

.prose a:hover {
    color: #4338ca;
}

.prose blockquote {
    border-left: 4px solid #e2e8f0;
    padding-left: 1em;
    margin-left: 0;
    margin-right: 0;
    font-style: italic;
    color: #64748b;
}

.prose code {
    background-color: #f1f5f9;
    padding: 0.2em 0.4em;
    border-radius: 0.25em;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.875em;
}

.prose pre {
    background-color: #1e293b;
    color: #f1f5f9;
    padding: 1em;
    border-radius: 0.5em;
    overflow-x: auto;
    margin-bottom: 1.5em;
}

.prose pre code {
    background-color: transparent;
    padding: 0;
}

/* Line Clamp Utility */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

/* Print Styles */
@media print {
    header, footer, .no-print {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .prose a {
        color: black;
        text-decoration: underline;
    }
}

/* Reduce Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Focus Visible */
:focus-visible {
    outline: 2px solid #4f46e5;
    outline-offset: 2px;
}

/* Selection Color */
::selection {
    background-color: #c7d2fe;
    color: #1e1b4b;
}
