:root {
    --bg-color: #FFFBF1;
    --heading-color: #265F56;
    --text-color: #4A3B32;
    /* Dark brown */
    --font-heading: 'BritishEmpire', serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --tag-border-color: #265F56;
}

@font-face {
    font-family: 'BritishEmpire';
    src: url('Demo_Fonts/Fontspring-DEMO-britishempire-bold.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.5;
    overflow-x: hidden;
}

h2 {
    font-family: var(--font-heading);
    color: var(--heading-color);
    font-size: 3rem;
    font-weight: normal;
    line-height: 1.2;
    text-transform: capitalize;
}

/* Header & Nav */
header {
    position: fixed;
    top: 2rem;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    z-index: 1000;
    padding: 0 4%;
}


.nav-container {
    background-color: #222222;
    /* Light shade of black */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.5rem;
    border-radius: 9999px;
    /* Pill shape */
    width: 100%;
    /* max-width: 1200px; Removed to cover full width with margin */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    color: var(--bg-color);
    /* Cream text */
    pointer-events: auto;
    /* Re-enable pointer events for the nav container */
}

.logo-img {
    height: 48px;
    width: auto;
    display: block;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    margin: 0;
    padding: 0;
    transition: all 0.3s ease;
    white-space: nowrap;
    /* Prevent wrapping by default */
}


.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    flex-direction: column;
    gap: 5px;
    z-index: 1001;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--bg-color);
    position: relative;
    transition: background-color 0.3s;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background-color: var(--bg-color);
    transition: transform 0.3s;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    bottom: -8px;
}

.mobile-menu-toggle.active .hamburger {
    background-color: transparent;
}

.mobile-menu-toggle.active .hamburger::before {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle.active .hamburger::after {
    transform: translateY(-8px) rotate(-45deg);
}

.nav-links a {
    text-decoration: none;
    color: var(--bg-color);
    /* Cream text */
    font-weight: 500;
    font-size: 1.1rem;
    transition: opacity 0.3s;
    opacity: 0.9;
}

.nav-links a:hover {
    opacity: 1;
    color: #fff;
}

.btn-resume {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--bg-color);
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    border-radius: 9999px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background-color 0.3s;
    border: 1px solid rgba(255, 251, 241, 0.2);
    text-align: center;
}

.btn-resume:hover {
    background-color: rgba(255, 255, 255, 0.25);
}

