:root {
    --primary-bg: #0D1117;
    --secondary-bg: #161B22;
    --accent-bg: #21262D;
    --primary-accent: #00D8FF;
    --secondary-accent: #7C3AED;
    --tertiary-accent: #F59E0B;
    --text-primary: #F0F6FC;
    --text-secondary: #8B949E;
    --text-accent: #58A6FF;
    --border-color: #30363D;
    --success-color: #238636;
    --warning-color: #F85149;
    --gradient-primary: linear-gradient(135deg, var(--primary-accent), var(--secondary-accent));
    --gradient-secondary: linear-gradient(135deg, var(--secondary-accent), var(--tertiary-accent));
    --shadow-glow: 0 0 30px rgba(0, 216, 255, 0.1);
    --shadow-elevated: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

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

html {
    scroll-behavior: smooth;
}

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

/* Animated Background - Floating Shapes */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: var(--primary-bg);
}

.bg-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.bg-shapes li {
    position: absolute;
    display: block;
    list-style: none;
    width: 20px;
    height: 20px;
    background: rgba(0, 216, 255, 0.1);
    /* Using your primary accent color */
    animation: animateShapes 25s linear infinite;
    bottom: -150px;
    /* Start below the screen */
}

/* Customize each shape for a random effect */
.bg-shapes li:nth-child(1) {
    left: 25%;
    width: 80px;
    height: 80px;
    animation-delay: 0s;
}

.bg-shapes li:nth-child(2) {
    left: 10%;
    width: 20px;
    height: 20px;
    animation-delay: 2s;
    animation-duration: 12s;
}

.bg-shapes li:nth-child(3) {
    left: 70%;
    width: 20px;
    height: 20px;
    animation-delay: 4s;
}

.bg-shapes li:nth-child(4) {
    left: 40%;
    width: 60px;
    height: 60px;
    animation-delay: 0s;
    animation-duration: 18s;
}

.bg-shapes li:nth-child(5) {
    left: 65%;
    width: 20px;
    height: 20px;
    animation-delay: 0s;
}

.bg-shapes li:nth-child(6) {
    left: 75%;
    width: 110px;
    height: 110px;
    animation-delay: 3s;
}

.bg-shapes li:nth-child(7) {
    left: 35%;
    width: 150px;
    height: 150px;
    animation-delay: 7s;
}

.bg-shapes li:nth-child(8) {
    left: 50%;
    width: 25px;
    height: 25px;
    animation-delay: 15s;
    animation-duration: 45s;
}

.bg-shapes li:nth-child(9) {
    left: 20%;
    width: 15px;
    height: 15px;
    animation-delay: 2s;
    animation-duration: 35s;
}

.bg-shapes li:nth-child(10) {
    left: 85%;
    width: 150px;
    height: 150px;
    animation-delay: 0s;
    animation-duration: 11s;
}

@keyframes animateShapes {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
        border-radius: 0;
    }

    100% {
        transform: translateY(-1000px) rotate(720deg);
        opacity: 0;
        border-radius: 50%;
    }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(13, 17, 23, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(13, 17, 23, 0.95);
}

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

.logo {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;    
    margin-right: auto; 
}

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

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

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

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

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

/* Hamburger Menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    border-radius: 5px;
    transition: all 0.3s ease;
}

.menu-toggle.is-active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.is-active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.is-active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.lang-toggle {
    display: flex;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.lang-toggle span {
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.3s ease;
}

.lang-toggle span.active,
.lang-toggle span:hover {
    color: var(--primary-accent);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0 2rem;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    animation: fadeInUp 1s ease;
}

.hero-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-weight: 300;
    min-height: 1.8rem;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(0, 216, 255, 0.3);
}

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

.btn-secondary:hover {
    background: var(--primary-accent);
    color: var(--primary-bg);
    transform: translateY(-2px);
}

/* Section Styles */
.section {
    padding: 6rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
}

.about-card {
    background: var(--secondary-bg);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.about-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.about-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-elevated);
    border-color: var(--primary-accent);
}

.about-card:hover::before {
    transform: scaleX(1);
}

.about-card h3 {
    font-family: 'JetBrains Mono', monospace;
    color: var(--primary-accent);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

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

/* Team Section */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.team-card {
    background: var(--secondary-bg);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.team-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-elevated);
}

