:root {
    --dark-baltic: #014063;
    --mid-baltic: #0a6190;
    --slide-bg: #08162a;
    --slide-bg-2: #0d1f35;
    --accent-gold: #f5c842;
    --accent-teal: #00bfd8;
    --accent-green: #a8cc34;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.65);
    --text-muted: rgba(255, 255, 255, 0.35);
    --border: rgba(255, 255, 255, 0.08);
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --content-max-width: var(--content-max-width);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Public Sans", sans-serif;
    background: #000;
    color: var(--text-primary);
    overflow: hidden;
    user-select: text;
}

.deck {
    width: 100vw;
    height: 100vh;
    position: relative;
}

.slide {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    padding: 56px 72px 48px;
    background: var(--slide-bg);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    overflow: hidden;
}

.slide.active {
    opacity: 1;
    pointer-events: all;
}

/* Subtle grain texture overlay */
.slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

.slide > * {
    position: relative;
    z-index: 1;
}

/* Logo */
.logo {
    width: 90px;
    margin-bottom: auto;
    opacity: 0.9;
    flex-shrink: 0;
    mix-blend-mode: screen;
}

/* Section label */
.section-label {
    font-family: "Syne", sans-serif;
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent-gold);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-label::after {
    content: "";
    height: 1px;
    width: 32px;
    background: var(--accent-gold);
    opacity: 0.5;
}

/* Headlines */
h1 {
    font-family: "Syne", sans-serif;
    font-weight: 600;
    font-size: clamp(32px, 3.8vw, 56px);
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    max-width: var(--content-max-width);
}

.slide-title h1 {
    font-size: clamp(48px, 5.5vw, 80px);
}

h2 {
    font-family: "Syne", sans-serif;
    font-weight: 600;
    font-size: clamp(22px, 2.6vw, 38px);
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

h3 {
    font-family: "Syne", sans-serif;
    font-weight: 500;
    font-size: clamp(14px, 1.4vw, 20px);
    color: var(--accent-gold);
    margin-bottom: 8px;
    letter-spacing: 0.01em;
}

.highlight {
    color: var(--accent-gold);
}
.highlight-teal {
    color: var(--accent-teal);
}
.highlight-green {
    color: var(--accent-green);
}

p,
li {
    font-size: clamp(13px, 1.2vw, 17px);
    line-height: 1.65;
    color: var(--text-secondary);
    font-weight: 400;
}

ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 4px;
}

li {
    padding-left: 20px;
    position: relative;
}

li::before {
    content: " - ";
    position: absolute;
    left: 0;
    color: var(--accent-gold);
    opacity: 0.6;
    font-size: 12px;
    top: 3px;
}

.body-content {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    max-width: var(--content-max-width);
}

/* Cards */
.card-grid {
    display: grid;
    gap: 20px;
    margin-top: 20px;
}

.card-grid.cols-2 {
    grid-template-columns: 1fr 1fr;
}
.card-grid.cols-3 {
    grid-template-columns: 1fr 1fr 1fr;
}
.card-grid.cols-4 {
    grid-template-columns: 1fr 1fr 1fr 1fr;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: border-color 0.2s;
}

.card.highlighted {
    border-color: var(--accent-gold);
    background: rgba(245, 200, 66, 0.06);
}

.card.teal {
    border-color: var(--accent-teal);
    background: rgba(0, 191, 216, 0.05);
}

.card-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    font-family: "Public Sans", sans-serif;
}

.card h3 {
    font-size: clamp(13px, 1.3vw, 17px);
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0;
}

.card p {
    font-size: clamp(11px, 1.05vw, 14px);
}

/* Stat numbers */
.stat {
    font-family: "Syne", sans-serif;
    font-weight: 700;
    font-size: clamp(28px, 3.5vw, 52px);
    color: var(--accent-gold);
    line-height: 1;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 400;
    line-height: 1.4;
}

/* Two column layout */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 20px;
    align-items: start;
}

.col-header {
    font-family: "Syne", sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 8px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: inline-block;
}

.col-header.gold {
    background: rgba(245, 200, 66, 0.15);
    color: var(--accent-gold);
}
.col-header.teal {
    background: rgba(0, 191, 216, 0.12);
    color: var(--accent-teal);
}

/* Divider */
.divider {
    height: 1px;
    background: var(--border);
    margin: 24px 0;
}

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 24px;
}

th {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-align: left;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
}

td {
    font-size: clamp(12px, 1.1vw, 15px);
    color: var(--text-secondary);
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: top;
    line-height: 1.5;
}