.story-resume-btn {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.btn-talk:hover {
    background-color: #fff;
    transform: translateY(-1px);
}

.nav-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Responsive Navigation Overrides */
@media (max-width: 1024px) {
    header {
        top: 1rem;
    }

    .nav-container {
        padding: 0.6rem 1.2rem;
    }

    .nav-list {
        gap: 2rem;
    }

    .nav-links a {
        font-size: 1rem;
    }

    .logo-img {
        height: 36px;
    }

    .btn-resume {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    h2 {
        font-size: 1.6rem;
    }

    .nav-container {
        padding: 0.4rem 1rem;
    }

    .nav-list {
        gap: 1.5rem;
    }

    .nav-links a {
        font-size: 0.85rem;
    }

    .logo-img {
        height: 30px;
    }

    .btn-resume {
        padding: 0.35rem 0.9rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 500px) {
    .nav-container {
        padding: 0.2rem 0.4rem;
    }

    .nav-list {
        gap: 0.35rem;
    }

    .nav-links a {
        font-size: 0.65rem;
    }

    .logo-img {
        height: 18px;
    }

    .btn-resume {
        padding: 0.15rem 0.5rem;
        font-size: 0.65rem;
        gap: 0.2rem;
    }

    .resume-text {
        display: none;
    }

    .btn-resume svg {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 320px) {
    .nav-list {
        display: none !important;
    }

    .mobile-menu-toggle {
        display: flex !important;
    }

    .nav-list.active {
        display: flex !important;
        flex-direction: column;
        position: fixed;
        top: 5.5rem;
        left: 50%;
        transform: translateX(-50%);
        background-color: #222222;
        width: 90%;
        padding: 2.5rem 1.5rem;
        border-radius: 2rem;
        gap: 2rem;
        text-align: center;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
        border: 1px solid rgba(255, 251, 241, 0.1);
        z-index: 1000;
    }
}

/* Hero Section */
.hero {
    position: relative;
    /* Context for absolute positioning of marquee */
    /* overflow: hidden; Removed to let marquee stick out if needed, but safer to keep it contained usually. Let's start with hidden to avoid scrollbars */
    overflow-x: clip;
    /* Prevent horizontal scrollbar but allow vertical overflow if needed? */
    /* Actually overflow: hidden on the body or main usually handles x-overflow. 
       Let's put overflow: hidden on .hero to ensure the rotated marquee doesn't cause horizontal scroll. */
    overflow: hidden;

    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    /* Text on left (larger), Image on right (smaller) */
    min-height: 100vh;
    padding: 6.4rem 9.6% 3.2rem 9.6%;
    /* Added top padding for fixed header */
    gap: 2rem;
    /* Decreased gap to bring text and image closer */
    align-items: center;
}

.hero-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    height: 600px;
    /* Fixed height to contain the composition */
}

.hero-composition {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 600px;
    /* Constrain width */
}

@media (max-width: 1024px) {
    .hero-image-container {
        height: 450px;
    }
}

@media (max-width: 768px) {
    .hero-image-container {
        height: 400px;
    }
}

@media (max-width: 480px) {
    .hero-image-container {
        height: 350px;
    }
}

.hero-composition img {
    position: absolute;
    object-fit: contain;
    transition: transform 0.3s ease;
}

/* Main Image (Center) */
.hero-img-main {
    width: 75%;
    /* Increased from 65% */
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    /* Lower z-index to be behind side bubbles */
}

/* Chess (Top Left) */
.hero-img-chess {
    width: 28%;
    /* Decreased from 35% */
    left: 12%;
    /* Adjusted to be closer to center */
    top: 20%;
    /* Adjusted to be closer to center */
    z-index: 2;
    /* Higher z-index */
}

/* Pet (Bottom Left) */
.hero-img-pet {
    width: 25%;
    /* Decreased from 32% */
    left: 12%;
    /* Adjusted for smaller size */
    bottom: 25%;
    /* Adjusted for smaller size */
    z-index: 2;
    /* Higher z-index */
}

/* Badminton (Bottom Right) */
.hero-img-badminton {
    width: 28%;
    /* Decreased from 35% */
    right: 8%;
    /* Adjusted for smaller size */
    bottom: 15%;
    /* Aligned with pet image (was 20%) */
    z-index: 2;
    /* Higher z-index */
}

/* Animations */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

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

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

@keyframes float-reverse {
    0% {
        transform: translateY(0px);
    }

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

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

/* Specific floating variations */
/* We need to combine translate for center image with float */
.floating-slow {
    animation: float-center 6s ease-in-out infinite;
}

.floating-medium {
    animation: float 5s ease-in-out infinite;
}

.floating-fast {
    animation: float-reverse 7s ease-in-out infinite;
}

@keyframes float-center {
    0% {
        transform: translate(-50%, -50%) translateY(0px);
    }

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

    100% {
        transform: translate(-50%, -50%) translateY(0px);
    }
}

.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    /* Left align text */
    text-align: left;
    max-width: 900px;
}

/* About Me Section */
.about-me {
    padding: 6.4rem 4%;
    text-align: center;
    background-color: var(--bg-color);
}

.about-me h2 {
    margin-bottom: 3rem;
}

@media (max-width: 768px) {
    .about-me {
        padding: 4rem 1rem;
    }

    .about-me h2 {
        margin-bottom: 2rem;
    }
}

.tablet-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto 3rem auto;
    width: 100%;
}

.tablet-frame {
    width: 100%;
    display: block;
    position: relative;
    z-index: 1;
    /* Frame sits on top if transparent, but usually iframe sits on top of screen area. 
                  If transparent center, iframe goes behind (z-index 1). 
                  If solid center, iframe goes in front. 
                  Let's assume we place iframe on top of the screen area for now. */
    pointer-events: none;
    /* Let clicks pass through to video if frame overlaps significantly, 
                             but ideally we position video accurately. */
}

.video-wrapper {
    position: absolute;
    top: 5.5%;
    /* Adjust based on tablet bezel */
    left: 4.5%;
    /* Adjust based on tablet bezel */
    width: 91%;
    /* Adjust based on tablet bezel */
    height: 89%;
    /* Adjust based on tablet bezel */
    z-index: 2;
    /* Video sits on top of tablet frame */
    overflow: hidden;
    border-radius: 4px;
    /* Slight radius for screen corners */
}

/* 
   Since we don't know if Tablet.webp has a transparent screen, 
   placing the video *on top* is safer if we get the % right.
   If the frame is just a border, placing it *behind* is safer.
   Let's try placing video ON TOP (z-index 3) but assuming the image is the frame.
   Actually, usually these assets are frames with transparent centers OR solid images.
   I'll try a standard padding assumption.
*/

.video-wrapper iframe,
.video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-button-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.play-button-overlay:hover {
    transform: translate(-50%, -50%) scale(1.1);
    background: rgba(255, 255, 255, 0.3);
    border-color: #fff;
}

.play-icon-inner {
    width: 0;
    height: 0;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-left: 20px solid #fff;
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.play-button-overlay:hover .play-icon-inner {
    transform: scale(1.1);
}

.play-button-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.8);
}

@media (max-width: 768px) {
    .play-button-overlay {
        width: 60px;
        height: 60px;
    }

    .play-icon-inner {
        border-top: 10px solid transparent;
        border-bottom: 10px solid transparent;
        border-left: 15px solid #fff;
    }
}

.availability-tag-container {
    margin-bottom: 3.5rem;
}

.pointing-hand {
    display: inline-block;
    margin-right: 8px;
    animation: pointing 1.2s infinite ease-in-out;
}

@keyframes pointing {

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

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

.availability-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background-color: #E6DCCD;
    /* Slightly darker cream/beige */
    color: var(--text-color);
    padding: 0.6rem 1.2rem;
    border-radius: 9999px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1rem;
    border: 1px solid rgba(74, 59, 50, 0.1);
}

.blink-indicator {
    width: 12px;
    height: 12px;
    background-color: #28C76F;
    /* Bright Green */
    border-radius: 50%;
    display: inline-block;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.5),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2),
        0 0 8px rgba(40, 199, 111, 0.6);
    /* Outer glow */
    animation: blink-glow 2s infinite ease-in-out;
}

@keyframes blink-glow {

    0%,
    100% {
        opacity: 1;
        box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.5),
            inset 0 -2px 4px rgba(0, 0, 0, 0.2),
            0 0 8px rgba(40, 199, 111, 0.6);
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.5),
            inset 0 -2px 4px rgba(0, 0, 0, 0.2),
            0 0 0px rgba(40, 199, 111, 0);
        transform: scale(0.95);
    }
}

.kicker {
    font-family: var(--font-body);
    font-size: 1.2rem;
    color: var(--heading-color);
    margin-bottom: 1rem;
    font-weight: 500;
    display: flex;
    /* Ensure span doesn't collapse */
}