.team-card:hover .team-name {
    color: var(--text-primary);
}

.team-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    position: relative;
    overflow: hidden; 
}

.team-avatar img {
    width: 100%;
    height: 100%;
  object-fit: cover; 
}
.team-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary-accent);
    transition: color 0.3s ease;
}

.team-role {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.team-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.skill-tag {
    background: var(--accent-bg);
    color: var(--primary-accent);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    border: 1px solid var(--border-color);
}

/* Clients Section */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.client-card {
    background: var(--secondary-bg);
    padding: 3rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.client-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--gradient-primary);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.3s ease;
}

.client-card:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-elevated);
}

.client-card:hover::before {
    transform: scaleY(1);
    transform-origin: top;
}

.client-logo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    color: white;
    margin-bottom: 1.5rem;
}

.client-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-accent);
}

.client-description {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Portfolio Section */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.portfolio-card {
    background: var(--secondary-bg);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.portfolio-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-elevated);
}

.portfolio-image {
    width: 100%;
    height: 200px;
    background: var(--gradient-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    font-family: 'JetBrains Mono', monospace;
}

.portfolio-content {
    padding: 2rem;
}

.portfolio-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary-accent);
}

.portfolio-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.portfolio-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    background: var(--accent-bg);
    color: var(--tertiary-accent);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-family: 'JetBrains Mono', monospace;
    border: 1px solid var(--border-color);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--secondary-bg);
    padding: 3rem;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideInUp 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--primary-accent);
}

.modal-header {
    text-align: center;
    margin-bottom: 2rem;
}

.modal-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 3rem;
    font-weight: 700;
    color: white;
    margin: 0 auto 1.5rem;
    border: 3px solid var(--primary-accent);
}

.modal-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-role {
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2rem;
}

.modal-description {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2rem;
}

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

.modal-link {
    display: inline-block;
    background: var(--gradient-primary);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.modal-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* Footer */
.footer {
    background: var(--secondary-bg);
    border-top: 1px solid var(--border-color);
    padding: 3rem 2rem 2rem;
    text-align: center;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-logo {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.footer-text {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll animations */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-animate.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Programmer-friendly styles */
.code-highlight {
    font-family: 'JetBrains Mono', monospace;
    background: var(--accent-bg);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    color: var(--primary-accent);
    border: 1px solid var(--border-color);
}

.console-text {
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-primary);
}

.console-text::before {
    content: '> ';
    color: var(--primary-accent);
}

.typing-effect::after {
    content: '_';
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

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

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .nav-container {
        padding: 1rem;
    }

    .menu-toggle {
        display: flex;
        z-index: 1001;
        /* Above navbar */
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        width: 70%;
        height: 100vh;
        background: var(--secondary-bg);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
    }

    .nav-links.is-active {
        transform: translateX(0);
    }

    .hero {
        padding: 0 1rem;
    }

    .section {
        padding: 4rem 1rem;
    }

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

    .btn {
        width: 100%;
        max-width: 250px;
    }

    .about-grid,
    .team-grid,
    .clients-grid,
    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .clients-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    .modal-content {
        margin: 5% auto;
        padding: 2rem;
        width: 95%;
    }
}

.lang-toggle {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-left: 2rem; /* Pushes it to the left of the menu toggle on mobile */
    margin-right: 1.5rem; /* Space between it and the hamburger menu */
}

.lang-toggle span {
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.3s ease;
    font-weight: 500;
}

.lang-toggle span.active,
.lang-toggle span:hover {
    color: var(--primary-accent);
}

/* On mobile, ensure it's visible and positioned correctly */
@media (max-width: 768px) {
    .nav-container {
        /* Remove padding-right to let flex items space out */
        padding-right: 1rem; 
    }
    
    .nav-links {
        /* ... your existing mobile styles for nav-links ... */
        gap: 2rem;
    }
    
    .lang-toggle {
        order: 1; /* Puts the lang toggle before the menu icon if needed */
        margin-right: 1rem; /* Adjust spacing */
    }

    .menu-toggle {
        order: 2; /* Ensures hamburger is last */
    }
}
