@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-primary: #06070b;
    --bg-secondary: rgba(13, 14, 22, 0.7);
    --bg-card: rgba(15, 16, 26, 0.6);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(0, 240, 255, 0.25);
    --accent-cyan: #00f0ff;
    --accent-purple: #8b5cf6;
    --accent-pink: #d946ef;
    --accent-glow-cyan: rgba(0, 240, 255, 0.12);
    --accent-glow-purple: rgba(139, 92, 246, 0.12);
    --accent-glow-pink: rgba(217, 70, 239, 0.12);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --font-sans: 'Plus Jakarta Sans', sans-serif;
    --header-height: 80px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base resets */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 10% 20%, var(--accent-glow-purple) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, var(--accent-glow-cyan) 0%, transparent 45%),
        radial-gradient(circle at 50% 50%, var(--accent-glow-pink) 0%, transparent 50%);
    pointer-events: none;
    z-index: -2;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-purple);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

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

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

.gradient-text {
    background: linear-gradient(135deg, var(--text-primary) 30%, var(--accent-cyan) 70%, var(--accent-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-alt {
    background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-purple) 50%, var(--accent-pink) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;
    font-weight: 600;
    border-radius: 9999px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-purple) 100%);
    color: #000;
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(0, 240, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 240, 255, 0.5), 0 0 10px rgba(139, 92, 246, 0.4);
    color: #000;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Floating Navigation Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    /* Solid fallback behind the blur — critical on mobile when nav opens */
    background: rgba(6, 7, 11, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
    display: flex;
    align-items: center;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-link {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 38px;
    width: auto;
    object-fit: contain;
}

.logo-solid-white {
    filter: brightness(0) invert(1);
}

nav {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

nav a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 0.5rem 0;
}

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

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
    transition: var(--transition);
}

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

/* Mobile Hamburger Menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    background: none;
    border: none;
    z-index: 101;
    padding: 5px;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    transition: var(--transition);
}

/* Card Design System */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.gradient-card {
    position: relative;
    background: rgba(13, 14, 22, 0.45);
    border-radius: 16px;
    padding: 2.5rem;
    z-index: 1;
    overflow: hidden;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: var(--transition);
}

.gradient-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.25) 0%, rgba(139, 92, 246, 0.08) 50%, rgba(217, 70, 239, 0.25) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    transition: var(--transition);
}

.gradient-card:hover {
    transform: translateY(-5px);
    background: rgba(13, 14, 22, 0.65);
    box-shadow: 0 10px 30px rgba(0, 240, 255, 0.05);
}

.gradient-card:hover::before {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.5) 0%, rgba(139, 92, 246, 0.2) 50%, rgba(217, 70, 239, 0.5) 100%);
}

.card-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--accent-cyan);
    transition: var(--transition);
}

.gradient-card:hover .card-icon-wrapper {
    background: rgba(0, 240, 255, 0.15);
    border-color: var(--accent-cyan);
    color: var(--text-primary);
    transform: scale(1.05);
}

/* Sections padding */
section {
    padding: 7rem 0;
    position: relative;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem auto;
}

.section-tag {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent-cyan);
    margin-bottom: 0.75rem;
    display: block;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--header-height);
    position: relative;
    overflow: hidden;
}

.hero-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
    align-items: center;
    z-index: 2;
}