.typing-text {
    display: inline-block;
    overflow: hidden;
    /* Ensures text is cut off during animation */
    white-space: nowrap;
    /* Keeps text on a single line */
    border-right: 3px solid var(--heading-color);
    /* The typewriter cursor */
    width: 0;
    /* Start with width 0 */
    animation:
        typing 2s steps(30, end) forwards,
        blink 0.75s step-end infinite;
}

@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blink {

    from,
    to {
        border-color: transparent;
    }

    50% {
        border-color: var(--heading-color);
    }
}

h1 {
    font-family: var(--font-heading);
    color: var(--heading-color);
    font-size: 3rem;
    /* Reduced from 4rem */
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: bold;
}

.subheading {
    font-size: 1.2rem;
    color: var(--text-color);
    max-width: 600px;
    line-height: 1.6;
    margin-bottom: 2.5rem;
}

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

    .subheading {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }

    .hero {
        padding-top: 10rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }

    .kicker {
        font-size: 1rem;
        justify-content: center;
    }
}

.hero-cta {
    margin-top: 1rem;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    background-color: var(--heading-color);
    color: var(--bg-color);
    text-decoration: none;
    padding: 0.8rem 1.6rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(38, 95, 86, 0.2);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(38, 95, 86, 0.3);
    color: #fff;
}

.btn-primary:active {
    transform: translateY(-1px) scale(0.98);
}

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

    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 10rem 1.5rem 4rem;
        /* Increased top padding for avatar visibility, matching story margins */
    }

    .hero-content {
        align-items: center;
        text-align: center;
        margin: 0 auto;
    }

    .hero-image-container {
        order: -1;
        /* Keep avatar on top */
        height: 300px;
        /* Adjusted height for mobile */
    }

    header {
        justify-content: center;
        padding: 1rem;
    }
}

/* Marquee Styles */
.marquee-container {
    position: absolute;
    bottom: 2rem;
    left: -5%;
    /* Extend beyond the container padding */
    width: 110vw;
    /* Ensure it covers the full width even when rotated */
    background-color: transparent;
    /* Removed background */
    /* color: var(--bg-color); Removed cream text */
    padding: 1rem 0;
    transform: rotate(-2deg);
    display: flex;
    overflow: hidden;
    white-space: nowrap;
    z-index: 10;
    /* box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); Removed shadow */
}

.marquee-content {
    display: flex;
    align-items: center;
    animation: scroll 180s linear infinite;
    gap: 3rem;
    padding-right: 3rem;
    color: #888888;
    /* Grey text */
}

.marquee-content span {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
    cursor: default;
}

.marquee-content span:hover {
    color: var(--heading-color);
    /* Green (Teal) on hover */
}

.separator {
    color: #888888;
    /* Match text color */
    font-size: 1.5rem;
}

@keyframes scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-100%);
    }
}

/* Work Section */
.work-section {
    padding: 6.4rem 4% 3.2rem 4%;
    text-align: center;
    background-color: var(--bg-color);
}

.work-section h2 {
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .work-section {
        padding: 4rem 1rem 2rem 1rem;
    }

    .work-section h2 {
        margin-bottom: 1.5rem;
        /* Added for consistency if needed */
    }

    .section-subheading {
        font-size: 1.1rem;
    }
}

.section-subheading {
    font-size: 1.25rem;
    color: var(--text-color);
    max-width: 800px;
    margin: 0 auto 2rem auto;
    line-height: 1.6;
    opacity: 0.9;
}

/* Full Image Project */
.project-full-image {
    width: 100%;
    max-width: 1250px;
    /* Increased from 1000px to make it larger */
    margin: 0 auto;
    padding: 0 3.2%;
    /* Slightly reduced padding to allow more size */
    border-radius: 40px;
    overflow: hidden;
    /* Remove box-shadow from container if it clips, or keep for effect */
}

.full-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 40px;
    /* Apply radius to image since container has padding */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* Projects Container */
.projects-container {
    max-width: 1050px;
    /* Wider width */
    margin: 0 auto;
    padding: 0.4rem 0;
    /* Reduced vertical padding */
}

.project-card {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    background-color: transparent;
    /* Background is handled by children */
    border-radius: 40px;
    overflow: hidden;
    text-align: left;
    margin-bottom: 4rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    height: 520px;
    /* Reverted to 520px as requested */
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
    cursor: pointer;
}

@media (max-width: 1024px) {
    .project-card {
        height: auto;
        min-height: 520px;
    }
}

.project-card:nth-child(odd) {
    transform: rotate(1.2deg);
}

.project-card:nth-child(even) {
    transform: rotate(-1.2deg);
}

.project-card:hover {
    transform: rotate(0deg) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    z-index: 10;
}

