/* --- Global Setup & Variables --- */
:root {
    --bg-color: #101010;
    --box-color: #181818;
    --text-color: #e0e0e0;
    --heading-color: #ffffff;
    --accent-color: #4a41d4;
    --secondary-bg: #252525;
    --border-color: #2a2a2a;
    --font-family: 'Poppins', sans-serif;
}

body.light-theme {
    --bg-color: #f0f2f5;
    --box-color: #ffffff;
    --text-color: #4f4f4f;
    --heading-color: #1a1a1a;
    --accent-color: #5d53f3;
    --secondary-bg: #e9e9e9;
    --border-color: #e0e0e0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    color: var(--text-color);
    line-height: 1.6;
    padding: 20px;
    transition: background-color 0.3s, color 0.3s;
    animation: fadeIn 0.5s ease-in-out;

    /* --- NEW --- Subtle Radial Gradient Background --- */
    background-color: var(--bg-color); /* Fallback */
    background-image: radial-gradient(ellipse 80% 60% at 50% 0%, #1f1e24, var(--bg-color));
    background-attachment: fixed; /* Ensures gradient doesn't scroll with content */
    background-size: 100% 100%;
}

body.light-theme {
    /* --- NEW --- Light theme version of the gradient --- */
    background-image: radial-gradient(ellipse 80% 60% at 50% 0%, #ffffff, var(--bg-color));
}


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

h1,h2,h3,h4,strong {
    color: var(--heading-color);
    font-weight: 600;
}

a {
    color: var(--accent-color);
    text-decoration: none;
}

main {
    max-width: 1400px;
    margin: 0 auto;
}

/* --- Header & Navigation --- */
.main-header {
    position: sticky;
    top: 20px;
    z-index: 100;
    max-width: 1200px; /* Adjusted for a sleeker look */
    margin: 0 auto 40px;
    border-radius: 99px; /* Pill shape */
    background: rgba(24, 24, 24, 0.6); /* Slightly more transparent */
    backdrop-filter: blur(10px) saturate(180%);
    -webkit-backdrop-filter: blur(10px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

body.light-theme .main-header {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px; /* Reduced padding */
}

.logo {
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--heading-color);
    padding: 0 15px; /* Add some padding */
}

.nav-links {
    display: flex;
    gap: 5px;
    list-style: none;
    background: rgba(37, 37, 37, 0.5);
    padding: 6px;
    border-radius: 99px;
    margin: 0 auto; /* Center the nav links */
}

body.light-theme .nav-links {
    background: rgba(227, 227, 227, 0.5);
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-color);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 99px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    background: var(--secondary-bg);
    color: var(--heading-color);
}

.nav-links a.active {
    background: var(--accent-color);
    color: #fff;
    box-shadow: 0 2px 10px rgba(74, 65, 212, 0.4);
}

/* Remove the old underline effect */
.nav-links a::after {
    display: none;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px; /* Reduced gap */
}

.btn-primary {
    font-weight: 600;
    font-size: 1.08rem;
    padding: 12px 28px;
    border-radius: 12px;
    background-color: #4a41d4;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(74, 65, 212, 0.2);
    outline: none;
    display: inline-block;
    letter-spacing: 0.01em;
    margin-left: 8px;
    text-decoration: none;
    position: relative;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(74, 65, 212, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(74, 65, 212, 0.2);
    transition: all 0.1s ease;
}

/* --- End Navbar Modern Glassy Theme --- */
/* Resume Button Styling */
.resume-btn {
    font-size: 1.3rem;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    width: 44px;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.resume-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(74,65,212,0.12);
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform: translate(-50%, -50%);
}

.resume-btn:hover::before {
    width: 100%;
    height: 100%;
}

.resume-btn:hover {
    color: var(--accent-color);
    transform: rotate(5deg) scale(1.1);
}

.theme-btn {
    font-size: 1.3rem;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    margin-right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    width: 44px;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.theme-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(74,65,212,0.12);
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform: translate(-50%, -50%);
}

.theme-btn:hover::before {
    width: 100%;
    height: 100%;
}

.theme-btn:hover {
    color: var(--accent-color);
    transform: rotate(15deg) scale(1.1);
}

/* NEW: Text Reveal Animation */
.text-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.text-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* NEW: Bento Box Entrance Animation */
.bento-box {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.bento-box.active {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10000000 !important; /* Extremely high z-index to ensure it's always clickable */
    position: relative;
}

.mobile-menu-toggle:hover {
    color: var(--accent-color);
}

.mobile-menu-overlay,
.mobile-menu-panel {
    display: none;
}

/* REMOVED: These global styles were causing the mobile menu to cover the entire page */
/* .mobile-menu-panel {
    background: #181818 !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 12000;
    border-radius: 0;
    box-shadow: none;
}

.mobile-menu-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #181818 !important;
    opacity: 1 !important;
    z-index: 11999;
} */

@media (max-width: 768px) {
    body { 
        padding: 12px; 
    }
    
    /* Navigation */
    nav { 
        padding: 8px 15px; 
        position: relative;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    .logo { 
        font-size: 1.3rem; 
        z-index: 1001;
    }
    
    /* Hide nav-links and nav-actions on mobile - they'll be in the slide menu */
    .nav-links, .nav-actions {
        display: none !important;
    }
    
    /* Mobile Menu Toggle Button */
    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 40px;
        height: 40px;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 10000000 !important; /* Extremely high z-index to ensure it's always clickable */
        position: relative;
    }
    
    .mobile-menu-toggle span {
        display: block;
        width: 25px;
        height: 3px;
        background-color: var(--text-color);
        margin: 3px 0;
        transition: all 0.3s ease;
        border-radius: 2px;
    }
    
    /* Hamburger animation */
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    /* Mobile Menu Overlay */
    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(5px);
        z-index: 9999998 !important; /* Very high z-index but lower than panel */
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        display: block;
    }
    
    .mobile-menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    /* Mobile Menu Panel */
    .mobile-menu-panel {
        position: fixed;
        top: 0;
        left: -300px;
        width: 280px;
        height: 100%;
        background-color: #181818 !important;
        border-right: 1px solid var(--border-color);
        z-index: 9999999 !important;
        transition: left 0.3s cubic-bezier(.4,0,.2,1);
        display: flex;
        flex-direction: column;
        padding: 80px 30px 30px 30px;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
        overflow-y: auto;
        overflow-x: hidden;
        background: #181818 !important;
        background-image: linear-gradient(to bottom, #181818, #181818) !important;
        transform: none !important;
    }
    
    .mobile-menu-panel.active {
        left: 0 !important;
        z-index: 2147483647 !important;
        position: fixed !important;
        top: 0 !important;
        width: 100vw !important;
        max-width: 320px !important;
        min-width: 220px !important;
        height: 100vh !important;
        min-height: 100vh !important;
        max-height: 100vh !important;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3) !important;
        transition: left 0.3s cubic-bezier(.4,0,.2,1);
    }
    
    /* Webkit scrollbar styling for mobile menu */
    .mobile-menu-panel::-webkit-scrollbar {
        width: 4px;
    }
    
    .mobile-menu-panel::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .mobile-menu-panel::-webkit-scrollbar-thumb {
        background-color: var(--accent-color);
        border-radius: 2px;
    }
    
    .mobile-menu-panel::-webkit-scrollbar-thumb:hover {
        background-color: #5d4fff;
    }
    
    /* Ensure background covers entire panel including padding areas */
    .mobile-menu-panel::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: #181818 !important;
        background-image: none !important;
        background: #181818 !important;
        z-index: -1;
    }
    
    /* When mobile menu is active, ensure body content doesn't interfere */
    body.mobile-menu-active {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
    
    /* Mobile Menu Content */
    .mobile-menu-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 30px;
        background-color: #181818 !important; /* Ensure content area also has solid background */
        background-image: none !important; /* Remove any background images */
        background: #181818 !important;
        position: relative;
        z-index: 1;
        min-height: 0; /* Allow content to shrink */
        justify-content: flex-start; /* Start content from top */
        align-items: stretch; /* Stretch items to full width */
    }
    
    /* Light theme mobile menu */
    body.light-theme .mobile-menu-panel,
    body.light-theme .mobile-menu-panel::before,
    body.light-theme .mobile-menu-content,
    body.light-theme .mobile-nav-links,
    body.light-theme .mobile-nav-links li,
    body.light-theme .mobile-nav-links a,
    body.light-theme .mobile-nav-actions {
        background-color: #ffffff !important; /* Solid white background for light theme */
        background-image: none !important; /* Remove any background images */
        backdrop-filter: none !important; /* Remove any backdrop filters */
        -webkit-backdrop-filter: none !important; /* Remove webkit backdrop filters */
        background: #ffffff !important;
        background-image: linear-gradient(to bottom, #ffffff, #ffffff) !important;
    }
    
    /* Mobile Nav Links */
    .mobile-nav-links {
        list-style: none;
        margin: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        gap: 15px;
        background-color: #181818 !important; /* Ensure solid background */
        position: relative;
        z-index: 2;
        flex-shrink: 0; /* Prevent shrinking */
    }
    
    .mobile-nav-links li {
        opacity: 0;
        transform: translateX(-20px);
        transition: all 0.3s ease;
        background-color: #181818 !important; /* Ensure each list item has solid background */
        position: relative;
        z-index: 2;
    }
    
    .mobile-menu-panel.active .mobile-nav-links li {
        opacity: 1;
        transform: translateX(0);
    }
    
    .mobile-nav-links li:nth-child(1) { transition-delay: 0.1s; }
    .mobile-nav-links li:nth-child(2) { transition-delay: 0.15s; }
    .mobile-nav-links li:nth-child(3) { transition-delay: 0.2s; }
    .mobile-nav-links li:nth-child(4) { transition-delay: 0.25s; }
    .mobile-nav-links li:nth-child(5) { transition-delay: 0.3s; }
    
    .mobile-nav-links a {
        display: block;
        padding: 15px 0;
        color: var(--text-color);
        text-decoration: none;
        font-size: 1.2rem;
        font-weight: 500;
        border-bottom: 1px solid var(--border-color);
        transition: all 0.3s ease;
        background-color: #181818 !important; /* Ensure links have solid background */
        position: relative;
        z-index: 2;
    }
    
    .mobile-nav-links a:hover,
    .mobile-nav-links a.active {
        color: var(--accent-color);
        padding-left: 10px;
    }
    
    /* Mobile Actions */
    .mobile-nav-actions {
        display: flex;
        flex-direction: column;
        gap: 15px;
        opacity: 0;
        transform: translateX(-20px);
        transition: all 0.3s ease;
        transition-delay: 0.4s;
        background-color: #181818 !important; /* Ensure actions area has solid background */
        position: relative;
        z-index: 2;
        margin-top: auto; /* Push to bottom of available space */
        padding-bottom: 20px; /* Add bottom padding for scroll safety */
    }
    
    .mobile-menu-panel.active .mobile-nav-actions {
        opacity: 1;
        transform: translateX(0);
    }
    
    .mobile-theme-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 15px;
        background-color: var(--secondary-bg);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        color: var(--text-color);
        font-size: 1.1rem;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .mobile-theme-btn:hover {
        background-color: var(--accent-color);
        color: white;
    }
    
    .mobile-resume-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 15px;
        background-color: var(--secondary-bg);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        color: var(--text-color);
        font-size: 1.1rem;
        text-decoration: none;
        transition: all 0.3s ease;
    }
    
    .mobile-resume-btn:hover {
        background-color: var(--accent-color);
        color: white;
    }
    
    .mobile-lets-talk-btn {
        display: block;
        width: 100%;
        padding: 15px;
        background-color: #4a41d4;
        color: white;
        text-decoration: none;
        text-align: center;
        border-radius: 12px;
        font-weight: 600;
        font-size: 1.1rem;
        transition: all 0.3s ease;
        box-shadow: 0 4px 15px rgba(74, 65, 212, 0.2);
    }

    .mobile-lets-talk-btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 7px 20px rgba(74, 65, 212, 0.4);
    }

    .mobile-menu-panel,
    .mobile-menu-overlay {
        display: none;
    }
    .mobile-menu-panel.active,
    .mobile-menu-overlay.active {
        display: flex !important;
    }
    .mobile-menu-panel.active {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        z-index: 2147483647 !important;
        flex-direction: column;
        box-shadow: none !important;
    }
    .mobile-menu-overlay.active {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        z-index: 2147483646 !important;
    }
    .main-header,
    nav,
    body,
    html {
        overflow: visible !important;
        position: static !important;
        z-index: auto !important;
    }
    .main-header {
        position: fixed !important;
        top: 0;
        left: 0;
        width: 100vw;
        z-index: 2147483647 !important;
        margin: 0;
        max-width: 100vw;
    }
    body { padding-top: 70px !important; }
}

/* --- Bento Grid Layout & Alignment --- */
.bento-container, .bento-container-inner {
    display: flex;
    gap: 20px;
    align-items: stretch; /* Crucial for equal height columns */
}

.bento-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

.bento-box {
    background-color: var(--box-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative;
    overflow: hidden;
    z-index: auto !important;
}

/* NEW: Spotlight pseudo-element */
.bento-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    
    /* Use the border-radius of the parent */
    border-radius: inherit;

    /* 
     The spotlight effect.
     - A radial-gradient is centered on the mouse position (via CSS variables).
     - It's a circle shape that starts with the accent color and fades to transparent.
     - The `calc(var(--mouse-x) ...)` part is a trick to position the gradient
       relative to the element itself, not the viewport.
    */
    background: radial-gradient(
        350px circle at calc(var(--mouse-x, 0px) - var(--x, 0px)) calc(var(--mouse-y, 0px) - var(--y, 0px)), 
        var(--accent-color),
        transparent 80%
    );

    opacity: 0; /* Initially hidden */
    transition: opacity 0.4s; /* Smooth fade in/out */

    /* Ensure it's behind the card's content */
    z-index: -1;
    
    /* Ensure the effect is visible */
    pointer-events: none;
}



/* When hovering a specific box, make its own spotlight brighter */
.bento-box:hover::before {
    opacity: 0.15; /* Make it a little brighter on direct hover */
}

.box-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px;}
.see-all { color: var(--text-color); }


