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

:root {
    /* New Blue Color Palette from Color Hunt */
    --color-dark: #334257;
    /* Dark blue-gray */
    --color-medium: #476072;
    /* Medium blue-gray */
    --color-light: #548ca8;
    /* Light blue */
    --color-light-gray: #eeeeee;
    /* Light gray/off-white */

    /* Legacy colors for compatibility */
    --primary-color: #476072;
    /* Medium blue */
    --secondary-color: #548ca8;
    /* Light blue */
    --jamie-color: #476072;
    /* Medium blue */
    --jamie-bg: rgba(71, 96, 114, 0.15);
    /* Medium blue background */
    --jamie-bg-gradient: linear-gradient(135deg, rgba(71, 96, 114, 0.2) 0%, rgba(84, 140, 168, 0.15) 100%);
    --catherine-color: #476072;
    /* Medium blue */
    --catherine-bg: rgba(71, 96, 114, 0.15);
    /* Medium blue background */
    --catherine-bg-gradient: linear-gradient(135deg, rgba(71, 96, 114, 0.2) 0%, rgba(84, 140, 168, 0.15) 100%);
    --christina-color: #476072;
    /* Medium blue */
    --bg-dark: #F5F5F5;
    /* Light gray background */
    --bg-light: #F5F5F5;
    /* Light gray background */
    --text-primary: #334257;
    /* Dark blue-gray for text */
    --text-secondary: #476072;
    /* Medium blue for secondary text */
    --accent: #548ca8;
    /* Light blue for accents */
    --transition: all 0.3s ease;
}

body {
    font-family: 'Albert Sans', sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell;
    background: #F5F5F5;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

/* Story Sections */
.story-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    position: relative;
    /* scroll-snap-align: start; - Removing snap for smoother feel */
    background: #F5F5F5;
}

/* First Section (Intro) with Background Image */
#intro {
    background-image: url('assets/images/OSHAWA_BG.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
}

#intro::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(245, 245, 245, 0.3);
    z-index: 0;
}

#intro .content-wrapper {
    position: relative;
    z-index: 1;
}

/* Intro section text colors - use cream for better readability */
#intro h1 {
    color: #f4edd3 !important;
}

#intro p {
    color: #f4edd3 !important;
}

.content-wrapper {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

/* Intro Section Layout */
.intro-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.intro-left {
    display: flex;
    justify-content: center;
    align-items: center;
}

.intro-map-image {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    opacity: 0;
    transform: translateX(-30px);
    animation: slideInLeft 1s ease forwards;
}

.intro-right {
    display: flex;
    flex-direction: column;
}

/* Intro explanation section */
.intro-explanation {
    margin-top: 2rem;
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.explanation-text {
    color: #f4edd3 !important;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 0;
    text-align: center;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.spacebar-prompt {
    position: absolute;
    bottom: 6.5%;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    z-index: 10;
    width: 100%;
    max-width: 220px;
    opacity: 0;
    animation: fadeInSpacebar 1s ease forwards;
    animation-delay: 0.4s;
}

@keyframes fadeInSpacebar {
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.keyboard-icon {
    width: 80px;
    height: auto;
    opacity: 0.9;
    animation: pulse 2s ease-in-out infinite;
    /* transform: translateX(-100%); */
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.9;
        transform: translateX(-10%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translateX(-10%) scale(1.05);
    }
}

.spacebar-text {
    color: #f4edd3 !important;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
    width: 100%;
    margin: 0;
}

.spacebar-key {
    display: inline-block;
    background-color: rgba(244, 237, 211, 0.2);
    border: 2px solid #f4edd3;
    border-radius: 4px;
    padding: 0.2rem 0.6rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin: 0 0.3rem;
    font-size: 0.8rem;
}

@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 968px) {
    .intro-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .intro-left {
        order: 2;
    }

    .intro-right {
        order: 1;
    }

    .explanation-text {
        font-size: 1rem;
    }

    .spacebar-prompt {
        bottom: 10%;
    }

    .keyboard-icon {
        width: 60px;
    }

    .spacebar-text {
        font-size: 0.75rem;
    }

    .spacebar-key {
        padding: 0.15rem 0.5rem;
        font-size: 0.7rem;
    }
}

/* Background Section with Scroll Animations */
#background {
    /* Make it tall enough to scroll through for animations */
    height: 400vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 0;
    /* Padding handled by sticky container */
    position: relative;
    /* overflow: hidden; - Allow scroll */
}

#background .content-wrapper {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    /* justify-content: center; */
    padding: 4rem 2rem;
    overflow: hidden;
    /* Keep content contained */
}

/* Remove old fixed/completed classes as we use native sticky */
/* #background.fixed, #background.completed rules removed */

#background .text-content {
    margin-top: 2rem;
    font-size: 1.5rem;
    line-height: 1.8;
    min-height: 4rem;
    position: relative;
    z-index: 20;
    background: rgba(244, 237, 211, 0.8);
    padding: 1.5rem;
    border-radius: 10px;
    backdrop-filter: blur(5px);
}

.background-text-part {
    display: inline-block;
    position: relative;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.background-text-part.animate-up {
    opacity: 1;
    transform: translateY(0);
}

.typewriter-text {
    opacity: 0;
    display: inline-block;
}

.background-graph-container {
    position: absolute;
    width: 350px;
    max-width: 35vw;
    opacity: 0;
    transform: translateY(50px) scale(0.9) rotate(0deg);
    transition: opacity 0.8s ease, transform 0.8s ease;
    display: none;
    z-index: 5;
    pointer-events: none;
    /* Ensure graphs are positioned below the text area */
    top: auto;
    bottom: auto;
}

.background-graph-container.show {
    display: block;
    opacity: 0.95;
    /* Transform is controlled by JavaScript to preserve rotation */
}

.background-graph {
    width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    background: rgba(244, 237, 211, 0.9);
    padding: 1rem;
    backdrop-filter: blur(10px);
    border: none;
    position: relative;
}


/* Points Container */
.points-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

@media (max-width: 768px) {
    .points-container {
        grid-template-columns: 1fr;
    }
}

.point-item {
    background: rgba(244, 237, 211, 0.8);
    padding: 2rem;
    backdrop-filter: blur(10px);
    border: none;
    position: relative;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    /* Hand-drawn style */
    border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.2));
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.point-item:nth-child(1) {
    transform: translateY(50px) rotate(-0.5deg);
    border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
}

