/* ============================================
   FLIP 2026 — Federated Learning in Practice
   Bootstrap 5 + FLIP theme (blue → teal: collaboration in practice)
   ============================================ */

:root {
    --color-bg: #f6f8fc;
    --color-bg-alt: #eef2f9;
    --color-bg-card: #ffffff;
    --color-text: #0f172a;
    --color-text-muted: var(--color-text);
    --color-accent: #2563eb;
    --color-accent-hover: #1d4ed8;
    --color-accent-deep: #1e40af;
    --color-accent-light: #dbeafe;
    --color-accent-warm: #3b82f6;
    /* Secondary accent: deployment / “in practice” */
    --color-flip-teal: #0d9488;
    --color-flip-teal-muted: rgba(13, 148, 136, 0.14);
    --color-border: #e2e8f0;
    --gradient-flip: linear-gradient(120deg, #1e40af 0%, #2563eb 45%, #0d9488 100%);
    --gradient-flip-soft: linear-gradient(135deg, rgba(37, 99, 235, 0.12) 0%, rgba(13, 148, 136, 0.08) 100%);
    --gradient-surface: radial-gradient(ellipse 120% 90% at 100% 0%, rgba(37, 99, 235, 0.09) 0%, transparent 55%),
        radial-gradient(ellipse 100% 70% at 0% 100%, rgba(13, 148, 136, 0.07) 0%, transparent 50%);
    --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, monospace;
    --shadow: 0 0.25rem 1.25rem rgba(15, 23, 42, 0.07);
    --shadow-hover: 0 0.5rem 1.75rem rgba(15, 23, 42, 0.11);
    --shadow-flip: 0 0.35rem 1.5rem rgba(37, 99, 235, 0.12);
    --transition: 0.25s ease;
    --bs-primary: #2563eb;
    --bs-primary-rgb: 37, 99, 235;
    --bs-link-color: #2563eb;
    --bs-link-hover-color: #1d4ed8;
    --bs-body-font-family: var(--font-sans);
    --bs-body-font-size: 1.125rem;
    --bs-body-line-height: 1.6;
    --bs-body-color: var(--color-text);
    --bs-body-bg: var(--color-bg);
    --bs-border-radius: 0.625rem;
    --bs-border-radius-lg: 0.875rem;
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .hero-line {
        animation: none !important;
    }

    .btn-primary:hover,
    .btn-primary:active {
        transform: none;
    }

    .cfp-topics-slab .topics-index-link:hover,
    .cfp-topics-slab .topics-index-link:focus-visible {
        transform: none;
    }

}

.text-secondary,
.text-body-secondary,
.text-muted {
    color: var(--bs-body-color) !important;
}

.flip-site {
    background-color: var(--color-bg);
    background-image: var(--gradient-surface);
}

body {
    -webkit-font-smoothing: antialiased;
    text-align: justify;
    hyphens: auto;
}

/* Section rhythm on large screens */
@media (min-width: 992px) {
    .section-tall {
        padding-top: 4rem !important;
        padding-bottom: 4rem !important;
    }
}

.section-alt {
    background-color: var(--color-bg-alt) !important;
    background-image:
        radial-gradient(rgba(37, 99, 235, 0.045) 1.2px, transparent 1.2px),
        radial-gradient(rgba(13, 148, 136, 0.04) 1px, transparent 1px) !important;
    background-size: 28px 28px, 28px 28px !important;
    background-position: 0 0, 14px 14px !important;
}

/* FLIP Organizers — simple, professional */
.section-organizers {
    background-color: var(--color-bg-alt);
}

.organizers-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--bs-border-radius-lg);
    padding: 1.75rem 1.5rem 2rem;
    box-shadow: var(--shadow);
}

@media (min-width: 768px) {
    .organizers-card {
        padding: 2rem 2rem 2.25rem;
    }
}

.section-organizers .section-title {
    margin-bottom: 1.25rem;
}

.organizers-intro {
    max-width: 42rem;
    line-height: 1.65;
    text-align: start;
    hyphens: manual;
    -webkit-hyphens: manual;
}

/* Sticky header */
.site-header {
    z-index: 1030;
}

.navbar-flip {
    position: relative;
    border-bottom: none !important;
    background-color: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(14px) saturate(1.2);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
}

.navbar-flip::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: var(--gradient-flip);
    opacity: 0.92;
    pointer-events: none;
}