/* --- HOMEPAGE SPECIFIC STYLES --- */

/* Profile Box */
.profile-box {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 25px;
}

.profile-content-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.profile-actions-container {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.profile-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 0;
    justify-content: flex-start;
    flex-wrap: wrap;
    background: transparent !important; /* Force removal of background */
    border-radius: 12px;
    box-shadow: none;
}

.profile-buttons .btn-secondary {
    min-width: 140px;
    font-size: 1rem;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(74, 65, 212, 0.04);
}

.social-links {
    margin-top: 8px;
    gap: 18px;
    justify-content: flex-start;
}

.profile-text {
    margin-bottom: 20px; /* Space between text and actions */
}

.profile-text h2 {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.2;
}

.profile-text p {
    line-height: 1.6;
}

.wave { 
    display: inline-block; 
    animation: wave-animation 2.5s infinite; 
    transform-origin: 70% 70%; 
}

@keyframes wave-animation { 
    0%{transform:rotate(0deg)} 
    10%{transform:rotate(14deg)} 
    20%{transform:rotate(-8deg)} 
    30%{transform:rotate(14deg)} 
    40%{transform:rotate(-4deg)} 
    50%{transform:rotate(10deg)} 
    60%{transform:rotate(0deg)} 
    100%{transform:rotate(0deg)} 
}

