:root {
    --bg-color: #0b0d17;
    --bg-secondary: #121526;
    --text-color: #e0e6ed;
    --text-muted: #94a3b8;
    --primary: #00f3ff;
    --secondary: #bd00ff;
    --accent-gradient: linear-gradient(135deg, var(--primary), var(--secondary));
    --card-bg: rgba(255, 255, 255, 0.05);
    --border-color: rgba(255, 255, 255, 0.1);
    --font-main: 'Inter', sans-serif;
    --nav-height: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    width: 100vw;
    overflow-x: hidden;
}

::-webkit-scrollbar {
    display: none;
}

/* Fix Scrollbar Issue globally */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Fix Scrollbar Issue globally */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

h1,
h2,
h3,
h4 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 80px 0;
}

.text-center {
    text-align: center;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--accent-gradient);
    color: #fff;
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 243, 255, 0.4);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(189, 0, 255, 0.6);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-submit {
    border: none;
    cursor: pointer;
    width: 100%;
    font-size: 1rem;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    z-index: 1000;
    transition: 0.4s;
    background: transparent;
}

.navbar.scrolled {
    background: rgba(11, 13, 23, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo-container:hover {
    transform: scale(1.02);
}

.logo-img {
    height: 60px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(0, 243, 255, 0.5)) drop-shadow(0 0 20px rgba(189, 0, 255, 0.3));
    animation: logoGlowPulse 2s infinite alternate ease-in-out;
}

@keyframes logoGlowPulse {
    0% {
        filter: drop-shadow(0 0 10px rgba(0, 243, 255, 0.4)) drop-shadow(0 0 15px rgba(189, 0, 255, 0.2));
    }

    100% {
        filter: drop-shadow(0 0 15px rgba(0, 243, 255, 0.8)) drop-shadow(0 0 30px rgba(189, 0, 255, 0.6));
    }
}

.logo-text-svg {
    height: 55px;
    width: auto;
    margin-left: 0;
    display: block;
}



.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link.btn-primary {
    background: var(--border-color);
    padding: 8px 20px;
    border-radius: 20px;
}

.nav-link.btn-primary:hover {
    background: var(--primary);
    color: #000;
}

.menu-toggle {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-color);
    transition: 0.3s;
}

/* Hero Section */
.hero {
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-align: center;
    padding: 0 20px;
}

/* Global Video Background */
.global-video-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -10;
    overflow: hidden;
}

.global-video-bg .back-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

@media (min-aspect-ratio: 16/9) {
    .global-video-bg .back-video {
        width: 100vw;
        height: auto;
    }
}

@media (max-aspect-ratio: 16/9) {
    .global-video-bg .back-video {
        width: auto;
        height: 100vh;
    }
}

.global-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(8, 10, 18, 0.96);
    z-index: -9;
}

/* Global static dark overlay to tint the page uniformly and avoid exposing lighter side on parallax */
.global-dark-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(11, 13, 23, 0.85);
    /* Replaces section-parallax-bg::after */
    z-index: -7;
    pointer-events: none;
}

/* Ensure sections allow video to show through */
section {
    position: relative;
    background: transparent !important;
    overflow: hidden;
}

/* The interactive section backgrounds */
.section-parallax-bg {
    position: fixed;
    top: -2%;
    left: -2%;
    width: 104%;
    height: 104%;
    z-index: -8;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease-in-out, transform 0.1s ease-out;
}

.section-parallax-bg.active {
    opacity: 0.8;
}

/* Specific section overrides */
.hero .section-parallax-bg.active {
    opacity: 1;
}

.hero .content {
    max-width: 900px;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
}

.hero h1 .highlight {
    color: var(--primary);
    text-shadow: 0 0 20px rgba(0, 243, 255, 0.5);
}

.hero p {
    font-size: 1.2rem;
    color: #cbd5e1;
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-btns {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    box-shadow: none;
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--bg-color);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.4);
}

/* Stats Section */
.stats {
    background: var(--bg-secondary);
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    text-align: center;
}

.stat-item {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 30px 20px;
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% -20%, rgba(0, 243, 255, 0.15), transparent 70%);
    opacity: 0;
    transition: 0.4s;
    z-index: 0;
}

.stat-item:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(0, 243, 255, 0.3);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 243, 255, 0.1);
}

.stat-item:hover::before {
    opacity: 1;
}

