/* Tailwind CSS CDN fallback - Pre-compiled essential styles */
/* For production, use Tailwind CLI to generate optimized CSS */

@import url('https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css');

/* Custom styles */
:root {
    --color-primary: #4f46e5;
    --color-primary-dark: #4338ca;
}

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

/* Code highlighting overrides */
.highlight {
    background-color: #1f2937;
    border-radius: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
}

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

/* TOC styles */
.toc ul {
    list-style: none;
    padding-left: 0;
}

.toc ul ul {
    padding-left: 1.5rem;
}

.toc li {
    margin: 0.5rem 0;
}

.toc a {
    color: #4b5563;
    text-decoration: none;
}

.toc a:hover {
    color: var(--color-primary);
}

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

.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 0.75rem;
    height: 0.75rem;
    background-color: var(--color-primary);
    border-radius: 50%;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Prose typography styles for markdown content */
.prose h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #1f2937;
}

.prose h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #1f2937;
}

.prose p {
    margin-bottom: 1rem;
    line-height: 1.75;
}

.prose ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.prose li {
    margin-bottom: 0.5rem;
    line-height: 1.75;
}

.prose img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1.5rem auto;
    display: block;
    background-color: #ffffff;
    padding: 1rem;
    border: 1px solid #e5e7eb;
}

.prose strong {
    font-weight: 600;
    color: #1f2937;
}

.prose a {
    color: var(--color-primary);
    text-decoration: underline;
}

.prose a:hover {
    color: var(--color-primary-dark);
}

/* Mobile improvements */
@media (max-width: 640px) {
    .prose {
        font-size: 1rem;
    }

    /* Fix overlapping text in service/teaching tables on mobile */
    table.table-fixed {
        table-layout: auto;
    }

    table.table-fixed td {
        white-space: normal;
        word-break: break-word;
    }

    table.table-fixed colgroup {
        display: none;
    }
}

/* Print styles */
@media print {

    header,
    footer,
    nav {
        display: none;
    }

    .prose {
        max-width: 100%;
    }
}