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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    background-color: #fff;
    color: #282323;
    overflow-x: hidden;
}

/* All headings use Barlow Condensed font */
h1,
h2,
h3 {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 500;
}

/* Container */
.container {
    background-color: #fff;
    color: #000;
}

.research-img {
    width: 100%;
    height: auto;
    margin-bottom: 3rem;
}

/* Hero Section */
.hero-section {
    position: relative;
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    inset: 0;
    background: #230B0B;
}

.hero-background2 {
    position: absolute;
    inset: 0;
    background: #E0EBFF;
    background-image: url('BG1.png');
    background-size: contain;
}


.floating-element {
    position: absolute;
    border-radius: 50%;
    filter: blur(64px);
}

.floating-element-1 {
    left: 80px;
    top: 160px;
    width: 128px;
    height: 128px;
    background-color: rgba(147, 51, 234, 0.1);
    animation: float1 6s ease-in-out infinite;
}

.floating-element-2 {
    right: 128px;
    top: 240px;
    width: 192px;
    height: 192px;
    background-color: rgba(236, 72, 153, 0.1);
    animation: float2 8s ease-in-out infinite;
}

.floating-element-3 {
    bottom: 160px;
    left: 33.3333%;
    width: 160px;
    height: 160px;
    background-color: rgba(59, 130, 246, 0.1);
    animation: float3 7s ease-in-out infinite;
}

@keyframes float1 {

    0%,
    100% {
        transform: translateY(0px) translateX(0px);
    }

    50% {
        transform: translateY(-20px) translateX(10px);
    }
}

@keyframes float2 {

    0%,
    100% {
        transform: translateY(0px) translateX(0px);
    }

    50% {
        transform: translateY(-30px) translateX(-15px);
    }
}

@keyframes float3 {

    0%,
    100% {
        transform: translateY(0px) translateX(0px);
    }

    50% {
        transform: translateY(-25px) translateX(20px);
    }
}

/* Hero V3 Styles (CALL ME FRED) */
/* Hero V3 Styles (CALL ME FRED) */
.hero-content {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    padding: 0;
    position: relative;
    z-index: 10;
    /* Use padding to push content down, adjusted by media query if needed */
    padding-top: 15vh;
    box-sizing: border-box;
    text-align: center;
    /* Ensures the container centers if it's inline-block, or just fallback */
}

.hero-container-v3 {
    display: block;
    width: fit-content;
    margin: 0 auto;
    /* Center horizontally */
    text-align: left;
    /* Align internal text left relative to the block */
    max-width: 90vw;
}

.hero-call-me {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 500;
    font-size: 4rem;
    color: #fff;
    line-height: 1;
    margin: 0;
    text-transform: uppercase;
    margin-bottom: -1rem;
    z-index: 2;
    padding-bottom: 1.5rem;
}

.hero-fred-svg-container {
    width: 80%;
    max-width: 1200px;
}