.stat-item h3 {
    font-size: 2.8rem;
    color: var(--primary);
    margin-bottom: 5px;
    position: relative;
    z-index: 1;
    text-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
}

.stat-item p {
    font-size: 1.1rem;
    margin-bottom: 0;
    color: var(--text-color);
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* About Section Enhancements */
.split-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    align-items: center;
}

.col-text {
    flex: 1;
    min-width: 300px;
}

.sub-title {
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    margin-bottom: 10px;
    display: block;
}

.check-list {
    margin-top: 20px;
}

.check-list li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-color);
}

.check-list i {
    color: var(--primary);
}

.feature-box {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-left: 3px solid var(--secondary);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-box:hover {
    transform: translateX(5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    background: rgba(255, 255, 255, 0.05);
}

.feature-box i {
    font-size: 1.5rem;
    color: var(--secondary);
    margin-bottom: 10px;
}

.feature-box h4 {
    margin-bottom: 5px;
}

.feature-box p {
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* Services Improvements */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.card {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 35px;
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-12px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(0, 243, 255, 0.3);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 243, 255, 0.1);
}

.icon-box {
    width: 60px;
    height: 60px;
    background: rgba(0, 243, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.card .icon-box i {
    font-size: 1.5rem;
    color: var(--primary);
}

.card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: #fff;
}

.service-list {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.service-list li {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 5px;
    position: relative;
    padding-left: 15px;
}

.service-list li::before {
    content: "•";
    color: var(--secondary);
    position: absolute;
    left: 0;
}

/* Process Section */
.bg-darker {
    background-color: rgba(6, 8, 15, 0.5) !important;
    /* Semi-transparent */
}

.process-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 50px;
    position: relative;
}

/* Connecting line for process flow */
.process-steps::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--primary), var(--secondary), transparent);
    z-index: 0;
    transform: translateY(-50%);
    opacity: 0.3;
}

@media (max-width: 900px) {
    .process-steps::before {
        display: none;
        /* Hide line on smaller screens */
    }
}

.step {
    flex: 1;
    min-width: 250px;
    background: rgba(11, 13, 23, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 40px 30px;
    border-radius: 16px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 1;
    transition: all 0.4s ease;
    text-align: center;
}

.step:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 243, 255, 0.1);
    background: rgba(11, 13, 23, 0.95);
}

.step-number {
    font-size: 3.5rem;
    font-weight: 800;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.1);
    position: absolute;
    top: -10px;
    right: 20px;
    transition: 0.4s;
}

.step:hover .step-number {
    -webkit-text-stroke: 1px var(--primary);
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
}

.step h4 {
    color: var(--text-color);
    margin-top: 10px;
    font-size: 1.3rem;
    position: relative;
    display: inline-block;
}

.step:hover h4 {
    color: var(--primary);
}

.step h4 {
    color: var(--primary);
    margin-top: 20px;
}

/* Tech Stack */
.tech-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.tech-grid span {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 25px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color);
    transition: all 0.3s ease;
    cursor: default;
}

.tech-grid span .tech-icon {
    font-size: 1.2rem;
    color: var(--primary);
    transition: color 0.3s;
}

.tech-grid span:hover {
    border-color: var(--secondary);
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3), 0 0 15px rgba(189, 0, 255, 0.2);
}

.tech-grid span:hover .tech-icon {
    color: var(--secondary);
}

/* CTA Section */
.cta {
    background: linear-gradient(to right, var(--bg-color), var(--bg-secondary));
    border-top: 1px solid var(--border-color);
}

.cta h2 {
    margin-bottom: 1rem;
}

.btn-lg {
    padding: 15px 40px;
    font-size: 1.1rem;
    margin-top: 20px;
}

