/* Colloquium Default Theme */

/* ===== Custom Properties ===== */
:root {
    --colloquium-bg: #ffffff;
    --colloquium-text: #1a1a2e;
    --colloquium-heading: #16213e;
    --colloquium-accent: #0f3460;
    --colloquium-link: #e94560;
    --colloquium-code-bg: #f4f4f8;
    --colloquium-code-text: #1a1a2e;
    --colloquium-muted: #6b7280;
    --colloquium-border: #e5e7eb;
    --colloquium-progress-bg: #e5e7eb;
    --colloquium-progress-fill: #0f3460;

    --colloquium-font-body: "Inter", "Helvetica Neue", Arial, sans-serif;
    --colloquium-font-heading: "Inter", "Helvetica Neue", Arial, sans-serif;
    --colloquium-font-mono: "JetBrains Mono", "Fira Code", "Consolas", monospace;

    --colloquium-slide-width: 1280px;
    --colloquium-slide-height: 720px;
    --colloquium-slide-padding: 60px;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: var(--colloquium-font-body);
    font-size: 24px;
    line-height: 1.5;
    color: var(--colloquium-text);
    background: var(--colloquium-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Slide Container ===== */
.colloquium-deck {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide {
    display: none;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: var(--colloquium-slide-padding);
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
}

.slide.active {
    display: flex;
}

/* ===== Typography ===== */
.slide h1 {
    font-family: var(--colloquium-font-heading);
    font-size: 2.2em;
    font-weight: 700;
    color: var(--colloquium-heading);
    margin-bottom: 0.4em;
    line-height: 1.2;
}

.slide h2 {
    font-family: var(--colloquium-font-heading);
    font-size: 1.6em;
    font-weight: 600;
    color: var(--colloquium-heading);
    margin-bottom: 0.5em;
    line-height: 1.3;
}

.slide h3 {
    font-family: var(--colloquium-font-heading);
    font-size: 1.2em;
    font-weight: 600;
    color: var(--colloquium-heading);
    margin-bottom: 0.4em;
}

.slide p {
    margin-bottom: 0.8em;
}

.slide p:last-child {
    margin-bottom: 0;
}

.slide strong {
    font-weight: 600;
}

.slide em {
    font-style: italic;
}

/* ===== Lists ===== */
.slide ul, .slide ol {
    margin-bottom: 0.8em;
    padding-left: 1.4em;
}

.slide li {
    margin-bottom: 0.3em;
}

.slide li::marker {
    color: var(--colloquium-accent);
}

/* ===== Links ===== */
.slide a {
    color: var(--colloquium-link);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.slide a:hover {
    border-bottom-color: var(--colloquium-link);
}

/* ===== Code ===== */
.slide code {
    font-family: var(--colloquium-font-mono);
    font-size: 0.85em;
    background: var(--colloquium-code-bg);
    padding: 0.15em 0.4em;
    border-radius: 4px;
}

.slide pre {
    background: var(--colloquium-code-bg);
    border-radius: 8px;
    padding: 1em 1.2em;
    margin-bottom: 0.8em;
    overflow-x: auto;
    font-size: 0.75em;
    line-height: 1.5;
}

.slide pre code {
    background: none;
    padding: 0;
    font-size: inherit;
}

/* ===== Images ===== */
.slide img {
    max-width: 100%;
    max-height: 60vh;
    border-radius: 4px;
    object-fit: contain;
}

/* ===== Tables ===== */
.slide table {
    border-collapse: collapse;
    margin-bottom: 0.8em;
    font-size: 0.9em;
}

.slide th, .slide td {
    border: 1px solid var(--colloquium-border);
    padding: 0.5em 0.8em;
    text-align: left;
}

.slide th {
    background: var(--colloquium-code-bg);
    font-weight: 600;
}

/* ===== Blockquotes ===== */
.slide blockquote {
    border-left: 4px solid var(--colloquium-accent);
    padding-left: 1em;
    margin-bottom: 0.8em;
    color: var(--colloquium-muted);
    font-style: italic;
}

/* ===== Horizontal Rule ===== */
.slide hr {
    border: none;
    border-top: 2px solid var(--colloquium-border);
    margin: 1em 0;
}

/* ===== Math (KaTeX) ===== */
.slide .katex-display {
    margin: 0.8em 0;
    overflow-x: auto;
}

/* ===== Layout: Title Slide ===== */
.slide--title {
    justify-content: center;
    align-items: center;
    text-align: center;
}

.slide--title.active {
    display: flex;
}

.slide--title h1 {
    font-size: 2.8em;
    margin-bottom: 0.3em;
}

.slide--title .slide-content p {
    font-size: 1.1em;
    color: var(--colloquium-muted);
}

/* ===== Layout: Section Break ===== */
.slide--section-break {
    justify-content: center;
    align-items: center;
    text-align: center;
    background: var(--colloquium-accent);
    color: #ffffff;
}

.slide--section-break.active {
    display: flex;
}

.slide--section-break h2 {
    color: #ffffff;
    font-size: 2.2em;
}

.slide--section-break .slide-content {
    color: rgba(255, 255, 255, 0.85);
}

/* ===== Layout: Two Column ===== */
.slide--two-column .slide-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2em;
    align-items: start;
    width: 100%;
}

/* ===== Layout: Image Left ===== */
.slide--image-left .slide-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2em;
    align-items: center;
    width: 100%;
}

.slide--image-left .slide-content img {
    max-height: 70vh;
}

/* ===== Layout: Image Right ===== */
.slide--image-right .slide-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2em;
    align-items: center;
    width: 100%;
}

.slide--image-right .slide-content img {
    max-height: 70vh;
    order: 2;
}

/* ===== Layout: Code ===== */
.slide--code pre {
    font-size: 0.7em;
    max-height: 70vh;
}

/* ===== Navigation UI ===== */
.colloquium-nav {
    position: fixed;
    bottom: 20px;
    right: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--colloquium-muted);
    z-index: 100;
    user-select: none;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.colloquium-nav:hover {
    opacity: 1;
}

.colloquium-counter {
    font-variant-numeric: tabular-nums;
}

/* ===== Progress Bar ===== */
.colloquium-progress {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--colloquium-progress-bg);
    z-index: 100;
}

.colloquium-progress-bar {
    height: 100%;
    background: var(--colloquium-progress-fill);
    transition: width 0.3s ease;
}

/* ===== Print / PDF Styles ===== */
@media print {
    html, body {
        width: auto;
        height: auto;
        overflow: visible;
        font-size: 18px;
    }

    .colloquium-deck {
        width: auto;
        height: auto;
        position: static;
    }

    .slide {
        display: flex !important;
        position: relative;
        width: 100%;
        height: auto;
        min-height: 720px;
        aspect-ratio: 16 / 9;
        page-break-after: always;
        page-break-inside: avoid;
        break-after: page;
        break-inside: avoid;
        border: 1px solid #eee;
        margin-bottom: 0;
    }

    .slide:last-child {
        page-break-after: auto;
    }

    .colloquium-nav,
    .colloquium-progress {
        display: none !important;
    }

    a {
        color: inherit !important;
        text-decoration: underline;
    }
}