td:first-child {
    color: var(--text-primary);
    font-weight: 500;
}

tr:last-child td {
    border-bottom: none;
}

/* Lifecycle diagram */
.lifecycle {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.lifecycle-stages {
    display: flex;
    align-items: stretch;
    gap: 0;
    position: relative;
    flex: 0 0 auto;
}

.stage {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.stage-box {
    width: 100%;
    padding: 12px 8px;
    border-radius: 8px;
    text-align: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-family: "Syne", sans-serif;
    font-size: clamp(10px, 1vw, 13px);
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    position: relative;
    z-index: 2;
}

.stage-box.neo4j-stage {
    background: rgba(245, 200, 66, 0.12);
    border-color: rgba(245, 200, 66, 0.4);
    color: var(--accent-gold);
}

.stage-arrow {
    position: absolute;
    right: -14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
    z-index: 3;
}

.swimlane-container {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 12px;
    align-items: center;
}

.swimlane-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-align: right;
    padding-right: 8px;
}

.swimlane-bar {
    height: 28px;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.swimlane-fill {
    position: absolute;
    top: 0;
    height: 100%;
    border-radius: 4px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    font-size: 10px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.neo4j-bar {
    width: 100%;
    height: 32px;
    background: linear-gradient(90deg, var(--dark-baltic), var(--mid-baltic));
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1px solid rgba(10, 97, 144, 0.6);
}

.feedback-arrow {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(168, 204, 52, 0.08);
    border: 1px dashed rgba(168, 204, 52, 0.3);
    border-radius: 6px;
    margin-top: 4px;
    font-size: 11px;
    color: var(--accent-green);
    font-weight: 500;
    letter-spacing: 0.04em;
}

/* Title slide specific */
.slide-title {
    background: var(--slide-bg);
    justify-content: space-between;
}

.title-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-bottom: 40px;
}

.title-eyebrow {
    font-family: "Syne", sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent-gold);
    margin-bottom: 24px;
}

.title-rule {
    width: 60px;
    height: 3px;
    background: var(--accent-gold);
    margin: 28px 0;
    border-radius: 2px;
}

.title-subtitle {
    font-size: clamp(14px, 1.4vw, 19px);
    color: var(--text-secondary);
    max-width: var(--content-max-width);
    line-height: 1.6;
    font-weight: 300;
}

/* Background shapes */
.bg-shape {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.bg-shape-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(10, 97, 144, 0.12) 0%, transparent 70%);
    right: -100px;
    top: -150px;
}

.bg-shape-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(1, 64, 99, 0.15) 0%, transparent 70%);
    left: -80px;
    bottom: -100px;
}

/* Navigation */
.nav {
    position: fixed;
    bottom: 28px;
    right: 40px;
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 100;
}

.slide-counter {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    font-family: "Public Sans", sans-serif;
    min-width: 48px;
    text-align: center;
}

.nav-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 14px;
}

.nav-btn:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    background: rgba(245, 200, 66, 0.08);
}

/* Section divider slide */
.slide-section {
    background: var(--dark-baltic);
    justify-content: center;
}

.slide-section h1 {
    font-size: clamp(48px, 6vw, 80px);
    max-width: var(--content-max-width);
}

.section-number {
    font-family: "Syne", sans-serif;
    font-size: clamp(80px, 14vw, 160px);
    font-weight: 700;
    color: rgba(255, 255, 255, 0.04);
    position: absolute;
    right: 60px;
    bottom: 40px;
    line-height: 1;
    letter-spacing: -0.05em;
}

/* Quote slide */
.quote-text {
    font-family: "Syne", sans-serif;
    font-size: clamp(22px, 2.8vw, 42px);
    font-weight: 500;
    line-height: 1.25;
    color: var(--text-primary);
    max-width: var(--content-max-width);
    letter-spacing: -0.01em;
}

.quote-source {
    margin-top: 24px;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 400;
}

/* Stage indicator */
.stage-indicator {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stage-pill {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-muted);
}

.stage-pill.active {
    background: rgba(245, 200, 66, 0.15);
    border-color: rgba(245, 200, 66, 0.4);
    color: var(--accent-gold);
}

/* Stat grid */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Key message banner */
.key-message {
    background: rgba(245, 200, 66, 0.08);
    border: 1px solid rgba(245, 200, 66, 0.2);
    border-radius: 8px;
    padding: 16px 24px;
    margin-top: 24px;
    font-size: clamp(12px, 1.15vw, 16px);
    color: var(--text-secondary);
    line-height: 1.6;
}