.point-item:nth-child(2) {
    transform: translateY(50px) rotate(0.8deg);
    border-radius: 15px 255px 15px 225px / 225px 15px 255px 15px;
}

.point-item:nth-child(3) {
    transform: translateY(50px) rotate(-0.3deg);
    border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
}

.point-item:nth-child(4) {
    transform: translateY(50px) rotate(0.6deg);
    border-radius: 15px 255px 15px 225px / 225px 15px 255px 15px;
}

.point-item.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.point-item:nth-child(1).animate-in {
    transform: translateY(0) rotate(-0.5deg);
}

.point-item:nth-child(2).animate-in {
    transform: translateY(0) rotate(0.8deg);
}

.point-item:nth-child(3).animate-in {
    transform: translateY(0) rotate(-0.3deg);
}

.point-item:nth-child(4).animate-in {
    transform: translateY(0) rotate(0.6deg);
}

.point-item p {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.6;
    font-family: 'Comic Sans MS', 'Chalkboard SE', 'Comic Neue', cursive, sans-serif;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

/* Typography */
h1 {
    font-family: 'Open Sans', sans-serif;
    font-weight: 700;
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: var(--color-dark);
    letter-spacing: 1px;
}

h2 {
    font-family: 'Open Sans', sans-serif;
    font-weight: 700;
    font-size: 3rem;
    margin-bottom: 2rem;
    color: var(--color-dark);
    letter-spacing: 1px;
}

h3 {
    font-family: 'Open Sans', sans-serif;
    font-weight: 700;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--color-dark);
    letter-spacing: 0.5px;
}

p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 1s ease forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

.delay-4 {
    animation-delay: 0.8s;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    animation: slideInLeft 1s ease forwards;
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    animation: slideInRight 1s ease forwards;
}

@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Persona Selection Section */
.persona-selection {
    background: #F5F5F5;
}

.subtitle {
    font-family: 'Albert Sans', sans-serif;
    font-weight: 400;
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 3rem;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

.persona-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.persona-card {
    background: rgba(244, 237, 211, 0.8);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: visible;
}

.persona-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
}

.persona-card:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 15px 30px rgba(168, 197, 160, 0.2);
}

.persona-card:hover {
    opacity: 1;
    filter: drop-shadow(0 0 8px currentColor);
}

.persona-card:hover::before {
    opacity: 0.1;
}

.persona-card.jamie-card:hover {
    border-color: var(--jamie-color);
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.3);
}

.persona-card.catherine-card:hover {
    border-color: var(--catherine-color);
    box-shadow: 0 20px 40px rgba(212, 165, 165, 0.3);
}

.persona-card.christina-card:hover {
    border-color: var(--christina-color);
    box-shadow: 0 20px 40px rgba(201, 168, 130, 0.3);
}

.persona-avatar {
    margin-bottom: 1.5rem;
}

.avatar-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 700;
    margin: 0 auto;
    transition: var(--transition);
}

