/* ============================================================
   ai@cam Reveal.js Theme (white background)
   Matches the visual language of https://ai.cam.ac.uk

   Usage in frontmatter:
     talktheme: white
     talkcss:   ai-cam.css

   Brand palette (from site CSS variables):
     Primary navy  : #05385E
     Mint accent   : #88E7C5
     Soft lavender : #BEC2E3
     News cream    : #FBF6F5
     Body text     : #212529
     Muted text    : #6c757d
   ============================================================ */

/* -- Fonts ----------------------------------------------------------------
   Site uses Mark Pro / Gilroy (proprietary). Plus Jakarta Sans is a close
   open geometric sans available via Google Fonts. */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

/* -- Base slides ---------------------------------------------------------- */
.reveal {
    font-family: 'Plus Jakarta Sans', 'Helvetica Neue', Arial, sans-serif;
    font-size: 32px;
    color: #212529;
    background-color: #ffffff;
}

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

.reveal .slides > section {
    text-align: left !important;
    /* Content sits in the scaled slide; chrome belongs on .slide-background */
    background: transparent;
}

/*
 * Reveal.js full-page backgrounds live on .slide-background — outside the
 * scaled slide content (see https://revealjs.com/backgrounds/).
 * That is the correct layer for viewport-stable brand chrome.
 */
.reveal .slide-background {
    background-color: #ffffff !important;
    background-image:
        url('diagrams/logos/ai-cam-logo-dark.svg'),
        url('diagrams/logos/ai-cam-materials/turing-corner-br.svg') !important;
    background-repeat: no-repeat, no-repeat !important;
    background-position:
        left 1.5rem top 1.25rem,
        right -2% bottom -5% !important;
    background-size:
        168px auto,
        min(42vw, 520px) 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: 'Plus Jakarta Sans', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 700;
    text-transform: none;
    letter-spacing: -0.02em;
    color: #05385E;
}

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

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

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

/* -- 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: 800;
    color: #05385E;
    text-align: left;
    line-height: 1.15;
    margin: 2.2rem 0 0.5rem 0;
    box-shadow: inset 0 -0.35rem 0 0 #88E7C5;
    padding-bottom: 0.55rem;
    display: inline-block;
}

.reveal section#title-slide p.subtitle {
    font-size: 0.95em;
    font-weight: 600;
    color: #05385E;
    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: #6c757d;
    text-align: left !important;
    margin: 0.15rem 0;
}

.reveal section#title-slide p.author {
    font-weight: 600;
    color: #05385E;
    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, #FBF6F5 0%, #ffffff 55%, #E8F9F3 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.5rem 2rem 2.5rem 2.5rem;
    position: relative;
    min-height: 100%;
}

/* Section ::before logo covers branding; hide the template logo 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: 800;
    color: #05385E;
    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: #05385E;
    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: #6c757d;
    text-align: left;
    margin: 0.15rem 0;
}

.reveal section#title-slide.trent-cover .trent-cover-photo {
    background: #05385E;
    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 #88E7C5;
}

.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: #88E7C5;
    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: #88E7C5;
    box-shadow: inset 0 0 0 0.08em #05385E;
    vertical-align: 0.12em;
}

/* -- Blockquotes ---------------------------------------------------------- */
.reveal blockquote {
    border-left: 4px solid #88E7C5;
    background: #FBF6F5;
    color: #05385E;
    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: #FBF6F5;
    color: #05385E;
    padding: 0.1em 0.3em;
    border-radius: 3px;
    font-size: 0.82em;
}

.reveal pre {
    box-shadow: 0 2px 10px rgba(5, 56, 94, 0.12);
    border-radius: 8px;
    border-left: 4px solid #88E7C5;
}

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

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

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

/* -- Progress bar --------------------------------------------------------- */
.reveal .progress {
    background: rgba(5, 56, 94, 0.12);
    color: #88E7C5;
}

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

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

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

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

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

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

/* -- 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;
}

/* Soft lavender panel helper for callouts */
.reveal .aicam-panel {
    background: #BEC2E3;
    color: #05385E;
    padding: 0.8em 1em;
    border-radius: 0.6rem;
    font-weight: 600;
}