.hero-content h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    max-width: 580px;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.hero-graphic-container {
    position: relative;
    width: 100%;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Interactive Neon Grid Graphic */
.tech-cube {
    width: 260px;
    height: 260px;
    position: relative;
    transform-style: preserve-3d;
    animation: rotateCube 20s infinite linear;
}

@keyframes rotateCube {
    0% { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
    100% { transform: rotateX(360deg) rotateY(360deg) rotateZ(360deg); }
}

.cube-face {
    position: absolute;
    width: 260px;
    height: 260px;
    border: 1px solid rgba(0, 240, 255, 0.4);
    background: rgba(13, 14, 22, 0.3);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.1);
    backdrop-filter: blur(5px);
}

.cube-face-front  { transform: translateZ(130px); }
.cube-face-back   { transform: rotateY(180deg) translateZ(130px); border-color: rgba(139, 92, 246, 0.4); }
.cube-face-left   { transform: rotateY(-90deg) translateZ(130px); }
.cube-face-right  { transform: rotateY(90deg) translateZ(130px); border-color: rgba(217, 70, 239, 0.4); }
.cube-face-top    { transform: rotateX(90deg) translateZ(130px); }
.cube-face-bottom { transform: rotateX(-90deg) translateZ(130px); }

.glow-ring {
    position: absolute;
    width: 380px;
    height: 380px;
    border: 2px dashed rgba(139, 92, 246, 0.3);
    border-radius: 50%;
    animation: spinRing 25s infinite linear;
}

@keyframes spinRing {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.glow-ring-alt {
    position: absolute;
    width: 440px;
    height: 440px;
    border: 1px solid rgba(217, 70, 239, 0.2);
    border-radius: 50%;
    animation: spinRingAlt 30s infinite linear reverse;
    /* Prevent rings from causing horizontal overflow on mobile */
    max-width: 100%;
    max-height: 100%;
}

@keyframes spinRingAlt {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Clients Brand Band */
.clients-band {
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    background: rgba(6, 7, 11, 0.5);
    overflow: hidden;
}

.clients-band p {
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 2rem;
    color: var(--text-muted);
}

.logo-carousel {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 3rem;
}

.client-logo-img {
    height: 30px;
    opacity: 0.5;
    transition: var(--transition);
    filter: brightness(0) invert(1);
    object-fit: contain;
}

.client-logo-img:hover {
    opacity: 1;
    transform: scale(1.05);
}

/* Grayscale boosted style to achieve white monochrome instead of fully binary white */
.monochrome-logo {
    filter: grayscale(1) brightness(1.5) contrast(1.5) !important;
}

/* Stats Section */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.stat-card {
    text-align: center;
    padding: 3rem 2rem;
}

.stat-number {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 1rem;
    font-family: var(--font-sans);
}

.stat-label {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-subtext {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Project Highlights */
.featured-project {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 6rem;
}

.project-gallery {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 16/10;
    border: 1px solid var(--border-color);
}

.slideshow-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    display: none;
    position: absolute;
    width: 100%;
    height: 100%;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-active {
    display: block;
    animation: fadeEffect 0.8s ease-in-out;
}

@keyframes fadeEffect {
    from { opacity: 0.4; }
    to { opacity: 1; }
}

.carousel-dots {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background: var(--accent-cyan);
    transform: scale(1.2);
    width: 16px;
    border-radius: 4px;
}

.project-details {
    z-index: 2;
}

.tech-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 1.5rem 0;
}

.tech-tag {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.3rem 0.8rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.client-quote {
    margin-top: 2rem;
    padding-left: 1.5rem;
    border-left: 2px solid var(--accent-purple);
    font-style: italic;
    color: var(--text-secondary);
}

.quote-author {
    display: block;
    margin-top: 0.5rem;
    font-weight: 600;
    font-style: normal;
    color: var(--text-primary);
    font-size: 0.9rem;
}

/* Faded Out / Blocked Project style */
.faded-project {
    position: relative;
    max-height: 480px;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    padding: 3rem;
    background: rgba(13, 14, 22, 0.3);
}

.faded-project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70%;
    background: linear-gradient(to top, var(--bg-primary) 20%, rgba(6, 7, 11, 0.9) 50%, rgba(6, 7, 11, 0) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: 3rem;
    z-index: 3;
}

/* Cycling Quote Ticker */
.quotes-ticker {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    /* Fixed height prevents layout collapse during transition */
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ticker-item {
    /* Use absolute to stack all items in same space */
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    pointer-events: none;
}

.ticker-item.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    /* Stay absolute so inactive items don't affect layout */
    position: absolute;
}

.ticker-quote {
    font-size: 1.6rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 1.5rem;
}

/* Grid Values */
.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

/* Footer styling */
footer {
    border-top: 1px solid var(--border-color);
    background: rgba(4, 4, 6, 0.85);
    padding: 5rem 0 2rem 0;
    position: relative;
    z-index: 10;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.footer-logo {
    height: 45px;
    width: auto;
    align-self: flex-start;
}

.footer-brand p {
    font-size: 0.95rem;
    max-width: 280px;
}

.footer-socials {
    display: flex;
    gap: 1rem;
}

.social-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
}

.social-icon-btn:hover {
    color: var(--accent-cyan);
    border-color: var(--accent-cyan);
    background: rgba(0, 240, 255, 0.05);
    transform: translateY(-2px);
}

.footer-col h4 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-col ul a {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.footer-col ul a:hover {
    color: var(--accent-cyan);
    padding-left: 4px;
}

.footer-contact-info {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-muted);
}

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

/* Contact Page Form styling */
.contact-form-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: flex-start;
}

.contact-info-panel h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.contact-details-list {
    margin: 2rem 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-detail-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-detail-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-cyan);
}

.form-card {
    background: rgba(13, 14, 22, 0.5);
    border-radius: 16px;
    padding: 3rem;
    border: 1px solid var(--border-color);
    position: relative;
}

.form-group-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-control {
    width: 100%;
    background: rgba(6, 7, 11, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.85rem 1rem;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.15);
}

textarea.form-control {
    min-height: 140px;
    resize: vertical;
}

.turnstile-wrapper {
    margin-bottom: 1.5rem;
}

.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    font-size: 0.95rem;
    font-weight: 500;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.submit-btn-wrapper {
    position: relative;
}

/* AI Chatbot Floating UI */
#chatbot-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    font-family: var(--font-sans);
}

#chatbot-trigger {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-purple) 100%);
    box-shadow: 0 4px 20px rgba(0, 240, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    color: #000;
}

#chatbot-trigger:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 240, 255, 0.6);
}

#chatbot-trigger svg {
    width: 28px;
    height: 28px;
    transition: var(--transition);
}