.project-content {
    background-color: #FEF2E8;
    /* Lighter peach/cream background */
    padding: 1% 6.4%;
    /* Further reduced vertical padding */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.project-logo-container {
    margin-bottom: 1rem;
    /* Reduced from 1.5rem */
    width: 100%;
}

.project-logo-img {
    max-width: 110px;
    /* scaled down more */
    height: auto;
    display: block;
    margin: 0 auto;
}

.project-tags {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    /* Reduced from 2rem */
}

.project-tag {
    padding: 0.4rem 1.12rem;
    border: 1px solid rgba(38, 95, 86, 0.15);
    background-color: rgba(255, 255, 255, 0.3);
    /* Subtle glass effect if needed */
    border-radius: 999px;
    font-size: 0.85rem;
    color: var(--text-color);
    font-weight: 500;
}

.project-tag:hover {
    color: var(--heading-color);
}

.project-tagline {
    font-size: 1.55rem;
    /* Adjusted for better line-fit */
    line-height: 1.4;
    color: var(--text-color);
    font-weight: 500;
    margin-bottom: 1.5rem;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
    letter-spacing: -0.01em;
}

.project-stats {
    display: flex;
    justify-content: center;
    gap: 3.5rem;
    /* Reduced gap */
    margin-bottom: 1.5rem;
    /* Reduced from 2rem */
    width: 100%;
}

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

.stat-number {
    font-size: 2.2rem;
    /* Even smaller numbers */
    font-weight: 600;
    color: var(--text-color);
    font-family: var(--font-body);
    /* Changed to Inter to match numbers better */
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    /* Smaller labels */
    color: var(--text-color);
    opacity: 0.7;
    font-weight: 500;
    width: min-content;
    /* Ensure wrap if long */
}

.project-cta-wrapper {
    margin-top: 1rem;
}

.btn-view-case-study {
    display: inline-block;
    transition: transform 0.3s ease;
}

.btn-view-case-study:hover {
    transform: scale(1.05);
}

.btn-view-case-study img {
    height: 50px;
    /* Scaled down CTA */
    width: auto;
    display: block;
}

.project-preview {
    background-color: #FFB86C;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.preview-img {
    width: 88%;
    height: 88%;
    object-fit: contain;
    object-position: bottom;
    /* Sit flush against bottom */
    display: block;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-top: auto;
    /* Push to bottom if needed */
}

.project-card:hover .preview-img {
    transform: scale(1.05);
    /* Subtle scale up on card hover */
}

/* Specific styling for Traqio project card */
.project-card.traqio {
    grid-template-columns: 1.15fr 0.85fr;
    /* Matching first project's grid split */
}

.project-card.traqio .project-content {
    background-color: #ffffff;
    padding: 1% 6.4%;
    /* Matching first project's padding */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.project-card.traqio .project-logo-container {
    margin-bottom: 1.5rem;
}

.project-card.traqio .project-logo-img {
    max-width: 110px;
    /* Match project 1 */
}

.project-card.traqio .project-tags {
    gap: 1.5rem;
    margin-bottom: 1rem;
    /* Further reduced from 1.5rem */
}

.project-card.traqio .project-tag {
    padding: 0.5rem 1.4rem;
    font-size: 0.85rem;
    border: 1px solid rgba(10, 25, 47, 0.2);
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    color: #0A192F;
    font-weight: 500;
}

.project-card.traqio .project-tagline {
    font-size: 1.6rem;
    line-height: 1.35;
    color: #0A192F;
    font-weight: 500;
    margin-bottom: 2rem;
    max-width: 90%;
}

.project-card.traqio .project-stats {
    gap: 3.5rem;
    margin-bottom: 1rem;
    /* Further reduced from 1.5rem */
}

.project-card.traqio .stat-number {
    font-size: 2.2rem;
    font-weight: 600;
    color: #0A192F;
}

.project-card.traqio .stat-label {
    font-size: 0.85rem;
    color: #0A192F;
    opacity: 0.7;
    font-weight: 500;
}

.project-card.traqio .project-preview {
    background-color: #f4f8ff;
    /* Light blue background for Traqio preview */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    padding: 0;
}

.project-card.traqio .preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transform: scale(1.15);
    transition: transform 0.5s ease;
}

.project-card.traqio:hover .preview-img {
    transform: scale(1.25);
}

.project-card.traqio .project-cta-wrapper {
    margin-top: 1rem;
}

.project-card.traqio .btn-view-case-study img {
    height: 50px;
}

/* Specific styling for SitterSafe project card */
.project-card.sittersafe {
    grid-template-columns: 1.15fr 0.85fr;
}

.project-card.sittersafe .project-content {
    background-color: #E6FFF0;
    /* Exact fresh mint bg */
    padding: 1.25rem 6.4%;
    /* Optimized padding to accommodate larger text in 520px height */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 0.1rem;
    /* Minimal gap to keep CTA visible */
}

.project-card.sittersafe .project-logo-container {
    margin: 0;
    margin-bottom: 0.8rem;
    /* Added space between logo and tags */
}

.project-card.sittersafe .project-logo-img {
    max-width: 82px;
    /* Reduced by 25% from 110px as requested */
}

.project-card.sittersafe .project-tag {
    background-color: #E2FFE9;
    border: 1px solid #B0EBB4;
    color: #265F56;
    padding: 0.4rem 1.4rem;
    font-size: 0.85rem;
    border-radius: 100px;
    margin-bottom: 0;
}

.project-card.sittersafe .project-tagline {
    color: #265F56;
    font-size: 1.45rem;
    line-height: 1.4;
    margin: 0;
    margin-top: -1rem;
    margin-bottom: 0.5rem;
    /* Spacing between text and numbers */
    max-width: 90%;
    /* Broader column to fit text in 4 lines */
    font-weight: 500;
}

.project-card.sittersafe .stat-number {
    color: #265F56;
    font-size: 2rem;
    /* Reduced number size */
    font-weight: 600;
}

.project-card.sittersafe .stat-label {
    color: #265F56;
    font-size: 0.9rem;
    opacity: 0.8;
}

.project-card.sittersafe .project-preview {
    background-color: #94D197;
    /* Exact mockup sage green */
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.project-card.sittersafe .preview-img {
    width: 105%;
    /* Zoomed in more */
    height: 105%;
    object-fit: contain;
    display: block;
}

.project-card.sittersafe:hover .preview-img {
    transform: scale(1.05);
    /* Subtle scale matched to project 1 */
}

.project-card.sittersafe .sittersafe-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #C1FECA;
    color: #265F56;
    text-decoration: none;
    padding: 0.6rem 2.24rem;
    border-radius: 100px;
    font-weight: 600;
    font-size: 1rem;
    border: 1px solid #265F56;
    transition: all 0.3s ease;
    margin: -4.5rem 0 0 0;
    /* Reduced space between numbers and CTA */
}

@media (max-width: 1100px) {
    .project-card.sittersafe .sittersafe-cta {
        margin: 2rem 0;
    }
}

.project-card.sittersafe .sittersafe-cta:hover {
    background-color: #A7EFB5;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(38, 95, 86, 0.15);
}

@media (max-width: 1100px) {

    .project-card,
    .project-card.traqio,
    .project-card.sittersafe {
        grid-template-columns: 1fr;
        margin: 0 1.5rem 4rem 1.5rem;
        height: auto;
        /* Allow cards to grow on smaller screens */
    }

    .project-content {
        padding: 4rem 3rem;
    }

    .project-preview {
        height: 500px;
    }

    .project-tagline {
        font-size: 1.5rem;
    }
}

@media (max-width: 600px) {

    .project-card,
    .project-card.traqio,
    .project-card.sittersafe {
        margin: 0 1rem 3rem 1rem;
        display: flex;
        flex-direction: column;
    }

    .project-content {
        padding: 2.5rem 1.5rem;
    }

    .project-preview {
        height: 320px;
    }

    .project-tagline {
        font-size: 1.1rem;
        /* Closer to story text size */
        margin-bottom: 1rem;
    }

    .project-stats {
        flex-direction: row;
        /* Keep stats in a row but smaller */
        gap: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    .project-tags {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .project-tag {
        font-size: 0.75rem;
        padding: 0.3rem 0.8rem;
    }

    .btn-view-case-study img {
        height: 40px;
    }

    /* Specific overrides for consistent compact size across all projects */
    .project-card.traqio .project-content,
    .project-card.sittersafe .project-content {
        padding: 2.5rem 1.5rem;
    }

    .project-card.traqio .project-tagline,
    .project-card.sittersafe .project-tagline {
        font-size: 1.25rem;
        margin-bottom: 1rem;
        margin-top: 0;
    }

    .project-card.sittersafe .project-logo-img {
        max-width: 60px;
    }

    .project-card.traqio .project-logo-img {
        max-width: 80px;
    }

    .project-card.sittersafe .sittersafe-cta {
        margin: 1rem 0 0 0;
        padding: 0.5rem 1.8rem;
        font-size: 0.9rem;
    }

    .project-card.traqio .project-stats,
    .project-card.sittersafe .project-stats {
        gap: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .project-card.traqio .stat-number,
    .project-card.sittersafe .stat-number {
        font-size: 1.8rem;
    }

    .project-card.traqio .stat-label,
    .project-card.sittersafe .stat-label {
        font-size: 0.75rem;
    }
}

/* Full-screen Overlay Styles */


.overlay-bg {
    width: 100%;
    display: block;
}

.video-frame-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.overlay-video {
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
}

.fullscreen-overlay {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
    padding: 3.2rem 1.6rem;
    /* Spacing as requested */
}

.overlay-img-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    /* Centered, restricted width */
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.fullscreen-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    border-radius: 12px;
    /* Restored rounded corners */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(30, 30, 30, 0.8);
    /* Dark and high-contrast */
    border: 1px solid rgba(255, 255, 255, 0.3);
    /* Subtle light border */
    color: white;
    width: 60px;
    /* Slightly larger */
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 100;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

.nav-arrow:hover {
    background: rgba(0, 0, 0, 0.95);
    transform: translateY(-50%) scale(1.1);
    border-color: white;
}



.nav-arrow svg {
    width: 24px;
    height: 24px;
}

.next-arrow {
    right: 20px;
}

.prev-arrow {
    left: 20px;
}

.close-overlay {
    position: fixed;
    /* Keep fixed while scrolling */
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 45px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    user-select: none;
    z-index: 10002;
    background: rgba(0, 0, 0, 0.3);
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
}

.close-overlay:hover,
.close-overlay:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

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

    .next-arrow {
        right: 10px;
    }

    .prev-arrow {
        left: 10px;
    }
}

/* --- Image Comparison Slider --- */
.comparison-slider {
    position: relative;
    width: fit-content;
    max-width: 100%;
    max-height: 90vh;
    /* Match .fullscreen-img */
    margin: 0 auto;
    overflow: hidden;
    border-radius: 8px;
    /* Match .fullscreen-img */
    background: #000;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    /* Match .fullscreen-img */
    display: flex;
    justify-content: center;
    align-items: center;
    user-select: none;
}

.comparison-img {
    width: 100%;
    height: 100%;
}

.comparison-before {
    position: relative;
    z-index: 1;
}

.comparison-img img {
    max-width: 100%;
    max-height: 90vh;
    /* Match .fullscreen-img exactly */
    object-fit: contain;
    display: block;
}


/* High-Fidelity is the revealed top layer */
.comparison-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    z-index: 2;
    overflow: hidden;
    border-right: 3px solid white;
}

.comparison-after img {
    position: absolute;
    top: 0;
    left: 0;
    /* JS syncSize handles width/height to avoid shrinking */
    max-width: none;
    object-fit: contain;
}

.slider-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 0;
    z-index: 10;
    pointer-events: none;
}

.handle-circle {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translate(-50%, -50%);
    width: 65px;
    height: 65px;
    background: rgba(20, 20, 20, 0.95);
    border: 4px solid white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.9);
    cursor: ew-resize;
    pointer-events: auto;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.handle-circle:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

.handle-circle svg {
    width: 20px;
    height: 20px;
    color: white;
}

/* --- Progress Bar --- */
.progress-bar-container {
    position: fixed;
    /* Keep visible at top during scroll */
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 10003;
}

.progress-bar {
    height: 100%;
    background: #FFB86C;
    /* Brand accent color */
    width: 0;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 184, 108, 0.5);
}

