/* ==========================================================================
   CSS Variables & Theme Setup (Dark Premium Minimal)
   ========================================================================== */
:root {
    --bg-main: #0a0a0f;
    --bg-surface: #111118;
    --bg-card: rgba(17, 17, 24, 0.6);
    
    --accent-primary: #00ff88;
    --accent-secondary: #6c5ce7;
    
    --text-primary: #f0f0f0;
    --text-secondary: #8888aa;
    
    --border-color: rgba(255, 255, 255, 0.1);
    --border-hover: rgba(0, 255, 136, 0.3);
    
    --glow-primary: rgba(0, 255, 136, 0.15);
    
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Figtree', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --font-bengali: 'Noto Sans Bengali', sans-serif;
    
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    /* Modern Grid & Glow Background Effect */
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(0, 255, 136, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(108, 92, 231, 0.08), transparent 25%),
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
    background-position: center center;
    background-attachment: fixed;
}

body::selection {
    background-color: var(--accent-primary);
    color: #000;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-normal);
}

ul {
    list-style: none;
}

button {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

/* ==========================================================================
   Typography Classes
   ========================================================================== */
.text-mono { font-family: var(--font-mono); }
.text-bengali { font-family: var(--font-bengali); }
.text-accent { color: var(--accent-primary); }
.text-secondary { color: var(--text-secondary); }

/* ==========================================================================
   Layout & Utilities
   ========================================================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

.section {
    padding: 110px 0;
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }

.mt-8 { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }

.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }

/* ==========================================================================
   Components: Glassmorphism Cards
   ========================================================================== */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    transition: var(--transition-normal);
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover);
    box-shadow: 0 10px 30px -10px var(--glow-primary);
}

/* ==========================================================================
   Components: Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: var(--transition-normal);
}

.btn-primary {
    background-color: var(--accent-primary);
    color: #000;
    box-shadow: 0 0 15px var(--glow-primary);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: var(--transition-slow);
    z-index: -1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px var(--glow-primary);
}

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

/* Secondary color button (পার্পল রঙের সলিড বাটন - ওয়েবসাইট শোকেস সেকশনে ব্যবহার করা হয়েছে) */
.btn-secondary {
    background-color: var(--accent-secondary);
    color: #fff;
    box-shadow: 0 0 15px rgba(108, 92, 231, 0.3);
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: var(--transition-slow);
    z-index: -1;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(108, 92, 231, 0.5);
}

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

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--accent-primary);
}

.btn-outline:hover {
    background: rgba(0, 255, 136, 0.1);
    transform: translateY(-2px);
}

/* Secondary outline button (পার্পল বর্ডার বাটন - ওয়েবসাইট শোকেস সেকশনে ব্যবহার করা হয়েছে) */
.btn-outline-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--accent-secondary);
}

.btn-outline-secondary:hover {
    background: rgba(108, 92, 231, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(108, 92, 231, 0.2);
}

/* Pink accent button (গোলাপী রঙের সলিড বাটন - সোশ্যাল মিডিয়া সেকশনে ব্যবহার করা হয়েছে) */
.btn-pink {
    background-color: #ff6b9d;
    color: #fff;
    box-shadow: 0 0 15px rgba(255, 107, 157, 0.3);
}

.btn-pink::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: var(--transition-slow);
    z-index: -1;
}

.btn-pink:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(255, 107, 157, 0.5);
}

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

/* Pink outline button (গোলাপী বর্ডার বাটন - সোশ্যাল মিডিয়া সেকশনে ব্যবহার করা হয়েছে) */
.btn-outline-pink {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid #ff6b9d;
}

.btn-outline-pink:hover {
    background: rgba(255, 107, 157, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(255, 107, 157, 0.2);
}


/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: var(--transition-normal);
}