#chatbot-trigger.active svg {
    transform: rotate(90deg);
}

#chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 520px;
    background: rgba(15, 16, 26, 0.85);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px) scale(0.9);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

#chatbot-window.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

#chatbot-window::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.3) 0%, rgba(139, 92, 246, 0.1) 50%, rgba(217, 70, 239, 0.3) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.chatbot-header {
    padding: 1.2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(6, 7, 11, 0.4);
}

.chatbot-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-cyan);
}

.chatbot-status {
    flex: 1;
}

.chatbot-status h4 {
    font-size: 0.95rem;
}

.chatbot-status span {
    font-size: 0.75rem;
    color: var(--accent-cyan);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.chatbot-status span::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent-cyan);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 6px var(--accent-cyan);
}

.chatbot-messages {
    flex: 1;
    padding: 1.2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-message {
    max-width: 80%;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.chat-message.bot {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    align-self: flex-start;
    border-top-left-radius: 2px;
}

.chat-message.user {
    background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-purple) 100%);
    color: #000;
    font-weight: 500;
    align-self: flex-end;
    border-top-right-radius: 2px;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 0.5rem 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    align-self: flex-start;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background: var(--text-secondary);
    border-radius: 50%;
    animation: typing 1s infinite alternate;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0% { transform: translateY(0); opacity: 0.3; }
    100% { transform: translateY(-4px); opacity: 1; }
}

.chatbot-input-area {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    background: rgba(6, 7, 11, 0.4);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chatbot-input-row {
    display: flex;
    gap: 0.5rem;
    width: 100%;
}

.chatbot-turnstile-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(13, 14, 22, 0.4);
    padding: 0.5rem;
    border-radius: 8px;
    border: 1px dashed var(--border-color);
}

.chatbot-input {
    flex: 1;
    background: rgba(6, 7, 11, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: var(--font-sans);
}

.chatbot-input:focus {
    outline: none;
    border-color: var(--accent-cyan);
}

.chatbot-send-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--accent-purple);
    color: var(--text-primary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.chatbot-send-btn:hover {
    background: var(--accent-cyan);
    color: #000;
}

/* In-Chat Contact Form inside Bot Window */
.chat-form-container {
    background: rgba(13, 14, 22, 0.85);
    border: 1px solid var(--accent-cyan);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.15);
}

.chat-form-container h5 {
    font-size: 0.9rem;
    color: var(--accent-cyan);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(0, 240, 255, 0.2);
    padding-bottom: 0.4rem;
}

.chat-form-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.chat-form-field label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.chat-form-field input, .chat-form-field textarea {
    background: rgba(6, 7, 11, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    color: var(--text-primary);
    font-size: 0.8rem;
    font-family: var(--font-sans);
}

.chat-form-field input:focus, .chat-form-field textarea:focus {
    outline: none;
    border-color: var(--accent-cyan);
}

.chat-form-submit {
    background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-purple) 100%);
    color: #000;
    font-weight: 700;
    font-size: 0.8rem;
    border: none;
    border-radius: 6px;
    padding: 0.5rem;
    cursor: pointer;
    text-transform: uppercase;
    transition: var(--transition);
}

