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

:root {
    --bg-primary: #0a0e27;
    --bg-secondary: #0f1429;
    --bg-card: rgba(15, 20, 41, 0.6);
    --text-primary: #e0e6ff;
    --text-secondary: #a0a8c5;
    --accent-green: #00ff88;
    --accent-cyan: #00d9ff;
    --accent-purple: #a855f7;
    --glow-green: rgba(0, 255, 136, 0.5);
    --glow-cyan: rgba(0, 217, 255, 0.5);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(180deg, #0a0e27 0%, #050815 50%, #0a0e27 100%);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

h1 {
    font-size: 2em;
}

/* Canvas Background - Only in hero section */
#fiberCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 600px;
    z-index: 0;
    pointer-events: none;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 14, 39, 0.8);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 255, 136, 0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-accent {
    color: var(--accent-green);
    text-shadow: 0 0 20px var(--glow-green);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

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

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

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

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

.cta-btn {
    padding: 0.5rem 1.5rem !important;
    background: linear-gradient(135deg, var(--accent-green), var(--accent-cyan));
    border-radius: 25px;
    color: var(--bg-primary) !important;
    font-weight: 600;
    box-shadow: 0 0 20px var(--glow-green);
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 30px var(--glow-green);
}

.cta-btn::after {
    display: none;
}

/* Hero Section */
.hero {
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 8rem 0;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Wrapper for rotating word and cursor */
.rotating-word-wrapper {
    display: block;
    position: relative;
    min-width: 320px;
    min-height: 1.2em;
    text-align: center;
    margin: 0 auto;
}

/* Rotating word with glow effect */
.rotating-word {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    display: inline-block;
    /* Color and text-shadow are set dynamically via JavaScript */
    font-weight: 800;
    transition: opacity 0.3s ease-out;
    white-space: nowrap;
}

/* Blinking cursor */
.typing-cursor {
    position: absolute;
    top: 0;
    margin-left: 0px;
    font-weight: 700;
    font-size: 0.85em;
    line-height: 1;
    vertical-align: top;
    animation: cursorBlink 1s ease-in-out infinite;
    /* Color is set dynamically via JavaScript to match current word */
    /* Left position is set dynamically via JavaScript to follow text */
}

@keyframes cursorBlink {

    0%,
    49% {
        opacity: 1;
    }

    50%,
    100% {
        opacity: 0;
    }
}

.edge-gradient {
    display: inline-block;
    background: linear-gradient(90deg,
            #00ff88 0%,
            #00d9ff 25%,
            #a855f7 50%,
            #ff0080 75%,
            #00ff88 100%);
    background-size: 400% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientCycle 3s linear infinite;
    filter: drop-shadow(0 0 30px var(--glow-cyan));
    position: relative;
}

@keyframes gradientCycle {
    0% {
        background-position: 0% center;
    }

    50% {
        background-position: 100% center;
    }

    100% {
        background-position: 0% center;
    }
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn-primary,
.btn-secondary {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-green), var(--accent-cyan));
    color: var(--bg-primary);
    box-shadow: 0 5px 30px var(--glow-green);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 40px var(--glow-green);
}

.btn-secondary {
    background: transparent;
    color: transparent;
    /* border: 2px solid; */
    border-image: linear-gradient(90deg,
            #00ff88 0%,
            #00d9ff 25%,
            #a855f7 50%,
            #ff0080 75%,
            #00ff88 100%) 1;
    border-image-slice: 1;
    background: linear-gradient(90deg,
            #00ff88 0%,
            #00d9ff 25%,
            #a855f7 50%,
            #ff0080 75%,
            #00ff88 100%);
    background-size: 400% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientCycle 6s linear infinite;
    filter: drop-shadow(0 0 30px var(--glow-cyan));
    position: relative;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50px;
    padding: 2px;
    background: linear-gradient(90deg,
            #00ff88 0%,
            #00d9ff 25%,
            #a855f7 50%,
            #ff0080 75%,
            #00ff88 100%);
    background-size: 200% auto;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: gradientCycle 3s linear infinite;
    z-index: -1;
}

.btn-secondary:hover {
    background: rgba(0, 255, 136, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(0, 255, 136, 0.2);
}

/* Section Styles */
section {
    padding: 6rem 0;
    position: relative;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
}

.highlight {
    color: var(--accent-green);
    text-shadow: 0 0 20px var(--glow-green);
}

/* Services Section */
.services {
    background: linear-gradient(180deg, transparent, var(--bg-secondary), transparent);
}

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

.service-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    padding: 2.5rem 2rem;
    border-radius: 20px;
    border: 1px solid rgba(0, 255, 136, 0.1);
    transition: all 0.3s ease;
    text-align: center;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-green);
    box-shadow: 0 10px 40px var(--glow-green);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    filter: grayscale(0.5);
    transition: filter 0.3s ease;
}

.service-card:hover .service-icon {
    filter: grayscale(0);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.service-card p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Technology Section */
.tech-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-top: 4rem;
}

.stat {
    text-align: center;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 15px;
    border: 1px solid rgba(0, 217, 255, 0.2);
    transition: all 0.3s ease;
}

.stat:hover {
    transform: scale(1.05);
    border-color: var(--accent-cyan);
    box-shadow: 0 10px 40px var(--glow-cyan);
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-green), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

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

/* About Section */
.about {
    background: linear-gradient(180deg, transparent, var(--bg-secondary));
}

.about-text {
    max-width: 800px;
    margin: 0 auto 2rem auto;
    font-size: 1.2rem;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.8;
}

/* Contact Section */
.contact-form {
    max-width: 600px;
    margin: 3rem auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-green);
    box-shadow: 0 0 20px var(--glow-green);
}

.contact-form button {
    width: 100%;
}

/* Footer */
.footer {
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid rgba(0, 255, 136, 0.1);
    background: var(--bg-secondary);
}

.footer p {
    color: var(--text-secondary);
    margin: 0.5rem 0;
}

.footer-tagline {
    font-style: italic;
    color: var(--accent-green);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--accent-green);
    border-radius: 3px;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px var(--glow-green);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Responsive */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 70%;
        max-width: 300px;
        background: rgba(10, 14, 39, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 6rem 2rem 2rem 2rem;
        gap: 2rem;
        transition: right 0.3s ease;
        border-left: 1px solid rgba(0, 255, 136, 0.2);
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
        z-index: 1000;
        overflow-y: auto;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 0.75rem 0;
        font-size: 1.1rem;
    }

    .cta-btn {
        text-align: center;
        width: 100%;
        display: block !important;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection */
::selection {
    background: var(--accent-green);
    color: var(--bg-primary);
}