:root {
    /* Color Palette */
    --color-primary: #1741e8;
    --color-secondary: #612cd3;
    --color-bg-light: #fdfdfd;
    --color-bg-dark: #0f0f12;
    --color-text-light: #e9e7ea;
    --color-text-dark: #1a1a1a;
    --color-glass-border: rgba(255, 255, 255, 0.1);
    --color-glass-bg: rgba(255, 255, 255, 0.05);

    /* Typography */
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Poppins', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

[data-theme="dark"] {
    --color-bg-main: var(--color-bg-dark);
    --color-text-main: var(--color-text-light);
    --color-glass-bg: rgba(0, 0, 0, 0.2);
    --color-glass-border: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] {
    --color-bg-main: var(--color-bg-light);
    --color-text-main: var(--color-text-dark);
    --color-glass-bg: rgba(255, 255, 255, 0.7);
    --color-glass-border: rgba(255, 255, 255, 0.2);
}

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

body {
    font-family: var(--font-main);
    background-color: var(--color-bg-main);
    color: var(--color-text-main);
    transition: background-color var(--transition-normal), color var(--transition-normal);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

/* Utility Classes */
.text-primary {
    color: var(--color-primary);
}

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

.text-center {
    text-align: center;
}

.mb-1 {
    margin-bottom: var(--spacing-sm);
}

.mb-2 {
    margin-bottom: var(--spacing-md);
}

.section-padding {
    padding: var(--spacing-lg) 0;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 500;
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    box-shadow: 0 4px 15px rgba(23, 65, 232, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(23, 65, 232, 0.4);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-text-main);
}

.btn-secondary:hover {
    background: var(--color-primary);
    color: white;
}

/* Scroll Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* Responsive Grid */
.grid-split {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
}

@media (min-width: 768px) {
    .grid-split {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }

    .grid-split {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }
}

/* Services Layout */
.services-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    margin-top: 4rem;
}

.service-card {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    padding: var(--spacing-md);
    overflow: hidden;
    /* For border radius clip if needed */
}

@media (min-width: 900px) {
    .service-card {
        flex-direction: row;
        align-items: center;
        gap: 4rem;
        padding: var(--spacing-lg) !important;
    }

    .service-img-wrapper {
        flex: 1;
        width: 50%;
        /* Explicit width for flex item */
    }

    .service-content {
        flex: 1;
        width: 50%;
        /* Explicit width for flex item */
    }
}

.service-img-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.service-img {
    max-height: 400px;
    /* Increased height for better visibility */
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 20px;
    /* Curved borders as requested */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.service-content ul {
    list-style: none !important;
    /* Reset default list style */
    padding-left: 0 !important;
}

.service-content ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.service-content ul li::before {
    content: '•';
    color: var(--color-primary);
    position: absolute;
    left: 0;
    font-weight: bold;
}

@media (max-width: 768px) {
    .service-card {
        gap: 2rem;
        text-align: center;
    }

    .service-content ul {
        text-align: left;
        display: inline-block;
    }
}

/* 3D Tilt Effects */
.tilt-card {
    transform-style: preserve-3d;
    transform: perspective(1000px);
    transition: transform 0.1s ease-out;
    /* Fast transition for smooth movement */
    position: relative;
    overflow: hidden;
    /* Keep glare inside */
}

.tilt-content {
    transform: translateZ(20px);
    /* Pop content out */
}

.tilt-glare {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(125deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0) 40%);
    pointer-events: none;
    mix-blend-mode: overlay;
    transition: opacity 0.3s ease;
    opacity: 0;
    z-index: 2;
}

.tilt-card:hover .tilt-glare {
    opacity: 1;
}

/* Tech Stack Marquee */
.tech-marquee {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    padding: 4rem 0;
}

.tech-track {
    display: inline-block;
    animation: marquee 40s linear infinite reverse;
    /* Move Left to Right */
}

.tech-track:hover {
    animation-play-state: paused;
}

.tech-icon {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    margin: 0 3rem;
    font-size: 4rem;
    /* Icon size */
    color: var(--color-text-main);
    opacity: 0.6;
    transition: all 0.3s ease;
    filter: grayscale(100%);
}

.tech-icon:hover {
    opacity: 1;
    transform: scale(1.2);
    filter: grayscale(0%);
    /* color: var(--color-primary); Removed to let devicon colored class work */
}

/* Keep original colors on hover if supported by devicon (it uses font color usually) */
.tech-icon:hover i {
    /* Some devicons are colored by default, others need color override. 
       The 'colored' class in devicon handles this. We will use it. */
    transform: scale(1.1);
    /* Add a slight scale to the icon itself too */
}

.tech-name {
    font-size: 1rem;
    margin-top: 0.5rem;
    font-weight: 500;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.tech-icon:hover .tech-name {
    opacity: 1;
    transform: translateY(0);
}

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

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

    /* Move half way if content is duplicated */
}

@media (max-width: 768px) {
    .tech-icon {
        font-size: 3rem;
        margin: 0 1.5rem;
    }
}

/* Hover Effects Utilities */
.hover-scale {
    transition: transform var(--transition-normal);
    display: block;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-glow {
    transition: box-shadow var(--transition-normal);
}

.hover-glow:hover {
    box-shadow: 0 0 20px var(--color-primary);
}

/* Link Underline Animation */
.link-underline {
    position: relative;
    text-decoration: none;
    color: inherit;
    /* Use inherit to respect parent color */
    font-weight: 500;
}

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

.link-underline:hover::after {
    width: 100%;
}

/* Text Gradient Shine */
.text-shine {
    background: linear-gradient(to right, var(--color-primary) 0%, var(--color-secondary) 50%, var(--color-primary) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 3s linear infinite;
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

/* Scroll Indicators */
.scroll-indicator {
    position: fixed;
    z-index: 9999;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease, opacity 0.5s ease;
    opacity: 0;
    pointer-events: none;
    /* Prevents clicking when hidden */
    border: 1px solid var(--color-glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
    /* Light glass */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    color: var(--color-primary);
}

[data-theme="dark"] .scroll-indicator {
    background: rgba(0, 0, 0, 0.3);
    /* Dark glass */
    color: var(--color-text-light);
}

.scroll-indicator.visible {
    opacity: 1;
    pointer-events: all;
}

.scroll-indicator:hover {
    background: var(--color-primary);
    color: white;
    transform: scale(1.1);
    border-color: transparent;
}

/* Scroll Up: Bottom Right */
.scroll-up {
    bottom: 2rem;
    right: 2rem;
}

/* Scroll Down: Bottom Center */
.scroll-down {
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-down:hover {
    transform: translateX(-50%) scale(1.1);
    /* Maintain centering on hover */
    animation-play-state: paused;
}

/* Bounce Animation */
@keyframes bounce {

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

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

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

@media (max-width: 768px) {
    .scroll-up {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 40px;
        height: 40px;
    }

    .scroll-down {
        bottom: 1.5rem;
        width: 40px;
        height: 40px;
    }
}


/* Social Links */
.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.social-links a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text-light);
    font-size: 1.2rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-links a:hover {
    background: var(--color-primary);
    transform: translateY(-3px);
    color: white;
    box-shadow: 0 5px 15px rgba(23, 65, 232, 0.3);
}

/* Dark Mode Text Adjustment */
[data-theme="dark"] .tech-subtitle {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Cursor Glow Effect */
#cursor-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9990;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle at center, rgba(23, 65, 232, 0.15) 0%, rgba(97, 44, 211, 0.05) 40%, rgba(0, 0, 0, 0) 70%);
    mix-blend-mode: screen;
    transition: opacity 0.3s ease;
    opacity: 0;
}

/* Light Mode Override */
[data-theme="light"] #cursor-glow {
    mix-blend-mode: normal;
    background: radial-gradient(circle at center, rgba(23, 65, 232, 0.1) 0%, rgba(97, 44, 211, 0.05) 40%, rgba(255, 255, 255, 0) 70%);
}

/* Float Animation */
.animate-float {
    animation: float 6s ease-in-out infinite;
}

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

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

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

/* FAQ Section Styling */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--color-glass-bg);
    border: 1px solid var(--color-glass-border);
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all var(--transition-normal);
}

.faq-item:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

.faq-question {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--color-text-main);
    transition: color var(--transition-fast);
}

.faq-question:hover {
    color: var(--color-primary);
}

.faq-icon {
    font-size: 1.2rem;
    transition: transform var(--transition-normal);
    color: var(--color-primary);
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background: rgba(0, 0, 0, 0.02);
}

.faq-item.active .faq-answer {
    /* Max height set via JS or large enough value */
    max-height: 500px;
    transition: max-height 0.4s ease-in;
}

.faq-answer p {
    padding: 1.5rem;
    padding-top: 0;
    margin: 0;
    opacity: 0.9;
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Logo Dark Mode Adjustment */
[data-theme="dark"] .logo img {
    filter: brightness(0) invert(1);
}

/* Switch Toggle Styles */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.2);
    transition: .4s;
}

[data-theme="dark"] .slider {
    background-color: rgba(255, 255, 255, 0.2);
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
}

input:checked+.slider {
    background-color: var(--color-primary);
}

input:focus+.slider {
    box-shadow: 0 0 1px var(--color-primary);
}

input:checked+.slider:before {
    transform: translateX(20px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Hero Section Styles */
.hero-section {
    position: relative;
    height: 90vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at 50% 50%, rgba(97, 44, 211, 0.2), transparent 70%);
}

.hero-grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: 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: 50px 50px;
    mask-image: radial-gradient(circle at 50% 50%, black, transparent 70%);
    -webkit-mask-image: radial-gradient(circle at 50% 50%, black, transparent 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Form Styles */
.form-group {
    margin-bottom: var(--spacing-sm);
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.8rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    /* Increased visibility */
    background: rgba(255, 255, 255, 0.05);
    color: inherit;
    font-family: inherit;
    transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .form-control {
    border-color: rgba(0, 0, 0, 0.2);
    background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .form-control:focus {
    border-color: var(--color-primary);
    background: rgba(0, 0, 0, 0.05);
}

/* Enhanced Select Dropdown Styles with Arrow */
/* Enhanced Select Dropdown Styles with Arrow */
select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2rem;
    padding-right: 2.5rem;
    /* Space for the arrow */
    cursor: pointer;
    background-color: transparent;
    /* Ensure no underlying default background interferes */
}

/* Fix for Firefox showing default arrow */
select.form-control::-ms-expand {
    display: none;
}

[data-theme="light"] select.form-control {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
}

/* Adjust options visibility in dark mode */
select.form-control option {
    background-color: var(--color-bg-dark);
    /* or a specific dark gray */
    color: white;
}

[data-theme="light"] select.form-control option {
    background-color: white;
    color: black;
}

/* Scale In Center Animation */
.scale-in-center {
    animation: scale-in-center 0.6s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
}

@keyframes scale-in-center {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Gradient Text Utility */
.gradient-text {
    background: linear-gradient(to right, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

/* Specific Blog Content Styles for Responsiveness */
.blog-content img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 12px;
    margin: 1.5rem 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.blog-content iframe {
    max-width: 100%;
}

/* =========================================
   Interactive Hover Effects (Added)
   ========================================= */

/* Bouncy Hover Animation */
@keyframes bounce-hover {

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

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

.hover-bounce {
    transition: transform 0.3s ease;
    display: inline-block;
    /* Required for transform */
}

.hover-bounce:hover {
    animation: bounce-hover 0.6s ease infinite;
}

/* LED Glow Text Effect */
.text-led-glow {
    transition: text-shadow 0.3s ease, color 0.3s ease;
    cursor: default;
}

.text-led-glow:hover {
    /* Bright white center with intense colored halo */
    text-shadow:
        0 0 5px #fff,
        0 0 10px #fff,
        0 0 20px var(--color-primary),
        0 0 40px var(--color-primary),
        0 0 80px var(--color-secondary);
}

/* Specific Hover for Blog Images */
.blog-content img {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    /* Bouncy transition */
}

.blog-content img:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(23, 65, 232, 0.2);
}