.contact-wrapper {
    display: flex;
    justify-content: space-between;
    gap: 50px;
    margin-top: 50px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.contact-info {
    flex: 1;
    min-width: 300px;
    max-width: 40%;
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.contact-info p {
    font-size: 1.1rem;
    margin-bottom: 40px;
    color: var(--text-muted);
}

.info-item {
    display: flex;
    align-items: center;
    gap: 20px;
    background: transparent;
    padding: 20px 0;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.info-item:last-child {
    border-bottom: none;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--primary);
    width: 50px;
    height: 50px;
    background: rgba(0, 243, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-item h4 {
    margin-bottom: 2px;
    font-size: 1rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-item p {
    margin-bottom: 0;
    color: var(--text-muted);
    font-size: 1rem;
}

.contact-form-container {
    flex: 1.5;
    min-width: 320px;
    background: rgba(255, 255, 255, 0.03);
    /* Added transparency */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 50px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* Matches other sections */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.form-title {
    margin-bottom: 30px;
    font-size: 1.5rem;
    color: var(--text-color);
}

.form-group {
    margin-bottom: 25px;
}

input,
textarea {
    width: 100%;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    /* Slightly more visible transparent base */
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(0, 243, 255, 0.2);
    /* Match theme borders */
    border-radius: 10px;
    color: var(--text-color);
    font-family: inherit;
    font-size: 1rem;
    transition: 0.3s;
}

/* Custom Form Validation Styles */
.custom-error {
    color: #ff0055;
    background: rgba(255, 0, 85, 0.1);
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-top: 10px;
    border: 1px solid rgba(255, 0, 85, 0.3);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    gap: 8px;
    animation: fadeInUp 0.3s ease;
}

.error-input {
    border-color: rgba(255, 0, 85, 0.5) !important;
    background: rgba(255, 0, 85, 0.02) !important;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 243, 255, 0.02);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.1);
}

/* Social Links in Contact */
.social-links {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.social-links h4 {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 20px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: 0.3s;
}

.social-btn:hover {
    background: var(--primary);
    color: var(--bg-color);
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 243, 255, 0.3);
}

/* Enhanced Card Animations */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 35px;
    border-radius: 16px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    z-index: 1;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 243, 255, 0.1), rgba(189, 0, 255, 0.1));
    opacity: 0;
    transition: 0.4s;
    z-index: -1;
}

.card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--primary);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 243, 255, 0.2);
}

.card:hover::before {
    opacity: 1;
}

.card:hover .icon-box {
    background: var(--primary);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.6);
}

.card:hover .icon-box i {
    color: var(--bg-color);
}

/* Custom Toast Notifications */
#toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
}

.toast {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 243, 255, 0.3);
    color: var(--text-color);
    padding: 20px 30px;
    margin-bottom: 15px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 243, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 300px;
    transform: translateX(120%);
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.4s ease;
}

.toast.fade-out {
    opacity: 0;
    transform: translateX(120%);
}

.toast.show {
    transform: translateX(0);
}

.toast i {
    font-size: 1.5rem;
    color: var(--primary);
}

.toast .toast-content h4 {
    margin-bottom: 5px;
    font-size: 1.1rem;
    color: var(--primary);
}

.toast .toast-content p {
    margin-bottom: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Footer */
footer {
    padding: 30px 0;
    border-top: 1px solid var(--border-color);
    margin-top: 50px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Animations */
.animate-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s forwards;
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: 0.8s ease-out;
}

.animate-on-scroll.show {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    animation-delay: 0.2s;
    transition-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
    transition-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
    transition-delay: 0.6s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        z-index: 1001;
    }

    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 0;
        flex-direction: column;
        background-color: var(--bg-color);
        width: 100%;
        height: 100vh;
        justify-content: center;
        transition: 0.3s;
    }

    .nav-menu.active {
        left: 0;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .contact-wrapper {
        flex-direction: column;
    }
}

/* Robot Styles */
#robot-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    overflow: hidden;
    perspective: 1000px;
    transition: left 0.6s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.5s ease;
}

.robot {
    --robot-scale: 0.75;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(var(--robot-scale));
    /* Start centered and somewhat smaller */
    width: 80px;
    height: 120px;
    transform-style: preserve-3d;
    z-index: 1;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.4)) drop-shadow(0 0 5px rgba(255, 255, 255, 0.2));
}