.profile-text {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.profile-text h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--heading-color);
    margin: 0;
    line-height: 1.2;
}

.profile-text p {
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
}

/* Profile content styles */
.profile-box .profile-content { 
    display: flex; 
    gap: 20px; 
    align-items: center; 
}

/* New container for buttons and socials */
.profile-actions-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%; /* Make it take full width of the parent */
}

.profile-pic { 
    width: 100px; 
    height: 100px; 
}

.profile-buttons { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 12px; 
    margin: 0;
}

.btn-secondary { 
    background-color: var(--secondary-bg); 
    color: var(--heading-color); 
    padding: 12px 20px; 
    border-radius: 12px; 
    font-weight: 500; 
    font-size: 0.95rem;
    display: flex; 
    align-items: center; 
    gap: 8px; 
    cursor: pointer; 
    border: 1px solid var(--border-color); 
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    min-height: 44px;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    transition: left 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-secondary:hover::before {
    left: 100%;
}

.btn-secondary:hover { 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.25);
}

.btn-secondary:active {
    transform: translateY(0) scale(0.98);
    transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-links { 
    display: flex; 
    gap: 15px; 
    margin: 0;
    font-size: 1.4rem; 
}

.social-links a { 
    color: var(--text-color); 
    transition: all .3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background-color: var(--secondary-bg);
    border: 1px solid var(--border-color);
}

.social-links a:hover { 
    color: var(--accent-color); 
    transform: translateY(-3px);
    background-color: var(--box-color);
    box-shadow: 0 4px 12px rgba(74, 65, 212, 0.2);
}

/* --- NEW: Story Profile Picture Styles --- */
.profile-pic-wrapper {
    position: relative;
    cursor: pointer;
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}
.profile-pic-wrapper .profile-pic {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: none;
    padding: 6px; /* Space for the stroke inside */
    background: var(--bg-color);
}
.profile-pic-stroke {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    fill: transparent;
    filter: drop-shadow(0 0 5px rgba(74, 65, 212, 0.5)); /* Adds a glow */
    animation: spin-stroke 1.6s cubic-bezier(0.7, 0, 0.3, 1) forwards;
}
.profile-pic-stroke circle {
    stroke-width: 4px;
    stroke-linecap: round;
}
.profile-pic-stroke .stroke-bg {
    stroke: var(--border-color);
    opacity: 0.5;
}
.profile-pic-stroke .stroke-fg {
    stroke: url(#story-gradient);
    stroke-dasharray: 302; /* circumference: 2 * pi * 48 */
    stroke-dashoffset: 302;
    /* This animation handles the drawing/filling of the stroke */
    animation: fill-stroke 1.6s cubic-bezier(0.7, 0, 0.3, 1) forwards;
}
.profile-pic-wrapper.has-story .profile-pic-stroke {
    /* When a story is present, override the loading animation with a continuous spin */
    animation: rotate-gradient 4s linear infinite;
    filter: drop-shadow(0 0 8px rgba(229, 46, 113, 0.6)); /* A brighter, more pinkish glow */
}
@keyframes spin-stroke {
  from {
    transform: rotate(-90deg);
  }
  to {
    transform: rotate(270deg);
  }
}

/* Keyframe for filling the stroke's dash array */
@keyframes fill-stroke {
  to {
    stroke-dashoffset: 0;
  }
}
/* Active story animation */
.profile-pic-wrapper.has-story .stroke-fg {
    animation: none; /* Turn off the initial fill animation */
    stroke-dashoffset: 0; /* Ensure the stroke is fully visible */
}
/* The gradient for the stroke */
body:before {
    content: '';
    position: absolute;
    width: 0; height: 0;
    overflow: hidden;
}
svg defs { position: absolute; width: 0; height: 0; }

@keyframes stroke-load {
    to { stroke-dashoffset: 0; }
}
@keyframes rotate-gradient {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Callout "View Story" */
.story-callout {
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--accent-color);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    display: none; /* Hidden by default */
    align-items: center;
    gap: 4px;
    z-index: 6;
    white-space: nowrap;
    opacity: 0;
    animation: fade-in-callout 0.5s 1.6s forwards; /* Fades in after main animation */
}

@keyframes fade-in-callout {
    to { opacity: 1; }
}

.profile-pic-wrapper.has-story .story-callout {
    display: inline-flex;
}

/* --- Modal Styles --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: none; /* Initially hidden */
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

#marketing-modal-content {
    text-align: center;
}

.btn-link {
    background: none;
    border: none;
    color: var(--text-color);
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 15px;
}

.modal-overlay.open {
    display: flex; /* Make it visible */
}

.modal-content {
    background-color: var(--box-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px 35px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 450px;
    text-align: center;
    opacity: 0; /* Initially transparent for animation */
}

/* Applying animation when the overlay is opened */
.modal-overlay.open .modal-content {
    opacity: 1;
    animation: open-modal-animation 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Applying closing animation */
.modal-overlay.closing .modal-content {
    opacity: 0;
    animation: close-modal-animation 0.5s cubic-bezier(0.7, 0, 0.84, 0) forwards;
}

.modal-content h3 {
    margin-bottom: 10px;
    font-size: 1.6rem;
}
.modal-content p {
    margin-bottom: 25px;
    color: var(--text-color);
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}
.modal-actions .btn-secondary {
    flex-grow: 1;
}

.modal-close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2.2rem;
    color: var(--text-color);
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s, transform 0.2s;
}

.modal-close-btn:hover {
    color: var(--heading-color);
    transform: rotate(90deg);
}

/* --- "Genie Effect" Keyframe Animations --- */

/* Animation starts from a point and expands in a circular fashion */
@keyframes open-modal-animation {
    from {
        transform: scale(0);
        clip-path: circle(0% at var(--start-x) var(--start-y));
    }
    to {
        transform: scale(1);
        clip-path: circle(125% at var(--start-x) var(--start-y));
    }
}

/* Reverse animation to suck back into the origin point */
@keyframes close-modal-animation {
    from {
        transform: scale(1);
        clip-path: circle(125% at var(--start-x) var(--start-y));
    }
    to {
        transform: scale(0);
        clip-path: circle(0% at var(--start-x) var(--start-y));
    }
}

/* Homepage - FINAL Expert Area */
.expert-area {
    justify-content: flex-start; /* Aligns content to the top */
    flex-grow: 1; 
}
.expert-area::before {
    content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 10% 20%, hsla(244, 56%, 52%, 0.1), transparent 50%);
    z-index: 0; opacity: 0.7; transition: opacity .3s;
}
.expert-area:hover::before { opacity: 1; }
.expert-area > * { z-index: 1; position: relative; }
.expert-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 20px; /* CORRECTED: Sets a consistent space from the title */
}
.expert-item {
    background: var(--secondary-bg);
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all .2s;
    aspect-ratio: 1/1; /* Makes items square-ish */
}
.expert-item:hover { transform: translateY(-3px); background-color: var(--accent-color); }
.expert-item i { font-size: 2.2rem; }
.expert-item span { font-weight: 500; font-size: 0.9rem; }


