/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #FFF9F2;
    color: #333;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #FBE9C3;
}

::-webkit-scrollbar-thumb {
    background: #F94762;
    border-radius: 10px;
}

/* Typography */
.font-heading {
    font-family: 'Montserrat', sans-serif;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0,0,0);
    }
    40%, 43% {
        transform: translate3d(0, -8px, 0);
    }
    70% {
        transform: translate3d(0, -4px, 0);
    }
    90% {
        transform: translate3d(0, -2px, 0);
    }
}

.animate-in {
    opacity: 0;
    animation-fill-mode: both;
}

.animate-in.fade-in {
    animation-name: fadeIn;
}

.animate-in.slide-in-from-bottom {
    animation-name: slideInFromBottom;
}

.animate-in.slide-in-from-right {
    animation-name: slideInFromRight;
}

.animate-in.duration-700 {
    animation-duration: 0.7s;
}

.animate-in.duration-1000 {
    animation-duration: 1s;
}

.animate-in.duration-500 {
    animation-duration: 0.5s;
}

.animate-in.delay-200 {
    animation-delay: 0.2s;
}

.animate-in.delay-500 {
    animation-delay: 0.5s;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 249, 242, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #F94762;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-brand:hover {
    color: #B22E45;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #F94762;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover {
    color: #F94762;
}

/* Focus and accessibility styles */
.nav-brand:focus,
.nav-brand:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(249,71,98,0.12);
    border-radius: 6px;
}

.nav-link:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(178,212,222,0.18);
    border-radius: 6px;
}

/* Skip link */
.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.skip-link:focus,
.skip-link:active {
    position: fixed;
    left: 1rem;
    top: 1rem;
    width: auto;
    height: auto;
    padding: 0.5rem 1rem;
    background: #FFF9F2;
    color: #333;
    z-index: 2000;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    text-decoration: none;
}

/* Gap below fixed navbar to visually separate sections */
.nav-gap {
    width: 100%;
    height: 48px; /* desktop default gap */
    background: #FBE9C3; /* match hero/yellow accent */
    box-shadow: none;
    pointer-events: none;
    z-index: 900;
}

@media (max-width: 768px) {
    .nav-gap {
        height: 36px;
    }
}

/* When a page includes a full-bleed hero image, remove the gap under the fixed navbar
   and remove header top padding so the image sits flush with the top navigation.
   Add the class "has-hero-image" to the <body> of pages with full-bleed hero images. */
.has-hero-image .nav-gap {
    height: 0 !important;
}
.has-hero-image header {
    padding-top: 0 !important;
}
.has-hero-image .linkedin-hero-img {
    /* ensure full-bleed image covers the viewport edge with no extra space */
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    display: block;
    max-width: none;
}

/* Hero Section */
.hero {
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    text-align: center;
    background-color: #FBE9C3;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(249, 71, 98, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(178, 212, 222, 0.1) 0%, transparent 50%);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    padding-top: 12rem;
    text-align: left;
}

.hero-title {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    color: #F94762;
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
    line-height: 1;
}

.hero-pretitle {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(0.9rem, 1.2vw, 1.1rem);
    font-weight: 700;
    color: #333;
    margin: 1.25rem 0 0 0;
    letter-spacing: 0.02em;
    display: block;
    transform: none;
    opacity: 1;
}

@media (min-width: 768px) {
    .hero-content {
        padding-top: 20rem;
    }
}

.hero-headline {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 2rem;
    flex-wrap: nowrap;
}

.hero-title {
    /* keep existing rules but ensure inline alignment works */
    display: inline-block;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    font-weight: 300;
    color: #666;
    max-width: 600px;
    margin: 0 auto 3rem;
    line-height: 1.4;
}

.hero-subtitle .highlight {
    font-weight: 600;
    color: #F94762;
}

.hero-scroll {
    padding-top: 2rem;
}

.scroll-indicator {
    width: 3rem;
    height: 3rem;
    border: 2px solid #F94762;
    border-radius: 50%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: bounce 2s infinite;
    cursor: pointer;
    transition: all 0.3s ease;
}

.scroll-indicator:hover {
    background-color: #F94762;
}

.scroll-indicator:hover .scroll-icon {
    color: white;
}

.scroll-icon {
    width: 1.5rem;
    height: 1.5rem;
    color: #F94762;
    transition: color 0.3s ease;
}

/* Projects Section */
.projects {
    padding: 6rem 2rem;
    background-color: #FFF9F2;
}

.projects-container {
    max-width: 1200px;
    margin: 0 auto;
}

.projects-header {
    margin-bottom: 3rem;
}

.projects-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    font-weight: 900;
    color: #333;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.projects-accent {
    width: 5rem;
    height: 0.5rem;
    background-color: #F94762;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    position: relative;
    aspect-ratio: 4/5;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: white;
}

.project-card:hover {
    transform: translateY(-1rem);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0);
    transition: background-color 0.5s ease;
}

.project-card:hover .project-overlay {
    background-color: rgba(0, 0, 0, 0.1);
}

.project-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    z-index: 2;
}

.project-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
    display: block;
}

.project-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    font-weight: 900;
    color: white;
    margin: 0;
    line-height: 1;
}

.project-arrow {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 3rem;
    height: 3rem;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 3;
}

.project-card:hover .project-arrow {
    opacity: 1;
}