/* Robot Head - EVE */
.robot-head {
    width: 70px;
    height: 55px;
    background: radial-gradient(circle at 30% 30%, #ffffff, #e6ebf0 40%, #b0bec5 90%);
    border-radius: 40px 40px 25px 25px;
    margin: 0 auto;
    position: relative;
    box-shadow:
        inset -8px -8px 15px rgba(0, 0, 0, 0.2),
        inset 5px 5px 12px rgba(255, 255, 255, 1),
        0 8px 10px rgba(0, 0, 0, 0.3);
    z-index: 2;
    animation: floatHead 3s ease-in-out infinite;
    transform-style: preserve-3d;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 5px;
}

/* EVE Face Screen */
.robot-face {
    width: 54px;
    height: 34px;
    background: #000;
    border-radius: 20px 20px 15px 15px;
    position: relative;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8), 0 0 3px rgba(255, 255, 255, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Eyes */
.robot-eyes {
    display: flex;
    justify-content: space-around;
    width: 100%;
    padding: 0 4px;
    transform: translateZ(5px);
}

.eye {
    width: 16px;
    height: 10px;
    background: var(--primary);
    border-radius: 40% 40% 50% 50%;
    box-shadow: 0 0 12px var(--primary), 0 0 20px var(--primary), inset 0 0 5px #fff;
    position: relative;
    transition: all 0.2s ease;
}

/* Robot Body - EVE */
.robot-body {
    width: 60px;
    height: 75px;
    background: radial-gradient(circle at 30% 30%, #ffffff, #e6ebf0 50%, #9caab5 100%);
    border-radius: 40% 40% 50% 50%;
    margin: -2px auto 0;
    position: relative;
    z-index: 1;
    box-shadow:
        inset -10px -10px 20px rgba(0, 0, 0, 0.15),
        inset 8px 8px 15px rgba(255, 255, 255, 1),
        0 15px 20px rgba(0, 0, 0, 0.3);
    transform-style: preserve-3d;
}

/* Hands - EVE Fins */
/* Fins connect at the shoulder/body. Transform origin is at the TOP (connection point). */
.robot-hands {
    position: absolute;
    top: 55px;
    /* Lower mid-body connection */
    left: 50%;
    transform: translateX(-50%) translateZ(10px);
    width: 80px;
    height: 0;
    /* Zero height — hands are absolutely positioned relative to this anchor */
    z-index: 3;
    transform-style: preserve-3d;
}

.hand {
    /* EVE fin shape — hangs downward from shoulder */
    width: 16px;
    height: 58px;
    background: radial-gradient(circle at 30% 20%, #ffffff, #d3dbe0 60%, #8c9ba6 100%);
    border-radius: 40% 60% 60% 40% / 50% 50% 80% 80%;
    position: absolute;
    top: 0;
    /* Top edge = shoulder connection point */
    transform-origin: top center;
    /* Always pivot at the shoulder */
    box-shadow:
        inset -3px -3px 8px rgba(0, 0, 0, 0.2),
        inset 3px 3px 6px #fff,
        0 8px 12px rgba(0, 0, 0, 0.2);
}

.hand.left {
    left: 0px;
    transform: rotate(12deg) translateZ(5px);
    animation: floatLeftFin 3s ease-in-out infinite;
    border-radius: 60% 40% 40% 60% / 50% 50% 80% 80%;
}

.hand.right {
    right: 0px;
    left: auto;
    transform: rotate(-12deg) translateZ(5px);
    animation: floatRightFin 3s ease-in-out infinite;
    border-radius: 40% 60% 60% 40% / 50% 50% 80% 80%;
}

/* Animations */
@keyframes floatHead {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px) rotateX(-2deg);
    }
}

@keyframes floatLeftFin {

    0%,
    100% {
        transform: rotate(12deg) translateZ(5px);
    }

    50% {
        transform: rotate(17deg) translateZ(5px) translateY(-2px);
    }
}

@keyframes floatRightFin {

    0%,
    100% {
        transform: rotate(-12deg) translateZ(5px);
    }

    50% {
        transform: rotate(-17deg) translateZ(5px) translateY(-2px);
    }
}

/* Reaction Animation Class */
.robot.reacting .robot-head {
    animation: jumpHead 0.5s ease-out;
    box-shadow: 0 0 25px var(--primary);
}

.robot.reacting .eye {
    background: #fff;
    box-shadow: 0 0 15px #fff;
    height: 4px;
    /* Squint */
    border-radius: 5px;
    top: 3px;
}

@keyframes jumpHead {
    0% {
        transform: translateY(0) scale(1);
    }

    40% {
        transform: translateY(-20px) scale(1.1);
    }

    80% {
        transform: translateY(5px) scale(0.95);
    }

    100% {
        transform: translateY(0) scale(1);
    }
}

/* Advanced Robot Behaviors */

/* Fleeing / Avoiding */
/* Fleeing / Avoiding */
.robot.avoiding .robot-head {
    border-color: #ff0055;
    box-shadow: 0 0 20px #ff0055;
    animation: panicShake 0.1s infinite;
}

.robot.avoiding .eye {
    background: #ff0055;
    box-shadow: 0 0 10px #ff0055;
    height: 8px;
    border-radius: 2px;
    /* Square eyes for panic */
}

/* --- CALLING (Contact section) --- */
.robot.calling .hand.right {
    top: 0;
    /* Hand slides up to the ear */
    right: 4px;
    /* Pull in closer to face */
    left: auto;
    transform-origin: top center;
    transform: rotate(-100deg) translateZ(5px);
    animation: callingPulse 1.8s ease-in-out infinite;
}

.robot.calling .hand.left {
    transform: rotate(12deg) translateZ(5px);
    animation: floatLeftFin 3s ease-in-out infinite;
}

/* Mirrored Calling */
.robot.on-right.calling .hand.right {
    top: 0;
    right: 0px;
    transform: rotate(-12deg) translateZ(5px);
    animation: floatRightFin 3s ease-in-out infinite;
}

.robot.on-right.calling .hand.left {
    top: 0;
    left: 4px;
    transform-origin: top center;
    transform: rotate(100deg) translateZ(5px);
    animation: callingPulseLeft 1.8s ease-in-out infinite;
}

.robot.on-right.calling .robot-head {
    transform: rotate(-6deg);
}

.robot.calling .robot-head {
    transform: rotate(6deg);
    transition: transform 0.4s ease;
}

.robot.calling::after {
    content: '...';
    position: absolute;
    top: -22px;
    right: -22px;
    font-size: 18px;
    color: var(--primary);
    animation: typing 1s infinite steps(3);
}

@keyframes callingPulse {

    0%,
    100% {
        transform: rotate(-100deg) translateZ(5px);
    }

    50% {
        transform: rotate(-105deg) translateZ(5px) translateY(-2px);
    }
}

@keyframes callingPulseLeft {

    0%,
    100% {
        transform: rotate(100deg) translateZ(5px);
    }

    50% {
        transform: rotate(105deg) translateZ(5px) translateY(-2px);
    }
}

/* --- CODING (Services section) --- */
/* Fins alternate tapping downward — typing/operating controls */
.robot.coding .hand.left {
    animation: eveCodeLeft 0.35s ease-in-out infinite alternate;
}

.robot.coding .hand.right {
    animation: eveCodeRight 0.35s ease-in-out infinite alternate;
    animation-delay: 0.175s;
}

@keyframes eveCodeLeft {
    from {
        transform: rotate(20deg) translateZ(5px) translateY(0);
    }

    to {
        transform: rotate(35deg) translateZ(5px) translateY(6px);
    }
}

@keyframes eveCodeRight {
    from {
        transform: rotate(-35deg) translateZ(5px) translateY(6px);
    }

    to {
        transform: rotate(-20deg) translateZ(5px) translateY(0);
    }
}

/* Mirrored Coding */
.robot.on-right.coding .hand.right {
    animation: eveCodeLeft 0.35s ease-in-out infinite alternate;
}

.robot.on-right.coding .hand.left {
    animation: eveCodeRight 0.35s ease-in-out infinite alternate;
    animation-delay: 0.175s;
}

/* --- LEARNING (Tech Stack section) --- */
/* Both fins spread wide — curious, attentive posture */
.robot.learning .robot-head::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 15%;
    width: 70%;
    height: 15px;
    border: 3px solid #222;
    border-top: none;
    border-radius: 0 0 10px 10px;
    z-index: 10;
}

.robot.learning .eye {
    border: 2px solid #222;
    width: 20px;
    height: 14px;
    top: -4px;
}

.robot.learning .hand.left {
    transform: rotate(30deg) translateZ(5px);
    animation: none;
}

.robot.learning .hand.right {
    transform: rotate(-30deg) translateZ(5px);
    animation: none;
}

/* --- THINKING (CTA section) --- */
/* Left fin lifts toward chin; head tilts —"hmm" pose */
.robot.thinking .hand.left {
    transform: rotate(-50deg) translateZ(5px);
    animation: thinkingBob 2s ease-in-out infinite;
}

.robot.thinking .hand.right {
    transform: rotate(-8deg) translateZ(5px);
    animation: none;
}

/* Mirrored Thinking */
.robot.on-right.thinking .hand.right {
    transform: rotate(50deg) translateZ(5px);
    animation: thinkingBobRight 2s ease-in-out infinite;
}

.robot.on-right.thinking .hand.left {
    transform: rotate(8deg) translateZ(5px);
    animation: none;
}

.robot.thinking .robot-head {
    transform: rotate(12deg);
}

.robot.on-right.thinking .robot-head {
    transform: rotate(-12deg);
}

.robot.thinking .eye.left {
    height: 4px;
    top: 5px;
}

.robot.on-right.thinking .eye.left {
    height: 14px;
    top: 0;
}

.robot.on-right.thinking .eye.right {
    height: 4px;
    top: 5px;
}

@keyframes thinkingBob {

    0%,
    100% {
        transform: rotate(-50deg) translateZ(5px) translateY(0);
    }

    50% {
        transform: rotate(-55deg) translateZ(5px) translateY(-3px);
    }
}

@keyframes thinkingBobRight {

    0%,
    100% {
        transform: rotate(50deg) translateZ(5px) translateY(0);
    }

    50% {
        transform: rotate(55deg) translateZ(5px) translateY(-3px);
    }
}

/* Animations */
@keyframes panicShake {
    0% {
        transform: translate(1px, 1px) rotate(0deg);
    }

    10% {
        transform: translate(-1px, -2px) rotate(-1deg);
    }

    20% {
        transform: translate(-3px, 0px) rotate(1deg);
    }

    30% {
        transform: translate(3px, 2px) rotate(0deg);
    }

    40% {
        transform: translate(1px, -1px) rotate(1deg);
    }

    50% {
        transform: translate(-1px, 2px) rotate(-1deg);
    }

    60% {
        transform: translate(-3px, 1px) rotate(0deg);
    }

    70% {
        transform: translate(3px, 1px) rotate(-1deg);
    }

    80% {
        transform: translate(-1px, -1px) rotate(1deg);
    }

    90% {
        transform: translate(1px, 2px) rotate(0deg);
    }

    100% {
        transform: translate(1px, -2px) rotate(-1deg);
    }
}

@keyframes typeFast {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(5px);
    }
}