.site-header .navbar-nav .nav-link {
    color: var(--color-text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 0.35rem;
}

.site-header .navbar-nav .nav-link:hover,
.site-header .navbar-nav .nav-link:focus {
    color: var(--color-text);
}

@media (min-width: 992px) {
    .site-header .navbar-nav .nav-link {
        position: relative;
    }

    .site-header .navbar-nav .nav-link::after {
        content: '';
        position: absolute;
        left: 50%;
        bottom: 0.2rem;
        width: 70%;
        max-width: 4.5rem;
        height: 2px;
        border-radius: 2px;
        background: var(--gradient-flip);
        transform: translateX(-50%) scaleX(0);
        transition: transform 0.22s ease;
    }

    .site-header .navbar-nav .nav-link:hover::after,
    .site-header .navbar-nav .nav-link:focus-visible::after {
        transform: translateX(-50%) scaleX(1);
    }
}

/* Logo */
.logo {
    text-decoration: none;
    line-height: 0;
}

.logo:hover {
    text-decoration: none;
    opacity: 0.92;
}

.logo-img {
    height: 40px;
    width: auto;
    max-width: min(232px, 60vw);
    min-width: 140px;
    display: block;
}

/* About: black body copy; links stay primary blue */
#about .about-content {
    color: #111;
}

#about .about-content a {
    color: var(--bs-link-color);
}

#about .about-content a:hover,
#about .about-content a:focus {
    color: var(--bs-link-hover-color);
}

/* Section titles */
.section-title {
    margin: 0 0 1.75rem;
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.25;
    color: var(--color-text);
    position: relative;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid color-mix(in srgb, var(--color-accent) 14%, var(--color-border));
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 3.5rem;
    height: 3px;
    border-radius: 3px;
    background: var(--gradient-flip);
}

.text-center .section-title::after {
    left: 50%;
    transform: translateX(-50%);
}

/* Same underline style for h3 sub-headings inside CFP */
.section-cfp .cfp-content h3#cfp-paper-types,
.section-cfp .cfp-content h3#cfp-submit,
.section-cfp .cfp-content > h3 {
    position: relative;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid color-mix(in srgb, var(--color-accent) 14%, var(--color-border));
}

.section-cfp .cfp-content h3#cfp-paper-types::after,
.section-cfp .cfp-content h3#cfp-submit::after,
.section-cfp .cfp-content > h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 3.5rem;
    height: 3px;
    border-radius: 3px;
    background: var(--gradient-flip);
}

/* Anchor offset (sticky nav) */
#cfp-topics,
#cfp-paper-types,
#cfp-submit,
main section[id],
[id^="topic-"] {
    scroll-margin-top: 5.5rem;
}

/* Hero */
.z-hero {
    z-index: 2;
}

.hero {
    min-height: clamp(300px, 42vh, 520px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(185deg, #f8fafc 0%, #eef2f9 48%, #e8f4f2 100%);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        var(--gradient-flip-soft),
        radial-gradient(ellipse 85% 55% at 50% -5%, rgba(37, 99, 235, 0.14) 0%, transparent 58%),
        radial-gradient(ellipse 60% 45% at 85% 75%, rgba(13, 148, 136, 0.09) 0%, transparent 50%),
        radial-gradient(ellipse 50% 40% at 10% 60%, rgba(37, 99, 235, 0.06) 0%, transparent 45%);
    pointer-events: none;
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(37, 99, 235, 0.06) 1px, transparent 1px);
    background-size: 32px 32px;
    opacity: 0.85;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, transparent 70%);
    pointer-events: none;
}

.hero-visual {
    position: absolute;
    inset: 0;
    z-index: 0;
    align-items: center;
    justify-content: flex-end;
    padding-right: clamp(0.5rem, 3vw, 2rem);
    pointer-events: none;
    opacity: 0.78;
}

.hero-illustration {
    width: min(55%, 450px);
    height: auto;
    max-width: 100%;
}

.hero-line {
    stroke-dasharray: 4 4;
    animation: heroLineFlow 4s linear infinite;
}

.hero-line:nth-child(2) { animation-delay: 0.3s; }
.hero-line:nth-child(3) { animation-delay: 0.6s; }
.hero-line:nth-child(4) { animation-delay: 0.2s; }
.hero-line:nth-child(5) { animation-delay: 0.5s; }
.hero-line:nth-child(6) { animation-delay: 0.4s; }
.hero-line:nth-child(7) { animation-delay: 0.1s; }

@keyframes heroLineFlow {
    0% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: -16; }
}

.hero-label {
    display: inline-block;
    padding: 0.4rem 1.1rem;
    margin-bottom: 1rem;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent-deep);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, var(--color-accent-light) 55%, var(--color-flip-teal-muted) 100%);
    border: 1px solid rgba(37, 99, 235, 0.22);
    border-radius: 50px;
    box-shadow: 0 2px 12px rgba(37, 99, 235, 0.08);
}

.hero-label-full {
    font-weight: 700;
    color: var(--color-flip-teal);
    letter-spacing: 0.08em;
}

