:root {
    /* Standard base is 16px. 100% = 16px. */
    /* If you want everything slightly smaller, change this to 95% */
    font-size: 100%; 
}

/* =========================================
   1. RESET & BASE STYLES
   ========================================= */
/* =========================================
   1. RESET & BASE STYLES
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--color-bg-black);
    color: var(--color-text-white);
    font-family: var(--font-code);
    overflow-x: hidden; /* Prevent horizontal scrollbars */
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

/* =========================================
   2. NAVBAR
   ========================================= */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    height: var(--header-height);
    background-color: var(--color-glass-bg);
    backdrop-filter: blur(8px); /* The "Frosted Glass" effect */
    border-bottom: 1px solid var(--color-border-dim);
}

.nav-container {
    max-width: 100%;               /* Fluid: no width limit; outer nav has clamp padding */
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo svg {
    width: 58px;
    height: 58px;
    cursor: pointer;
    transition: opacity 0.3s;
}
.logo:hover { opacity: 0.8; }

.nav-links {
    display: flex;
    gap: 32px;
    font-size: 14px;
    letter-spacing: 0.05em;
}

.nav-links a:hover {
    color: #a3a3a3;
}

/* =========================================
   3. HERO SECTION (The Grid)
   ========================================= */
.hero {
    position: relative;
    min-height: 100svh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center; /* RESTORED: Centers the bubbles perfectly */
    align-items: center;
    /* 80px top clears the nav, 100px bottom guarantees bubbles never touch the footer */
    padding: 80px 0 100px 0;
}



/* 1. THE GRID CONTAINER - Pins both grid layers to the background */
.hero-grid-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; 
    pointer-events: none;
    /* The Fade-Out Mask you already have */
    -webkit-mask-image: linear-gradient(to bottom, black 85%, transparent);
    mask-image: linear-gradient(to bottom, black 85%, transparent);
}

/* 2. THE DULL BASE - Your current grey grid */
.grid-base {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'%3E%3Cpath d='M0 0H44 M0 0V44' fill='none' stroke='rgba(128,128,128,0.2)' stroke-width='1'/%3E%3C/svg%3E");
    background-size: 44px 44px;
}

/* 3. THE REACTIVE GLOW - The purple highlight revealed by the mouse */
.grid-glow {
    position: absolute;
    inset: 0;
    /* Bright Purple grid lines */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'%3E%3Cpath d='M0 0H44 M0 0V44' fill='none' stroke='rgba(73, 69, 209, 0.6)' stroke-width='1.5'/%3E%3C/svg%3E");
    background-size: 44px 44px;

    /* THE MAGIC: This layer is only visible in a circle around the mouse vars */
    -webkit-mask-image: radial-gradient(
        var(--glow-radius, 300px) circle at var(--mouse-x, -500px) var(--mouse-y, -500px), 
        black 0%, 
        transparent 100%
    );
    mask-image: radial-gradient(
        var(--glow-radius, 300px) circle at var(--mouse-x, -500px) var(--mouse-y, -500px), 
        black 0%, 
        transparent 100%
    );
}


.next-fold {
    min-height: 100vh;       /* ENSURES SECOND SCREEN IS FULL HEIGHT */
    width: 100%;
    background-color: #000;  /* Pure black void */
    position: relative;
    z-index: 10;             /* Sits above the fixed footer as you scroll */
}

/* Radial Gradient Overlay - Visibility enhancement behind creative */
.hero-gradient-overlay {
    position: absolute;
    top: 45%;               /* CHANGED: Pulled up from 50% */
    left: 0;
    right: 0;
    transform: translateY(-50%);
    width: 100%;
    height: 805px;          /* Matches your current height */
    background: radial-gradient(
        ellipse 100% 238px at center,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 0.2) 100%
    );
    pointer-events: none;
    z-index: 5;             /* Stays behind creative, but in front of grid */
}

/* =========================================
   4. CREATIVE TYPOGRAPHY (Zone B)
   ========================================= */
.creative-container {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centers the bubbles vertically */
    align-items: center;     /* Centers the bubbles horizontally */
    flex: 1; /* MAGIC FIX: Expands to fill the screen, pushing the footer to the bottom */
    gap: 16px; 
    width: 100%;
    /* REMOVED margin-top: -60px hack */
}

/* =========================================
   LANGUAGE BAR – Figma typography (local fonts only)
   ========================================= */
.language-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 72px;
}

