:root {
    --bg-color: #222222;
    --text-white: #ffffff;
    --accent-blue: #0066FF;
    --font-size-body: clamp(16px, 1.5vw, 24px);
    --font-size-h1: clamp(40px, 5vw, 87px);
    --container-max: 1920px;
    --section-padding: clamp(3rem, 5vw, 6rem);
    --text-grey: #C4C4C4;
    --lh-body: 1.6;
    --lh-heading: 1.2;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    background-color: var(--bg-color);
    color: var(--text-white);
    overflow-x: clip;
    scroll-behavior: smooth;
    font-family: 'Poppins', sans-serif;
}

.standard-body-text {
    font-size: var(--font-size-body);
    line-height: var(--lh-body);
    color: #cccccc;
    font-weight: 400;
    margin-bottom: 1rem;
}

.nav-fab {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--nav-bg);
    border: 1px solid var(--nav-border);
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: opacity 0.3s ease, background-color 0.3s ease, transform 0.2s ease;
    position: fixed;
    z-index: 1000;
    text-decoration: none;
    cursor: none;
}

.nav-fab:hover {
    transform: scale(1.1);
}

/* --- Toggle Button Glow & Attention Ring Animations --- */
@keyframes glow-left-panel {
    0% { box-shadow: 0 0 10px rgba(255, 255, 255, 0.2); }
    50% { box-shadow: 0 0 25px rgba(255, 255, 255, 0.6); }
    100% { box-shadow: 0 0 10px rgba(255, 255, 255, 0.2); }
}

.glow-active {
    animation: glow-left-panel 2s infinite;
}

@keyframes attentionRingZoom {
    0% {
        transform: translate(-50%, -50%) scale(20);
        opacity: 0;
        border-width: 1px;
    }
    15% {
        opacity: 0.9;
        border-width: 2px;
    }
    85% {
        opacity: 0.9;
        border-width: 2px;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
        border-width: 3px;
    }
}

.nav-fab .attention-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.8), inset 0 0 14px rgba(255, 255, 255, 0.8);
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    z-index: 10;
}

.nav-fab .attention-ring.animate-ring {
    animation: attentionRingZoom 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#toc-toggle {
    top: 30px;
    left: 30px;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease, color 0.3s ease, opacity 0.3s ease;
}

#toc-toggle.drawer-open {
    background: rgba(25, 25, 25, 0.7);
    color: #ffffff;
    transform: translateX(490px);
}

#toc-toggle.drawer-open:hover {
    transform: translateX(490px) scale(1.1);
}

#home-up-btn {
    top: 30px;
    right: 30px;
}

#scroll-down-btn {
    bottom: 30px;
    right: 30px;
}

.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.drawer {
    position: fixed;
    top: 0;
    left: -650px;
    width: 500px;
    height: 100vh;
    background-color: rgba(68, 68, 68, 0.95);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    z-index: 999;
    transition: left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.project-container {
    max-width: var(--container-max);
    margin: 0 auto;
}

.project-section,
.final-showcase-section,
.scroll-sequence-wrapper {
    margin-top: 0;
    margin-bottom: 24px;
}

.hero-section {
    height: 100vh;
    padding: 0;
    width: 100%;
}

.hero-image-wrapper {
    width: 100%;
    height: 100%;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Overview Section */
.overview-section {
    padding: var(--section-padding) 10%;
}

.meta-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 80px;
}

/* --- Jan Aushadhi Overlapping Avatar Group --- */
.team-avatars {
    display: flex;
    align-items: center;
    gap: 0; /* Negates the old 16px gap */
    padding-left: 6px; 
}

.team-avatars .avatar-wrapper {
    position: relative;
    margin-left: -16px;
    transition: transform 0.2s ease, z-index 0.2s ease;
}

.team-avatars .avatar-wrapper:first-child {
    margin-left: 0; 
}

/* Base Avatar Styling & Dark Theme Cutout */
.team-avatars .avatar-wrapper img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    box-sizing: border-box;
    background-color: #222222;
    border: 3px solid #222222; /* Matches bg color to create separator cutout */
}

/* Specific Blue Ring & Gap ONLY for Rishi */
.team-avatars .avatar-wrapper:nth-child(1) img { 
    padding: 2px; /* Inner dark gap */
    border: 3px solid #2962FF; /* Blue ring */
    box-shadow: 0 0 0 2px #222222; /* Outer dark cutout separator */
}