/* Homepage - FINAL Work Experience with SCROLL */
.work-experience-box {
    flex-shrink: 0; /* PREVENTS THE BOX FROM STRETCHING/GROWING */
    justify-content: flex-start;
}
.experience-scroller {
    height: 260px; /* FIXED HEIGHT TO MAINTAIN LAYOUT */
    overflow: hidden;
    position: relative;
    margin-top: 15px;
}
.experience-scroller:hover .experience-list { animation-play-state: paused; }
.experience-list {
    list-style: none;
    padding-left: 0;
    animation: scroll-vertical 25s linear infinite;
}
@keyframes scroll-vertical {
    from { transform: translateY(0); }
    to { transform: translateY(-50%); } /* Animates exactly half the list */
}
.experience-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px; /* Spacing between items */
}
.exp-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}
.exp-details {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}
.exp-details strong { font-size: 1rem; }
.exp-details small { font-size: 0.85rem; color: var(--text-color); }


/* Homepage - Other Cards (UPGRADED STYLES) */

/* === Services I Offer Card === */
.services-box { 
    flex-shrink: 0; 
    border-color: transparent; /* Clean start for hover effect */
    transition: border-color 0.3s ease-in-out;
}
.services-box:hover {
    border-color: var(--border-color); /* Reveal border on hover */
}
.services-container { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 15px; 
    margin-top: 20px; 
}
.service-card { 
    background-color: var(--secondary-bg); 
    text-align: center; 
    border-radius: 12px; 
    padding: 20px;
    border: 1px solid var(--secondary-bg); /* Use same color for seamless look */
    transition: transform 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}