.hero-fred-svg {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.hero-full-name {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 400;
    font-size: 3rem;
    color: #fff;
    text-transform: uppercase;
    margin: 0;
    line-height: 1.2;
}

.hero-role-subtitle {
    font-family: 'lato', sans-serif;
    font-weight: 200;
    font-size: 1.25rem;
    color: #D6D6D6;
    margin-top: 0.5rem;
    text-transform: none;
}

@media (max-width: 768px) {
    .hero-call-me {
        font-size: 2.5rem;
        margin-bottom: -0.5rem;
    }

    .hero-full-name {
        font-size: 1.8rem;
        margin-top: -0.5rem;
    }

    .hero-role-subtitle {
        font-size: 1rem;
    }
}

/* Visual Side - Image Card */
.hero-image-card {
    position: relative;
    width: 100%;
    max-width: 400px;
    aspect-ratio: 3/4;
    border-radius: 2rem;
    overflow: hidden;
    transform: rotate(3deg);
    transition: transform 0.5s ease;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-image-card:hover {
    transform: rotate(0deg) scale(1.02);
}

.hero-image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.5s ease;
}

.hero-image-card:hover img {
    filter: grayscale(0%);
}

.hero-floating-badge {
    position: absolute;
    bottom: 2rem;
    left: -2rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 0.9rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    z-index: 10;
    animation: floatBadge 4s ease-in-out infinite;
}

@keyframes floatBadge {

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

    50% {
        transform: translateY(-10px);
    }
}

/* Background Animation */
.hero-noise-bg {
    position: absolute;
    inset: 0;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='1'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

.hero-glow-orb {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(147, 51, 234, 0.2) 0%, rgba(0, 0, 0, 0) 70%);
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 1;
    animation: orbMove 20s infinite alternate;
}

@keyframes orbMove {
    0% {
        top: 10%;
        left: 10%;
        background: radial-gradient(circle, rgba(147, 51, 234, 0.2) 0%, rgba(0, 0, 0, 0) 70%);
    }

    33% {
        top: 60%;
        left: 50%;
        background: radial-gradient(circle, rgba(236, 72, 153, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    }

    66% {
        top: 20%;
        left: 80%;
        background: radial-gradient(circle, rgba(59, 130, 246, 0.2) 0%, rgba(0, 0, 0, 0) 70%);
    }

    100% {
        top: 10%;
        left: 10%;
        background: radial-gradient(circle, rgba(147, 51, 234, 0.2) 0%, rgba(0, 0, 0, 0) 70%);
    }
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    background-color: rgba(147, 51, 234, 1);
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background-color: rgba(255, 78, 78, 0.9);
    transform: translateY(-2px);
}

.scroll-indicator {
    position: absolute;
    left: 2rem;
    transform: translateY(-50%);
    top: 76%;
    bottom: auto;
}

.scroll-indicator img {
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {

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

    50% {
        transform: translateY(-15px);
    }
}

/* About Section */
.about-section {
    position: relative;
    padding: 8rem 2rem;
}

@media (max-width: 768px) {
    .about-section {
        padding: 8rem 3rem;
    }
}

.about-container {
    margin: 0 auto;
    max-width: 72rem;
}

.about-grid {
    display: grid;
    gap: 4rem;
    grid-template-columns: 1fr;
    text-align: center;
}

@media (min-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6rem;
        text-align: left;
        /* Keep left align for split layout if needed, or remove to keep center */
    }
}

.about-badge {
    display: inline-block;
    margin-bottom: 1.5rem;
    padding: 0.375rem 1rem;
    border-radius: 9999px;
    background-color: #E4E4E4;
}

.hero-desc {
    display: block;
    margin-bottom: 3rem;
    padding: 0;
    text-align: left;
}

.hero-desc p {
    color: #fff;
}

.about-badge p {
    color: rgb(16, 16, 16);
    font-size: 0.875rem;
}

.about-content h2 {
    margin-bottom: 1.5rem;
    font-size: 4rem;
    font-weight: 500;
    line-height: 1;
}

.about-text {
    margin-bottom: 0;
    /* Remove bottom margin from text as container handles spacing */
    color: rgba(0, 0, 0, 1);
    font-size: 1rem;
}

.about-point {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.about-number {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 8rem;
    font-weight: 700;
    line-height: 0.8;
    color: rgb(236 72 72);
    /* Low opacity pink/accent color from palette */
    flex-shrink: 0;
    /* Optical alignment */
}

.about-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-profile-img {
    width: 100%;
    max-width: 400px;
    /* Constrain max size if needed, or let it be responsive */
    height: auto;
    border-radius: 1rem;
    object-fit: cover;
}

/* Removed old .about-stats styles that used background-image */

/* Featured Work Section */
.featured-work-section {
    position: relative;
    padding: 5rem 0;
}

.featured-work-header {
    margin-bottom: 3rem;
    padding: 0 2rem;
    text-align: center;
}

.featured-work-header .work-badge {
    display: inline-block;
    margin-bottom: 1rem;
    padding: 0.375rem 1rem;
    border-radius: 9999px;
    background-color: rgba(236, 72, 153, 0.1);
}

.featured-work-header .work-badge p {
    color: rgba(251, 207, 232, 1);
    font-size: 0.875rem;
}

.featured-work-header h2 {
    margin-bottom: 1rem;
    font-size: 4.8rem;
    font-weight: 500;
    line-height: 0.7;
}

.work-description {
    margin: 0 auto;
    max-width: 32rem;
    color: #000;
    font-size: 1rem;
}

.horizontal-scroll-container {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

.horizontal-scroll-content {
    position: sticky;
    top: 0;
    display: flex;
    height: 100vh;
    align-items: center;
    gap: 2rem;
    padding: 0 2rem;
    overflow-x: auto;
    overflow-y: hidden;
}

.project-card {
    position: relative;
    flex-shrink: 0;
    width: 50vw;
    height: 70vh;
    overflow: hidden;
    border-radius: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: scale(1.02);
}

.project-gradient {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
}

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

.project-gradient-1 {
    background: linear-gradient(to bottom right, rgba(147, 51, 234, 0.2), rgba(236, 72, 153, 0.2));
}

.project-gradient-2 {
    background: linear-gradient(to bottom right, rgba(59, 130, 246, 0.2), rgba(6, 182, 212, 0.2));
}

.project-gradient-3 {
    background: linear-gradient(to bottom right, rgba(34, 197, 94, 0.2), rgba(16, 185, 129, 0.2));
}

.project-gradient-4 {
    background: linear-gradient(to bottom right, rgba(249, 115, 22, 0.2), rgba(239, 68, 68, 0.2));
}

.project-gradient-5 {
    background: linear-gradient(to bottom right, rgba(99, 102, 241, 0.2), rgba(147, 51, 234, 0.2));
}

.project-gradient-6 {
    background: linear-gradient(to bottom right, rgba(236, 72, 153, 0.2), rgba(244, 63, 94, 0.2));
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease, filter 0.5s ease;
    filter: grayscale(100%);
}

.project-card:hover .project-image {
    transform: scale(1.1);
    filter: grayscale(0%);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.4), transparent);
}

.project-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3rem;
    transform: translateY(0);
    transition: transform 0.5s ease;
}

.project-card:hover .project-info {
    transform: translateY(-20px);
}

.project-category {
    display: inline-block;
    margin-bottom: 0.75rem;
    padding: 0.375rem 1rem;
    border-radius: 9999px;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
}

.project-category p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
}

.project-description {
    margin-bottom: 1rem;
    color: #fff;
    font-size: 1rem;
}

.project-line {
    width: 3rem;
    height: 0.25rem;
    background-color: #fff;
    transition: width 0.5s ease;
}

.project-card:hover .project-line {
    width: 6rem;
}

/* Projects Grid Section */
.projects-grid-section {
    padding: 8rem 2rem;
}

.projects-grid-container {
    margin: 0 auto;
    max-width: 80rem;
}

.projects-grid-header {
    margin-bottom: 4rem;
    text-align: center;
}

.projects-badge {
    display: inline-block;
    margin-bottom: 1rem;
    padding: 0.375rem 1rem;
    border-radius: 9999px;
    background-color: rgba(59, 130, 246, 0.1);
}

.projects-badge p {
    color: rgba(147, 197, 253, 1);
    font-size: 0.875rem;
}

.projects-grid-header h2 {
    font-size: 2.5rem;
    font-weight: 500;
    line-height: 1.2;
}

.projects-feed {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12rem;
    width: 100%;
    max-width: 100%;
    padding: 0 2rem 8rem;
}

.feed-item {
    width: 100%;
    opacity: 0;
    transform: scale(0.9) translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    perspective: 1000px;
}

/* Experience Card Styles */
.experience-card {
    text-align: center;
    padding: 6rem 2rem;
    background: transparent;
    width: 100%;
    margin: 0 auto;
    position: relative;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.exp-date {
    font-size: 0.85rem;
    color: rgba(0, 0, 0, 0.4);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

.exp-role {
    font-size: 4rem;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 500;
    line-height: 0.8;
    margin-bottom: 0.5rem;
    color: #282323;
}

.exp-company {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #282323;
    letter-spacing: -0.02em;
}

.exp-desc {
    font-size: 1.1rem;
    color: rgba(0, 0, 0, 0.6);
    line-height: 1.6;
    max-width: 28rem;
    margin: 0 auto;
}

/* Reset Grid Project Card for Feed */
.grid-project-card {
    width: 80%;
    /* 80% of the feed item width */
    aspect-ratio: 16/9;
    /* Make images more landscape in the feed */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transform-style: preserve-3d;
    border: 2rem solid #fff;
    background-color: #fff;
    /* Ensure background matches border */
    margin: 0 auto;
    /* Center the card */
}

.project-details {
    width: 80%;
    /* Match card width */
    margin: 1.5rem auto 0;
    /* Center the details container */
    text-align: center;
    /* Center text inside */
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.grid-project-info {
    order: 1;
    /* Category below title? or above? User said title and info. Usually Title then Category. Let's check HTML order. HTML has Title then Info. */
    /* Resetting previous absolute styles */
    position: static;
    padding: 0;
    transform: none;
    opacity: 1;
}

.grid-project-title {
    order: 0;
    /* Resetting previous absolute styles */
    position: static;
    padding: 0;
}

.grid-project-title p {
    color: #282323;
    font-size: 2.5rem;
    /* Larger title */
    font-weight: 500;
    font-family: 'Barlow Condensed', sans-serif;
    line-height: 1;
    transform: none;
}

.grid-project-category {
    display: inline-block;
    padding: 0;
    margin: 0;
    background-color: transparent;
    backdrop-filter: none;
    color: #222222;
}

.grid-project-category p {
    color: rgba(0, 0, 0, 0.6);
    font-size: 1rem;
    font-weight: 500;
}

.grid-project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.7s ease;
}

.grid-project-overlay {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
}


/* Contact Section */
.contact-section {
    position: relative;
    padding: 8rem 2rem;
}

.contact-background {
    position: absolute;
    inset: 0;
    background: #111111;
}

.contact-container {
    position: relative;
    margin: 0 auto;
    max-width: 72rem;
    /* Increased max-width for better spacing */
}

.contact-content-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4rem;
    text-align: left;
}

.contact-left {
    flex: 1;
    max-width: 60%;
}

.contact-right {
    flex-shrink: 0;
}

.contact-badge {
    display: inline-block;
    margin-bottom: 1.5rem;
    padding: 0.375rem 1rem;
    border-radius: 9999px;
    background-color: rgba(255, 255, 255, 0.1);
}

.contact-badge p {
    color: #ffffff;
    font-size: 0.875rem;
}

.contact-content-wrapper h2 {
    margin-bottom: 1.5rem;
    font-size: 4.8rem;
    font-weight: 500;
    line-height: 0.9;
    color: #ffffff;
}

.contact-description {
    margin-bottom: 3rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.25rem;
    line-height: 1.6;
    max-width: 32rem;
}

.contact-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 300px;
}

.contact-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 1rem;
    font-size: 1.125rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    width: 100%;
}