/* Deterministic Stacking Order */
.team-avatars .avatar-wrapper:nth-child(1) { z-index: 4; }
.team-avatars .avatar-wrapper:nth-child(2) { z-index: 3; }
.team-avatars .avatar-wrapper:nth-child(3) { z-index: 2; }
.team-avatars .avatar-wrapper:nth-child(4) { z-index: 1; }

/* Tooltip Styles */
.team-avatars .avatar-wrapper::after {
    content: attr(data-name);
    position: absolute;
    top: -32px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: #ffffff; /* Inverted for dark theme */
    color: #222222;
    font-size: 12px;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    padding: 4px 10px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 20;
}

/* Hover States */
.team-avatars .avatar-wrapper:hover {
    z-index: 10;
    transform: translateY(-4px);
}

.team-avatars .avatar-wrapper:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.details-block {
    display: flex;
    gap: 40px;
}

.detail-col.border-left {
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    padding-left: 40px;
}

.meta-label {
    font-size: 14px;
    opacity: 0.7;
    margin-bottom: 12px;
}

.overview-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.overview-content h2 {
    font-size: var(--font-size-h1);
    line-height: 1.1;
    margin-bottom: 40px;
}

.text-accent {
    color: var(--accent-blue);
}

.overview-text {
    font-size: var(--font-size-body);
    line-height: 1.6;
    width: 100%;
    text-align: justify;
    margin-top: 60px;
    color: #cccccc;
}

.bg-highlight {
    background-color: var(--accent-blue);
    color: var(--text-white);
    padding: 4px 8px;
}

.\33 d-icon {
    max-width: 250px;
    height: auto;
    object-fit: contain;
}

/* App Showcase Section */
.showcase-section {
    padding: var(--section-padding) 10%;
    padding-top: 12px;
    position: relative;
}

.showcase-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.showcase-text-block {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 24px;
    z-index: 1;
}

.white-banner {
    position: relative;
    padding: 0px 0;
}

.white-banner::before {
    content: "";
    position: absolute;
    top: -20px;
    bottom: -20px;
    right: -60vw;
    left: -50vw;
    background-color: var(--text-white);
    z-index: -1;
}

.white-banner h3 {
    font-size: clamp(32px, 3vw, 48px);
    color: var(--accent-blue);
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
}

.showcase-desc {
    font-size: var(--font-size-body);
    color: #cccccc;
    line-height: 1.6;
    max-width: 90%;
}

.showcase-media {
    width: 100%;
    height: 100%;
    min-height: 400px;
    object-fit: cover;
    border-radius: 24px;
    position: relative;
    z-index: 2;
}

/* Drawer & ToC */
.drawer.open {
    left: 0;
    box-shadow: 20px 0 50px rgba(0,0,0,0.5);
}



/* Role Section */
.role-section {
    padding: 2rem 10%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.role-container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: clamp(40px, 8vw, 172px);
    width: 100%;
    max-width: 1800px;
}

.role-arrow-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    flex: 1;
    padding: 0 4vw;
}

.role-text {
    font-size: clamp(24px, 2vw, 48px);
    font-weight: 500;
    color: var(--text-white);
}


.role-graphic {
    max-width: 250px;
    width: 100%;
    height: auto;
    object-fit: contain;
}


.long-arrow {
    width: 100%;
    max-width: 500px;
    height: 3px;
    background-color: var(--text-white);
    position: relative;
    border-radius: 2px;
    margin-top: 10px;
}

.long-arrow::after {
    content: '';
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 16px;
    height: 16px;
    border-top: 3px solid var(--text-white);
    border-right: 3px solid var(--text-white);
    border-radius: 1px;
}

/* Chapter Section */
.chapter-section {
    padding: var(--section-padding) 10%;
}

.chapter-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 80px;
    gap: 40px;
}