.hero-title {
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.hero-title-gradient {
    background: linear-gradient(105deg, #1e3a8a 0%, #2563eb 38%, #0f766e 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: #1e3a8a;
}

@supports (-webkit-background-clip: text) or (background-clip: text) {
    .hero-title-gradient {
        color: transparent;
    }
}

.hero-title-acronym {
    font-weight: 800;
    color: var(--color-accent);
    letter-spacing: -0.03em;
}

.hero-tagline-lead {
    display: block;
    font-size: clamp(1.28rem, 3.5vw, 1.72rem);
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -0.04em;
    text-wrap: balance;
    color: var(--color-text) !important;
    background: var(--gradient-flip);
    -webkit-background-clip: text;
    background-clip: text;
}

.hero-tagline-lead::after {
    content: '';
    display: block;
    width: 3.25rem;
    height: 4px;
    margin: 0.75rem auto 0;
    border-radius: 2px;
    background: var(--gradient-flip);
    opacity: 0.95;
}

@supports (-webkit-background-clip: text) or (background-clip: text) {
    .hero-tagline-lead {
        color: transparent !important;
    }
}

.hero-tagline-text {
    max-width: 38rem;
    line-height: 1.45;
}

.hero-proceedings {
    margin-top: 0.9rem;
    max-width: 40rem;
    font-size: clamp(0.9rem, 2vw, 1rem);
    font-weight: 600;
    line-height: 1.55;
    letter-spacing: -0.01em;
    color: var(--color-text-muted);
}

.hero-proceedings em {
    font-style: italic;
    font-weight: 600;
    color: var(--color-text);
}

.btn-primary {
    font-weight: 600;
    --bs-btn-bg: #2563eb;
    --bs-btn-border-color: #2563eb;
    --bs-btn-color: #ffffff;
    --bs-btn-hover-bg: #1d4ed8;
    --bs-btn-hover-border-color: #1d4ed8;
    --bs-btn-hover-color: #ffffff;
    --bs-btn-active-bg: #1e40af;
    --bs-btn-active-border-color: #1e40af;
    --bs-btn-active-color: #ffffff;
    color: #ffffff !important;
    box-shadow: var(--shadow-flip);
    transition: transform var(--transition), box-shadow var(--transition), background-color var(--transition), border-color var(--transition);
}

.btn-primary i {
    color: #ffffff !important;
}

.btn-primary:hover {
    box-shadow: 0 0.45rem 1.35rem rgba(37, 99, 235, 0.28), 0 0.25rem 0.75rem rgba(13, 148, 136, 0.12);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-outline-primary {
    font-weight: 600;
}

/* CFP */
.section-cfp .cfp-content > h3 {
    margin-top: 2rem;
}

.cfp-banner {
    background: linear-gradient(135deg, var(--color-bg-card) 0%, var(--color-accent-light) 52%, var(--color-flip-teal-muted) 100%) !important;
    border: 1px solid rgba(37, 99, 235, 0.16) !important;
    box-shadow: var(--shadow-flip);
}

.cfp-intro {
    line-height: 1.65;
}

.cfp-deadline-pill {
    padding: 1rem 1.15rem;
    background: var(--color-bg-card);
    border-radius: var(--bs-border-radius);
    border: 1px solid var(--color-border);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
    text-align: center;
}

.cfp-deadline-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent);
    margin-bottom: 0.35rem;
}

.cfp-deadline-date {
    display: block;
    font-family: var(--font-mono);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--color-text);
}

.cfp-deadline-note {
    display: block;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: 0.35rem;
}

.cfp-quick-card {
    transition: transform var(--transition), box-shadow var(--transition);
}

.cfp-quick-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover) !important;
}

.cfp-quick-title {
    margin: 0 0 0.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-accent);
}

.cfp-quick-body {
    line-height: 1.55;
}

.cfp-table-wrap {
    box-shadow: var(--shadow);
}

.cfp-table-bs thead th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cfp-guideline-block .card-body {
    border-left: 4px solid var(--color-accent);
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.05) 0%, transparent 14px);
}

.cfp-guideline-block:nth-child(even) .card-body {
    border-left-color: var(--color-flip-teal);
    background: linear-gradient(90deg, var(--color-flip-teal-muted) 0%, transparent 14px);
}