.header.scrolled {
    padding: 1rem 0;
    background: rgba(10, 10, 15, 0.95);
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.logo {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.8rem;
    letter-spacing: -1px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-accent {
    color: var(--accent-primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-primary);
    transition: var(--transition-normal);
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 5rem;
    align-items: center;
}

.hero-content h1 {
    font-size: clamp(3rem, 5vw, 5.5rem);
    line-height: 1.05;
    margin-bottom: 1.5rem;
    letter-spacing: -2px;
}

.hero-content .subtitle {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 480px;
}

.typewriter-container {
    height: 40px;
    margin-bottom: 2rem;
    font-family: var(--font-mono);
    color: var(--accent-primary);
    font-size: 1.25rem;
}

.typed-cursor {
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Image Container */
.hero-image-wrapper {
    position: relative;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.hero-image-inner {
    position: relative;
    padding-bottom: 110%; /* Aspect ratio */
    border-radius: 20px;
    background: var(--bg-surface);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    transition: transform var(--transition-slow);
}

.hero-image-wrapper:hover .hero-image-inner {
    transform: rotateY(-5deg) rotateX(5deg);
    border-color: var(--accent-primary);
}

/* Decorative background elements */
.hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    z-index: -1;
    pointer-events: none;
}

.blob-1 {
    top: 20%;
    right: 10%;
    width: 300px;
    height: 300px;
    background: var(--accent-secondary);
    /* opacity: 0.2; */
}

.blob-2 {
    bottom: 10%;
    left: 20%;
    width: 400px;
    height: 400px;
    background: var(--accent-primary);
    opacity: 0.1;
}

.hero-img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1.1);
    width: 100%;
    height: 100%;
    object-fit: cover; /* or contain */
    /* Adjust as per your hero-photo.png dimension */
    object-position: center top; 
    filter: contrast(1.1);
    transition: transform 0.5s ease;
}

.hero-image-wrapper:hover .hero-img {
    transform: translate(-50%, -50%) scale(1.05);
}


/* ==========================================================================
   Section Title
   ========================================================================== */
.section-title {
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    margin-bottom: 3.5rem;
    display: inline-block;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--accent-primary);
    border-radius: 2px;
}

/* Secondary Section Title Underline (পার্পল থিমের আন্ডারলাইন - ওয়েবসাইট শোকেস সেকশনে ব্যবহার করা হয়েছে) */
.section-title-secondary::after {
    background: var(--accent-secondary);
}

/* Pink Section Title Underline (গোলাপী থিমের আন্ডারলাইন - সোশ্যাল মিডিয়া সেকশনে ব্যবহার করা হয়েছে) */
.section-title-pink::after {
    background: #ff6b9d;
}



.section-subtitle {
    font-family: var(--font-mono);
    color: var(--accent-primary);
    display: block;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 3px;
}

/* ==========================================================================
   Services Section 
   ========================================================================== */
.services-grid {
    gap: 2rem;
}

.glass-card {
    padding: 2.5rem 2rem;
}

.service-icon {
    font-size: 2.8rem;
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
    display: block;
}

.glass-card h3 {
    margin-bottom: 0.75rem;
    font-size: 1.35rem;
    letter-spacing: -0.5px;
}

.glass-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.75;
}

/* ==========================================================================
   Featured Projects
   ========================================================================== */
.projects-grid {
    gap: 2rem;
}

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

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
    filter: brightness(0.7) grayscale(0.5);
}

.project-card:hover .project-img {
    transform: scale(1.05);
    filter: brightness(1) grayscale(0);
}

.project-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    transform: translateY(20px);
    opacity: 0;
    transition: var(--transition-normal);
}

.project-card:hover .project-info {
    transform: translateY(0);
    opacity: 1;
}

.project-category {
    font-family: var(--font-mono);
    color: var(--accent-primary);
    font-size: 0.8rem;
    display: block;
    margin-bottom: 0.5rem;
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* ==========================================================================
   Stats & CTA
   ========================================================================== */
.stats-container {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 70px 0;
}

.stats-container .container {
    gap: 0;
}

.stat-item {
    text-align: center;
    padding: 2rem;
    border-right: 1px solid var(--border-color);
}

.stat-item:last-child {
    border-right: none;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 4vw, 4rem);
    font-weight: 900;
    color: var(--accent-primary);
    line-height: 1;
    margin-bottom: 0.75rem;
}

.stat-label {
    font-family: var(--font-mono);
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 2px;
}

.cta-section {
    background: #000;
    padding: 100px 0;
    border-top: 1px solid var(--border-color);
}

/* Flex container for the CTA section */
.cta-container {
    gap: 5rem;
    align-items: center;
}