.chapter-title-group {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.chapter-number {
    font-size: clamp(48px, 6vw, 87px);
    font-weight: 600;
    color: #D0D7FF;
    line-height: 1;
    margin: 0;
}

.chapter-title {
    font-size: clamp(36px, 4vw, 64px);
    font-weight: 500;
    color: var(--text-white);
    line-height: var(--lh-heading);
    margin: 0;
}

.chapter-desc {
    font-size: var(--font-size-body);
    font-weight: 300;
    color: var(--text-grey);
    max-width: 626px;
    text-align: right;
    line-height: var(--lh-body);
    margin: 0;
}

.chapter-diagram-img {
    width: 100%;
    max-width: 1400px;
    height: auto;
    display: block;
    margin: 0 auto;
    object-fit: contain;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px 40px;
    margin-top: 140px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 40px;
}

.stat-visual {
    position: relative;
    width: 190px;
    height: 190px;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.stat-visual:active,
.stat-visual.pump-bounce {
    transform: scale(1.04);
}

.progress-ring {
    position: absolute;
    top: 0;
    left: 0;
    transform: rotate(-90deg);
}

.progress-ring__circle {
    stroke-dasharray: 439.8;
    stroke-dashoffset: 439.8;
    transition: stroke-dashoffset 2s cubic-bezier(0.16, 1, 0.3, 1);
}

.stat-number {
    font-weight: 600;
    font-size: 24px;
    color: #000000;
    z-index: 2;
    position: relative;
    width: 114px;
    height: 114px;
    background-color: var(--text-white);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}


/* Primary Research */
.models-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 60px;
    margin-bottom: 80px;
}

.models-grid h4 {
    font-size: clamp(24px, 2vw, 32px);
    color: var(--accent-blue);
    font-weight: 600;
    margin-bottom: 24px;
    line-height: var(--lh-heading);
}

.models-grid p {
    font-size: var(--font-size-body);
    font-weight: 300;
    color: var(--text-white);
    line-height: var(--lh-body);
    text-align: left; /* Changed from justify */
    margin: 0;
}

.full-width-img {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    display: block;
    object-fit: cover;
}

.insights-title {
    font-size: clamp(40px, 4vw, 64px);
    font-weight: 500;
    color: var(--text-white);
    line-height: var(--lh-heading);
    text-align: center;
    position: relative;
    z-index: 2;
    margin-top: -140px;
    margin-bottom: 60px;
}

.insights-images-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.insight-img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    object-fit: contain;
}


/* Survey Questionnaire */
.survey-title { margin-bottom: 60px; margin-top: 0; }
.marquee-container {
    width: 100%; overflow: hidden; position: relative;
    padding: 20px 0; display: flex;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}
.marquee-track { display: flex; gap: 24px; width: max-content; animation: scrollMarquee 40s linear infinite; }
.marquee-track:hover { animation-play-state: paused; }
@keyframes scrollMarquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.question-card {
    width: 300px; height: 200px; background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px; padding: 24px; display: flex; flex-direction: column; flex-shrink: 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1); backdrop-filter: blur(5px);
}
.q-number { color: var(--accent-blue); font-weight: 600; font-size: 20px; margin-bottom: 16px; }
.q-text { color: var(--text-grey); font-size: 14px; }

/* The Graphics Wrapper */
.graphics-wrapper {
    position: relative;
    width: 100%;
    max-width: 800px; /* Matched to your original layout width */
    margin: -40px auto 80px auto;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

/* The Phone */
.phone-container {
    width: 100%;
    aspect-ratio: 3945 / 1911;
    position: relative;
    z-index: 5;
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.4));
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Layer 1 (Underneath): The Camera Viewfinder Aperture Window */
.phone-viewfinder-screen {
    position: absolute;
    left: 14.55%;
    top: 3.87%;
    width: 60.33%;
    height: 92.31%;
    overflow: hidden;
    z-index: 1;
    background-color: #000000;
    pointer-events: none;
}

/* Moving Photo Wrapper for Smooth Scroll Parallax */
.phone-survey-img-wrapper {
    position: absolute;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 120%;
    display: flex;
    align-items: center;
    justify-content: center;
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

.phone-survey-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}

/* Layer 2 (Top): The iPhone 16 Camera UI Layer */
.phone-cam-ui {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 3;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
    display: block;
}

/* Sticky Notes Base */
.sticky-note {
    position: absolute;
    width: clamp(150px, 20vw, 250px);
    height: auto;
    z-index: 10;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3));
    transform: rotate(var(--rot));
}

/* Mobile adjustments to override hardcoded pixels on small screens */
@media (max-width: 768px) {
    .graphics-wrapper {
        margin: 20px auto 40px auto;
        aspect-ratio: 1 / 1;
        max-width: 100%;
    }
    .phone-container { width: 85%; }
    .sticky-note { width: 30%; }

    /* !important overrides the inline HTML styles for mobile bounds */
    .sticky-note:nth-child(2) { left: -5% !important; top: 35% !important; }
    .sticky-note:nth-child(3) { left: 10% !important; top: 75% !important; }
    .sticky-note:nth-child(4) { left: 55% !important; top: 75% !important; }
    .sticky-note:nth-child(5) { left: 75% !important; top: 35% !important; }
}

#survey-questionnaire {
    position: relative;
    z-index: 20;
}

#affinity-mapping {
    position: relative;
    z-index: 10;
}