/* Topics slab — visually distinct from rest of CFP */
.cfp-topics-slab {
    position: relative;
    z-index: 0;
    margin-top: 2rem;
    margin-bottom: 2.5rem;
    padding: 1.75rem 1.2rem 2rem;
    padding-top: 2.1rem;
    border-radius: 1.25rem;
    background:
        radial-gradient(ellipse 85% 55% at 92% 8%, color-mix(in srgb, var(--color-accent) 16%, transparent) 0%, transparent 52%),
        radial-gradient(ellipse 75% 50% at 8% 92%, color-mix(in srgb, var(--color-flip-teal) 14%, transparent) 0%, transparent 48%),
        linear-gradient(
            168deg,
            var(--color-bg-card) 0%,
            color-mix(in srgb, var(--color-accent-light) 55%, var(--color-bg-card)) 42%,
            color-mix(in srgb, var(--color-flip-teal-muted) 35%, var(--color-bg-alt)) 100%
        );
    border: 1px solid color-mix(in srgb, var(--color-accent) 16%, var(--color-border));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.92),
        0 0.5rem 1.75rem rgba(15, 23, 42, 0.055),
        0 1rem 2.5rem color-mix(in srgb, var(--color-accent) 6%, transparent);
}

.cfp-topics-slab::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    border-radius: 1.25rem 1.25rem 0 0;
    background: var(--gradient-flip);
    opacity: 0.95;
    z-index: 1;
    pointer-events: none;
}

.cfp-topics-slab > * {
    position: relative;
    z-index: 2;
}

@media (min-width: 768px) {
    .cfp-topics-slab {
        padding: 2rem 1.65rem 2.25rem;
        padding-top: 2.2rem;
    }
}

.cfp-topics-heading {
    position: relative;
    margin-top: 0;
    margin-bottom: 1.35rem;
    font-size: clamp(1.35rem, 2.2vw, 1.7rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.25;
    color: var(--color-text);
    padding-bottom: 0.7rem;
    border-bottom: 1px solid color-mix(in srgb, var(--color-accent) 14%, var(--color-border));
}

.cfp-topics-heading::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 3.5rem;
    height: 3px;
    border-radius: 3px;
    background: var(--gradient-flip);
}

.cfp-topics-slab .topics-index {
    background: color-mix(in srgb, var(--color-bg-card) 88%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid color-mix(in srgb, var(--color-accent) 15%, var(--color-border));
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 6px 20px rgba(15, 23, 42, 0.05);
}

.cfp-topics-slab .topics-index-label {
    color: var(--color-accent-deep);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: 0.1em;
}

.cfp-topics-slab .topics-index-label::before {
    content: '';
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gradient-flip);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-accent-light) 80%, transparent);
}

.cfp-topics-slab .topics-index-link {
    padding: 0.42rem 0.92rem;
    font-size: 0.8125rem;
    color: var(--color-accent-deep);
    background: color-mix(in srgb, var(--color-bg-card) 75%, var(--color-accent-light));
    border: 1px solid color-mix(in srgb, var(--color-accent) 22%, var(--color-border));
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.035);
    transition: background var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.cfp-topics-slab .topics-index-link:hover,
.cfp-topics-slab .topics-index-link:focus-visible {
    color: #fff;
    background: var(--gradient-flip);
    border-color: color-mix(in srgb, var(--color-accent) 40%, transparent);
    box-shadow:
        0 2px 8px color-mix(in srgb, var(--color-accent) 28%, transparent),
        0 4px 14px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.cfp-topics-slab .topics-intro-block {
    border-left: none !important;
    border: 1px solid color-mix(in srgb, var(--color-accent) 12%, var(--color-border)) !important;
    box-shadow:
        0 2px 8px rgba(15, 23, 42, 0.04),
        0 8px 28px color-mix(in srgb, var(--color-accent) 5%, transparent) !important;
}

.cfp-topics-slab .topics-intro-block .card-body {
    background: linear-gradient(
        125deg,
        color-mix(in srgb, var(--color-accent) 5%, var(--color-bg-card)) 0%,
        color-mix(in srgb, var(--color-flip-teal) 4%, var(--color-bg-card)) 48%,
        var(--color-bg-card) 100%
    );
}

.cfp-topics-slab .topics-highlights {
    border-top-color: color-mix(in srgb, var(--color-accent) 18%, var(--color-border));
    border-top-style: solid;
    border-top-width: 1px;
}

.cfp-topics-slab .topic-group {
    position: relative;
    border: 1px solid color-mix(in srgb, var(--color-accent) 10%, var(--color-border)) !important;
    overflow: hidden;
}

.cfp-topics-slab .topic-group::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 1rem 1rem 0 0;
    background: var(--gradient-flip);
    opacity: 0.88;
    pointer-events: none;
}

.cfp-topics-slab .topic-group-icon {
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.28rem;
    border-radius: 0.875rem;
    box-shadow:
        0 2px 6px color-mix(in srgb, var(--color-accent) 12%, transparent),
        inset 0 1px 0 rgba(255, 255, 255, 0.65);
    border-color: color-mix(in srgb, var(--color-accent) 20%, var(--color-border));
}

.cfp-topics-slab .topic-subhead {
    letter-spacing: -0.02em;
}

.cfp-topics-slab .topic-group-lead {
    line-height: 1.55;
}