.jamie-avatar .avatar-circle {
    background: linear-gradient(135deg, var(--jamie-color), #5f9ea0);
    color: var(--bg-dark);
}

.catherine-avatar .avatar-circle {
    background: linear-gradient(135deg, var(--catherine-color), #e8c4c4);
    color: var(--bg-dark);
}

.christina-avatar .avatar-circle {
    background: linear-gradient(135deg, var(--christina-color), #d4b89a);
    color: var(--bg-dark);
}

.persona-card:hover .avatar-circle {
    transform: scale(1.1) rotate(5deg);
}

.persona-card h3 {
    font-family: 'Open Sans', sans-serif;
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--color-dark-blue);
    letter-spacing: 0.5px;
}

.persona-basic-info {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.persona-age,
.persona-location {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.persona-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.persona-description.preview {
    margin-bottom: 1.5rem;
    min-height: 3.2em;
}

.persona-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, opacity 0.3s ease-out, margin-bottom 0.3s ease-out;
    opacity: 0;
    margin-bottom: 0;
}

.persona-details.expanded,
.persona-card:hover .persona-details {
    max-height: 600px;
    opacity: 1;
    margin-bottom: 1.5rem;
}

.persona-details.expanded {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.persona-stats {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.stat-value {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
}

.jamie-card .stat-value {
    color: var(--jamie-color);
}

.catherine-card .stat-value {
    color: var(--catherine-color);
}

/* Conversation Section */
.conversation-section {
    background: #F5F5F5;
    flex-direction: column;
    justify-content: center;
}

.conversation-section .content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.conversation-scene {
    background: rgba(244, 237, 211, 0.75);
    border-radius: 18px;
    padding: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3);
    position: relative;
    display: none !important;
    /* Hidden by default, shown when selected */
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.conversation-scene.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.scene-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.scene-label {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--bg-dark);
    padding: 0.4rem 1.2rem;
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.5px;
    font-size: 0.95rem;
}

.scene-header h3 {
    margin: 0;
}

.conversation-stage {
    display: flex;
    justify-content: center;
    padding: 2rem 0;
    min-height: 400px;
}

.chat-container {
    position: relative;
    width: 100%;
    max-width: 700px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem;
    padding-top: 3.5rem;
    background: linear-gradient(180deg, rgba(244, 237, 211, 0.5) 0%, rgba(165, 191, 204, 0.3) 100%);
    border-radius: 20px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.3), 0 10px 40px rgba(0, 0, 0, 0.2);
}

.persona-dialog {
    width: 100%;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    pointer-events: none;
    transition: opacity 0.4s ease, max-height 0.4s ease, margin 0.4s ease;
    margin: 0;
}

.persona-dialog.active {
    opacity: 1;
    max-height: 200px;
    pointer-events: auto;
    margin-bottom: 1.5rem;
    animation: messageSlideIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

@keyframes messageSlideIn {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.persona-dialog.fade-out {
    opacity: 0;
    max-height: 0;
    margin: 0;
    animation: messageSlideOut 0.4s ease forwards;
}

@keyframes messageSlideOut {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
}

.persona-dialog.fade-out {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.95);
}

.chat-message {
    display: flex;
    align-items: flex-end;
    gap: 0.9rem;
    margin-bottom: 1rem;
    width: 100%;
}

.chat-message img.chat-avatar {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.chat-message.left {
    justify-content: flex-start;
}

.chat-message.right {
    justify-content: flex-end;
    flex-direction: row-reverse;
}

.chat-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 0 0 2px rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: avatarPopIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 10;
}

@keyframes avatarPopIn {
    0% {
        opacity: 0;
        transform: scale(0);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.persona-dialog.active .chat-avatar {
    animation: avatarBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes avatarBounce {
    0% {
        opacity: 0;
        transform: scale(0) rotate(-180deg);
    }

    60% {
        transform: scale(1.15) rotate(10deg);
    }

    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.chat-message.left .chat-avatar {
    border-color: var(--christina-color);
    box-shadow: 0 4px 12px rgba(201, 168, 130, 0.3), 0 0 0 2px rgba(201, 168, 130, 0.1);
}

.chat-message.right .chat-avatar {
    border-color: var(--jamie-color);
    box-shadow: 0 4px 12px rgba(127, 179, 176, 0.3), 0 0 0 2px rgba(127, 179, 176, 0.1);
}

.persona-dialog.catherine .chat-avatar {
    border-color: var(--catherine-color);
    box-shadow: 0 4px 12px rgba(212, 165, 165, 0.3), 0 0 0 2px rgba(212, 165, 165, 0.1);
}

.chat-bubble-wrapper {
    display: flex;
    flex-direction: column;
    max-width: 80%;
    gap: 0.25rem;
    flex: 1;
}

.chat-bubble {
    position: relative;
    padding: 0.9rem 1.2rem;
    border-radius: 20px;
    line-height: 1.4;
    font-size: 0.85rem;
    color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.2);
    word-wrap: break-word;
    overflow-wrap: break-word;
    backdrop-filter: blur(10px);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: bubblePopIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.chat-bubble p {
    margin: 0;
    padding: 0;
    font-size: 0.85rem;
    line-height: 1.4;
}

@keyframes bubblePopIn {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(10px);
    }

    60% {
        transform: scale(1.05) translateY(-3px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.chat-bubble:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4), 0 3px 6px rgba(0, 0, 0, 0.3);
}

.chat-bubble.left-bubble {
    background: linear-gradient(135deg, rgba(165, 191, 204, 0.3), rgba(244, 237, 211, 0.9));
    border-bottom-left-radius: 4px;
    border-left: 4px solid var(--christina-color);
    border-top: 1px solid rgba(201, 168, 130, 0.3);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.persona-dialog.christina .chat-bubble.left-bubble {
    background: linear-gradient(135deg, rgba(165, 191, 204, 0.4), rgba(244, 237, 211, 0.9));
    box-shadow: 0 4px 12px rgba(201, 168, 130, 0.2), 0 2px 4px rgba(0, 0, 0, 0.3);
}

.chat-bubble.right-bubble {
    background: linear-gradient(135deg, rgba(244, 237, 211, 0.9), rgba(126, 153, 163, 0.3));
    border-bottom-right-radius: 4px;
    border-right: 4px solid var(--jamie-color);
    border-top: 1px solid rgba(127, 179, 176, 0.3);
    border-left: 1px solid rgba(255, 255, 255, 0.05);
}

.persona-dialog.jamie .chat-bubble.right-bubble {
    background: linear-gradient(135deg, rgba(244, 237, 211, 0.9), rgba(126, 153, 163, 0.4));
    box-shadow: 0 4px 12px rgba(127, 179, 176, 0.2), 0 2px 4px rgba(0, 0, 0, 0.3);
}

.persona-dialog.catherine .chat-bubble.right-bubble {
    background: linear-gradient(135deg, rgba(244, 237, 211, 0.9), rgba(126, 153, 163, 0.4));
    border-right-color: var(--catherine-color);
    border-top-color: rgba(212, 165, 165, 0.3);
    box-shadow: 0 4px 12px rgba(212, 165, 165, 0.2), 0 2px 4px rgba(0, 0, 0, 0.3);
}

.persona-dialog.catherine .chat-bubble.left-bubble {
    background: linear-gradient(135deg, rgba(126, 153, 163, 0.4), rgba(244, 237, 211, 0.9));
    border-left-color: var(--catherine-color);
    border-top-color: rgba(212, 165, 165, 0.3);
    box-shadow: 0 4px 12px rgba(212, 165, 165, 0.2), 0 2px 4px rgba(0, 0, 0, 0.3);
}

.chat-name {
    font-size: 0.75rem;
    color: var(--text-secondary);
    padding: 0 0.5rem;
    opacity: 0.8;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(244, 237, 211, 0.8);
    border-radius: 18px;
    margin-bottom: 0.5rem;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.3s ease, transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.typing-indicator.active {
    opacity: 1;
    transform: scale(1);
}

.typing-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-style: italic;
    font-weight: 500;
    white-space: nowrap;
}

.typing-dots {
    display: flex;
    gap: 0.3rem;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-secondary);
    animation: typingDot 2.5s ease-in-out infinite;
}

.typing-dot:nth-child(1) {
    animation-delay: 0s;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.35s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.7s;
}

@keyframes typingDot {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.4;
    }

    30% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

.repeat-conversation-btn {
    display: none;
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    padding: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: var(--bg-dark);
    font-size: 1.3rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(168, 197, 160, 0.4), 0 0 0 2px rgba(168, 197, 160, 0.1);
    animation: buttonFadeIn 0.5s ease forwards;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    line-height: 1;
    opacity: 0;
}

.repeat-conversation-btn:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 6px 20px rgba(168, 197, 160, 0.5);
    background: linear-gradient(135deg, #b8d4b0, #e4b884);
}

.repeat-conversation-btn:active {
    transform: translateY(-1px) scale(1.05);
}

.repeat-conversation-btn.show {
    display: flex !important;
    opacity: 1;
    visibility: visible;
}

.repeat-conversation-btn::before {
    content: '🔄';
    font-size: 1.4rem;
}

/* Scene Selector */
.scene-selector {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0 3rem;
    flex-wrap: wrap;
}

.scene-toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: rgba(244, 237, 211, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.scene-toggle-btn:hover {
    background: rgba(244, 237, 211, 0.8);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.scene-toggle-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: rgba(255, 255, 255, 0.4);
    color: var(--bg-dark);
    font-weight: 600;
    box-shadow: 0 6px 25px rgba(168, 197, 160, 0.4);
}

.scene-toggle-btn.active:hover {
    background: linear-gradient(135deg, #b8d4b0, #e4b884);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(168, 197, 160, 0.5);
}

.scene-toggle-icon {
    font-size: 1.3rem;
    line-height: 1;
}

.scene-toggle-text {
    white-space: nowrap;
}

/* Scene visibility is controlled by .active class above */
.conversation-scene.active {
    display: block !important;
    animation: fadeInScene 0.5s ease forwards;
}

@keyframes fadeInScene {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes buttonFadeIn {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}


.chat-bubble.left-bubble::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -8px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 8px 8px 0;
    border-color: transparent rgba(201, 168, 130, 0.3) transparent transparent;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.persona-dialog.catherine .chat-bubble.left-bubble::after {
    border-color: transparent rgba(212, 165, 165, 0.3) transparent transparent;
}

.chat-bubble.right-bubble::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: -8px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 8px 8px;
    border-color: transparent transparent rgba(127, 179, 176, 0.3) transparent;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.persona-dialog.catherine .chat-bubble.right-bubble::after {
    border-color: transparent transparent rgba(212, 165, 165, 0.3) transparent;
}

.speech-bubble.top {
    margin-bottom: 0.5rem;
}

.speech-bubble::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -8px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 8px 8px 0;
    border-color: transparent rgba(255, 255, 255, 0.05) transparent transparent;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.3s ease 0.2s;
}

.persona-dialog.speak .speech-bubble::before {
    opacity: 1;
}

.persona-dialog.jamie .speech-bubble {
    background: linear-gradient(135deg, rgba(127, 179, 176, 0.15), rgba(95, 158, 160, 0.1));
    border-left: 3px solid var(--jamie-color);
}

.persona-dialog.jamie .speech-bubble::after {
    border-color: rgba(127, 179, 176, 0.15) transparent transparent transparent;
}

.persona-dialog.catherine .speech-bubble {
    background: linear-gradient(135deg, rgba(212, 165, 165, 0.15), rgba(200, 145, 145, 0.1));
    border-left: 3px solid var(--catherine-color);
}

.persona-dialog.catherine .speech-bubble::after {
    border-color: rgba(212, 165, 165, 0.15) transparent transparent transparent;
}

.persona-dialog.christina .speech-bubble {
    background: linear-gradient(135deg, rgba(201, 168, 130, 0.15), rgba(184, 160, 130, 0.1));
    border-left: 3px solid var(--christina-color);
}

.persona-dialog.christina .speech-bubble::after {
    border-color: rgba(201, 168, 130, 0.15) transparent transparent transparent;
}

.persona-figure {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 18px;
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
    opacity: 0.4;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.persona-figure.active {
    opacity: 1;
    transform: scale(1.1);
    box-shadow: 0 0 25px rgba(168, 197, 160, 0.4), 0 0 50px rgba(168, 197, 160, 0.2);
    animation: personaPulse 2s ease-in-out infinite;
}

@keyframes personaPulse {

    0%,
    100% {
        box-shadow: 0 0 25px rgba(168, 197, 160, 0.4), 0 0 50px rgba(168, 197, 160, 0.2);
    }

    50% {
        box-shadow: 0 0 35px rgba(168, 197, 160, 0.6), 0 0 70px rgba(168, 197, 160, 0.3);
    }
}

.persona-figure.christina-figure.active {
    box-shadow: 0 0 25px rgba(201, 168, 130, 0.4), 0 0 50px rgba(201, 168, 130, 0.2);
    animation: personaPulseChristina 2s ease-in-out infinite;
}

@keyframes personaPulseChristina {

    0%,
    100% {
        box-shadow: 0 0 25px rgba(201, 168, 130, 0.4), 0 0 50px rgba(201, 168, 130, 0.2);
    }

    50% {
        box-shadow: 0 0 35px rgba(201, 168, 130, 0.6), 0 0 70px rgba(201, 168, 130, 0.3);
    }
}

.persona-figure.jamie-figure.active {
    box-shadow: 0 0 25px rgba(127, 179, 176, 0.4), 0 0 50px rgba(127, 179, 176, 0.2);
    animation: personaPulseJamie 2s ease-in-out infinite;
}

@keyframes personaPulseJamie {

    0%,
    100% {
        box-shadow: 0 0 25px rgba(127, 179, 176, 0.4), 0 0 50px rgba(127, 179, 176, 0.2);
    }

    50% {
        box-shadow: 0 0 35px rgba(127, 179, 176, 0.6), 0 0 70px rgba(127, 179, 176, 0.3);
    }
}

.persona-figure.catherine-figure.active {
    box-shadow: 0 0 25px rgba(212, 165, 165, 0.4), 0 0 50px rgba(212, 165, 165, 0.2);
    animation: personaPulseCatherine 2s ease-in-out infinite;
}

@keyframes personaPulseCatherine {

    0%,
    100% {
        box-shadow: 0 0 25px rgba(212, 165, 165, 0.4), 0 0 50px rgba(212, 165, 165, 0.2);
    }

    50% {
        box-shadow: 0 0 35px rgba(212, 165, 165, 0.6), 0 0 70px rgba(212, 165, 165, 0.3);
    }
}

.persona-figure img {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.12);
}

.persona-tag {
    text-align: center;
}

.persona-tag h4 {
    margin: 0;
    font-size: 1.3rem;
}

.persona-tag span {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.speaker-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.persona-dialog.active .speaker-info {
    opacity: 1;
    transform: translateY(0);
    animation: speakerInfoPopIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

@keyframes speakerInfoPopIn {
    0% {
        opacity: 0;
        transform: translateY(-10px) scale(0.9);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.speaker-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.persona-dialog.christina.active .speaker-avatar {
    border-color: var(--christina-color);
    box-shadow: 0 4px 12px rgba(201, 168, 130, 0.4);
}

.persona-dialog.jamie.active .speaker-avatar {
    border-color: var(--jamie-color);
    box-shadow: 0 4px 12px rgba(127, 179, 176, 0.4);
}

.persona-dialog.catherine.active .speaker-avatar {
    border-color: var(--catherine-color);
    box-shadow: 0 4px 12px rgba(212, 165, 165, 0.4);
}

.speaker-name {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.speaker-name h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.2;
}

.speaking-indicator {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
    opacity: 0.8;
    animation: speakingBlink 1.5s ease-in-out infinite;
}

@keyframes speakingBlink {

    0%,
    100% {
        opacity: 0.8;
    }

    50% {
        opacity: 0.4;
    }
}

.persona-dialog.active .speech-bubble {
    opacity: 1;
    transform: scale(1) translateY(0);
    animation: bubblePopIn 0.7s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.persona-dialog.fade-out .speech-bubble {
    animation: bubblePopOut 0.4s cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards;
}

.persona-dialog.fade-out .speaker-info {
    opacity: 0;
    transform: translateY(-10px) scale(0.9);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

@media (max-width: 968px) {
    .conversation-stage {
        grid-template-columns: 150px 1fr 150px;
        gap: 1.5rem;
    }

    .persona-figure img {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 768px) {
    .conversation-scene {
        padding: 1.5rem;
    }

    .conversation-stage {
        padding: 1rem 0.5rem;
    }

    .chat-container {
        max-width: 100%;
        padding: 0.5rem;
    }

    .chat-bubble-wrapper {
        max-width: 75%;
    }

    .chat-avatar {
        width: 42px;
        height: 42px;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .chat-bubble {
        font-size: 0.8rem;
        padding: 0.85rem 1rem;
        line-height: 1.35;
    }

    .chat-bubble p {
        font-size: 0.8rem;
        line-height: 1.35;
    }

    .chat-bubble-wrapper {
        max-width: 85%;
    }

    .chat-name {
        font-size: 0.7rem;
    }

    .repeat-conversation-btn {
        width: 44px;
        height: 44px;
        bottom: 1rem;
        right: 1rem;
        font-size: 1.2rem;
    }

    .repeat-conversation-btn::before {
        font-size: 1.2rem;
    }

    /* Scene Selector Responsive */
    .scene-selector {
        flex-direction: column;
        gap: 0.75rem;
        margin: 1.5rem 0 2rem;
    }

    .scene-toggle-btn {
        padding: 0.875rem 1.25rem;
        font-size: 0.9rem;
        width: 100%;
        justify-content: center;
    }

    .scene-toggle-icon {
        font-size: 1.1rem;
    }
}

/* Journey Sections */
.journey-section {
    min-height: 100vh;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    background: #F5F5F5;
}

/* Jamie's Journey - Teal Color Scheme */
.jamie-journey {
    background: var(--jamie-bg-gradient);
    background-color: var(--bg-dark);
}

/* Catherine's Journey - Rose Color Scheme */
.catherine-journey {
    background: var(--catherine-bg-gradient);
    background-color: var(--bg-dark);
}

.journey-header {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto 3rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem;
    border-radius: 15px;
    background: rgba(244, 237, 211, 0.6);
    backdrop-filter: blur(10px);
}

.journey-header h2 {
    font-family: 'Open Sans', sans-serif;
    font-weight: 700;
    font-weight: 400;
    letter-spacing: 1px;
}

.jamie-journey .journey-header {
    border-left: 4px solid var(--jamie-color);
}

.catherine-journey .journey-header {
    border-left: 4px solid var(--catherine-color);
}

.back-button {
    background: rgba(244, 237, 211, 0.8);
    border: 2px solid var(--primary-color);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.jamie-journey .back-button {
    border-color: var(--jamie-color);
}

.jamie-journey .back-button:hover {
    background: var(--jamie-color);
    transform: translateX(-5px);
}

.catherine-journey .back-button {
    border-color: var(--catherine-color);
}

.catherine-journey .back-button:hover {
    background: var(--catherine-color);
    transform: translateX(-5px);
}

.journey-step {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    opacity: 0;
    transform: translateY(50px);
    transition: var(--transition);
}

.journey-step.active {
    opacity: 1;
    transform: translateY(0);
}

.step-title {
    font-family: 'Open Sans', sans-serif;
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-weight: 400;
    letter-spacing: 0.5px;
}

.step-content {
    font-size: 1.3rem;
    line-height: 1.8;
    margin-bottom: 3rem;
    color: var(--text-secondary);
}

/* Data Visualizations */
.data-visualization {
    margin-top: 3rem;
    padding: 2rem;
    background: rgba(244, 237, 211, 0.7);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: visible;
}

.chart-container h4 {
    font-family: 'Open Sans', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--text-primary);
    font-weight: 400;
    letter-spacing: 0.5px;
}

.bar-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    gap: 1rem;
    height: 400px;
    padding: 2rem;
}

.bar {
    flex: 1;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px 10px 0 0;
    position: relative;
    transition: var(--transition);
    min-width: 60px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: 1rem;
}

.jamie-journey .bar {
    background: linear-gradient(180deg, var(--jamie-color), #b8c9c6);
}

.catherine-journey .bar {
    background: linear-gradient(180deg, var(--catherine-color), #e8c4c4);
}

.christina-journey .bar {
    background: linear-gradient(180deg, var(--christina-color), #d4b89a);
}

.bar:hover {
    transform: scaleY(1.05);
    box-shadow: 0 10px 30px rgba(168, 197, 160, 0.4);
}

.bar-label {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Timeline */
.timeline-container {
    position: relative;
    padding: 2rem 0;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    transform: translateX(-50%);
}

.jamie-journey .timeline-container::before {
    background: linear-gradient(180deg, var(--jamie-color), #5f9ea0);
}

.catherine-journey .timeline-container::before {
    background: linear-gradient(180deg, var(--catherine-color), #c89191);
}

.timeline-item {
    display: flex;
    align-items: center;
    margin-bottom: 3rem;
    position: relative;
}

.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-marker {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 4px solid var(--bg-dark);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.jamie-journey .timeline-marker {
    background: var(--jamie-color);
}

.catherine-journey .timeline-marker {
    background: var(--catherine-color);
}

.christina-journey .timeline-marker {
    background: var(--christina-color);
}

.timeline-content {
    flex: 1;
    background: rgba(244, 237, 211, 0.8);
    padding: 2rem;
    border-radius: 15px;
    margin: 0 3rem;
    backdrop-filter: blur(10px);
    border: none;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    position: relative;
    overflow: visible;
}

.timeline-content.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-right: calc(50% + 2rem);
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: calc(50% + 2rem);
}

.timeline-content h4 {
    font-family: 'Open Sans', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 400;
    letter-spacing: 0.5px;
}

.timeline-content p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.timeline-date {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--primary-color);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
}

.jamie-journey .timeline-date {
    background: var(--jamie-color);
}

.catherine-journey .timeline-date {
    background: var(--catherine-color);
}

.christina-journey .timeline-date {
    background: var(--christina-color);
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.metric-card {
    background: rgba(244, 237, 211, 0.8);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: none;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.6s ease, transform 0.6s ease, var(--transition);
    position: relative;
    overflow: visible;
}

.metric-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.metric-card.animate-in:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(168, 197, 160, 0.3);
}


.jamie-journey .metric-card.animate-in:hover {
    box-shadow: 0 10px 30px rgba(127, 179, 176, 0.4);
    border-color: var(--jamie-color);
}

.catherine-journey .metric-card.animate-in:hover {
    box-shadow: 0 10px 30px rgba(212, 165, 165, 0.4);
    border-color: var(--catherine-color);
}

.metric-value {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.jamie-journey .metric-value {
    background: linear-gradient(135deg, var(--jamie-color), #b8c9c6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.catherine-journey .metric-value {
    background: linear-gradient(135deg, var(--catherine-color), #e8c4c4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.christina-journey .metric-value {
    background: linear-gradient(135deg, var(--christina-color), #d4b89a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.metric-label {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* Conclusion Section */
.conclusion-section {
    background: #F5F5F5;
    min-height: 100vh;
    padding: 4rem 2rem;
}

.final-message-section {
    background: #F5F5F5;
    min-height: 100vh;
    padding: 4rem 2rem;
}

.conclusion-title {
    font-family: 'Open Sans', sans-serif;
    font-weight: 700;
    text-align: center;
    font-size: 3rem;
    margin-bottom: 3rem;
    color: var(--text-primary);
    font-weight: 400;
    letter-spacing: 1px;
}

/* Conclusion Points */
.conclusion-points {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto 4rem;
    list-style: none;
    padding: 0;
}

.conclusion-point {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 0;
    border-radius: 15px;
    transition: var(--transition);
    opacity: 0;
    transform: translateY(30px);
    position: relative;
    overflow: visible;
}

.conclusion-point.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.conclusion-point:hover .conclusion-character img {
    transform: translateY(-5px) scale(1.02);
}

.conclusion-character {
    flex: 0 0 160px;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: translateX(-60px);
    transition: transform 0.6s ease, opacity 0.6s ease;
}

.conclusion-character img {
    width: 150px;
    height: auto;
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.45));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.conclusion-bubble {
    position: relative;
    text-align: center;
    background: rgba(255, 255, 255, 0.98);
    border: 4px solid #1a1a1a;
    border-radius: 60% 40% 50% 45% / 55% 35% 65% 45%;
    padding: 1.8rem 2.2rem;
    box-shadow:
        0 5px 10px rgba(0, 0, 0, 0.4),
        inset 0 2px 4px rgba(255, 255, 255, 0.6),
        inset 0 -2px 4px rgba(0, 0, 0, 0.08);
    max-width: 100%;
    opacity: 0;
    transform: translateX(-60px);
    transition: transform 0.6s ease, opacity 0.6s ease;
    transition-delay: 0.25s;
}

.conclusion-point.animate-in .conclusion-character {
    opacity: 1;
    transform: translateX(0);
}

.conclusion-point.animate-in .conclusion-bubble {
    opacity: 1;
    transform: translateX(0);
}

.conclusion-bubble h3 {
    font-family: 'Open Sans', sans-serif;
    font-weight: 700;
    font-size: 1.6rem;
    margin-bottom: 1.2rem;
    color: #1a1a1a;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.conclusion-bubble p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #333;
    margin: 0;
}


.conclusion-bubble.jamie-bubble {
    border-color: var(--jamie-color);
    box-shadow:
        0 10px 25px rgba(127, 179, 176, 0.25),
        inset 0 2px 4px rgba(255, 255, 255, 0.6);
}

.conclusion-bubble.catherine-bubble {
    border-color: var(--catherine-color);
    box-shadow:
        0 10px 25px rgba(212, 165, 165, 0.25),
        inset 0 2px 4px rgba(255, 255, 255, 0.6);
}

.conclusion-bubble.christina-bubble {
    border-color: var(--christina-color);
    box-shadow:
        0 10px 25px rgba(201, 168, 130, 0.25),
        inset 0 2px 4px rgba(255, 255, 255, 0.6);
}

.conclusion-message {
    text-align: center;
    max-width: 900px;
    margin: 4rem auto 2rem;
    padding: 0;
}

.message-label {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.message-title {
    font-family: 'Open Sans', sans-serif;
    font-weight: 700;
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 2rem;
    font-weight: 400;
    letter-spacing: 1px;
}

.message-content {
    background: rgba(244, 237, 211, 0.8);
    border-radius: 15px;
    padding: 2.5rem;
    backdrop-filter: blur(10px);
    border-left: 4px solid #476072;
    text-align: center;
    position: relative;
}

.message-content p {
    font-size: 1.2rem;
    line-height: 1.9;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

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

.message-content .message-cannot {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--color-dark);
    line-height: 1.8;
    margin: 2rem auto 1rem;
    text-align: center;
    display: block;
}

.message-content .message-quote {
    font-family: 'Nanum Pen Script', cursive;
    font-style: normal;
    font-size: 2.2rem;
    font-weight: 400;
    color: #f5f1e8;
    line-height: 1.8;
    margin: 2rem auto 0;
    padding: 3rem 2.5rem;
    background: var(--color-medium);
    border-radius: 12px;
    text-align: center;
    display: block;
    max-width: 800px;
    box-sizing: border-box;
}


/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .persona-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .bar-chart {
        height: 300px;
        flex-direction: column;
        align-items: stretch;
    }

    .bar {
        width: 100%;
        min-height: 40px;
    }

    .timeline-container::before {
        left: 20px;
    }

    .timeline-item {
        flex-direction: row !important;
    }

    .timeline-marker {
        left: 20px;
    }

    .timeline-content {
        margin-left: 3rem !important;
        margin-right: 0 !important;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    /* Conclusion Responsive */
    .conclusion-points {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .conclusion-point {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .conclusion-character {
        flex: 0 0 auto;
    }

    .conclusion-character img {
        width: 120px;
    }

    .conclusion-bubble {
        text-align: center;
    }


    .conclusion-message {
        margin: 3rem auto 2rem;
        padding: 0 1rem;
    }

    .message-title {
        font-size: 2rem;
    }

    .message-content {
        padding: 1.5rem;
    }

    .message-content p {
        font-size: 1.1rem;
    }

}


/* Solution Section */
.solution-section {
    background: #F5F5F5;
    padding: 4rem 2rem;
}

.solution-title.sticky-title {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #F5F5F5;
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.solution-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.bubble-chart-section {
    width: 100%;
}

.bubble-chart-container {
    width: 100%;
    max-width: 960px;
    margin: 2rem auto;
    padding: 2rem;
    background: rgba(244, 237, 211, 0.8);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.bubble-chart-container svg {
    display: block;
    margin: 0 auto;
}

.bubble-tooltip {
    font-family: var(--font-primary);
}

/* Unemployment Chart Container */
.unemployment-chart-container {
    position: absolute;
    top: 61px;
    left: -30px;
    width: 500px;
    max-height: 400px;
    padding: 1.5rem;
    background: rgba(244, 237, 211, 0.9);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: none;
    opacity: 0;
    z-index: 1000;
}

.unemployment-chart-container.show {
    display: block;
    opacity: 1;
    animation: fadeInUnemployment 0.5s ease-in;
}

@keyframes fadeInUnemployment {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.unemployment-chart-container svg {
    display: block;
    margin: 0 auto;
}

.unemployment-chart-container svg .domain,
.unemployment-chart-container svg .tick line {
    stroke: #666;
}

.unemployment-chart-container svg .tick text {
    fill: #334257;
}

/* Age Industry Treemap Container */
.age-industry-treemap-container {
    position: absolute;
    top: 60px;
    right: -50px;
    width: 540px;
    max-height: 440px;
    padding: 1.5rem;
    background: rgba(244, 237, 211, 0.9);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: none;
    opacity: 0;
    z-index: 1000;
}

.age-industry-treemap-container.show {
    display: block;
    opacity: 1;
    animation: fadeInTreemap 0.5s ease-in;
}

@keyframes fadeInTreemap {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInTreemap {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.age-industry-treemap-container svg {
    display: block;
    margin: 0 auto;
}

/* Rent Chart Container */
.rent-chart-container {
    position: absolute;
    top: 470px;
    right: 20px;
    width: 500px;
    max-height: 400px;
    padding: 1.5rem;
    background: rgba(244, 237, 211, 0.9);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: none;
    opacity: 0;
    z-index: 1000;
}

.rent-chart-container.show {
    display: block;
    opacity: 1;
    animation: fadeInRentChart 0.5s ease-in;
}

@keyframes fadeInRentChart {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.rent-chart-container svg {
    display: block;
    margin: 0 auto;
}

.rent-chart-container svg .domain,
.rent-chart-container svg .tick line {
    stroke: #666;
}

.rent-chart-container svg .tick text {
    fill: #334257;
}

/* Industry Bar Chart Container */
.industry-bar-chart-container {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 500px;
    max-height: 400px;
    padding: 1.5rem;
    background: rgba(244, 237, 211, 0.9);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 1000;
}

.industry-bar-chart-container.show {
    display: block;
    opacity: 1;
    animation: fadeInChart 0.5s ease-in;
}

/* Age Industry Bar Chart Container */
.age-industry-bar-chart-container {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 500px;
    max-height: 400px;
    padding: 1.5rem;
    background: rgba(244, 237, 211, 0.9);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 1000;
}

.age-industry-bar-chart-container.show {
    display: block;
    opacity: 1;
    animation: fadeInChart 0.5s ease-in;
}

@keyframes fadeInChart {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.industry-bar-chart-container svg,
.age-industry-bar-chart-container svg {
    display: block;
    margin: 0 auto;
}

.industry-bar-chart-container svg .domain,
.industry-bar-chart-container svg .tick line,
.age-industry-bar-chart-container svg .domain,
.age-industry-bar-chart-container svg .tick line {
    stroke: #666;
}

.industry-bar-chart-container svg .tick text,
.age-industry-bar-chart-container svg .tick text {
    fill: #334257;
}

/* Map Section */
.map-section {
    background: #F5F5F5;
    /* padding: 4rem 2rem; */
    position: sticky;
    top: 0;
    z-index: 5;
    overflow-x: hidden;
}

.map-section .content-wrapper {
    position: relative;
    max-width: 100%;
    padding: 0;
}

.map-container {
    width: 100vw;
    max-width: 100vw;
    height: 680px;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    position: relative;
    margin-top: 2rem;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    background-image: url('assets/images/square.b921ede8.jpg') !important;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.location-map-section {
    background: #F5F5F5;
    min-height: 100vh;
    padding: 0;
    position: relative;
}

.location-map-container {
    height: 100vh;
    width: 100vw;
    margin: 0;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    position: absolute;
    top: 0;
    left: 0;
}

/* Location Chart Containers */
.location-chart-container {
    position: absolute;
    right: 20px;
    top: 100vh;
    width: 520px;
    max-width: 90%;
    z-index: 1000;
    transition: top 0.8s ease-out, opacity 0.8s ease-out, transform 0.8s ease-out;
    pointer-events: none;
    opacity: 0;
    transform: translateY(20px);
}

.location-chart-container.show {
    top: 50%;
    transform: translateY(-50%);
    pointer-events: auto;
    opacity: 1;
}

.location-chart-container.hidden-outside {
    opacity: 0 !important;
    pointer-events: none !important;
}

.location-chart-container.fade-out {
    top: -100px;
    opacity: 0;
    transform: translateY(-50%);
}

.location-chart-container img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    background: rgba(255, 255, 255, 0.95);
    padding: 10px;
}

.chart-canada-container {
    z-index: 1001;
}

.chart-oshawa-container {
    width: 676px;
    /* 30% bigger than 520px: 520 * 1.3 = 676 */
    max-width: 90%;
    z-index: 1002;
}

.map-container .leaflet-container {
    height: 100%;
    width: 100%;
    border-radius: 15px;
    background: transparent !important;
}

.map-container .leaflet-pane {
    background: transparent !important;
}

.map-container .leaflet-tile-container {
    display: none !important;
}

/* Custom markers for persona images */
.leaflet-marker-icon {
    box-shadow: none !important;
}

.persona-marker {
    border: none;
    box-shadow: none;
    transition: transform 0.3s ease;
    cursor: move;
    cursor: grab;
    background: transparent;
}

.persona-marker:active {
    cursor: grabbing;
}

.persona-marker:hover {
    transform: scale(1.1);
}

.jamie-marker {
    border-color: var(--jamie-color);
}

.catherine-marker {
    border-color: var(--catherine-color);
}

.christina-marker {
    border-color: var(--christina-color);
}

/* Comic Book Speech Bubble Styling for Leaflet Popups */
.leaflet-popup-content-wrapper {
    background: rgba(244, 237, 211, 0.98) !important;
    border: 4px solid #4c585b !important;
    /* Uneven oval shape - different border radius values create hand-drawn look */
    border-radius: 47% 53% 59% 41% / 66% 52% 48% 34% !important;
    box-shadow:
        0 5px 10px rgba(0, 0, 0, 0.4),
        inset 0 2px 4px rgba(255, 255, 255, 0.6),
        inset 0 -2px 4px rgba(0, 0, 0, 0.1) !important;
    padding: 38px 45px !important;
    margin: 0 !important;
    position: relative !important;
    font-family: 'Comic Sans MS', 'Chalkboard SE', 'Comic Neue', cursive, sans-serif !important;
    filter: drop-shadow(3px 3px 6px rgba(0, 0, 0, 0.3)) !important;
    transform: rotate(-0.8deg) !important;
    animation: bubbleWobble 0.4s ease !important;
    overflow: visible !important;
}

.leaflet-popup-content-wrapper::before {
    content: '' !important;
    position: absolute !important;
    bottom: -12px !important;
    left: 50% !important;
    transform: translateX(-50%) rotate(45deg) !important;
    width: 18px !important;
    height: 18px !important;
    background: rgba(244, 237, 211, 0.95) !important;
    border-right: 3px solid #4c585b !important;
    border-bottom: 3px solid #4c585b !important;
    border-radius: 0 0 0 8px !important;
    z-index: 1 !important;
}

@keyframes bubbleWobble {

    0%,
    100% {
        transform: rotate(-1deg) scale(1);
    }

    25% {
        transform: rotate(1deg) scale(1.02);
    }

    50% {
        transform: rotate(-0.5deg) scale(1.01);
    }

    75% {
        transform: rotate(0.5deg) scale(1.01);
    }
}

.leaflet-popup-content {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    color: #4c585b !important;
    text-align: center !important;
    font-weight: 600 !important;
    text-shadow: 0.5px 0.5px 1px rgba(0, 0, 0, 0.1) !important;
}

.leaflet-popup-content b {
    color: #4c585b !important;
    font-size: 16px !important;
    display: block !important;
    margin-bottom: 5px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.leaflet-popup-tip {
    background: rgba(244, 237, 211, 0.98) !important;
    border: 4px solid #4c585b !important;
    border-top: none !important;
    border-left: none !important;
    box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3) !important;
    transform: rotate(45deg) scale(1.1) !important;
    width: 20px !important;
    height: 20px !important;
}

.leaflet-popup-close-button {
    display: none !important;
}

/* Add hand-drawn effect with additional border layer */
.leaflet-popup-content-wrapper::after {
    content: '' !important;
    position: absolute !important;
    top: -3px !important;
    left: -3px !important;
    right: -3px !important;
    bottom: -3px !important;
    /* border: 2px solid rgba(0, 0, 0, 0.15) !important; */
    /* border-radius: 50% 40% 50% 40% / 60% 30% 70% 40% !important; */
    pointer-events: none !important;
    z-index: -1 !important;
    animation: borderPulse 3s ease-in-out infinite !important;
}

@keyframes borderPulse {

    0%,
    100% {
        opacity: 0.2;
        transform: scale(1) rotate(-1deg);
    }

    50% {
        opacity: 0.4;
        transform: scale(1.01) rotate(0.5deg);
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Toggle Button for Catherine's Journey */
.toggle-container {
    margin-left: auto;
}

.toggle-button {
    background: rgba(244, 237, 211, 0.8);
    border: 2px solid var(--catherine-color);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.toggle-button:hover {
    background: var(--catherine-color);
    transform: translateY(-2px);
}

/* Persona Pictures */
.persona-picture {
    width: 100%;
    max-width: 400px;
    margin: 2rem auto;
    border-radius: 15px;
    overflow: hidden;
}

.picture-placeholder {
    width: 100%;
    padding-top: 100%;
    background: rgba(244, 237, 211, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed rgba(168, 197, 160, 0.3);
    color: var(--text-secondary);
    font-size: 1.2rem;
}

/* Catherine's View Container */
.catherine-view-container {
    position: relative;
    width: 100%;
    min-height: 300px;
}

.catherine-picture-view,
.catherine-comparison-view {
    display: none;
    padding: 2rem;
}

.catherine-picture-view.active,
.catherine-comparison-view.active {
    display: block;
}

.comparison-content {
    background: rgba(244, 237, 211, 0.8);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    position: relative;
    overflow: visible;
}

.comparison-content h3 {
    font-family: 'Open Sans', sans-serif;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.comparison-content p {
    color: var(--text-secondary);
}

.comparison-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.comparison-item {
    background: rgba(244, 237, 211, 0.7);
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
}

.comparison-item h4 {
    font-family: 'Open Sans', sans-serif;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.comparison-item p {
    color: var(--text-secondary);
    font-size: 1rem;
}