/* Affinity Mapping Video Showcase */
.video-showcase-bg {
    margin-top: 60px;
    padding: 80px 40px;
    border-radius: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Creates the subtle dotted grid background */
    background-image: radial-gradient(rgba(255, 255, 255, 0.15) 1.5px, transparent 1.5px);
    background-size: 24px 24px;
    background-position: center center;
}

.mac-window {
    width: 100%;
    max-width: 1100px;
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.mac-header {
    height: 40px;
    background-color: #F6F6F6;
    display: flex;
    align-items: center;
    padding: 0 16px;
    position: relative;
    border-bottom: 1px solid #EAEAEA;
}

.mac-dots {
    display: flex;
    gap: 8px;
}

.mac-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background-color: #FF5F56; }
.dot.yellow { background-color: #FFBD2E; }
.dot.green { background-color: #27C93F; }

.window-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #333;
}

.affinity-video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Mobile responsiveness for the video container */
@media (max-width: 768px) {
    .video-showcase-bg {
        padding: 40px 15px;
    }
}

/* Ideation & Concept Section */
.concept-diagram-wrapper {
    position: relative;
    width: 100%;
    max-width: 900px; /* Increased size */
    margin: 80px auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.diagram-bg-img {
    width: 100%;
    height: auto;
    display: block;
    z-index: 1;
}

/* Center Video and Blend Text */
.blob-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30%; /* Decreased from 38% to give it more breathing room */
    aspect-ratio: 1 / 1;
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    /* Feathering the edges smoothly into the background */
    -webkit-mask-image: radial-gradient(circle, black 55%, transparent 75%);
    mask-image: radial-gradient(circle, black 55%, transparent 75%);
    overflow: hidden;
}

.blob-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.1); /* Slight zoom to hide edges if needed */
}

.blend-text {
    position: absolute;
    font-size: clamp(1.5rem, 2.5vw, 2.2rem); /* Scaled down text size */
    font-weight: 600;
    color: #FFFFFF;
    mix-blend-mode: difference;
    text-align: center;
    pointer-events: none;
    z-index: 10;
    margin: 0;
    white-space: nowrap; /* Forces text to stay on one line */
}



/* Text Highlight */
.highlight-blue {
    background-color: #2F80ED;
    color: white;
    padding: 0 4px;
    border-radius: 2px;
}

/* System Architecture Section (Light Theme Breakout) */
.light-section {
    background-color: #FFFFFF;
    color: #000000;
    padding: var(--section-padding) 10%;
    position: relative; /* Ensures the clipping boundary is strictly enforced */
    overflow: hidden; /* Masks out the bleeding gradient blur */
}

.system-intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 40px;
}

.system-heading h2 {
    font-size: clamp(40px, 4.5vw, 64px);
    font-weight: 700;
    line-height: 1.2;
    color: #000000;
    margin: 0;
}

.highlight-blue-box {
    background-color: #2F80ED;
    color: #FFFFFF;
    padding: 4px 16px;
    display: inline-block;
    margin: 8px 0;
    border-radius: 4px;
}

.system-hero-img img {
    width: 100%;
    max-width: 600px;
    height: auto;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.1));
}

/* Custom Divider */
.system-divider {
    display: flex;
    align-items: center;
    gap: 24px;
    margin: 100px 0 60px 0;
}

.divider-text {
    font-size: clamp(16px, 1.5vw, 20px);
    font-weight: 600;
    color: #000000;
    white-space: nowrap;
}

.divider-line {
    flex-grow: 1;
    height: 1.5px;
    background-color: #000000;
    opacity: 0.8;
}

.divider-circles {
    display: flex;
    gap: 12px;
}

.circle-outline {
    width: 20px;
    height: 20px;
    border: 2px solid #000000;
    border-radius: 50%;
}

.circle-solid {
    width: 20px;
    height: 20px;
    background-color: #000000;
    border-radius: 50%;
}

/* System Diagram */
.system-diagram {
    width: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    /* Ensure the pseudo-element stays behind the image */
    z-index: 1;
}

/* Generates the soft gradient blobs behind the diagram */
.system-diagram::before {
    content: "";
    position: absolute;
    top: -10%;
    left: -10%;
    right: -10%;
    bottom: -10%;
    background:
        radial-gradient(circle at 20% 40%, rgba(210, 255, 210, 0.7) 0%, transparent 50%), /* Soft Green */
        radial-gradient(circle at 80% 30%, rgba(255, 210, 225, 0.7) 0%, transparent 50%), /* Soft Pink */
        radial-gradient(circle at 50% 80%, rgba(255, 228, 200, 0.7) 0%, transparent 60%); /* Warm Peach */
    filter: blur(80px);
    z-index: -1;
    pointer-events: none;
}