/* --- Interaction Hint --- */
.drag-hint {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: #FFB86C;
    color: #222;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    pointer-events: none;
    animation: bounce-text 2s infinite ease-in-out;
    opacity: 1;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.drag-hint::after {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #FFB86C;
}

.drag-hint.hidden {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
}

@keyframes bounce-text {

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

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

/* --- HTML Slide Styles --- */
.html-slide-container {
    width: 100%;
    height: 100%;
    color: white;
    padding: 1.6rem;
    overflow-y: auto;
    font-family: var(--font-body);
}

/* --- Video Slide Styles --- */
.video-slide-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.6rem;
}

.fullscreen-video {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.8);
    background-color: #000;
}

/* --- YouTube Embed Wrapper --- */
.yt-embed-wrapper {
    width: 100%;
    max-width: 900px;
    margin: auto;
    aspect-ratio: 16 / 9;
}

.yt-embed-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 14px;
}

/* --- Video Overlay Slide Styles --- */
.video-overlay-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

.overlay-bg {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.video-frame-container {
    position: absolute;
    /* Precise positioning based on Slide 26 .webp proportions */
    top: 17%;
    left: 22.8%;
    width: 73.1%;
    height: 74%;
    overflow: hidden;
    border-bottom-right-radius: 15px;
    /* Matches the rounded corner in the illustration */
}

.overlay-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

/* Image Marquee Section (Above Case Studies) */
.marquee-images-section {
    padding: 0 0 3.2rem 0;
    overflow: hidden;
    background-color: var(--bg-color);
}

.marquee-images-container {
    display: flex;
    overflow: hidden;
    user-select: none;
}

.marquee-images-track {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 30px;
    padding-right: 30px;
    /* Match gap for seamless loop */
    min-width: 100%;
    animation: marquee-scroll 45s linear infinite;
}

.marquee-images-track img {
    height: 300px;
    /* Consitent height for all images */
    width: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

@keyframes marquee-scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-100%);
    }
}