/* Spacer between groups */
.lang-spacer {
    width: 8px;
}

/* Figma: 'h' and 'i' wrappers – Glory, 16px */
.lang-char {
    width: 23.412px;
    height: 23.412px;
    border: 1.142px solid #FFF;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Glory', sans-serif;
    font-weight: 400;
    font-size: 16px;
    color: white;
    background: transparent;
}

/* 2. [வணக்கம்] Filled Pill -> More padding on left/right */
.lang-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 24  px;
    padding: 0 16px; /* More left/right space */
    border-radius: 999px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
}

/* Figma: Tamil 'வணக்கம்' wrapper – Hiragino Kaku Gothic Std, 800, 16px */
.lang-pill.filled {
    height: 23.412px;
    padding: 5.42px 4.85px 4px 5.42px;
    justify-content: center;
    background: #363636;
    border-radius: 8.566px 0 0 3.426px;
    color: #e0e0e0;
    width: auto;
    font-family: 'Hiragino Kaku Gothic Std', sans-serif;
    font-weight: 800;
    font-size: 16px;
}

/* Figma: 'oi' wrapper – Josefin Slab, 700, 20px */
.lang-tag {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 23.412px;
    padding: 1.71px 9.42px 4px 4.28px;
    background-color: #363636;
    font-family: 'Josefin Slab', serif;
    font-weight: 700;
    font-size: 20px;
    /* Arrow tip shape */
    clip-path: polygon(
        0% 0%, 
        calc(100% - 8px) 0%, 
        100% 50%, 
        calc(100% - 8px) 100%, 
        0% 100%
    );
}

/* Figma: 'hola' wrapper – Inconsolata, 800, 16px */
.lang-wavy {
    font-family: 'Inconsolata', monospace;
    font-weight: 800;
    font-size: 16px;
    color: #e0e0e0;
    padding: 0 4px;
    position: relative;
    margin: 0;
    display: inline-block;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

/* Ensure the wave stays attached */
.lang-wavy::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -4px; /* Keeps it exactly 4px below the text */
    width: 35.5px;
    height: 4px;
    background: url('data:image/svg+xml;utf8,%3Csvg xmlns="http://www.w3.org/2000/svg" width="35.5" height="4" viewBox="0 0 35.5 4" fill="none"%3E%3Cpath d="M1 2.5C2.5 1 4.5 1 6 2.5C7.5 4 9.5 4 11 2.5C12.5 1 14.5 1 16 2.5C17.5 4 19.5 4 21 2.5C22.5 1 24.5 1 26 2.5C27.5 4 29.5 4 31 2.5C32.5 1 34.5 1 36 2.5" stroke="%23e0e0e0" stroke-width="1.5" stroke-linecap="round"/%3E%3C/svg%3E');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    pointer-events: none;
}

.lang-wavy:hover {
    transform: translateY(-5px); /* BOTH text and underline will now rise */
}

/* 5. Group: (你好) -- (O) */
.lang-group-connect {
    display: flex;
    align-items: center;
}

/* Figma: Chinese '你好' wrapper – Inconsolata, 400, 16px */
.lang-pill.outline {
    border: 1.142px solid white;
    background: transparent;
    color: white;
    height: 23.412px;
    padding: 0 12px;
    border-radius: 999px;
    font-family: 'Inconsolata', monospace;
    font-weight: 400;
    font-size: 16px;
}

.lang-connector-line {
    width: 16px;
    height: 2px;
    background-color: white;
}