.system-diagram img {
    width: 100%;
    max-width: 1200px;
    height: auto;
    display: block;
    position: relative;
    z-index: 2;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .system-intro-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .system-divider {
        flex-wrap: wrap;
        margin: 60px 0 40px 0;
    }

    .divider-text {
        width: 100%;
        text-align: left;
    }
}

/* User Flow Section */
.user-flow-wrapper {
    position: relative;
    width: 100%;
    max-width: var(--container-max);
    margin: 80px auto;
}

#user-flow .user-flow-wrapper:last-child {
    margin-bottom: 0; /* Removes the trailing gap from the final user flow block */
}

/* Positions text in the empty top-left space of the video */
.user-flow-content {
    position: absolute;
    top: 60px;
    left: 10%;
    z-index: 10;
    max-width: 45%;
}

.flow-title {
    font-size: clamp(48px, 6vw, 80px);
    color: #D0D7FF;
    font-weight: 600;
    margin: 0 0 16px 0;
    line-height: 1.1;
}

.flow-subtitle {
    font-size: clamp(24px, 3vw, 36px);
    color: var(--text-white);
    font-weight: 500;
    margin: 0 0 48px 0;
}

/* Feature List */
.flow-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.flow-features li {
    display: flex;
    align-items: center;
    gap: 24px;
    font-size: clamp(18px, 2vw, 22px);
    font-weight: 400;
    color: #E0E0E0;
}

/* Icon Circles */
.icon-circle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.bg-blue { background-color: #2F80ED; }
.bg-green { background-color: #00E676; }
.bg-yellow { background-color: #FFEA00; }

.user-flow-video {
    width: 100%;
    height: auto;
    display: block;
    position: relative;
    z-index: 1;
}

/* Mobile Adjustments */
@media (max-width: 992px) {
    .user-flow-wrapper {
        display: flex;
        flex-direction: column;
        padding: 0 5%;
    }

    /* Disables absolute positioning on small screens so text stacks above the video */
    .user-flow-content {
        position: relative;
        top: 0;
        left: 0;
        max-width: 100%;
        margin-bottom: 40px;
    }
}

/* Final Showcase Image Section */
.final-showcase-section {
    width: 100%;
    height: 100vh; /* Forces the section to be exactly one screen tall */
    overflow: hidden;
}

.hero-style-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures the image fills the entire area seamlessly like a hero background */
    display: block;
    /* Add this soft white glow */
    box-shadow: 0px 0px 80px 20px rgba(255, 255, 255, 0.15);
}

/* Footer 3D Scroll Sequence */
.scroll-sequence-wrapper {
    position: relative;
    width: 100%;
    height: 350vh; /* Increased from 300vh to pace the 30 frames */
    background-color: var(--bg-color);
}

.sticky-canvas-container {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#bottle-canvas {
    width: 100%;
    height: 100vh; /* Forces the canvas to be the exact height of the screen */
    object-fit: cover; /* Scales the sequence so it always touches the top and bottom edges */
    z-index: 5;
}

/* Footer Reveal Container */
.footer-reveal-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease-in-out;
}

/* CENTER ROW: Balanced Project Cards Layout */
.footer-projects-center {
    position: absolute;
    top: 32%;
    left: 0;
    width: 100%;
    transform: translateY(-50%); /* Adjusted for full-width positioning */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Invisible wrappers to balance the left and right weights */
.side-text-wrapper {
    flex: 1; /* Both sides take up exactly 50% of the remaining space */
    display: flex;
}

.side-text-wrapper.left {
    justify-content: flex-end; /* Pushes "Up next" against the cards */
    padding-right: 48px;
}

.side-text-wrapper.right {
    justify-content: flex-start; /* Pushes "Explore" against the cards */
    padding-left: 48px;
}

.cards-wrapper {
    display: flex;
    gap: 24px;
}

.footer-project-card {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 480px;
}

/* Side Texts Base Styling (Up next & Explore) */
.side-text-link {
    color: var(--bg-color);
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    position: relative;
    padding-bottom: 6px;
    opacity: 0.7; /* Matches the bottom footer links */
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

a.side-text-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background-color: var(--bg-color);
    width: 0;
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

a.side-text-link:hover::after {
    width: 100%;
}

a.side-text-link:hover {
    opacity: 1; /* Brightens on hover like the footer links */
}

/* Card Image & Hover Outline */
.card-image-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    background-color: #222; /* Placeholder if image is loading */
    overflow: hidden;
    outline: 2px solid transparent; /* Hidden by default */
    outline-offset: 0px;
    transition: outline-color 0.3s ease, outline-offset 0.3s ease;
}

.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-title {
    color: var(--bg-color); /* Matches footer texts */
    font-size: 18px;
    font-weight: 600;
    text-align: left;
}

/* The requested hover effect: a stroke with a gap */
.footer-project-card:hover .card-image-wrapper {
    outline-color: var(--bg-color);
    outline-offset: 4px;
}

/* BOTTOM BAR: Pinned to bottom of the sticky viewport */
.footer-bottom-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 11;
}

.footer-bottom-container {
    background-color: #222222;
    width: 100%;
    padding: 48px 10%;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
}


/* --- Email Hover Interaction --- */
#copy-email {
    transition: color 0.3s ease;
    cursor: pointer;
}