/* Footer Styles */
.site-footer {
    background-color: var(--heading-color);
    color: var(--bg-color);
    padding: 4.8rem 4% 3.2rem 4%;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    position: relative;
    left: 0;
}

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

.footer-cta h2 {
    font-family: var(--font-body);
    font-size: 2.5rem;
    font-weight: 400;
    line-height: 1.3;
    max-width: 900px;
    margin-bottom: 4rem;
    color: var(--bg-color);
    text-transform: none;
    text-align: left;
}

@media (max-width: 1200px) {
    .footer-cta h2 {
        font-size: 2rem;
    }
}

.footer-divider {
    border: none;
    border-top: 1px solid rgba(255, 251, 241, 0.4);
    margin-bottom: 2.5rem;
    width: 100%;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-tagline {
    font-size: 1.1rem;
    font-weight: 400;
}

.footer-links {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--bg-color);
    text-decoration: underline;
    text-underline-offset: 4px;
    font-size: 1.1rem;
    font-weight: 400;
    transition: opacity 0.3s ease;
}

.footer-link:hover {
    opacity: 0.8;
}

.heart {
    display: inline-block;
    margin-left: 5px;
}

@media (max-width: 768px) {
    .footer-cta h2 {
        font-size: 2rem;
        margin-bottom: 3rem;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .footer-links {
        gap: 1.5rem;
    }
}

/* Paper Animation Styles */
.paper-animation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #FDF9F0;
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.paper-animation-overlay.active {
    display: flex;
    opacity: 1;
    pointer-events: all;
}

.paper-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Close button styles */
.close-story {
    position: fixed;
    top: 2rem;
    right: 2rem;
    font-size: 3rem;
    color: #2D5A50;
    cursor: pointer;
    z-index: 10001;
    transition: transform 0.3s ease;
    line-height: 1;
}

.close-story:hover {
    transform: scale(1.1);
}

.story-content-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    /* Enable scrolling */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease;
    z-index: 10;
    padding-bottom: 0;
    -webkit-overflow-scrolling: touch;
}

/* Ensure scrollbar is visible as per user's request for scrollability */
.story-content-wrapper::-webkit-scrollbar {
    width: 8px;
}

.story-content-wrapper::-webkit-scrollbar-thumb {
    background: rgba(45, 90, 80, 0.2);
    border-radius: 4px;
}

.story-content-wrapper.visible {
    opacity: 1;
    visibility: visible;
}

.story-inner-content {
    max-width: 1300px;
    margin: 0 auto;
    font-family: var(--font-body);
    color: var(--text-color);
    line-height: 1.6;
    padding: 4rem 1.6rem 2rem;
    /* Balanced top spacing based on feedback */
}

/* Base Story Styles (Desktop first, mobile will be consolidated at the end) */
.story-inner-content {
    max-width: 1300px;
    margin: 0 auto;
    font-family: var(--font-body);
    color: var(--text-color);
    line-height: 1.6;
    padding: 4rem 1.6rem 2rem;
}

.story-section {
    display: flex;
    align-items: center;
    gap: 8rem;
    margin-bottom: 12rem;
    position: relative;
    justify-content: center;
}

.who-am-i,
.in-flow {
    gap: 4rem;
    /* Reduced gap between image and text */
}

.story-visuals {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
}

.story-text {
    flex: 1;
    text-align: center;
    /* Centered as per Goal Image */
}

/* Legacy In-Flow styles removed - See bottom of file for definitive layout */


.story-text h2 {
    display: block;
    margin-bottom: 2.5rem;
    text-align: center;
}