.cfp-topics-slab .topic-group .topics-list li {
    line-height: 1.55;
}

.cfp-topics-slab .topic-group .topics-list li::marker {
    color: var(--color-flip-teal);
}

/* Topics (global — used inside & outside slab) */
.topics-intro-block {
    border-left: 4px solid var(--color-accent) !important;
}

.topics-intro-block .card-body {
    background: linear-gradient(100deg, rgba(37, 99, 235, 0.07) 0%, rgba(13, 148, 136, 0.06) 38%, transparent 58%);
}

.topics-intro {
    line-height: 1.65;
}

.topics-highlights {
    list-style: none;
    border-top: 1px dashed var(--color-border);
}

.cfp-content .topics-intro-block .topics-highlights {
    margin: 0;
    padding: 0.85rem 0 0 1.35rem;
}

.topics-highlights li {
    position: relative;
    margin-bottom: 0.5rem;
    padding-left: 0.35rem;
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--color-text-muted);
}

.topics-highlights li::before {
    content: '';
    position: absolute;
    left: -1rem;
    top: 0.55em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gradient-flip);
}

.topics-highlights li:last-child {
    margin-bottom: 0;
}

.topics-index {
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
}

.topics-index-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-text-muted);
    margin-bottom: 0.65rem;
}

.topics-index-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.topics-index-link {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-accent);
    background: var(--color-bg-card);
    border: 1px solid rgba(37, 99, 235, 0.25);
    border-radius: 999px;
    text-decoration: none;
    transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.topics-index-link:hover {
    color: #fff;
    background: var(--color-accent);
    border-color: var(--color-accent);
}

.topic-groups-grid .topic-group,
.submit-card,
.submission-type-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-left: 4px solid #2563eb !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06) !important;
    border-radius: 0.5rem !important;
}

.submission-type-icon {
    font-size: 2.75rem;
    color: #2563eb;
    line-height: 1;
}

/* --- Committee / Organizers styles ported from IDFC main site --- */
.cm-section { margin-bottom: 2.5rem; }

.cm-section-header {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1.25rem;
    padding-bottom: .75rem;
    border-bottom: 2px solid #e5e7eb;
}

.cm-section-icon {
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(30,64,175,.10), rgba(6,182,212,.08));
    color: #0f2557;
    font-size: 1rem;
    flex-shrink: 0;
}

.cm-section-title {
    font-weight: 700;
    font-size: 1.35rem;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.02em;
}

.cm-compact-list { display: flex; flex-direction: column; gap: .5rem; }

.cm-compact-item {
    padding: .85rem 1rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #2563eb;
    border-radius: 8px;
    transition: transform .2s ease, box-shadow .2s ease;
}

.cm-compact-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(37, 99, 235, .08);
}

.cm-compact-name {
    font-weight: 600;
    color: #0f172a;
    font-size: .95rem;
}

.cm-compact-affil {
    color: #6b7280;
    font-size: .85rem;
    margin-top: .15rem;
}

/* Lead/highlight chair cards */
.cm-general-highlight { position: relative; }

.cm-chair-lead {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(37, 99, 235, .06), rgba(15, 37, 87, .10));
    border: 1px solid rgba(37, 99, 235, .22);
    border-left: 4px solid #2563eb;
    border-radius: 8px;
    padding: 1rem 1.2rem;
    box-shadow: 0 2px 12px rgba(37, 99, 235, .08);
    transition: box-shadow .3s ease, transform .3s ease;
}

.cm-chair-lead::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, .10), transparent);
    animation: gcShimmer 5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes gcShimmer {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(200%); }
}

.cm-chair-lead:hover {
    box-shadow: 0 4px 20px rgba(37, 99, 235, .18);
    transform: translateY(-2px);
}

.cm-chair-lead .cm-compact-name {
    font-size: 1.1rem;
    font-weight: 700;
}

.cm-chair-lead .cm-compact-affil {
    font-size: .9rem;
    font-weight: 600;
}

.cm-icon-glow { animation: gcIconGlow 3s ease-in-out infinite; }
@keyframes gcIconGlow {
    0%, 100% { filter: drop-shadow(0 0 2px rgba(0, 212, 255, .2)); }
    50% { filter: drop-shadow(0 0 10px rgba(0, 212, 255, .5)); }
}

.hero-component-tag {
    background: #dbeafe;
    color: #0f2557;
    border: 1px solid #93c5fd;
}

/* Indexing block inside Call for Papers section */
.indexing-block {
    background: linear-gradient(135deg, rgba(37, 99, 235, .04), rgba(0, 212, 255, .06));
    border: 1px solid rgba(37, 99, 235, .12);
}

.indexing-label {
    color: #64748b;
    letter-spacing: .1em;
}