#copy-email:hover {
    color: #1A73E9;
}

/* Remove old footer-col absolute positioning since they are now in the flex bottom bar */
.footer-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.left-links {
    align-items: flex-start;
}

.right-links {
    align-items: flex-end;
}

/* Link Base Styling & Underline Animation */
.footer-col a {
    color: rgba(255, 255, 255, 0.5); /* Muted white base */
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    position: relative;
    padding-bottom: 6px;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.footer-col a::after {
    content: '';
    position: absolute;
    bottom: 0;
    height: 2px;
    background-color: #FFFFFF; /* Makes the sliding underline crisp white */
    width: 0;
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.left-links a::after {
    left: 0;
}

.right-links a::after {
    right: 0; 
}

.footer-col a:hover::after {
    width: 100%;
}

.footer-col a:hover {
    color: #FFFFFF; /* Text goes solid white on hover */
}

/* Social Link URL Reveal Animation */
.hover-ext {
    display: inline-block;
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    vertical-align: bottom;
    transition: max-width 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.social-link:hover .hover-ext {
    max-width: 250px; /* Expands to reveal the URL */
    opacity: 1;
}

/* Email Section (center column of the footer bar) */
.email-section {
    align-items: center;
    text-align: center;
    flex: 1;
}

.email-section .small-caps {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 1px;
    margin: 0 0 12px 0;
    color: rgba(255, 255, 255, 0.5); /* Matches nav/social link muted color */
}

/* Force copy status to remain visible when JS updates the text */
#copy-status {
    color: rgba(255, 255, 255, 0.5);
    opacity: 1;
}

.email-text {
    font-size: clamp(20px, 2.5vw, 32px);
    font-weight: 600;
    margin: 0 0 12px 0;
    cursor: pointer;
    transition: color 0.3s ease, opacity 0.3s ease;
    color: #FFFFFF;
}

.email-text:hover {
    color: #1A73E9;
    opacity: 1;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .footer-reveal-content {
        flex-direction: column;
        justify-content: space-between;
        padding: 40px 5%;
    }
    .footer-bottom-container {
        flex-direction: column;
        align-items: center;
        gap: 32px;
        padding: 32px 5%;
    }
    .left-links { align-items: center; }
    .right-links { align-items: center; text-align: center; }
    .footer-col { text-align: center; gap: 12px; }
}




/* --- Redesigned Drawer Inner Content --- */
.drawer-content-wrapper {
    box-sizing: border-box;
    padding: 24px 12px 12px 12px;
    height: 100%;
    overflow-y: scroll; /* Forces scrollbar track to stay visible, preventing jumps */
    display: flex;
    flex-direction: column;
    gap: 16px;
    overscroll-behavior: contain; /* Traps the scroll inside the panel */
}

/* Accordion Sections */
.panel-section {
    background-color: #222222;
    border-radius: 12px;
    padding: 24px; /* Perfectly equal on all sides */
    color: var(--text-white);
    box-sizing: border-box;
}

.panel-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.panel-section-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.chevron {
    transition: transform 0.3s ease, background-color 0.3s ease;
    padding: 8px; /* Gives the background circle room to breathe */
    border-radius: 50%; /* Makes the hover background a perfect circle */
}

/* New Hover Rule: Applies the pill-match background when hovering over the header */
.panel-section-header:hover .chevron {
    background-color: #444444; 
}

/* Buttery smooth CSS Grid Accordion */
.panel-section-content {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s cubic-bezier(0.4, 0, 0.2, 1), margin-top 0.3s ease;
    opacity: 0;
}

/* The inner wrapper is required for Grid animation to work */
.panel-section-content > div {
    overflow: hidden;
}

.panel-section.expanded .panel-section-content {
    grid-template-rows: 1fr;
    margin-top: 16px;
    opacity: 1;
}

.panel-section.expanded .chevron {
    transform: rotate(180deg);
}

/* Content Typography */
.panel-section-content p {
    font-size: 0.95rem;
    line-height: 1.5;
    opacity: 0.8;
    margin: 0;
}

.details-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.9;
    font-weight: 400;
}

.details-list strong {
    font-weight: 600;
}

/* --- Hardcoded TOC List Styling --- */
#toc-list {
    margin-top: 0;
    gap: 8px; 
    list-style: none; /* Removes default ol numbering */
    padding: 0;
    display: flex;
    flex-direction: column;
}