.service-card:hover {
    transform: translateY(-5px);
    background-color: var(--box-color);
    border-color: var(--border-color);
}
.service-icon { 
    font-size: 2.5rem; 
    color: var(--accent-color); 
    margin-bottom: 10px; 
    line-height: 1; /* Ensures icon is vertically centered well */
}
.service-card h4 {
    font-size: 1rem;
    font-weight: 500;
}


/* === Recent Projects Card === */
.projects-box { flex-shrink: 0; }
.projects-container { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 15px; 
    margin-top: 20px; 
}
.project-card, .portfolio-item { 
    position: relative; 
    border-radius: 16px; /* Slightly larger radius */
    overflow: hidden; 
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Add this somewhere in your CSS file */
.project-card.fade-out {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}
.project-card:hover {
    transform: scale(1.03); /* Lift and enlarge effect */
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}
.project-card { aspect-ratio: 5 / 4; }
.project-card img, .portfolio-item img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 0.4s ease; 
}
.project-card .project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95), transparent);
    padding: 20px; /* More padding */
    color: white;
}
.project-card .project-overlay span {
    font-size: 0.8rem;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 4px 10px;
    border-radius: 20px;
}
.project-card .project-overlay h4 {
    margin-top: 8px;
    color: #fff;
    font-size: 1.1rem; /* Slightly larger title */
    font-weight: 600;
    line-height: 1.3;
}


/* === Let's Work Together (CTA) Card === */
.cta-box {
    background: var(--accent-color);
    background: linear-gradient(135deg, #1f1c5d, var(--accent-color));
    justify-content: center;
    text-align: center;
    flex-grow: 1;
    transition: transform 0.3s ease;
}
.cta-box:hover {
    transform: scale(1.02); /* Subtle grow on hover */
}
.cta-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: absolute;
    top: 25px;
    left: 25px;
    right: 25px;
}
.cta-header p {
    font-size: 0.85rem;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 4px 12px;
}
.cta-content { 
    margin: auto;
    color: #ffffff;
}
.cta-content h2 {
    font-size: clamp(1.8rem, 5vw, 2.5rem); /* Responsive font size */
    font-weight: 700;
    line-height: 1.2;
    color: #ffffff;
}
.cta-content .wave {
    font-size: clamp(2rem, 5vw, 2.8rem); /* Match h2 size */
}
.cta-content .cta-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.85);
    font-size: 1.1rem;
    font-weight: 500;
    margin-top: 15px;
    transition: color 0.3s, gap 0.3s;
}
.cta-content .cta-link:hover {
    color: #ffffff;
    gap: 12px; /* Makes the arrow move */
}
.online-indicator {
    width: 12px;
    height: 12px;
    background-color: #00ff6a;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.5);
    box-shadow: 0 0 12px #00ff6a;
}