@keyframes typing {
    from {
        width: 0
    }

    to {
        width: 100%
    }
}

@keyframes floatQuestion {

    0%,
    100% {
        transform: translateX(-50%) translateY(0) scale(1);
        opacity: 1;
    }

    50% {
        transform: translateX(-50%) translateY(-10px) scale(1.2);
        opacity: 0.8;
    }
}

/* --- Refined Context Visuals & Animations --- */

/* Learning (Glasses on Tech Stack) */
.robot.learning .robot-head::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 15%;
    width: 70%;
    height: 15px;
    border: 2px solid var(--text-color);
    border-top: none;
    border-radius: 0 0 10px 10px;
    z-index: 10;
}

.robot.learning .eye {
    border: 2px solid var(--text-color);
    width: 16px;
    height: 16px;
    top: -2px;
}

/* 2. Coding (Refined Laptop) */
.robot.coding::after {
    /* Laptop Screen */
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 45px;
    background: #222;
    border: 2px solid #555;
    border-radius: 4px;
    z-index: 5;
    background: repeating-linear-gradient(transparent,
            transparent 5px,
            rgba(0, 243, 255, 0.2) 5px,
            rgba(0, 243, 255, 0.2) 7px);
    /* Code lines effect */
}

.robot.coding::before {
    content: '';
    /* Logo */
    width: 8px;
    height: 8px;
    bottom: 5px;
    box-shadow: 0 0 10px var(--primary);
}