.arrow-icon {
    width: 1.5rem;
    height: 1.5rem;
    color: #333;
}

/* About Section */
.about {
    padding: 6rem 2rem;
    background-color: rgba(251, 233, 195, 0.4);
    position: relative;
    overflow: hidden;
}

.about-container {
    max-width: 1100px;
    margin: 0 auto;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
    padding: 4rem;
    position: relative;
}

.about-bg-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(50px);
}

.blob-1 {
    top: 0;
    right: 0;
    width: 8rem;
    height: 8rem;
    background-color: rgba(249, 71, 98, 0.1);
    margin: -4rem -4rem 0 0;
}

.blob-2 {
    bottom: 0;
    left: 0;
    width: 12rem;
    height: 12rem;
    background-color: rgba(178, 212, 222, 0.2);
    margin: 0 0 -6rem -6rem;
}

.about-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

/* Travel map styles */
.travel-map {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    position: relative;
    /* add breathing room from page edges (smaller to avoid overflowing container) */
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    box-sizing: border-box;
}

.travel-container {
    position: relative;
    width: 100%;
    max-width: 820px;
    transform: none !important;
    /* keep the SVG and gallery centered but inset from the content edge */
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.travel-svg {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.1));
    transform: none !important;
}

.travel-svg path,
.travel-svg defs,
.travel-svg g:not(.travel-dots) {
    transform: none !important;
}

.travel-dots {
    transform: none !important;
}

.travel-dots .dot {
    fill: #fff;
    stroke: #333;
    stroke-width: 2;
    transition: fill 0.3s ease, stroke 0.3s ease, stroke-width 0.3s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    transform-origin: center;
    pointer-events: all;
    transform: none !important;
    position: static !important;
}

.travel-dots .dot:hover,
.travel-dots .dot:focus {
    transform: scale(1.3);
    fill: #F94762;
    stroke: #F94762;
    stroke-width: 3;
    outline: none;
}

/* when hovering the group (bigger hit area) style the visual dot */
.dot-group:hover .dot,
.dot-group:focus .dot {
    transform: scale(1.25);
    fill: #F94762;
    stroke: #F94762;
    stroke-width: 3;
}

/* label active state */
.country-labels text.active {
    fill: #F94762;
    font-weight: 700;
}

/* Travel Gallery */
.travel-gallery {
    margin-bottom: 20px;
    text-align: center;
}

.gallery-image-container {
    position: relative;
    /* scaled down to ~50% of previous size for a smaller gallery */
    width: 300px;
    height: 200px;
    margin: 0 auto;
    border-radius: 18px;
    overflow: visible;
    /* minimal outer border removed so frosted frame handles visuals */
}

.gallery-photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    border-radius: 14px;
}

.gallery-photo.active {
    opacity: 1;
}

.gallery-caption {
    margin-top: 12px;
}

.gallery-caption p {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
    transition: color 0.3s ease;
}

/* Dot highlighting */
.dot {
    transition: all 0.3s ease;
    cursor: pointer;
}

.dot.active {
    r: 16;
    fill: #F94762;
    stroke: #fff;
    stroke-width: 3;
    filter: drop-shadow(0 4px 8px rgba(249, 71, 98, 0.4));
}

.dot.manual-selected {
    /* blue clicked state */
    fill: #2563EB; /* blue-600 */
    stroke: #fff;
    stroke-width: 3;
    filter: drop-shadow(0 6px 12px rgba(37, 99, 235, 0.28));
}

/* Frosted glass frame around gallery images */
.gallery-frame {
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.18);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow:
        0 30px 50px rgba(0,0,0,0.12),
        0 10px 20px rgba(0,0,0,0.06),
        inset 0 1px 0 rgba(255,255,255,0.3);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s;
    overflow: hidden;
    pointer-events: none;
}

.gallery-frame:hover {
    transform: translateY(-8px);
    box-shadow:
        0 42px 70px rgba(0,0,0,0.18),
        0 14px 28px rgba(0,0,0,0.08),
        inset 0 1px 0 rgba(255,255,255,0.35);
}

.gallery-inner {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    pointer-events: auto;
}

.gallery-photo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* Keep images same height while preserving aspect ratio */
    height: 100%;
    width: auto;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.5s ease-in-out, transform 0.4s ease;
    border-radius: 8px;
    backface-visibility: hidden;
}

.gallery-photo.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Ensure mobile scales */
@media (max-width: 768px) {
    .gallery-image-container {
        max-width: 100%;
        /* mobile: roughly half of previous mobile height (266px -> 133px) */
        height: 133px;
    }
    .gallery-frame {
        padding: 10px;
        border-radius: 12px;
    }
    .gallery-photo { border-radius: 6px; }
}


.travel-note {
    font-size: 0.9rem;
    color: #666;
    margin-top: 1rem;
    text-align: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .gallery-image-container {
        width: 100%;
        /* scaled mobile max-width */
        max-width: 200px;
        height: 133px;
    }

    .gallery-caption p {
        font-size: 16px;
    }
}