/* --- INNER PAGE STYLES --- */
.page-section { max-width: 1400px; }
.section-title { font-size: 2.8rem; font-weight: 700; text-align: center; margin-bottom: 10px; }
.section-subtitle { font-size: 1.1rem; text-align: center; color: var(--text-color); max-width: 600px; margin: 0 auto 50px auto; }
.section-title.secondary { font-size: 2rem; margin-top: 60px; margin-bottom: 40px; text-align: center;}
.timeline { position: relative; max-width: 800px; margin: 40px auto; padding: 20px 0; }
.timeline::after { content: ''; position: absolute; width: 3px; background-color: var(--secondary-bg); top: 0; bottom: 0; left: 50%; margin-left: -1.5px; border-radius: 3px; }
.timeline-item { padding: 10px 40px; position: relative; width: 50%; }
.timeline-item:nth-child(odd) { left: 0; } .timeline-item:nth-child(even) { left: 50%; }
.timeline-dot { position: absolute; width: 16px; height: 16px; background-color: var(--bg-color); border: 3px solid var(--accent-color); border-radius: 50%; top: 32px; z-index: 1; }
.timeline-item:nth-child(odd) .timeline-dot { right: -8px; } .timeline-item:nth-child(even) .timeline-dot { left: -8px; }
.timeline-date { position: absolute; top: 28px; font-size: 1.2rem; font-weight: 600; color: var(--accent-color); }
.timeline-item:nth-child(even) .timeline-date { left: auto; right: 65px; text-align: right; }
.timeline-item:nth-child(odd) .timeline-date { left: 65px; right: auto; text-align: left; }
.timeline-content.bento-box { transition: all .3s; }
.timeline-content.bento-box:hover { transform: translateY(-5px); box-shadow: 0 5px 20px rgba(0,0,0,0.3); border-color: var(--accent-color); }
.skill-chart-container, .radar-chart-container { position: relative; height: 350px; }
.services-grid, .why-choose-me-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.service-detail-card, .value-prop-item { align-items: center; text-align: center; transition: all .3s; }
.service-detail-card:hover, .value-prop-item:hover { transform: translateY(-5px); background-color: #202020; border-color: var(--accent-color);}
body.light-theme .service-detail-card:hover, body.light-theme .value-prop-item:hover { background-color: #f8f9fa; }
.service-icon.lg { font-size: 3.5rem; margin-bottom: 15px; color: var(--accent-color); }

/* Process Steps */
.process-steps { display: flex; justify-content: space-between; align-items: stretch; gap: 20px; }
.step { text-align: center; border: 1px solid var(--border-color); border-radius: 20px; padding: 25px; flex: 1; transition: all .3s ease; display: flex; flex-direction: column; align-items: center; }
.step:hover { transform: translateY(-8px); border-color: var(--accent-color); background: var(--box-color);}
.step-icon { color: var(--accent-color); font-size: 3rem; margin-bottom: 15px; line-height: 1; }
.step-content span { display: block; font-size: 1rem; font-weight: bold; color: var(--accent-color); opacity: 0.6;}
.step-content h3 { font-size: 1.2rem; }
.step-arrow { display: flex; align-items: center; font-size: 2rem; color: var(--secondary-bg); }

/* Tools */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 20px; text-align: center; }
.tool-item { background: var(--secondary-bg); padding: 20px; border-radius: 12px; transition: all .2s; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;}
.tool-item:hover { background: var(--accent-color); color: #fff; transform: translateY(-5px); }
.tool-item i { font-size: 3rem; }
.tool-item span {font-size: 0.9rem;}


.faq-accordion { max-width: 900px; margin: 0 auto; }
.faq-item { margin-bottom: 10px; background-color: var(--box-color); border-radius: 12px; border: 1px solid var(--border-color); overflow: hidden; }
.faq-question { width: 100%; background: none; border: none; color: var(--heading-color); text-align: left; padding: 20px 25px; font-size: 1.1rem; font-family: var(--font-family); cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.faq-question i { transition: transform 0.3s; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s ease-out; }
.faq-answer p { padding: 0 25px 20px; border-top: 1px solid var(--border-color); padding-top: 20px; }
.faq-item.active .faq-question i { transform: rotate(180deg); }


/* --- About Page Specifics --- */
.about-me-box p { margin-bottom: 1em; }
.about-me-box p:last-child { margin-bottom: 0; }
.interests-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 15px;
    height: 100%;
}
.interest-item {
    background: var(--secondary-bg);
    padding: 15px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    transition: all .2s;
}
.interest-item:hover {
    transform: translateY(-3px);
    background-color: var(--accent-color);
    color: white;
}
.interest-item i { font-size: 2rem; }
.interest-item span { font-weight: 500; font-size: 0.9rem; color: var(--heading-color); transition: color .2s; }
.interest-item:hover span { color: white; }

/* --- Works Page Specifics --- */
.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.skeleton-card {
    background-color: var(--box-color);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 4/3;
    border: 1px solid var(--border-color);
}

.skeleton-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 150%;
    height: 100%;
    background: linear-gradient(to right, transparent 0%, rgba(255, 255, 255, 0.08) 50%, transparent 100%);
    animation: shimmer 1.5s infinite;
}

body.light-theme .skeleton-card::before {
     background: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.05) 50%, transparent 100%);
}

@keyframes shimmer {
    from {
        left: -150%;
    }
    to {
        left: 150%;
    }
}

.portfolio-item, .project-card {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.5s ease-in-out forwards;
}

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