.indexing-logo {
    height: 48px;
    opacity: .9;
    transition: opacity .3s ease, transform .3s ease;
}

.indexing-logo:hover {
    opacity: 1;
    transform: scale(1.08);
}

.submit-cta-banner {
    background: linear-gradient(135deg, #060d1f 0%, #0a1a3f 45%, #0f2557 100%);
    box-shadow: 0 10px 30px rgba(15, 37, 87, 0.25);
}

.submit-cta-banner h2 {
    letter-spacing: -0.02em;
}

.submit-cta-banner .btn-light {
    color: #0f2557;
}

.submit-cta-banner .btn-light:hover,
.submit-cta-banner .btn-light:focus {
    color: #0a1a3f;
}

.topic-group-header {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin-bottom: 0.5rem;
}

.topic-group-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    font-size: 1.15rem;
    line-height: 1;
    background: transparent;
    border: none;
}

.topic-subhead {
    flex: 1;
    color: var(--color-text);
    font-weight: 700;
    line-height: 1.35;
}

.topic-group-lead {
    color: var(--color-text-muted);
}

.topic-group .topics-list {
    padding-left: 1.2rem;
}

.topic-group .topics-list li {
    margin-bottom: 0.45rem;
    line-height: 1.5;
    color: var(--color-text-muted);
}

.topic-group .topics-list li::marker {
    color: var(--color-accent);
}

.cfp-steps li {
    margin-bottom: 0.5rem;
}

.cfp-content ul:not(.topics-highlights):not(.topics-index-list) {
    margin-bottom: 1rem;
}

/* Dates */
.date-row .card-body {
    border-left: 3px solid var(--color-accent);
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.04) 0%, transparent 12px);
}

.date-row {
    transition: box-shadow var(--transition);
}

.date-row:hover {
    box-shadow: var(--shadow-hover) !important;
}