#toc-list a {
    display: flex; 
    font-size: 0.95rem;
    padding: 8px 16px;
    border-radius: 50px;
    width: 100%;
    transition: background-color 0.3s, color 0.3s, opacity 0.3s;
    text-decoration: none;
    color: var(--text-white);
    box-sizing: border-box;
}

#toc-list a:hover {
    background-color: #424242;
    font-weight: 500;
    color: #FFFFFF; /* Replaces the blue with crisp white */
    opacity: 1;
}

.toc-num {
    width: 36px; /* Fixed width ensures the text labels align perfectly vertically */
    font-weight: 500;
    opacity: 0.6;
    flex-shrink: 0;
}

/* --- Toggle Button Glow & Attention Ring Animations --- */
@keyframes glow-left-panel {
    0% { box-shadow: 0 0 10px rgba(255, 255, 255, 0.2); }
    50% { box-shadow: 0 0 25px rgba(255, 255, 255, 0.6); }
    100% { box-shadow: 0 0 10px rgba(255, 255, 255, 0.2); }
}

.glow-active {
    animation: glow-left-panel 2s infinite;
}

@keyframes attentionRingZoom {
    0% {
        transform: translate(-50%, -50%) scale(10);
        opacity: 0;
        border-width: 1px;
    }
    15% {
        opacity: 1;
        border-width: 2.5px;
    }
    85% {
        opacity: 1;
        border-width: 2.5px;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
        border-width: 3.5px;
    }
}

.nav-fab .attention-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2.5px solid #ffffff;
    box-shadow: 0 0 16px #ffffff, inset 0 0 16px #ffffff;
    mix-blend-mode: difference;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    z-index: 10;
}

.nav-fab .attention-ring.animate-ring {
    animation: attentionRingZoom 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}


/* Main Panel Title */
#toc-drawer h2.panel-main-title {
    font-size: 48px;
    font-weight: 600;
    color: var(--text-white);
    margin: 0 0 16px 0;
    padding: 0 8px; 
    line-height: 1.3;
}

/* Custom Sleek Scrollbar for the Drawer */
.drawer-content-wrapper::-webkit-scrollbar {
    width: 8px; /* Slimmer, modern scrollbar */
}

.drawer-content-wrapper::-webkit-scrollbar-track {
    background: transparent; /* Hides the chunky default track */
}

.drawer-content-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.drawer-content-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}


/* --- 05. User Persona Section --- */
.persona-interactive-container {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-top: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 800px;
    overflow: hidden;
}

/* --- Video Attention Ring --- */
@keyframes videoAttentionRingZoom {
    0% {
        transform: translate(-50%, -50%) scale(20);
        opacity: 0;
        border-width: 1px;
    }
    15% {
        opacity: 0.9;
        border-width: 2px;
    }
    85% {
        opacity: 0.9;
        border-width: 2px;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.1);
        opacity: 0;
        border-width: 3px;
    }
}

.video-attention-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.8), inset 0 0 14px rgba(255, 255, 255, 0.8);
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.1);
    opacity: 0;
    z-index: 10;
}

.video-attention-ring.animate-ring {
    animation: videoAttentionRingZoom 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.full-width-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

/* Full-bleed AI-Info Overlay (top of all layers) */
.persona-ai-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 20; /* Sits on top of video (1), cards (5), and nav controls (10) */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
}

.persona-interactive-container.ai-active .persona-ai-overlay {
    opacity: 1;
    pointer-events: auto;
}

/* Pause Floating Card Animations when AI-Info is open */
.persona-interactive-container.ai-active .persona-card {
    animation-play-state: paused !important;
}

/* Disable navigation buttons when AI-Info is open */
.persona-interactive-container.ai-active .persona-nav-controls {
    pointer-events: none !important;
}

.persona-interactive-container.ai-active .persona-nav-btn {
    pointer-events: none !important;
    opacity: 0.3;
}

/* AI Info Button Positioning in Persona Container */
.persona-interactive-container .ai-info-btn {
    bottom: 30px;
    left: 30px;
    z-index: 25; /* Above AI overlay */
}