/* Why research styling */
.why-research { margin-top: 0.5rem; }
.why-lead { font-weight: 700; margin-bottom: 0.5rem; }
.reason-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 0.75rem;
}
.reason-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,255,255,0.96));
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.06);
    min-height: 120px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    justify-content: center;
}
.reason-title { font-size: 1rem; font-weight: 800; margin: 0; color: #222; }
.reason-desc { margin: 0; color: #555; font-size: 0.95rem; line-height: 1.35; }
.why-list { list-style: none; padding: 0; margin: 0 0 1rem 0; display: grid; gap: 0.5rem; }
.why-list li { background: linear-gradient(90deg, rgba(249,71,98,0.05), rgba(178,212,222,0.03)); padding: 0.5rem 0.75rem; border-radius: 8px; }
.why-foot { color: #555; margin-top: 0.5rem; }

.about-tabs {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

@media (min-width: 768px) {
    .about-content {
        flex-direction: row;
    }

    .about-tabs {
        width: 12rem;
        flex-shrink: 0;
    }
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    border: none;
    background-color: #FFF9F2;
    color: #666;
    font-weight: 700;
    font-size: 0.875rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tab-btn:hover {
    background-color: #FBE9C3;
    color: #333;
}

.tab-btn.active {
    background-color: #F94762;
    color: white;
    box-shadow: 0 4px 12px rgba(249, 71, 98, 0.3);
    transform: scale(1.05);
}

.tab-content {
    flex: 1;
    min-height: 300px;
}

.tab-pane {
    display: none;
    animation: slideInFromRight 0.5s ease;
}

.tab-pane.active {
    display: block;
}

.tab-content-inner {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.about-text-large {
    /* Match the other tabs' body text size/spacing */
    font-size: 1.125rem;
    font-weight: 500;
    line-height: 1.6;
}

.about-text-large .highlight {
    color: #F94762;
    font-weight: 700;
}

.about-text {
    font-size: 1.125rem;
    line-height: 1.6;
    color: #333;
}

.about-text-muted {
    font-size: 1.125rem;
    line-height: 1.6;
    color: #666;
}

.skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.skill-tag {
    padding: 0.375rem 0.75rem;
    background-color: #B2D4DE;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #333;
}

.interests-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .interests-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.interest-card {
    padding: 1rem;
    border-radius: 6px;
    background-color: rgba(255, 211, 127, 0.3);
}

.interest-card:nth-child(2) {
    background-color: rgba(249, 71, 98, 0.1);
}

.interest-title {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #F94762;
    margin-bottom: 0.25rem;
}

.interest-text {
    color: #666;
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        gap: 1rem;
    }

    .hero {
        padding: 4rem 1rem;
    }

    .projects {
        padding: 4rem 1rem;
    }

    .about {
        padding: 4rem 1rem;
    }

    .about-container {
        padding: 2rem;
        border-radius: 8px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* LinkedIn project hero image */
.project-hero {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
}

/* LinkedIn hero image (no rounded corners) */
.linkedin-hero-img {
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: cover;
    border-radius: 0 !important;
    display: block;
    box-shadow: none;
    margin-bottom: 1.5rem;
}

/* Full-bleed hero image: extend to viewport edges */
.linkedin-hero-img {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    max-height: 520px;
    height: auto;
    object-fit: cover;
    display: block;
}

/* When a hero image exists, reduce top padding for the hero content so content sits just under image */
.hero.has-hero-image .hero-content {
    padding-top: 1.25rem;
}

@media (min-width: 768px) {
    .hero.has-hero-image .hero-content {
        padding-top: 2.25rem;
    }
}

/* Redesigned hero layout */
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 480px;
    gap: 2.5rem;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}
.hero-text {
    padding-right: 1rem;
}
.hero-decor {
    position: relative;
    width: 100%;
    height: 340px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}
.decor-card {
    position: absolute;
    width: 220px;
    height: 140px;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.08);
    transform-origin: center;
    transition: transform 0.6s cubic-bezier(.2,.9,.2,1), box-shadow 0.3s ease;
    pointer-events: auto;
    cursor: pointer;
}
.card-1 { background: linear-gradient(135deg,#F94762,#FFD37F); top: 20px; left: 20px; transform: rotate(-6deg); }
.card-2 { background: linear-gradient(135deg,#B2D4DE,#FFF9F2); top: 80px; left: 140px; transform: rotate(6deg); width: 260px; height: 160px; border-radius: 16px;}
.card-3 { background: linear-gradient(135deg,#FFF9F2,#FBE9C3); bottom: 20px; left: 100px; transform: rotate(-2deg); width: 260px; height: 160px; border-radius: 16px; opacity: 0.95;}
.decor-blob {
    position: absolute;
    width: 420px;
    height: 420px;
    right: -60px;
    top: -40px;
    filter: blur(18px);
    transform: translateZ(0);
    pointer-events: none;
}

/* Card content */
.decor-card .card-content {
    color: #fff;
    padding: 1rem;
    opacity: 0;
    /* remove translateY to prevent content shifting when card transforms on hover */
    transform: none;
    transition: opacity 0.36s ease;
}
.decor-card.card-2 .card-content,
.decor-card.card-3 .card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.4rem 1rem 0.8rem;
    transform: translateY(6px);
}
.decor-card .card-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    margin: 0 0 0.25rem 0;
    color: white;
}
.decor-card .card-body {
    font-size: 0.85rem;
    margin: 0;
    color: rgba(255,255,255,0.95);
}

/* Active / focused card */
.decor-card.active {
    z-index: 30;
    transform: translate3d(0,-18px,0) scale(1.06);
    box-shadow: 0 30px 60px rgba(0,0,0,0.18);
}
.decor-card.active .card-content {
    opacity: 1;
    transform: none;
}

/* Card hover/focus shadow */
.decor-card:focus,
.decor-card:hover {
    /* darker shadow on hover/focus for stronger depth */
    box-shadow: 0 36px 42px rgba(0,0,0,0.24);
    transform: translate3d(0,-6px,0) scale(1.02);
}

/* make text readable on lighter cards */
.card-2 .card-title, .card-2 .card-body { color: #333; }
.card-3 .card-title, .card-3 .card-body { color: #333; }
.card-2 .card-title, .card-2 .card-body { color: #333; }

/* Remove browser blue outline and provide a subtle custom focus style */
.decor-card:focus {
    outline: none;
    -webkit-tap-highlight-color: transparent;
}
.decor-card:focus-visible {
    outline: none;
    z-index: 40;
    transform: translate3d(0,-18px,0) scale(1.06);
    /* dark shadow only — removed red focus ring */
    box-shadow: 0 36px 72px rgba(0,0,0,0.20);
}

/* Hero text tweaks */
.hero-pretitle {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 0.25rem 0;
}
.hero-title {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(3.2rem, 8vw, 6.5rem);
    line-height: 0.95;
    margin: 0 0 1rem 0;
}
.hero-subtitle {
    font-size: 1.05rem;
    color: #555;
    max-width: 56ch;
    margin-bottom: 1.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    margin-right: 0.75rem;
}
.btn-primary {
    background: #F94762;
    color: white;
    box-shadow: 0 8px 24px rgba(249,71,98,0.14);
}
.btn-primary:hover, .btn-primary:focus {
    transform: translateY(-3px);
}
.btn-ghost {
    background: transparent;
    color: #374151;
    border: none;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.02em;
    padding: 0.25rem 0;
    text-decoration: none;
    transition: color 0.12s ease;
}

.btn-ghost:hover,
.btn-ghost:focus {
    color: #F94762;
}

/* Subtle button style for App Store links */
.btn-subtle {
    background: #f9fafb;
    color: #374151;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    text-decoration: none;
    transition: all 0.15s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-subtle:hover,
.btn-subtle:focus {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #111827;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Subtle LinkedIn CTA in project headers (nav) */
.navbar .nav-links .btn-primary {
    background: transparent;
    color: #374151;
    box-shadow: none;
    border: none;
    padding: 0.25rem 0;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    border-radius: 0;
    opacity: 1;
    text-decoration: none;
    transition: color 0.12s ease;
}
.navbar .nav-links .btn-primary:hover,
.navbar .nav-links .btn-primary:focus {
    background-color: transparent;
    color: #F94762;
    transform: none;
}

/* Arrow button used in hero to scroll to projects */
.arrow-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 9999px;
    background: rgba(255,255,255,0.9);
    color: #333;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
    position: relative;
    z-index: 1100; /* ensure clickable above decor */
}
.arrow-btn:hover, .arrow-btn:focus {
    transform: translateY(-3px);
    box-shadow: 0 14px 36px rgba(0,0,0,0.09);
    background: rgba(255,255,255,1);
}
.arrow-icon {
    width: 18px;
    height: 18px;
    color: #333;
}

/* Reduced motion respect */
@media (prefers-reduced-motion: reduce) {
    .decor-card, .decor-blob, .btn { transition: none; transform: none !important; }
    .animate-in { animation: none !important; opacity: 1 !important; }
}

@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; padding: 2rem 1rem; }
    .hero-decor { height: 220px; order: -1; margin-bottom: 1rem; }
    .decor-blob { right: -20px; width: 320px; height: 320px; filter: blur(14px); }
    .hero-title { font-size: clamp(2.4rem, 9vw, 4rem); text-align: left; }
}

/* Site footer */
.site-footer {
    padding: 1.5rem 2rem 3rem;
    background: transparent;
    color: #666;
    font-size: 0.95rem;
    text-align: center;
}
.site-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}
.site-footer a {
    color: #333;
    text-decoration: none;
    font-weight: 600;
}
.site-footer a:hover,
.site-footer a:focus {
    color: #F94762;
    text-decoration: underline;
}
.footer-sep {
    color: #E6E6E6;
    margin: 0 0.5rem;
}
/* Responsive fixes added by assistant - start */
/* Prevent children from overflowing in flex/grid layouts */
.fade-in main .grid > *,
.fade-in main .flex > * {
  min-width: 0;
  overflow-wrap: break-word;
}

/* Make images and aspect-video elements responsive */
.fade-in main img,
.fade-in main .aspect-video,
.fade-in main .aspect-square {
  max-width: 100%;
  height: auto;
}

/* Nav pills and horizontal containers: allow comfortable touch targets on small screens */
@media (max-width: 768px) {
  .pointer-events-auto {
    padding-left: .5rem;
    padding-right: .5rem;
  }
  .nav-item {
    padding-left: .6rem !important;
    padding-right: .6rem !important;
    white-space: normal; /* allow labels to wrap if needed */
  }
  /* Stack multi-column grids to a single column on small screens */
  .fade-in main .grid {
    grid-template-columns: 1fr !important;
  }
  /* Ensure section paddings are comfortable on narrow widths */
  .fade-in main section,
  .fade-in main header {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}

/* Small-improvements for mid-width screens to avoid tight overlap */
@media (min-width: 769px) and (max-width: 1024px) {
  .fade-in main .grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
/* Responsive fixes added by assistant - end */
/* Case study bottom band (Variant B) */
.case-nav-band {
  width:100%;
  background:transparent;
  border-top:1px solid rgba(17,24,39,0.04);
  padding:0.85rem 0;
  margin-top:2rem;
}
.case-nav-band-inner {
  max-width:1200px;
  margin:0 auto;
  display:flex;
  justify-content:center;
  gap:1rem;
  align-items:center;
}
.case-nav-band .nav-chip-band {
  padding:0.5rem 0.9rem;
  border-radius:12px;
  background:#fff;
  color:#111827;
  border:1px solid rgba(17,24,39,0.06);
  font-weight:700;
  font-size:1rem;
  transition:background .12s, transform .12s;
}
.case-nav-band .nav-chip-band:hover { background:#f7f7f8; transform:translateY(-2px); }

/* Variant: Typographic band (elegant text links + soft divider) */
.case-nav-typographic{ width:100%; padding:0.9rem 8rem; border-top:1px solid rgba(17,24,39,0.04); }
.case-nav-typographic .case-nav-inner{ max-width:1200px; margin:0 auto; display:flex; gap:2rem; justify-content:center; align-items:center; }
.case-nav-typographic .link{
  color:#374151; font-weight:700; font-size:1rem; letter-spacing:0.02em;
  text-decoration:none; padding:0.25rem 0; position:relative;
}
.case-nav-typographic .link::after{
  content:""; position:absolute; left:15%; right:15%; bottom:-6px; height:3px; background:transparent; border-radius:6px; transition:background .12s, transform .12s;
}
.case-nav-typographic .link:hover::after{ background:#F94762; transform:scaleX(1); }

/* Ensure typographic case-nav sits above any fixed floating navs */
.case-nav-typographic {
  position: relative;
  z-index: 10001;
  background: transparent;
  padding-bottom: 1.5rem;
  border-bottom: none; /* removed divider per request */
}

/* Card-Style Navigation Buttons */
.case-nav-typographic .case-nav-inner a {
  background: white;
  color: #374151;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 16px 28px;
  border-radius: 12px;
  border: 2px solid #f3f4f6;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  min-width: 140px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  position: relative;
}

.case-nav-typographic .case-nav-inner a:hover {
  border-color: #F94762;
  background: #fef2f2;
  color: #dc2626;
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(249, 71, 98, 0.15);
}

.case-nav-typographic .case-nav-inner a svg {
  width: 16px;
  height: 16px;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.case-nav-typographic .case-nav-inner a:hover svg {
  opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .case-nav-typographic .case-nav-inner a {
    padding: 14px 20px;
    font-size: 0.85rem;
    min-width: 120px;
    border-radius: 10px;
  }

  .case-nav-typographic .case-nav-inner a svg {
    width: 14px;
    height: 14px;
  }
}

/* Funnel component: vertical stacked cards used in ReCat prototype insight */
.funnel {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 0.25rem;
}
.funnel-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,255,255,0.96));
  border-radius: 18px;
  padding: 1rem;
  border: 1px solid rgba(17,24,39,0.04);
  box-shadow: 0 12px 30px rgba(0,0,0,0.04);
  transition: transform 220ms cubic-bezier(.2,.9,.2,1), box-shadow 220ms;
  display: block;
  width: 100%;
}
.funnel-card:focus,
.funnel-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 50px rgba(0,0,0,0.08);
  outline: none;
}
.funnel-card:focus-visible {
  box-shadow: 0 26px 50px rgba(0,0,0,0.12);
  border-color: rgba(249,71,98,0.08);
}
.funnel-card .funnel-icon {
  min-width: 48px;
  min-height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.6);
}
.funnel-connector {
  height: 34px;
  width: 2px;
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(17,24,39,0.06), rgba(17,24,39,0.03));
  border-radius: 4px;
  position: relative;
}
.funnel-connector::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -6px;
  width: 10px;
  height: 10px;
  background: rgba(17,24,39,0.06);
  clip-path: polygon(50% 100%, 0 0, 100% 0);
}
.reveal-up { opacity: 0; transform: translateY(18px); transition: opacity 420ms ease, transform 420ms ease; }
.reveal-up.animate-in { opacity: 1; transform: translateY(0); }
.reveal-up.delay-200 { transition-delay: 0.12s; }
.reveal-up.delay-400 { transition-delay: 0.24s; }

@media (max-width: 768px) {
  .funnel { gap: 0.9rem; }
  .funnel-card { padding: 0.9rem; border-radius: 14px; }
  .funnel-connector { height: 24px; }
}

/* TikTok context callout and subtle animations */
.context-callout {
  transition: transform 220ms cubic-bezier(.2,.9,.2,1), box-shadow 220ms;
}
.context-callout:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(0,0,0,0.06); }
.fade-in { opacity: 0; transform: translateY(12px); transition: opacity 420ms ease, transform 420ms ease; }
.fade-in.animate-in { opacity: 1; transform: translateY(0); }

@media (min-width: 768px) {
  .max-w-prose { max-width: 60ch; }
}

/* Compact variant for gamification banner to reduce vertical height */
.compact-banner {
  padding: 0.5rem 0.75rem !important;
}
/* Mosaic tile grid for About > My Background */
.mosaic-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.mosaic-tile {
  background: linear-gradient(180deg, rgba(255,249,242,0.98), rgba(255,255,255,0.98));
  border-radius: 16px;
  padding: 1.25rem;
  border: 1px solid rgba(17,24,39,0.04);
  box-shadow: 0 10px 30px rgba(0,0,0,0.04);
  transition: transform 220ms cubic-bezier(.2,.9,.2,1), box-shadow 220ms;
}
.mosaic-tile:hover { transform: translateY(-6px); box-shadow: 0 24px 50px rgba(0,0,0,0.08); }
.mosaic-large { order: 1; }
.mosaic-small { order: 2; }
.tile-accent {
  margin-bottom: 0.5rem;
  color: #F94762;
  display: inline-block;
  vertical-align: middle;
}
.tile-accent svg { display: block; width: 36px; height: 36px; }
.mosaic-title { font-family: 'Montserrat', sans-serif; font-size: 0.95rem; font-weight:700; margin-bottom:0.3rem; color:#111827; }
.mosaic-desc { color: #6b7280; margin-bottom:0.4rem; font-size:0.9rem; line-height:1.25; }
.mosaic-list { list-style: none; padding-left: 0; margin: 0; color: #374151; }
.mosaic-list li { position: relative; padding-left: 1.1rem; margin-bottom:0.35rem; font-size:0.9rem; line-height:1.3; }
.mosaic-list li::before { content: ''; position: absolute; left: 0; top: 0.45rem; width: 8px; height:8px; background:#111827; border-radius:50%; }

/* Bolded keywords inside mosaic lists should use red accent */
.mosaic-list strong,
.mosaic-list b {
  color: #F94762;
  font-weight: 700;
}

@media (min-width: 768px) {
  /* On wider screens, stack the mosaic into three vertical rows (single column) */
  .mosaic-grid { grid-template-columns: 1fr; gap: 1.25rem; align-items: start; }
  .mosaic-large { grid-column: auto; grid-row: auto; }
  .mosaic-small { grid-column: auto; }
}

/* Scrapbook styles */
.scrapbook-frame { position: relative; height: 260px; }
.crapbook-frame { position: relative; height: 260px; } /* fallback typo-safe */
.scrap-photo { position: absolute; width: 30%; max-width: 240px; border-radius: 12px; background: #fff; padding: 6px; box-shadow: 0 14px 30px rgba(0,0,0,0.06); transform: rotate(var(--rot, 0deg)); transition: transform 220ms ease; }
.scrap-photo img { display: block; width: 100%; height: auto; border-radius: 8px; }
.scrap-caption { font-size: 0.85rem; color: #374151; margin-top: 0.5rem; text-align: center; }
.scrap-photo .tape { position: absolute; width: 60px; height: 14px; background: linear-gradient(90deg,#F8D6D9,#F94762); top: -8px; left: 12px; transform: rotate(-12deg); border-radius: 2px; box-shadow: 0 6px 18px rgba(0,0,0,0.06); opacity: 0.95; }
.scrap-photo .tape.tape-right { right: 12px; left: auto; transform: rotate(12deg); }
.scrap-photo .tape.tape-top { top: 6px; left: calc(50% - 30px); transform: rotate(0deg); }

@media (max-width: 767px) {
  .scrapbook-frame { height: auto; display:block; }
  .scrap-photo { position: static; width: 100%; transform: none; margin-bottom: 1rem; }
  .scrap-photo .tape { display: none; }
  .scrap-caption { text-align: left; }
}

/* Target the middle (singing) scrap photo to be slightly smaller so it fits nicely */
.scrapbook-frame .scrap-photo[data-index="1"] {
  width: 24%;
  max-width: 200px;
  left: 36% !important;
  top: 8% !important;
}

@media (max-width: 1024px) {
  .scrapbook-frame .scrap-photo[data-index="1"] {
    width: 30%;
    max-width: 180px;
  }
}

@media (min-width: 768px) {
  .compact-banner { padding: 0.75rem 1rem !important; }
}

/* Make the banner shrink-wrap to content and center in parent */
.compact-banner {
  display: inline-block !important;
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: calc(100% - 48px);
  text-align: center;
  vertical-align: middle;
  white-space: normal;
}
@media (max-width: 420px) {
  .compact-banner { max-width: 100%; display: block !important; margin-left: 0 !important; margin-right: 0 !important; }
}

/* Increase padding for a more generous banner while keeping centered/shrink-wrapped */
.compact-banner {
  padding: 1rem 1.25rem !important;
  /* match funnel width and center */
  display: block !important;
  max-width: 720px !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
@media (min-width: 768px) {
  .compact-banner { padding: 1.5rem 2rem !important; }
}

/* Wrapper that centers inline-block banner */
.banner-row { text-align: center; }

/* Images used inside LinkedIn methods cards */
.li-method-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}
@media (min-width: 768px) {
  .li-method-image { height: 220px; }
}

/* Amy storyboard stack */
.li-amy-stack { background: transparent; }
.li-amy-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  box-shadow: none;
}
@media (min-width: 768px) {
  .li-amy-image { border-radius: 14px; }
}

/* Small centered variant for second Amy panel */
.li-amy-small-wrapper { text-align: center; margin-bottom: 0.5rem; }
.li-amy-image--small { max-width: 320px; width: 40%; height: auto; display: inline-block; }

/* Percent ring styles for LinkedIn impact cards */
.percent-wrapper {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto;
}
.percent-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  display: block;
}
.percent-track {
  stroke: rgba(59,130,246,0.12); /* blue-500 tint */
}
.percent-progress {
  stroke: #2563EB; /* blue-600 */
  stroke-linecap: round;
  transition: stroke-dashoffset 900ms cubic-bezier(.2,.9,.2,1);
  transform-origin: 50% 50%;
}
.percent-label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  line-height: 1;
}
@media (min-width: 768px) {
  .percent-wrapper { width: 160px; height: 160px; }
}

/* Tint footer to match homepage background color and give breathing room */
.site-footer {
  background: #FFF9F2;
  padding-top: 2rem;
}

/* Case study hero tags */
.case-tags { display: inline-flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; justify-content: center; }
.case-tag {
  display: inline-block;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: rgba(249,71,98,0.06);
  color: #F94762;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: none;
}
.case-tag + .case-tag { margin-left: 0; }

@media (max-width: 640px) {
  .case-tags { gap: 0.4rem; padding-left: 0.25rem; padding-right: 0.25rem; }
  .case-tag { padding: 0.4rem 0.6rem; font-size: 0.7rem; }
}

/* Per-project hero tag accents (override default case-tag) */
#tt-hero .case-tag {
  background: rgba(249, 71, 98, 0.06); /* project-card red accent */
  color: #F94762;
}

#rc-hero .case-tag {
  background: rgba(255, 211, 127, 0.12); /* warm yellow tint for ReCat */
  color: #8b6a2a; /* darker readable yellow/brown accent */
}

#li-hero .case-tag {
  background: rgba(178, 212, 222, 0.12); /* light blue tint for LinkedIn */
  color: #1e3a4a; /* darker blue accent for legibility */
}

/* Impact/stat cards: center icon + text both vertically and horizontally */
.impact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 180px;
}

@media (max-width: 640px) {
  .impact-card { min-height: 140px; padding: 1rem; }
}

/* Timeline styles */
.timeline-row { width: 100%; display:block; }
.timeline-inner { display:flex; gap:2.5rem; justify-content:space-between; align-items:flex-start; max-width:1100px; margin:0 auto; }
.timeline-chip {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 1rem 0;
  text-align: center;
  min-width: 160px;
}
.timeline-chip:focus { outline: none; box-shadow: 0 0 0 4px rgba(249,71,98,0.08); border-radius: 8px; }
.chip-pretitle { color: #F94762; font-weight: 800; letter-spacing: 0.12em; font-size: 0.9rem; }
.chip-title { color: #6b7280; font-weight: 700; margin-top: 0.6rem; font-size: 1.25rem; }
.timeline-chip.active .chip-title { color: #111827; }

/* Modal/popup */
.timeline-modal { display:none; position:fixed; inset:0; z-index:12000; align-items:center; justify-content:center; }
.timeline-modal[aria-hidden="false"] { display:flex; }
.timeline-modal-backdrop { position:absolute; inset:0; background:rgba(0,0,0,0.5); }
.timeline-modal-panel { position:relative; z-index:12001; background:#fff; border-radius:16px; max-width:920px; width:calc(100% - 48px); padding:2rem; box-shadow:0 30px 60px rgba(0,0,0,0.28); }
.timeline-modal-close { position:absolute; right:1rem; top:1rem; background:transparent; border:none; font-size:1.25rem; cursor:pointer; }
.timeline-modal-heading { font-size:1.25rem; font-weight:800; color:#111827; margin:0 0 0.5rem 0; }
.timeline-modal-list { margin-top:1rem; list-style:none; padding:0; }
.timeline-modal-list li { margin-bottom:0.6rem; color:#374151; }
.timeline-modal-badges { display:flex; gap:0.5rem; margin-top:0.5rem; flex-wrap:wrap; }
.timeline-modal-badge { background:rgba(249,71,98,0.06); color:#F94762; padding:0.35rem 0.6rem; border-radius:999px; font-weight:700; font-size:0.8rem; }

@media (max-width:768px) {
  .timeline-inner { gap:1rem; justify-content:space-between; }
  .timeline-chip { min-width:120px; }
  .timeline-modal-panel { padding:1rem; width:calc(100% - 32px); }
}

/* timeline popup (per-chip) */
.timeline-chip { position: relative; }
.timeline-popup {
  position: absolute;
  left: 50%;
  transform: translate(-50%, 24px);
  min-width: 240px;
  max-width: 420px;
  /* Apple-like translucent card */
  background: rgba(255,255,255,0.7);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  backdrop-filter: blur(10px) saturate(140%);
  color: #0f1724;
  padding: 1.25rem 1.5rem;
  border-radius: 16px;
  box-shadow: 0 30px 60px rgba(2,6,23,0.08), inset 0 1px 0 rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms cubic-bezier(.2,.9,.2,1), transform 220ms cubic-bezier(.2,.9,.2,1);
  z-index: 12002;
}
.timeline-popup .popup-title { font-weight:700; color:#0f1724; margin-bottom:0.5rem; font-size:1rem; }
.timeline-popup .timeline-popup-badges { display:flex; gap:0.5rem; flex-wrap:wrap; margin-bottom:0.6rem; justify-content:center; align-items:center; }
.timeline-popup .timeline-popup-list { margin:0; padding-left:1rem; color:#374151; font-size:0.98rem; line-height:1.65; }
.timeline-popup .timeline-popup-list li { margin-bottom:0.55rem; }

.timeline-modal-badge, .timeline-popup .timeline-popup-badge {
  display:inline-block;
  background: rgba(249,71,98,0.12);
  color: #F94762;
  padding: 0.38rem 0.72rem;
  border-radius: 999px;
  font-weight:700;
  font-size:0.86rem;
  border: 1px solid rgba(249,71,98,0.06);
}

/* subtle top notch to visually connect popup to chip */
.timeline-popup::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 8px;
  background: rgba(255,255,255,0.7);
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
  box-shadow: 0 -1px 0 rgba(255,255,255,0.6);
}

/* Research context tweaks */
.context-intro {
  font-size: 1rem;
  color: #6b7280;
  max-width: 70ch;
  margin: 0 auto;
}
.context-turn {
  font-size: 1.05rem;
  color: #111827;
  font-weight: 700;
  max-width: 70ch;
  margin: 0 auto;
  line-height: 1.6;
}
.context-turn .turn-strong {
  display: inline-block;
  color: #F94762;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
  margin-bottom: 0.4rem;
}
.context-meta {
  color: #6b7280;
  font-size: 0.95rem;
  max-width: 70ch;
  margin: 0 auto;
}

/* Show popup on hover-capable pointers */
@media (hover: hover) and (pointer: fine) {
  .timeline-chip:hover .timeline-popup,
  .timeline-chip:focus-within .timeline-popup {
    opacity: 1;
    transform: translate(-50%, 36px);
    pointer-events: auto;
  }
}

/* active state for touch/click toggles */
.timeline-chip.active .timeline-popup {
  opacity: 1;
  transform: translate(-50%, 36px);
  pointer-events: auto;
}

/* Entrance pulse on first chip + subtle rail shimmer */
.timeline-intro-pulse {
  animation: chipIntroPulse 1600ms cubic-bezier(.2,.9,.2,1) 1 forwards;
}

@keyframes chipIntroPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 rgba(249,71,98,0); }
  12% { transform: scale(1.18); box-shadow: 0 12px 30px rgba(249,71,98,0.18); }
  45% { transform: scale(0.96); box-shadow: 0 6px 18px rgba(249,71,98,0.10); }
  100% { transform: scale(1); box-shadow: 0 0 0 rgba(249,71,98,0); }
}

.timeline-rail-shimmer {
  position: relative;
  overflow: hidden;
}
.timeline-rail-shimmer::before {
  content: '';
  position: absolute;
  left: -40%;
  top: 0;
  bottom: 0;
  width: 40%;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.035), rgba(255,255,255,0));
  transform: translateX(0);
  opacity: 0.9;
  pointer-events: none;
  transition: none;
}
.timeline-rail-shimmer.shimmering::before {
  animation: railShimmer 1600ms linear 1;
}
@keyframes railShimmer {
  from { left: -40%; }
  to { left: 120%; }
}

@media (prefers-reduced-motion: reduce) {
  .timeline-intro-pulse, .timeline-rail-shimmer::before, .timeline-rail-shimmer.shimmering::before {
    animation: none !important;
    transition: none !important;
  }
}

/* Stage1 continuous pulse (default) */
.stage1-pulse {
  position: relative;
  /* disable previous box-shadow animation if present */
  animation: none !important;
}

/* Opacity-only soft halo using pseudo-element to avoid squarish artifacts */
.stage1-pulse::before {
  content: "";
  position: absolute;
  inset: 0; /* keep inside card bounds to avoid clipping by parent */
  border-radius: inherit;
  /* soft centered halo that stays within rounded card */
  background: radial-gradient(circle at 50% 40%, rgba(249,71,98,0.22) 0%, rgba(249,71,98,0.12) 20%, rgba(249,71,98,0.06) 40%, rgba(249,71,98,0.02) 60%, transparent 80%);
  filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

@keyframes haloOpacity {
  0% { opacity: 0.12; }
  50% { opacity: 0.36; }
  100% { opacity: 0.12; }
}

.stage1-pulse.pulse-on::before {
  animation: haloOpacity 2000ms ease-in-out infinite;
  opacity: 0.18;
}

@media (prefers-reduced-motion: reduce) {
  .stage1-pulse::before,
  .stage1-pulse.pulse-on::before { animation: none !important; opacity: 0.18; }
}

/* Stage2+ highlight */
.chip-highlight {
  /* smaller area but stronger color */
  box-shadow: 0 6px 12px rgba(249,71,98,0.22);
  border: 1px solid rgba(249,71,98,0.14);
  border-radius: 10px;
  transition: box-shadow .18s ease, transform .18s ease, opacity .18s ease, border .12s ease;
  padding: 0.8rem;
}

.timeline-chip.hovering .stage1-pulse,
.timeline-chip.hovering .chip-highlight {
  /* Pause/disable visual while hovering */
  animation-play-state: paused !important;
  box-shadow: none !important;
  opacity: 0.96;
}

.timeline-chip.disabled .chip-highlight {
  /* permanently disable highlight */
  box-shadow: none !important;
  opacity: 0.85;
}

/* Case study nav pill hide/show animation */
.case-nav-pill { transition: transform 260ms cubic-bezier(.2,.9,.2,1), opacity 200ms; }
.case-nav-pill.case-nav-hidden { transform: translateY(120%); opacity: 0; pointer-events: none; }