/* Retired legacy rules */

.story-text p {
    font-size: 1.4rem;
    margin-bottom: 2rem;
    line-height: 1.7;
    color: #333;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Pasted Image Pattern */
.pasted-image-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

.pasted-image-frame {
    background: none;
    padding: 0;
    box-shadow: none;
    transform: rotate(0deg);
    transition: transform 0.3s ease;
    width: 100%;
}

.pasted-image-frame img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.pasted-sticker {
    position: absolute;
    top: -45px;
    left: 50%;
    width: 150px;
    transform: translateX(-50%) rotate(0deg);
    z-index: 10;
    pointer-events: none;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.1));
}

@media (max-width: 768px) {
    .pasted-image-container {
        max-width: 320px;
    }

    .pasted-sticker {
        width: 120px;
        top: -35px;
    }
}

/* Sticker */
.sticker {
    position: absolute;
    z-index: 10;
    pointer-events: none;
}

/* Legacy sticker styles removed */

/* Connect Button */
.story-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 2rem;
}

/* Connect Buttons Base */
.connect-btn {
    display: inline-block;
    padding: 13px 36px;
    background-color: #2D5A50;
    color: #fff !important;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.2rem;
    margin: 2rem auto 0;
    transition: all 0.3s ease;
    border: none;
}

.connect-btn {
    display: inline-block;
    padding: 13px 36px;
    background-color: #2D5A50;
    color: #fff !important;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.2rem;
    margin: 2rem auto 0;
    transition: all 0.3s ease;
    border: none;
}

.connect-btn:hover {
    background-color: #1a3630;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(45, 90, 80, 0.3);
}

/* Retired legacy rules */

.awards-continuation .story-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.awards-continuation {
    margin-bottom: 4rem;
    /* Tightened gap between awards and in-flow */
}

.in-flow .pasted-image-container {
    max-width: 350px;
    /* Smaller image as requested */
}

.awards-continuation .awards-composition {
    margin: 2rem 0 3rem;
}

.awards-continuation .story-text p {
    margin-top: 1rem;
    margin-bottom: 2rem;
}

.awards-continuation h2 {
    margin-bottom: 2rem;
    text-align: center;
}

.awards-continuation p {
    font-size: 1.4rem;
    margin-bottom: 0;
    line-height: 1.7;
    color: #333;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.awards-composition {
    position: relative;
    max-width: 1300px;
    margin: 0 auto;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 0;
    padding: 0 2rem 2rem 2rem;
}

.awards-composition .award-item {
    position: relative !important;
    transition: transform 0.3s ease !important;
    flex-shrink: 0;
    box-shadow: none !important;
    background: none !important;
    border: none !important;
}

.awards-composition .award-item img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
}

/* --- Story Tools Section --- */
.story-tools-section {
    padding: 6rem 1.6rem 8rem;
    text-align: center;
    width: 100%;
}

.tools-title {
    margin-bottom: 5rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.tools-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    flex-wrap: wrap;
    max-width: 1100px;
    margin: 0 auto;
}

.tools-grid img {
    height: 60px;
    width: auto;
    object-fit: contain;
    animation: toolBounce 2s infinite ease-in-out;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.05));
    transition: transform 0.3s ease;
}

.tools-grid img:hover {
    transform: scale(1.1) !important;
    animation-play-state: paused;
}

@keyframes toolBounce {

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

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

/* Staggered animation delays for 13 logos */
.tools-grid img:nth-child(1) {
    animation-delay: 0.1s;
}

.tools-grid img:nth-child(2) {
    animation-delay: 0.3s;
}

.tools-grid img:nth-child(3) {
    animation-delay: 0.5s;
}

.tools-grid img:nth-child(4) {
    animation-delay: 0.2s;
}

.tools-grid img:nth-child(5) {
    animation-delay: 0.4s;
}

.tools-grid img:nth-child(6) {
    animation-delay: 0.6s;
}

.tools-grid img:nth-child(7) {
    animation-delay: 0.1s;
}

.tools-grid img:nth-child(8) {
    animation-delay: 0.3s;
}

.tools-grid img:nth-child(9) {
    animation-delay: 0.5s;
}

.tools-grid img:nth-child(10) {
    animation-delay: 0.2s;
}

.tools-grid img:nth-child(11) {
    animation-delay: 0.4s;
}

.tools-grid img:nth-child(12) {
    animation-delay: 0.6s;
}

.tools-grid img:nth-child(13) {
    animation-delay: 0.3s;
}

@media (max-width: 768px) {
    .tools-grid {
        gap: 2.5rem;
    }

    .tools-grid img {
        height: 50px;
    }

    .tools-title {
        font-size: 2.2rem;
    }
}

/* Old In-Flow classes removed to prevent conflicts */

.awards-composition .award-cert-black {
    width: 400px !important;
    z-index: 1 !important;
    transform: rotate(4deg) !important;
    margin-left: -140px !important;
    /* Pull tight to White Cert */
}

.awards-composition .award-main {
    width: 500px !important;
    z-index: 1 !important;
    transform: rotate(-2deg) !important;
}

.awards-composition .award-main img {
    border: none !important;
    border-radius: 8px !important;
    background: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.awards-composition .award-cert-white {
    width: 420px !important;
    z-index: 10 !important;
    /* Bring to front */
    transform: rotate(1deg) !important;
    margin-left: -140px !important;
    /* Pull tight to MVP */
}


/* Awards Composition Base */
.awards-composition {
    position: relative;
    max-width: 1300px;
    margin: 0 auto;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 0;
    padding: 0 2rem 2rem 2rem;
}

/* --- Story Marquee Section --- */
.story-marquee-section {
    width: 100%;
    padding: 0.5rem 0 1rem;
    margin-top: 0 !important;
    overflow: hidden;
    background: transparent;
}

.story-marquee-title {
    text-align: center;
    font-family: var(--font-body);
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
    text-transform: lowercase;
    font-style: italic;
}

.story-marquee-container {
    display: flex;
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 1rem 0;
    user-select: none;
    /* Transparency mask removed as requested */
}

.story-marquee-track {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 30px;
    padding-right: 30px;
    white-space: nowrap;
    animation: storyScroll 45s linear infinite;
    min-width: 100%;
}

.story-marquee-track img {
    height: 250px;
    /* Consistent height for sketches and books */
    width: auto;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.story-marquee-track img:hover {
    transform: scale(1.05);
}

@keyframes storyScroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-100%);
    }
}