/* Navigation Controls - Moved to sides vertically centered */
.persona-nav-controls {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    z-index: 10;
    display: flex;
    justify-content: space-between;
    padding: 0 clamp(250px, 10vw, 340px); /* Responsive padding keeps buttons off screen edges 60px < x < 150px */
    box-sizing: border-box;
    
    /* Crucial UX Architecture: Allows clicks on empty space to pass through to the parent container */
    pointer-events: none; 
}

/* Override global .nav-fab position for the carousel buttons */
.persona-nav-controls .nav-fab {
    position: relative; 
    z-index: 1;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    
    /* Re-enables interactions specifically for the buttons */
    pointer-events: auto; 
}

/* Floating Cards Layout */
.persona-cards-wrapper {
    position: relative;
    width: 100%;
    max-width: 1200px;
    height: 600px;
    z-index: 5;
}

/* Staggered Animation Delays for Asynchronous Floating */
.pos-left-top { position: absolute; top: 10%; left: 5%; animation-delay: 0s; }
.pos-left-bottom { position: absolute; bottom: 25%; left: 10%; animation-delay: -2s; }
.pos-right { position: absolute; top: 40%; right: 5%; animation-delay: -4s; }

/* Keyframes for Floating Animation */
@keyframes float-card {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
    100% { transform: translateY(0px); }
}

/* Base Card Styling - Updated Shadow & Animation */
.persona-card {
    display: flex;
    flex-direction: column;
    /* Dynamic width handling */
    width: fit-content;
    min-width: 320px;
    max-width: 430px;
    
    filter: drop-shadow(10px 15px 5px rgba(0, 0, 0, 0.4));
    animation: float-card 6s ease-in-out infinite;
}

/* Tabs */
.card-tabs {
    display: flex;
    align-items: flex-end;
    height: 20px;
}

.p-tab {
    height: 10px;
    border-radius: 6px 6px 0 0;
    background-color: var(--c-main);
}

.p-tab.active {
    height: 24px;
    width: 100px;
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: capitalize;
    letter-spacing: 0.5px;
    padding: 0 48px;
}

.p-tab:not(.active) { width: 57px; }
.p-tab.t-2 { background-color: var(--c-t2); }
.p-tab.t-3 { background-color: var(--c-t3); }
.p-tab.t-4 { background-color: var(--c-t4); }

/* Card Body */
.card-body {
    background-color: var(--c-main);
    border-radius: 0 6px 6px 6px;
    padding: 4px;
    display: flex;
    height: 88px;
    box-sizing: border-box;
}

.card-icon {
    width: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Increased Icon Size */
.card-icon .material-symbols-rounded {
    color: #FFFFFF;
    font-size: 56px; /* Increased from 36px */
}

.card-content {
    flex: 1;
    background-color: #FFFFFF;
    border-radius: 4px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    width: fit-content;
}

/* Card Typography & Line Clamping */
.card-content p {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 18px;
    color: #000000;
    line-height: 1.4;
    margin: 0;
    
    /* Strict 2-line cap to prevent vertical overflow */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Theme Variables */
.theme-blue {
    --c-main: #006EFF;
    --c-t2: #004BAD;
    --c-t3: #003070;
    --c-t4: #001F48;
}

.theme-orange {
    --c-main: #FF7300;
    --c-t2: #CC5C00;
    --c-t3: #994500;
    --c-t4: #662E00;
}

.theme-green {
    --c-main: #008A00;
    --c-t2: #006B00;
    --c-t3: #004D00;
    --c-t4: #002E00;
}

/* Mobile Responsiveness */
@media (max-width: 992px) {
    .persona-cards-wrapper {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 24px;
        height: auto;
        padding: 120px 0 60px 0;
    }
    .pos-left-top, .pos-left-bottom, .pos-right {
        position: relative;
        top: auto; left: auto; right: auto; bottom: auto;
    }
    .full-width-video { display: none; }
}

/* ==========================================================================
   CUSTOM CURSOR STYLES
   ========================================================================== */
*, *::before, *::after {
    cursor: none !important;
}

.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    background-color: #ffffff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none; 
    z-index: 99999;
    transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s ease, border 0.25s ease;
    mix-blend-mode: difference;
    box-sizing: border-box;
}

.custom-cursor.hover {
    transform: translate(-50%, -50%) scale(1.8);
    background-color: transparent;
    border: 2px solid var(--cursor-hover, #ffffff);
    opacity: 1;
}

.custom-cursor.active {
    transform: translate(-50%, -50%) scale(1) !important;
}