.contact-button.primary {
    background-color: #ffffff;
    color: #000000;
    border: 1px solid #ffffff;
}

.contact-button.primary:hover {
    background-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

.contact-button.secondary {
    background-color: transparent;
    color: #ffffff;
    border: 1px solid #ffffff;
}

.contact-button.secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.social-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

.social-link {
    color: rgba(255, 255, 255, 0.5);
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-link:hover {
    color: #ffffff;
}

/* Footer */
.footer {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding: 3rem 2rem;
    Background: #222222;
}

.footer-container {
    margin: 0 auto;
    max-width: 72rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        align-items: center;
    }
}

.footer .backtohome-content {
    margin-top: 0;
    margin-left: auto;
}

@media (max-width: 767px) {
    .footer .backtohome-content {
        margin-left: 0;
    }
}

.footer-content p {
    color: #ffffff;
    font-size: 0.875rem;
}

/* Parallax Effects */
.parallax-section {
    transition: transform 0.1s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {

    /* Disable parallax transforms on mobile for better performance */
    .parallax-section {
        transform: none !important;
        transition: none;
    }

    /* Hero Section */
    .hero-section {
        padding: 1rem 0;
        min-height: auto;
        transform: none !important;
        opacity: 1 !important;
    }

    .hero-content {
        padding: 3rem;
        max-width: 100%;
        overflow-x: hidden;
    }

    .hero-title {
        font-size: clamp(14rem, 40vw, 18rem);
        max-width: 100%;
        overflow: hidden;
    }

    .hero-title-main {
        font-size: clamp(10rem, 45vw, 24rem);
        /* Responsive sizing using viewport width - Safari friendly */
        line-height: 0.3;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        word-break: break-word;
        /* Safari-specific fixes */
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    .hero-title-fred {
        font-size: 3rem;
        /* Reduced from 4rem */
    }

    .hero-description {
        font-size: 0.9rem;
        margin-bottom: 2rem;
    }

    /* Hero Title Container - Mobile */
    .hero-title-container {
        gap: 1rem;
        flex-wrap: nowrap;
    }

    .back-icon-link {
        width: 2.5rem;
        height: 2.5rem;
    }

    .back-icon {
        width: 1.25rem;
        height: 1.25rem;
    }

    .hero-desc {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }

    /* Floating elements - adjust position and size for mobile */
    .floating-element-1 {
        left: 20px;
        top: 80px;
        width: 80px;
        height: 80px;
    }

    .floating-element-2 {
        right: 20px;
        top: 120px;
        width: 100px;
        height: 100px;
    }

    .floating-element-3 {
        bottom: 80px;
        left: 10%;
        width: 90px;
        height: 90px;
    }

    .scroll-indicator {
        bottom: 1rem;
    }

    .scroll-indicator svg {
        width: 60px;
        height: 45px;
    }

    /* About Section */
    .about-section {
        padding: 4rem 1rem;
    }

    .about-content h2,
    .featured-work-header h2,
    .projects-grid-header h2,
    .contact-content h2,
    .section-title {
        font-size: 1.75rem;
    }

    .about-text {
        font-size: 0.95rem;
    }

    .about-stats {
        min-height: 300px;
        background-size: contain;
    }

    /* Featured Work Section */
    .featured-work-section {
        padding: 3rem 0;
    }

    .featured-work-header {
        padding: 0 1rem;
        margin-bottom: 2rem;
    }

    .work-description {
        font-size: 0.95rem;
        padding: 0 1rem;
    }

    .projects-grid-container {
        padding: 0 1rem;
    }

    .projects-grid {
        gap: 1rem;
    }

    .project-card-link {
        display: block;
        text-decoration: none;
        color: inherit;
        cursor: pointer;
        width: 100%;
    }

    .grid-project-card {
        aspect-ratio: 16/9;
    }

    .grid-project-title {
        padding: 1rem;
    }

    .grid-project-title p {
        font-size: 2rem;
    }

    .grid-project-category {
        font-size: 0.8rem;
    }

    .project-card {
        width: 85vw;
    }

    /* Contact Section */
    .contact-section {
        padding: 4rem 1rem;
    }

    .contact-content-wrapper {
        flex-direction: column;
        text-align: center;
        gap: 3rem;
    }

    .contact-left {
        max-width: 100%;
        width: 100%;
    }

    .contact-content-wrapper h2 {
        font-size: 2.5rem;
        line-height: 1;
    }

    .contact-description {
        font-size: 1rem;
        margin-bottom: 2rem;
        max-width: 100%;
    }

    .social-links {
        justify-content: center;
        margin-top: 2rem;
    }

    .contact-buttons {
        width: 100%;
    }

    .contact-button {
        width: 100%;
        padding: 1rem;
    }

    /* Footer */
    .footer {
        padding: 2rem 1rem;
    }

    .footer-content {
        text-align: center;
    }

    /* Case Study Pages */
    .case-hero-section {
        padding: 4rem 1rem 2rem;
    }

    .case-hero-title {
        font-size: 1.75rem;
    }

    .case-hero-subtitle {
        font-size: 0.95rem;
    }

    .case-section {
        padding: 3rem 1rem;
    }

    .case-section-container {
        padding: 0;
    }

    .section-subtitle {
        font-size: 0.95rem;
    }

    .section-subtitle ul {
        padding-left: 1.25rem;
    }

    .section-subtitle li {
        margin-bottom: 0.75rem;
        font-size: 0.9rem;
    }

    /* Before/After Slider - Mobile */
    .cs-slider {
        margin: 0;
        border-radius: 0.5rem;
    }

    .cs-handle {
        width: 36px;
        height: 36px;
    }

    .cs-handle svg {
        width: 16px;
        height: 16px;
    }

    .cs-chip {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }

    .cs-chip-left {
        left: 8px;
        top: 8px;
    }

    .cs-chip-right {
        right: 8px;
        top: 8px;
    }

    /* Users Grid */
    .users-grid {
        gap: 1rem;
    }

    .user-card {
        padding: 1rem;
    }

    .user-card h3 {
        font-size: 3rem;
    }

    .user-card p {
        font-size: 0.9rem;
    }

    /* Outcomes List */
    .outcomes-list {
        gap: 0.75rem;
    }

    .outcome-item {
        padding: 0.875rem;
        font-size: 0.9rem;
    }

    /* Video Embed */
    .video-embed {
        border-radius: 0.5rem;
    }

    /* Back to Home */
    .backtohome-content {
        font-size: 0.8rem;
        margin-top: 2rem;
    }

    .hero-content .backtohome-content {
        margin-bottom: 1rem;
    }

    /* Prevent horizontal overflow */
    body {
        overflow-x: hidden;
    }

    .container {
        overflow-x: hidden;
    }

    /* Ensure images don't overflow */
    img {
        max-width: 100%;
        height: auto;
    }

    .cs-slider img,
    .ba-slider img {
        max-width: 100%;
        height: auto;
    }

    /* Fix hero background */
    .hero-background {
        background-size: cover;
        background-position: center;
    }

    /* Fix about stats image */
    .about-stats {
        min-height: 250px;
        background-position: center;
        background-size: cover;
    }

    /* Ensure text wraps properly */
    .hero-desc p,
    .about-text,
    .section-subtitle {
        word-wrap: break-word;
        overflow-wrap: break-word;
        margin: 1rem;
    }

    /* Fix project card overflow */
    .grid-project-card {
        overflow: hidden;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {

    .hero-super-title,
    .hero-outline-text {
        font-size: 5rem;
    }

    .hero-image-card {
        max-width: 300px;
    }

    .hero-content {
        padding: 1rem;
    }

    .exp-role {

        line-height: 1.2;

    }
}

/* Smooth scrolling for older browsers */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* Image fallback styles */
.image-fallback {
    display: inline-block;
    background-color: #f3f4f6;
    text-align: center;
    vertical-align: middle;
}

.image-fallback-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.image-fallback img {
    opacity: 0.3;
}

a {
    text-decoration: none;
}

/* Case Study Page */
.case-hero-section {
    position: relative;
    padding: 6rem 2rem 4rem;
}

.case-hero-container {
    margin: 0 auto;
    max-width: 72rem;
}

.case-hero-title {
    margin: 1rem 0 0.5rem;
    font-size: 2.5rem;
    font-weight: 500;
    line-height: 1.2;
    font-family: 'Barlow Condensed', sans-serif;
}

.case-hero-subtitle {
    color: rgba(0, 0, 0, 0.6);
    margin-bottom: 2rem;
}

/* Before/After Slider */
.ba-slider {
    position: relative;
    width: 100%;
    max-width: 72rem;
    border-radius: 1rem;
    overflow: hidden;
    background: #f7f7f8;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    touch-action: none;
    cursor: ew-resize;
}

.ba-slider img {
    display: block;
    width: 100%;
    height: auto;
    /* prevent scaling distortion; maintain intrinsic ratio */
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

.ba-after-wrapper {
    position: absolute;
    inset: 0;
    width: 50%;
    /* start centered */
    overflow: hidden;
    z-index: 2;
}

.ba-after {
    width: 100%;
    height: auto;
}

.ba-handle {
    position: absolute;
    top: 0;
    left: calc(50% - 1px);
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.55));
    z-index: 3;
}

.ba-knob {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    border-radius: 9999px;
    background: rgba(147, 51, 234, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.9);
}

.ba-knob:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(147, 51, 234, 0.35), 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ba-labels {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1rem;
    z-index: 4;
    pointer-events: none;
}

.ba-chip {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background-color: rgba(251, 246, 102, 0.8);
    color: #111827;
    font-size: 0.875rem;
}

/* Case Study Sections */
.case-section {
    padding: 4rem 2rem;
}

.case-section-container {
    margin: 0 auto;
    max-width: 72rem;
}

.section-title {
    font-size: 4.8rem;
    font-weight: 500;
    margin-bottom: 1rem;
    font-family: 'Barlow Condensed', sans-serif;
    line-height: 1;
}

.section-subtitle {
    color: rgba(0, 0, 0, 0.6);
    margin-bottom: 2rem;
}

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

@media (min-width: 768px) {
    .users-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.user-card {
    padding: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.75rem;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.user-profile-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 3px solid rgba(147, 51, 234, 0.1);
}

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

@media (min-width: 768px) {
    .outcomes-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

.outcome-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 0.75rem;
    background: #E0EBFF;
    border: 1px solid rgba(78, 114, 255, 0.15);
}

.outcome-item i {
    flex-shrink: 0;
    font-size: 1.5rem;
    color: #4e8fff;
    margin-top: 0.1rem;
}

.video-embed {
    position: relative;
    width: 100%;
    max-width: 72rem;
    margin: 0 auto;
    aspect-ratio: 16/9;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.next-projects {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.next-link {
    display: inline-block;
    padding: 0.75rem 1.25rem;
    border-radius: 9999px;
    background: rgba(147, 51, 234, 1);
    color: #fff;
}

/* Reference-aligned Compare Slider */
.cs-slider {
    position: relative;
    width: 100%;
    max-width: 72rem;
    border-radius: 1rem;
    overflow: hidden;
    background-color: #f6f6f6;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    cursor: ew-resize;
}

.cs-slider img {
    display: block;
    width: 100%;
    height: auto;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

.cs-slider-after {
    position: relative;
}

.cs-slider-before {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    clip-path: inset(0 50% 0 0);
    /* start half */
}

.cs-handle-line {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 100%;
    background: white;
    z-index: 3;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cs-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 72px;
    height: 48px;
    border-radius: 9999px;
    background: rgb(237, 236, 238);
    color: rgba(147, 51, 234, 1);
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: grab;
}

.cs-handle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(147, 51, 234, 0.35), 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cs-chip {
    position: absolute;
    top: 12px;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    border-radius: 9999px;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    user-select: none;
}

.cs-chip-left {
    left: 12px;
}

.cs-chip-right {
    right: 12px;
}

.backtohome-content {
    color: #ff4e4e;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    margin-top: 4rem;
    transition: color 0.3s ease;
}

.backtohome-content:hover {
    color: rgba(255, 78, 78, 0.8);
}

.backtohome-content a {
    color: inherit;
}

.hero-content .backtohome-content {
    margin-bottom: 1rem;
}

/* Case Study Content Styling */
.case-text {
    font-size: 1.1rem;
    color: rgba(0, 0, 0, 0.8);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.case-subheading {
    font-size: 2.5rem;
    font-weight: 500;
    margin-top: 3rem;
    margin-bottom: 1rem;
    font-family: 'Barlow Condensed', sans-serif;
    color: #282323;
    line-height: 1;
}

.case-section-container ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    list-style-type: disc;
}

.case-section-container li {
    margin-bottom: 0.75rem;
    color: rgba(0, 0, 0, 0.8);
    font-size: 1.1rem;
    line-height: 1.6;
}

.case-section-container strong,
.case-section-container b {
    font-weight: 700;
    color: #000;
}

/* =========================================
   CASE STUDY SPECIFIC HERO STYLES
   Fixes layout issues caused by index redesign
   ========================================= */

/* Use the presence of data-project-id on body to target case study pages */
body[data-project-id] .hero-section {
    display: block;
    padding: 0;
    min-height: auto;
    /* Reset from 100vh */
    text-align: center;
    padding-top: 140px;
    /* Ensure content clears fixed header if any */
    padding-bottom: 4rem;
    overflow: visible;
}

/* Reset .hero-content for case studies */
body[data-project-id] .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0 2rem;
    padding-top: 0;
    /* Already handled by section padding */
    margin: 0 auto;
    max-width: 1200px;
    min-height: auto;
    text-align: center;
}

/* Title Container */
body[data-project-id] .hero-title-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    width: 100%;
    flex-wrap: wrap;
}

/* Back Icon Link */
body[data-project-id] .back-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    color: #333;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

body[data-project-id] .back-icon-link:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: translateX(-4px);
}

body[data-project-id] .back-icon {
    width: 1.5rem;
    height: 1.5rem;
}

/* Hero Title */
body[data-project-id] .hero-title {
    font-size: 3.5rem;
    line-height: 1.1;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    text-align: left;
}

/* Case Study Description */
body[data-project-id] .hero-description {
    font-size: 1.25rem;
    line-height: 1.6;
    color: #555;
    max-width: 700px;
    margin: 0 auto 3rem;
}

/* Image / Slider styling */
body[data-project-id] .cs-slider,
body[data-project-id] .hero-image-wrapper {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
}

body[data-project-id] img {
    max-width: 100%;
    height: auto;
}

/* Responsive adjustments for case studies */
@media (max-width: 768px) {
    body[data-project-id] .hero-section {
        padding-top: 100px;
    }

    body[data-project-id] .hero-title {
        font-size: 2.5rem;
        text-align: center;
    }

    body[data-project-id] .hero-title-container {
        flex-direction: column;
        gap: 1rem;
    }

    body[data-project-id] .hero-description {
        font-size: 1rem;
        padding: 0 1rem;
    }
}

/* Why Should You Work With Me Section */
.why-work-me-section {
    background-color: #F0F8FF;
    /* Light Blue Theme */
    padding: 8rem 2rem;
    color: #282323;
    /* Dark Text */
    position: relative;
    z-index: 2;
}

.why-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 6rem;
}

.why-header h2 {
    font-size: 4rem;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 500;
    line-height: 1;
    margin-top: 1rem;
    color: #282323;
    /* Dark Text */
}

/* Update badge text color for light bg if needed, but it has inline styles in HTML for now.
   User asked "Change the font colors as well accordingly".
   The HTML has <p style="color: #fff;">Value Proposition</p>. I might need to override this in CSS or change HTML.
   Wait, I should check if I can override the inline style easily or if I should just tackle it in CSS with !important validly or better, change the HTML too? 
   I already did a replace block on HTML for the cards. I didn't touch the header part in the HTML tool call.
   I'll stick to CSS for now. If I need to change the badge text color which is set inline, I might need another HTML edit or use specific selector.
   Let's check the HTML again.
   <div class="about-badge" style="background-color: rgba(255, 255, 255, 0.1);"> <p style="color: #fff;">Value Proposition</p> </div>
   This will look invisible on light background.
   I should update the HTML for the header too in a separate call or just include it?
   I already submitted the HTML call for the grid. I can't edit it there.
   I'll do a separate HTML edit for the header part to remove inline styles or change them.
   Or... I can just use CSS to override if I use !important, but that's bad practice.
   Let's see.
   The user said "Change the font colors as well accordingly".
   I'll add a tool call to fix the header colors in HTML.
*/

.why-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    /* Increased gap */
    max-width: 800px;
    margin: 0 auto;
}

.why-card {
    background: #FFFFFF;
    /* White Card */
    border: 1px solid rgba(0, 0, 0, 0.05);
    /* Light border */
    border-radius: 2rem;
    padding: 4rem 3rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    /* Soft shadow */
    text-align: left;
    /* Center align for image */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
}

.why-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.why-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 0.5rem;
    display: block;
}

.why-card h3 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: #4A90E2;
    /* Blue accent for title? Or just dark? Let's go with a nice blue to fit 'light theme of blue' */
    text-transform: uppercase;
    letter-spacing: 2px;
}

.why-quote {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 2.25rem;
    /* Slightly smaller to fit with image */
    font-weight: 500;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: #282323;
    /* Dark Text */
}

.why-desc {
    font-family: 'Lato', sans-serif;
    font-size: 1.125rem;
    line-height: 1.6;
    color: #555555;
    /* Dark Grey Text */
    width: 100%;
}

.why-desc ul {
    list-style-position: outside;
    padding-left: 1.5rem;
    margin: 0;
}

.why-desc li {
    margin-bottom: 0.75rem;
}

.why-desc p {
    margin: 0;
}

@media (max-width: 768px) {
    .why-header h2 {
        font-size: 3rem;
    }

    .why-quote {
        font-size: 1.75rem;
    }

    .why-card {
        padding: 2.5rem 1.5rem;
    }
}