/* ==================================
   VARIABLES & GLOBALS
   ================================== */
:root {
    /* Colors */
    --color-bg: #030a16;
    --color-bg-light: #0d1b2a;
    --color-text: #e0e6ed;
    --color-heading: #ffffff;
    --color-accent: #64ffda; /* Emerald/Teal */
    --color-accent-dark: #1b4e52;
    --color-primary: #1e3a8a; /* Deep Blue */
    
    /* Glassmorphism */
    --glass-bg: rgba(13, 27, 42, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    
    /* Typography */
    --font-primary: 'Outfit', sans-serif;
    --font-secondary: 'Space Grotesk', sans-serif;
    
    /* Spacing */
    --spacing-sm: 1rem;
    --spacing-md: 2.5rem;
    --spacing-lg: 5rem;
    --spacing-xl: 10rem;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

h1, h2, h3, h4, h5, h6 {
    color: var(--color-heading);
    font-family: var(--font-secondary);
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

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

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

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

/* ==================================
   COMPONENTS
   ================================== */

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 4px;
    font-weight: 600;
    font-family: var(--font-secondary);
    letter-spacing: 1px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

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

.btn-primary:hover {
    background: rgba(100, 255, 218, 0.1);
    box-shadow: 0 0 15px rgba(100, 255, 218, 0.3);
    transform: translateY(-3px);
}

.btn-secondary {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--color-heading);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-3px);
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(100, 255, 218, 0.1);
    color: var(--color-accent);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: var(--glass-shadow);
}

/* ==================================
   NAVIGATION
   ================================== */
.glass-nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    padding: 1.5rem 0;
    transition: all 0.4s ease;
    background: transparent;
}

.glass-nav.scrolled {
    background: rgba(3, 10, 22, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1rem 0;
    border-bottom: 1px solid var(--glass-border);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-secondary);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--color-heading);
}

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

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

.nav-links a {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text);
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--color-accent);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--color-accent);
}

.nav-links a:hover::after {
    width: 100%;
}

/* ==================================
   HERO SECTION
   ================================== */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px; /* Offset for nav */
    overflow: hidden;
}

.hero-background-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

/* Abstract glowing shapes in background */
.bg-shape {
    position: absolute;
    filter: blur(80px);
    opacity: 0.5;
    z-index: -1;
    animation: drift 20s infinite alternate ease-in-out;
}

.circle {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--color-primary) 0%, transparent 70%);
    top: 10%;
    left: -10%;
}

.polygon {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--color-accent-dark) 0%, transparent 70%);
    bottom: -10%;
    right: -10%;
    animation-delay: -5s;
}

.hero-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    width: 100%;
    position: relative;
    z-index: 10;
}

.hero-text h1 {
    font-size: clamp(3rem, 5vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-text p {
    font-size: 1.15rem;
    color: #a0aec0;
    max-width: 500px;
    margin-bottom: 2.5rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

/* 3D Avatar Area */
.hero-graphics {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 600px; /* fixed height for float effect */
}

.avatar-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
    cursor: pointer;
}

.avatar-ring {
    position: absolute;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    border: 2px dashed var(--color-accent);
    opacity: 0;
    transform: scale(0.5) rotate(0deg);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 0;
    pointer-events: none;
}

.avatar-container:hover .avatar-ring {
    opacity: 0.8;
    transform: scale(1) rotate(180deg);
    box-shadow: 0 0 40px rgba(100, 255, 218, 0.2), inset 0 0 40px rgba(100, 255, 218, 0.2);
    animation: spinRing 20s linear infinite forwards;
}

@keyframes spinRing {
    100% { transform: scale(1) rotate(540deg); }
}

.floating-avatar {
    max-width: 90%;
    max-height: 100%;
    object-fit: contain;
    animation: float 6s ease-in-out infinite;
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.5));
    transform-style: preserve-3d;
    z-index: 2;
    transition: filter 0.5s ease;
}

