/* === Root Variables & Global Styles === */
:root {
    --bg-color: #0A0A10;
    --primary-text: #EAECEF;
    --secondary-text: #A0AEC0;
    --accent-gradient: linear-gradient(90deg, #4c44da, #4c44da);
    --card-bg: #111119;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-primary: 'Manrope', sans-serif;
    --header-height: 70px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    background-color: var(--bg-color);
    color: var(--primary-text);
    font-family: var(--font-primary);
    line-height: 1.6;
    overflow-x: hidden;
    font-weight: 400;
}
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; position: relative; z-index: 2; }
section { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 6rem 0; position: relative; overflow: hidden; }

/* === Advanced Background Effects === */
#cursor-light {
    position: fixed;
    top: 0;
    left: 0;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.15) 0%, rgba(79, 70, 229, 0) 60%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    transition: transform 0.1s ease-out;
    transform: translate(-50%, -50%);
}
.bg-grid-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 0);
    background-size: 30px 30px;
    opacity: 0.3;
    z-index: 0;
}
main { position: relative; z-index: 1; }

/* === Header with Navigation === */
.header { position: fixed; top: 0; left: 0; width: 100%; height: var(--header-height); display: flex; align-items: center; z-index: 1000; background: rgba(10, 10, 16, 0.5); backdrop-filter: blur(10px); border-bottom: 1px solid var(--glass-border); transition: background-color 0.3s ease; }
.navbar { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.logo { font-size: 1.5rem; text-decoration: none; color: var(--primary-text); font-weight: 700; }
.nav-links { display: flex; gap: 2rem; }
.nav-links a { text-decoration: none; color: var(--secondary-text); font-weight: 500; transition: color 0.3s ease; position: relative; padding-bottom: 5px; }
.nav-links a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--accent-gradient); transition: width 0.3s ease-out; }
.nav-links a:hover { color: var(--primary-text); }
.nav-links a:hover::after { width: 100%; }
.hamburger { display: none; cursor: pointer; }
.hamburger .bar { display: block; width: 25px; height: 3px; margin: 5px auto; transition: all 0.3s ease-in-out; background-color: var(--primary-text); }

/* === Shared & Hero Styles === */
.content-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }

#hero .content-text {
    position: relative;
    z-index: 2;
}
#hero .content-text::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.4) 0%, rgba(79, 70, 229, 0) 70%);
    filter: blur(90px);
    z-index: -1;
}

.content-text h1, .content-text h2 { font-size: 3.5rem; font-weight: 800; line-height: 1.2; margin-bottom: 1.5rem; }
.content-text h2 { font-size: 2.8rem; }
.content-text h1 .highlight { background: linear-gradient(90deg,rgba(76, 68, 218, 1) 0%, rgba(112, 106, 217, 1) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; display: inline-block; }
.content-text p { color: var(--secondary-text); font-size: 1.1rem; max-width: 450px; margin-bottom: 2.5rem; }
.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }
.image-wrapper { position: relative; text-align: center; display: flex; align-items: center; justify-content: center; }
.main-image { max-width: 100%; height: auto; max-height: 70vh; filter: drop-shadow(0 20px 30px rgba(0,0,0,0.4)); }

.feature-box { position: absolute; padding: 0.8rem 1.2rem; background: var(--glass-bg); border: 1px solid var(--glass-border); backdrop-filter: blur(10px); border-radius: 8px; display: flex; align-items: center; gap: 0.8rem; animation: float 4s ease-in-out infinite; }
.feature-box img { width: 24px; height: 24px; }
@keyframes float { 0% { transform: translateY(0px); } 50% { transform: translateY(-10px); } 100% { transform: translateY(0px); } }
.feature-box-1 { top: 20%; left: 0; }
.feature-box-2 { bottom: 20%; right: 0; animation-delay: 2s; }
.feature-box-about-1 { top: 10%; right: -10%; }
.feature-box-about-2 { bottom: 10%; left: -10%; animation-delay: 2s; }

.btn { padding: 0.8rem 1.8rem; border-radius: 8px; text-decoration: none; font-weight: 500; transition: transform 0.3s ease, box-shadow 0.3s ease; border: 1px solid transparent; cursor: pointer; display: inline-block; position: relative; overflow: hidden; }
.btn-primary { background-color: #4c44da; color: var(--primary-text); }
.btn-glass { background: var(--glass-bg); color: var(--secondary-text); border: 1px solid var(--glass-border); backdrop-filter: blur(10px); }
.btn:hover { transform: translateY(-3px); }
.btn-primary:hover { box-shadow: 0 10px 20px rgba(76, 68, 218, 0.3); }
.btn::before { content: ''; position: absolute; top: 0; left: -75%; width: 50%; height: 100%; background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0) 100%); transform: skewX(-25deg); }
.btn:hover::before { animation: shine 0.75s; }
@keyframes shine { 100% { left: 125%; } }

