/* ============================================================
   ml@cl Reveal.js Theme (white background)
   Matches the visual language of https://mlatcl.github.io
   Structure mirrors ai-cam.css.

   Usage in frontmatter:
     talktheme: white
     talkcss:   mlatcl.css

   Brand palette (from jekyll-theme _settings.scss):
     Primary navy  : #031927
     Primary dark  : #101827
     Accent blue   : #1E537B
     Accent orange : #DB3900
     Cream         : #F4F5F0
     Dark cream    : #D0D2C6
     Body text     : #2A2A2A
     Muted text    : #6A6A6A
   ============================================================ */

/* -- Fonts ----------------------------------------------------------------
   Site: DM Sans (headers), Lato (body), Space Grotesk / Space Mono (alts). */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Lato:ital,wght@0,400;0,700;1,400&display=swap');

/* -- Base slides ---------------------------------------------------------- */
.reveal {
    font-family: 'Lato', 'Helvetica Neue', Arial, sans-serif;
    font-size: 32px;
    color: #2A2A2A;
    background-color: #ffffff;
}

.reveal .slides {
    text-align: left !important;
}

.reveal .slides > section {
    text-align: left !important;
    /* Brand chrome is on the full-page .slide-background layer */
    background: transparent;
}

/*
 * Full-page colour + brand chrome live on .slide-background (outside the
 * scaled slide; see https://revealjs.com/backgrounds/). That layer does not
 * receive Reveal's scale transform, so sizes use --slide-scale (set from
 * Reveal.getScale() in slides-header.html).
 */
.reveal .slide-background {
    background-color: #ffffff !important;
    background-image:
        url('diagrams/logos/mlatcl-logo-dark.svg'),
        url('diagrams/logos/mlatcl-materials/mlatcl-mark-br.svg') !important;
    background-repeat: no-repeat, no-repeat !important;
    background-position:
        left calc(1.5rem * var(--slide-scale, 1)) top calc(1.25rem * var(--slide-scale, 1)),
        right calc(-2% * var(--slide-scale, 1)) bottom calc(-4% * var(--slide-scale, 1)) !important;
    background-size:
        calc(168px * var(--slide-scale, 1)) auto,
        calc(min(28vw, 280px) * var(--slide-scale, 1)) auto !important;
}

/* Reveal white theme sets ul/ol to inline-block, which centres them when
   the parent is text-align:center. Force block so lists sit left. */
.reveal ol,
.reveal dl,
.reveal ul {
    display: block !important;
    text-align: left !important;
    margin: 0.2em 0 0.6em 0 !important;
}

/* -- Headings ------------------------------------------------------------- */
.reveal h1,
.reveal h2,
.reveal h3,
.reveal h4 {
    font-family: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 700;
    text-transform: none;
    letter-spacing: -0.02em;
    color: #031927;
}

.reveal h1 {
    font-size: 1.85em;
    font-weight: 700;
}

.reveal h2 {
    font-size: 1.35em;
    font-weight: 700;
    color: #031927;
    margin-top: 0;
    margin-bottom: 0.55em;
    padding-bottom: 0.25em;
    border-bottom: 3px solid #DB3900;
    display: inline-block;
}

.reveal h3 {
    font-size: 1.05em;
    color: #031927;
}

/* -- Title slide (default, no cover-image) -------------------------------- */
.reveal section#title-slide {
    text-align: left !important;
}

.reveal section#title-slide h1.title {
    font-size: 2.1em;
    font-weight: 700;
    font-family: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
    color: #031927;
    text-align: left;
    line-height: 1.15;
    margin: 2.2rem 0 0.5rem 0;
    box-shadow: inset 0 -0.35rem 0 0 #DB3900;
    padding-bottom: 0.55rem;
    display: inline-block;
}

.reveal section#title-slide p.subtitle {
    font-size: 0.95em;
    font-weight: 600;
    color: #031927;
    opacity: 0.85;
    text-align: left !important;
    margin: 0.2rem 0 1.2rem 0;
}

.reveal section#title-slide p.author,
.reveal section#title-slide p.date,
.reveal section#title-slide p.venue {
    font-size: 0.72em;
    color: #6A6A6A;
    text-align: left !important;
    margin: 0.15rem 0;
}

.reveal section#title-slide p.author {
    font-weight: 600;
    color: #031927;
    margin-top: 1.4rem;
}

/* -- Cover slide (when cover-image is set; reuses Trent template markup) -- */
.reveal section#title-slide.trent-cover {
    display: grid !important;
    grid-template-columns: 58% 42%;
    align-items: stretch;
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    text-align: left;
    top: 0 !important;
    left: 0 !important;
    margin: 0 !important;
    background: transparent;
}

.reveal section#title-slide.trent-cover::after {
    content: none;
}