.avatar-container:hover .floating-avatar {
    filter: drop-shadow(0 0 30px rgba(100, 255, 218, 0.6));
}

.chat-bubble {
    position: absolute;
    top: 15%;
    right: 5%;
    background: rgba(3, 10, 22, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid var(--color-accent);
    padding: 1.2rem 1.5rem;
    border-radius: 20px 20px 20px 0;
    color: var(--color-heading);
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: 1.1rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5), 0 0 15px rgba(100, 255, 218, 0.2);
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
    pointer-events: none;
    max-width: 250px;
}

.avatar-container:hover .chat-bubble {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition-delay: 0.3s;
    pointer-events: auto; /* Allow clicking the link when visible */
}

.chat-text {
    display: inline-block;
    color: var(--color-heading);
    text-decoration: none;
    opacity: 0;
    transition: opacity 0.3s ease, color 0.3s ease;
    transition-delay: 1.2s; /* shows after typing dots */
}

.chat-text:hover {
    color: var(--color-accent);
}

.avatar-container:hover .chat-text {
    opacity: 1;
}

.typing-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--color-accent);
    border-radius: 50%;
    margin-right: 4px;
    animation: typing 1.4s infinite ease-in-out both;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.typing-dot:nth-child(1) { left: 20px; animation-delay: -0.32s; }
.typing-dot:nth-child(2) { left: 32px; animation-delay: -0.16s; }
.typing-dot:nth-child(3) { left: 44px; animation-delay: 0s; }

.avatar-container:hover .typing-dot {
    opacity: 0;
    transition: opacity 0.3s ease;
    transition-delay: 1s; /* fade out typing dots */
}

@keyframes typing {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

.glow-underneath {
    position: absolute;
    bottom: 50px;
    width: 250px;
    height: 20px;
    background: radial-gradient(ellipse at center, rgba(100, 255, 218, 0.4) 0%, rgba(0,0,0,0) 70%);
    border-radius: 50%;
    animation: pulseGlow 6s ease-in-out infinite;
}

/* ==================================
   SERVICES SECTION
   ================================== */
.services-section {
    position: relative;
    background-color: var(--color-bg-light);
}

.service-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    border-radius: 20px;
    transition: transform 0.4s ease;
}

.service-card-link:hover {
    transform: translateY(-5px);
}

.section-header {
    margin-bottom: 4rem;
}

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

.section-subtitle {
    color: #a0aec0;
    font-size: 1.1rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.service-card {
    padding: 2.5rem;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(100,255,218,0.05) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.service-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    border-color: rgba(100, 255, 218, 0.3);
}

.service-card:hover::before {
    opacity: 1;
}

.service-img-container {
    height: 160px;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

.service-3d-img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 15px 25px rgba(0,0,0,0.6));
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.6s ease;
    transform-style: preserve-3d;
    border-radius: 12px;
}

.service-card:hover .service-3d-img {
    transform: translateY(-20px) scale(1.15) rotateY(15deg) rotateX(10deg);
    filter: drop-shadow(0 30px 40px rgba(100, 255, 218, 0.25));
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.service-card p {
    color: #a0aec0;
    font-size: 0.95rem;
}

/* ==================================
   WHY CHOOSE US SECTION
   ================================== */
.why-us-section {
    position: relative;
    z-index: 10;
}

.why-us-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.why-us-content .section-subtitle {
    margin-bottom: 3rem;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
}

.why-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.why-card {
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.why-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5), inset 0 0 15px rgba(16, 185, 129, 0.1);
}

.why-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 0;
    background: var(--color-accent);
    transition: height 0.4s ease;
}

.why-card:hover::before {
    height: 100%;
}

.icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.icon-wrapper svg {
    width: 24px;
    height: 24px;
    color: var(--color-accent);
}

.why-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--color-heading);
}

.why-card p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.6;
    margin: 0;
}