.lang-circle-icon {
    width: 24px;
    height: 24px;
    border: 1px solid white; /* Reduced from 2px to match */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.inner-circle {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #d9d9d9; 
}

/* Hover effects (Optional) */
.lang-char:hover, .lang-pill:hover, .lang-tag:hover {
    transform: translateY(-2px);
    transition: transform 0.2s;
    cursor: pointer;
}



/* =========================================
   CREATIVE GROUP CONTAINER - Hero Layout
   ========================================= */

/* The Parent Layout Container */
/* Figma lock: 1280px frame → max inner width 1180px, centered */
.creative-group-container {
    display: relative;
    flex-direction: column;
    gap: 40px;
    position: relative;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    align-items: center;
}

/* TOP ROW: Ensures bubbles sit side-by-side without overlapping */
.hero-bubble-row-top {
    display: flex;
    width: auto;            /* */
    justify-content: center; /* NEW: Ensures bubbles stay grouped in the center */
    align-items: center;    /* Anchors everything to the 93px center line */
    gap: 24px;              /* The specific horizontal gap between Red and Purple */
    position: relative;
    overflow: visible; /* CRITICAL: Allows bubbles to bounce independently outside the row bounds */
    z-index: 10;
}

/* BOTTOM ROW: Meets, Storytelling, and Green Bubble */
.hero-bubble-row-bottom {
    display: flex;
    align-items: center;    /* Keeps everything on a level horizontal axis */
    justify-content: center;
    gap: 32px;
    position: relative;
    overflow: visible; /* CRITICAL: Allows bubbles to bounce independently outside the row bounds */
    margin-top: 15px;       /* Tightens the space between the two rows */
}



/* Update Red Bubble to sit inside the flex row */
.hero-red-bubble {
    width: 236px;
    height: 88px;           /* LOCKED HEIGHT */
    background: url('../assets/images/hero/ic_red-bubble.svg') no-repeat center center;
    background-size: 100% 100%;
    flex-shrink: 0;
}

/* Update Purple Bubble to sit inside the flex row */
.hero-purple-bubble {
    height: 88px;           /* */
    background: url('../assets/images/hero/ic_purple-bubble.svg') no-repeat;
    background-size: 100% 100%; /* Now works perfectly with preserveAspectRatio="none" */
    display: flex;
    align-items: center;    /* */
    box-sizing: border-box; /* */
    padding: 0 65px 0 35px; /* */
}

/* =========================================
   HERO MAIN TEXT – Figma typography (local fonts, clamp for responsive)
   ========================================= */

/* Figma: Hero main – STRATEGIST (Goblin One, clamp max 40px) */
.strategist-text {
    font-family: 'Goblin One', cursive;
    font-weight: 400;
    font-size: clamp(2rem, 4vw, 40px);
    letter-spacing: 0.02em;
    line-height: 0.2;
    margin-top: -2px;
    color: #FFFFFF;
    white-space: nowrap;
}

/* Blue Arrow - Connecting STRATEGIST to Green Bubble */
.hero-blue-arrow-container {
    position: absolute;
    z-index: 100;
    pointer-events: none;
    
    background: url('../assets/images/hero/ic_hero-arrow.svg') no-repeat center center;
    background-size: contain;
    
    width: 150px;           /* */
    height: 100px;          /* */
    
    /* 1. MOVE TOP & RIGHT: Adjusting these to snap the tail to the purple tip */
    top: 22px;              /* DECREASED from 45px to move it TOP */
    left: 59%;              /* */
    margin-left: 214px;     /* INCREASED from 205px to move it RIGHT */
    
    /* 2. THE AIM: Using top-left as the hinge to pivot toward the text */
    transform-origin: top left; /* */
    transform: rotate(-6deg);   /* Slight increase to point it better at the gap */
}



/* Blue MEETS Bubble - Bottom Left */
 .hero-blue-bubble {
    position: relative;
    height: 88px;           /* UNIFIED HEIGHT */
    display: flex;
    align-items: center;
    background: url('../assets/images/hero/ic_blue-bubble.svg') no-repeat;
    background-size: 100% 100%;
    /* ASYMMETRICAL PADDING: Pulls the left side in significantly */
    padding: 0 45px 0 32px;
    box-sizing: border-box;
}

/* Hide the IMG/SVG tag inside */
.hero-blue-bubble img, .hero-blue-bubble svg {
    display: none;
}

/* Figma: Hero main – MEETS (Goblin One, clamp max 40px) */
.meets-text {
    font-family: 'Goblin One', cursive;
    font-weight: 400;
    font-size: clamp(2rem, 4vw, 40px);
    color: white;
    text-transform: uppercase;
    line-height: 1;
    margin-top: -6px;
}

/* Ensure the Green Bubble also respects the 88px track height */
.hero-green-bubble img {
    height: 88px;           /* EXACT match for the top row and blue bubble */
    width: auto;
    display: block;
}

/* Figma: Hero main – STORYTELLING (Zeyada, clamp max 96px); stroke thickens 400 to match design */
.hero-storytelling {
    font-family: 'Zeyada', cursive;
    font-weight: 400;
    font-size: clamp(4rem, 8vw, 96px);
    color: #FFFFFF;
    margin: 0;
    line-height: 0.8;
    clip-path: inset(-35% 0% -35% 0); /* Forces the 'reveal' mask to be wide open */
    transform: translateY(20px);
}

/* Green Bubble - Bottom Right - closer to STORYTELLING */
.hero-green-bubble {
    position: relative;
    width: 80px;
    height: 80px;
}

.hero-green-bubble img {
    width: 100%;
    height: 100%;
    display: block;
    position: absolute;
}

.green-bubble-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Zeyada', cursive;
    font-size: 32px;
    color: white;
    font-weight: 700;
    z-index: 2;
}