.featured-projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 20px; }
.featured-project-card { padding: 0; flex-direction: row; align-items: stretch; gap: 0; min-height: 300px; /* Added min-height */}
.featured-project-image { flex: 1; min-width: 40%;}
.featured-project-image img { width: 100%; height: 100%; object-fit: cover; }
.featured-project-content { flex: 1; padding: 30px; display: flex; flex-direction: column; }
.featured-project-content h3 { font-size: 1.5rem; }
.featured-project-content p { flex-grow: 1; margin: 15px 0;}
.project-tags { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.project-tags span, .item-tags span { background: var(--secondary-bg); padding: 4px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 500; }

@media (max-width: 1024px) {
    .featured-project-card {
        flex-direction: column;
    }
    .featured-project-image, .featured-project-content {
        width: 100%;
    }
}

.project-filter { display: flex; justify-content: center; gap: 15px; margin-bottom: 40px; flex-wrap: wrap; }
.filter-btn { background-color: var(--secondary-bg); color: var(--text-color); border: 1px solid var(--border-color); padding: 8px 18px; border-radius: 20px; cursor: pointer; transition: all 0.3s; font-weight: 500; }
.filter-btn:hover, .filter-btn.active { background-color: var(--accent-color); color: white; border-color: var(--accent-color); }
.full-portfolio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.portfolio-item { aspect-ratio: 4/3; position: relative; border-radius: 12px; overflow: hidden; cursor: pointer; transition: transform .3s ease; }
.portfolio-item:hover { transform: translateY(-5px); }
.portfolio-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s, filter .4s; }
.portfolio-item:hover img { transform: scale(1.1); filter: blur(4px); }
.item-overlay { opacity: 0; position: absolute; inset: 0; background: linear-gradient(to top, rgba(16,16,16,0.9), rgba(16,16,16,0.4) 70%, transparent); transition: opacity 0.4s; }
.portfolio-item:hover .item-overlay { opacity: 1; }
.overlay-content { position: absolute; bottom: 20px; left: 20px; right: 20px; transform: translateY(20px); transition: transform 0.4s ease; }
.portfolio-item:hover .overlay-content { transform: translateY(0); }
.overlay-content h4 { color: #fff; font-size: 1.2rem; }
.overlay-content span { color: #ccc; font-size: 0.9rem; }
.item-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; opacity: 0; transition: opacity .4s .2s ease;}
.portfolio-item:hover .item-tags { opacity: 1; }
.page-cta { margin-top: 60px; text-align: center; background: linear-gradient(135deg, #1f1c5d, var(--accent-color)); }
.page-cta h2 { font-size: 2rem; color: #fff; }
.page-cta p { font-size: 1.1rem; color: rgba(255,255,255,0.8); margin: 10px 0 20px; }

/* --- Contact Page Specifics --- */
.contact-form-box h3 { margin-bottom: 10px; }
.contact-form { gap: 20px; display: flex; flex-direction: column; }
.form-group-split { display: flex; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.contact-form label { font-weight: 500; font-size: 0.9rem; color: var(--text-color); }
.contact-form input, .contact-form textarea { width: 100%; background-color: var(--secondary-bg); border: 1px solid var(--border-color); color: var(--text-color); padding: 12px; border-radius: 8px; font-size: 1rem; transition: border-color .3s, box-shadow .3s; }
.contact-form input::placeholder, .contact-form textarea::placeholder { color: #888; }
body.light-theme .contact-form input::placeholder, body.light-theme .contact-form textarea::placeholder { color: #999; }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--accent-color); box-shadow: 0 0 0 3px rgba(74, 65, 212, 0.3); outline: none;}
.form-btn { align-self: flex-start; }

/* --- FIXED STYLES for contact info box --- */
.contact-info-box .box-header { margin-bottom: 20px; } /* Ensures consistent spacing from title */
.contact-info-list { list-style: none; }
.contact-info-list li { margin-bottom: 20px; display: flex; align-items: center; }
.contact-info-list li:last-child { margin-bottom: 0; } /* Remove bottom margin from last item */
.contact-info-list li i { color: var(--accent-color); font-size: 1.4rem; margin-right: 15px; }
.availability-info { display: flex; align-items: center; gap: 15px; background-color: var(--secondary-bg); padding: 15px; border-radius: 12px; margin-top: 25px; /* Added more top margin for separation */ }
.availability-info i { color: var(--accent-color); font-size: 1.6rem; }
.availability-info div { display: flex; flex-direction: column; line-height: 1.3; }
.availability-info strong { font-size: 1rem; }
.availability-info span { font-size: 0.9rem; color: var(--text-color); }
.social-connect-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 40px auto 0 auto;
  text-align: center;
  max-width: 1000px;
  width: auto;
}
.social-connect-box h3,
.social-connect-box p {
  text-align: center;
  width: 100%;
}
.social-connect-box .social-links {
  justify-content: center;
  width: 100%;
  margin-top: 18px;
}
.social-connect-box p { margin: 10px 0 20px; }
.social-links.large { font-size: 2rem; gap: 25px; }
.map-container { padding: 0; overflow: hidden; flex-grow: 1; border-radius: 12px; min-height: 200px; }
.map-container iframe { filter: invert(100%) grayscale(80%); opacity: 0.7; transition: opacity 0.3s; border: none; width: 100%; height: 100%;}
body.light-theme .map-container iframe { filter: none; }
.map-container:hover iframe { opacity: 1; }

/* --- Footer --- */
footer { text-align: center; padding-top: 40px; margin-top: 80px; font-size: 0.9rem; border-top: 1px solid var(--border-color); }

/* --- Responsive Design --- */
@media (max-width: 1200px) {
    .bento-container, .bento-container-inner { 
        gap: 15px; 
    }
    .bento-box { 
        padding: 20px; 
    }
    .section-title { 
        font-size: 2.5rem; 
    }
    .featured-projects-grid { 
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); 
    }
}

@media (max-width: 1024px) {
    .bento-container, .bento-container-inner { 
        flex-direction: column; 
        align-items: stretch; 
        gap: 15px;
    }
    .process-steps { 
        flex-direction: column; 
        gap: 15px;
    }
    .step-arrow { 
        transform: rotate(90deg); 
        margin: 10px 0; 
    }
    .featured-project-card { 
        flex-direction: column; 
    }
    .featured-project-image { 
        min-height: 200px; 
    }
    .section-title { 
        font-size: 2.3rem; 
    }
    .services-container { 
        grid-template-columns: 1fr; 
        gap: 12px; 
    }
    .projects-container { 
        grid-template-columns: 1fr; 
        gap: 12px; 
    }
    .expert-grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 12px; 
    }
    .profile-box {
        align-items: center; /* Revert to center for pic */
        gap: 15px;
        padding-left: 0;
        padding-right: 0;
    }
    .profile-content-main {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    .profile-text {
        padding: 0 20px;
    }
    .profile-content { 
        flex-direction: column; 
        text-align: center; 
        gap: 15px; 
    }
    .profile-pic { 
        width: 100px; 
        height: 100px; 
    }
    .profile-buttons { 
        justify-content: center; 
        flex-wrap: nowrap;
        gap: 8px;
        padding: 0 8px;
    }
    .profile-buttons .btn-secondary {
        flex: 1;
        min-width: 0;
        font-size: 0.85rem;
        padding: 10px 12px;
    }
    .social-links { 
        justify-content: space-between;
        width: 100%;
        gap: 0;
        padding: 0 8px;
    }
    .social-links a {
        flex: 1;
        max-width: none;
    }
}

/* --- NEW: Story Viewer Modal --- */
.story-viewer-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: none; /* Toggled by JS */
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.story-viewer-overlay.open {
    display: block;
    opacity: 1;
}
.story-viewer-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 95vw;
    height: 95vh;
    max-width: 450px;
    max-height: 800px;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.story-viewer-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 2.5rem;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
}
.story-progress-bars {
    display: flex;
    gap: 4px;
    padding: 10px;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 5;
}
.progress-bar {
    flex: 1;
    height: 3px;
    background-color: rgba(255, 255, 255, 0.4);
    border-radius: 3px;
    overflow: hidden;
}
.progress-bar .progress {
    height: 100%;
    width: 0%;
    background-color: white;
    
}
.progress-bar.active .progress {
    width: 100%;
}

.story-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: white;
    background-color: #181818; /* Fallback */
}
.story-content img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.story-text-content {
    padding: 40px;
    font-size: 1.8rem;
    line-height: 1.4;
    font-weight: 600;
    text-align: center;
}
.story-nav {
    position: absolute;
    top: 0;
    width: 30%;
    height: 100%;
    z-index: 6;
    cursor: pointer;
}
.story-nav.prev { left: 0; }
.story-nav.next { right: 0; }

.desktop-only { display: inline-block; }
.mobile-only { display: none; }
@media (max-width: 768px) {
  .desktop-only { display: none !important; }
  .mobile-only { display: block !important; width: 100%; }
}

/* === End Profile Box Mobile Fix === */

/* Helper class to fix mobile profile buttons */
.profile-buttons-container-mobile-fix {
    width: 100%;
    padding: 0 8px;
    box-sizing: border-box;
}

@media (min-width: 1025px) {
    .profile-buttons-container-mobile-fix {
        width: auto;
        padding: 0;
    }
}

@media (max-width: 600px) {
    .timeline {
        max-width: 100%;
        margin: 30px 0 0 0;
        padding: 0 0 0 18px;
    }
    .timeline::after {
        left: 12px;
        margin-left: 0;
    }
    .timeline-item {
        width: 100%;
        left: 0 !important;
        padding: 18px 0 18px 38px;
        margin-bottom: 18px;
        min-width: 0;
    }
    .timeline-dot {
        left: -18px !important;
        right: auto !important;
        top: 28px;
        margin-left: 0;
    }
    .timeline-date {
        left: -2px !important;
        right: auto !important;
        top: 18px;
        font-size: 1rem;
        margin-bottom: 6px;
        position: relative;
    }
    .timeline-content.bento-box {
        margin-top: 8px;
        border-radius: 14px;
        box-shadow: 0 2px 8px rgba(74,65,212,0.07);
        padding: 18px 14px;
        text-align: left;
    }
    .profile-box {
        flex-direction: column;
        align-items: center;
        gap: 0;
        padding: 24px 10px 18px 10px;
        box-shadow: 0 2px 12px rgba(74, 65, 212, 0.07);
        border-radius: 18px;
        background: var(--box-color);
    }
    .profile-pic-wrapper {
        margin-bottom: 16px;
        width: 120px;
        height: 120px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .profile-content-main {
        width: 100%;
        align-items: center;
        text-align: center;
        padding: 0;
        gap: 0;
    }
    .profile-text {
        padding: 0;
        margin-bottom: 14px;
        align-items: center;
        text-align: center;
    }
    .profile-actions-container {
        border-top: none;
        margin-top: 0;
        padding-top: 0;
        gap: 14px;
        width: 100%;
        align-items: center;
    }
    .profile-buttons {
        flex-direction: row;
        gap: 10px;
        justify-content: center;
        align-items: stretch;
        width: 100%;
        background: none;
        box-shadow: none;
        padding: 0;
    }
    .profile-buttons .btn-secondary {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        flex: 1 1 0;
        width: auto;
        min-width: 0;
        font-size: 1.05rem;
        padding: 14px 0;
        border-radius: 10px;
        box-shadow: 0 1px 6px rgba(74, 65, 212, 0.07);
        text-align: center;
    }
    .social-links {
        margin-top: 10px;
        gap: 14px;
        justify-content: center;
        width: 100%;
    }
    .social-links a {
        width: 44px;
        height: 44px;
        font-size: 1.3rem;
        border-radius: 10px;
    }
    .expert-area {
        display: none !important;
    }
    .cta-box {
        min-height: 210px;
        padding-top: 60px;
        padding-bottom: 32px;
        position: relative;
    }
    .cta-header {
        top: 18px;
        left: 12px;
        right: 12px;
    }
}

@media (max-width: 900px) {
  .social-connect-box {
    max-width: 800px;
  }
}

@media (max-width: 600px) {
  .social-connect-box {
    max-width: 98vw;
  }
}

/* --- Works Page Modal: Fixed Size & Responsive --- */
#project-modal-overlay .modal-content {
  max-width: 700px;
  width: 95vw;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  box-sizing: border-box;
}

#project-modal-overlay .project-modal-slider {
  width: 100%;
  height: 400px;
  max-height: 60vh;
  background: var(--secondary-bg, #181818);
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

#project-modal-overlay #modal-image-gallery {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
}

#project-modal-overlay .modal-image-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#project-modal-overlay .modal-image-container img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0;
  margin: auto;
  box-shadow: none;
  background: transparent;
}

#project-modal-overlay #modal-video-embed {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: transparent;
}

#project-modal-overlay .slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.4);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
#project-modal-overlay .slider-nav.prev { left: 10px; }
#project-modal-overlay .slider-nav.next { right: 10px; }
#project-modal-overlay .slider-nav:disabled { opacity: 0.4; cursor: not-allowed; }
#project-modal-overlay .slider-nav:hover:not(:disabled) { background: rgba(0,0,0,0.7); }

#project-modal-overlay .project-modal-details {
  padding: 30px 35px 25px 35px;
  background: var(--box-color);
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  text-align: left;
}

@media (max-width: 700px) {
  #project-modal-overlay .modal-content {
    max-width: 98vw;
    width: 98vw;
    padding: 0;
  }
  #project-modal-overlay .project-modal-slider {
    height: 220px;
    max-height: 40vh;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
  }
  #project-modal-overlay .project-modal-details {
    padding: 18px 12px 18px 12px;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
  }
  #project-modal-overlay .slider-nav {
    width: 32px;
    height: 32px;
    font-size: 1.1rem;
  }
}

/* --- Category Label --- */
.category-label {
    position: absolute;
    top: 12px;
    right: 12px; /* Moved to the right */
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    z-index: 2;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