/* === Generic Section Header === */
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-header h2 { font-size: 2.8rem; font-weight: 700; }
.header-decorator { display: inline-block; width: 60px; height: 4px; background: var(--accent-gradient); border-radius: 2px; margin-bottom: 1rem; }

.title-glow {
    position: relative;
    z-index: 2;
}
.title-glow::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 150%;
    height: 200%;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.35) 0%, rgba(79, 70, 229, 0) 70%);
    filter: blur(45px);
    z-index: -1;
}


/* === Services Section === */
.services-grid {
    display: grid;
    /* By default, it's 2 columns, but we will make it 3 for better use of space */
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 900px; /* Increased max-width for 3 columns */
    margin: 0 auto;
}
.service-card { 
    background: var(--card-bg); 
    border: 1px solid var(--glass-border); 
    padding: 2rem; 
    border-radius: 12px; 
    transition: transform 0.5s ease, box-shadow 0.3s ease; 
    will-change: transform; 
    transform-style: preserve-3d; 
}
.service-card:hover { box-shadow: 0 20px 40px rgba(0,0,0,0.3); transform: translateY(-5px); }
.service-card-icon { font-size: 2.5rem; margin-bottom: 1rem; background: var(--accent-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.service-card h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.service-card p { color: var(--secondary-text); }

/* === Process Section === */
.process-timeline { display: flex; justify-content: space-between; position: relative; }
.process-timeline::before { content: ''; position: absolute; top: 24px; left: 10%; width: 80%; height: 2px; background: linear-gradient(90deg, #4F46E5, transparent); }
.process-step { text-align: center; width: 22%; }
.process-icon { width: 50px; height: 50px; background: var(--card-bg); border: 2px solid var(--glass-border); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 1rem; position: relative; }
.process-icon img { width: 28px; height: 28px; }
.process-step h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.process-step p { color: var(--secondary-text); font-size: 0.9rem; }

/* === Portfolio Section === */
.portfolio-filters { text-align: center; margin-bottom: 2.5rem; }
.filter-btn { background: var(--glass-bg); border: 1px solid var(--glass-border); color: var(--secondary-text); padding: 0.5rem 1rem; margin: 0 0.5rem; border-radius: 8px; transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease; }
.filter-btn:hover { background: rgba(255, 255, 255, 0.1); color: var(--primary-text); }
.filter-btn.active { background-color: #4c44da; color: var(--primary-text); border-color: transparent; }

.portfolio-grid {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding-bottom: 1.5rem; /* Add space for scrollbar */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}
.portfolio-grid::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome, Safari, Opera */
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: var(--card-bg);
    cursor: pointer;
    transition: transform 0.4s ease, opacity 0.4s ease;
    flex-shrink: 0; /* Prevent items from shrinking */
    width: 320px; /* Set a fixed width for items */
}
.portfolio-item img { width: 100%; height: 220px; object-fit: cover; display: block; transition: transform 0.4s ease; }
.portfolio-item:hover img { transform: scale(1.05); }
.portfolio-overlay { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(to top, rgba(10, 10, 16, 0.9), transparent); color: #fff; padding: 2rem 1.5rem 1rem; transform: translateY(100%); transition: transform 0.4s ease; }
.portfolio-item:hover .portfolio-overlay { transform: translateY(0); }
.portfolio-overlay h3 { margin-bottom: 0.5rem; } .portfolio-overlay p { color: var(--secondary-text); }

/* === Testimonials Section === */
.testimonial-slider { position: relative; max-width: 800px; margin: 0 auto; overflow: hidden; }
.slider-track { display: flex; transition: transform 0.5s ease-in-out; }
.testimonial-slide { min-width: 100%; padding: 2rem; text-align: center; }
.testimonial-slide img { width: 80px; height: 80px; border-radius: 50%; margin-bottom: 1rem; border: 2px solid var(--glass-border); }
.testimonial-slide blockquote { font-size: 1.2rem; font-style: italic; color: var(--primary-text); margin-bottom: 1rem; }
.testimonial-slide .author { font-weight: 700; }
.slider-dots { text-align: center; margin-top: 1.5rem; }
.dot { height: 10px; width: 10px; margin: 0 5px; background-color: var(--glass-border); border-radius: 50%; display: inline-block; transition: background-color 0.3s ease; cursor: pointer; border: none; }
.dot.active { background-color: #818CF8; }

/* === About & Contact Sections === */
.skills-list { list-style: none; margin-top: 2rem; }
.skills-list li { color: var(--secondary-text); margin-bottom: 0.5rem; display: flex; align-items: center; }
.skills-list li::before { content: '✓'; color: #818CF8; font-weight: 700; margin-right: 0.8rem; font-size: 1.2rem; }

.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.75rem; color: var(--secondary-text); }
.contact-form input, .contact-form textarea { width: 100%; padding: 0.8rem 1rem; border-radius: 8px; border: 1px solid var(--glass-border); background: var(--glass-bg); color: var(--primary-text); font-family: var(--font-primary); font-size: 1rem; transition: border-color 0.3s ease, box-shadow 0.3s ease; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: #4F46E5; box-shadow: 0 0 15px rgba(79, 70, 229, 0.2); }
.social-links { display: flex; gap: 1.5rem; margin-top: 2rem; }
.social-links a { color: var(--secondary-text); transition: all 0.3s ease; }
.social-links a:hover { color: var(--primary-text); transform: translateY(-3px); }

/* === Footer === */
.footer { text-align: center; padding: 2.5rem 0; color: var(--secondary-text); height: auto; border-top: 1px solid var(--glass-border); margin-top: 4rem; }

/* === Scroll & Stagger Animations === */
.animated-element {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.animated-element.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* === Responsiveness === */
@media(max-width: 900px) {
    .content-text h1, .content-text h2 { font-size: 2.5rem; }
    .section-header h2 { font-size: 2.2rem; }
    .content-text p { font-size: 1rem; }
    
    .content-grid { grid-template-columns: 1fr; text-align: center; }
    .content-text p { margin-left: auto; margin-right: auto; }
    .image-wrapper { grid-row: 1; margin-bottom: 2rem; }
    .feature-box { display: none; }
    .hero-buttons { justify-content: center; }
    
    .nav-links { position: fixed; right: -100%; top: var(--header-height); height: calc(100vh - var(--header-height)); width: 60%; flex-direction: column; background: rgba(10, 10, 16, 0.8); backdrop-filter: blur(15px); justify-content: center; align-items: center; gap: 3rem; transition: right 0.4s ease-in-out; }
    .nav-links.nav-active { right: 0; }
    .hamburger { display: block; z-index: 1001; }
    .hamburger.toggle .bar:nth-child(1) { transform: rotate(-45deg) translate(-5px, 6px); }
    .hamburger.toggle .bar:nth-child(2) { opacity: 0; }
    .hamburger.toggle .bar:nth-child(3) { transform: rotate(45deg) translate(-5px, -6px); }
    
    .process-timeline { flex-direction: column; gap: 2rem; align-items: center; }
    .process-timeline::before { display: none; }
    .process-step { width: 80%; max-width: 300px; }

    /* For tablet, we can switch to 2 columns */
    .services-grid { grid-template-columns: repeat(2, 1fr); }
}

@media(max-width: 768px) {
    /* For mobile, we switch to 1 column */
    .services-grid { grid-template-columns: 1fr; }
    section { padding: 4rem 0; }
    .testimonial-slide { padding: 1rem; }
    .testimonial-slide blockquote { font-size: 1.1rem; }

    .portfolio-grid {
        display: grid;
        grid-template-columns: 1fr;
        overflow-x: visible;
    }
    .portfolio-item {
        width: 100%;
        flex-shrink: 1;
    }
}

@media(max-width: 600px) {
    .portfolio-item { width: 100%; }
    .content-text h1, .content-text h2 { font-size: 2rem; }
    #cursor-light { display: none; }

    .portfolio-filters {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    .filter-btn { margin: 0; }
}

/* === Custom Scrollbar Styles === */
::-webkit-scrollbar {
    width: 12px;
}
::-webkit-scrollbar-track {
    background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
    background-color: #141414;
    border-radius: 20px;
    border: 3px solid var(--bg-color);
}
::-webkit-scrollbar-thumb:hover {
    background-color: #6a63f5;
}
html {
  scrollbar-width: thin;
  scrollbar-color: #141414 var(--bg-color);
}