/* =========================================
   ------ SIDEBAR ACTIVE: HERO SCALING -----
   ========================================= */

/* 1. Shrink the main creative assembly */
body.sidebar-active .creative-container {
    transform: scale(0.85); /* 15% reduction feels more balanced for the hero */
    transform-origin: center center; 
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 2. Adjust the Language Bar so it doesn't feel too wide */
body.sidebar-active .language-bar {
    transform: scale(0.9);
    margin-bottom: 40px !important; /* Tightens vertical space */
    transition: transform 0.6s ease;
}






/* =========================================
   HERO FOOTER - Bottom of fold
   ========================================= */

/* Figma: Hero footer – "[scroll to explore]", "available for work" – Geist Mono, 400, 16px */
.hero-footer {
    position: fixed; /* RESTORED: Pins to the screen to allow scroll fading */
    font-family: 'Geist Mono', sans serif;
    font-weight: 400;
    font-size: clamp(8px, 1.5vw, 16px);
    color: #999999;
    bottom: clamp(24px, 4vw, 40px);
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center; 
    align-items: center;
    z-index: 2; /* Sits below the next-fold curtain */
    pointer-events: none; /* Prevents blocking clicks when opacity is 0 */
    
    /* RESTORED: The scroll-driven blur animation 
    animation: fadeOutScroll both;
    animation-timeline: scroll(nearest);
    animation-range: entry 0% cover 20%;*/
}

    /* Add this at the very bottom of your hero.css file 
@keyframes fadeOutScroll {
    0% { 
        opacity: 1; 
        filter: blur(0px); /* Optional: adds a high-end feel 
    }
    50% { 
        opacity: 1; 
        filter: blur(30px); /* Optional: adds a high-end feel 
    }
    100% { 
        opacity: 0; 
        filter: blur(60px); /* Makes the edges feel softer as they vanish 
    }
}*/

.next-fold {
    /* ... existing height code ... */
    z-index: 10;             /* HIGHER than the footer to 'cover' it while scrolling */
    padding-top: 100px;      /* Gives your 'My Projects' text room to breathe */
}

/* 1. PINNED LEFT ELEMENT (50px Margin) */
.hero-footer-left {
    position: absolute;     /* Pulls it out of the flex center-flow */
    left: 50px;             /* PINNED 50PX FROM LEFT EDGE */
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: auto;   /* Makes the text/dot interactive */
}

/* 2. CENTERED ELEMENT */
.hero-footer-right {
    position: relative; 
    left: auto;
    transform: none;        /* Removes any accidental centering offsets */
    text-align: center;
    pointer-events: auto;
}

/* 3. NEON STATUS DOT */
/* hero.css - Target the green dot */
.status-dot {
    width: 8px; 
    height: 8px;
    background-color: #00FF00; /* Your green color */
    border-radius: 50%;
    display: inline-block;
    
    /* ADD THIS LINE: */
    animation: statusPulse 2s infinite ease-in-out;
    box-shadow: 0 0 8px rgba(0, 255, 0, 0.6); /* Optional: Adds a slight glow */
}

/* THE PULSE ANIMATION */
@keyframes statusPulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* =========================================
   5. RESPONSIVE (Scaling & Mobile)
   ========================================= */

/* Add this new block first around Line 457 */
@media (max-width: 768px) {

    .language-bar {
    /* Increase this value until the gap feels right to your eye */
    margin-bottom: 120px !important; 
    
    /* Ensure it stays centered on narrow screens */
    display: flex !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
   
}

    /* 1. GLOBAL LAYOUT RESET */
    .creative-group-container {
        transform: none !important; 
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important; /* Spacing between rows */
        width: 100% !important;
        bottom: 40px !important;
    }

    /* 2. ROW 1 & 2: Red Bubble (Right) & Strategist (Center) */
    .hero-bubble-row-top {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important; /* Allows children to use align-self */
        width: 100% !important;
        row-gap: 12px !important;
        gap: 16px !important;
    }

    .hero-red-bubble {
        width: 100% !important;
        max-width: 240px !important; /* Locked width to prevent edge-touching */
        height: 52px !important;     /* Taller height to restore the "rounded" look */
        margin: 0 20px !important;    /* Centers it in the column */
        background-size: 100% 100% !important;
    }

    .hero-purple-bubble {
        width: auto !important;
        max-width: 300px !important; /* Sufficient width for the long word */
        height: 52px !important;     /* Match red bubble height for consistent rounding */
        padding: 0 45px 0 25px !important; /* Asymmetrical padding to protect the "tail" */
        margin: 0 20px !important; 
        display: flex !important;
        transform: translateX(20px);
        justify-content: center !important;
        align-items: center !important;
    }

    /* Specific Font Control for 'STRATEGIST' */
    .strategist-text {
    font-size: 24px !important;  /* Explicitly override the desktop clamp */
    letter-spacing: 0.05em !important;
}

/* Specific Font Control for 'MEETS' */
    .meets-text {
    font-size: 24px !important;  /* Explicitly override the desktop clamp */
}

    /* 3. ROW 3 & 4: Meets (Full Row) & Storytelling+Green (Row) */
    .hero-bubble-row-bottom {
        display: flex !important;
        margin-top: 0 !important; /* <--- ADD THIS LINE TO KILL THE 15px GHOST */
        flex-direction: row !important; /* Row context for wrapping */
        flex-wrap: wrap !important; /* THE KEY: Allows line breaks */
        justify-content: center !important;
        align-items: center !important;
        row-gap: 16px !important; /* Space between Meets and Storytelling */
        column-gap: 16px !important; /* Space between Storytelling and Green Bubble */
    }

    .hero-blue-bubble {
        flex-basis: 100% !important; /* FORCES IT TO BE ON ITS OWN ROW (Row 3) */
        display: flex !important;
        justify-content: center !important;
        transform: translateX(-20px);
        width: 100% !important;
        max-width: 200px !important;
        height: 52px !important; 
        margin: 0 auto !important;
        padding: 8px 35px 0 20px !important;
        align-items: center !important; /* CRITICAL: Centers 'MEETS' vertically inside bubble */
    }

    .hero-storytelling {
        font-size: 42px !important; /* Adjusted for mobile width */
        width: auto !important;
        transform: none !important;
        margin: 0 !important;
    }

    .hero-green-bubble {
        width: 50px !important;
        height: 50px !important;
        position: relative !important;
    }

    /* 1. THE FOOTER CONTAINER: The Anchor */
    .hero-footer {
        position: absolute !important; /* Switch from 'fixed' to 'absolute' to sit at hero bottom */
        bottom: 32px !important;       /* This pins the "[scroll to explore]" to the screen bottom */
        left: 0 !important;
        width: 100% !important;
        
        display: flex !important;
        flex-direction: column !important; /* Stack them vertically */
        align-items: center !important;
        
        /* The gap creates the distance between the Status Chip and the Scroll Text */
        gap: 60px !important; 
        
        opacity: 1 !important;
        filter: none !important;
        animation: none !important; /* Disable scroll-fade for mobile legibility */
        z-index: 20;
    }

    /* 2. AVAILABLE FOR WORK: The Status Chip */
    .hero-footer-left {
        position: relative !important;
        left: auto !important; /* Reset desktop 'left: 50px' */
        top: 72px !important;
        
        background: rgba(0, 0, 0, 0.5); /* Subtle dark glass look */
        border: 1px solid rgba(255, 255, 255, 0.1);
        padding: 10px 20px !important;
        border-radius: 100px !important;
        
        font-size: 14px !important; /* Increased for mobile legibility */
        color: #FFFFFF !important;
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
    }

    /* 3. SCROLL TO EXPLORE: The Screen Edge Hint */
    .hero-footer-right {
        position: relative !important;
        font-size: 14px !important; /* Sleek but readable monospaced font */
        text-transform: uppercase;
        letter-spacing: 0.15em;
        color: rgba(255, 255, 255, 0.6) !important;
        top: 80px !important; /* Pull it up slightly to sit just above the screen edge */
    }

    /* Scaling the Green Dot inside the chip */
    .status-dot {
        width: 10px !important;
        height: 10px !important;
    }


    .hero-blue-arrow-container {
        display: none !important; /* Removed for a cleaner mobile stack */
    }
}