/* Footer */
.site-footer {
    position: relative;
    border-top: none;
    background: linear-gradient(180deg, #e8ecf4 0%, var(--color-bg-alt) 35%, var(--color-bg) 100%);
}

.site-footer::before {
    content: '';
    display: block;
    height: 3px;
    background: var(--gradient-flip);
    opacity: 0.9;
}

.footer-tagline {
    letter-spacing: 0.04em;
    background: var(--gradient-flip);
    -webkit-background-clip: text;
    background-clip: text;
    color: var(--color-accent-deep);
}

@supports (-webkit-background-clip: text) or (background-clip: text) {
    .footer-tagline {
        color: transparent;
    }
}

/* Hero illustration responsive */
@media (max-width: 991.98px) {
    .hero-visual {
        justify-content: center;
        padding-right: 0;
        align-items: flex-end;
        padding-bottom: 0.25rem;
    }

    .hero-illustration {
        width: min(72%, 300px);
        opacity: 0.65;
    }
}

@media (max-width: 767.98px) {
    .hero-illustration {
        width: min(85%, 260px);
    }
}

/* ============================================
   Responsive / mobile refinements
   ============================================ */

/* Prevent any horizontal overflow on small screens */
html, body { overflow-x: hidden; }

/* Tablet & below */
@media (max-width: 991.98px) {
    :root { --bs-body-font-size: 1.0625rem; }
    .section { padding-top: 3rem; padding-bottom: 3rem; }
}

/* Phones */
@media (max-width: 767.98px) {
    :root { --bs-body-font-size: 1rem; }

    /* Hero: scale the title down and give it room to breathe */
    .hero-title { font-size: clamp(1.6rem, 7vw, 2.1rem); }
    .hero .container-lg { padding-top: 1.5rem; padding-bottom: 1.5rem; }
    .hero-label { font-size: .72rem; }
    .hero-component-tags { gap: .4rem !important; }
    .hero-component-tag { font-size: .72rem; padding: .35rem .7rem !important; }
    .hero-proceedings, .hero-tagline-text { font-size: .9rem; }

    /* Tighter section rhythm */
    .section { padding-top: 2.5rem; padding-bottom: 2.5rem; }
    .section-title { font-size: 1.5rem; }

    /* Submission-type, organizer & date cards: comfortable padding, full-width stack */
    .submission-type-card { padding: 1.25rem !important; }
    .submission-type-icon { font-size: 1.75rem; }
    .date-row .card-body { padding: .85rem 1rem; }
    .cm-compact-item { padding: .75rem .9rem; }

    /* CFP / dates table scrolls instead of squishing */
    .cfp-table-wrap { overflow-x: auto; }
    .cfp-table-bs { min-width: 520px; }

    /* Indexing logos wrap tighter */
    .indexing-logo { max-height: 30px; }

    /* Comfortable tap targets */
    .navbar-flip .nav-link { padding-top: .6rem; padding-bottom: .6rem; }
    .btn-lg { padding: .7rem 1.15rem; font-size: 1rem; }

    /* Stack hero CTAs full-width for easy tapping */
    .hero .d-flex.flex-wrap.gap-2 .btn { flex: 1 1 auto; }
}

/* Very small phones */
@media (max-width: 400px) {
    .hero-title { font-size: clamp(1.4rem, 8vw, 1.85rem); }
    .hero-label-full { display: none !important; }
    .submit-cta-banner { padding: 1.5rem !important; }
}


/* ============================================
   Dark mode (auto via prefers-color-scheme)
   ============================================ */
@media (prefers-color-scheme: dark) {
    :root {
        --color-bg: #0a1224;
        --color-bg-alt: #0f1a35;
        --color-bg-card: #142142;
        --color-text: #e2e8f0;
        --color-text-muted: #94a3b8;
        --color-border: #1e2a4a;
        --color-accent: #3b82f6;
        --color-accent-light: rgba(59, 130, 246, 0.18);
        --shadow: 0 0.25rem 1.25rem rgba(0, 0, 0, 0.45);
        --shadow-hover: 0 0.5rem 1.75rem rgba(0, 0, 0, 0.55);
        --shadow-flip: 0 0.35rem 1.5rem rgba(59, 130, 246, 0.25);
        --bs-body-color: #e2e8f0;
        --bs-body-bg: #0a1224;
        --bs-link-color: #60a5fa;
        --bs-link-hover-color: #93c5fd;
    }

    body { background-color: #0a1224; color: #e2e8f0; }

    /* Navbar */
    .navbar-flip {
        background-color: rgba(10, 18, 36, 0.85) !important;
        box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
    }
    .site-header .navbar-nav .nav-link { color: #cbd5e1 !important; }
    .site-header .navbar-nav .nav-link:hover,
    .site-header .navbar-nav .nav-link:focus { color: #60a5fa !important; }

    /* Wordmark "ACAI" letters in the SVG logo should adapt */
    .logo-img text[fill="#0f172a"] { fill: #e2e8f0 !important; }
    .logo-img text[fill="#64748b"] { fill: #94a3b8 !important; }

    /* Hero */
    .hero { background: #0a1224 !important; }
    .hero-bg, .hero-bg::before, .hero-bg::after { opacity: 0.5; }
    .hero-title-gradient { background: linear-gradient(120deg, #93c5fd 0%, #60a5fa 50%, #5eead4 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
    .hero-title-acronym { color: #94a3b8 !important; }
    .hero-label { background: rgba(59, 130, 246, 0.15); color: #93c5fd; border-color: rgba(59, 130, 246, 0.30); }
    .hero-subtitle, .hero-tagline-text { color: #cbd5e1 !important; }
    .hero-tagline-lead { color: #e2e8f0 !important; }
    .hero-component-tag { background: rgba(59, 130, 246, 0.18); color: #93c5fd; border-color: rgba(59, 130, 246, 0.35); }

    /* Sections */
    .section { background: #0a1224; }
    .section-alt { background-color: #0f1a35 !important; }
    .section-title { color: #e2e8f0; }
    .text-body, p.text-body, .lead { color: #cbd5e1 !important; }
    .text-muted, .text-secondary { color: #94a3b8 !important; }

    /* Cards (topic, organizer, submit, generic Bootstrap card) */
    .card { background-color: #142142; color: #e2e8f0; border-color: #1e2a4a; }

    /* Submission-type cards use #fff !important in light mode — override explicitly */
    .submission-type-card {
        background: #142142 !important;
        border: 1px solid #1e2a4a !important;
        border-left: 4px solid #3b82f6 !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35) !important;
    }
    .submission-type-card h5 { color: #e2e8f0 !important; }
    .submission-type-card .text-body,
    .submission-type-card p { color: #cbd5e1 !important; }
    .submission-type-card strong { color: #f1f5f9 !important; }
    .submission-type-icon { color: #ffffff !important; }
    .topic-groups-grid .topic-group,
    .submit-card,
    .organizer-card {
        background: #142142 !important;
        border: 1px solid #1e2a4a !important;
        border-left: 4px solid #3b82f6 !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35) !important;
    }
    .topic-subhead { color: #e2e8f0 !important; }
    .topic-group-lead, .topics-list { color: #cbd5e1 !important; }
    .topics-list li { color: #cbd5e1 !important; }
    .topics-list li::marker { color: #60a5fa !important; }
    .cfp-table-intro { color: #94a3b8 !important; }

    /* CFP banner */
    .cfp-banner { background: linear-gradient(135deg, #142142 0%, rgba(59, 130, 246, 0.12) 52%, rgba(20, 184, 166, 0.10) 100%) !important; border-color: #1e2a4a; }
    .cfp-banner .text-body { color: #e2e8f0 !important; }
    .cfp-deadline-pill { background: rgba(59, 130, 246, 0.15); border-color: rgba(59, 130, 246, 0.35); color: #93c5fd; }
    .cfp-deadline-date { color: #e2e8f0; }
    .cfp-deadline-label, .cfp-deadline-note { color: #94a3b8; }

    /* Tables */
    .cfp-table-bs { color: #e2e8f0; --bs-table-bg: transparent; --bs-table-color: #e2e8f0; --bs-table-border-color: #1e2a4a; --bs-table-hover-bg: rgba(59, 130, 246, 0.08); --bs-table-hover-color: #e2e8f0; }
    .cfp-table-bs .table-light, .cfp-table-bs thead th { background-color: #1e2a4a !important; color: #e2e8f0 !important; border-color: #2d3a5e !important; }
    .cfp-table-wrap { border-color: #1e2a4a !important; }
    .cfp-table-bs .text-body { color: #e2e8f0 !important; }

    /* Important Dates rows */
    .date-row { background: #142142 !important; }
    .date-row .text-body { color: #e2e8f0 !important; }
    .date-value { color: #cbd5e1 !important; }

    /* Icons — white on dark backgrounds */
    .btn-primary .bi,
    .submit-cta-banner .bi { color: inherit; }
    .cfp-banner .bi,
    .indexing-block .bi,
    .date-row .bi { color: #ffffff; }
    .navbar-flip .navbar-brand .logo-img rect { fill: url(#logoTileGrad); }

    /* Committee / Organizers */
    .cm-section-header { border-bottom-color: #1e2a4a; }
    .cm-section-icon { background: linear-gradient(135deg, rgba(59, 130, 246, 0.22), rgba(0, 212, 255, 0.14)); color: #ffffff; }
    .cm-section-icon .bi { color: #ffffff; }
    .cm-section-title { color: #e2e8f0; }
    .cm-compact-item { background: #142142; border-color: #1e2a4a; border-left-color: #3b82f6; }
    .cm-compact-name { color: #e2e8f0; }
    .cm-compact-affil { color: #94a3b8; }
    .cm-chair-lead {
        background: linear-gradient(135deg, rgba(59, 130, 246, .12), rgba(15, 37, 87, .25));
        border-color: rgba(59, 130, 246, 0.30);
        border-left-color: #3b82f6;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.30);
    }

    /* Indexing block */
    .indexing-block {
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.10), rgba(0, 212, 255, 0.10));
        border-color: rgba(59, 130, 246, 0.25);
    }
    .indexing-block .text-body { color: #cbd5e1 !important; }
    .indexing-label { color: #94a3b8; }
    .indexing-logo { filter: brightness(0.92) invert(0.06); }

    /* Buttons */
    .btn-primary { --bs-btn-bg: #3b82f6; --bs-btn-border-color: #3b82f6; --bs-btn-hover-bg: #60a5fa; --bs-btn-hover-border-color: #60a5fa; }
    .btn-outline-primary { --bs-btn-color: #93c5fd; --bs-btn-border-color: #3b82f6; --bs-btn-hover-bg: #3b82f6; --bs-btn-hover-color: #ffffff; }
    .btn-light { --bs-btn-bg: #e2e8f0; --bs-btn-color: #0f172a; --bs-btn-hover-bg: #cbd5e1; }
    .btn-outline-light { --bs-btn-color: #e2e8f0; --bs-btn-border-color: #cbd5e1; --bs-btn-hover-bg: rgba(226, 232, 240, 0.15); --bs-btn-hover-color: #ffffff; }

    /* Submit CTA banner stays dark navy — already works, just tighten shadow */
    .submit-cta-banner { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55); }

    /* Section title underline */
    .section-title { border-bottom-color: rgba(59, 130, 246, 0.25) !important; }

    /* CFP h3 underlines */
    .section-cfp .cfp-content h3#cfp-paper-types,
    .section-cfp .cfp-content h3#cfp-submit,
    .section-cfp .cfp-content > h3 { border-bottom-color: rgba(59, 130, 246, 0.25); color: #e2e8f0; }

    /* Footer */
    .site-footer { background: #07101f !important; color: #cbd5e1; border-top: 1px solid #1e2a4a; }
    .site-footer::before { opacity: 0.5; }
    .site-footer .text-body { color: #cbd5e1 !important; }
    .footer-tagline {
        background: none !important;
        -webkit-background-clip: initial !important;
        background-clip: initial !important;
        -webkit-text-fill-color: #e2e8f0 !important;
        color: #e2e8f0 !important;
    }

    /* Links */
    a.link-primary, a.link-primary:hover { color: #60a5fa !important; }
}