.reveal section#title-slide.trent-cover .trent-title-content {
    background: linear-gradient(155deg, #F4F5F0 0%, #ffffff 55%, #E8ECE4 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.5rem 2rem 2.5rem 2.5rem;
    position: relative;
    min-height: 100%;
}

/* Logo lives on .slide-background; hide the cover markup slot */
.reveal section#title-slide.trent-cover .trent-logo {
    display: none;
}

.reveal section#title-slide.trent-cover h1.title {
    font-size: 2.0em;
    font-weight: 700;
    color: #031927;
    line-height: 1.18;
    text-align: left;
    text-shadow: none;
    margin: 2.5rem 0 0.55rem 0;
}

.reveal section#title-slide.trent-cover p.subtitle {
    font-size: 0.85em;
    font-weight: 600;
    color: #031927;
    opacity: 0.8;
    text-align: left;
    margin: 0.2rem 0 0.5rem 0;
}

.reveal section#title-slide.trent-cover p.date,
.reveal section#title-slide.trent-cover p.venue {
    font-size: 0.68em;
    color: #6A6A6A;
    text-align: left;
    margin: 0.15rem 0;
}

.reveal section#title-slide.trent-cover .trent-cover-photo {
    background: #031927;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.8rem;
}

.reveal section#title-slide.trent-cover .trent-photo-card {
    width: 78%;
    border-radius: 1.1rem;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
    margin-bottom: 0.9rem;
    border: 3px solid #DB3900;
}

.reveal section#title-slide.trent-cover .trent-photo-card img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.reveal section#title-slide.trent-cover .trent-speaker-name {
    font-size: 0.75em;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    margin: 0.2rem 0 0 0;
}

.reveal section#title-slide.trent-cover .trent-speaker-role {
    font-size: 0.62em;
    color: #D0D2C6;
    text-align: center;
    margin: 0.1rem 0;
}

/* -- Lists ---------------------------------------------------------------- */
.reveal ul,
.reveal ol {
    margin-left: 0 !important;
    padding-left: 0;
    line-height: 1.55;
}

.reveal ul {
    list-style: none;
}

.reveal ul li {
    position: relative;
    padding-left: 0;
    margin-bottom: 0.4em;
}

.reveal ul li::before {
    content: '';
    display: inline-block;
    width: 0.42em;
    height: 0.42em;
    margin-right: 0.55em;
    border-radius: 50%;
    background: #DB3900;
    box-shadow: inset 0 0 0 0.08em #031927;
    vertical-align: 0.12em;
}

/* -- Blockquotes ---------------------------------------------------------- */
.reveal blockquote {
    border-left: 4px solid #DB3900;
    background: #F4F5F0;
    color: #031927;
    padding: 0.55em 1em;
    font-style: normal;
    font-weight: 600;
    width: 92%;
    box-shadow: none;
    font-size: 0.92em;
    margin: 0.5em 0;
}

/* -- Inline code & code blocks -------------------------------------------- */
.reveal code {
    background: #F4F5F0;
    color: #031927;
    padding: 0.1em 0.3em;
    border-radius: 3px;
    font-size: 0.82em;
}

.reveal pre {
    box-shadow: 0 2px 10px rgba(3, 25, 39, 0.12);
    border-radius: 8px;
    border-left: 4px solid #DB3900;
}

.reveal pre code {
    background: #031927;
    color: #f8f8f2;
    font-size: 0.75em;
    padding: 0.8em 1em;
}

/* -- Links ---------------------------------------------------------------- */
.reveal a {
    color: #1E537B;
    text-decoration: none;
}

.reveal a:hover {
    color: #DB3900;
    text-decoration: underline;
}

/* -- Progress bar --------------------------------------------------------- */
.reveal .progress {
    background: rgba(3, 25, 39, 0.12);
    color: #DB3900;
}

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

/* -- Controls ------------------------------------------------------------- */
.reveal .controls {
    color: #031927;
}

/* -- Tables --------------------------------------------------------------- */
.reveal table {
    border-collapse: collapse;
    font-size: 0.8em;
}

.reveal table th {
    background: #031927;
    color: white;
    padding: 0.4em 0.8em;
    font-weight: 700;
}

.reveal table td {
    padding: 0.35em 0.8em;
    border-bottom: 1px solid #D8D8D8;
}

.reveal table tr:nth-child(even) td {
    background: #F4F5F0;
}

/* -- Utility classes ------------------------------------------------------ */
.reveal .slides section.scrollable {
    overflow-y: auto !important;
    height: 100% !important;
    top: 0 !important;
    text-align: left;
}

.reveal p {
    text-align: left;
}

.reveal li {
    text-align: left;
}

/* Cream panel helper for callouts */
.reveal .mlatcl-panel {
    background: #D0D2C6;
    color: #031927;
    padding: 0.8em 1em;
    border-radius: 0.6rem;
    font-weight: 600;
}