.key-message strong {
    color: var(--accent-gold);
}

/* Slide header row */
.slide-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 8px;
}

.logo-mark {
    width: 32px;
    height: 32px;
    opacity: 0.4;
    flex-shrink: 0;
    margin-top: 4px;
}

/* Progress bar */
.progress-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    height: 2px;
    background: var(--accent-gold);
    transition: width 0.4s ease;
    z-index: 100;
    opacity: 0.6;
}

/* Figure-eight decoration via external SVG backgrounds */
.slide::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: visible;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    opacity: 0.25;
}

.slide-title::after,
.slide-section::after {
    background-image: url("svg/f8-transitional.svg");
    opacity: 0.7;
}

.slide:not(.slide-title):not(.slide-section)::after {
    background-image: url("svg/f8-content.svg");
}

/* ===================================================
   Slide Navigator Drawer
   =================================================== */

.drawer-tab {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 200;
    width: 24px;
    height: 56px;
    border-radius: 0 8px 8px 0;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-left: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
        background 0.2s,
        color 0.2s,
        width 0.2s;
    padding: 0;
}

.drawer-tab:hover {
    background: rgba(245, 200, 66, 0.08);
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    width: 28px;
}

.drawer-tab-icon {
    font-size: 18px;
    line-height: 1;
    transition: transform 0.3s ease;
    display: block;
}

.drawer-tab.open .drawer-tab-icon {
    transform: rotate(180deg);
}

.drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 199;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.drawer-backdrop.visible {
    opacity: 1;
    pointer-events: all;
}

.drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 220px;
    background: var(--slide-bg);
    border-right: 1px solid var(--border);
    z-index: 201;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.drawer.open {
    transform: translateX(0);
}

.drawer-header {
    padding: 20px 16px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.drawer-title {
    font-family: "Syne", sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.drawer-count {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    font-family: "Public Sans", sans-serif;
}

.drawer-slides {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.drawer-slides::-webkit-scrollbar {
    width: 4px;
}
.drawer-slides::-webkit-scrollbar-track {
    background: transparent;
}
.drawer-slides::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

.drawer-thumb {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: none;
    border: 2px solid transparent;
    border-radius: 6px;
    padding: 4px;
    cursor: pointer;
    transition:
        border-color 0.2s,
        background 0.2s;
    text-align: left;
    width: 100%;
    flex-shrink: 0;
}

.drawer-thumb:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--card-border);
}

.drawer-thumb.active {
    border-color: var(--accent-gold);
    background: rgba(245, 200, 66, 0.06);
}

.drawer-thumb-number {
    font-family: "Public Sans", sans-serif;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    min-width: 18px;
    text-align: right;
    padding-top: 4px;
    flex-shrink: 0;
}

.drawer-thumb.active .drawer-thumb-number {
    color: var(--accent-gold);
}

.drawer-thumb-viewport {
    width: 160px;
    height: 90px;
    overflow: hidden;
    border-radius: 4px;
    position: relative;
    background: var(--slide-bg);
    flex-shrink: 0;
}

.drawer-thumb-content {
    width: 1920px;
    height: 1080px;
    transform: scale(0.08333);
    transform-origin: top left;
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}

.drawer-thumb-content .slide {
    position: relative !important;
    inset: auto !important;
    opacity: 1 !important;
    pointer-events: none !important;
    width: 1920px;
    height: 1080px;
    transition: none !important;
}

.drawer-thumb-content .slide::before,
.drawer-thumb-content .slide::after {
    display: none !important;
}

/* ===================================================
   Drawer Footer & Present Mode Button
   =================================================== */

.drawer-footer {
    flex-shrink: 0;
    border-top: 1px solid var(--border);
    padding: 12px;
}

.present-mode-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    font-family: "Public Sans", sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition:
        background 0.2s,
        color 0.2s,
        border-color 0.2s;
}

.present-mode-btn:hover {
    background: rgba(245, 200, 66, 0.08);
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

.present-mode-btn.active {
    background: rgba(245, 200, 66, 0.12);
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

/* ===================================================
   Presentation Mode — hide comment UI
   =================================================== */

body.present-mode .comment-toggle-btn,
body.present-mode .comment-panel,
body.present-mode .comment-toolbar,
body.present-mode .comment-new-input,
body.present-mode .comment-highlight,
body.present-mode .comment-indicator {
    display: none !important;
}

body.present-mode .drawer-tab {
    opacity: 0.3;
    transition: opacity 0.2s;
}

body.present-mode .drawer-tab:hover {
    opacity: 1;
}