/* Text content aligned left */
.cta-content {
    flex: 1;
    text-align: left;
    max-width: 520px;
}

.cta-content h2 {
    font-size: clamp(2rem, 3.5vw, 3rem);
    margin-bottom: 1.25rem;
    letter-spacing: -1px;
    line-height: 1.15;
}

/* Description text styling */
.cta-desc {
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    font-size: 1.05rem;
    line-height: 1.8;
}

/* Image container and robot styling */
.cta-image {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

/* Add a cool floating animation for the robot */
@keyframes floatBot {
    0% { transform: translateY(0px) scale(1); filter: drop-shadow(0 15px 25px rgba(0,255,136,0.1)); }
    50% { transform: translateY(-15px) scale(1.02); filter: drop-shadow(0 25px 35px rgba(0,255,136,0.3)); }
    100% { transform: translateY(0px) scale(1); filter: drop-shadow(0 15px 25px rgba(0,255,136,0.1)); }
}

.robot-img {
    max-height: 450px;
    width: auto;
    object-fit: contain;
    animation: floatBot 6s ease-in-out infinite;
    /* Adding some glow to match the vibe */
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
    background: var(--bg-surface);
    font-family: var(--font-heading);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer p {
    color: var(--text-secondary);
    max-width: 300px;
    margin-top: 1.5rem;
}

.footer h4 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-links a {
    color: var(--text-secondary);
}

.footer-links a:hover {
    color: var(--accent-primary);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.social-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
}

.social-btn:hover {
    background: var(--accent-primary);
    color: #000;
    border-color: var(--accent-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-family: var(--font-mono);
}

/* ==========================================================================
   Project Iframe Previews
   ========================================================================== */
.iframe-preview {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    background: var(--bg-surface);
}

.iframe-preview iframe {
    width: 400%;
    height: 400%;
    transform: scale(0.25);
    transform-origin: top left;
    border: none;
    pointer-events: none;
    filter: brightness(0.7);
    transition: var(--transition-slow);
}

.project-card:hover .iframe-preview iframe {
    transform: scale(0.26);
    filter: brightness(1);
}

/* ==========================================================================
   Animations
   ========================================================================== */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }

/* ==========================================================================
   Marquee Component
   ========================================================================== */
.marquee-container {
    background-color: #000;
    color: var(--accent-primary);
    overflow: hidden;
    position: relative;
    z-index: 30;
    box-shadow: 0 -10px 20px rgba(0,0,0,0.5);
    border-top: 6px solid var(--accent-primary);
}

.marquee-content {
    display: inline-flex;
    white-space: nowrap;
    animation: marquee 25s linear infinite;
    padding: 0.75rem 0;
    gap: 2rem;
}

.marquee-text {
    font-size: 1.125rem;
    font-family: var(--font-heading);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: default;
    transition: color var(--transition-normal);
}

.marquee-text:hover {
    color: #fff;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .section-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .hero-content .subtitle {
        margin: 0 auto 2rem;
    }
    
    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap; /* Wrap buttons if they are too wide */
    }
    
    .blob-1 { top: 0; }
    .blob-2 { bottom: 0; }
    
    .grid-cols-3,
    .grid-cols-2 {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .cta-container {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    
    .cta-content {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .cta-content h2 {
        text-align: center;
    }
    
    .cta-image {
        justify-content: center;
    }
    
    .robot-img {
        max-height: 300px;
    }
}

/* ==========================================================================
   Spline 3D Loader & Hide Watermark
   ========================================================================== */
.spinner {
    width: 40px; height: 40px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top: 3px solid var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

.spline-watermark,
#spline-watermark,
a[href*="spline.design"],
a[href*="splinetool"] {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
}

@media (max-width: 600px) {
    .nav-links {
        display: none; /* Add a hamburger menu for mobile later */
    }
    .header .btn {
        padding: 0.5rem 1rem !important; /* Smaller button padding on mobile */
        font-size: 0.8rem !important;
    }
    .logo {
        font-size: 1.5rem; /* Slightly smaller logo */
    }
    .hero {
        padding-top: 120px; /* More breathing room from the fixed header */
    }
    .hero-content h1 {
        font-size: 2.2rem;
        margin-top: 1.5rem; /* Push down the heading so it's not tucked under the header */
    }
}