.chat-form-submit:hover {
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

/* Service Detail Deep Dive — use text-align to flip visual order without breaking RTL text */
.service-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 8rem;
}

/* Flip column order on even sections using grid column reversal, NOT direction:rtl */
.service-section:nth-child(even) > *:first-child {
    order: 2;
}
.service-section:nth-child(even) > *:last-child {
    order: 1;
}

/* If the service graphic is hidden/none, make the layout single column */
.service-section:has(.service-graphic[style*="display: none"]) {
    grid-template-columns: 1fr;
}

.service-graphic {
    width: 100%;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.svg-animation-wrapper {
    width: 80%;
    height: 80%;
    position: relative;
}

.svg-animation-wrapper svg {
    width: 100%;
    height: 100%;
}

/* Custom Responsive Styles */
@media (max-width: 992px) {
    .hero-layout {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .featured-project {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-form-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .service-section {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    /* Reset order override on mobile — stack naturally */
    .service-section:nth-child(even) > *:first-child,
    .service-section:nth-child(even) > *:last-child {
        order: unset;
    }
    
    .footer-grid {
        grid-template-columns: 1.5fr 1fr;
    }
    
    /* 2-column stats grid at tablet */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    /* Hero graphic smaller on tablet */
    .hero-graphic-container {
        height: 280px;
    }
    
    .glow-ring { width: 260px; height: 260px; }
    .glow-ring-alt { width: 300px; height: 300px; }
    .tech-cube { width: 180px; height: 180px; }
    .cube-face { width: 180px; height: 180px; }
    .cube-face-front  { transform: translateZ(90px); }
    .cube-face-back   { transform: rotateY(180deg) translateZ(90px); }
    .cube-face-left   { transform: rotateY(-90deg) translateZ(90px); }
    .cube-face-right  { transform: rotateY(90deg) translateZ(90px); }
    .cube-face-top    { transform: rotateX(90deg) translateZ(90px); }
    .cube-face-bottom { transform: rotateX(-90deg) translateZ(90px); }
}

@media (max-width: 768px) {
    header {
        height: 70px;
        background: #06070b !important; /* Force solid dark background on mobile to prevent bleed */
        z-index: 200;
    }
    
    .menu-toggle {
        /* Raise hamburger above nav overlay */
        z-index: 201;
    }
    
    nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        bottom: 0;
        height: calc(100vh - 70px); /* Explicit height to prevent collapse */
        background: #06070b; /* Solid dark color match header */
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        padding: 3rem;
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: var(--transition);
        z-index: 199;
    }
    
    nav.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }
    
    nav a {
        font-size: 1.25rem;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    /* Hamburger to X animation */
    .menu-toggle.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .hero-content h1 {
        font-size: 2.4rem;
    }

    .hero-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    /* Shrink hero graphic on mobile to prevent overflow */
    .hero-graphic-container {
        height: 220px;
        overflow: hidden;
    }
    
    .glow-ring { width: 200px; height: 200px; }
    .glow-ring-alt { width: 230px; height: 230px; }
    .tech-cube { width: 130px; height: 130px; }
    .cube-face { width: 130px; height: 130px; }
    .cube-face-front  { transform: translateZ(65px); }
    .cube-face-back   { transform: rotateY(180deg) translateZ(65px); }
    .cube-face-left   { transform: rotateY(-90deg) translateZ(65px); }
    .cube-face-right  { transform: rotateY(90deg) translateZ(65px); }
    .cube-face-top    { transform: rotateX(90deg) translateZ(65px); }
    .cube-face-bottom { transform: rotateX(-90deg) translateZ(65px); }
    
    /* Single-column stats on phone */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .ticker-quote {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 1.9rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    /* Keep chatbot window fully on-screen */
    #chatbot-container {
        bottom: 1rem;
        right: 1rem;
    }
    
    #chatbot-window {
        width: calc(100vw - 2rem);
        right: 0;
        bottom: 70px;
        height: 480px;
    }
    
    .form-group-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .form-card {
        padding: 1.5rem;
    }
    
    .faded-project {
        padding: 1.5rem;
    }
    
    .faded-project > div {
        grid-template-columns: 1fr !important;
    }
}