/* 3. Thinking (Bubble) */
/* 3. Thinking (Refined: Floating Glowing ?) */
.robot.thinking::after {
    content: '?';
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    height: auto;
    background: transparent;
    /* No bubble */
    color: var(--secondary);
    /* Glowing color */
    border-radius: 0;
    font-size: 32px;
    font-weight: bold;
    animation: floatBubble 2s ease-in-out infinite;
    text-shadow: 0 0 10px var(--secondary), 0 0 20px var(--secondary);
    /* Glow effect */
    box-shadow: none;
}

.robot.thinking .robot-head {
    transform: rotate(15deg);
}

/* 4. Greeting (Refined: Wave Only) */
/* --- GREETING (Home) --- */
/* EVE keeps right fin raised high and waves — arm never drops below horizontal */
.robot.greeting::after {
    display: none;
}

.robot.greeting .hand.right {
    top: 0;
    /* Slide the entire arm UP above the shoulder */
    right: -5px;
    left: auto;
    /* Hand raised high up and outward */
    animation: eveWaveRight 0.65s ease-in-out infinite;
}

.robot.greeting .hand.left {
    animation: floatLeftFin 3s ease-in-out infinite;
}

/* Mirrored Greeting */
.robot.on-right.greeting .hand.right {
    top: 0;
    transform: rotate(-12deg) translateZ(5px);
    animation: floatRightFin 3s ease-in-out infinite;
}

