/* ============================================
   Documentation Slides - Reveal.js Customization
   ============================================ */

/* Import modern fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* Page background - match reveal background */
body:has(.reveal) {
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/* Make reveal.js fit below navbar */
.reveal {
    height: calc(100vh - 70px) !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Custom slide content styling */
.reveal .slides {
    text-align: left;
}

.reveal .slides section {
    padding: 2rem 3rem !important;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
}

/* Headings - modern styling */
.reveal h1,
.reveal h2,
.reveal h3,
.reveal h4 {
    text-transform: none;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.reveal h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.reveal h2 {
    font-size: 1.6rem;
    margin-bottom: 0.9rem;
}

.reveal h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

.reveal h4 {
    font-size: 1.1rem;
    margin-bottom: 0.6rem;
    font-weight: 600;
}

/* Paragraphs and lists - better spacing */
.reveal p {
    margin: 0 0 0.8rem;
    line-height: 1.6;
    font-size: 0.9rem;
}

.reveal ul,
.reveal ol {
    margin: 0 0 0.8rem;
    padding-left: 1.5rem;
}

.reveal li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
    font-size: 0.85rem;
}

.reveal ul li::marker {
    font-size: 0.7rem;
}

/* Strong text */
.reveal strong {
    font-weight: 600;
    opacity: 0.95;
}

/* Links - modern hover effect */
.reveal a {
    text-decoration: none;
    position: relative;
    transition: all 0.2s ease;
}

.reveal a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.reveal a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Code blocks - modern monospace */
.reveal code {
    padding: 0.15em 0.4em;
    font-size: 0.8em;
    border-radius: 4px;
    font-family: 'JetBrains Mono', 'SF Mono', Monaco, 'Cascadia Code', monospace;
    font-weight: 500;
}

.reveal pre {
    width: 100%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin: 0.8rem 0;
    border-radius: 8px;
}

.reveal pre code {
    padding: 1rem;
    max-height: 400px;
    overflow: auto;
    font-size: 0.75rem;
    line-height: 1.5;
}

/* Blockquotes - modern card style */
.reveal blockquote {
    padding: 0.8rem 1.2rem;
    margin: 0.8rem 0;
    border-left: 4px solid;
    border-radius: 6px;
    font-style: normal;
    font-size: 0.85rem;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
}

.reveal blockquote::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 10px;
    font-size: 3rem;
    opacity: 0.1;
    font-family: Georgia, serif;
}

/* Tables - compact and modern */
.reveal table {
    margin: 0.8rem 0;
    border-collapse: collapse;
    font-size: 0.75rem;
    border-radius: 8px;
    overflow: hidden;
}

.reveal th,
.reveal td {
    padding: 0.5rem 0.75rem;
    border: 1px solid;
}

.reveal th {
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Images - modern presentation */
.reveal img {
    max-width: 100%;
    max-height: 400px;
    height: auto;
    border-radius: 8px;
    margin: 0.8rem 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Controls customization - larger and more visible */
.reveal .controls {
    bottom: 2.5rem;
    right: 2rem;
}

.reveal .controls button {
    width: 32px;
    height: 32px;
}

/* Progress bar - thicker and animated */
.reveal .progress {
    height: 4px;
    background: rgba(0, 0, 0, 0.08);
}

.reveal .progress span {
    transition: width 0.5s cubic-bezier(0.26, 0.86, 0.44, 0.985);
}

/* Slide number - modern badge */
.reveal .slide-number {
    font-size: 0.8rem;
    font-weight: 500;
    background-color: rgba(0, 0, 0, 0.15);
    padding: 0.4rem 0.7rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    bottom: 2.5rem;
    right: 8rem;
}

/* Slide transitions - smooth animations */
.reveal .slides section {
    transition: transform 0.6s cubic-bezier(0.26, 0.86, 0.44, 0.985),
                opacity 0.6s cubic-bezier(0.26, 0.86, 0.44, 0.985);
}

/* Fragment animations */
.reveal .slides section .fragment {
    transition: all 0.3s ease;
}

/* Light theme (default) */
[data-bs-theme="light"] body:has(.reveal),
html:not([data-bs-theme="dark"]) body:has(.reveal) {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

[data-bs-theme="light"] .reveal,
html:not([data-bs-theme="dark"]) .reveal {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

[data-bs-theme="light"] .reveal .slides section,
html:not([data-bs-theme="dark"]) .reveal .slides section {
    background: rgba(255, 255, 255, 0.95);
    color: #2d3748;
    backdrop-filter: blur(10px);
}

[data-bs-theme="light"] .reveal h1,
html:not([data-bs-theme="dark"]) .reveal h1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-bs-theme="light"] .reveal h2,
[data-bs-theme="light"] .reveal h3,
[data-bs-theme="light"] .reveal h4,
html:not([data-bs-theme="dark"]) .reveal h2,
html:not([data-bs-theme="dark"]) .reveal h3,
html:not([data-bs-theme="dark"]) .reveal h4 {
    color: #1a202c;
}

[data-bs-theme="light"] .reveal a,
html:not([data-bs-theme="dark"]) .reveal a {
    color: #667eea;
}

[data-bs-theme="light"] .reveal a::after,
html:not([data-bs-theme="dark"]) .reveal a::after {
    background: #667eea;
}

[data-bs-theme="light"] .reveal code,
html:not([data-bs-theme="dark"]) .reveal code {
    background: rgba(102, 126, 234, 0.1);
    color: #764ba2;
}

[data-bs-theme="light"] .reveal pre,
html:not([data-bs-theme="dark"]) .reveal pre {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
}

[data-bs-theme="light"] .reveal pre code,
html:not([data-bs-theme="dark"]) .reveal pre code {
    background: transparent;
    color: #2d3748;
}

[data-bs-theme="light"] .reveal blockquote,
html:not([data-bs-theme="dark"]) .reveal blockquote {
    background: rgba(102, 126, 234, 0.05);
    border-left-color: #667eea;
    color: #4a5568;
}

[data-bs-theme="light"] .reveal th,
[data-bs-theme="light"] .reveal td,
html:not([data-bs-theme="dark"]) .reveal th,
html:not([data-bs-theme="dark"]) .reveal td {
    border-color: #e2e8f0;
}

[data-bs-theme="light"] .reveal th,
html:not([data-bs-theme="dark"]) .reveal th {
    background: #f7fafc;
    color: #4a5568;
}

[data-bs-theme="light"] .reveal .progress span,
html:not([data-bs-theme="dark"]) .reveal .progress span {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

[data-bs-theme="light"] .reveal .controls button,
html:not([data-bs-theme="dark"]) .reveal .controls button {
    color: #667eea;
}

/* Dark theme */
[data-bs-theme="dark"] body:has(.reveal) {
    background: linear-gradient(135deg, #1a1d23 0%, #252932 100%);
}

[data-bs-theme="dark"] .reveal {
    background: linear-gradient(135deg, #1a1d23 0%, #252932 100%);
}

[data-bs-theme="dark"] .reveal .slides section {
    background: rgba(37, 41, 50, 0.95);
    color: #e4e6eb;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

[data-bs-theme="dark"] .reveal h1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-bs-theme="dark"] .reveal h2,
[data-bs-theme="dark"] .reveal h3,
[data-bs-theme="dark"] .reveal h4 {
    color: #f7fafc;
}

[data-bs-theme="dark"] .reveal a {
    color: #8b9ef6;
}

[data-bs-theme="dark"] .reveal a::after {
    background: #8b9ef6;
}

[data-bs-theme="dark"] .reveal code {
    background: rgba(139, 158, 246, 0.15);
    color: #c4b5fd;
}

[data-bs-theme="dark"] .reveal pre {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .reveal pre code {
    background: transparent;
    color: #e4e6eb;
}

[data-bs-theme="dark"] .reveal blockquote {
    background: rgba(139, 158, 246, 0.1);
    border-left-color: #8b9ef6;
    color: #cbd5e0;
}

[data-bs-theme="dark"] .reveal th,
[data-bs-theme="dark"] .reveal td {
    border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .reveal th {
    background: rgba(0, 0, 0, 0.2);
    color: #cbd5e0;
}

[data-bs-theme="dark"] .reveal .progress span {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

[data-bs-theme="dark"] .reveal .controls button {
    color: #8b9ef6;
}

[data-bs-theme="dark"] .reveal .slide-number {
    background-color: rgba(255, 255, 255, 0.1);
    color: #e4e6eb;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .reveal h1 {
        font-size: 1.6rem;
    }
    
    .reveal h2 {
        font-size: 1.3rem;
    }
    
    .reveal h3 {
        font-size: 1.1rem;
    }
    
    .reveal .slides section {
        padding: 1.5rem 2rem !important;
    }
    
    .reveal p,
    .reveal li {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .reveal .slides section {
        padding: 1rem 1.5rem !important;
    }
    
    .reveal .controls {
        bottom: 1rem;
        right: 1rem;
    }
    
    .reveal .slide-number {
        bottom: 1rem;
        left: 1rem;
        right: auto;
        font-size: 0.7rem;
        padding: 0.3rem 0.5rem;
    }
}

/* Print styles */
@media print {
    .reveal .slides section {
        page-break-after: always;
        box-shadow: none;
    }
}