.interactive-shield-3d {
    position: relative;
    animation: float 6s ease-in-out infinite;
}

.shield-img:hover {
    transform: scale(1.05) rotateY(10deg);
}

/* ==================================
   ABOUT / RESEARCH SECTION
   ================================== */
.about-section {
    background: var(--color-bg);
}

.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.abstract-chart {
    height: 400px;
    position: relative;
    padding: 2rem;
    display: flex;
    align-items: flex-end;
    gap: 2rem;
    justify-content: center;
}

.bar {
    width: 60px;
    border-radius: 8px 8px 0 0;
    background: linear-gradient(180deg, var(--color-accent) 0%, rgba(100,255,218,0) 100%);
    box-shadow: 0 0 20px rgba(100,255,218,0.2);
    animation: growBar 3s ease-out forwards infinite alternate;
}

.bar-1 { height: 60%; animation-delay: 0s; }
.bar-2 { height: 85%; animation-delay: 1s; }
.bar-3 { height: 40%; animation-delay: 2s; }

.about-text p {
    color: #a0aec0;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.stats-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid var(--glass-border);
}

.stat-num {
    display: block;
    font-size: 2.5rem;
    font-family: var(--font-secondary);
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #8892b0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ==================================
   FOOTER / CONTACT SECTION
   ================================== */
.footer-section {
    background: #020610;
    border-top: 1px solid var(--glass-border);
    padding-top: var(--spacing-lg);
    position: relative;
}

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

.large-logo {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.company-desc {
    color: #8892b0;
    max-width: 300px;
}

.footer-links h4, .footer-contact h4 {
    color: var(--color-heading);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-links ul li {
    margin-bottom: 1rem;
}

.footer-links ul li a {
    color: #8892b0;
    transition: color 0.3s ease;
}

.footer-links ul li a:hover {
    color: var(--color-accent);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    color: #8892b0;
}

.contact-icon {
    width: 24px;
    height: 24px;
    color: var(--color-accent);
    flex-shrink: 0;
}

.footer-bottom {
    text-align: center;
    padding: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: #495670;
    font-size: 0.9rem;
}

/* ==================================
   READ MORE LINK
   ================================== */
.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1rem;
    color: var(--color-accent);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: gap 0.3s ease, opacity 0.3s ease;
}

.read-more .arrow {
    display: inline-block;
    transition: transform 0.3s ease;
}

.service-card:hover .read-more .arrow {
    transform: translateX(5px);
}

.service-card:hover .read-more {
    gap: 0.7rem;
    opacity: 0.9;
}

/* ==================================
   ANIMATIONS & KEYFRAMES
   ================================== */

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(2deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

@keyframes pulseGlow {
    0% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 0.8; }
    100% { transform: scale(1); opacity: 0.5; }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}

@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 30px) scale(1.2); }
}

@keyframes growBar {
    0% { opacity: 0.5; transform: scaleY(0.8); }
    100% { opacity: 1; transform: scaleY(1); }
}

/* Scroll Reveal Classes added by JS */
.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

/* ==================================
   RESPONSIVE DESIGN
   ================================== */
@media screen and (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 5rem;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-text p {
        margin: 0 auto 2.5rem auto;
    }
    
    .about-container {
        grid-template-columns: 1fr;
    }
    
    .about-images {
        order: -1;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

@media screen and (max-width: 768px) {
    .nav-links {
        display: none; /* Add hamburger menu logic for real site */
    }
    
    .stats-list {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* ==================================
   SOCIAL MEDIA BAR
   ================================== */
.social-bar {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    margin-top: 2rem;
    animation: fadeIn 1s ease-out;
}

.social-link {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-link:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--color-accent);
    color: var(--color-accent);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3);
}

.social-link svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@media screen and (max-width: 768px) {
    .social-bar {
        margin-top: 1.5rem;
        gap: 1rem;
    }
    
    .social-link {
        width: 40px;
        height: 40px;
    }
}