.robot.on-right.greeting .hand.left {
    top: 0;
    left: -5px;
    animation: eveWaveLeft 0.65s ease-in-out infinite;
}

/*
  Wave arc — arm extends outward and sweeps up slightly, avoiding the head.
*/
@keyframes eveWaveRight {
    0% {
        transform: rotate(-130deg) translateZ(5px);
    }

    50% {
        transform: rotate(-160deg) translateZ(5px);
    }

    100% {
        transform: rotate(-130deg) translateZ(5px);
    }
}

@keyframes eveWaveLeft {
    0% {
        transform: rotate(130deg) translateZ(5px);
    }

    50% {
        transform: rotate(160deg) translateZ(5px);
    }

    100% {
        transform: rotate(130deg) translateZ(5px);
    }
}

/* 5. Saluting */
/* --- SALUTING (About) --- */
/* EVE firmly raises right fin straight up beside head */
.robot.saluting .hand.right {
    top: 0;
    /* Stay anchored to body */
    right: 5px;
    left: auto;
    transform: rotate(-120deg) translateZ(5px);
    animation: salutePulse 2.5s ease-in-out infinite;
}

.robot.saluting .hand.left {
    animation: floatLeftFin 3s ease-in-out infinite;
}

/* Mirrored Saluting */
.robot.on-right.saluting .hand.right {
    transform: rotate(-12deg) translateZ(5px);
    animation: floatRightFin 3s ease-in-out infinite;
}

.robot.on-right.saluting .hand.left {
    top: 0;
    left: 5px;
    transform: rotate(120deg) translateZ(5px);
    animation: salutePulseLeft 2.5s ease-in-out infinite;
}

@keyframes salutePulse {

    0%,
    100% {
        transform: rotate(-120deg) translateZ(5px) translateY(0);
    }

    50% {
        transform: rotate(-117deg) translateZ(5px) translateY(-3px);
    }
}

@keyframes salutePulseLeft {

    0%,
    100% {
        transform: rotate(120deg) translateZ(5px) translateY(0);
    }

    50% {
        transform: rotate(117deg) translateZ(5px) translateY(-3px);
    }
}

/* Teleport Animations */
.slide-out-left {
    animation: slideOutLeft 0.4s ease-in forwards;
}

.slide-out-right {
    animation: slideOutRight 0.4s ease-in forwards;
}

.slide-in-left {
    animation: slideInLeft 0.4s ease-out forwards;
}

.slide-in-right {
    animation: slideInRight 0.4s ease-out forwards;
}

@keyframes slideOutLeft {
    to {
        transform: translate(-50%, -50%) translateX(-200px) scale(var(--robot-scale, 0.75));
        opacity: 0;
    }
}

@keyframes slideOutRight {
    to {
        transform: translate(-50%, -50%) translateX(200px) scale(var(--robot-scale, 0.75));
        opacity: 0;
    }
}

@keyframes slideInLeft {
    from {
        transform: translate(-50%, -50%) translateX(-200px) scale(var(--robot-scale, 0.75));
        opacity: 0;
    }

    to {
        transform: translate(-50%, -50%) translateX(0) scale(var(--robot-scale, 0.75));
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translate(-50%, -50%) translateX(200px) scale(var(--robot-scale, 0.75));
        opacity: 0;
    }

    to {
        transform: translate(-50%, -50%) translateX(0) scale(var(--robot-scale, 0.75));
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .robot {
        --robot-scale: 0.55;
    }
}

@keyframes floatBubble {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes waveHand {

    0%,
    100% {
        transform: rotate(-30deg) translateZ(5px);
    }

    50% {
        transform: rotate(-60deg) translateZ(5px);
    }
}

/* Smooth Transition for Y-Axis Movement but not X during teleport */
.robot {
    transition: top 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.robot.slide-out-left,
.robot.slide-out-right,
.robot.slide-in-left,
.robot.slide-in-right {
    transition: none;
    /* Disable Top transition during X-axis slide for snappiness */
}