/* Main CSS file for davydany.com */

/* Navigation styles */
.nav-link {
    @apply text-gray-600 hover:text-gray-900 px-3 py-2 rounded-md text-sm font-medium transition-colors duration-200;
}

.nav-link.active {
    @apply text-primary-600 bg-primary-50;
}

.mobile-nav-link {
    @apply text-gray-600 hover:text-gray-900 hover:bg-gray-50 block px-3 py-2 rounded-md text-base font-medium transition-colors duration-200;
}

.mobile-nav-link.active {
    @apply text-primary-600 bg-primary-50;
}

/* Custom animations */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes scale-in {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Animation classes */
.animate-fade-in {
    animation: fade-in 0.6s ease-out forwards;
}

.animate-slide-up {
    animation: slide-up 0.6s ease-out forwards;
}

.animate-slide-down {
    animation: slide-down 0.3s ease-out forwards;
}

.animate-scale-in {
    animation: scale-in 0.3s ease-out forwards;
}

/* Custom utility classes */
.text-balance {
    text-wrap: balance;
}

.transition-base {
    transition: all 0.2s ease;
}

.transition-smooth {
    transition: all 0.3s ease;
}

/* Focus styles for better accessibility */
.focus-ring {
    @apply focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2;
}

/* Custom button styles */
.btn-base {
    @apply inline-flex items-center justify-center px-4 py-2 border border-transparent text-sm font-medium rounded-md transition-colors duration-200 focus-ring;
}

.btn-primary {
    @apply btn-base text-white bg-primary-600 hover:bg-primary-700;
}

.btn-secondary {
    @apply btn-base text-primary-600 bg-white border-primary-600 hover:bg-primary-50;
}

.btn-outline {
    @apply btn-base text-gray-700 bg-white border-gray-300 hover:bg-gray-50;
}

/* Card styles */
.card {
    @apply bg-white rounded-lg shadow-md border border-gray-200 overflow-hidden;
}

.card-hover {
    @apply card transition-all duration-300 hover:shadow-lg hover:-translate-y-1;
}

/* Content styles */
.prose-custom {
    @apply prose prose-gray max-w-none;
}

.prose-custom h1,
.prose-custom h2,
.prose-custom h3,
.prose-custom h4 {
    @apply text-gray-900 font-semibold;
}

.prose-custom a {
    @apply text-primary-600 no-underline hover:underline;
}

.prose-custom code {
    @apply bg-gray-100 text-gray-800 px-1.5 py-0.5 rounded text-sm;
}

.prose-custom pre {
    @apply bg-gray-900 text-gray-100 rounded-lg;
}

/* Responsive typography */
.text-responsive-xl {
    @apply text-xl sm:text-2xl lg:text-3xl;
}

.text-responsive-2xl {
    @apply text-2xl sm:text-3xl lg:text-4xl;
}

.text-responsive-3xl {
    @apply text-3xl sm:text-4xl lg:text-5xl;
}

/* Loading states */
.loading-skeleton {
    @apply bg-gray-200 animate-pulse rounded;
}

.loading-shimmer {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes shine {
    0% { transform: translateX(-100%) skewX(-12deg); }
    100% { transform: translateX(200%) skewX(-12deg); }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .print-break-before {
        page-break-before: always;
    }
    
    .print-break-after {
        page-break-after: always;
    }
    
    .print-avoid-break {
        page-break-inside: avoid;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    a {
        color: inherit !important;
        text-decoration: none !important;
    }
    
    .bg-primary-600,
    .bg-primary-700,
    .bg-primary-500 {
        background-color: #374151 !important;
    }
}

/* Dark mode support (for future implementation) */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #1f2937;
        --text-primary: #f9fafb;
        --border-primary: #374151;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        @apply border-2 border-gray-900;
    }
    
    .btn-primary {
        @apply border-2 border-primary-900;
    }
}

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

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

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

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

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

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}