/* Marquee Title Styles */
.story-marquee-title {
    text-align: center;
    font-family: var(--font-body);
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
    text-transform: lowercase;
    font-style: italic;
}

/* --- Story Communities Section --- */
.story-communities-section {
    padding: 6rem 1.6rem 2rem;
    text-align: center;
    width: 100%;
}

.communities-title {
    margin-bottom: 4rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* Communities Section Base */
.story-communities-section {
    padding: 6rem 1.6rem 2rem;
    text-align: center;
    width: 100%;
}

.communities-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
    /* Enable wrapping for mobile */
    max-width: 1200px;
    margin: 0 auto;
}

.communities-grid img {
    height: 70px;
    /* Consistent logo height */
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    /* Prevent shrinking to stay in one line */
}

.communities-grid img:hover {
    transform: scale(1.1);
}

.logo-dc {
    height: 180px !important;
}

.logo-toastmasters {
    height: 130px !important;
    /* Reduced from 180px as requested */
}



.logo-arena {
    height: 50px !important;
    /* Logo 2: Reduced more as requested */
}

.logo-naadhi {
    height: 100px !important;
    /* Logo 5: Balanced weight */
}

@media (max-width: 768px) {

    /* --- Layout & Background --- */
    .story-inner-content {
        padding: 4rem 2rem 2rem !important;
        /* Increased side padding for mobile */
    }

    .story-section {
        display: flex !important;
        flex-direction: column !important;
        gap: 2.5rem !important;
        /* Balanced vertical gap for mobile */
        margin-bottom: 3rem !important;
        text-align: center !important;
        padding: 0;
    }

    /* Force Text FIRST, Visuals SECOND for ALL Story sections */
    .story-text {
        order: 1 !important;
        width: 100% !important;
        padding: 0 0.5rem !important;
    }

    .story-visuals {
        order: 2 !important;
        width: 100% !important;
    }

    /* --- Unified Heading Responsiveness --- */
    .story-text h2,
    .communities-title,
    .tools-title,
    .awards-continuation h2 {
        width: 100% !important;
        text-align: center !important;
        font-size: 1.6rem !important;
        /* Standardized and safe for mobile */
        margin-bottom: 1rem !important;
        color: var(--heading-color) !important;
        line-height: 1.2 !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }

    .story-text p {
        font-size: 1rem !important;
        /* Reduced for mobile readability */
        line-height: 1.5 !important;
        margin-bottom: 1rem !important;
    }

    .who-am-i {
        flex-direction: column !important;
    }

    /* --- Awards Section (Fanned Flex-Look) --- */
    .awards-continuation {
        margin-bottom: 0.5rem !important;
    }

    .awards-composition {
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        align-items: flex-end !important;
        padding: 1.5rem 0 !important;
        gap: 0 !important;
        width: 100% !important;
    }

    .awards-composition .award-item {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
    }

    .awards-composition .award-main {
        width: 46vw !important;
        z-index: 5 !important;
        transform: rotate(-4deg) !important;
    }

    .awards-composition .award-cert-white {
        width: 44vw !important;
        margin-left: -15vw !important;
        z-index: 10 !important;
        transform: rotate(2deg) translateY(-2vw) !important;
    }

    .awards-composition .award-cert-black {
        width: 44vw !important;
        margin-left: -15vw !important;
        z-index: 8 !important;
        transform: rotate(8deg) translateY(1vw) !important;
    }

    /* --- Responsive Buttons --- */
    .story-actions {
        gap: 0.8rem !important;
        margin-top: 1.2rem !important;
        flex-wrap: nowrap !important;
        justify-content: center !important;
    }

    .connect-btn {
        padding: 10px 20px !important;
        font-size: 0.95rem !important;
        margin-top: 0.5rem !important;
        width: auto !important;
        min-width: 120px !important;
        text-align: center !important;
        border-radius: 6px !important;
    }


    /* --- Story Marquee Responsiveness --- */
    .story-marquee-section {
        padding: 1rem 0 !important;
    }

    .story-marquee-title {
        font-size: 0.9rem !important;
        margin-bottom: 1rem !important;
    }

    .story-marquee-track {
        gap: 15px !important;
        padding-right: 15px !important;
    }

    .story-marquee-track img {
        height: 120px !important;
        border-radius: 8px !important;
    }

    /* --- Communities Section Responsiveness --- */
    .story-communities-section {
        padding: 3rem 1.6rem 2rem !important;
    }

    .communities-grid {
        gap: 1.5rem !important;
        padding: 0 1rem !important;
    }

    .communities-grid img {
        height: 40px !important;
    }

    .logo-dc {
        height: 90px !important;
    }

    .logo-toastmasters {
        height: 70px !important;
    }

    .logo-arena {
        height: 30px !important;
    }

    .logo-naadhi {
        height: 55px !important;
    }
}
